对task模块的control层view方法重写报错
按二次开发规范对task模块的control层view方法重写,以view命名文件,放在task目录下ext/control下面,访问报错
ERROR: the control task not found in framework\base\router.class.php on line 1629, last called by www\index.php on line 67 through function loadModule.
文件传不上来
/**
* View a task.
*
* @param int $taskID
* @access public
* @return void
*/
public function view($taskID)
{
$task = $this->task->getById($taskID, true);
if(!$task) die(js::error($this->lang->notFound) . js::locate('back'));
if($task->fromBug != 0)
{
$bug = $this->loadModel('bug')->getById($task->fromBug);
$task->bugSteps = '';
if($bug)
{
$task->bugSteps = $this->loadModel('file')->setImgSize($bug->steps);
foreach($bug->files as $file) $task->files[] = $file;
}
$this->view->fromBug = $bug;
}
$story = $this->story->getById($task->story);
$task->storySpec = empty($story) ? '' : $this->loadModel('file')->setImgSize($story->spec);
$task->storyVerify = empty($story) ? '' : $this->loadModel('file')->setImgSize($story->verify);
$task->storyFiles = $this->loadModel('file')->getByObject('story', $task->story);
if($task->team) $this->lang->task->assign = $this->lang->task->transfer;
/* Update action. */
if($task->assignedTo == $this->app->user->account) $this->loadModel('action')->read('task', $taskID);
/* Set menu. */
$project = $this->project->getById($task->project);
$this->project->setMenu($this->project->getPairs(), $project->id);
$title = "TASK#$task->id $task->name / $project->name";
$position[] = html::a($this->createLink('project', 'browse', "projectID=$task->project"), $project->name);
$position[] = $this->lang->task->common;
$position[] = $this->lang->task->view;
$this->view->title = $title;
$this->view->position = $position;
$this->view->project = $project;
$this->view->task = $task;
$this->view->actions = $this->loadModel('action')->getList('task', $taskID);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('task', $taskID);
$this->view->product = $this->tree->getProduct($task->module);
$this->view->modulePath = $this->tree->getParents($task->module);
$this->display();
}