diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php index 00bf20a69a..4aa19b8b94 100644 --- a/module/build/view/view.html.php +++ b/module/build/view/view.html.php @@ -93,7 +93,7 @@ tbody tr td:first-child input {display: none;} app->tab == 'execution' ? $build->execution : $build->project;?> $story):?> - createLink('story', 'view', "storyID=$story->id&version=0¶m=$objectID", '', true);?> + app->tab == 'execution' ? $this->createLink('execution', 'storyView', "storyID=$story->id", '', true) : $this->createLink('story', 'view', "storyID=$story->id&version=0¶m=$objectID", '', true);?> diff --git a/module/doc/control.php b/module/doc/control.php index 9f6a58abb5..46b0872f57 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -871,9 +871,9 @@ class doc extends control if($doclib->acl == 'custom') { - return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control")); + return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control'")); } - if($doclib->acl == 'open') return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control")); + if($doclib->acl == 'open') return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control'")); if($doclib->acl == 'private') echo 'private'; if($doclib->acl == 'default') echo 'default'; return false; diff --git a/module/execution/control.php b/module/execution/control.php index 16bcba9dba..d215edae8c 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -871,6 +871,21 @@ class execution extends control $this->display(); } + /** + * View a story. + * + * @param int $storyID + * @access public + * @return void + */ + public function storyView($storyID) + { + $this->session->set('productList', $this->app->getURI(true), 'product'); + + $story = $this->loadModel('story')->getByID($storyID); + echo $this->fetch('story', 'view', "storyID=$storyID&version=$story->version¶m=" . $this->session->execution); + } + /** * Browse bugs of a execution. * diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js index 9d1c806453..4ee4827f82 100644 --- a/module/execution/js/kanban.js +++ b/module/execution/js/kanban.js @@ -501,7 +501,7 @@ function renderStoryItem(item, $item, col) if(!$title.length) { $title = $('' + (scaleSize <= 1 ? ' ' : '') + '') - .attr('href', $.createLink('story', 'view', 'storyID=' + item.id + '&version=0¶m=' + execution.id, '', true)).attr('data-toggle', 'modal').attr('data-width', '95%'); + .attr('href', $.createLink('execution', 'storyView', 'storyID=' + item.id + '&version=0¶m=' + execution.id, '', true)).attr('data-toggle', 'modal').attr('data-width', '95%'); $title.appendTo($item); } var title = rdSearchValue != '' ? "" + item.title.replaceAll(rdSearchValue, "" + rdSearchValue + "") + "": "" + item.title + ""; diff --git a/module/execution/js/taskkanban.js b/module/execution/js/taskkanban.js index 8af14dd812..6b6db71515 100644 --- a/module/execution/js/taskkanban.js +++ b/module/execution/js/taskkanban.js @@ -123,7 +123,7 @@ function renderStoryItem(item, $item, col) if(!$title.length) { $title = $('' + (scaleSize <= 1 ? ' ' : '') + '') - .attr('href', $.createLink('story', 'view', 'storyID=' + item.id, '', true)); + .attr('href', $.createLink('execution', 'storyView', 'storyID=' + item.id, '', true)); $title.appendTo($item); } var title = searchValue != '' ? "" + item.title.replaceAll(searchValue, "" + searchValue + "") + "": "" + item.title + ""; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index 346944a2a3..d87227b271 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -94,6 +94,7 @@ $lang->execution->viewBug = 'Bugs'; $lang->execution->noProduct = "No {$lang->productCommon} yet."; $lang->execution->createStory = "Create Story"; $lang->execution->storyTitle = "Story Name"; +$lang->execution->storyView = "Story Detail"; $lang->execution->all = "All {$lang->executionCommon}s"; $lang->execution->undone = 'Unfinished '; $lang->execution->unclosed = 'Unclosed'; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 83fd91a0b4..11bc75b2a4 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -94,6 +94,7 @@ $lang->execution->viewBug = '查看bug'; $lang->execution->noProduct = "无{$lang->executionCommon}"; $lang->execution->createStory = "提{$lang->SRCommon}"; $lang->execution->storyTitle = "{$lang->SRCommon}名称"; +$lang->execution->storyView = "{$lang->SRCommon}详情"; $lang->execution->all = '所有'; $lang->execution->undone = '未完成'; $lang->execution->unclosed = '未关闭'; diff --git a/module/execution/model.php b/module/execution/model.php index ad8cf6b43e..472d562746 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -3848,7 +3848,7 @@ class executionModel extends model $storyItem->storyId = $story->id; $storyItem->openedBy = zget($users, $story->openedBy); $storyItem->assignedTo = zget($users, $story->assignedTo); - $storyItem->url = helper::createLink('story', 'view', "storyID=$story->id&version=$story->version&from=execution¶m=$executionID"); + $storyItem->url = helper::createLink('execution', 'storyView', "storyID=$story->id&version=$story->version&from=execution¶m=$executionID"); $storyItem->taskCreateUrl = helper::createLink('task', 'batchCreate', "executionID={$executionID}&story={$story->id}"); $storyTasks = isset($taskGroups[$node->id][$story->id]) ? $taskGroups[$node->id][$story->id] : array(); @@ -3984,18 +3984,15 @@ class executionModel extends model ->where('product')->in(array_keys($products)) ->andWhere('deleted')->eq(0) ->andWhere('branch')->in($branchIdList)->fi() - ->beginIF(strpos($param, 'skipparent') !== false)->andWhere('parent')->ne(-1)->fi() ->orderBy('begin desc') ->fetchAll('id'); $plans = $this->productplan->reorder4Children($plans); $productPlans = array(); - $parentTitle = array(); foreach($plans as $plan) { - if($plan->parent == '-1') $parentTitle[$plan->id] = $plan->title; - if($plan->parent > 0 and isset($parentTitle[$plan->parent])) $plan->title = $parentTitle[$plan->parent] . ' /' . $plan->title; - + if($plan->parent == '-1' and strpos($param, 'skipparent') !== false) continue; + if($plan->parent > 0 and isset($plans[$plan->parent])) $plan->title = $plans[$plan->parent]->title . ' /' . $plan->title; $productPlans[$plan->product][$plan->id] = $plan->title . " [{$plan->begin} ~ {$plan->end}]"; if($plan->begin == '2030-01-01' and $plan->end == '2030-01-01') $productPlans[$plan->product][$plan->id] = $plan->title . ' ' . $this->lang->productplan->future; } diff --git a/module/execution/view/importtask.html.php b/module/execution/view/importtask.html.php index c6ee908989..95404c7cbc 100644 --- a/module/execution/view/importtask.html.php +++ b/module/execution/view/importtask.html.php @@ -69,9 +69,9 @@ storyID) { - if(common::hasPriv('story', 'view')) + if(common::hasPriv('execution', 'storyView')) { - echo html::a($this->createLink('story', 'view', "storyid=$task->storyID"), $task->storyTitle, '', "class='preview'", true, isonlybody()); + echo html::a($this->createLink('execution', 'storyView', "storyid=$task->storyID"), $task->storyTitle, '', "class='preview'", true, isonlybody()); } else { diff --git a/module/execution/view/linkstory.html.php b/module/execution/view/linkstory.html.php index a95462dfd7..cf48937571 100644 --- a/module/execution/view/linkstory.html.php +++ b/module/execution/view/linkstory.html.php @@ -55,7 +55,7 @@ - createLink('story', 'view', "storyID=$story->id", '', true);?> + createLink('execution', 'storyView', "storyID=$story->id", '', true);?> id => sprintf('%03d', $story->id)));?> diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php index fc82e67590..ced92cc055 100644 --- a/module/execution/view/story.html.php +++ b/module/execution/view/story.html.php @@ -225,7 +225,7 @@ $story):?> createLink('story', 'view', "storyID=$story->id&version=$story->version¶m=$execution->id"); + $storyLink = $this->createLink('execution', 'storyView', "storyID=$story->id&version=$story->version¶m=$execution->id"); $totalEstimate += $story->estimate; ?> diff --git a/module/execution/view/storykanban.html.php b/module/execution/view/storykanban.html.php index 4eb1043858..a124d33f96 100644 --- a/module/execution/view/storykanban.html.php +++ b/module/execution/view/storykanban.html.php @@ -85,7 +85,7 @@ $account = $this->app->user->account;
- createLink('story', 'view', "story=$story->id", '', true), "#{$story->id} {$story->title}", '', 'class="title kanbaniframe" title="' . $story->title . '"');?> + createLink('execution', 'storyView', "story=$story->id", '', true), "#{$story->id} {$story->title}", '', 'class="title kanbaniframe" title="' . $story->title . '"');?>
story->priList, $story->pri);?> story->statusList[$story->status];?> diff --git a/module/execution/view/treestory.html.php b/module/execution/view/treestory.html.php index 0f82be8180..c7aafbeae6 100644 --- a/module/execution/view/treestory.html.php +++ b/module/execution/view/treestory.html.php @@ -89,7 +89,7 @@ { foreach($story->planTitle as $planID => $planTitle) { - if(!common::printLink('productplan', 'view', "planID=$planID", $planTitle)) echo $lanTitle; + if(!common::printLink('productplan', 'view', "planID=$planID", $planTitle)) echo $planTitle; echo '
'; } } @@ -258,7 +258,7 @@ extraStories[$linkStoryID])) echo '
  • ' . html::a($this->createLink('story', 'view', "storyID=$linkStoryID"), "#$linkStoryID " . $story->extraStories[$linkStoryID]) . '
  • '; + if(isset($story->extraStories[$linkStoryID])) echo '
  • ' . html::a($this->createLink('execution', 'storyView', "storyID=$linkStoryID"), "#$linkStoryID " . $story->extraStories[$linkStoryID]) . '
  • '; } ?> @@ -276,7 +276,7 @@ extraStories[$childStoryID])) echo '
  • ' . html::a($this->createLink('story', 'view', "storyID=$childStoryID"), "#$childStoryID " . $story->extraStories[$childStoryID]) . '
  • '; + if(isset($story->extraStories[$childStoryID])) echo '
  • ' . html::a($this->createLink('execution', 'storyView', "storyID=$childStoryID"), "#$childStoryID " . $story->extraStories[$childStoryID]) . '
  • '; } ?> diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 32e10087ca..7c00e40205 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -769,6 +769,7 @@ $lang->resource->execution->whitelist = 'whitelist'; $lang->resource->execution->addWhitelist = 'addWhitelist'; $lang->resource->execution->unbindWhitelist = 'unbindWhitelist'; $lang->resource->execution->storyEstimate = 'storyEstimate'; +$lang->resource->execution->storyView = 'storyView'; if($config->systemMode == 'new') $lang->resource->execution->executionkanban = 'kanbanAction'; $lang->resource->execution->kanban = 'RDKanban'; //if($config->systemMode == 'classic') $lang->resource->project->list = 'list'; diff --git a/module/install/model.php b/module/install/model.php index 794df3de6d..8d4b8d65c3 100644 --- a/module/install/model.php +++ b/module/install/model.php @@ -516,6 +516,16 @@ class installModel extends model } } + /* Check password. */ + if(!validater::checkReg($this->post->password, '|(.){6,}|')) dao::$errors['password'][] = $this->lang->error->passwordrule; + if(isset($this->config->safe->mode) and (strlen($this->post->password) < $this->config->safe->mode)) dao::$errors['password'][] = $this->lang->user->weakPassword; + if(!empty($this->config->safe->changeWeak)) + { + if(!isset($this->config->safe->weak)) $this->app->loadConfig('admin'); + if(strpos(",{$this->config->safe->weak},", ",{$this->post->password},") !== false) dao::$errors['password'][] = sprintf($this->lang->user->errorWeak, $this->config->safe->weak); + } + if(dao::isError()) return false; + /* Insert a company. */ $company = new stdclass(); $company->name = $data->company; diff --git a/module/install/view/step5.html.php b/module/install/view/step5.html.php index 91ab940ac3..71af2e7ba8 100644 --- a/module/install/view/step5.html.php +++ b/module/install/view/step5.html.php @@ -46,7 +46,7 @@