* code for remove isdoing param.
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
<div class="col-sm-7">
|
||||
<div class="panel block-files block-sm" style="height: 290px;">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title"><?php echo $lang->project->statusList['doing'] . $lang->projectCommon;?></div>
|
||||
<div class="panel-title"><?php echo $lang->project->undone . $lang->projectCommon;?></div>
|
||||
<nav class="panel-actions nav nav-default">
|
||||
<li><?php echo html::a($this->createLink('doc', 'allLibs', 'type=project'), '<i class="icon icon-more icon-sm"></i>', '', "title='{$lang->more}'");?></li>
|
||||
</nav>
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user