diff --git a/framework/control.class.php b/framework/control.class.php index f7b7adf73f..7d90e848c1 100644 --- a/framework/control.class.php +++ b/framework/control.class.php @@ -58,7 +58,18 @@ class control extends baseControl $viewFile = file_exists($commonExtViewFile) ? $commonExtViewFile : $mainViewFile; $viewFile = (!empty($siteExtViewFile) and file_exists($siteExtViewFile)) ? $siteExtViewFile : $viewFile; - if(!is_file($viewFile)) $this->app->triggerError("the view file $viewFile not found", __FILE__, __LINE__, $exit = true); + if(!is_file($viewFile)) + { + if($this->config->debug === false) + { + die(js::locate($this->createLink('misc','ajaxerror', ".mhtml"), 'parent')); + } + else + { + $this->app->triggerError("the view file $viewFile not found", __FILE__, __LINE__, $exit = true); + } + + } $commonExtHookFiles = glob($viewExtPath['common'] . $this->devicePrefix . $methodName . ".*.{$viewType}.hook.php"); $siteExtHookFiles = empty($viewExtPath['site']) ? '' : glob($viewExtPath['site'] . $this->devicePrefix . $methodName . ".*.{$viewType}.hook.php"); diff --git a/module/bug/control.php b/module/bug/control.php index 8fde4f0b4d..31261e6253 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1622,7 +1622,7 @@ class bug extends control } else { - $browseType = $this->lang->bug->moreSelects[$browseType]; + $browseType = isset($this->lang->bug->moreSelects[$browseType]) ? $this->lang->bug->moreSelects[$browseType] : null; } $this->view->fileName = $productName . $this->lang->dash . $browseType . $fileName; diff --git a/module/doc/view/alllibs.html.php b/module/doc/view/alllibs.html.php index e88ea1faf2..0ad688fdef 100644 --- a/module/doc/view/alllibs.html.php +++ b/module/doc/view/alllibs.html.php @@ -13,9 +13,7 @@ app->user->feedback) && !$this->cookie->feedbackView) ? true : false;?>
- - cookie->browseType == 'bylist'):?> diff --git a/module/doc/view/browse.html.php b/module/doc/view/browse.html.php index 5d38158ff4..db1ae3decb 100644 --- a/module/doc/view/browse.html.php +++ b/module/doc/view/browse.html.php @@ -21,9 +21,7 @@ var browseType = ''; app->user->feedback) && !$this->cookie->feedbackView && $this->from == 'doc') ? true : false;?>
- - cookie->browseType == 'bygrid'):?> diff --git a/module/misc/control.php b/module/misc/control.php index ec78640a24..20c81ded6c 100644 --- a/module/misc/control.php +++ b/module/misc/control.php @@ -193,4 +193,8 @@ class misc extends control $this->view->detailed = $detailed; $this->display(); } + public function ajaxerror() + { + $this->display(); + } } diff --git a/module/misc/lang/zh-cn.php b/module/misc/lang/zh-cn.php index a79da9eb40..ca4b7876e4 100644 --- a/module/misc/lang/zh-cn.php +++ b/module/misc/lang/zh-cn.php @@ -173,3 +173,5 @@ $lang->misc->feature->all['7.1.stable'][] = array('title'=>'提供rpm和deb包', $lang->misc->feature->all['6.3.stable'][] = array('title'=>'增加数据表格功能', 'desc' => '

可配置数据表格中可显示的字段,按照配置字段显示想看的数据

'); $lang->misc->feature->all['6.3.stable'][] = array('title'=>'继续完善细节', 'desc' => ''); + +$lang->misc->error = '此功能正在努力开发中...'; diff --git a/module/task/model.php b/module/task/model.php index 029837eb42..4d6d887e38 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -1279,6 +1279,7 @@ class taskModel extends model ->remove('finishedDate,comment,assignedTo,files,labels,consumed') ->get(); $estimate->consumed = $consumed; + $estimate->date = $this->post->finishedDate;/*#task 7849*/ if($estimate->consumed) $this->addTaskEstimate($estimate); if(!empty($oldTask->team)) @@ -2445,7 +2446,6 @@ class taskModel extends model $action = strtolower($action); if($action == 'start' and !empty($task->children)) return false; - if($action == 'recordestimate' and !empty($task->children)) return false; if($action == 'finish' and !empty($task->children)) return false; if($action == 'cancel' and !empty($task->children)) return false; if($action == 'pause' and !empty($task->children)) return false; @@ -2454,6 +2454,7 @@ class taskModel extends model if($action == 'close' and !empty($task->children)) return false; if($action == 'batchcreate' and !empty($task->team)) return false; if($action == 'batchcreate' and $task->parent > 0) return false; + if($action == 'recordestimate' and $task->parent == -1) return false; if($action == 'start') return $task->status == 'wait'; if($action == 'restart') return $task->status == 'pause'; diff --git a/module/todo/control.php b/module/todo/control.php index c902d01c65..5eee51a94e 100644 --- a/module/todo/control.php +++ b/module/todo/control.php @@ -64,7 +64,7 @@ class todo extends control if($this->app->getViewType() == 'xhtml') die(js::locate($this->createLink('todo', 'view', "todoID=$todoID"), 'parent')); if(isonlybody()) die(js::locate($this->createLink('my', 'todo', "type=$date"), 'parent.parent')); - die(js::locate($this->createLink('my', 'todo', "type=$date"), 'parent')); + die(js::locate($this->createLink('my', 'todo', "type=all"), 'parent')); } unset($this->lang->todo->typeList['cycle']); diff --git a/module/todo/model.php b/module/todo/model.php index 23f7cb2f5d..4b98bc96e5 100644 --- a/module/todo/model.php +++ b/module/todo/model.php @@ -35,7 +35,7 @@ class todoModel extends model ->setIF($this->post->begin == false, 'begin', '2400') ->setIF($this->post->end == false, 'end', '2400') ->stripTags($this->config->todo->editor->create['id'], $this->config->allowedTags) - ->remove('bug, task, story, uid') + ->remove('bug, task, story, uid, feedback') ->get(); if(empty($todo->cycle)) unset($todo->config); if(!empty($todo->cycle)) @@ -77,11 +77,6 @@ class todoModel extends model $this->file->updateObjectID($this->post->uid, $todoID, 'todo'); $this->loadModel('score')->create('todo', 'create', $todoID); if(!empty($todo->cycle)) $this->createByCycle(array($todoID => $todo)); - if(isset($todo->type) and $todo->type == 'feedback') - { - $this->dao->update(TABLE_FEEDBACK)->set('`status`')->eq('closed')->where('id')->eq($todo->idvalue)->exec(); - $this->loadModel('action')->create('feedback', $todo->idvalue, 'totodo', '', $todoID); - } return $todoID; } } @@ -423,6 +418,20 @@ class todoModel extends model return $todos; } + /** + * Get by id list. + * + * @param array $todoIDList + * @access public + * @return object + */ + public function getByList($todoIDList = 0) + { + return $this->dao->select('*')->from(TABLE_TODO) + ->beginIF($todoIDList)->where('id')->in($todoIDList)->fi() + ->fetchAll('id'); + } + /** * Judge an action is clickable or not. * diff --git a/module/todo/view/create.html.php b/module/todo/view/create.html.php index 5f3f928962..55183b173a 100644 --- a/module/todo/view/create.html.php +++ b/module/todo/view/create.html.php @@ -101,7 +101,7 @@ todo->desc;?> - + desc) ? $feedback->desc : '', "rows='8' class='form-control'");?> todo->status;?> diff --git a/module/user/model.php b/module/user/model.php index db604120af..fd646117f7 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -1433,7 +1433,7 @@ class userModel extends model public function checkProductPriv($product, $account, $groups, $linkedProjects, $teams) { if(strpos($this->app->company->admins, ',' . $account . ',') !== false) return true; - if($product->PO == $account OR $product->QD == $account OR $product->RD == $account OR $product->createdBy == $account) return true; + if($product->PO == $account OR $product->QD == $account OR $product->RD == $account OR $product->createdBy == $account OR $product->feedback == $account) return true; if($product->acl == 'open') return true; if($product->acl == 'custom')