]> git.mxchange.org Git - mailer.git/blobdiff - inc/daily/daily_birthday.php
Rewrote many parts:
[mailer.git] / inc / daily / daily_birthday.php
index 81aeb519b1fb55139970b3e75ace1153382172e1..60e5984d2ee01aeaa52f4642cd6ea0234cc00790 100644 (file)
@@ -60,17 +60,11 @@ $lastOnline = '';
 $excludeSql = '';
 
 // Shall I include only active members?
+// @TODO Move this out to an extension
 if ((getConfig('birthday_active')  == 'Y') && (isExtensionActive('autopurge')) && ((getApInactiveSince() > 0))) {
        $excludeSql = ' AND (UNIX_TIMESTAMP() - `d`.`last_online`) < {?ap_inactive_since?}';
 } // END - if
 
-// Is ext-holiday installed?
-// @TODO Rewrite these if() blocks to a filter
-if (isExtensionActive('holiday')) {
-       // Exclude those as well
-       $excludeSql .= " AND `d`.`holiday_active`='N'";
-} // END - if
-
 // Only confirmed members shall receive birthday mails...
 $result_birthday = sqlQueryEscaped("SELECT
        `d`.`userid`,
@@ -80,7 +74,7 @@ FROM
        `{?_MYSQL_PREFIX?}_user_data` AS `d`
 WHERE
        `d`.`status`='CONFIRMED'
-       " . runFilterChain('user_exclusion_sql', $excludeSql) . " AND
+       " . runFilterChain('user_exclusion_sql', ' ' . $excludeSql) . " AND
        `d`.`birth_day`=%s AND
        `d`.`birth_month`=%s AND
        `d`.`birthday_sent` < (UNIX_TIMESTAMP() - ({?ONE_DAY?} * 364))