]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/sponsor/settings.php
Fixes for MT_WORD vs. install vs. installed
[mailer.git] / inc / modules / sponsor / settings.php
index f2b9f84c0cab012ee6d41f0b36655ee5ec5739e0..e9ce3b4b2eed487ae3f6eb09c550170e01711c92 100644 (file)
@@ -53,12 +53,12 @@ if (SQL_NUMROWS($result) == 1) {
        $content = SQL_FETCHARRAY($result);
        if ($content['status'] == "CONFIRMED") {
                // Check if form was submitted or not
-               if (!empty($_POST['ok'])) {
+               if (IS_FORM_SENT()) {
                        // Check passwords
-                       if (empty($_POST['password'])) {
+                       if (!REQUEST_ISSET_POST(('password'))) {
                                // No current password entered
                                $MSG = SPONSOR_NO_CURRENT_PASSWORD_ENTERED;
-                       } elseif (md5($_POST['password']) != get_session('sponsorpass')) {
+                       } elseif (md5(REQUEST_POST('password')) != get_session('sponsorpass')) {
                                // Entered password didn't match password in DB
                                $MSG = SPONSOR_CURRENT_PASSWORD_DIDNOT_MATCH_DB;
                        } else {
@@ -69,14 +69,14 @@ if (SQL_NUMROWS($result) == 1) {
 
                                // Remove all (maybe spoofed) unsafe data from array
                                foreach ($UNSAFE as $remove) {
-                                       unset($_POST[$remove]);
+                                       REQUEST_UNSET_POST($remove);
                                }
 
                                // Set last change timestamp
-                               $_POST['last_change'] = time();
+                               REQUEST_SET_POST('last_change', "UNIX_TIMESTAMP()");
 
                                // Save data
-                               $MSG = SPONSOR_SAVE_DATA($_POST, $content);
+                               $MSG = SPONSOR_SAVE_DATA(REQUEST_POST_ARRAY(), $content);
                        }
 
                        if (!empty($MSG)) {
@@ -113,7 +113,7 @@ if (SQL_NUMROWS($result) == 1) {
        }
 } else {
        // Sponsor account not found!
-       $OUT = LOAD_TEMPLATE("admin_settings_saved", true, SPONSOR_ACCOUNT_404_1.get_session('sponsorid').SPONSOR_ACCOUNT_404_2);
+       $OUT = LOAD_TEMPLATE("admin_settings_saved", true, sprintf(getMessage('SPONSOR_ACCOUNT_404'), get_session('sponsorid')));
 }
 
 // Free memory