diff --git a/module/doc/model.php b/module/doc/model.php index f330e9e424..fc6444b57b 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -405,6 +405,23 @@ class docModel extends model return $doc; } + /** + * Get docs info by id list. + * + * @param array $docIdList + * @access public + * @return array + */ + public function getByIdList($docIdList = array()) + { + return $this->dao->select('*,t1.id as docID,t1.type as docType,t2.type as contentType')->from(TABLE_DOC)->alias('t1') + ->leftJoin(TABLE_DOCCONTENT)->alias('t2')->on('t1.id=t2.doc and t1.version=t2.version') + ->where('t1.id')->in($docIdList) + ->andWhere('deleted')->eq(0) + ->fetchAll('id'); + + } + /** * Create a doc. *