fixbug_createTask

This commit is contained in:
sunjun
2022-07-08 02:02:22 +00:00
parent a97b35f2bc
commit f7400480d4
2 changed files with 9 additions and 3 deletions
+6 -1
View File
@@ -113,13 +113,18 @@ class deptModel extends model
krsort($deptMenu);
$topMenu = array_pop($deptMenu);
$topMenu = explode("\n", trim((string)$topMenu));
$lastMenu[] = '/' . $this->lang->dept->noDepartment;
$lastMenu[] = '/';
foreach($topMenu as $menu)
{
if(!strpos($menu, '|')) continue;
list($label, $deptID) = explode('|', $menu);
$lastMenu[$deptID] = $label;
}
if($this->app->tab == 'report')
{
unset($lastMenu[0]);
$lastMenu[] = '/' . $this->lang->dept->noDepartment;
}
return $lastMenu;
}
+3 -2
View File
@@ -44,9 +44,10 @@ class task extends control
$extra = str_replace(array(',', ' '), array('&', ''), $extra);
parse_str($extra, $output);
$execution = $this->execution->getById($executionID);
$executions = $this->execution->getPairs(0, 'all', !common::canModify('execution', $execution) ? 'noclosed' : '');
if(!empty($executionID)) $execution = $this->execution->getById($executionID);
$executions = $this->execution->getPairs(0, 'all', isset($execution) ? (!common::canModify('execution', $execution) ? 'noclosed' : '') : 'noclosed');
$executionID = $this->execution->saveState($executionID, $executions);
$execution = $this->execution->getById($executionID);
$this->execution->setMenu($executionID);
$this->execution->getLimitedExecution();