]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/sponsor_functions.php
New function isValidUserid() introduced, more rewrites to EL:
[mailer.git] / inc / libs / sponsor_functions.php
index 983a46b9685115caef2efbedd2e14211a494e18c..180086fc8c1832db9df087f895bf9978418c30a6 100644 (file)
@@ -434,7 +434,7 @@ function saveSponsorData ($postData, $content) {
        $sql = substr($sql, 0, -1);
 
        // Add SQL tail data
-       $sql .= " WHERE `id`='%s' AND password='%s' LIMIT 1";
+       $sql .= " WHERE `id`=%s AND password='%s' LIMIT 1";
        $DATA[] = bigintval(getSession('sponsorid'));
        $DATA[] = getSession('sponsorpass');
 
@@ -481,22 +481,23 @@ function saveSponsorData ($postData, $content) {
                        $content['new_data'] = $postData;
 
                        // Translate some data
-                       if (isset($content['gender']))             $content['gender']                  = translateGender($content['gender']);
-                       if (isset($content['new_data']['gender'])) $content['new_data']['gender']      = translateGender($content['new_data']['gender']);
-                       if (isset($content['receive_warnings']))   $content['new_data']['receive']     = translateYesNo($content['new_data']['receive_warnings']);
-                       if (isset($content['warning_interval']))   $content['new_data']['interval']    = createFancyTime($content['new_data']['warning_interval']);
+                       if (isset($content['gender']))             $content['gender']               = translateGender($content['gender']);
+                       if (isset($content['new_data']['gender'])) $content['new_data']['gender']   = translateGender($content['new_data']['gender']);
+                       if (isset($content['receive_warnings']))   $content['new_data']['receive']  = translateYesNo($content['new_data']['receive_warnings']);
+                       if (isset($content['warning_interval']))   $content['new_data']['interval'] = createFancyTime($content['new_data']['warning_interval']);
 
                        // Send email to admins
                        sendAdminNotification($subj, $templ, $content);
 
                        // Shall we send mail to the sponsor's new email address?
                        if ($content['receive_warnings'] == 'Y') {
-                               // Okay send email with confirmation link to new address and with no confirmation link
-                               // to the old address
+                               /*
+                                * Okay send email with confirmation link to new address and with no confirmation link
+                                * to the old address.
+                                */
 
                                // First to old address
-                               switch (getWhat())
-                               {
+                               switch (getWhat()) {
                                        case 'account': // Change account data
                                                $email_msg = loadEmailTemplate('sponsor_change_data', $content);
                                                sendEmail($content['email'], getMessage('SPONSOR_ACC_DATA_SUBJ'), $email_msg);
@@ -508,7 +509,7 @@ function saveSponsorData ($postData, $content) {
                                                        // Second mail goes to the new address
                                                        $email_msg = loadEmailTemplate('sponsor_change_email', $content);
                                                        sendEmail($content['email'], getMessage('SPONSOR_ACC_EMAIL_SUBJ'), $email_msg);
-                                               }
+                                               } // END - if
                                                break;
 
                                        case 'settings': // Change settings
@@ -516,7 +517,7 @@ function saveSponsorData ($postData, $content) {
                                                $email_msg = loadEmailTemplate('sponsor_settings', $content);
                                                sendEmail($content['email'], getMessage('SPONSOR_SETTINGS_SUBJ'), $email_msg);
                                                break;
-                               }
+                               } // END - switch
                        } // END - if
                } // END - if
        } // END - if