diff --git a/extension/lite/group/ext/lang/resource.php b/extension/lite/group/ext/lang/resource.php index 7fe9577dbd..45d77bcd6f 100644 --- a/extension/lite/group/ext/lang/resource.php +++ b/extension/lite/group/ext/lang/resource.php @@ -261,6 +261,7 @@ $lang->resource->story->delete = 'deleteAction'; $lang->resource->story->view = 'view'; $lang->resource->story->change = 'changeAction'; $lang->resource->story->review = 'reviewAction'; +$lang->resource->story->submitReview = 'submitReview'; $lang->resource->story->batchReview = 'batchReview'; $lang->resource->story->recall = 'recall'; $lang->resource->story->assignTo = 'assignAction'; @@ -289,6 +290,7 @@ $lang->story->methodOrder[25] = 'delete'; $lang->story->methodOrder[30] = 'view'; $lang->story->methodOrder[35] = 'change'; $lang->story->methodOrder[40] = 'review'; +$lang->story->methodOrder[44] = 'submitReview'; $lang->story->methodOrder[45] = 'batchReview'; $lang->story->methodOrder[50] = 'recall'; $lang->story->methodOrder[55] = 'close'; diff --git a/extension/lite/story/ext/view/view.html.php b/extension/lite/story/ext/view/view.html.php index 716172554b..c002b4c445 100644 --- a/extension/lite/story/ext/view/view.html.php +++ b/extension/lite/story/ext/view/view.html.php @@ -235,7 +235,18 @@ story->legendMailto;?> - mailto); foreach($mailto as $account) {if(empty($account)) continue; echo "" . zget($users, trim($account)) . '  '; }?> + + mailto)) + { + foreach(explode(',', $story->mailto) as $account) + { + if(empty($account)) continue; + echo "" . zget($users, trim($account)) . '  '; + } + } + ?> + diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 1651cab8a6..5df2970834 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -1461,6 +1461,17 @@ class baseRouter chdir(dirname($file2Included)); helper::import($file2Included); + /* Check file is encode by ioncube. */ + $isEncrypted = false; + if($isExt) + { + $fp = fopen($file2Included, 'r'); + $line1 = fgets($fp); + $line2 = fgets($fp); + fclose($fp); + if(strpos($line1, 'isDefaultValueAvailable()) + elseif(!$isEncrypted and $param->isDefaultValueAvailable()) { $default = $param->getDefaultValue(); } diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index 248a4d7f4a..79c85912a5 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -71,16 +71,16 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow { $moreLabel = $lang->more; $moreLabelActive = ''; - if(isset($lang->bug->moreSelects[$browseType])) + if(isset($lang->bug->moreSelects[$this->session->bugBrowseType])) { - $moreLabel = "{$lang->bug->moreSelects[$browseType]} {$pager->recTotal}"; + $moreLabel = "{$lang->bug->moreSelects[$this->session->bugBrowseType]} {$pager->recTotal}"; $moreLabelActive = 'btn-active-text'; } echo "
{$moreLabel} "; echo "
'; diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index 2b78e900a7..684b8df6e1 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -262,7 +262,14 @@ bug->mailto;?> - mailto)); foreach($mailto as $account) echo ' ' . zget($users, $account); ?> + + mailto)) + { + foreach(explode(',', str_replace(' ', '', $bug->mailto)) as $account) echo ' ' . zget($users, $account); + } + ?> + diff --git a/module/common/view/datatable.fix.html.php b/module/common/view/datatable.fix.html.php index 48a26082c2..1181adb8f6 100644 --- a/module/common/view/datatable.fix.html.php +++ b/module/common/view/datatable.fix.html.php @@ -99,7 +99,7 @@ $(function() - + moduleName == 'execution' and $app->methodName == 'task' and $this->config->vision != 'lite'):?> diff --git a/module/datatable/lang/de.php b/module/datatable/lang/de.php index 55aafa1a75..3034fb390d 100644 --- a/module/datatable/lang/de.php +++ b/module/datatable/lang/de.php @@ -23,7 +23,7 @@ $lang->datatable->displaySetting = 'Set list'; $lang->datatable->showModule = 'Anzeigen/Verstecken des Modul Names'; $lang->datatable->showBranch = 'Show branches in the list'; $lang->datatable->showAllModule = 'Show product modules'; -$lang->datatable->showModuleList[] = 'N/A'; +$lang->datatable->showModuleList['0'] = 'N/A'; $lang->datatable->showModuleList['base'] = 'Basisknoten'; $lang->datatable->showModuleList['end'] = 'Endknoten'; $lang->datatable->showAllModuleList[0] = 'Hide'; diff --git a/module/datatable/lang/en.php b/module/datatable/lang/en.php index e5ab3098df..9c4b86de8d 100644 --- a/module/datatable/lang/en.php +++ b/module/datatable/lang/en.php @@ -23,7 +23,7 @@ $lang->datatable->displaySetting = 'Set List'; $lang->datatable->showModule = 'Show modules in the list'; $lang->datatable->showBranch = 'Show branches in the list'; $lang->datatable->showAllModule = 'Show product modules'; -$lang->datatable->showModuleList[] = 'N/A'; +$lang->datatable->showModuleList['0'] = 'N/A'; $lang->datatable->showModuleList['base'] = 'Base Node'; $lang->datatable->showModuleList['end'] = 'End Node'; $lang->datatable->showAllModuleList[0] = 'Hide'; diff --git a/module/datatable/lang/fr.php b/module/datatable/lang/fr.php index 6ced0da225..33a98bd90a 100644 --- a/module/datatable/lang/fr.php +++ b/module/datatable/lang/fr.php @@ -23,7 +23,7 @@ $lang->datatable->displaySetting = 'Set list'; $lang->datatable->showModule = 'Montrer les noms des modules dans la page de listes'; $lang->datatable->showBranch = 'Show branches in the list'; $lang->datatable->showAllModule = 'Afficher les modules de produits'; -$lang->datatable->showModuleList[] = 'N/A'; +$lang->datatable->showModuleList['0'] = 'N/A'; $lang->datatable->showModuleList['base'] = 'Base Node'; $lang->datatable->showModuleList['end'] = 'End Node'; $lang->datatable->showAllModuleList[0] = 'Cacher'; diff --git a/module/datatable/lang/zh-cn.php b/module/datatable/lang/zh-cn.php index 8da7db89b1..b4d63aeb80 100644 --- a/module/datatable/lang/zh-cn.php +++ b/module/datatable/lang/zh-cn.php @@ -23,7 +23,7 @@ $lang->datatable->displaySetting = '显示设置'; $lang->datatable->showModule = '列表页是否显示模块名'; $lang->datatable->showBranch = '列表页是否显示%s名'; $lang->datatable->showAllModule = '是否显示完整产品模块'; -$lang->datatable->showModuleList[] = '不显示'; +$lang->datatable->showModuleList['0'] = '不显示'; $lang->datatable->showModuleList['base'] = '只显示一级模块'; $lang->datatable->showModuleList['end'] = '只显示最后一级模块'; $lang->datatable->showAllModuleList[0] = '不显示'; diff --git a/module/doc/control.php b/module/doc/control.php index 3335e01e46..76ba88cd19 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -1125,7 +1125,7 @@ class doc extends control /* Set Custom. */ foreach(explode(',', $this->config->doc->customObjectLibs) as $libType) $customObjectLibs[$libType] = $this->lang->doc->customObjectLibs[$libType]; - $actionURL = $this->createLink('doc', 'browse', "lib=0&browseType=bySearch&queryID=myQueryID"); + $actionURL = $this->createLink('doc', 'tableContents', "type=$type&objectID=$objectID&libID=$libID&browseType=bySearch¶m=myQueryID"); $this->doc->buildSearchForm(0, array(), 0, $actionURL, $type); $moduleTree = $type == 'book' ? $this->doc->getBookStructure($libID) : $this->doc->getTreeMenu($type, $objectID, $libID, 0, $docID); diff --git a/module/doc/model.php b/module/doc/model.php index f25b659ee5..eaa031b44b 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -930,6 +930,13 @@ class docModel extends model { $this->loadModel('product'); + /* Fixed search modal for doc view. */ + if($this->app->getMethodName() == 'objectlibs') + { + $queryName = $type . 'Doc'; + $type = 'objectLibs'; + } + if($this->app->rawMethod == 'contribute') { $this->config->doc->search['module'] = 'contributeDoc'; @@ -953,6 +960,7 @@ class docModel extends model } else { + $this->config->doc->search['module'] = $queryName; $products = $this->product->getPairs('nocode', $this->session->project); $this->config->doc->search['params']['execution']['values'] = array('' => '') + $this->loadModel('execution')->getPairs($this->session->project, 'all', 'noclosed') + array('all' => $this->lang->doc->allExecutions); $this->config->doc->search['params']['lib']['values'] = array('' => '', $libID => ($libID ? $libs[$libID] : 0), 'all' => $this->lang->doclib->all); diff --git a/module/file/control.php b/module/file/control.php index 36e29ae62e..c8230031b6 100755 --- a/module/file/control.php +++ b/module/file/control.php @@ -314,6 +314,7 @@ class file extends control $this->view->files = $files; $this->view->fieldset = $fieldset; $this->view->object = $object; + $this->view->method = $method; if($method == 'view') return $this->display('file', 'viewfiles'); $this->display(); diff --git a/module/file/model.php b/module/file/model.php index 5a6d65185f..72d4a1d828 100755 --- a/module/file/model.php +++ b/module/file/model.php @@ -167,7 +167,7 @@ class fileModel extends model $files = array(); if(!isset($_FILES[$htmlTagName])) return $files; - if($_FILES[$htmlTagName]['error'] != 0) return $_FILES[$htmlTagName]; + if(!is_array($_FILES[$htmlTagName]['error']) and $_FILES[$htmlTagName]['error'] != 0) return $_FILES[$htmlTagName]; $this->app->loadClass('purifier', true); $config = HTMLPurifier_Config::createDefault(); diff --git a/module/file/view/printfiles.html.php b/module/file/view/printfiles.html.php index ee78a6ecc0..2c621c7413 100644 --- a/module/file/view/printfiles.html.php +++ b/module/file/view/printfiles.html.php @@ -92,7 +92,7 @@ if(common::hasPriv($objectType, 'edit', $object)) { echo "  "; - common::printLink('file', 'edit', "fileID=$file->id", $lang->file->edit, '', "data-width='400' class='fileAction btn btn-link edit iframe text-primary' title='{$lang->file->edit}'"); + if($method != 'storyChange') common::printLink('file', 'edit', "fileID=$file->id", $lang->file->edit, '', "data-width='400' class='fileAction btn btn-link edit iframe text-primary' title='{$lang->file->edit}'"); if(common::hasPriv('file', 'delete')) echo html::a('###', $lang->delete, '', "class='fileAction btn btn-link text-primary' onclick='deleteFile($file->id)' title='$lang->delete'"); echo ''; } diff --git a/module/my/view/requirement.html.php b/module/my/view/requirement.html.php index bd365b7a1c..8472470c53 100644 --- a/module/my/view/requirement.html.php +++ b/module/my/view/requirement.html.php @@ -90,10 +90,10 @@ - + @@ -133,9 +133,9 @@ - + diff --git a/module/port/model.php b/module/port/model.php index 2e24b68648..f93951a470 100644 --- a/module/port/model.php +++ b/module/port/model.php @@ -780,9 +780,12 @@ class portModel extends model if(strpos($queryCondition, "`{$this->config->db->prefix}$model` AS t2") !== false) $selectKey = 't2.id'; $stmt = $this->dbh->query($queryCondition . ($this->post->exportType == 'selected' ? " AND $selectKey IN({$this->cookie->checkedItem})" : '')); - while($row = $stmt->fetch()) $modelDatas[$row->id] = $row; + while($row = $stmt->fetch()) + { + if($selectKey !== 't1.id' and isset($row->$model) and isset($row->id)) $row->id = $row->$model; + $modelDatas[$row->id] = $row; + } } - return $modelDatas; } diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php index bf5f5b8528..b694c39596 100644 --- a/module/story/lang/zh-cn.php +++ b/module/story/lang/zh-cn.php @@ -154,8 +154,8 @@ $lang->story->children = "子需求"; $lang->story->childrenAB = "子"; $lang->story->linkStories = "相关{$lang->SRCommon}"; $lang->story->linkRequirements = "相关{$lang->URCommon}"; -$lang->story->childStories = "细分需求"; -$lang->story->duplicateStory = "重复需求"; +$lang->story->childStories = "细分{$lang->SRCommon}"; +$lang->story->duplicateStory = "重复{$lang->SRCommon}"; $lang->story->reviewResult = '评审意见'; $lang->story->reviewResultAB = '评审结果'; $lang->story->preVersion = '之前版本'; diff --git a/module/story/model.php b/module/story/model.php index 71c9352f68..3b0ba376e7 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -784,7 +784,7 @@ class storyModel extends model return false; } - if($this->checkForceReview() and empty($_POST['reviewer'])) + if(strpos('draft,changing', $oldStory->status) !== false and $this->checkForceReview() and empty($_POST['reviewer'])) { dao::$errors[] = $this->lang->story->errorEmptyReviewedBy; return false; diff --git a/module/story/view/change.html.php b/module/story/view/change.html.php index d274aceec6..a5b89ca66f 100644 --- a/module/story/view/change.html.php +++ b/module/story/view/change.html.php @@ -68,7 +68,7 @@ diff --git a/module/story/view/edit.html.php b/module/story/view/edit.html.php index 74043a0151..a06afb7524 100644 --- a/module/story/view/edit.html.php +++ b/module/story/view/edit.html.php @@ -240,7 +240,7 @@ diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index 572e439daa..9525f3372d 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -326,7 +326,18 @@ - +
datatable->showModule;?>datatable->showModuleList, isset($config->datatable->$datatableId->showModule) ? $config->datatable->$datatableId->showModule : '');?>datatable->showModuleList, isset($config->datatable->$datatableId->showModule) ? $config->datatable->$datatableId->showModule : '0');?>
pri;?>' title='story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri);?> - title, null, "style='color: $story->color' data-group='product'") : "$story->title";?> + title, null, "style='color: $story->color' data-group='product' title='$story->title'") : "$story->title";?> children)) echo '';?> productTitle;?>productTitle;?> openedBy);?> estimate . $config->hourUnit;?> processStatus('story', $story);?> pri;?>' title='story->priList, $child->pri, $child->pri);?>'>story->priList, $child->pri, $child->pri);?> - lang->story->children .'">SR ' . (common::hasPriv('story', 'view') ? html::a($storyLink, $child->title, null, "style='color: $child->color' data-group='product'") : $child->title);?> + lang->story->children .'">SR ' . (common::hasPriv('story', 'view') ? html::a($storyLink, $child->title, null, "style='color: $child->color' data-group='product' title='$child->title'") : $child->title);?> productTitle;?>productTitle;?> openedBy);?> estimate . $config->hourUnit;?> URChanged ? "{$this->lang->story->URChanged}" : "" . $this->processStatus('story', $child) . ''?>
attatch;?> - fetch('file', 'printFiles', array('files' => $files, 'fieldset' => 'true', 'object' => $story, 'method' => 'change'));?> + fetch('file', 'printFiles', array('files' => $files, 'fieldset' => 'true', 'object' => $story, 'method' => 'storyChange'));?> fetch('file', 'buildform');?>
story->mailto;?>
- mailto), "class='form-control picker-select' multiple");?> + mailto, "class='form-control picker-select' multiple");?> fetch('my', 'buildContactLists');?>
story->legendMailto;?>mailto); foreach($mailto as $account) {if(empty($account)) continue; echo "" . zget($users, trim($account)) . '  '; }?> + mailto)) + { + foreach(explode(',', $story->mailto) as $account) + { + if(empty($account)) continue; + echo "" . zget($users, trim($account)) . '  '; + } + } + ?> +
diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 5d9ae1e94b..dd1e706ff2 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -3233,7 +3233,7 @@ class upgradeModel extends model } } - $openVersion = $this->getOpenVersion($fromVersion); + $openVersion = $this->getOpenVersion(str_replace('.', '_', $fromVersion)); if(version_compare($openVersion, '17_4', '<=')) $needProcess['changeEngine'] = 'notice'; return $needProcess; diff --git a/module/user/model.php b/module/user/model.php index f0d90532c9..a2c0442d3f 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -1087,7 +1087,7 @@ class userModel extends model if(!$stmt) return array('rights' => $rights, 'acls' => $acls); while($row = $stmt->fetch(PDO::FETCH_ASSOC)) { - $rights[strtolower($row['module'])][strtolower($row['method'])] = true; + if($row['module'] and $row['method']) $rights[strtolower($row['module'])][strtolower($row['method'])] = true; } /* Get can manage projects by user. */ diff --git a/test/class/todo.class.php b/test/class/todo.class.php index 0f5696d4ed..9ba0799c57 100755 --- a/test/class/todo.class.php +++ b/test/class/todo.class.php @@ -3,9 +3,10 @@ class todoTest { public function __construct() { - global $tester; - $this->objectModel = $tester->loadModel('todo'); - $tester->app->loadClass('dao'); + global $tester; + $this->objectModel = $tester->loadModel('todo'); + $tester->app->loadClass('dao'); + $_SERVER['HTTP_HOST'] = 'test.zentao.net'; } /** diff --git a/test/model/todo/batchcreate.php b/test/model/todo/batchcreate.php index 06ffc578f9..f412b75a6a 100755 --- a/test/model/todo/batchcreate.php +++ b/test/model/todo/batchcreate.php @@ -23,8 +23,8 @@ $descs = array('desc1', 'desc2', 'desc3', 'desc4', '' , '', '', ''); $begins = array('0830', '0900', '0930', '1000', '1030', '1100', '1130', '1200'); $ends = array('0900', '0930', '1000','1030', '1100', '1130', '1200', '1230'); $bugs = array('2' => '313'); - -$noname_create = array('types' => $types, 'pris' => $pris, 'names' => $names, 'descs' => $descs, 'begins' => $begins, 'ends' => $ends); +$assignedTos = array('user1', 'ditto', 'ditto', 'ditto', 'ditto', 'ditto', 'ditto', 'ditto',); +$noname_create = array('types' => $types, 'pris' => $pris, 'names' => $names, 'descs' => $descs, 'begins' => $begins, 'ends' => $ends, 'assignedTos' => $assignedTos); $names = array('批量创建待办4','批量创建待办5','批量创建待办6', '批量创建待办7', '', '', '', ''); $types = array('bug', 'story', 'task', 'testtask', 'custom', 'custom', 'custom', 'custom'); @@ -33,10 +33,10 @@ $stories = array('2' => '1'); $tasks = array('3' => '1'); $testtasks = array('4' => '1'); -$except_create = array('types' => $types, 'pris' => $pris, 'names' => $names, 'descs' => $descs, 'begins' => $begins, 'ends' => $ends, 'bugs' => $bugs, 'stories' => $stories, 'tasks' => $tasks, 'testtasks' => $testtasks); +$except_create = array('types' => $types, 'pris' => $pris, 'names' => $names, 'descs' => $descs, 'begins' => $begins, 'ends' => $ends, 'bugs' => $bugs, 'stories' => $stories, 'tasks' => $tasks, 'testtasks' => $testtasks, 'assignedTos' => $assignedTos); $todo = new todoTest(); r($todo->batchCreateTest($noname_create)) && p('2006:name,desc,pri,type,idvalue;2007:name,desc,pri,type,idvalue;2008:name,desc,pri,type,idvalue') && e('批量创建待办1,desc1,1,custom,0;批量创建待办2,desc2,2,custom,0;批量创建待办3,desc4,4,custom,0'); // 批量创建有个没有名字的待办 -r($todo->batchCreateTest($except_create)) && p('2009:name,desc,pri,type,idvalue;2010:name,desc,pri,type,idvalue;2011:name,desc,pri,type,idvalue;2012:name,desc,pri,type,idvalue') && e('测试单转Bug13,desc1,1,bug,313;用户需求版本一61,desc2,2,story,1;开发任务11,desc3,3,task,1;测试单1,desc4,4,testtask,1'); // 批量创建的待办 -$db->restoreDB(); \ No newline at end of file +r($todo->batchCreateTest($except_create)) && p('2009:name,desc,pri,type,idvalue;2010:name,desc,pri,type,idvalue;2011:name,desc,pri,type,idvalue;2012:name,desc,pri,type,idvalue') && e('测试单转Bug13,desc1,1,bug,313;软件需求版本一551,desc2,2,story,1;开发任务11,desc3,3,task,1;测试单1,desc4,4,testtask,1'); // 批量创建的待办 +$db->restoreDB(); diff --git a/test/model/todo/batchupdate.php b/test/model/todo/batchupdate.php index 3c8c5434e4..791074b8e4 100755 --- a/test/model/todo/batchupdate.php +++ b/test/model/todo/batchupdate.php @@ -32,4 +32,4 @@ $todo = new todoTest(); r($todo->batchUpdateTest($changeType, '3')) && p('0:field,old,new') && e('type,task,custom'); // 批量修改todo类型 r($todo->batchUpdateTest($changePri, '2')) && p('0:field,old,new') && e('pri,2,1'); // 批量修改todo优先级 r($todo->batchUpdateTest($changeStatus, '1')) && p('0:field,old,new') && e('status,wait,doing'); // 批量修改todo状态 -$db->restoreDB(); \ No newline at end of file +$db->restoreDB();