diff --git a/module/bug/model.php b/module/bug/model.php index 6a0114f9ed..20d38ed35d 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1506,7 +1506,7 @@ class bugModel extends model { foreach($openBuildIDList as $buildID) { - if(isset($datas[$buildID])) + if(isset($datas[$buildID])) { $datas[$buildID]->value += $data->value; } @@ -1538,7 +1538,7 @@ class bugModel extends model { $datas = $this->dao->select('module as name, count(module) as value')->from(TABLE_BUG)->where($this->reportCondition())->groupBy('module')->orderBy('value DESC')->fetchAll('name'); if(!$datas) return array(); - $modules = $this->loadModel('tree')->getModulesName(array_keys($datas),true,true); + $modules = $this->loadModel('tree')->getModulesName(array_keys($datas), true, true); foreach($datas as $moduleID => $data) $data->name = isset($modules[$moduleID]) ? $modules[$moduleID] : '/'; return $datas; } diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index 61cfed72b5..59a865608d 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -193,15 +193,15 @@ js::set('branch', $branch); createLink('bug', 'batchConfirm'); - $misc = common::hasPriv('bug', 'batchConfirm') ? "onclick=\"setFormAction('$actionLink','hiddenwin')\"" : $class; + $misc = common::hasPriv('bug', 'batchConfirm') ? "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"" : $class; if($misc) echo "
  • " . html::a('javascript:;', $lang->bug->confirmBug, '', $misc) . "
  • "; $actionLink = $this->createLink('bug', 'batchClose'); - $misc = common::hasPriv('bug', 'batchClose') ? "onclick=\"setFormAction('$actionLink','hiddenwin')\"" : $class; + $misc = common::hasPriv('bug', 'batchClose') ? "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"" : $class; if($misc) echo "
  • " . html::a('javascript:;', $lang->bug->close, '', $misc) . "
  • "; $actionLink = $this->createLink('bug', 'batchActivate'); - $misc = common::hasPriv('bug', 'batchActivate') ? "onclick=\"setFormAction('$actionLink','hiddenwin')\"" : $class; + $misc = common::hasPriv('bug', 'batchActivate') ? "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"" : $class; if($misc) echo "
  • " . html::a('javascript:;', $lang->bug->activate, '', $misc) . "
  • "; if(common::hasPriv('bug', 'batchChangeModule')) diff --git a/module/custom/control.php b/module/custom/control.php index 24a029c62e..5c1c67f003 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -12,8 +12,8 @@ class custom extends control { /** - * Index - * + * Index + * * @access public * @return void */ @@ -23,11 +23,11 @@ class custom extends control } /** - * Custom - * - * @param string $module - * @param string $field - * @param string $lang + * Custom + * + * @param string $module + * @param string $field + * @param string $lang * @access public * @return void */ @@ -107,7 +107,7 @@ class custom extends control /* Fix bug #942. */ if($field == 'priList' and !is_numeric($key)) die(js::alert($this->lang->custom->notice->priListKey)); if($module == 'bug' and $field == 'severityList' and !is_numeric($key)) die(js::alert($this->lang->custom->notice->severityListKey)); - if($module == 'bug' and $field == 'resolutionList' and !empty($key) and !validater::checkCode($key)) die(js::alert($this->lang->custom->notice->resolutionList)); + if(!empty($key) and !validater::checkCode($key)) die(js::alert($this->lang->custom->notice->keyList)); /* 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)); diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php index ef40bd2351..9c05bd96a4 100644 --- a/module/custom/lang/en.php +++ b/module/custom/lang/en.php @@ -79,7 +79,7 @@ $lang->custom->notice->canNotAdd = 'This item will be processed, so c $lang->custom->notice->forceReview = 'Review is required for %s submitted by certain assignee.'; $lang->custom->notice->longlife = 'List "Undone" bugs that are older than hold days from "Longlife" bugs.'; $lang->custom->notice->priListKey = 'Priority list key should be numbers!'; -$lang->custom->notice->resolutionList = 'Solution list key should be English or digital!'; +$lang->custom->notice->keyList = 'key should be English or digital!'; $lang->custom->notice->severityListKey = 'Bug severity list key should be numbers.'; $lang->custom->notice->indexPage['product'] = "ZenTao 8.2+ has Product Homepage. Do you want to enter Product Homepage?"; $lang->custom->notice->indexPage['project'] = "ZenTao 8.2+ has Project Homepage. Do you want to enter Project Homepage?"; diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index 79123328ba..144489a834 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -79,7 +79,7 @@ $lang->custom->notice->canNotAdd = '该项参与运算,不提供自 $lang->custom->notice->forceReview = "指定人提交的%s必须评审。"; $lang->custom->notice->longlife = 'Bug列表页面的久未处理标签中,列出设置天数之前未处理的Bug。'; $lang->custom->notice->priListKey = '优先级的键应当为数字!'; -$lang->custom->notice->resolutionList = '解决方案的键值应当为英文或数字'; +$lang->custom->notice->keyList = '键值应当为英文或数字'; $lang->custom->notice->severityListKey = 'Bug严重程度的键应当为数字!'; $lang->custom->notice->indexPage['product'] = "从8.2版本起增加了产品主页视图,是否默认进入产品主页?"; $lang->custom->notice->indexPage['project'] = "从8.2版本起增加了项目主页视图,是否默认进入项目主页?"; diff --git a/module/custom/lang/zh-tw.php b/module/custom/lang/zh-tw.php index 90227312f3..c10e4c3394 100644 --- a/module/custom/lang/zh-tw.php +++ b/module/custom/lang/zh-tw.php @@ -79,7 +79,7 @@ $lang->custom->notice->canNotAdd = '該項參與運算,不提供自 $lang->custom->notice->forceReview = "指定人提交的%s必須評審。"; $lang->custom->notice->longlife = 'Bug列表頁面的久未處理標籤中,列出設置天數之前未處理的Bug。'; $lang->custom->notice->priListKey = '優先順序的鍵應當為數字!'; -$lang->custom->notice->resolutionList = '解決方案的鍵值應當為英文或數字'; +$lang->custom->notice->keyList = '鍵值應當為英文或數字'; $lang->custom->notice->severityListKey = 'Bug嚴重程度的鍵應當為數字!'; $lang->custom->notice->indexPage['product'] = "從8.2版本起增加了產品主頁視圖,是否預設進入產品主頁?"; $lang->custom->notice->indexPage['project'] = "從8.2版本起增加了項目主頁視圖,是否預設進入項目主頁?"; diff --git a/module/doc/control.php b/module/doc/control.php index b0d9b2069b..9cb976bd6e 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -655,8 +655,6 @@ class doc extends control $this->view->viewType = $viewType; $this->view->orderBy = $orderBy; $this->view->objectID = $objectID; - $this->view->recTotal = $recTotal; - $this->view->recPerPage = $recPerPage; $this->display(); } diff --git a/module/doc/view/showfiles.html.php b/module/doc/view/showfiles.html.php index 933add26a8..16f5133739 100644 --- a/module/doc/view/showfiles.html.php +++ b/module/doc/view/showfiles.html.php @@ -47,52 +47,48 @@ -
    - - - - - - - - - - - - - - - - - pathname)) continue;?> - - - - - - - - - - - - - - - + + + + +
    doc->id);?> doc->fileTitle);?> doc->filePath);?> doc->extension);?> doc->size);?> doc->addedBy);?> doc->addedDate);?> actions;?>
    id;?> - objectID");?>'>title . '.' . $file->extension . ' [' . strtoupper($file->objectType) . ' #' . $file->objectID . ']';?> - pathname;?> extension;?>size / 1024 , 1) . 'K';?>addedBy) ? $file->addedBy : '';?>addedDate) ? substr($file->addedDate, 0, 10) : '';?> - id", $lang->doc->download, "data-toggle='modal'"); - common::printLink('file', 'delete', "fileID=$file->id", $lang->delete, 'hiddenwin'); - ?> -
    - show();?> + + + recTotal&recPerPage=$pager->recPerPage";?> + + + + + + + + + + + + + + pathname)) continue;?> + + + + + + + + + - -
    doc->id);?> doc->fileTitle);?> doc->filePath);?> doc->extension);?> doc->size);?> doc->addedBy);?> doc->addedDate);?> actions;?>
    id;?> + objectID");?>'>title . '.' . $file->extension . ' [' . strtoupper($file->objectType) . ' #' . $file->objectID . ']';?> + pathname;?> extension;?>size / 1024 , 1) . 'K';?>addedBy) ? $file->addedBy : '';?>addedDate) ? substr($file->addedDate, 0, 10) : '';?> + id", $lang->doc->download, "data-toggle='modal'"); + common::printLink('file', 'delete', "fileID=$file->id", $lang->delete, 'hiddenwin'); + ?>
    - + + +
    show();?>
    diff --git a/module/product/control.php b/module/product/control.php index 387c9a1c32..e82a8fec4a 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -138,7 +138,6 @@ class product extends control $moduleID = ($browseType == 'bymodule') ? (int)$param : ($browseType == 'bysearch' ? 0 : ($this->cookie->storyModule ? $this->cookie->storyModule : 0)); $queryID = ($browseType == 'bysearch') ? (int)$param : 0; - if($browseType == 'unclosed') $moduleID = 0; /* Set menu. */ $this->product->setMenu($this->products, $productID, $branch); diff --git a/module/sso/control.php b/module/sso/control.php index 5661eb1dda..4fbe1994ea 100644 --- a/module/sso/control.php +++ b/module/sso/control.php @@ -22,7 +22,6 @@ class sso extends control { $referer = empty($_GET['referer']) ? '' : $this->get->referer; $locate = empty($referer) ? getWebRoot() : base64_decode($referer); - if($this->loadModel('user')->isLogon()) die($this->locate($locate)); $this->app->loadConfig('sso'); if(!$this->config->sso->turnon) die($this->locate($locate)); @@ -40,9 +39,9 @@ class sso extends control if(strpos($location, '&') !== false) { $location = rtrim($location, '&') . "&token=$token&auth=$auth&userIP=$userIP&callback=$callback&referer=$referer"; - } + } else - { + { $location = rtrim($location, '?') . "?token=$token&auth=$auth&userIP=$userIP&callback=$callback&referer=$referer"; } $this->locate($location); @@ -63,6 +62,11 @@ class sso extends control $this->locate($this->createLink('sso', 'bind', "referer=" . helper::safe64Encode($locate))); } + if($this->loadModel('user')->isLogon()) + { + if($this->session->user && $this->session->user->account == $user->account) die($this->locate($locate)); + } + $this->user->cleanLocked($user->account); /* Authorize him and save to session. */ $user->rights = $this->user->authorize($user->account); diff --git a/module/story/model.php b/module/story/model.php index 3fd9b52788..fc12fc81be 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1996,10 +1996,9 @@ class storyModel extends model foreach($datas as $key => $project) { if(!$project->branch) continue; - $branchIDList[] = $project->branch; + $branchIDList[$project->branch] = $project->branch; } - $branchIDList = array_unique($branchIDList); $branchs = $this->dao->select('id, name')->from(TABLE_BRANCH)->where('id')->in($branchIDList)->andWhere('deleted')->eq(0)->fetchALL('id'); $modules = $this->loadModel('tree')->getModulesName(array_keys($datas)); diff --git a/module/task/css/edit.css b/module/task/css/edit.css index 0ec48066f5..865ead609b 100644 --- a/module/task/css/edit.css +++ b/module/task/css/edit.css @@ -1,2 +1,5 @@ .col-side .chosen-container .chosen-drop {width: 216px!important} .col-side .chosen-container {width: 218px!important} +#finishedDate.form-control.form-date {width: 218px!important} +#canceledDate.form-control.form-date {width: 218px!important} +#closedDate.form-control.form-date {width: 218px!important} diff --git a/module/task/view/edit.html.php b/module/task/view/edit.html.php index 124a0a7386..04e7086b73 100644 --- a/module/task/view/edit.html.php +++ b/module/task/view/edit.html.php @@ -80,7 +80,7 @@ task->assignedTo;?> assignedTo, "class='form-control chosen'");?> - + task->type;?> task->typeList, $task->type, 'class=form-control');?> @@ -88,7 +88,7 @@ task->status;?> task->statusList, $task->status, 'class=form-control');?> - + task->pri;?> task->priList, $task->pri, 'class=form-control');?> @@ -101,27 +101,27 @@
    task->legendEffort;?> - +
    - + - + - + - + - + @@ -130,14 +130,14 @@
    task->legendLife;?> -
    task->estStarted;?> estStarted, "class='form-control form-date'");?>
    task->realStarted;?> realStarted, "class='form-control form-date'");?>
    task->deadline;?> deadline, "class='form-control form-date'");?>
    task->estimate;?> estimate, "class='form-control' autocomplete='off'");?>
    task->consumed;?> consumed . ' '; common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'list', '', '', 'iframe', true);?>
    task->left;?> left, "class='form-control' autocomplete='off'");?>
    +
    - + @@ -145,7 +145,7 @@ - + @@ -153,11 +153,11 @@ - + - + diff --git a/module/tree/model.php b/module/tree/model.php index bf188c0a96..4de81d4574 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -295,16 +295,16 @@ class treeModel extends model else { $treeMenu[$module->parent] = $moduleName; - } + } } } /** * Get the tree menu in html. - * - * @param int $rootID - * @param string $type - * @param int $startModule + * + * @param int $rootID + * @param string $type + * @param int $startModule * @param string $userFunc the function used to create link * @param string $extra extra params * @access public @@ -342,6 +342,7 @@ class treeModel extends model { $linkHtml = ($type == 'case' and !empty($extra)) ? $branch : $this->createBranchLink($type, $rootID, $branchID, $branch); $linkHtml = $manage ? html::a(inlink('browse', "root=$rootID&viewType=$type¤tModuleID=0&branch=$branchID"), $branch) : $linkHtml; + if($type == 'story' || $type == 'bug') $linkHtml = $branch; if($firstBranch and $product->type != 'normal') { $linkHtml = $this->lang->product->branchName[$product->type] . '
    • ' . $linkHtml; @@ -357,17 +358,17 @@ class treeModel extends model if(!$firstBranch) $lastMenu .= '
    '; $lastMenu = "
      $lastMenu
    \n"; - return $lastMenu; + return $lastMenu; } /** * Get the tree menu of task in html. - * - * @param int $rootID - * @param int $productID - * @param int $startModule - * @param int $userFunc - * @param string $extra + * + * @param int $rootID + * @param int $productID + * @param int $startModule + * @param int $userFunc + * @param string $extra * @access public * @return void */ @@ -1126,12 +1127,11 @@ class treeModel extends model foreach($paths as $path) $moduleName .= '/' . $allModules[$path]; $modulePairs[$module->id] = $moduleName; - if($module->branch) $branchIDList[] = $module->branch; + if($module->branch) $branchIDList[$module->branch] = $module->branch; } if(!$branchPath) return $modulePairs; - $branchIDList = array_unique($branchIDList); $branchs = $this->dao->select('id, name')->from(TABLE_BRANCH)->where('id')->in($branchIDList)->andWhere('deleted')->eq(0)->fetchALL('id'); foreach($modules as $module) {
    task->openedBy;?> openedBy];?>
    task->finishedBy;?>finishedBy, "class='form-control'");?>finishedBy, "class='form-control chosen'");?>
    task->finishedDate;?>
    task->canceledBy;?>canceledBy, 'class="form-control"');?>canceledBy, 'class="form-control chosen"');?>
    task->canceledDate;?>
    task->closedBy;?>closedBy, 'class="form-control"');?>closedBy, 'class="form-control chosen"');?>
    task->closedReason;?>task->reasonList, $task->closedReason, 'class="form-control"');?>task->reasonList, $task->closedReason, 'class="form-control chosen"');?>
    task->closedDate;?>