diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 43cf0660c3..c8ab0aa00e 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -461,28 +461,29 @@ class upgradeModel extends model set_time_limit(0); $this->updateActivatedDate(); + if(!empty($this->config->isINT)) + { + $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'xuanxuan.sql'; + $this->execSQL($xuanxuanSql); + $executedXuanxuan = true; + } + else + { + if(!$executedXuanxuan) + { + $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan4.6.sql'; + $this->execSQL($xuanxuanSql); + $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan5.1.sql'; + $this->execSQL($xuanxuanSql); + } + } + switch($fromEdition) { case 'open': $this->execSQL($this->getUpgradeFile('proinstall')); case 'pro': $this->execSQL($this->getUpgradeFile('bizinstall')); - if(!empty($this->config->isINT)) - { - $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'xuanxuan.sql'; - $this->execSQL($xuanxuanSql); - $executedXuanxuan = true; - } - else - { - if(!$executedXuanxuan) - { - $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan4.6.sql'; - $this->execSQL($xuanxuanSql); - $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan5.1.sql'; - $this->execSQL($xuanxuanSql); - } - } case 'biz': $this->execSQL($this->getUpgradeFile('maxinstall')); $this->execSQL($this->getUpgradeFile('functions'));