]> git.mxchange.org Git - mailer.git/blobdiff - inc/filter/rallye_filter.php
Filters for configurable userid exclusion added:
[mailer.git] / inc / filter / rallye_filter.php
index 2965cc5acc432f2ba5d7558b187302618ec14df1..2e9e84c33b3d4e34a16ea105152a0d05ee3e08d3 100644 (file)
@@ -64,20 +64,20 @@ function FILTER_RALLYE_NOTIFY_USERS ($filterData) {
 
                // Check for new started but not notified rallyes
                $result = SQL_QUERY("SELECT SQL_SMALL_RESULT
-       d.`id`,
-       d.`title`,
-       d.`start_time`,
-       d.`end_time`,
-       d.`send_notify`
+       `d`.`id`,
+       `d`.`title`,
+       `d`.`start_time`,
+       `d`.`end_time`,
+       `d`.`send_notify`
        " . $sqlAddons['add'] . "
 FROM
-       `{?_MYSQL_PREFIX?}_rallye_data` AS d
+       `{?_MYSQL_PREFIX?}_rallye_data` AS `d`
 WHERE
-       d.`is_active`='Y' AND
-       d.`notified`='N' AND
-       d.`expired`='N' AND
-       d.`start_time` <= UNIX_TIMESTAMP() AND
-       d.`end_time` > UNIX_TIMESTAMP()
+       `d`.`is_active`='Y' AND
+       `d`.`notified`='N' AND
+       `d`.`expired`='N' AND
+       `d`.`start_time` <= UNIX_TIMESTAMP() AND
+       `d`.`end_time` > UNIX_TIMESTAMP()
 LIMIT 1", __FILE__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Start rallye
@@ -89,19 +89,19 @@ LIMIT 1", __FILE__, __LINE__);
 
                // Check for expired rallyes
                $result = SQL_QUERY("SELECT SQL_SMALL_RESULT
-       d.`id`,
-       d.`title`,
-       d.`start_time`,
-       d.`end_time`,
-       d.`send_notify`
+       `d`.`id`,
+       `d`.`title`,
+       `d`.`start_time`,
+       `d`.`end_time`,
+       `d`.`send_notify`
        " . $sqlAddons['add'] . "
 FROM
-       `{?_MYSQL_PREFIX?}_rallye_data` AS d
+       `{?_MYSQL_PREFIX?}_rallye_data` AS `d`
 WHERE
-       d.`is_active`='Y' AND
-       d.`notified`='Y' AND
-       d.`expired`='N' AND
-       (d.`end_time` <= UNIX_TIMESTAMP()" . $sqlAddons['or'] . ")
+       `d`.`is_active`='Y' AND
+       `d`.`notified`='Y' AND
+       `d`.`expired`='N' AND
+       (`d`.`end_time` <= UNIX_TIMESTAMP()" . $sqlAddons['or'] . ")
 LIMIT 1", __FILE__, __LINE__);
                if ((SQL_NUMROWS($result) == 1) && (isExtensionActive('autopurge'))) {
                        // End rallye here...
@@ -124,7 +124,7 @@ function FILTER_ADD_RALLYE_SQL_COLUMNS ($filterData) {
        if (isExtensionInstalledAndNewer('rallye', '0.2.0')) {
                // Add more data on higher versions
                $filterData['add'] .= ',`min_users`, `min_prices`';
-               $filterData['or']  .= ' OR (d.`min_users` <= ' . getTotalConfirmedUser() . ' AND d.`min_users` > 0)';
+               $filterData['or']  .= ' OR (`d`.`min_users` <= ' . getTotalConfirmedUser() . ' AND `d`.`min_users` > 0)';
        } // END  - if
 
        // Return data