Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -11,7 +11,7 @@ clean:
|
||||
rm -fr api*
|
||||
rm -fr build/linux/lampp
|
||||
rm -fr lampp
|
||||
pms:
|
||||
common:
|
||||
mkdir zentaopms
|
||||
cp -fr bin zentaopms/
|
||||
cp -fr config zentaopms/ && rm -fr zentaopms/config/my.php
|
||||
@@ -39,44 +39,43 @@ pms:
|
||||
find zentaopms -name tests |xargs rm -fr
|
||||
# notify.zip.
|
||||
mkdir zentaopms/www/data/notify/
|
||||
zentaoxx:
|
||||
#xuanxuan
|
||||
mkdir -p buildxx/config/ext
|
||||
mkdir -p buildxx/lib
|
||||
mkdir -p buildxx/module
|
||||
mkdir -p buildxx/framework
|
||||
mkdir -p buildxx/db
|
||||
mkdir -p buildxx/www
|
||||
mkdir -p buildxx/module/common/ext/model/
|
||||
mkdir -p zentaoxx/config/ext
|
||||
mkdir -p zentaoxx/lib
|
||||
mkdir -p zentaoxx/module
|
||||
mkdir -p zentaoxx/framework
|
||||
mkdir -p zentaoxx/db
|
||||
mkdir -p zentaoxx/www
|
||||
mkdir -p zentaoxx/module/common/ext/model/
|
||||
svn export https://github.com/easysoft/xuanxuan.git/branches/master/ranzhi/
|
||||
cp ranzhi/config/ext/xuanxuan.php buildxx/config/ext/
|
||||
cp -r ranzhi/lib/phpaes buildxx/lib/
|
||||
cp -r ranzhi/framework/xuanxuan.class.php buildxx/framework/
|
||||
cp -r ranzhi/db/*.sql buildxx/db/
|
||||
cp -r ranzhi/app/sys/chat buildxx/module/
|
||||
cp -r ranzhi/app/sys/common/ext/model/hook buildxx/module/common/ext/model/
|
||||
cp -r ranzhi/app/sys/action buildxx/module/
|
||||
cp -r xuanxuan/config/* buildxx/config/
|
||||
cp -r xuanxuan/module/* buildxx/module/
|
||||
cp -r xuanxuan/www/* buildxx/www/
|
||||
sed -i 's/site,//' buildxx/module/chat/model.php
|
||||
sed -i 's/admin, g/g/' buildxx/module/chat/model.php
|
||||
sed -i '/password = md5/d' buildxx/module/chat/control.php
|
||||
sed -i '/getSignedTime/d' buildxx/module/chat/control.php
|
||||
sed -i 's/tree/dept/' buildxx/module/chat/control.php
|
||||
sed -i "s/, 'sys'//" buildxx/module/chat/control.php
|
||||
sed -i 's/system.sys/system/' buildxx/module/chat/control.php
|
||||
sed -i 's/&app=sys//' buildxx/module/chat/control.php
|
||||
sed -i 's/file->createdBy/file->addedBy/' buildxx/module/chat/control.php
|
||||
sed -i 's/file->createdDate/file->addedDate/' buildxx/module/chat/control.php
|
||||
sed -i 's/im_/zt_im_/' buildxx/db/*.sql
|
||||
sed -i 's/sys_user/zt_user/' buildxx/db/*.sql
|
||||
sed -i 's/sys_file/zt_file/' buildxx/db/*.sql
|
||||
sed -i '/sys_entry/d' buildxx/db/*.sql
|
||||
zip -rqm -9 xuanxuan.zentao.$(VERSION).zip buildxx/*
|
||||
rm -rf buildxx/
|
||||
unzip xuanxuan.zentao.*.zip -d zentaoxx
|
||||
cp zentaoxx/buildxx/* zentaopms/ -r
|
||||
cat zentaoxx/buildxx/db/xuanxuan.sql >> zentaopms/db/zentao.sql
|
||||
cp ranzhi/config/ext/xuanxuan.php zentaoxx/config/ext/
|
||||
cp -r ranzhi/lib/phpaes zentaoxx/lib/
|
||||
cp -r ranzhi/framework/xuanxuan.class.php zentaoxx/framework/
|
||||
cp -r ranzhi/db/*.sql zentaoxx/db/
|
||||
cp -r ranzhi/app/sys/chat zentaoxx/module/
|
||||
cp -r ranzhi/app/sys/common/ext/model/hook zentaoxx/module/common/ext/model/
|
||||
cp -r ranzhi/app/sys/action zentaoxx/module/
|
||||
cp -r xuanxuan/config/* zentaoxx/config/
|
||||
cp -r xuanxuan/module/* zentaoxx/module/
|
||||
cp -r xuanxuan/www/* zentaoxx/www/
|
||||
sed -i 's/site,//' zentaoxx/module/chat/model.php
|
||||
sed -i 's/admin, g/g/' zentaoxx/module/chat/model.php
|
||||
sed -i '/password = md5/d' zentaoxx/module/chat/control.php
|
||||
sed -i '/getSignedTime/d' zentaoxx/module/chat/control.php
|
||||
sed -i 's/tree/dept/' zentaoxx/module/chat/control.php
|
||||
sed -i "s/, 'sys'//" zentaoxx/module/chat/control.php
|
||||
sed -i 's/system.sys/system/' zentaoxx/module/chat/control.php
|
||||
sed -i 's/&app=sys//' zentaoxx/module/chat/control.php
|
||||
sed -i 's/file->createdBy/file->addedBy/' zentaoxx/module/chat/control.php
|
||||
sed -i 's/file->createdDate/file->addedDate/' zentaoxx/module/chat/control.php
|
||||
sed -i 's/im_/zt_im_/' zentaoxx/db/*.sql
|
||||
sed -i 's/sys_user/zt_user/' zentaoxx/db/*.sql
|
||||
sed -i 's/sys_file/zt_file/' zentaoxx/db/*.sql
|
||||
sed -i '/sys_entry/d' zentaoxx/db/*.sql
|
||||
zip -rqm -9 zentaoxx.$(VERSION).zip zentaoxx/*
|
||||
rm -rf ranzhi zentaoxx
|
||||
package:
|
||||
# change mode.
|
||||
chmod -R 777 zentaopms/tmp/
|
||||
chmod -R 777 zentaopms/www/data
|
||||
@@ -88,8 +87,27 @@ pms:
|
||||
for module in `ls zentaopms/module/`; do if [ ! -d "zentaopms/module/$$module/ext" ]; then mkdir zentaopms/module/$$module/ext; fi done
|
||||
find zentaopms/ -name ext |xargs chmod -R 777
|
||||
tools/cn2tw.php
|
||||
pms:
|
||||
make common
|
||||
make zentaoxx
|
||||
unzip zentaoxx.*.zip
|
||||
cp zentaoxx/* zentaopms/ -r
|
||||
cat zentaoxx/db/xuanxuan.sql >> zentaopms/db/zentao.sql
|
||||
make package
|
||||
zip -rq -9 ZenTaoPMS.$(VERSION).zip zentaopms
|
||||
rm -fr zentaopms ranzhi buildxx zentaoxx xuanxuan.zentao.*.zip
|
||||
rm -fr zentaopms zentaoxx zentaoxx.*.zip
|
||||
en:
|
||||
make common
|
||||
cd zentaopms/; grep -rl 'zentao.net'|xargs sed -i 's/zentao.net/zentao.pm/g';
|
||||
cd zentaopms/; grep -rl 'http://www.zentao.pm'|xargs sed -i 's/http:\/\/www.zentao.pm/https:\/\/www.zentao.pm/g';
|
||||
cd zentaopms/config/; echo >> config.php; echo '$$config->isINT = true;' >> config.php
|
||||
make package
|
||||
zip -r -9 ZenTaoPMS.$(VERSION).int.zip zentaopms
|
||||
rm -fr zentaopms
|
||||
echo $(VERSION).int > VERSION
|
||||
make deb
|
||||
make rpm
|
||||
echo $(VERSION) > VERSION
|
||||
deb:
|
||||
mkdir buildroot
|
||||
cp -r build/debian/DEBIAN buildroot
|
||||
@@ -117,17 +135,6 @@ rpm:
|
||||
rpmbuild -ba ~/rpmbuild/SPECS/zentaopms.spec
|
||||
cp ~/rpmbuild/RPMS/noarch/zentaopms-${VERSION}-1.noarch.rpm ./
|
||||
rm -rf ~/rpmbuild
|
||||
en:
|
||||
unzip ZenTaoPMS.${VERSION}.zip
|
||||
cd zentaopms/; grep -rl 'zentao.net'|xargs sed -i 's/zentao.net/zentao.pm/g';
|
||||
cd zentaopms/; grep -rl 'http://www.zentao.pm'|xargs sed -i 's/http:\/\/www.zentao.pm/https:\/\/www.zentao.pm/g';
|
||||
cd zentaopms/config/; echo >> config.php; echo '$$config->isINT = true;' >> config.php
|
||||
zip -r -9 ZenTaoPMS.$(VERSION).int.zip zentaopms
|
||||
rm -fr zentaopms
|
||||
echo $(VERSION).int > VERSION
|
||||
make deb
|
||||
make rpm
|
||||
echo $(VERSION) > VERSION
|
||||
patchphpdoc:
|
||||
sudo cp misc/doc/phpdoc/*.tpl /usr/share/php/data/PhpDocumentor/phpDocumentor/Converters/HTML/frames/templates/phphtmllib/templates/
|
||||
phpdoc:
|
||||
|
||||
@@ -1491,7 +1491,7 @@ EOD;
|
||||
*/
|
||||
public function checkIP($ipWhiteList = '')
|
||||
{
|
||||
$ip = $this->server->remote_addr;
|
||||
$ip = helper::getRemoteIp();
|
||||
|
||||
if(!$ipWhiteList) $ipWhiteList = $this->config->ipWhiteList;
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ class custom extends control
|
||||
}
|
||||
if($module == 'user' and $field == 'deleted')
|
||||
{
|
||||
$this->loadModel('user');
|
||||
$this->app->loadConfig('user');
|
||||
$this->view->showDeleted = isset($this->config->user->showDeleted) ? $this->config->user->showDeleted : '0';
|
||||
}
|
||||
|
||||
|
||||
@@ -1686,6 +1686,7 @@ class projectModel extends model
|
||||
public function getTeamMemberPairs($projectID, $params = '')
|
||||
{
|
||||
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getTeamMembersPairs();
|
||||
$this->app->loadConfig('user');
|
||||
$users = $this->dao->select('t1.account, t2.realname')->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
|
||||
->where('t1.root')->eq((int)$projectID)
|
||||
|
||||
@@ -63,7 +63,7 @@ function copyStoryTitle(num)
|
||||
|
||||
$('#name\\[' + num + '\\]').val(storyTitle);
|
||||
$('#estimate\\[' + num + '\\]').val($('#storyEstimate' + num).val());
|
||||
$('#desc\\[' + num + '\\]').val(($('#storyDesc' + num).val()).replace(/<[^>]+>/g,''));
|
||||
$('#desc\\[' + num + '\\]').val(($('#storyDesc' + num).val()).replace(/<[^>]+>/g,'').replace(/(\n)+\n/g, "\n").replace(/^\n/g, ''));
|
||||
|
||||
var storyPri = $('#storyPri' + num).val();
|
||||
if(storyPri == 0) $('#pri' + num ).val('3');
|
||||
|
||||
@@ -1428,7 +1428,7 @@ class taskModel extends model
|
||||
if($task->parent > 0) $task->parentName = $this->dao->findById($task->parent)->from(TABLE_TASK)->fetch('name');
|
||||
|
||||
$task->team = $this->dao->select('*')->from(TABLE_TEAM)->where('root')->eq($taskID)->andWhere('type')->eq('task')->orderBy('order')->fetchAll('account');
|
||||
foreach($children as $child) $child->team = isset($teams[$child->id]) ? $teams[$child->id] : array();
|
||||
foreach($children as $child) $child->team = array();
|
||||
|
||||
$task = $this->loadModel('file')->replaceImgURL($task, 'desc');
|
||||
if($setImgSize) $task->desc = $this->file->setImgSize($task->desc);
|
||||
|
||||
@@ -34,7 +34,7 @@ class treeModel extends model
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function buildMenuQuery($rootID, $type, $startModule, $branch = 0)
|
||||
public function buildMenuQuery($rootID, $type, $startModule = 0, $branch = 0)
|
||||
{
|
||||
/* Set the start module. */
|
||||
$startModulePath = '';
|
||||
|
||||
@@ -87,6 +87,7 @@ class userModel extends model
|
||||
$orderBy = strpos($params, 'first') !== false ? 'roleOrder DESC, account' : 'account';
|
||||
|
||||
/* Get raw records. */
|
||||
$this->app->loadConfig('user');
|
||||
$users = $this->dao->select($fields)->from(TABLE_USER)
|
||||
->where('1')
|
||||
->beginIF(strpos($params, 'nodeleted') !== false or empty($this->config->user->showDeleted))->andWhere('deleted')->eq('0')->fi()
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
class chat extends control
|
||||
{
|
||||
public function downloadXXD()
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$setting = fixer::input('post')->get();
|
||||
$result = $this->loadModel('setting')->setItems('system.common.xxd', $setting);
|
||||
$this->chat->downloadXXD($setting);
|
||||
}
|
||||
|
||||
if(!isset($this->config->xxd)) $this->config->xxd = new stdclass();
|
||||
$this->view->title = $this->lang->chat->downloadXXD;
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
$lang->chat->common = 'Xuanxuan';
|
||||
$lang->chat->turnon = 'On';
|
||||
$lang->chat->downloadXXD = 'Download XXD';
|
||||
$lang->chat->help = 'Help';
|
||||
$lang->chat->settings = 'Settings';
|
||||
|
||||
$lang->chat->turnonList = array();
|
||||
@@ -28,14 +29,12 @@ $lang->chat->createTodo = 'Create Todo';
|
||||
$lang->chat->statusList[1] = 'Enable';
|
||||
$lang->chat->statusList[0] = 'Disable';
|
||||
|
||||
$lang->chat->httpsOptions[1] = 'Enable';
|
||||
$lang->chat->httpsOptions[0] = 'Disable';
|
||||
|
||||
$lang->chat->xxdServerTip = 'XXD server address contains protocol and host and port,such as http://192.168.1.35 or http://pms.zentao.com. that can not be 127.0.0.1.';
|
||||
$lang->chat->xxdServerEmpty = 'XXD server address is empty.';
|
||||
$lang->chat->xxdServerError = 'XXD server address can not be 127.0.0.1.';
|
||||
$lang->chat->xxdSchemeError = 'Server address should started with http:// or https://.';
|
||||
$lang->chat->xxdPortError = 'Server address should contain valid port and the default is <strong>11443</strong>.';
|
||||
$lang->chat->zentaoClient = 'ZenTao Client is added!';
|
||||
$lang->chat->xxClientConfirm = 'Click to download new zentao client!';
|
||||
$lang->chat->xxServerConfirm = 'Click to download new zentao client server!';
|
||||
$lang->chat->info = "ZenTao client is powered by <a href='https://xuan.im/' target='_blank'>Xuan</a>, a secure and open source Instant Messenger by Nature Easy Soft. It is a self-hosted and cross-platform tool with numerous plug-ins and robust features. In Xuan, you can code your own plug-ins. Click <a href='https://xuan.im/' target='_blank'>HERE</a> for more.";
|
||||
@@ -47,12 +46,27 @@ $lang->chat->xxd->chatPort = 'Chat Port';
|
||||
$lang->chat->xxd->commonPort = 'Common Port';
|
||||
$lang->chat->xxd->isHttps = 'Ishttps';
|
||||
$lang->chat->xxd->uploadFileSize = 'File Size';
|
||||
$lang->chat->xxd->maxOnlineUser = 'Max. Online';
|
||||
$lang->chat->xxd->sslcrt = 'SSL Crt';
|
||||
$lang->chat->xxd->sslkey = 'SSL Key';
|
||||
$lang->chat->xxd->max = 'Max';
|
||||
$lang->chat->xxd->max = 'Max.';
|
||||
|
||||
$lang->chat->osList['win_i386'] = 'Windows 32位';
|
||||
$lang->chat->osList['win_x86_64'] = 'Windows 64位';
|
||||
$lang->chat->osList['linux_i386'] = 'Linux 32位';
|
||||
$lang->chat->osList['linux_x86_64'] = 'Linux 64位';
|
||||
$lang->chat->httpsOptions[1] = 'On';
|
||||
$lang->chat->httpsOptions[0] = 'Off';
|
||||
|
||||
$lang->chat->placeholder = new stdclass();
|
||||
$lang->chat->placeholder->xxd = new stdclass();
|
||||
$lang->chat->placeholder->xxd->ip = 'Listen the IP of the server. Enter 0.0.0.0 if it is not set.';
|
||||
$lang->chat->placeholder->xxd->chatPort = 'Port for communications with the client.';
|
||||
$lang->chat->placeholder->xxd->commonPort = 'Common port for client user login authentication and file upload/download.';
|
||||
$lang->chat->placeholder->xxd->isHttps = 'Use HTTPS';
|
||||
$lang->chat->placeholder->xxd->uploadFileSize = 'File size for the uploaded.';
|
||||
$lang->chat->placeholder->xxd->maxOnlineUser = 'Maximum number of users online.';
|
||||
$lang->chat->placeholder->xxd->sslcrt = 'Copy and paste certificate here.';
|
||||
$lang->chat->placeholder->xxd->sslkey = 'Copy and paste key here.';
|
||||
|
||||
$lang->chat->osList['win_i386'] = 'Windows 32-bit';
|
||||
$lang->chat->osList['win_x86_64'] = 'Windows 64-bit';
|
||||
$lang->chat->osList['linux_i386'] = 'Linux 32-bit';
|
||||
$lang->chat->osList['linux_x86_64'] = 'Linux 64-bit';
|
||||
$lang->chat->osList['darwin_x86_64'] = 'macOS';
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
$lang->chat->common = '客户端';
|
||||
$lang->chat->turnon = '是否打开';
|
||||
$lang->chat->downloadXXD = '下载XXD服务端';
|
||||
$lang->chat->help = '使用说明';
|
||||
$lang->chat->settings = '服务器设置';
|
||||
|
||||
@@ -29,9 +28,9 @@ $lang->chat->createTodo = '创建待办';
|
||||
$lang->chat->statusList[1] = '启用';
|
||||
$lang->chat->statusList[0] = '不启用';
|
||||
|
||||
$lang->chat->xxdServerTip = 'XXD服务器地址为完整的协议+地址+端口,示例:http://192.168.1.35 或 http://pms.zentao.com ,不能使用127.0.0.1。';
|
||||
$lang->chat->xxdServerEmpty = 'XXD服务器地址为空。';
|
||||
$lang->chat->xxdServerError = 'XXD服务器地址不能为 127.0.0.1。';
|
||||
$lang->chat->xxdServerTip = '禅道服务器地址为完整的协议+地址+端口,示例:http://192.168.1.35 或 http://pms.zentao.com ,不能使用127.0.0.1。';
|
||||
$lang->chat->xxdServerEmpty = '禅道服务器地址为空。';
|
||||
$lang->chat->xxdServerError = '禅道服务器地址不能为 127.0.0.1。';
|
||||
$lang->chat->xxdSchemeError = '服务器地址应该以<strong>http://</strong>或<strong>https://</strong>开头。';
|
||||
$lang->chat->xxdPortError = '服务器地址应该包含有效的端口号,默认为<strong>11443</strong>。';
|
||||
$lang->chat->zentaoClient = '新增禅道客户端!';
|
||||
|
||||
Reference in New Issue
Block a user