diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 0834e02b19..5818dd8422 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -1801,11 +1801,8 @@ class baseRouter { foreach($lang->db->custom[$moduleName] as $section => $fields) { - foreach($fields as $key => $value) - { - unset($lang->{$moduleName}->{$section}[$key]); - $lang->{$moduleName}->{$section}[$key] = $value; - } + unset($lang->{$moduleName}->{$section}); + foreach($fields as $key => $value) $lang->{$moduleName}->{$section}[$key] = $value; } } diff --git a/module/bug/config.php b/module/bug/config.php index 685f2e2e68..8a25f7663c 100644 --- a/module/bug/config.php +++ b/module/bug/config.php @@ -1,6 +1,7 @@ bug = new stdClass(); $config->bug->batchCreate = 10; +$config->bug->longlife = 7; $config->bug->create = new stdclass(); $config->bug->edit = new stdclass(); diff --git a/module/bug/model.php b/module/bug/model.php index 3982769215..ce4b6e0141 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1842,11 +1842,12 @@ class bugModel extends model */ public function getByLonglifebugs($productID, $branch, $modules, $projects, $orderBy, $pager) { - return $this->dao->findByLastEditedDate("<", date(DT_DATE1, strtotime('-7 days')))->from(TABLE_BUG)->andWhere('product')->eq($productID) + $lastEditedDate = date(DT_DATE1, time() - $this->config->bug->longlife * 24 * 3600); + return $this->dao->findByLastEditedDate("<", $lastEditedDate)->from(TABLE_BUG)->andWhere('product')->eq($productID) ->andWhere('project')->in(array_keys($projects)) ->beginIF($branch)->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() - ->andWhere('openedDate')->lt(date(DT_DATE1,strtotime('-7 days'))) + ->andWhere('openedDate')->lt($lastEditedDate) ->andWhere('deleted')->eq(0) ->andWhere('status')->ne('closed')->orderBy($orderBy)->page($pager)->fetchAll(); } @@ -2114,13 +2115,13 @@ class bugModel extends model echo $bug->activatedCount; break; case 'openedBy': - echo zget($users, $bug->openedBy, $bug->openedBy); + echo zget($users, $bug->openedBy); break; case 'openedDate': echo substr($bug->openedDate, 5, 11); break; case 'openedBuild': - foreach(explode(',', $bug->openedBuild) as $build) echo zget($builds, $build, $build) . '
'; + foreach(explode(',', $bug->openedBuild) as $build) echo zget($builds, $build) . '
'; break; case 'assignedTo': echo zget($users, $bug->assignedTo, $bug->assignedTo); @@ -2132,7 +2133,7 @@ class bugModel extends model echo zget($users, $bug->resolvedBy, $bug->resolvedBy); break; case 'resolution': - echo $this->lang->bug->resolutionList[$bug->resolution]; + echo zget($this->lang->bug->resolutionList, $bug->resolution); break; case 'resolvedDate': echo substr($bug->resolvedDate, 5, 11); @@ -2141,7 +2142,7 @@ class bugModel extends model echo $bug->resolvedBuild; break; case 'closedBy': - echo zget($users, $bug->closedBy, $bug->closedBy); + echo zget($users, $bug->closedBy); break; case 'lastEditedDate': echo substr($bug->lastEditedDate, 5, 11); diff --git a/module/bug/view/browsedata.html.php b/module/bug/view/browsedata.html.php index 909ce37559..9b1f63ff34 100644 --- a/module/bug/view/browsedata.html.php +++ b/module/bug/view/browsedata.html.php @@ -89,7 +89,7 @@ assignedTo == $this->app->user->account) echo 'class="red"';?>>assignedTo, $bug->assignedTo);?> resolvedBy, $bug->resolvedBy)?> - bug->resolutionList[$bug->resolution];?> + bug->resolutionList, $bug->resolution);?> cookie->windowWidth >= $this->config->wideSize):?> resolvedDate, 5, 11)?> diff --git a/module/common/lang/en.php b/module/common/lang/en.php index f7612815d5..c9ca750f5f 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -304,7 +304,7 @@ $lang->admin = new stdclass(); $lang->admin->menu = new stdclass(); $lang->admin->menu->index = array('link' => 'Homepage|admin|index'); $lang->admin->menu->extension = array('link' => 'Extension|extension|browse', 'subModule' => 'extension'); -$lang->admin->menu->custom = array('link' => 'Custom|custom|index', 'subModule' => 'custom'); +$lang->admin->menu->custom = array('link' => 'Custom|custom|set', 'subModule' => 'custom'); $lang->admin->menu->mail = array('link' => 'Email|mail|index', 'subModule' => 'mail'); $lang->admin->menu->convert = array('link' => 'Import|convert|index', 'subModule' => 'convert'); $lang->admin->menu->backup = array('link' => 'Backup|backup|index', 'subModule' => 'backup'); diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 7bfbf3d6aa..692c91adc8 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -304,7 +304,7 @@ $lang->admin = new stdclass(); $lang->admin->menu = new stdclass(); $lang->admin->menu->index = array('link' => '首页|admin|index'); $lang->admin->menu->extension = array('link' => '插件|extension|browse', 'subModule' => 'extension'); -$lang->admin->menu->custom = array('link' => '自定义|custom|index', 'subModule' => 'custom'); +$lang->admin->menu->custom = array('link' => '自定义|custom|set', 'subModule' => 'custom'); $lang->admin->menu->mail = array('link' => '发信|mail|index', 'subModule' => 'mail'); $lang->admin->menu->convert = array('link' => '导入|convert|index', 'subModule' => 'convert'); $lang->admin->menu->backup = array('link' => '备份|backup|index', 'subModule' => 'backup'); diff --git a/module/custom/config.php b/module/custom/config.php index 9d068042dd..4ccd030c93 100644 --- a/module/custom/config.php +++ b/module/custom/config.php @@ -1,9 +1,9 @@ custom = new stdClass(); $config->custom->canAdd['story'] = 'reasonList,reviewResultList,sourceList,priList'; -$config->custom->canAdd['task'] = 'priList,typeList'; +$config->custom->canAdd['task'] = 'priList,typeList,reasonList'; $config->custom->canAdd['bug'] = 'priList,severityList,osList,browserList,typeList,resolutionList'; -$config->custom->canAdd['testcase'] = 'priList,typeList,stageList'; +$config->custom->canAdd['testcase'] = 'priList,typeList,stageList,resultList,statusList'; $config->custom->canAdd['testtask'] = 'priList'; $config->custom->canAdd['todo'] = 'priList,typeList'; $config->custom->canAdd['user'] = 'roleList'; diff --git a/module/custom/control.php b/module/custom/control.php index c1c1efedcf..c343386b7a 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -37,8 +37,7 @@ class custom extends control $currentLang = $this->app->getClientLang(); $this->app->loadLang($module); - $this->app->loadConfig('story'); - $fieldList = $this->lang->$module->$field; + $fieldList = zget($this->lang->$module, $field, ''); if($module == 'bug' and $field == 'typeList') { @@ -46,12 +45,35 @@ class custom extends control unset($fieldList['newfeature']); unset($fieldList['trackthings']); } + if($module == 'story' && $field == 'review') + { + $this->app->loadConfig('story'); + $this->view->users = $this->loadModel('user')->getPairs('nodeleted|noclosed'); + $this->view->needReview = zget($this->config->story, 'needReview', 1); + $this->view->forceReview = zget($this->config->story, 'forceReview', ''); + } + if($module == 'task' && $field == 'hours') + { + $this->app->loadConfig('project'); + $this->view->weekend = $this->config->project->weekend; + $this->view->workhours = $this->config->project->defaultWorkhours; + } + if($module == 'bug' && $field == 'longlife') + { + $this->app->loadConfig('bug'); + $this->view->longlife = $this->config->bug->longlife; + } if(!empty($_POST)) { if($module == 'story' && $field == 'review') { - $this->loadModel('setting')->setItem('system.story.needReview', fixer::input('post')->get()->needReview); + $data = fixer::input('post')->join('forceReview', ',')->get(); + $this->loadModel('setting')->setItems('system.story', $data); + } + elseif($module == 'task' && $field == 'hours') + { + $this->loadModel('setting')->setItems('system.project', fixer::input('post')->get()); } else { @@ -60,8 +82,8 @@ class custom extends control foreach($_POST['keys'] as $index => $key) { $value = $_POST['values'][$index]; - if(!$value or !$key) continue; $system = $_POST['systems'][$index]; + if(!$system and (!$value or !$key)) continue; /* the length of role is 20, check it when save. */ if($module == 'user' and $field == 'roleList' and strlen($key) > 20) die(js::alert($this->lang->custom->notice->userRole)); @@ -93,7 +115,6 @@ class custom extends control $this->view->title = $this->lang->custom->common . $this->lang->colon . $this->lang->$module->common; $this->view->position[] = $this->lang->custom->common; $this->view->position[] = $this->lang->$module->common; - $this->view->needReview = $this->config->story->needReview; $this->view->fieldList = $fieldList; $this->view->dbFields = $dbFields; $this->view->field = $field; diff --git a/module/custom/css/common.css b/module/custom/css/common.css index e69de29bb2..21488f0936 100644 --- a/module/custom/css/common.css +++ b/module/custom/css/common.css @@ -0,0 +1 @@ +.alert-block{border-top:1px solid #ddd;} diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index f16b397425..4d08f35eb9 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -31,6 +31,7 @@ $lang->custom->task->fields['priList'] = '优先级'; $lang->custom->task->fields['typeList'] = '类型'; $lang->custom->task->fields['reasonList'] = '关闭原因'; $lang->custom->task->fields['statusList'] = '状态'; +$lang->custom->task->fields['hours'] = '工时'; $lang->custom->bug = new stdClass(); $lang->custom->bug->fields['priList'] = '优先级'; @@ -40,6 +41,7 @@ $lang->custom->bug->fields['browserList'] = '浏览器'; $lang->custom->bug->fields['typeList'] = '类型'; $lang->custom->bug->fields['resolutionList'] = '解决方案'; $lang->custom->bug->fields['statusList'] = '状态'; +$lang->custom->bug->fields['longlife'] = '久未处理天数'; $lang->custom->testcase = new stdClass(); $lang->custom->testcase->fields['priList'] = '优先级'; @@ -67,15 +69,24 @@ $lang->custom->allLang = '适用所有语言'; $lang->custom->confirmRestore = '是否要恢复默认配置?'; $lang->custom->notice = new stdclass(); -$lang->custom->notice->userRole = '键的长度必须小于20个字符!'; +$lang->custom->notice->userRole = '键的长度必须小于20个字符!'; +$lang->custom->notice->canNotAdd = '该项值已经在禅道中固定,不能添加新值'; +$lang->custom->notice->forceReview = '指定人提交的需求必须评审。'; +$lang->custom->notice->longlife = 'Bug列表页面的久未处理标签中,列出设置天数之前未处理的Bug。'; $lang->custom->notice->indexPage['product'] = "从8.2版本起增加了产品主页视图,是否默认进入产品主页?"; $lang->custom->notice->indexPage['project'] = "从8.2版本起增加了项目主页视图,是否默认进入项目主页?"; $lang->custom->notice->indexPage['qa'] = "从8.2版本起增加了测试主页视图,是否默认进入测试主页?"; $lang->custom->storyReview = '评审流程'; +$lang->custom->forceReview = '强制评审'; $lang->custom->reviewList[1] = '开启'; $lang->custom->reviewList[0] = '关闭'; +$lang->custom->workingHours = '每天可用工时'; +$lang->custom->weekend = '周休'; +$lang->custom->weekendList[2] = '双休'; +$lang->custom->weekendList[1] = '单休'; + $lang->custom->productProject = new stdclass(); $lang->custom->productProject->relation['0_0'] = '产品 - 项目'; $lang->custom->productProject->relation['0_1'] = '产品 - 迭代'; diff --git a/module/custom/model.php b/module/custom/model.php index a9e253e230..8fd0c7734a 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -193,7 +193,8 @@ class customModel extends model /* Merge fileMenu and customMenu. */ foreach($customMenuMap as $name => $item) { - if(!isset($allMenu->$name))$allMenu->$name = $item; + if(is_object($allMenu) and !isset($allMenu->$name))$allMenu->$name = $item; + if(is_array($allMenu) and !isset($allMenu[$name]))$allMenu[$name] = $item; } foreach($allMenu as $name => $item) diff --git a/module/custom/view/flow.html.php b/module/custom/view/flow.html.php index 24a3555b73..eca2cab2d4 100644 --- a/module/custom/view/flow.html.php +++ b/module/custom/view/flow.html.php @@ -29,19 +29,18 @@
- - custom->productProject) ? $config->custom->productProject : '0_0' ?> - custom->productProject->relation as $key => $value):?> - - + custom->productProject) ? $config->custom->productProject : '0_0' ?> + - - diff --git a/module/custom/view/set.html.php b/module/custom/view/set.html.php index 5990560b40..db1b514d5d 100644 --- a/module/custom/view/set.html.php +++ b/module/custom/view/set.html.php @@ -48,33 +48,72 @@ EOT;
- custom->{$module}->fields as $key => $value) { echo "
  • " . html::a(inlink('set', "module=$module&field=$key"), $value) . "
  • "; } - ?> + ?>
    - custom->object[$module] . ' >> ' . $lang->custom->$module->fields[$field]?> + custom->object[$module] . $lang->arrow . $lang->custom->$module->fields[$field]?>
    - -
    custom->select;?>
    - + custom->select;?> + custom->productProject->relation as $key => $value):?> +

    +
    +
    custom->productProject->notice?>
    + +
    - + + + + + + + + + +
    custom->storyReview;?>custom->storyReview;?> custom->reviewList, $needReview);?>
    custom->forceReview;?>custom->notice->forceReview;?>
    + + + + + + + + + + + + + + + +
    custom->workingHours;?>
    custom->weekend;?>custom->weekendList, $weekend);?>
    + + + + + + + +
    custom->bug->fields['longlife'];?> +
    + + day?> +
    +
    +
    custom->notice->longlife;?>
    - +
    - - + + $value):?> @@ -87,7 +126,7 @@ EOT; @@ -103,6 +142,9 @@ EOT;
    custom->key;?>custom->value;?>custom->key;?>custom->value;?>
    - +
    + +
    custom->notice->canNotAdd;?>
    +
    diff --git a/module/mail/view/sendcloud.html.php b/module/mail/view/sendcloud.html.php index cbe8ab30fe..605f94d5cb 100755 --- a/module/mail/view/sendcloud.html.php +++ b/module/mail/view/sendcloud.html.php @@ -58,6 +58,6 @@ include '../../common/view/header.html.php'; -
    mail->sendCloudHelp, common::hasPriv('mail', 'sendcloudUser') ? inlink('sendcloudUser') : '#')?>
    +
    mail->sendCloudHelp, common::hasPriv('mail', 'sendcloudUser') ? inlink('sendcloudUser') : '#')?>
    diff --git a/module/project/config.php b/module/project/config.php index b7351cebde..50f96ba2fb 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -3,6 +3,7 @@ $config->project = new stdclass(); $config->project->defaultWorkhours = '7.0'; $config->project->orderBy = 'isDone,status,order_desc'; $config->project->maxBurnDay = '31'; +$config->project->weekend = '2'; global $lang, $app; $app->loadLang('task'); diff --git a/module/project/control.php b/module/project/control.php index 9ee7aa4153..9706947a89 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -537,6 +537,7 @@ class project extends control /* Append id for secend sort. */ $sort = $this->loadModel('common')->appendOrder($orderBy); + $queryID = ($type == 'bySearch') ? (int)$param : 0; $project = $this->commonAction($projectID); /* Load pager. */ diff --git a/module/project/js/common.js b/module/project/js/common.js index 0e59debf64..2c7c83afb9 100644 --- a/module/project/js/common.js +++ b/module/project/js/common.js @@ -44,7 +44,7 @@ function computeDaysDelta(date1, date2) weekEnds = 0; for(i = 0; i < delta; i++) { - if(date1.getDay() == 0 || date1.getDay() == 6) weekEnds ++; + if((weekend == 2 && date1.getDay() == 6) || date1.getDay() == 0) weekEnds ++; date1 = date1.valueOf(); date1 += 1000 * 60 * 60 * 24; date1 = new Date(date1); diff --git a/module/project/model.php b/module/project/model.php index b12564f22a..28d21702fe 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1886,45 +1886,41 @@ class projectModel extends model public function getDateList($begin, $end, $type, $interval = '', $format = 'm/d/Y') { $begin = strtotime($begin); - $end = strtotime($end); + $end = strtotime($end) + 24 * 3600; + $beginWeekDay = date('w', $begin); $days = ($end - $begin) / 3600 / 24; if($type == 'noweekend') { - $mod = $days % 7; - $days = $days - floor($days / 7) * 2; - $days = $mod == 6 ? $days - 1 : $days; + $allDays = $days; + $weekDay = $beginWeekDay; + for($i = 0; $i < $allDays; $i++, $weekDay++) + { + $weekDay = $weekDay % 7; + if(($this->config->project->weekend == 2 and $weekDay == 6) or $weekDay == 0) $days--; + } } if(!$interval) $interval = floor($days / $this->config->project->maxBurnDay); $dateList = array(); - $date = $begin; $spaces = (int)$interval; $counter = $spaces; - while($date <= $end) + $weekDay = $beginWeekDay; + for($date = $begin; $date <= $end; $date += 24 * 3600, $weekDay++) { /* Remove weekend when type is noweekend.*/ if($type == 'noweekend') { - $weekDay = date('w', $date); - if($weekDay == 6 or $weekDay == 0) - { - $date += 24 * 3600; - continue; - } + $weekDay = $weekDay % 7; + if(($this->config->project->weekend == 2 and $weekDay == 6) or $weekDay == 0) continue; } $counter ++; - if($counter <= $spaces) - { - $date += 24 * 3600; - continue; - } + if($counter <= $spaces) continue; $counter = 0; $dateList[] = date($format, $date); - $date += 24 * 3600; } return array($dateList, $interval); diff --git a/module/project/view/batchedit.html.php b/module/project/view/batchedit.html.php index a8be8b6eb3..1b57bcb4ba 100755 --- a/module/project/view/batchedit.html.php +++ b/module/project/view/batchedit.html.php @@ -78,4 +78,5 @@ $minWidth = (count($visibleFields) > 5) ? 'w-150px' : ''; createLink('custom', 'ajaxSaveCustomFields', 'module=project§ion=custom&key=batchEditFields')?> +project->weekend);?> diff --git a/module/project/view/create.html.php b/module/project/view/create.html.php index fd6b37ffca..75c46ca657 100644 --- a/module/project/view/create.html.php +++ b/module/project/view/create.html.php @@ -159,4 +159,5 @@ +project->weekend);?> diff --git a/module/project/view/edit.html.php b/module/project/view/edit.html.php index 8d44266891..ef85b8c651 100644 --- a/module/project/view/edit.html.php +++ b/module/project/view/edit.html.php @@ -140,4 +140,5 @@ +project->weekend);?> diff --git a/module/project/view/putoff.html.php b/module/project/view/putoff.html.php index b767ede748..37b7f29099 100644 --- a/module/project/view/putoff.html.php +++ b/module/project/view/putoff.html.php @@ -63,4 +63,5 @@
    +project->weekend);?> diff --git a/module/report/control.php b/module/report/control.php index 20bc0985a9..a2a042033c 100644 --- a/module/report/control.php +++ b/module/report/control.php @@ -113,7 +113,7 @@ class report extends control * @access public * @return void */ - public function workload($begin = '', $end = '', $days = 0, $workday = 7, $dept = 0) + public function workload($begin = '', $end = '', $days = 0, $workday = 0, $dept = 0) { if($_POST) { @@ -125,13 +125,22 @@ class report extends control $workday = $data->workday; } - $begin = $begin ? date('Y-m-d', strtotime($begin)) : date('Y-m-d', strtotime('now')); - $end = $end ? date('Y-m-d', strtotime($end)) : date('Y-m-d', strtotime('+1 week')); + $this->app->loadConfig('project'); + $begin = $begin ? strtotime($begin) : time(); + $end = $end ? strtotime($end) : time() + (7 * 24 * 3600); + $end += 24 * 2600; + $beginWeekDay = date('w', $begin); + $begin = date('Y-m-d', $begin); + $end = date('Y-m-d', $end); - if(!$days) + if(empty($workday))$workday = $this->config->project->defaultWorkhours; + $diffDays = helper::diffDate($end, $begin); + $weekDay = $beginWeekDay; + $days = $diffDays; + for($i = 0; $i < $diffDays; $i++,$weekDay++) { - $diffDays = helper::diffDate($end, $begin); - $days = round($diffDays - ($diffDays / 7 * 2)); + $weekDay = $weekDay % 7; + if(($this->config->project->weekend == 2 and $weekDay == 6) or $weekDay == 0) $days --; } $this->view->title = $this->lang->report->workload; diff --git a/module/report/view/workload.html.php b/module/report/view/workload.html.php index 11cde4fc78..dea3f0355d 100644 --- a/module/report/view/workload.html.php +++ b/module/report/view/workload.html.php @@ -48,7 +48,7 @@ - +
    diff --git a/module/story/control.php b/module/story/control.php index a49bb6aa9f..c3ccb5d502 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -192,6 +192,7 @@ class story extends control $this->view->keywords = $keywords; $this->view->mailto = $mailto; $this->view->needReview = ($this->app->user->account == $product->PO || $projectID > 0 || $this->config->story->needReview == 0) ? "checked='checked'" : ""; + if($this->story->checkForceReview()) $this->view->needReview = ''; $this->display(); } @@ -277,6 +278,7 @@ class story extends control $this->view->branch = $branch; $this->view->branches = $this->loadModel('branch')->getPairs($productID); $this->view->needReview = ($this->app->user->account == $product->PO || $this->config->story->needReview == 0) ? 0 : 1; + if($this->story->checkForceReview()) $this->view->needReview = 1; $this->display(); } @@ -492,6 +494,7 @@ class story extends control $this->view->users = $this->user->getPairs('nodeleted|pofirst', $this->view->story->assignedTo); $this->view->position[] = $this->lang->story->change; $this->view->needReview = ($this->app->user->account == $this->view->product->PO || $this->config->story->needReview == 0) ? "checked='checked'" : ""; + if($this->story->checkForceReview()) $this->view->needReview = ''; $this->display(); } diff --git a/module/story/model.php b/module/story/model.php index 9b8c01e86a..59c61b8f82 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -165,6 +165,7 @@ class storyModel extends model $result = $this->loadModel('common')->removeDuplicate('story', $story, "product={$story->product}"); if($result['stop']) return array('status' => 'exists', 'id' => $result['duplicate']); + if($this->checkForceReview()) $story->status = 'draft'; $story = $this->loadModel('file')->processEditor($story, $this->config->story->editor->create['id'], $this->post->uid); $this->dao->insert(TABLE_STORY)->data($story, 'spec,verify')->autoCheck()->batchCheck($this->config->story->create->requiredFields, 'notempty')->exec(); if(!dao::isError()) @@ -265,6 +266,7 @@ class storyModel extends model if(isset($stories->uploadImage)) $this->loadModel('file'); + $forceReview = $this->checkForceReview(); for($i = 0; $i < $batchNum; $i++) { if(!empty($stories->title[$i])) @@ -277,7 +279,7 @@ class storyModel extends model $data->source = $stories->source[$i]; $data->pri = $stories->pri[$i]; $data->estimate = $stories->estimate[$i]; - $data->status = $stories->needReview[$i] == 0 ? 'active' : 'draft'; + $data->status = ($stories->needReview[$i] == 0 and !$forceReview) ? 'active' : 'draft'; $data->keywords = $stories->keywords[$i]; $data->product = $productID; $data->branch = $branch; @@ -394,6 +396,7 @@ class storyModel extends model ->stripTags($this->config->story->editor->change['id'], $this->config->allowedTags) ->remove('files,labels,comment,needNotReview,uid') ->get(); + if($this->checkForceReview()) $story->status = 'changed'; $story = $this->loadModel('file')->processEditor($story, $this->config->story->editor->change['id'], $this->post->uid); $this->dao->update(TABLE_STORY)->data($story, 'spec,verify') ->autoCheck() @@ -2273,4 +2276,18 @@ class storyModel extends model } return true; } + + /** + * Check force review for user. + * + * @access public + * @return bool + */ + public function checkForceReview() + { + $forceReview = false; + if(!empty($this->config->story->forceReview)) $forceReview = strpos(",{$this->config->story->forceReview},", ",{$this->app->user->account},") !== false; + + return $forceReview; + } }
    report->user;?>