* Adjust execute hook for workflow.
This commit is contained in:
@@ -554,6 +554,8 @@ class bug extends control
|
||||
$productName = $this->products[$productID];
|
||||
$branches = $this->session->currentProductType == 'normal' ? array() : $this->loadModel('branch')->getPairs($bug->product);
|
||||
|
||||
$this->executeHooks($this->methodName, $bugID);
|
||||
|
||||
/* Header and positon. */
|
||||
$this->view->title = "BUG #$bug->id $bug->title - " . $this->products[$productID];
|
||||
$this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $productName);
|
||||
|
||||
@@ -230,6 +230,8 @@ class build extends control
|
||||
$this->view->type = $type;
|
||||
}
|
||||
|
||||
$this->executeHooks($this->methodName, $buildID);
|
||||
|
||||
/* Assign. */
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->build = $build;
|
||||
|
||||
@@ -394,6 +394,8 @@ class product extends control
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager(0, 30, 1);
|
||||
|
||||
$this->executeHooks($this->methodName, $productID);
|
||||
|
||||
$this->view->title = $product->name . $this->lang->colon . $this->lang->product->view;
|
||||
$this->view->position[] = html::a($this->createLink($this->moduleName, 'browse'), $product->name);
|
||||
$this->view->position[] = $this->lang->product->view;
|
||||
|
||||
@@ -276,6 +276,8 @@ class productplan extends control
|
||||
$orderBy = str_replace('id', 'order', $orderBy);
|
||||
}
|
||||
|
||||
$this->executeHooks($this->methodName, $planID);
|
||||
|
||||
if($plan->parent > 0) $this->view->parentPlan = $this->productplan->getById($plan->parent);
|
||||
if($plan->parent == '-1') $this->view->childrenPlans = $this->productplan->getChildren($plan->id);
|
||||
|
||||
|
||||
@@ -1441,6 +1441,8 @@ class project extends control
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager(0, 30, 1);
|
||||
|
||||
$this->executeHooks($this->methodName, $projectID);
|
||||
|
||||
$this->view->title = $this->lang->project->view;
|
||||
$this->view->position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name);
|
||||
$this->view->position[] = $this->view->title;
|
||||
|
||||
@@ -162,6 +162,8 @@ class release extends control
|
||||
$this->commonAction($release->product);
|
||||
$product = $this->product->getById($release->product);
|
||||
|
||||
$this->executeHooks($this->methodName, $releaseID);
|
||||
|
||||
$this->view->title = "RELEASE #$release->id $release->name/" . $product->name;
|
||||
$this->view->position[] = $this->lang->release->view;
|
||||
$this->view->release = $release;
|
||||
|
||||
@@ -705,6 +705,8 @@ class story extends control
|
||||
if($project->status == 'done') $from = '';
|
||||
}
|
||||
|
||||
$this->executeHooks($this->methodName, $storyID);
|
||||
|
||||
$title = "STORY #$story->id $story->title - $product->name";
|
||||
$position[] = html::a($this->createLink('product', 'browse', "product=$product->id&branch=$story->branch"), $product->name);
|
||||
$position[] = $this->lang->story->common;
|
||||
|
||||
@@ -606,6 +606,8 @@ class task extends control
|
||||
$project = $this->project->getById($task->project);
|
||||
$this->project->setMenu($this->project->getPairs(), $project->id);
|
||||
|
||||
$this->executeHooks($this->methodName, $taskID);
|
||||
|
||||
$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;
|
||||
|
||||
@@ -516,6 +516,8 @@ class testcase extends control
|
||||
->fetch('count');
|
||||
$case->caseFails = $caseFails;
|
||||
|
||||
$this->executeHooks($this->methodName, $caseID);
|
||||
|
||||
$this->view->position[] = $this->lang->testcase->common;
|
||||
$this->view->position[] = $this->lang->testcase->view;
|
||||
|
||||
|
||||
@@ -142,6 +142,8 @@ class testsuite extends control
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = pager::init($recTotal, $recPerPage, $pageID);
|
||||
|
||||
$this->executeHooks($this->methodName, $suiteID);
|
||||
|
||||
$this->view->title = "SUITE #$suite->id $suite->name/" . $this->products[$productID];
|
||||
$this->view->position[] = html::a($this->createLink('testsuite', 'browse', "productID=$productID"), $this->products[$productID]);
|
||||
$this->view->position[] = $this->lang->testsuite->common;
|
||||
|
||||
@@ -216,6 +216,8 @@ class testtask extends control
|
||||
|
||||
$this->testtask->setMenu($this->products, $productID, $task->branch, $taskID);
|
||||
|
||||
$this->executeHooks($this->methodName, $taskID);
|
||||
|
||||
$this->view->title = "TASK #$task->id $task->name/" . $this->products[$productID];
|
||||
$this->view->position[] = html::a($this->createLink('testtask', 'browse', "productID=$productID"), $this->products[$productID]);
|
||||
$this->view->position[] = $this->lang->testtask->common;
|
||||
|
||||
Reference in New Issue
Block a user