diff --git a/module/upgrade/model.php b/module/upgrade/model.php index ad2f27e441..f543f9c872 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -10660,7 +10660,7 @@ class upgradeModel extends model */ public function getUpgradeDocs(): array { - $docs = $this->dao->select('t1.*,t2.title,t2.content,t2.type as contentType,t2.rawContent,t1.version')->from(TABLE_DOC)->alias('t1') + $docs = $this->dao->select('t1.*,t2.title,t2.content,t2.type AS contentType,t2.rawContent,t1.version')->from(TABLE_DOC)->alias('t1') ->leftJoin(TABLE_DOCCONTENT)->alias('t2')->on('t1.id=t2.doc && t1.version=t2.version') ->where('t2.type')->in(array('doc', 'html')) ->andWhere('t1.status')->ne('draft') @@ -10947,7 +10947,7 @@ class upgradeModel extends model */ public function getUpgradeDocTemplates(): array { - $templateList = $this->dao->select('t1.*, t2.title, t2.content, t2.type as contentType, t1.version')->from(TABLE_DOC)->alias('t1') + $templateList = $this->dao->select('t1.*, t2.title, t2.content, t2.type AS contentType, t1.version')->from(TABLE_DOC)->alias('t1') ->leftJoin(TABLE_DOCCONTENT)->alias('t2')->on('t1.id = t2.doc && t1.version = t2.version') ->where('t1.deleted')->eq(0) ->andWhere('t1.templateType')->ne('') @@ -11057,7 +11057,7 @@ class upgradeModel extends model */ public function convertWiki2Html(int $bookID = 0, int $nodeID = 0): string { - $template = $this->dao->select('t1.*, t2.content as content')->from(TABLE_DOC)->alias('t1') + $template = $this->dao->select('t1.*, t2.content AS content')->from(TABLE_DOC)->alias('t1') ->leftJoin(TABLE_DOCCONTENT)->alias('t2')->on('t1.id = t2.doc') ->where('t1.id')->eq($nodeID ? $nodeID : $bookID) ->fetch();