diff --git a/module/doc/model.php b/module/doc/model.php index 40970741fb..27173264de 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -999,7 +999,7 @@ class docModel extends model ->leftJoin(TABLE_DOCLIB)->alias('t3')->on("t1.lib=t3.id") ->where('t1.deleted')->eq(0) ->andWhere('t1.templateType')->eq('') - ->andWhere('t1.lib')->ne('') + ->andWhere('t1.lib')->ne(0) ->andWhere('t1.type')->in($this->config->doc->docTypes) ->andWhere('t1.vision')->eq($this->config->vision) ->andWhere('t2.id')->subIn($docSQL) @@ -1023,7 +1023,7 @@ class docModel extends model $docIdList = $type == 'editedby' ? $this->docTao->getEditedDocIdList() : array(); $docs = $this->dao->select('t1.*,t2.name as libName,t2.type as objectType')->from(TABLE_DOC)->alias('t1')->leftJoin(TABLE_DOCLIB)->alias('t2')->on("t1.lib=t2.id") ->where('t1.deleted')->eq(0) - ->andWhere('t1.lib')->ne('') + ->andWhere('t1.lib')->ne(0) ->andWhere('t1.templateType')->eq('') ->andWhere('t1.vision')->eq($this->config->vision) ->andWhere('t1.type')->in($this->config->doc->docTypes) @@ -2858,7 +2858,7 @@ class docModel extends model ->andWhere('t1.action')->eq('edited') ->andWhere('t1.actor')->eq($this->app->user->account) ->andWhere('t1.vision')->eq($this->config->vision) - ->andWhere('t2.lib')->ne('') + ->andWhere('t2.lib')->ne(0) ->andWhere('t2.deleted')->eq(0) ->andWhere('t2.type')->in($this->config->doc->docTypes) ->fetch('count'); @@ -2869,7 +2869,7 @@ class docModel extends model ->andWhere('templateType')->eq('') ->andWhere('deleted')->eq(0) ->andWhere('vision')->eq($this->config->vision) - ->andWhere('lib')->ne('') + ->andWhere('lib')->ne(0) ->fetch(); $statistic->myDocs = $myStatistic->myDocs; diff --git a/module/doc/tao.php b/module/doc/tao.php index 5b55ea093a..59e6e3d039 100644 --- a/module/doc/tao.php +++ b/module/doc/tao.php @@ -145,7 +145,7 @@ class docTao extends docModel return $this->dao->select('t1.*, t2.name as libName, t2.type as objectType')->from(TABLE_DOC)->alias('t1') ->leftJoin(TABLE_DOCLIB)->alias('t2')->on("t1.lib=t2.id") ->where('t1.deleted')->eq(0) - ->andWhere('t1.lib')->ne('') + ->andWhere('t1.lib')->ne(0) ->andWhere('t1.id')->in($hasPrivDocIdList) ->beginIF($this->config->doc->notArticleType)->andWhere('t1.type')->notIN($this->config->doc->notArticleType)->fi() ->andWhere('t1.addedBy')->eq($this->app->user->account) @@ -178,7 +178,7 @@ class docTao extends docModel ->leftJoin(TABLE_DOCLIB)->alias('t2')->on("t1.lib=t2.id") ->where('t1.deleted')->eq(0) ->andWhere('t1.id')->in(array_keys($docIdList)) - ->andWhere('t1.lib')->ne('') + ->andWhere('t1.lib')->ne(0) ->andWhere('t1.vision')->in($this->config->vision) ->beginIF($this->config->doc->notArticleType)->andWhere('t1.type')->notIN($this->config->doc->notArticleType)->fi() ->orderBy($sort) @@ -225,7 +225,7 @@ class docTao extends docModel return $this->dao->select('t1.*')->from(TABLE_DOC)->alias('t1') ->leftJoin(TABLE_DOCACTION)->alias('t2')->on("t1.id=t2.doc && t2.action='collect'") ->where('t1.deleted')->eq(0) - ->andWhere('t1.lib')->ne('') + ->andWhere('t1.lib')->ne(0) ->andWhere('t1.templateType')->eq('') ->andWhere('t1.id')->in($hasPrivDocIdList) ->beginIF($this->config->doc->notArticleType)->andWhere('t1.type')->notIN($this->config->doc->notArticleType)->fi() diff --git a/module/upgrade/model.php b/module/upgrade/model.php index de543c2e50..7f01ff27d6 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -10996,7 +10996,7 @@ class upgradeModel extends model ->leftJoin(TABLE_DOCCONTENT)->alias('t2')->on('t1.id = t2.doc && t1.version = t2.version') ->where('t1.deleted')->eq(0) ->andWhere('t1.templateType')->ne('') - ->andWhere('t1.lib')->eq('') + ->andWhere('t1.lib')->eq(0) ->andWhere('t1.module')->eq('') ->fetchAll('id', false); if(empty($templateList)) return array();