diff --git a/module/project/config.php b/module/project/config.php index b62d85647a..5b0fc7929f 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -1,6 +1,7 @@ project->projectCounts = 50; $config->project->defaultWorkhours = 7; +$config->project->orderBy = 'status, id desc'; global $lang, $app; $app->loadLang('task'); diff --git a/module/project/model.php b/module/project/model.php index dc25bdb5d9..ced7c31285 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -220,11 +220,12 @@ class projectModel extends model */ public function getPairs($mode = '') { - $mode .= $this->cookie->projectMode; + $orderBy = !empty($this->config->project->orderBy) ? $this->config->project->orderBy : 'status, id desc'; + $mode .= $this->cookie->projectMode; $projects = $this->dao->select('*')->from(TABLE_PROJECT) ->where('iscat')->eq(0) ->andWhere('deleted')->eq(0) - ->orderBy('status, id desc') + ->orderBy($orderBy) ->fetchAll(); $pairs = array(); foreach($projects as $project)