Fix for broken SQL queries, resolves #116.
[mailer.git] / inc / libs / task_functions.php
index c4dd1f21b7da39fabb60d430481c46f0db196670..fb0366a84e7548a2b018b017406cdcd0d73c470f 100644 (file)
@@ -38,7 +38,7 @@
 
 // Some security stuff...
 if (!defined('__SECURITY')) {
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
        require($INC);
 }
 
@@ -262,7 +262,7 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main) {
                if (EXT_IS_ACTIVE('beg'))                  $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_uid')."";
                if (EXT_IS_ACTIVE('bonus'))                $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_uid')."";
                if (EXT_IS_ACTIVE('doubler'))              $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_uid')."";
-               if (GET_EXT_VERSION('holiday') >= '0.1.3') $EXCLUDE_LIST .= " AND d.holiday_active='N'";
+               if (GET_EXT_VERSION('holiday') >= '0.1.3') $EXCLUDE_LIST .= " AND d.`holiday_active`='N'";
 
                // Check for all accounts
                ADD_SQL("SELECT DISTINCT d.userid, d.email, d.last_online
@@ -479,7 +479,7 @@ ORDER BY beg_points DESC, userid");
                $TITLEs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_PENDING_TITLE');
 
                // Waiting payments
-               ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_sponsor_orders` WHERE pay_`status`='PENDING' ORDER BY `id`");
+               ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_sponsor_orders` WHERE `pay_status`='PENDING' ORDER BY `id`");
                $WHATs[]  = "list_sponsor_pays";
                $DESCRs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_ORDERS');
                $TITLEs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_ORDERS_TITLE');