Only add new settings if they aren't already there

This commit is contained in:
Mike Koch 2015-01-02 15:48:38 -05:00
parent 1a663324e3
commit 4871394265

View File

@ -64,6 +64,10 @@ 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');
//-- 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
@ -71,6 +75,7 @@ $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))
{