* Fix bug #37427.
This commit is contained in:
@@ -422,6 +422,7 @@ class docModel extends model
|
||||
$docIDList = $this->dao->select('objectID')->from(TABLE_ACTION)
|
||||
->where('objectType')->eq('doc')
|
||||
->andWhere('objectID')->in($hasPrivDocIdList)
|
||||
->andWhere('templateType')->eq('')
|
||||
->andWhere('actor')->eq($this->app->user->account)
|
||||
->andWhere('action')->eq('edited')
|
||||
->fetchAll('objectID');
|
||||
@@ -430,6 +431,7 @@ class docModel extends model
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere($query)
|
||||
->andWhere('t1.lib')->in($allLibIDList)
|
||||
->andWhere('t1.templateType')->eq('')
|
||||
->andWhere('t1.vision')->in($this->config->vision)
|
||||
->beginIF($this->config->doc->notArticleType)->andWhere('t1.type')->notIN($this->config->doc->notArticleType)->fi()
|
||||
->andWhere('t1.addedBy', 1)->eq($this->app->user->account)
|
||||
@@ -449,6 +451,7 @@ class docModel extends model
|
||||
->beginIF($this->config->doc->notArticleType)->andWhere('t1.type')->notIN($this->config->doc->notArticleType)->fi()
|
||||
->andWhere('t1.addedBy')->eq($this->app->user->account)
|
||||
->andWhere('t1.vision')->in($this->config->vision)
|
||||
->andWhere('t1.templateType')->eq('')
|
||||
->orderBy($sort)
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
@@ -468,6 +471,7 @@ class docModel extends model
|
||||
->andWhere('t1.id')->in(array_keys($docIdList))
|
||||
->andWhere('t1.lib')->ne('')
|
||||
->andWhere('t1.vision')->in($this->config->vision)
|
||||
->andWhere('t1.templateType')->eq('')
|
||||
->beginIF($this->config->doc->notArticleType)->andWhere('t1.type')->notIN($this->config->doc->notArticleType)->fi()
|
||||
->orderBy($sort)
|
||||
->page($pager)
|
||||
@@ -478,6 +482,7 @@ class docModel extends model
|
||||
$docs = $this->dao->select('*')->from(TABLE_DOC)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('id')->in($hasPrivDocIdList)
|
||||
->andWhere('templateType')->eq('')
|
||||
->beginIF($this->config->doc->notArticleType)->andWhere('type')->notIN($this->config->doc->notArticleType)->fi()
|
||||
->andWhere('lib')->in($allLibIDList)
|
||||
->andWhere('vision')->in($this->config->vision)
|
||||
@@ -491,6 +496,7 @@ class docModel extends model
|
||||
->leftJoin(TABLE_DOCACTION)->alias('t2')->on("t1.id=t2.doc && t2.action='collect'")
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t1.lib')->ne('')
|
||||
->andWhere('t1.templateType')->eq('')
|
||||
->andWhere('t1.id')->in($hasPrivDocIdList)
|
||||
->beginIF($this->config->doc->notArticleType)->andWhere('t1.type')->notIN($this->config->doc->notArticleType)->fi()
|
||||
->andWhere('t2.actor')->eq($this->app->user->account)
|
||||
@@ -619,6 +625,7 @@ class docModel extends model
|
||||
$docs = $this->dao->select('*')->from(TABLE_DOC)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('vision')->eq($this->config->vision)
|
||||
->andWhere('templateType')->eq('')
|
||||
->andWhere('id')->in($docIdList)
|
||||
->beginIF($browseType == 'all')->andWhere("(status = 'normal' or (status = 'draft' and addedBy='{$this->app->user->account}'))")->fi()
|
||||
->beginIF($browseType == 'draft')->andWhere('status')->eq('draft')->andWhere('addedBy')->eq($this->app->user->account)->fi()
|
||||
@@ -746,6 +753,7 @@ class docModel extends model
|
||||
$modules = $module && $mode == 'children' ? $this->loadModel('tree')->getAllChildID($module) : $module;
|
||||
$stmt = $this->dao->select('*')->from(TABLE_DOC)
|
||||
->where('vision')->eq($this->config->vision)
|
||||
->andWhere('templateType')->eq('')
|
||||
->beginIF(!empty($modules))->andWhere('module')->in($modules)->fi()
|
||||
->beginIF($mode == 'normal')->andWhere('deleted')->eq(0)->fi()
|
||||
->beginIF($this->config->doc->notArticleType)->andWhere('type')->notIN($this->config->doc->notArticleType)->fi()
|
||||
|
||||
Reference in New Issue
Block a user