]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_doubler.php
Wrapper functions for converting commas in configuration added, ext-coupon continued
[mailer.git] / inc / modules / admin / what-config_doubler.php
index 6738249233865bb73a84d7c0e865568ab2341c19..f26d37e2129b571585cae0d2a4ceb8535a418249 100644 (file)
@@ -44,18 +44,14 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addYouAreHereLink('admin', __FILE__);
 
 if (isFormSent()) {
-       // Replace commata with decimal dot
-       setPostRequestParameter('doubler_charge', convertCommaToDot(postRequestParameter('doubler_charge')));
-       setPostRequestParameter('doubler_ref'   , convertCommaToDot(postRequestParameter('doubler_ref')));
-       setPostRequestParameter('doubler_min'   , convertCommaToDot(postRequestParameter('doubler_min')));
-       setPostRequestParameter('doubler_max'   , convertCommaToDot(postRequestParameter('doubler_max')));
-       setPostRequestParameter('doubler_left'  , convertCommaToDot(postRequestParameter('doubler_left')));
+       // Replace german decimal comma with computer decimal dot
+       convertCommaToDotInPostDataArray(array('doubler_charge', 'doubler_ref', 'doubler_min', 'doubler_max', 'doubler_left'));
 
        // Save settings
        adminSaveSettingsFromPostData();
 } else {
        // Init all Y/N selections
-       foreach (array('jackpot','own','sent_all') as $entry) {
+       foreach (array('jackpot', 'own', 'sent_all') as $entry) {
                $content[$entry . '_y'] = '';
                $content[$entry . '_n'] = '';
                $content[$entry . '_' . strtolower(getConfig('doubler_' . $entry))] = ' checked="checked"';