diff --git a/module/action/model.php b/module/action/model.php index 5e203ed3de..510c61c9a2 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -1044,6 +1044,8 @@ class actionModel extends model if($this->app->getMethodName() == 'dynamic') $beginDate = $year - 1 . '-01-01'; } + $programCondition = empty($this->app->user->view->programs) ? '0' : $this->app->user->view->programs; + /* Get actions. */ $actions = $this->dao->select('*')->from(TABLE_ACTION) ->where('objectType')->notIN('kanbanregion,kanbanlane,kanbancolumn') @@ -1070,6 +1072,7 @@ class actionModel extends model ->beginIF($actionCondition)->andWhere("($actionCondition)")->fi() /* Filter out client login/logout actions. */ ->andWhere('action')->notin('disconnectxuanxuan,reconnectxuanxuan,loginxuanxuan,logoutxuanxuan') + ->andWhere("IF((objectType = 'program'), (objectID in ($programCondition)), '1=1')") ->orderBy($orderBy) ->page($pager) ->fetchAll(); @@ -1097,8 +1100,7 @@ class actionModel extends model foreach($this->app->user->rights['acls']['actions'] as $moduleName => $actions) { if(isset($this->lang->mainNav->$moduleName) and !empty($this->app->user->rights['acls']['views']) and !isset($this->app->user->rights['acls']['views'][$moduleName])) continue; - $canViewPrograms = $moduleName == 'program' ? "`objectID` in ({$this->app->user->view->programs}) and " : ''; - $actionCondition .= "($canViewPrograms `objectType` = '$moduleName' and `action` " . helper::dbIN($actions) . ") or "; + $actionCondition .= "(`objectType` = '$moduleName' and `action` " . helper::dbIN($actions) . ") or "; } $actionCondition = trim($actionCondition, 'or '); } diff --git a/module/bug/control.php b/module/bug/control.php index 03636cfd94..c375c21e42 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -108,7 +108,7 @@ class bug extends control /* Set browse type. */ $browseType = strtolower($browseType); - if($this->cookie->preProductID != $productID or $this->cookie->preBranch != $branch or $browseType == 'bybranch') + if($this->cookie->preProductID != $productID or ($this->cookie->preBranch != $branch and $product->type != 'normal' and $branch != 'all') or $browseType == 'bybranch') { $_COOKIE['bugModule'] = 0; setcookie('bugModule', 0, 0, $this->config->webRoot, '', $this->config->cookieSecure, false); diff --git a/module/programplan/view/gantt.html.php b/module/programplan/view/gantt.html.php index 86c3cfe0db..03992508db 100644 --- a/module/programplan/view/gantt.html.php +++ b/module/programplan/view/gantt.html.php @@ -15,10 +15,6 @@ createLink('programplan', 'ajaxCustom'));?> @@ -90,7 +91,8 @@ form {display: block; margin-top: 0em; margin-block-end: 1em;}