diff --git a/VERSION b/VERSION index d00d9ba64a..8eaaba3530 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.2.6 +8.3.stable diff --git a/config/config.php b/config/config.php index 8820ae3218..f37fd929c1 100644 --- a/config/config.php +++ b/config/config.php @@ -17,7 +17,7 @@ if(!function_exists('getWebRoot')){function getWebRoot(){}} /* Basic settings. */ $config = new config(); -$config->version = '8.2.6'; // The version of zentaopms. Don't change it. +$config->version = '8.3'; // The version of zentaopms. Don't change it. $config->charset = 'UTF-8'; // The charset of zentaopms. $config->cookieLife = time() + 2592000; // The cookie life time. $config->timezone = 'Asia/Shanghai'; // The time zone setting, for more see http://www.php.net/manual/en/timezones.php diff --git a/module/upgrade/lang/en.php b/module/upgrade/lang/en.php index 45f2bd7c8b..9f12ca27c7 100644 --- a/module/upgrade/lang/en.php +++ b/module/upgrade/lang/en.php @@ -107,3 +107,4 @@ $lang->upgrade->fromVersions['8_2_2'] = '8.2.2'; $lang->upgrade->fromVersions['8_2_3'] = '8.2.3'; $lang->upgrade->fromVersions['8_2_4'] = '8.2.4'; $lang->upgrade->fromVersions['8_2_5'] = '8.2.5'; +$lang->upgrade->fromVersions['8_2_6'] = '8.2.6'; diff --git a/module/upgrade/lang/zh-cn.php b/module/upgrade/lang/zh-cn.php index ce58e80579..c93b0fa66b 100644 --- a/module/upgrade/lang/zh-cn.php +++ b/module/upgrade/lang/zh-cn.php @@ -107,3 +107,4 @@ $lang->upgrade->fromVersions['8_2_2'] = '8.2.2'; $lang->upgrade->fromVersions['8_2_3'] = '8.2.3'; $lang->upgrade->fromVersions['8_2_4'] = '8.2.4'; $lang->upgrade->fromVersions['8_2_5'] = '8.2.5'; +$lang->upgrade->fromVersions['8_2_6'] = '8.2.6'; diff --git a/module/upgrade/model.php b/module/upgrade/model.php index fa49847e27..40e7ca279c 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -148,6 +148,11 @@ class upgradeModel extends model case '8_2_3': case '8_2_4': case '8_2_5': + case '8_2_6': + $this->execSQL($this->getUpgradeFile('8.2.1')); + $this->adjustDocModule(); + $this->updateFileObjectID(); + $this->moveDocContent(); default: if(!$this->isError()) $this->setting->updateVersion($this->config->version); } @@ -231,6 +236,7 @@ class upgradeModel extends model case '8_2_3': case '8_2_4': case '8_2_5': + case '8_2_6': $confirmContent .= file_get_contents($this->getUpgradeFile('8.2.6')); } return str_replace('zt_', $this->config->db->prefix, $confirmContent); } @@ -1304,6 +1310,15 @@ class upgradeModel extends model */ public function moveDocContent() { + $descDoc = $this->dao->query('DESC ' . TABLE_DOC)->fetchAll(); + $processFields = 0; + foreach($descDoc as $field) + { + if($field->Field == 'content' or $field->Field == 'digest' or $field->Field == 'url') $processFields ++; + } + if($processFields < 3) return true; + + $this->dao->exec('TRUNCATE TABLE ' . TABLE_DOCCONTENT); $stmt = $this->dao->select('id,title,digest,content,url')->from(TABLE_DOC)->query(); $fileGroups = $this->dao->select('id,objectID')->from(TABLE_FILE)->where('objectType')->eq('doc')->fetchGroup('objectID', 'id');