* adjust the code.

This commit is contained in:
chencongzhi520@gmail.com
2013-07-06 03:00:01 +00:00
parent 8386fa93a7
commit bcf35c4b7b
20 changed files with 84 additions and 86 deletions
+8 -1
View File
@@ -89,6 +89,12 @@ class projectModel extends model
$moduleName = $this->app->getModuleName();
$methodName = $this->app->getMethodName();
if($this->cookie->projectMode == 'noclosed' and $project->status == 'done')
{
setcookie('projectMode', 'all');
$this->cookie->projectMode = 'all';
}
$selectHtml = $this->select($projects, $projectID, $moduleName, $methodName, $extra);
foreach($this->lang->project->menu as $key => $menu)
{
@@ -433,7 +439,8 @@ class projectModel extends model
*/
public function getPairs($mode = '')
{
$orderBy = !empty($this->config->project->orderBy) ? $this->config->project->orderBy : 'isDone, status';
$orderBy = !empty($this->config->project->orderBy) ? $this->config->project->orderBy : 'isDone, status';
$mode .= $this->cookie->projectMode;
/* Order by status's content whether or not done */
$projects = $this->dao->select('*, IF(INSTR(" done", status) < 2, 0, 1) AS isDone')->from(TABLE_PROJECT)
->where('iscat')->eq(0)