对task模块的control层view方法重写报错
2018-09-28 16:35:24
li yun tao li
  • 访问次数: 10
  • 注册日期: 2018-09-18
  • 最后登录: 2018-09-29
  • 当前积分: 69
  • 门派等级: 无门派

按二次开发规范对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.

li yun tao li 最后编辑, 2018-09-28 16:37:03
沙发
2018-09-28 18:22:33
石洋洋
  • 访问次数: 5293
  • 注册日期: 2011-04-06
  • 最后登录: 2019-01-17
  • 当前积分: 90954
  • 门派等级: 幽灵 等级6 修罗

把这个文件发出来看一下。

板凳
2018-09-29 15:19:17 回复 #1
li yun tao li
  • 访问次数: 10
  • 注册日期: 2018-09-18
  • 最后登录: 2018-09-29
  • 当前积分: 69
  • 门派等级: 无门派

文件传不上来

/**
     * 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();
    }

li yun tao li 最后编辑, 2018-09-29 15:20:14
#3
2018-09-30 10:12:44
石洋洋
  • 访问次数: 5293
  • 注册日期: 2011-04-06
  • 最后登录: 2019-01-17
  • 当前积分: 90954
  • 门派等级: 幽灵 等级6 修罗

介绍文档: http://devel.cnezsoft.com/book/extension/extend-control-37.html

注意红框位置的代码:

1/1