From 48713942650a4973426f6b2566ef96e802c09d4e Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Fri, 2 Jan 2015 15:48:38 -0500 Subject: [PATCH] Only add new settings if they aren't already there --- install/updateTo2-0-0.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install/updateTo2-0-0.php b/install/updateTo2-0-0.php index 941452f9..d9223a99 100644 --- a/install/updateTo2-0-0.php +++ b/install/updateTo2-0-0.php @@ -64,13 +64,18 @@ hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` SET //-- Add the new custom field property to modsForHesk_settings.inc.php $file = file_get_contents(HESK_PATH . 'modsForHesk_settings.inc.php'); -$file .= ' + +//-- Only add the additional settings if they aren't already there. +if (strpos($file, 'custom_field_setting') !== true) +{ + $file .= ' //-- Set this to 1 to enable custom field names as keys $modsForHesk_settings[\'custom_field_setting\'] = 0; //-- Set this to 1 to enable email verification for new customers $modsForHesk_settings[\'customer_email_verification_required\'] = 0;'; +} if (!file_put_contents(HESK_PATH.'modsForHesk_settings.inc.php', $file)) {