From 99f9d657cb5b82e8f4940cd0f7839d3c8eb855d5 Mon Sep 17 00:00:00 2001 From: Louis BAYLE Date: Sat, 1 Apr 2017 22:22:19 +0200 Subject: [PATCH] FIX upgrade from prior version --- classes/constants.class.php | 10 ++++++++-- config.ini.sample | 3 --- tools/update_codevtt.php | 5 ----- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/classes/constants.class.php b/classes/constants.class.php index a686fa449..b1a32cafc 100644 --- a/classes/constants.class.php +++ b/classes/constants.class.php @@ -200,8 +200,14 @@ public static function parseConfigFile() { self::$bug_resolved_status_threshold = $mantis['bug_resolved_status_threshold']; self::$status_enum_workflow = json_decode($mantis['status_enum_workflow'], true); // jsonStr to array - self::$mantis_db_table_prefix = $mantis['db_table_prefix']; - self::$mantis_db_table_suffix = $mantis['db_table_suffix']; + if ( !empty($mantis['db_table_prefix'])) { + // variable not set: config.ini file is prior to v1.2.1 + self::$mantis_db_table_prefix = $mantis['db_table_prefix']; + } + if ( !empty($mantis['db_table_suffix'])) { + // variable not set: config.ini file is prior to v1.2.1 + self::$mantis_db_table_suffix = $mantis['db_table_suffix']; + } if ( !empty( self::$mantis_db_table_prefix ) && ('_' != substr( self::$mantis_db_table_prefix, -1 )) ) { self::$mantis_db_table_prefix .= '_'; } diff --git a/config.ini.sample b/config.ini.sample index c540657a5..6bb9a9230 100644 --- a/config.ini.sample +++ b/config.ini.sample @@ -61,11 +61,8 @@ max_tooltips_per_page = 500 logo_image_0207_0214 = "images/codevtt_logo_03_stvalentin.png" logo_image_0317_0317 = "images/codevtt_logo_03_stpatrick.jpg" logo_image_0401_0401 = "images/codevtt_logo_03_april_1st.jpg" -logo_image_0421_0425 = "images/codevtt_logo_03_easter.png" logo_image_1031_1031 = "images/codevtt_logo_03_halloween.png" logo_image_1220_1227 = "images/codevtt_logo_03_christmas.png" -;logo_image_1231_1231 = "images/codevtt_logo_03_happynewyear.png" -;logo_image_0101_0106 = "images/codevtt_logo_03_happynewyear.png" [timesheets] ; value:displayed_text diff --git a/tools/update_codevtt.php b/tools/update_codevtt.php index 179004030..21d0d6be3 100644 --- a/tools/update_codevtt.php +++ b/tools/update_codevtt.php @@ -524,11 +524,6 @@ function update_v16_to_v17() { $query5 = "UPDATE `codev_config_table` SET `value`='17' WHERE `config_id`='database_version';"; execQuery($query5); - // activate new plugin UserTeamList - $query6 = "INSERT INTO `codev_plugin_table` (`name`, `status`, `domains`, `categories`, `version`, `description`) ". - "VALUES ('UserTeamList', 1, 'Admin', 'Admin', '1.0.0', 'Display a history of all the teams for a given user');"; - execQuery($query6); - } // ======================================================