]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_surfbar.php
New naming convention applied to many functions, see #118 for details
[mailer.git] / inc / modules / admin / what-config_surfbar.php
index ac629fb3f57694d4ae1953393f1c28cf69e3cf20..ee4f738d1dfe04e500e082dc897068d4cb0eec16 100644 (file)
@@ -48,32 +48,32 @@ ADD_DESCR('admin', __FILE__);
 // Was the form submitted?
 if (IS_FORM_SENT()) {
        // Replace german decimal comma with computer decimal dot
-       if (REQUEST_ISSET_POST(('surfbar_static_reward')))   REQUEST_SET_POST('surfbar_static_reward'  , REVERT_COMMA(REQUEST_POST('surfbar_static_reward')));
-       if (REQUEST_ISSET_POST(('surfbar_static_costs')))    REQUEST_SET_POST('surfbar_static_costs'   , REVERT_COMMA(REQUEST_POST('surfbar_static_costs')));
-       if (REQUEST_ISSET_POST(('surfbar_dynamic_percent'))) REQUEST_SET_POST('surfbar_dynamic_percent', REVERT_COMMA(REQUEST_POST('surfbar_dynamic_percent')));
+       if (REQUEST_ISSET_POST(('surfbar_static_reward')))   REQUEST_SET_POST('surfbar_static_reward'  , convertCommaToDot(REQUEST_POST('surfbar_static_reward')));
+       if (REQUEST_ISSET_POST(('surfbar_static_costs')))    REQUEST_SET_POST('surfbar_static_costs'   , convertCommaToDot(REQUEST_POST('surfbar_static_costs')));
+       if (REQUEST_ISSET_POST(('surfbar_dynamic_percent'))) REQUEST_SET_POST('surfbar_dynamic_percent', convertCommaToDot(REQUEST_POST('surfbar_dynamic_percent')));
 
        // Save settings
        ADMIN_SAVE_SETTINGS_POST();
 } else {
        // Prepare content
        $content = array(
-               'surfbar_static_reward'   => TRANSLATE_COMMA(getConfig('surfbar_static_reward')),
-               'surfbar_static_costs'    => TRANSLATE_COMMA(getConfig('surfbar_static_costs')),
-               'surfbar_static_time'     => CREATE_TIME_SELECTIONS(getConfig('surfbar_static_time')   , "surfbar_static_time"   , "ms" , "left"),
-               'surfbar_static_lock'     => CREATE_TIME_SELECTIONS(getConfig('surfbar_static_lock')   , "surfbar_static_lock"   , "hm" , "left"),
-               'surfbar_restart_time'    => CREATE_TIME_SELECTIONS(getConfig('surfbar_restart_time')  , "surfbar_restart_time"  , "ms" , "left"),
-               'surfbar_dynamic_percent' => TRANSLATE_COMMA(getConfig('surfbar_dynamic_percent')),
+               'surfbar_static_reward'   => translateComma(getConfig('surfbar_static_reward')),
+               'surfbar_static_costs'    => translateComma(getConfig('surfbar_static_costs')),
+               'surfbar_static_time'     => createTimeSelections(getConfig('surfbar_static_time')   , 'surfbar_static_time'   , 'ms' , 'left'),
+               'surfbar_static_lock'     => createTimeSelections(getConfig('surfbar_static_lock')   , 'surfbar_static_lock'   , 'hm' , 'left'),
+               'surfbar_restart_time'    => createTimeSelections(getConfig('surfbar_restart_time')  , 'surfbar_restart_time'  , 'ms' , 'left'),
+               'surfbar_dynamic_percent' => translateComma(getConfig('surfbar_dynamic_percent')),
                'surfbar_max_order'       => getConfig('surfbar_max_order'),
-               'surfbar_stats_reload'    => CREATE_TIME_SELECTIONS(getConfig('surfbar_stats_reload')  , "surfbar_stats_reload"  , "ms" , "left"),
-               'surfbar_purge_deleted'   => CREATE_TIME_SELECTIONS(getConfig('surfbar_purge_deleted') , "surfbar_purge_deleted" , "WDh", "left"),
-               'surfbar_purge_migrated'  => CREATE_TIME_SELECTIONS(getConfig('surfbar_purge_migrated'), "surfbar_purge_migrated", "WDh", "left"),
+               'surfbar_stats_reload'    => createTimeSelections(getConfig('surfbar_stats_reload')  , 'surfbar_stats_reload'  , 'ms' , 'left'),
+               'surfbar_purge_deleted'   => createTimeSelections(getConfig('surfbar_purge_deleted') , 'surfbar_purge_deleted' , 'WDh', 'left'),
+               'surfbar_purge_migrated'  => createTimeSelections(getConfig('surfbar_purge_migrated'), 'surfbar_purge_migrated', 'WDh', 'left'),
                'surfbar_pause_url'       => getConfig('surfbar_pause_url'),
                'surfbar_warn_low_points' => getConfig('surfbar_warn_low_points'),
-               'surfbar_low_interval'    => CREATE_TIME_SELECTIONS(getConfig('surfbar_low_interval')  , "surfbar_low_interval"  , "WDh", "left"),
+               'surfbar_low_interval'    => createTimeSelections(getConfig('surfbar_low_interval')  , 'surfbar_low_interval'  , 'WDh', 'left'),
        );
 
        // Prepare payment model for template
-       if (getConfig('surfbar_pay_model') == "STATIC") {
+       if (getConfig('surfbar_pay_model') == 'STATIC') {
                // Static model
                define('__CONFIG_SURFBAR_PAY_MODEL_STATIC' , ' chkecked="checked"');
                define('__CONFIG_SURFBAR_PAY_MODEL_DYNAMIC', '');
@@ -128,7 +128,7 @@ if (IS_FORM_SENT()) {
        }
 
        // Pause URL mode
-       if (getConfig('surfbar_pause_mode') == "INTERNAL") {
+       if (getConfig('surfbar_pause_mode') == 'INTERNAL') {
                // Internal pause page
                define('__CONFIG_SURFBAR_PAUSE_MODE_INTERNAL', ' chkecked="checked"');
                define('__CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL', '');
@@ -139,7 +139,7 @@ if (IS_FORM_SENT()) {
        }
 
        // Notification mode
-       if (getConfig('surfbar_notification_mode') == "INSTANT") {
+       if (getConfig('surfbar_notification_mode') == 'INSTANT') {
                // Instant notification
                define('__CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT', ' selected="selected"');
                define('__CONFIG_SURFBAR_NOTIFICATION_MODE_RESET'  , '');
@@ -150,7 +150,7 @@ if (IS_FORM_SENT()) {
        }
 
        // Load template
-       LOAD_TEMPLATE("admin_config_surfbar", false, $content);
+       LOAD_TEMPLATE('admin_config_surfbar', false, $content);
 }
 
 //