* Finish task #44987,44988,44989.

This commit is contained in:
mayue
2021-11-30 10:32:11 +08:00
parent 19d489a645
commit d89aa24c8c
3 changed files with 10 additions and 7 deletions
+9 -5
View File
@@ -217,8 +217,12 @@ class execution extends control
$tasks = $this->execution->getTasks($productID, $executionID, $this->executions, $browseType, $queryID, $moduleID, $sort, $pager);
}
$productModules = $this->tree->getById($moduleID);
$product = $this->product->getById(!empty($productID) ? $productID : (!empty($productModules) ? $productModules->root : 0));
$product = $this->product->getById($productID);
if(empty($productID))
{
$productModule = $this->tree->getById($moduleID);
$product = $this->product->getById((!empty($productModule) ? $productModule->root : 0));
}
if(!empty($product) and $product->type != 'normal')
{
$this->lang->datatable->showBranch = sprintf($this->lang->datatable->showBranch, $this->lang->product->branchName[$product->type]);
@@ -790,10 +794,10 @@ class execution extends control
if($this->cookie->storyModuleParam)
{
$modules = $this->loadModel('tree')->getById($this->cookie->storyModuleParam);
$this->view->module = $modules;
$module = $this->loadModel('tree')->getById($this->cookie->storyModuleParam);
$this->view->module = $module;
$product = $this->product->getById($modules->root);
$product = $this->product->getById($module->root);
$this->lang->datatable->showBranch = sprintf($this->lang->datatable->showBranch, $this->lang->product->branchName[$product->type]);
}