diff --git a/module/backup/control.php b/module/backup/control.php index 438d340732..b56fd98267 100644 --- a/module/backup/control.php +++ b/module/backup/control.php @@ -203,17 +203,17 @@ class backup extends control $this->backup->removeFileHeader($fileBackup); $result = $this->backup->restoreFile($fileBackup); $this->backup->addFileHeader($fileBackup); - if(!$result->result) $this->send(array('result' => 'fail', 'message' => sprintf($this->lang->backup->error->resotreFile, $result->error))); + if(!$result->result) $this->send(array('result' => 'fail', 'message' => sprintf($this->lang->backup->error->restoreFile, $result->error))); } elseif(file_exists("{$this->backupPath}{$fileName}.file.zip")) { $result = $this->backup->restoreFile("{$this->backupPath}{$fileName}.file.zip"); - if(!$result->result) $this->send(array('result' => 'fail', 'message' => sprintf($this->lang->backup->error->resotreFile, $result->error))); + if(!$result->result) $this->send(array('result' => 'fail', 'message' => sprintf($this->lang->backup->error->restoreFile, $result->error))); } elseif(file_exists("{$this->backupPath}{$fileName}.file")) { $result = $this->backup->restoreFile("{$this->backupPath}{$fileName}.file"); - if(!$result->result) $this->send(array('result' => 'fail', 'message' => sprintf($this->lang->backup->error->resotreFile, $result->error))); + if(!$result->result) $this->send(array('result' => 'fail', 'message' => sprintf($this->lang->backup->error->restoreFile, $result->error))); } $this->send(array('result' => 'success', 'message' => $this->lang->backup->success->restore)); diff --git a/module/backup/model.php b/module/backup/model.php index 060c63bc3c..25555b8c87 100644 --- a/module/backup/model.php +++ b/module/backup/model.php @@ -160,7 +160,7 @@ class backupModel extends model chdir($this->app->getTmpRoot()); $this->app->loadClass('pclzip', true); $zip = new pclzip($backupFile); - if($zip->extract(PCLZIP_OPT_PATH, $this->app->getAppRoot() . 'www/data/') == 0) + if($zip->extract(PCLZIP_OPT_PATH, $this->app->getAppRoot() . 'www/data/', PCLZIP_OPT_TEMP_FILE_ON) == 0) { $return->result = false; $return->error = $zip->errorInfo(); diff --git a/module/doc/control.php b/module/doc/control.php index 92b9bcac0a..012847d16f 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -55,7 +55,7 @@ class doc extends control $this->view->myDocs = $this->loadModel('doc')->getDocsByBrowseType(0, 'openedbyme', 0, 0, 'addedDate_desc', $pager); $this->view->statisticInfo = $this->doc->getStatisticInfo(); $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->doingProjects = $this->loadModel('project')->getList('isdoing', 5); + $this->view->doingProjects = $this->loadModel('project')->getList('undone', 5); $this->display(); } diff --git a/module/doc/view/index.html.php b/module/doc/view/index.html.php index a87bbfa583..972cda6ad9 100644 --- a/module/doc/view/index.html.php +++ b/module/doc/view/index.html.php @@ -125,7 +125,7 @@
-
project->statusList['doing'] . $lang->projectCommon;?>
+
project->undone . $lang->projectCommon;?>
diff --git a/module/project/model.php b/module/project/model.php index ab64d68ebb..61cb5f84d8 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -736,8 +736,7 @@ class projectModel extends model ->andWhere('t2.iscat')->eq(0) ->beginIF($status == 'undone')->andWhere('t2.status')->ne('done')->andWhere('t2.status')->ne('closed')->fi() ->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi() - ->beginIF($status == 'isdoing')->andWhere('t2.status')->ne('done')->andWhere('t2.status')->ne('suspended')->andWhere('t2.status')->ne('closed')->fi() - ->beginIF($status != 'all' and $status != 'isdoing' and $status != 'undone')->andWhere('status')->in($status)->fi() + ->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->fi() ->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->projects)->fi() ->orderBy('order_desc') ->beginIF($limit)->limit($limit)->fi() @@ -747,8 +746,7 @@ class projectModel extends model { return $this->dao->select('*, IF(INSTR(" done,closed", status) < 2, 0, 1) AS isDone')->from(TABLE_PROJECT)->where('iscat')->eq(0) ->beginIF($status == 'undone')->andWhere('status')->ne('done')->andWhere('status')->ne('closed')->fi() - ->beginIF($status == 'isdoing')->andWhere('status')->ne('done')->andWhere('status')->ne('suspended')->andWhere('status')->ne('closed')->fi() - ->beginIF($status != 'all' and $status != 'isdoing' and $status != 'undone')->andWhere('status')->in($status)->fi() + ->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->fi() ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi() ->andWhere('deleted')->eq(0) ->orderBy('order_desc')