]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/sponsor_functions.php
Fix for cache loader
[mailer.git] / inc / libs / sponsor_functions.php
index c9ce82d799044ae4d7448dc72c7030f9bc0ffacb..3b17afa3ff4a09849eb29e4f7b7c5cd4b6176dd7 100644 (file)
@@ -153,7 +153,7 @@ function SPONSOR_HANDLE_SPONSOR(&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_ST
        if ($SAVE)
        {
                // Default is no force even when a guest want to abuse this force switch
-               if ((empty($POST['force'])) || (!IS_ADMIN())) $POST['force'] = "0";
+               if ((empty($POST['force'])) || (!IS_ADMIN())) $POST['force'] = 0;
 
                // SQL and message string is empty by default
                $SQL = ""; $MSG = "";
@@ -420,7 +420,7 @@ ORDER BY sort", array($action), __FILE__, __LINE__);
 //
 function GENERATE_SPONSOR_CONTENT($what)
 {
-       global $HTTP_POST_VARS, $_GET, $CONFIG;
+       global $_CONFIG;
        $OUT = "";
        $FILE = sprintf("%sinc/modules/sponsor/%s.php", PATH, $what);
        if (FILE_READABLE($FILE)) {
@@ -437,14 +437,14 @@ function GENERATE_SPONSOR_CONTENT($what)
 //
 function UPDATE_SPONSOR_LOGIN()
 {
-       global $_COOKIE, $CONFIG;
+       global $_COOKIE, $_CONFIG;
 
        // Check if cookies are set
        if ((empty($_COOKIE['sponsorid'])) || (empty($_COOKIE['sponsorpass']))) return false;
 
        // Calculate cookie lifetime, maybe we have to change this so the admin can setup a
        // seperate timeout for these two cookies?
-       $life = (time() + $CONFIG['online_timeout']);
+       $life = (time() + $_CONFIG['online_timeout']);
 
        // Is confirmed so both is fine and we can continue with login procedure
        $login = ((setcookie("sponsorid"  , bigintval($_COOKIE['sponsorid']), $life, COOKIE_PATH)) &&
@@ -584,8 +584,8 @@ function SPONSOR_SAVE_DATA($POST, $content)
                        $DATA = $POST;
 
                        // Change some data
-                       if (isset($content['salut'])) $content['salut'] = TRANSLATE_SEX($content['salut']);
-                       if (isset($DATA['salut']))    $DATA['salut']    = TRANSLATE_SEX($DATA['salut']);
+                       if (isset($content['gender'])) $content['gender'] = TRANSLATE_GENDER($content['gender']);
+                       if (isset($DATA['gender']))    $DATA['gender']    = TRANSLATE_GENDER($DATA['gender']);
                        if (isset($content['receive_warnings'])) $DATA['receive']     = TRANSLATE_YESNO($POST['receive_warnings']);
                        if (isset($content['warning_interval'])) $DATA['interval']    = CREATE_FANCY_TIME($POST['warning_interval']);