Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -17,6 +17,7 @@ clean:
|
||||
rm -fr *.tar.gz
|
||||
rm -fr *.zip
|
||||
rm -fr build/linux/lampp
|
||||
rm -rf buildroot/
|
||||
rm -fr lampp
|
||||
rm -fr zentaoxx
|
||||
common:
|
||||
@@ -191,14 +192,18 @@ en:
|
||||
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 zentaoxx
|
||||
unzip zentaoxx.*.zip
|
||||
cp zentaoxx/* zentaopms/ -r
|
||||
cat zentaoxx/db/xuanxuan.sql >> zentaopms/db/zentao.sql
|
||||
make package
|
||||
mv zentaopms zentaoalm
|
||||
zip -r -9 ZenTaoALM.$(VERSION).int.zip zentaoalm
|
||||
rm -fr zentaoalm
|
||||
echo $(VERSION).int > VERSION
|
||||
make endeb
|
||||
make enrpm
|
||||
echo $(VERSION) > VERSION
|
||||
#echo $(VERSION).int > VERSION
|
||||
#make endeb
|
||||
#make enrpm
|
||||
#echo $(VERSION) > VERSION
|
||||
endeb:
|
||||
mkdir buildroot
|
||||
cp -r build/debian/DEBIAN buildroot
|
||||
@@ -239,9 +244,13 @@ ci:
|
||||
endif
|
||||
|
||||
make package
|
||||
if [ -d $(BUILD_PATH)/zentaopms ]; then rm -r $(BUILD_PATH)/zentaopms; fi
|
||||
zip -rq -9 ZenTaoPMS.$(VERSION).zip zentaopms
|
||||
mv zentaopms $(BUILD_PATH)
|
||||
make deb; make rpm; make en
|
||||
#make deb; make rpm; make en
|
||||
rm -fr zentaopms zentaoxx zentaoxx.*.zip
|
||||
mv *.zip *.deb *.rpm $(BUILD_PATH)
|
||||
make en
|
||||
rm -fr zentaopms zentaoxx zentaoxx.*.zip
|
||||
php tools/mergezentaopms.php $(VERSION)
|
||||
rm zentaobiz*.zip zentaomax*.zip
|
||||
cp ZenTaoPMS.$(VERSION).zip $(BUILD_PATH)
|
||||
rm -f $(RELEASE_PATH)/*.deb $(RELEASE_PATH)/*.rpm
|
||||
mv *.zip *.deb *.rpm $(RELEASE_PATH)
|
||||
|
||||
@@ -636,6 +636,7 @@ $lang->resource->custom->editStoryConcept = 'editStoryConcept';
|
||||
$lang->resource->custom->browseStoryConcept = 'browseStoryConcept';
|
||||
$lang->resource->custom->setDefaultConcept = 'setDefaultConcept';
|
||||
$lang->resource->custom->deleteStoryConcept = 'deleteStoryConcept';
|
||||
if($config->edition != 'open') $lang->resource->custom->libreoffice = 'libreOffice';
|
||||
|
||||
$lang->custom->methodOrder[5] = 'index';
|
||||
$lang->custom->methodOrder[10] = 'set';
|
||||
@@ -651,6 +652,7 @@ $lang->custom->methodOrder[55] = 'editStoryConcept';
|
||||
$lang->custom->methodOrder[60] = 'browseStoryConcept';
|
||||
$lang->custom->methodOrder[65] = 'setDefaultConcept';
|
||||
$lang->custom->methodOrder[70] = 'deleteStoryConcept';
|
||||
$lang->custom->methodOrder[75] = 'libreoffice';
|
||||
|
||||
$lang->resource->datatable = new stdclass();
|
||||
$lang->resource->datatable->setGlobal = 'setGlobal';
|
||||
|
||||
@@ -1241,7 +1241,7 @@ class bug extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$users = $this->user->getPairs('noclosed|nofeedback', $bug->assignedTo);
|
||||
$users = $this->user->getPairs('noclosed', $bug->assignedTo);
|
||||
}
|
||||
|
||||
$this->view->title = $this->products[$bug->product] . $this->lang->colon . $this->lang->bug->assignedTo;
|
||||
|
||||
@@ -194,7 +194,7 @@ $lang->doc->noArticle = '暂时没有文章。';
|
||||
$lang->doc->noLib = '暂时没有文档库。';
|
||||
$lang->doc->noBook = 'WIKI库还未创建手册,请新建 :)';
|
||||
$lang->doc->cannotCreateOffice = '<p>对不起,企业版才能创建%s文档。<p><p>试用企业版,请联系我们:4006-8899-23 0532-86893032。</p>';
|
||||
$lang->doc->notSetOffice = "<p>创建%s文档,需要配置<a href='%s'>Office转换设置</a>。<p>";
|
||||
$lang->doc->notSetOffice = "创建%s文档,需要配置<a href='%s'>Office转换设置</a>。";
|
||||
$lang->doc->noSearchedDoc = '没有搜索到任何文档。';
|
||||
$lang->doc->noEditedDoc = '您还没有编辑任何文档。';
|
||||
$lang->doc->noOpenedDoc = '您还没有创建任何文档。';
|
||||
|
||||
@@ -19,7 +19,16 @@
|
||||
</div>
|
||||
<?php if($this->config->edition != 'open'):?>
|
||||
<div class='alert alert-warning strong'>
|
||||
<?php printf($lang->doc->notSetOffice, zget($lang->doc->typeList, $docType), common::hasPriv('custom', 'libreoffice') ? $this->createLink('custom', 'libreoffice') : '###');?>
|
||||
<?php
|
||||
if(common::hasPriv('custom', 'libreoffice'))
|
||||
{
|
||||
printf($lang->doc->notSetOffice, zget($lang->doc->typeList, $docType), $this->createLink('custom', 'libreoffice', 'onlybody=yes'));
|
||||
}
|
||||
else
|
||||
{
|
||||
printf($lang->doc->notSetOffice, zget($lang->doc->typeList, $docType), '###'); echo $lang->doc->accessDenied;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='alert alert-warning strong'><?php printf($lang->doc->cannotCreateOffice, zget($lang->doc->typeList, $docType));?></div>
|
||||
|
||||
@@ -2622,7 +2622,7 @@ class execution extends control
|
||||
$this->loadModel('dept');
|
||||
|
||||
$execution = $this->execution->getById($executionID);
|
||||
$users = $this->user->getPairs('noclosed|nodeleted|devfirst|nofeedback', '', $this->config->maxCount);
|
||||
$users = $this->user->getPairs('noclosed|nodeleted|devfirst', '', $this->config->maxCount);
|
||||
$roles = $this->user->getUserRoles(array_keys($users));
|
||||
$deptUsers = empty($dept) ? array() : $this->dept->getDeptUserPairs($dept);
|
||||
|
||||
@@ -2637,7 +2637,7 @@ class execution extends control
|
||||
foreach($members2Import as $member) $appendUsers[$member->account] = $member->account;
|
||||
foreach($deptUsers as $deptAccount => $userName) $appendUsers[$deptAccount] = $deptAccount;
|
||||
|
||||
$users = $this->user->getPairs('noclosed|nodeleted|devfirst|nofeedback', $appendUsers, $this->config->maxCount);
|
||||
$users = $this->user->getPairs('noclosed|nodeleted|devfirst', $appendUsers, $this->config->maxCount);
|
||||
$roles = $this->user->getUserRoles(array_keys($users));
|
||||
|
||||
/* Set menu. */
|
||||
|
||||
@@ -1349,7 +1349,7 @@ class project extends control
|
||||
}
|
||||
|
||||
$project = $this->project->getById($projectID);
|
||||
$users = $this->user->getPairs('noclosed|nodeleted|devfirst|nofeedback');
|
||||
$users = $this->user->getPairs('noclosed|nodeleted|devfirst');
|
||||
$roles = $this->user->getUserRoles(array_keys($users));
|
||||
$deptUsers = $dept === '' ? array() : $this->dept->getDeptUserPairs($dept);
|
||||
$userInfoList = $this->user->getUserDisplayInfos(array_keys($users), $dept);
|
||||
|
||||
@@ -706,7 +706,7 @@ class searchModel extends model
|
||||
$index->title = $object->{$fields->title};
|
||||
$index->addedDate = isset($object->{$fields->addedDate}) ? $object->{$fields->addedDate} : '0000-00-00 00:00:00';
|
||||
$index->editedDate = isset($object->{$fields->editedDate}) ? $object->{$fields->editedDate} : '0000-00-00 00:00:00';
|
||||
$index->vision = $this->config->vision;
|
||||
$index->vision = isset($object->vision) ? $object->vision : 'rnd';
|
||||
|
||||
$index->content = '';
|
||||
$contentFields = explode(',', $fields->content . ',comment');
|
||||
|
||||
+17
-17
@@ -2122,23 +2122,6 @@ class taskModel extends model
|
||||
}
|
||||
$parents = $this->dao->select('*')->from(TABLE_TASK)->where('id')->in($parents)->fetchAll('id');
|
||||
|
||||
foreach($tasks as $task)
|
||||
{
|
||||
if($task->parent > 0)
|
||||
{
|
||||
if(isset($tasks[$task->parent]))
|
||||
{
|
||||
$tasks[$task->parent]->children[$task->id] = $task;
|
||||
unset($tasks[$task->id]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$parent = $parents[$task->parent];
|
||||
$task->parentName = $parent->name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->config->vision == 'lite') {
|
||||
$lanes = array();
|
||||
$cardsWhere = '';
|
||||
@@ -2173,6 +2156,23 @@ class taskModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
foreach($tasks as $task)
|
||||
{
|
||||
if($task->parent > 0)
|
||||
{
|
||||
if(isset($tasks[$task->parent]))
|
||||
{
|
||||
$tasks[$task->parent]->children[$task->id] = $task;
|
||||
unset($tasks[$task->id]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$parent = $parents[$task->parent];
|
||||
$task->parentName = $parent->name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->processTasks($tasks);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,25 @@ if(empty($langType)) die('lang') . "\n";
|
||||
foreach(array('../module/') as $subModuleRoot)
|
||||
{
|
||||
foreach(glob($subModuleRoot . '*') as $moduleName)
|
||||
{
|
||||
$realModulePath = realpath($moduleName);
|
||||
$moduleLangPath = $realModulePath . '/lang/';
|
||||
$defaultLangFile = $moduleLangPath . 'zh-cn.php';
|
||||
$targetLangFile = $moduleLangPath . $langType . '.php';
|
||||
if(file_exists($defaultLangFile))
|
||||
{
|
||||
system("cconv -f utf-8 -t UTF8-TW $defaultLangFile > $targetLangFile");
|
||||
$defaultLang = file_get_contents($targetLangFile);
|
||||
$targetLang = str_replace('zh-cn', $langDesc, $defaultLang);
|
||||
file_put_contents($targetLangFile, $targetLang);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$basePath = dirname(dirname(__FILE__));
|
||||
foreach(glob($basePath . '/extension/*') as $extType)
|
||||
{
|
||||
foreach(glob($extType . '/*') as $moduleName)
|
||||
{
|
||||
$realModulePath = realpath($moduleName);
|
||||
$moduleLangPath = $realModulePath . '/lang/';
|
||||
|
||||
Executable
+107
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
$pmsVersion = $argv[1];
|
||||
$basePath = dirname(dirname(__FILE__));
|
||||
|
||||
if(empty($pmsVersion)) die("Please give me pms version.\n");
|
||||
|
||||
$releasePath = exec('echo $ZENTAO_RELEASE_PATH;');
|
||||
$releasePath = !empty($releasePath) ? $releasePath : $basePath;
|
||||
|
||||
if(!file_exists($releasePath . '/zentaopms.zip')) die("Please give me encrypted packages.\n");
|
||||
|
||||
`cp $releasePath/zentaopms.zip $basePath`;
|
||||
`unzip zentaopms.zip; rm zentaopms.zip`;
|
||||
|
||||
$fileList = array();
|
||||
$fileList[] = "{$basePath}/zentaobiz.php5.3_5.6.zip";
|
||||
$fileList[] = "{$basePath}/zentaobiz.php7.0.zip";
|
||||
$fileList[] = "{$basePath}/zentaobiz.php7.1.zip";
|
||||
$fileList[] = "{$basePath}/zentaobiz.php7.2_7.4.zip";
|
||||
|
||||
$fileList[] = "{$basePath}/zentaomax.php5.3_5.6.zip";
|
||||
$fileList[] = "{$basePath}/zentaomax.php7.0.zip";
|
||||
$fileList[] = "{$basePath}/zentaomax.php7.1.zip";
|
||||
$fileList[] = "{$basePath}/zentaomax.php7.2_7.4.zip";
|
||||
|
||||
checkExistsFiles($fileList);
|
||||
|
||||
// zip
|
||||
foreach(array('zh-cn', 'en') as $langType)
|
||||
{
|
||||
$packPrefix = $langType == 'zh-cn' ? 'ZenTaoPMS' : 'ZenTaoALM';
|
||||
$version = $langType == 'zh-cn' ? $pmsVersion : $pmsVersion . '.int';
|
||||
$dirName = $langType == 'zh-cn' ? 'zentaopms' : 'zentaoalm';
|
||||
|
||||
foreach(array('5.3_5.6', '7.0', '7.1', '7.2_7.4') as $phpVersion)
|
||||
{
|
||||
`unzip $packPrefix.{$version}.zip`;
|
||||
`unzip zentaobiz.php{$phpVersion}.zip`;
|
||||
`unzip zentaomax.php{$phpVersion}.zip`;
|
||||
`cp -rf biz/* $dirName/`;
|
||||
`cp -rf max/* $dirName/`;
|
||||
`zip -r $packPrefix.{$version}.php{$phpVersion}.zip $dirName`;
|
||||
`rm -rf biz/ max/ $dirName/`;
|
||||
}
|
||||
}
|
||||
// deb
|
||||
//foreach(array('zh-cn', 'en') as $langType)
|
||||
//{
|
||||
// $packPrefix = $langType == 'zh-cn' ? 'ZenTaoPMS' : 'ZenTaoALM';
|
||||
// $version = $langType == 'zh-cn' ? $pmsVersion : $pmsVersion . '.int';
|
||||
// $dirName = $langType == 'zh-cn' ? 'zentaopms' : 'zentaoalm';
|
||||
//
|
||||
// foreach(array('5.3_5.6', '7.0', '7.1', '7.2_7.4') as $phpVersion)
|
||||
// {
|
||||
// `mkdir buildroot`;
|
||||
// `cp -r build/debian/DEBIAN buildroot`;
|
||||
// `sed -i '/^Version/cVersion: $version' buildroot/DEBIAN/control`;
|
||||
// `mkdir buildroot/opt`;
|
||||
// `mkdir buildroot/etc/apache2/sites-enabled/ -p`;
|
||||
// `cp build/debian/zentaopms.conf buildroot/etc/apache2/sites-enabled/`;
|
||||
// `cp $packPrefix.$version.php{$phpVersion}.zip buildroot/opt`;
|
||||
// `cd buildroot/opt; unzip $packPrefix.$version.php{$phpVersion}.zip; mv $dirName zentao; rm $packPrefix.$version.php{$phpVersion}.zip`;
|
||||
// `sed -i 's/index.php/\/zentao\/index.php/' buildroot/opt/zentao/www/.htaccess`;
|
||||
// `sudo dpkg -b buildroot/ {$packPrefix}_{$version}_{$phpVersion}_1_all.deb`;
|
||||
// `rm -rf buildroot`;
|
||||
// }
|
||||
//}
|
||||
//// rpm
|
||||
//foreach(array('zh-cn', 'en') as $langType)
|
||||
//{
|
||||
// $packPrefix = $langType == 'zh-cn' ? 'ZenTaoPMS' : 'ZenTaoALM';
|
||||
// $version = $langType == 'zh-cn' ? $pmsVersion : $pmsVersion . '.int';
|
||||
// $dirName = $langType == 'zh-cn' ? 'zentaopms' : 'zentaoalm';
|
||||
//
|
||||
// foreach(array('5.3_5.6', '7.0', '7.1', '7.2_7.4') as $phpVersion)
|
||||
// {
|
||||
// `mkdir ~/rpmbuild/SPECS -p`;
|
||||
// `mkdir ~/rpmbuild/SOURCES`;
|
||||
// `mkdir ~/rpmbuild/SOURCES/etc/httpd/conf.d/ -p`;
|
||||
// `mkdir ~/rpmbuild/SOURCES/opt/ -p`;
|
||||
//
|
||||
// `cp build/rpm/zentaopms.spec ~/rpmbuild/SPECS`;
|
||||
// `sed -i '/^Version/cVersion:$version' ~/rpmbuild/SPECS/zentaopms.spec`;
|
||||
// if($langType == 'en') `sed -i '/^Name:/cName:zentaoalm' ~/rpmbuild/SPECS/zentaopms.spec`;
|
||||
//
|
||||
// `cp $packPrefix.$version.php{$phpVersion}.zip ~/rpmbuild/SOURCES`;
|
||||
// if($langType == 'zh-cn') `cp build/debian/zentaopms.conf ~/rpmbuild/SOURCES/etc/httpd/conf.d/`;
|
||||
// if($langType == 'en') `cp build/debian/zentaopms.conf ~/rpmbuild/SOURCES/etc/httpd/conf.d/zentaoalm.conf`;
|
||||
//
|
||||
// `cd ~/rpmbuild/SOURCES; unzip $packPrefix.$version.php{$phpVersion}.zip; mv $dirName opt/zentao;`;
|
||||
// `sed -i 's/index.php/\/zentao\/index.php/' ~/rpmbuild/SOURCES/opt/zentao/www/.htaccess`;
|
||||
// `cd ~/rpmbuild/SOURCES; tar -czvf $dirName-$version.tar.gz etc opt; rm -rf $packPrefix.$version.php{$phpVersion}.zip etc opt;`;
|
||||
//
|
||||
// `rpmbuild -ba ~/rpmbuild/SPECS/zentaopms.spec`;
|
||||
// `cp ~/rpmbuild/RPMS/noarch/$dirName-$version-1.noarch.rpm ./{$dirName}-{$version}-php{$phpVersion}-1.noarch.rpm`;
|
||||
// `rm -rf ~/rpmbuild`;
|
||||
// }
|
||||
//}
|
||||
|
||||
function checkExistsFiles($fileList)
|
||||
{
|
||||
$files = '';
|
||||
foreach($fileList as $file)
|
||||
{
|
||||
if(!file_exists($file)) echo basename($file) . " is not exists\n";
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ $lang->resource->im->notifyMSG = 'notifyMSG';
|
||||
$lang->resource->im->sendNotification = 'sendNotification';
|
||||
$lang->resource->im->sendChatMessage = 'sendChatMessage';
|
||||
$lang->resource->im->downloadXxdPackage = 'downloadXXD';
|
||||
$lang->resource->im->debug = 'debug';
|
||||
|
||||
$lang->resource->client = new stdclass();
|
||||
$lang->resource->client->browse = 'browse';
|
||||
|
||||
@@ -14,6 +14,7 @@ $lang->resource->im->notifyMSG = 'notifyMSG';
|
||||
$lang->resource->im->sendNotification = 'sendNotification';
|
||||
$lang->resource->im->sendChatMessage = 'sendChatMessage';
|
||||
$lang->resource->im->downloadXxdPackage = 'downloadXXD';
|
||||
$lang->resource->im->debug = 'debug';
|
||||
|
||||
$lang->resource->client = new stdclass();
|
||||
$lang->resource->client->browse = 'browse';
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<?php if($this->app->user->admin != 'super'):?>
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.lite.html.php';?>
|
||||
<?php if($this->app->user->admin != 'super'):?>
|
||||
<div class='container' id='debugContainer'>
|
||||
<div class='notice text-center' style='font-size:24px;'>
|
||||
<?php $_SERVER['SCRIPT_NAME'] = '/index.php';?>
|
||||
@@ -29,7 +29,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.modal.html.php';?>
|
||||
<script>
|
||||
if(!window.v) window.v = {};
|
||||
window.v.showLog = <?php echo $config->xuanxuan->debug;?>;
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
<?php echo html::a(helper::createLink('setting', 'downloadXXD', 'type=package'), $lang->im->downloadXXD, 'hiddenwin', "class='btn btn-primary download download-package $disabled'");?>
|
||||
<?php echo html::a(helper::createLink('setting', 'downloadXXD', 'type=config'), $lang->im->downloadConfig, 'hiddenwin', "class='btn btn-primary download $disabled'");?>
|
||||
<?php echo html::a(helper::createLink('setting', 'xuanxuan', 'type=edit'), $lang->im->changeSetting, '', "class='btn'");?>
|
||||
<?php if($debug) echo html::a(helper::createLink('im', 'debug', 'source=setting'), $lang->im->viewDebug, '', "class='btn viewDebug' data-toggle='modal'");?>
|
||||
<?php if($debug and common::hasPriv('im', 'debug')) echo html::a(helper::createLink('im', 'debug', 'source=setting'), $lang->im->viewDebug, '', "class='btn viewDebug iframe' data-height=220");?>
|
||||
<?php echo html::a('http://www.zentao.net/book/zentaopmshelp/302.html', $lang->im->help, '_blank', "class='btn'");?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user