* -------------------------------------------------------------------- *
* Kurzbeschreibung : Versendet Geburtstagsmails beim Reset *
* -------------------------------------------------------------------- *
- * $Revision:: $ *
- * $Date:: $ *
- * $Tag:: 0.2.1-FINAL $ *
- * $Author:: $ *
- * -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2013 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2016 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
$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`,
`{?_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))
`d`.`userid` ASC",
array($day, $month), __FILE__, __LINE__);
-if (!ifSqlHasZeroNums($result_birthday)) {
+if (!ifSqlHasZeroNumRows($result_birthday)) {
// Start sending out birthday mails
while ($content = sqlFetchArray($result_birthday)) {
// Calculate own timestamp for birthday and today