]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/sponsor_functions.php
Fix for warning in rallye
[mailer.git] / inc / libs / sponsor_functions.php
index 3b17afa3ff4a09849eb29e4f7b7c5cd4b6176dd7..31a7578e6e3a74ef6df7c6b7967efd4580158578 100644 (file)
  ************************************************************************/
 
 // Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 }
+
 //
 function SPONSOR_HANDLE_SPONSOR(&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_STATUS=false)
 {
@@ -365,7 +365,7 @@ ORDER BY sort", __FILE__, __LINE__);
                {
                        // Load sub menus
                        $result_sub = SQL_QUERY_ESC("SELECT what, title FROM "._MYSQL_PREFIX."_sponsor_menu
-WHERE action='%s' AND what != '' ".$WHERE."
+WHERE action='%s' AND what != '' AND what IS NOT NULL ".$WHERE."
 ORDER BY sort", array($action), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result_sub) > 0)
                        {
@@ -471,7 +471,7 @@ function SPONSOR_SAVE_DATA($POST, $content)
 
        // Unsecure data which we don't want
        $UNSAFE = array('password', 'id', 'remote_addr', 'sponsor_created', 'last_online', 'status', 'ref_count',
-                       'points_amount', 'points_used', 'refid', 'hash' , 'last_pay', 'last_curr', 'pass_old',
+                       'points_amount', 'points_used', 'refid', 'hash', 'last_pay', 'last_curr', 'pass_old',
                        'ok', 'pass1', 'pass2');
 
        // Set default message ("not saved")