X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Fadmin%2Fwhat-config_surfbar.php;h=638ae2796079a89f23b3d9202656ba1262ff51e5;hb=e9da1508b2a3ccbf63adc999981674740a47e074;hp=f0213cd06c69f7537d705f6b20f6263911c2c9d6;hpb=73e9d78e610057f6c6d311328b3ad438ad017791;p=mailer.git diff --git a/inc/modules/admin/what-config_surfbar.php b/inc/modules/admin/what-config_surfbar.php index f0213cd06c..638ae27960 100644 --- a/inc/modules/admin/what-config_surfbar.php +++ b/inc/modules/admin/what-config_surfbar.php @@ -16,8 +16,8 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2015 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -44,11 +44,9 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Was the form submitted? -if (isFormSent()) { +if (isFormSent('save_config')) { // Replace german decimal comma with computer decimal dot - if (isPostRequestParameterSet('surfbar_static_reward')) setPostRequestParameter('surfbar_static_reward' , convertCommaToDot(postRequestParameter('surfbar_static_reward'))); - if (isPostRequestParameterSet('surfbar_static_costs')) setPostRequestParameter('surfbar_static_costs' , convertCommaToDot(postRequestParameter('surfbar_static_costs'))); - if (isPostRequestParameterSet('surfbar_dynamic_percent')) setPostRequestParameter('surfbar_dynamic_percent', convertCommaToDot(postRequestParameter('surfbar_dynamic_percent'))); + convertCommaToDotInPostDataArray(array('surfbar_static_reward', 'surfbar_static_costs', 'surfbar_dynamic_percent')); // Save settings adminSaveSettingsFromPostData(); @@ -64,25 +62,16 @@ if (isFormSent()) { 'surfbar_low_interval' => createConfigurationTimeSelections('surfbar_low_interval' , 'WDh', 'left'), ); - // Prepare further Y/N config entries - foreach (array('surfbar_autostart','surfbar_notify_limits','surfbar_notify_admin_unlock','surfbar_migrate_order','surfbar_guest_login_form') as $entry) { - $content[$entry . '_y'] = ''; - $content[$entry . '_n'] = ''; - $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"'; - } // END - foreach - // Even some more... - foreach (array('surfbar_pay_model_static','surfbar_pay_model_dynamic','surfbar_pause_mode_internal','surfbar_pause_mode_external','surfbar_notification_mode_instant','surfbar_notification_mode_reset') as $entry) { + foreach (array('surfbar_payment_model_static','surfbar_payment_model_dynamic','surfbar_pause_mode_internal','surfbar_pause_mode_external','surfbar_notification_mode_instant','surfbar_notification_mode_reset') as $entry) { $content[$entry] = ''; } // END - foreach // Prepare selections - foreach (array('surfbar_pay_model','surfbar_pause_mode','surfbar_notification_mode') as $entry) { - $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"'; - } // END - foreach + $content = merge_array($content, getCheckedConfig(array('surfbar_payment_model','surfbar_pause_mode','surfbar_notification_mode'))); // Load template - loadTemplate('admin_config_surfbar', false, $content); + loadTemplate('admin_config_surfbar', FALSE, $content); } // [EOF]