]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/autopurge_functions.php
Extension 'active' now depends on 'online' because of a filter for the 'Who is online...
[mailer.git] / inc / libs / autopurge_functions.php
index 1b20a242ea13ed78023ca009f47dacfb96b530fa..249a4e70cbd7926aa30a81dab63698bf6f110122 100644 (file)
@@ -32,8 +32,7 @@
  ************************************************************************/
 
 // 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);
 }
@@ -42,7 +41,7 @@ function AUTOPURGE_ADD_POINTS($uid, $points)
 {
        global $jackpot;
        // Check if he has locked points or not
-       $result = SQL_QUERY_ESC("SELECT ref_payout FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+       $result = SQL_QUERY_ESC("SELECT ref_payout FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
         array(bigintval($uid)), __FILE__, __LINE__);
        list($payout) = SQL_FETCHROW($result);
        SQL_FREERESULT($result);