]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/sponsor/settings.php
Complete rewrite of and , wrapper functions added, see bug #101
[mailer.git] / inc / modules / sponsor / settings.php
index 9667913cf0ee2aff6074201d93a2be4e58e2dee9..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)) {