Skip to content

Commit 99f9d65

Browse files
committed
FIX upgrade from prior version
1 parent 7974346 commit 99f9d65

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

classes/constants.class.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,14 @@ public static function parseConfigFile() {
200200
self::$bug_resolved_status_threshold = $mantis['bug_resolved_status_threshold'];
201201
self::$status_enum_workflow = json_decode($mantis['status_enum_workflow'], true); // jsonStr to array
202202

203-
self::$mantis_db_table_prefix = $mantis['db_table_prefix'];
204-
self::$mantis_db_table_suffix = $mantis['db_table_suffix'];
203+
if ( !empty($mantis['db_table_prefix'])) {
204+
// variable not set: config.ini file is prior to v1.2.1
205+
self::$mantis_db_table_prefix = $mantis['db_table_prefix'];
206+
}
207+
if ( !empty($mantis['db_table_suffix'])) {
208+
// variable not set: config.ini file is prior to v1.2.1
209+
self::$mantis_db_table_suffix = $mantis['db_table_suffix'];
210+
}
205211
if ( !empty( self::$mantis_db_table_prefix ) && ('_' != substr( self::$mantis_db_table_prefix, -1 )) ) {
206212
self::$mantis_db_table_prefix .= '_';
207213
}

config.ini.sample

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,8 @@ max_tooltips_per_page = 500
6161
logo_image_0207_0214 = "images/codevtt_logo_03_stvalentin.png"
6262
logo_image_0317_0317 = "images/codevtt_logo_03_stpatrick.jpg"
6363
logo_image_0401_0401 = "images/codevtt_logo_03_april_1st.jpg"
64-
logo_image_0421_0425 = "images/codevtt_logo_03_easter.png"
6564
logo_image_1031_1031 = "images/codevtt_logo_03_halloween.png"
6665
logo_image_1220_1227 = "images/codevtt_logo_03_christmas.png"
67-
;logo_image_1231_1231 = "images/codevtt_logo_03_happynewyear.png"
68-
;logo_image_0101_0106 = "images/codevtt_logo_03_happynewyear.png"
6966

7067
[timesheets]
7168
; value:displayed_text

tools/update_codevtt.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -524,11 +524,6 @@ function update_v16_to_v17() {
524524
$query5 = "UPDATE `codev_config_table` SET `value`='17' WHERE `config_id`='database_version';";
525525
execQuery($query5);
526526

527-
// activate new plugin UserTeamList
528-
$query6 = "INSERT INTO `codev_plugin_table` (`name`, `status`, `domains`, `categories`, `version`, `description`) ".
529-
"VALUES ('UserTeamList', 1, 'Admin', 'Admin', '1.0.0', 'Display a history of all the teams for a given user');";
530-
execQuery($query6);
531-
532527
}
533528

534529
// ======================================================

0 commit comments

Comments
 (0)