diff --git a/module/tree/model.php b/module/tree/model.php index a023e06342..b0aeeb7baa 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -1684,7 +1684,7 @@ class treeModel extends model */ public function getDocStructure() { - $stmt = $this->dbh->query($this->dao->select('*')->from(TABLE_MODULE)->where('type')->eq('doc')->andWhere('deleted')->eq(0)->orderBy('`order`')->get()); + $stmt = $this->dbh->query($this->dao->select('*')->from(TABLE_MODULE)->where('type')->eq('doc')->andWhere('deleted')->eq(0)->orderBy('`grade`_desc, `order`')->get()); $parent = array(); while($module = $stmt->fetch()) { diff --git a/module/upgrade/model.php b/module/upgrade/model.php index edc1647901..9080cdb5b9 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -374,6 +374,18 @@ class upgradeModel extends model case '11_4': $this->saveLogs('Execute 11_4'); $this->execSQL($this->getUpgradeFile('11.4')); + case '11_4_1': + $this->saveLogs('Execute 11_4'); + if(!isset($this->config->isINT) or !($this->config->isINT)) + { + if(!$executeXuanxuan) + { + $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.4.0.sql'; + $this->execSQL($xuanxuanSql); + $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.5.0.sql'; + $this->execSQL($xuanxuanSql); + } + } } $this->deletePatch(); @@ -506,6 +518,14 @@ class upgradeModel extends model case '11_2': $confirmContent .= file_get_contents($this->getUpgradeFile('11.2')); case '11_3': $confirmContent .= file_get_contents($this->getUpgradeFile('11.3')); case '11_4': $confirmContent .= file_get_contents($this->getUpgradeFile('11.4')); + case '11_4_1': + if(!isset($this->config->isINT) or !($this->config->isINT)) + { + $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.4.0.sql'; + $confirmContent .= file_get_contents($xuanxuanSql); + $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.5.0.sql'; + $confirmContent .= file_get_contents($xuanxuanSql); + } } return str_replace('zt_', $this->config->db->prefix, $confirmContent); }