diff --git a/Makefile b/Makefile index 2dd791442a..cb782c8d7d 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,9 @@ common: mv zentaopms/www/install.php.tmp zentaopms/www/install.php mv zentaopms/www/upgrade.php.tmp zentaopms/www/upgrade.php cp VERSION zentaopms/ + # create index.html of each folder. + for path in `find zentaopms/ -type d`; do touch "$$path/index.html"; done + rm zentaopms/www/index.html # combine js and css files. cp -fr tools zentaopms/tools && cd zentaopms/tools/ && php ./minifyfront.php rm -fr zentaopms/tools diff --git a/VERSION b/VERSION index 1baf6d5a83..ee5d7542cc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -11.6.4 +11.6.5 diff --git a/build/debian/DEBIAN/control b/build/debian/DEBIAN/control index 7a38de52c5..22238f9369 100644 --- a/build/debian/DEBIAN/control +++ b/build/debian/DEBIAN/control @@ -3,8 +3,8 @@ Version: 6.1 Section: utils Priority: optional Architecture: all -Depends: apache2, libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5, php5-cli, php5-common, php5-mysql, php5-json, php5-ldap, mysql-server -Recommends: php5-gd +Depends: apache2, libapache2-mod-php | libapache2-mod-phpfilter | php-cgi | php-fpm | php, php-cli, php-common, php-mysql, php-json, php-ldap, mysql-server +Recommends: php-gd Installed-Size: 512 Maintainer: [url=www.zentao.net] Description: zentaopms diff --git a/config/config.php b/config/config.php index e0b26cde6c..c22ae36004 100644 --- a/config/config.php +++ b/config/config.php @@ -16,7 +16,7 @@ if(!class_exists('config')){class config{}} if(!function_exists('getWebRoot')){function getWebRoot(){}} /* 基本设置。Basic settings. */ -$config->version = '11.6.4'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it. +$config->version = '11.6.5'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it. $config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP. $config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time. $config->timezone = 'Asia/Shanghai'; // 时区设置。 The time zone setting, for more see http://www.php.net/manual/en/timezones.php. diff --git a/config/filter.php b/config/filter.php index 26f62f5ca2..2fb1c193d3 100644 --- a/config/filter.php +++ b/config/filter.php @@ -45,7 +45,6 @@ $filter->mail = new stdclass(); $filter->user = new stdclass(); $filter->block = new stdclass(); $filter->file = new stdclass(); -$filter->translate = new stdclass(); $filter->block->default = new stdclass(); $filter->block->main = new stdclass(); @@ -62,7 +61,6 @@ $filter->mail->ztcloud = new stdclass(); $filter->mail->batchdelete = new stdclass(); $filter->misc->checkupdate = new stdclass(); $filter->file->download = new stdclass(); -$filter->file->ajaxueditorupload = new stdclass(); $filter->product->browse = new stdclass(); $filter->product->default = new stdclass(); $filter->product->index = new stdclass(); @@ -184,7 +182,6 @@ $filter->doc->showfiles->get['recPerPage'] = 'int'; $filter->doc->showfiles->get['recTotal'] = 'int'; $filter->doc->showfiles->get['title'] = 'reg::any'; -$filter->file->ajaxueditorupload->get['action'] = 'equal::config'; $filter->file->download->get['charset'] = 'reg::lang'; $filter->mail->batchdelete->get['idList'] = 'reg::idList'; @@ -215,5 +212,3 @@ $filter->git->cat->get['repoUrl'] = 'reg::base64'; $filter->git->diff->get['repoUrl'] = 'reg::base64'; $filter->svn->cat->get['repoUrl'] = 'reg::base64'; $filter->svn->diff->get['repoUrl'] = 'reg::base64'; - -$filter->translate->module->cookie['translateView'] = 'equal::split'; diff --git a/config/zentaopms.php b/config/zentaopms.php index a5f8f0a6aa..d047cf9d26 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -13,6 +13,7 @@ /* Framework settings. */ $config->framework->autoRepairTable = true; $config->framework->autoLang = false; +$config->framework->filterCSRF = false; /* Upload settings. */ $config->allowedTags = '
diff --git a/module/common/view/kindeditor.html.php b/module/common/view/kindeditor.html.php index 4cec6a4670..093c35f3cd 100755 --- a/module/common/view/kindeditor.html.php +++ b/module/common/view/kindeditor.html.php @@ -5,7 +5,7 @@ $method = $this->methodName; if(!isset($config->$module->editor->$method)) return; $editor = $config->$module->editor->$method; $editor['id'] = explode(',', $editor['id']); -$editorLangs = array('en' => 'en', 'zh-cn' => 'zh_CN', 'zh-tw' => 'zh_TW'); +$editorLangs = array('en' => 'en', 'zh-cn' => 'zh_CN', 'zh-tw' => 'zh_TW', 'ja' => 'ja'); $editorLang = isset($editorLangs[$app->getClientLang()]) ? $editorLangs[$app->getClientLang()] : 'en'; /* set uid for upload. */ diff --git a/module/common/view/ueditor.html.php b/module/common/view/ueditor.html.php deleted file mode 100644 index a61d53c6e2..0000000000 --- a/module/common/view/ueditor.html.php +++ /dev/null @@ -1,63 +0,0 @@ -getExtViewFile(__FILE__)){include $extView; return helper::cd();}?> -moduleName; -$method = $this->methodName; -js::set('themeRoot', $themeRoot); -if(!isset($config->$module->editor->$method)) return; -$editor = $config->$module->editor->$method; -$editor['id'] = explode(',', $editor['id']); -$editorLangs = array('en' => 'en', 'zh-cn' => 'zh-cn', 'zh-tw' => 'zh-tw'); -$editorLang = isset($editorLangs[$app->getClientLang()]) ? $editorLangs[$app->getClientLang()] : 'en'; - -/* set uid for upload. */ -$uid = uniqid(''); -js::set('kuid', $uid); -?> - - - diff --git a/module/company/css/dynamic.css b/module/company/css/dynamic.css index 1202a55b98..7857018ad7 100644 --- a/module/company/css/dynamic.css +++ b/module/company/css/dynamic.css @@ -16,4 +16,4 @@ .dynamic.active .dynamic-date:before {background-color: #00a9fc;} .dynamic.collapsed .timeline {max-height: 58px;} .dynamic.collapsed .timeline > li + li {display: none;} -.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d7'; } +.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d8'; } diff --git a/module/company/view/dynamic.html.php b/module/company/view/dynamic.html.php index 99084a2dac..c39c4a6e03 100644 --- a/module/company/view/dynamic.html.php +++ b/module/company/view/dynamic.html.php @@ -46,7 +46,7 @@ action->dynamic->today;?> - + @@ -56,7 +56,8 @@ time?> - actor) . ' ' . $action->actionLabel;?> + actor);?> + actionLabel;?> action != 'login' and $action->action != 'logout'):?> objectLabel;?> objectLink, $action->objectName);?> diff --git a/module/convert/lang/zh-cn.php b/module/convert/lang/zh-cn.php index 893ea1ba24..19b314016b 100644 --- a/module/convert/lang/zh-cn.php +++ b/module/convert/lang/zh-cn.php @@ -35,7 +35,7 @@ $lang->convert->aimTypeOfZentao = '转化为Zentao中的类型'; $lang->convert->directionList['bug'] = 'Bug'; $lang->convert->directionList['task'] = '任务'; -$lang->convert->directionList['story'] = '需求'; +$lang->convert->directionList['story'] = $lang->storyCommon; $lang->convert->sourceList['BugFree'] = array('bugfree_1' => '1.x', 'bugfree_2' => '2.x'); $lang->convert->sourceList['Redmine'] = array('Redmine_1.1' => '1.1'); @@ -79,7 +79,7 @@ $lang->convert->redmine->users = '用户'; $lang->convert->redmine->groups = '用户分组'; $lang->convert->redmine->products = $lang->productCommon; $lang->convert->redmine->projects = $lang->projectCommon; -$lang->convert->redmine->stories = '需求'; +$lang->convert->redmine->stories = $lang->storyCommon; $lang->convert->redmine->tasks = '任务'; $lang->convert->redmine->bugs = 'Bug'; $lang->convert->redmine->productPlans = $lang->productCommon . '计划'; diff --git a/module/custom/control.php b/module/custom/control.php index 4c7fa072f9..e0c804a146 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -41,13 +41,6 @@ class custom extends control $this->app->loadLang($module); $fieldList = zget($this->lang->$module, $field, ''); - if($module == 'bug' and $field == 'typeList') - { - unset($fieldList['interface']); - unset($fieldList['designchange']); - unset($fieldList['newfeature']); - unset($fieldList['trackthings']); - } if(($module == 'story' or $module == 'testcase') and $field == 'review') { $this->app->loadConfig($module); @@ -131,7 +124,7 @@ class custom extends control { if(!is_numeric($key) or $key > 255) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidNumberKey)); } - if(!empty($key) and !isset($oldCustoms[$key]) and $key != 'n/a' and !validater::checkREG($key, '/^[a-z_0-9]+$/')) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStringKey)); + if(!empty($key) and !empty($oldCustoms) and !isset($oldCustoms[$key]) and $key != 'n/a' and !validater::checkREG($key, '/^[a-z_0-9]+$/')) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStringKey)); /* The length of roleList in user module and typeList in todo module is less than 10. check it when saved. */ if($field == 'roleList' or $module == 'todo' and $field == 'typeList') @@ -235,25 +228,7 @@ class custom extends control { if($_POST) { - $this->loadModel('setting')->setItem('system.custom.productProject', $this->post->productProject); - - /* Change block title. */ - $oldConfig = isset($this->config->custom->productProject) ? $this->config->custom->productProject : '0_0'; - $newConfig = $this->post->productProject; - - list($oldProductIndex, $oldProjectIndex) = explode('_', $oldConfig); - list($newProductIndex, $newProjectIndex) = explode('_', $newConfig); - - foreach($this->config->productCommonList as $clientLang => $productCommonList) - { - $this->dao->update(TABLE_BLOCK)->set("`title` = REPLACE(`title`, '{$productCommonList[$oldProductIndex]}', '{$productCommonList[$newProductIndex]}')")->where('source')->eq('product')->exec(); - } - - foreach($this->config->projectCommonList as $clientLang => $projectCommonList) - { - $this->dao->update(TABLE_BLOCK)->set("`title` = REPLACE(`title`, '{$projectCommonList[$oldProjectIndex]}', '{$projectCommonList[$newProjectIndex]}')")->where('source')->eq('project')->exec(); - } - + $this->custom->setFlow(); $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload')); } @@ -262,6 +237,30 @@ class custom extends control $this->display(); } + /** + * Set concept. + * + * @access public + * @return void + */ + public function concept() + { + if($_POST) + { + $this->custom->setFlow(); + $this->custom->setStoryRequirement(); + $this->loadModel('setting')->setItem('system.custom.hourPoint', $this->post->hourPoint); + $this->loadModel('setting')->setItem('system.common.conceptSetted', 1); + $this->app->loadLang('common'); + $message = sprintf($this->lang->custom->notice->conceptResult, $this->lang->productCommon, $this->lang->projectCommon, $this->lang->storyCommon, $this->lang->hourCommon); + $this->send(array('result' => 'success', 'notice' => $message, 'locate' => inlink('concept'))); + } + + $this->view->title = $this->lang->custom->concept; + $this->view->position[] = $this->lang->custom->concept; + $this->display(); + } + public function working() { if($_POST) diff --git a/module/custom/js/concept.js b/module/custom/js/concept.js new file mode 100644 index 0000000000..705c0bb8d3 --- /dev/null +++ b/module/custom/js/concept.js @@ -0,0 +1,18 @@ +$(document).ready(function() +{ + $('#mainMenu #conceptTab').addClass('btn-active-text'); + $('#ajaxForm').ajaxForm( + { + finish:function(response) + { + if(response.result == 'success') + { + bootbox.alert(response.notice, function() + { + location.reload(); + }); + } + return false; + } + }); +}); diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index 349e1e12f9..b5f554ddbc 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -6,6 +6,7 @@ $lang->custom->restore = '恢复默认'; $lang->custom->key = '键'; $lang->custom->value = '值'; $lang->custom->flow = '流程'; +$lang->custom->concept = '使用偏好设置'; $lang->custom->working = '工作方式'; $lang->custom->select = '请选择流程:'; $lang->custom->branch = '多分支'; @@ -20,7 +21,7 @@ $lang->custom->timezone = '时区'; $lang->custom->scoreReset = '重置积分'; $lang->custom->scoreTitle = '积分功能'; -$lang->custom->object['story'] = '需求'; +$lang->custom->object['story'] = $lang->storyCommon; $lang->custom->object['task'] = '任务'; $lang->custom->object['bug'] = 'Bug'; $lang->custom->object['testcase'] = '用例'; @@ -78,7 +79,7 @@ $lang->custom->user->fields['statusList'] = '状态'; $lang->custom->user->fields['contactField'] = '可用联系方式'; $lang->custom->user->fields['deleted'] = '列出已删除用户'; -$lang->custom->system = array('flow', 'working', 'required', 'score'); +$lang->custom->system = array('concept', 'flow', 'working', 'required', 'score'); $lang->custom->block->fields['closed'] = '关闭的区块'; @@ -98,6 +99,7 @@ $lang->custom->notice->invalidStringKey = '键值应当为小写英 $lang->custom->notice->cannotSetTimezone = 'date_default_timezone_set方法不存在或禁用,不能设置时区。'; $lang->custom->notice->noClosedBlock = '没有永久关闭的区块'; $lang->custom->notice->required = '页面提交时,选中的字段必填'; +$lang->custom->notice->conceptResult = '我们已经根据您的选择为您设置了 %s-%s 模式,使用%s + %s。'; $lang->custom->notice->indexPage['product'] = "从8.2版本起增加了产品主页视图,是否默认进入产品主页?"; $lang->custom->notice->indexPage['project'] = "从8.2版本起增加了项目主页视图,是否默认进入项目主页?"; @@ -126,12 +128,14 @@ $lang->custom->productProject = new stdclass(); $lang->custom->productProject->relation['0_0'] = '产品 - 项目'; $lang->custom->productProject->relation['0_1'] = '产品 - 迭代'; $lang->custom->productProject->relation['1_1'] = '项目 - 迭代'; +$lang->custom->productProject->relation['0_2'] = '产品 - 冲刺'; +$lang->custom->productProject->relation['1_2'] = '项目 - 冲刺'; $lang->custom->productProject->notice = '请根据实际情况选择适合自己团队的概念。'; $lang->custom->workingList['full'] = '完整研发管理工具'; $lang->custom->workingList['onlyTest'] = '测试管理工具'; -$lang->custom->workingList['onlyStory'] = '需求管理工具'; +$lang->custom->workingList['onlyStory'] = "{$lang->storyCommon}管理工具"; $lang->custom->workingList['onlyTask'] = '任务管理工具'; $lang->custom->menuTip = '点击显示或隐藏导航条目,拖拽来更改显示顺序。'; @@ -144,3 +148,17 @@ $lang->custom->scoreStatus[0] = '关闭'; $lang->custom->moduleName['product'] = $lang->productCommon; $lang->custom->moduleName['productplan'] = '计划'; $lang->custom->moduleName['project'] = $lang->projectCommon; + +$lang->custom->conceptQuestions['overview'] = "1. 下述哪种组合方式更适合您公司的管理现状?"; +$lang->custom->conceptQuestions['story'] = "2. 您公司是在使用需求概念还是用户故事概念?"; +$lang->custom->conceptQuestions['storypoint'] = "3. 您公司是在使用工时还是故事点来做规模估算?"; + +$lang->custom->conceptOptions = new stdclass; + +$lang->custom->conceptOptions->story = array(); +$lang->custom->conceptOptions->story['0'] = '需求'; +$lang->custom->conceptOptions->story['1'] = '故事'; + +$lang->custom->conceptOptions->hourPoint = array(); +$lang->custom->conceptOptions->hourPoint['0'] = '工时'; +$lang->custom->conceptOptions->hourPoint['1'] = '故事点'; diff --git a/module/custom/model.php b/module/custom/model.php index fe3e0b1c59..b6a70ffa4b 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -490,4 +490,51 @@ class customModel extends model $this->setting->deleteItems("owner=system&module={$moduleName}"); $this->setting->setItems("system.{$moduleName}", $requiredFields); } + + /** + * Set flow function. + * + * @param string $type productProject | storyRequirement + * @access public + * @return void + */ + public function setFlow() + { + $this->loadModel('setting')->setItem('system.custom.productProject', $this->post->productProject); + + /* Change block title. */ + $oldConfig = isset($this->config->custom->productProject) ? $this->config->custom->productProject : '0_0'; + $newConfig = $this->post->productProject; + + list($oldProductIndex, $oldProjectIndex) = explode('_', $oldConfig); + list($newProductIndex, $newProjectIndex) = explode('_', $newConfig); + + foreach($this->config->productCommonList as $clientLang => $productCommonList) + { + $this->dao->update(TABLE_BLOCK)->set("`title` = REPLACE(`title`, '{$productCommonList[$oldProductIndex]}', '{$productCommonList[$newProductIndex]}')")->where('source')->eq('product')->exec(); + } + + foreach($this->config->projectCommonList as $clientLang => $projectCommonList) + { + $this->dao->update(TABLE_BLOCK)->set("`title` = REPLACE(`title`, '{$projectCommonList[$oldProjectIndex]}', '{$projectCommonList[$newProjectIndex]}')")->where('source')->eq('project')->exec(); + } + } + + public function setStoryRequirement() + { + $this->loadModel('setting')->setItem('system.custom.storyRequirement', $this->post->storyRequirement); + + $oldIndex = isset($this->config->custom->storyRequirement) ? $this->config->custom->storyRequirement : '0'; + $newIndex = $this->post->storyRequirement; + + foreach($this->config->storyCommonList as $clientLang => $commonList) + { + $this->dao->update(TABLE_BLOCK)->set("`title` = REPLACE(`title`, '{$commonList[$oldIndex]}', '{$commonList[$newIndex]}')")->where('source')->eq('product')->exec(); + } + } + + public function setHourPoint() + { + $this->loadModel('setting')->setItem('system.custom.hourPoint', $this->post->hourPoint); + } } diff --git a/module/custom/view/concept.html.php b/module/custom/view/concept.html.php new file mode 100644 index 0000000000..e839a6c646 --- /dev/null +++ b/module/custom/view/concept.html.php @@ -0,0 +1,60 @@ + + * @package ZenTaoPMS + * @version $Id: deny.html.php 4129 2013-01-18 01:58:14Z wwccss $ + */ +?> +config->conceptSetted)):?> + + + + +config->conceptSetted)):?> + + + + custom->concept?> + + + + + + + custom->concept?> + + + + + + custom->conceptQuestions['overview']?> + custom->productProject->relation, zget($this->config->custom, 'productProject', '0_0'))?> + + + + custom->conceptQuestions['story']?> + custom->conceptOptions->story, zget($this->config->custom, 'storyRequirement', '0'));?> + + + + custom->conceptQuestions['storypoint'];?> + custom->conceptOptions->hourPoint, '0')?> + + + + + + + +config->conceptSetted)):?> + + + + +