Rewrote many parts:
authorRoland Häder <roland@mxchange.org>
Fri, 31 May 2013 07:49:02 +0000 (07:49 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 31 May 2013 07:49:02 +0000 (07:49 +0000)
- "Generic" filter splitted up and move to html_mail_filter.php as this filter will only work with ext-html_mail
installed
- ext-holiday does now register a filter on user_exclusion_sql which allows to remove some "static" if() blocks
- Other minor fixes

22 files changed:
.gitattributes
inc/daily/daily_birthday.php
inc/extensions/ext-holiday.php
inc/extensions/ext-html_mail.php
inc/extensions/holiday/.htaccess [new file with mode: 0644]
inc/extensions/holiday/mode-update.php [new file with mode: 0644]
inc/filter-functions.php
inc/filter/holiday_filter.php [new file with mode: 0644]
inc/filter/html_mail_filter.php
inc/filters.php
inc/libs/task_functions.php
inc/mails/beg_mails.php
inc/mails/bonus_mails.php
inc/mails/doubler_mails.php
inc/modules/admin/what-list_autopurge.php
inc/modules/admin/what-list_user.php
inc/modules/member/what-html_mail.php
inc/modules/member/what-order.php
inc/monthly/monthly_beg.php
inc/monthly/monthly_bonus.php
inc/mysql-manager.php
inc/purge/purge-inact.php

index 4da017eb54c8748efa2e5256f021486b0ae22683..10b9228454a3390b78a7e773186f4195bcd24d4d 100644 (file)
@@ -258,6 +258,8 @@ inc/extensions/ext-yacy.php svneol=native#text/plain
 inc/extensions/ext-yoomedia.php svneol=native#text/plain
 inc/extensions/forced/.htaccess svneol=native#text/plain
 inc/extensions/forced/mode-setup.php svneol=native#text/plain
 inc/extensions/ext-yoomedia.php svneol=native#text/plain
 inc/extensions/forced/.htaccess svneol=native#text/plain
 inc/extensions/forced/mode-setup.php svneol=native#text/plain
+inc/extensions/holiday/.htaccess svneol=native#text/plain
+inc/extensions/holiday/mode-update.php svneol=native#text/plain
 inc/extensions/network/.htaccess svneol=native#text/plain
 inc/extensions/network/mode-setup.php svneol=native#text/plain
 inc/extensions/order/.htaccess svneol=native#text/plain
 inc/extensions/network/.htaccess svneol=native#text/plain
 inc/extensions/network/mode-setup.php svneol=native#text/plain
 inc/extensions/order/.htaccess svneol=native#text/plain
@@ -303,6 +305,7 @@ inc/filter/coupon_filter.php svneol=native#text/plain
 inc/filter/doubler_filter.php svneol=native#text/plain
 inc/filter/earning_filter.php svneol=native#text/plain
 inc/filter/forced_filter.php svneol=native#text/plain
 inc/filter/doubler_filter.php svneol=native#text/plain
 inc/filter/earning_filter.php svneol=native#text/plain
 inc/filter/forced_filter.php svneol=native#text/plain
+inc/filter/holiday_filter.php svneol=native#text/plain
 inc/filter/html_mail_filter.php svneol=native#text/plain
 inc/filter/mediadata_filter.php svneol=native#text/plain
 inc/filter/menu_filter.php svneol=native#text/plain
 inc/filter/html_mail_filter.php svneol=native#text/plain
 inc/filter/mediadata_filter.php svneol=native#text/plain
 inc/filter/menu_filter.php svneol=native#text/plain
index 81aeb519b1fb55139970b3e75ace1153382172e1..60e5984d2ee01aeaa52f4642cd6ea0234cc00790 100644 (file)
@@ -60,17 +60,11 @@ $lastOnline = '';
 $excludeSql = '';
 
 // Shall I include only active members?
 $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
 
 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`,
 // 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'
        `{?_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`.`birth_day`=%s AND
        `d`.`birth_month`=%s AND
        `d`.`birthday_sent` < (UNIX_TIMESTAMP() - ({?ONE_DAY?} * 364))
index e5fe2acff3c541f0c5affb123355d9b67981505a..d97d1cea2dad871df68f8eae859999752934fb76 100644 (file)
@@ -41,10 +41,10 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Version number
 } // END - if
 
 // Version number
-setThisExtensionVersion('0.2.1');
+setThisExtensionVersion('0.2.2');
 
 // Version history array (add more with , '0.0.1' and so on)
 
 // Version history array (add more with , '0.0.1' and so on)
-setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1'));
+setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2'));
 
 switch (getExtensionMode()) {
        case 'setup': // Do stuff when installation is running
 
 switch (getExtensionMode()) {
        case 'setup': // Do stuff when installation is running
@@ -83,6 +83,9 @@ INDEX (`userid`)",
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='holiday' LIMIT 4");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE `value`=0 LIMIT 1");
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (`value`, `comment`) VALUES (0,'Urlaub')");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='holiday' LIMIT 4");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE `value`=0 LIMIT 1");
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (`value`, `comment`) VALUES (0,'Urlaub')");
+
+               // Unregister filter
+               unregisterFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'HOLIDAY_USER_EXCLUSION_SQL', TRUE, isExtensionDryRun());
                break;
 
        case 'activate': // Do stuff when admin activates this extension
                break;
 
        case 'activate': // Do stuff when admin activates this extension
@@ -96,124 +99,6 @@ INDEX (`userid`)",
                break;
 
        case 'update': // Update an extension
                break;
 
        case 'update': // Update an extension
-               switch (getCurrentExtensionVersion())
-               {
-                       case '0.0.2': // SQL queries for v0.0.2
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
-                               break;
-
-                       case '0.0.3': // SQL queries for v0.0.3
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-                               break;
-
-                       case '0.0.4': // SQL queries for v0.0.4
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt.");
-                               break;
-
-                       case '0.0.5': // SQL queries for v0.0.5
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
-                               break;
-
-                       case '0.0.6': // SQL queries for v0.0.6
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Seit <strong>Patch 340</strong> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
-                               break;
-
-                       case '0.0.7': // SQL queries for v0.0.7
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
-                               break;
-
-                       case '0.0.8': // SQL queries for v0.0.8
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
-                               break;
-
-                       case '0.0.9': // SQL queries for v0.0.9
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("W&ouml;rter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
-                               break;
-
-                       case '0.1.0': // SQL queries for v0.2.1
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Sicherheitsupdate: SQL-Anweisungen gesch&uuml;tzt.");
-                               break;
-
-                       case '0.1.1': // SQL queries for v0.1.1
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
-                               break;
-
-                       case '0.1.2': // SQL queries for v0.1.2
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Abspeichern der Urlaubsanfrage korregiert.");
-                               break;
-
-                       case '0.1.3': // SQL queries for v0.1.3
-                               addExtensionAddTableColumnSql('user_data', 'holiday_active', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
-                               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE `value`=0 LIMIT 1");
-                               addConfigAddSql('holiday_lock', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 2));
-
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Die Mitgliedaccounts werden nicht mehr gesperrt, sondern nur auf <strong>Urlaub</strong> geschaltet. Lassen Sie sich nicht davon verwirren, dass sie &quot;freigegeben&quot; sind!");
-                               break;
-
-                       case '0.1.4': // SQL queries for v0.1.4
-                               addConfigAddSql('holiday_mode', "ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'");
-
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Urlaubsschaltung wird erst Abends um 00:00 Uhr aktiv und nicht durch die Beantragung. Dies kann nun auch auf direkte Umstellung eingestellt werden.");
-                               break;
-
-                       case '0.1.5': // SQL queries for v0.1.5
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Sicherheitsupdate f&uuml;r die Include-Befehle.");
-                               break;
-
-                       case '0.1.6': // SQL queries for v0.1.6
-                               addExtensionAddTableColumnSql('user_data', 'holiday_activated', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
-
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Fehlende Tabellenspalte hinzugef&uuml;gt.");
-                               break;
-
-                       case '0.1.7': // SQL queries for v0.1.7
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
-                               break;
-
-                       case '0.1.8': // SQL queries for v0.1.8
-                               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (`la_id`, `la_action`, `la_what`) VALUES ('member', '', 'list_holiday')");
-                               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (`la_id`, `la_action`, `la_what`) VALUES ('member', '', 'del_holiday')");
-                               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (`la_id`, `la_action`, `la_what`) VALUES ('config', '', 'config_holiday')");
-
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Erweiterung in's neue Men&uuml;system integriert.");
-                               break;
-
-                       case '0.1.9': // SQL queries for v0.1.9
-                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='account',`title`='In Urlaub',`sort`=2 WHERE `what`='holiday' LIMIT 1");
-
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Mitgliedsmen&uuml; komplett umgebaut.");
-                               break;
-
-                       case '0.2.0': // SQL queries for v0.2.0
-                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Urlaubsmanagement' WHERE `action`='holiday' AND (`what`='' OR `what` IS NULL) LIMIT 1");
-
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Mitgliedsmen&uuml; komplett umgebaut.");
-                               break;
-
-                       case '0.2.1': // SQL queries for v0.2.1
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
-                               break;
-               } // END - switch
                break;
 
        case 'modify': // When the extension got modified
                break;
 
        case 'modify': // When the extension got modified
index 53eb0ab7cae542c6fbd7b042b20893e864e5f20b..5867318127be35bbf0e3066701da13b8cf766b3c 100644 (file)
@@ -53,6 +53,9 @@ switch (getExtensionMode()) {
                addExtensionAddTableColumnSql('bonus', 'html_msg', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
                addExtensionAddTableColumnSql('pool', 'html_msg', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
                addMemberMenuSql('main', 'html_mail', 'HTML-Empfang', 3);
                addExtensionAddTableColumnSql('bonus', 'html_msg', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
                addExtensionAddTableColumnSql('pool', 'html_msg', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
                addMemberMenuSql('main', 'html_mail', 'HTML-Empfang', 3);
+
+               // Register filter here
+               registerFilter(__FILE__, __LINE__, 'exclude_users', 'HTML_INCLUDE_USERS', FALSE, TRUE, isExtensionDryRun());
                break;
 
        case 'remove': // Do stuff when removing extension
                break;
 
        case 'remove': // Do stuff when removing extension
@@ -61,6 +64,7 @@ switch (getExtensionMode()) {
 
                // Remove filter(s)
                unregisterFilter(__FILE__, __LINE__, 'pre_mail_order', 'MAIL_ORDER_GENERIC_CHECK_URL', TRUE, isExtensionDryRun());
 
                // Remove filter(s)
                unregisterFilter(__FILE__, __LINE__, 'pre_mail_order', 'MAIL_ORDER_GENERIC_CHECK_URL', TRUE, isExtensionDryRun());
+               unregisterFilter(__FILE__, __LINE__, 'exclude_users', 'HTML_INCLUDE_USERS', TRUE, isExtensionDryRun());
                break;
 
        case 'activate': // Do stuff when admin activates this extension
                break;
 
        case 'activate': // Do stuff when admin activates this extension
diff --git a/inc/extensions/holiday/.htaccess b/inc/extensions/holiday/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/extensions/holiday/mode-update.php b/inc/extensions/holiday/mode-update.php
new file mode 100644 (file)
index 0000000..f1fa9c4
--- /dev/null
@@ -0,0 +1,170 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 06/17/2004 *
+ * ===================                          Last change: 01/13/2006 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : mode-update.php                                  *
+ * -------------------------------------------------------------------- *
+ * Short description : Holiday requests from members                    *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Ferienantraege von Mitgliedern                   *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       die();
+} // END - if
+
+               switch (getCurrentExtensionVersion()) {
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt.");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Seit <strong>Patch 340</strong> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.0.7': // SQL queries for v0.0.7
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
+                               break;
+
+                       case '0.0.8': // SQL queries for v0.0.8
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
+                               break;
+
+                       case '0.0.9': // SQL queries for v0.0.9
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("W&ouml;rter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
+                               break;
+
+                       case '0.1.0': // SQL queries for v0.1.0
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Sicherheitsupdate: SQL-Anweisungen gesch&uuml;tzt.");
+                               break;
+
+                       case '0.1.1': // SQL queries for v0.1.1
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.1.2': // SQL queries for v0.1.2
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Abspeichern der Urlaubsanfrage korregiert.");
+                               break;
+
+                       case '0.1.3': // SQL queries for v0.1.3
+                               addExtensionAddTableColumnSql('user_data', 'holiday_active', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE `value`=0 LIMIT 1");
+                               addConfigAddSql('holiday_lock', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 2));
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Die Mitgliedaccounts werden nicht mehr gesperrt, sondern nur auf <strong>Urlaub</strong> geschaltet. Lassen Sie sich nicht davon verwirren, dass sie &quot;freigegeben&quot; sind!");
+                               break;
+
+                       case '0.1.4': // SQL queries for v0.1.4
+                               addConfigAddSql('holiday_mode', "ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'");
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Urlaubsschaltung wird erst Abends um 00:00 Uhr aktiv und nicht durch die Beantragung. Dies kann nun auch auf direkte Umstellung eingestellt werden.");
+                               break;
+
+                       case '0.1.5': // SQL queries for v0.1.5
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Sicherheitsupdate f&uuml;r die Include-Befehle.");
+                               break;
+
+                       case '0.1.6': // SQL queries for v0.1.6
+                               addExtensionAddTableColumnSql('user_data', 'holiday_activated', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Fehlende Tabellenspalte hinzugef&uuml;gt.");
+                               break;
+
+                       case '0.1.7': // SQL queries for v0.1.7
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
+                               break;
+
+                       case '0.1.8': // SQL queries for v0.1.8
+                               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (`la_id`, `la_action`, `la_what`) VALUES ('member', '', 'list_holiday')");
+                               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (`la_id`, `la_action`, `la_what`) VALUES ('member', '', 'del_holiday')");
+                               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (`la_id`, `la_action`, `la_what`) VALUES ('config', '', 'config_holiday')");
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Erweiterung in's neue Men&uuml;system integriert.");
+                               break;
+
+                       case '0.1.9': // SQL queries for v0.1.9
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='account',`title`='In Urlaub',`sort`=2 WHERE `what`='holiday' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Mitgliedsmen&uuml; komplett umgebaut.");
+                               break;
+
+                       case '0.2.0': // SQL queries for v0.2.0
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Urlaubsmanagement' WHERE `action`='holiday' AND (`what`='' OR `what` IS NULL) LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Mitgliedsmen&uuml; komplett umgebaut.");
+                               break;
+
+                       case '0.2.1': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                               break;
+
+                       case '0.2.2': // SQL queries for v0.2.2
+                               // Register filter
+                               registerFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'HOLIDAY_USER_EXCLUSION_SQL', FALSE, TRUE, isExtensionDryRun());
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Filter registriert f&uuml;r Mitglied-Ausschluss, die in Urlaub sind.");
+                               break;
+               } // END - switch
+
+// [EOF]
+?>
index e217428394c3dbff7dbf7b47bc02d19f1bd35640..4e19d0980aa78d2ba0a3b655a6eb8f27897c585d 100644 (file)
@@ -193,9 +193,6 @@ ORDER BY
        // Remove extension
        registerFilter(__FUNCTION__, __LINE__, 'extension_remove', 'REMOVE_EXTENSION');
 
        // Remove extension
        registerFilter(__FUNCTION__, __LINE__, 'extension_remove', 'REMOVE_EXTENSION');
 
-       // Exclude some users
-       registerFilter(__FUNCTION__, __LINE__, 'exclude_users', 'HTML_INCLUDE_USERS');
-
        // Handling of fatal errors
        registerFilter(__FUNCTION__, __LINE__, 'handle_fatal_errors', 'HANDLE_FATAL_ERRORS');
 
        // Handling of fatal errors
        registerFilter(__FUNCTION__, __LINE__, 'handle_fatal_errors', 'HANDLE_FATAL_ERRORS');
 
@@ -237,7 +234,7 @@ function registerFilter ($file, $line, $filterName, $filterFunction, $silentAbor
                // In installation phase we always want to abort
                if (($silentAbort === FALSE) || (isInstaller())) {
                        // Add fatal message
                // In installation phase we always want to abort
                if (($silentAbort === FALSE) || (isInstaller())) {
                        // Add fatal message
-                       reportBug(__FUNCTION__, __LINE__, sprintf("Filter chain %s has already filter function %s registered! file=%s,L=%s,force=%d", $filterName, $filterFunction, basename($file), $line, intval($force)));
+                       reportBug(__FUNCTION__, __LINE__, sprintf('Filter chain %s has already filter function %s registered! file=%s,L=%s,force=%d', $filterName, $filterFunction, basename($file), $line, intval($force)));
                } // END - if
 
                // Abort here
                } // END - if
 
                // Abort here
@@ -249,7 +246,7 @@ function registerFilter ($file, $line, $filterName, $filterFunction, $silentAbor
                // Is the function there?
                if (!function_exists($filterFunction)) {
                        // Then abort here
                // Is the function there?
                if (!function_exists($filterFunction)) {
                        // Then abort here
-                       logDebugMessage(__FUNCTION__, __LINE__, sprintf("Filter function %s could not be added to filter chain %s. file=%s,L=%s,force=%d", $filterFunction, $filterName, basename($file), $line, intval($force)));
+                       logDebugMessage(__FUNCTION__, __LINE__, sprintf('Filter function %s could not be added to filter chain %s. file=%s,L=%s,force=%d', $filterFunction, $filterName, basename($file), $line, intval($force)));
                        return FALSE;
                } // END - if
 
                        return FALSE;
                } // END - if
 
diff --git a/inc/filter/holiday_filter.php b/inc/filter/holiday_filter.php
new file mode 100644 (file)
index 0000000..ce44eec
--- /dev/null
@@ -0,0 +1,62 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 06/02/2011 *
+ * ===================                          Last change: 06/02/2011 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : _filter.php                                      *
+ * -------------------------------------------------------------------- *
+ * Short description : Filters for ext-                                 *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Filter fuer ext-                                 *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       die();
+} // END - if
+
+// Filter for excluding holiday users in WHERE statements
+function FILTER_HOLIDAY_USER_EXCLUSION_SQL ($sql) {
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called! - sql(' . strlen($sql) . ')=' . $sql);
+
+       // Add it, as of this filter is registered only with ext-user >= 0.5.0
+       if (empty($sql)) {
+               // Add WHERE
+               $sql = " WHERE `holiday_active` = 'N'";
+       } else {
+               // Add AND
+               $sql .= " AND `holiday_active` = 'N'";
+       }
+
+       // Return the data for next filter
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done! - sql(' . strlen($sql) . ')=' . $sql);
+       return $sql;
+}
+
+// [EOF]
+?>
index 3ed27944833454a5acef0475d3b4c7eb3d095726..cfa86894e9ffee2dd21472a5dd974602e4186eb4 100644 (file)
@@ -64,5 +64,19 @@ function FILTER_CHECK_HTML_MAIL_ORDER ($filterData) {
        return $filterData;
 }
 
        return $filterData;
 }
 
+// Prepares an SQL statement part for HTML mail
+function FILTER_HTML_INCLUDE_USERS ($mode) {
+       // Exclude no users by default
+       $MORE = '';
+
+       // HTML mail?
+       if ($mode == 'html') {
+               $MORE = " AND `html`='Y'";
+       } // END - if
+
+       // Return result
+       return $MORE;
+}
+
 // [EOF]
 ?>
 // [EOF]
 ?>
index 7fba80252b32a099718e499c36eca6812509cdd0..239d9048c122537fc62ad0e6d9cfe67b10feb4b6 100644 (file)
@@ -711,25 +711,6 @@ function FILTER_FLUSH_OUTPUT () {
        outputHtml();
 }
 
        outputHtml();
 }
 
-// Prepares an SQL statement part for HTML mail and/or holiday dependency
-function FILTER_HTML_INCLUDE_USERS ($mode) {
-       // Exclude no users by default
-       $MORE = '';
-
-       // HTML mail?
-       if ($mode == 'html') {
-               $MORE = " AND `html`='Y'";
-       } // END - if
-
-       if (isExtensionInstalledAndNewer('holiday', '0.1.3')) {
-               // Add something for the holiday extension
-               $MORE .= " AND `holiday_active`='N'";
-       } // END - if
-
-       // Return result
-       return $MORE;
-}
-
 // Filter for determining what/action/module
 function FILTER_DETERMINE_WHAT_ACTION () {
        // In installation phase we don't have what/action
 // Filter for determining what/action/module
 function FILTER_DETERMINE_WHAT_ACTION () {
        // In installation phase we don't have what/action
index d7eda6440235981fb367b95428ecb5015445b814..016fe18678a95d0010476fc4121378c250eaa496 100644 (file)
@@ -257,13 +257,6 @@ function outputAdvancedOverview (&$result_main) {
                        $userExclusionSql .= ' AND `d`.`userid` NOT IN (' . implode(', ', $excludedUserids) . ')';
                } // END - if
 
                        $userExclusionSql .= ' AND `d`.`userid` NOT IN (' . implode(', ', $excludedUserids) . ')';
                } // END - if
 
-               // Check for more extensions
-               // @TODO This can be rewritten to filter
-               if (isExtensionInstalledAndNewer('holiday', '0.1.3')) {
-                       // Recent ext-holiday found
-                       $userExclusionSql .= " AND `d`.`holiday_active`='N'";
-               } // END - if
-
                // Check for all accounts
                addSql("SELECT
        `d`.`userid`,
                // Check for all accounts
                addSql("SELECT
        `d`.`userid`,
@@ -276,7 +269,7 @@ WHERE
        (UNIX_TIMESTAMP() - `d`.`joined`) >= {?ap_inactive_since?} AND
        (UNIX_TIMESTAMP() - `d`.`last_online`) >= {?ap_inactive_since?} AND
        (UNIX_TIMESTAMP() - `d`.`ap_notified`) >= {?ap_inactive_since?}
        (UNIX_TIMESTAMP() - `d`.`joined`) >= {?ap_inactive_since?} AND
        (UNIX_TIMESTAMP() - `d`.`last_online`) >= {?ap_inactive_since?} AND
        (UNIX_TIMESTAMP() - `d`.`ap_notified`) >= {?ap_inactive_since?}
-       " . runFilterChain('user_exclusion_sql', $userExclusionSql) . "
+       " . runFilterChain('user_exclusion_sql', ' ' . $userExclusionSql) . "
 ORDER BY
        `d`.`userid` ASC");
                $WHATs[]  = 'list_autopurge';
 ORDER BY
        `d`.`userid` ASC");
                $WHATs[]  = 'list_autopurge';
index a773063f8e15132753a5a066fb503edc679888ec..d319f3e8f956a04801037f7163c91d08f198f5a3 100644 (file)
@@ -77,18 +77,8 @@ switch (getBegRallye()) {
 } // END - switch
 
 if (!empty($sql)) {
 } // END - switch
 
 if (!empty($sql)) {
-       // Init additional WHERE statement
-       $whereStatement = '';
-
-       // Is ext-holiday installed?
-       // @TODO Rewrite these if() blocks to a filter
-       if (isExtensionActive('holiday')) {
-               // Exclude those as well
-               $whereStatement .= " AND `d`.`holiday_active`='N'";
-       } // END - if
-
        // The SQL command needs to be finisched here (only confirmed accounts!)
        // The SQL command needs to be finisched here (only confirmed accounts!)
-       $sql .= ')' . $whereStatement . runFilterChain('user_exclusion_sql', " AND `d`.`status`='CONFIRMED'") . ' ORDER BY `d`.`last_online` ASC';
+       $sql .= ')' . runFilterChain('user_exclusion_sql', " AND `d`.`status`='CONFIRMED'") . ' ORDER BY `d`.`last_online` ASC';
 
        // No IP locking setuped by default
        $content['ip_locker'] = '{--BEG_NO_LIMITATION--}';
 
        // No IP locking setuped by default
        $content['ip_locker'] = '{--BEG_NO_LIMITATION--}';
index 24b10ea547bbed240a162e76eed2284ae6345060..e036bebcffd0626109b56b53ea2efd3b42c318e3 100644 (file)
@@ -77,18 +77,8 @@ switch (getBonusActive()) {
 } // END - switch
 
 if (!empty($sql)) {
 } // END - switch
 
 if (!empty($sql)) {
-       // Init additional WHERE statement
-       $whereStatement = '';
-
-       // Is ext-holiday installed?
-       // @TODO Rewrite these if() blocks to a filter
-       if (isExtensionActive('holiday')) {
-               // Exclude those as well
-               $whereStatement .= " AND `d`.`holiday_active`='N'";
-       } // END - if
-
        // The SQL command needs to be finisched here (only confirmed accounts!)
        // The SQL command needs to be finisched here (only confirmed accounts!)
-       $sql .= ')' . $whereStatement . runFilterChain('user_exclusion_sql', " AND `d`.`status`='CONFIRMED'") . ' ORDER BY `d`.`last_online` ASC';
+       $sql .= ')' . runFilterChain('user_exclusion_sql', " AND `d`.`status`='CONFIRMED'") . ' ORDER BY `d`.`last_online` ASC';
 
        // Normal notification mails or bonus mails?
        $sentBonusMails = ((getBonusNotifyPoints() > 0) && ($mode == 'enable') && (isExtensionActive('bonus')));
 
        // Normal notification mails or bonus mails?
        $sentBonusMails = ((getBonusNotifyPoints() > 0) && ($mode == 'enable') && (isExtensionActive('bonus')));
index 1783c69cb15b16403a9927277d8094ac8bc5c098..f2fc13ccebd338f1d2e73e625de0b30ff14b2af6 100644 (file)
@@ -68,16 +68,6 @@ unsetPostRequestElement('DOUBLER_USERID');
 setSession('DOUBLER_USERID', '');
 if (empty($GLOBALS['local_doubler_userid'])) $GLOBALS['local_doubler_userid'] = '0';
 
 setSession('DOUBLER_USERID', '');
 if (empty($GLOBALS['local_doubler_userid'])) $GLOBALS['local_doubler_userid'] = '0';
 
-// Init additional WHERE statement
-$whereStatement = ' ';
-
-// Is ext-holiday installed?
-// @TODO Rewrite these if() blocks to a filter
-if (isExtensionActive('holiday')) {
-       // Exclude those as well
-       $whereStatement .= " AND `d`.`holiday_active`='N'";
-} // END - if
-
 // Check for doubles which we can pay out
 $result_total = sqlQueryEscaped("SELECT
        COUNT(`do`.`id`) AS `cnt`,
 // Check for doubles which we can pay out
 $result_total = sqlQueryEscaped("SELECT
        COUNT(`do`.`id`) AS `cnt`,
@@ -89,7 +79,7 @@ ON
        `do`.`userid`=`d`.`userid`
 WHERE
        `d`.`status`='CONFIRMED'
        `do`.`userid`=`d`.`userid`
 WHERE
        `d`.`status`='CONFIRMED'
-       " . runFilterChain('user_exclusion_sql', $whereStatement) . " AND
+       " . runFilterChain('user_exclusion_sql', ' ' . $whereStatement) . " AND
        `do`.`points` <= %s AND
        `do`.`points` >= ({?doubler_min?} * 2) AND
        `do`.`completed`='N' AND
        `do`.`points` <= %s AND
        `do`.`points` >= ({?doubler_min?} * 2) AND
        `do`.`completed`='N' AND
@@ -121,7 +111,7 @@ ON
        `do`.`userid`=`d`.`userid`
 WHERE
        `d`.`status`='CONFIRMED'
        `do`.`userid`=`d`.`userid`
 WHERE
        `d`.`status`='CONFIRMED'
-       " . runFilterChain('user_exclusion_sql', $whereStatement) . " AND
+       " . runFilterChain('user_exclusion_sql', ' ' . $whereStatement) . " AND
        `do`.`points` <= %s AND
        `do`.`points` >= ({?doubler_min?} * 2) AND
        `do`.`completed`='N' AND
        `do`.`points` <= %s AND
        `do`.`points` >= ({?doubler_min?} * 2) AND
        `do`.`completed`='N' AND
index d35b1b4d9fc1bab289c67e62a83b60a0990d6756..c9fba992b4ed16a0f1621cdac36fbf993fbf9291 100644 (file)
@@ -51,11 +51,6 @@ if (isFilledArray($excludedUserids)) {
        $userExcludeSql = ' AND `d`.`userid` NOT IN (' . implode(', ', $excludedUserids) . ')';
 } // END - if
 
        $userExcludeSql = ' AND `d`.`userid` NOT IN (' . implode(', ', $excludedUserids) . ')';
 } // END - if
 
-// @TODO Rewrite this as a filter
-if (isExtensionInstalledAndNewer('holiday', '0.1.3')) {
-       $userExclusionSql .= " AND `d`.`holiday_active`='N'";
-} // END - if
-
 // Check for all accounts
 $result = sqlQuery("SELECT
        `d`.`userid`,
 // Check for all accounts
 $result = sqlQuery("SELECT
        `d`.`userid`,
@@ -73,7 +68,7 @@ WHERE
        (UNIX_TIMESTAMP() - `d`.`joined`) >= {?ap_inactive_since?} AND
        (UNIX_TIMESTAMP() - `d`.`last_online`) >= {?ap_inactive_since?} AND
        (UNIX_TIMESTAMP() - `d`.`ap_notified`) >= {?ap_inactive_since?}
        (UNIX_TIMESTAMP() - `d`.`joined`) >= {?ap_inactive_since?} AND
        (UNIX_TIMESTAMP() - `d`.`last_online`) >= {?ap_inactive_since?} AND
        (UNIX_TIMESTAMP() - `d`.`ap_notified`) >= {?ap_inactive_since?}
-       " . runFilterChain('user_exclusion_sql', $userExcludeSql) . "
+       " . runFilterChain('user_exclusion_sql', ' ' . $userExcludeSql) . "
 ORDER BY
        `d`.`userid` ASC", __FILE__, __LINE__);
 
 ORDER BY
        `d`.`userid` ASC", __FILE__, __LINE__);
 
index c10c443ab31251505a30dd55d50f164a71518c41..b722627dac866fea2a26f06aa043576c21446614 100644 (file)
@@ -199,7 +199,7 @@ LIMIT 1',
                }
 
                // Exclude other users
                }
 
                // Exclude other users
-               $whereStatement = runFilterChain('user_exclusion_sql', $whereStatement);
+               $whereStatement = runFilterChain('user_exclusion_sql', ' ' . $whereStatement);
        } elseif (isGetRequestElementSet('do')) {
                // Choose what we need to list
                switch (getRequestElement('do')) {
        } elseif (isGetRequestElementSet('do')) {
                // Choose what we need to list
                switch (getRequestElement('do')) {
@@ -236,7 +236,7 @@ LIMIT 1',
                // If it is not 'testers', add exclusion SQL
                if (getRequestElement('do') != 'testers') {
                        // Exclude tester users
                // If it is not 'testers', add exclusion SQL
                if (getRequestElement('do') != 'testers') {
                        // Exclude tester users
-                       $whereStatement = runFilterChain('user_exclusion_sql', $whereStatement);
+                       $whereStatement = runFilterChain('user_exclusion_sql', ' ' . $whereStatement);
                } // END - if
        } // END - if
 
                } // END - if
        } // END - if
 
index 6d6327ecd88a0162657b84ac25232cc4c60b75b0..0f0b21de63cafcf274442142e7b9afbb61b0d531 100644 (file)
@@ -54,7 +54,11 @@ if ((!isExtensionActive('html_mail')) && (!isAdmin())) {
 if (isFormSent()) {
        // Save settings
        sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `html`='%s' WHERE `userid`=%s LIMIT 1",
 if (isFormSent()) {
        // Save settings
        sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `html`='%s' WHERE `userid`=%s LIMIT 1",
-               array(postRequestElement('html'), getMemberId()), __FILE__, __LINE__);
+               array(
+                       postRequestElement('html'),
+                       getMemberId()
+               ), __FILE__, __LINE__
+       );
        displayMessage('{--MEMBER_SETTINGS_SAVED--}');
 } else {
        // Prepare it
        displayMessage('{--MEMBER_SETTINGS_SAVED--}');
 } else {
        // Prepare it
index cc8fdf421685eb1132743a28a07e7510ad3403a1..b064c4cb7a4c36564795579f0800c2255dc94c81 100644 (file)
@@ -315,14 +315,10 @@ ORDER BY
 
                        // Enable HTML checking
                        // @TODO Rewrite this to a filter
 
                        // Enable HTML checking
                        // @TODO Rewrite this to a filter
-                       $HTML = ''; $HOL_STRING = '';
+                       $HTML = '';
                        if ((isExtensionActive('html_mail')) && (postRequestElement('html') == 'Y')) {
                                $HTML = " AND `html`='Y'";
                        } // END - if
                        if ((isExtensionActive('html_mail')) && (postRequestElement('html') == 'Y')) {
                                $HTML = " AND `html`='Y'";
                        } // END - if
-                       if (isExtensionInstalledAndNewer('holiday', '0.1.3')) {
-                               // Extension's version is fine
-                               $HOL_STRING = " AND `holiday_active`='N'";
-                       } // END - if
 
                        // ... and begin loading stuff
                        while ($categoriesContent = sqlFetchArray($result_cats)) {
 
                        // ... and begin loading stuff
                        while ($categoriesContent = sqlFetchArray($result_cats)) {
index 79f50ac9fc93f826358e4b3935debbc4c820c73f..16cb2762d7d4e43c30d3d42af793ba3febd6349c 100644 (file)
@@ -67,12 +67,6 @@ if ((getBegRanks() > 0) && (!isCssOutputMode())) {
                $whereStatement .= ' AND (UNIX_TIMESTAMP() - `d`.`last_online`) < {?ap_inactive_since?}';
        } // END - if
 
                $whereStatement .= ' AND (UNIX_TIMESTAMP() - `d`.`last_online`) < {?ap_inactive_since?}';
        } // END - if
 
-       // Is ext-holiday installed?
-       if (isExtensionActive('holiday')) {
-               // Exclude those as well
-               $whereStatement .= " AND `d`.`holiday_active`='N'";
-       } // END - if
-
        // SQL string to check for accounts
        $result_main = sqlQuery("SELECT
        `d`.`userid`,
        // SQL string to check for accounts
        $result_main = sqlQuery("SELECT
        `d`.`userid`,
@@ -81,8 +75,7 @@ FROM
        `{?_MYSQL_PREFIX?}_user_data` AS `d`
 WHERE
        `d`.`status`='CONFIRMED'
        `{?_MYSQL_PREFIX?}_user_data` AS `d`
 WHERE
        `d`.`status`='CONFIRMED'
-       " . $whereStatement . "
-       " . runFilterChain('user_exclusion_sql', ' ') . " AND
+       " . runFilterChain('user_exclusion_sql', $whereStatement) . " AND
        `d`.`beg_points` > 0
 ORDER BY
        `d`.`beg_points` DESC,
        `d`.`beg_points` > 0
 ORDER BY
        `d`.`beg_points` DESC,
index a0f5cec2f67152afe782e20e2a13cd9095523164..b4bbfe0d838504dc4815c0de4a5f3caa363da39d 100644 (file)
@@ -60,12 +60,6 @@ if ((getBonusRanks() > 0) && (!isCssOutputMode())) {
                $whereStatement .= ' AND (UNIX_TIMESTAMP() - `d`.`last_online`) < {?ap_inactive_since?}';
        } // END - if
 
                $whereStatement .= ' AND (UNIX_TIMESTAMP() - `d`.`last_online`) < {?ap_inactive_since?}';
        } // END - if
 
-       // Is ext-holiday installed?
-       if (isExtensionActive('holiday')) {
-               // Exclude those as well
-               $whereStatement .= " AND `d`.`holiday_active`='N'";
-       } // END - if
-
        // Add more bonus points here by running a filter
        $add = runFilterChain('add_bonus_points_user_columns', '');
 
        // Add more bonus points here by running a filter
        $add = runFilterChain('add_bonus_points_user_columns', '');
 
index b98aea3993459c7cbbdeb1fb132acf30d5936ed4..da948fbee81fbe68a32abe9adba2f5357564d939 100644 (file)
@@ -1791,11 +1791,6 @@ function generateReceiverList ($categoryId, $receiver, $mode = '') {
                $addWhere .= " AND `d`.`holiday_active`='N'";
        } // END - if
 
                $addWhere .= " AND `d`.`holiday_active`='N'";
        } // END - if
 
-       // Include only HTML recipients?
-       if ((isExtensionActive('html_mail')) && ($mode == 'html')) {
-               $addWhere .= " AND `d`.`html`='Y'";
-       } // END - if
-
        // Run query
        $result = sqlQueryEscaped("SELECT
        `d`.`userid`
        // Run query
        $result = sqlQueryEscaped("SELECT
        `d`.`userid`
index a137f2ebb6315e07a2e528ee79773e3886aff946..b92e90cb5f3c12673b2eda92689d2c11785c4004 100644 (file)
@@ -59,12 +59,6 @@ if (isAutopurgeInactiveEnabled()) {
                $excludeSql = ' AND `userid` NOT IN (' . implode(', ', $excludedUserids) . ')';
        } // END - if
 
                $excludeSql = ' AND `userid` NOT IN (' . implode(', ', $excludedUserids) . ')';
        } // END - if
 
-       // Check for new holiday extension
-       if (isExtensionInstalledAndNewer('holiday', '0.1.3')) {
-               // Include only users with no active holiday
-               $excludeSql .= " AND `holiday_active`='N'";
-       } // END - if
-
        // Check for all accounts
        $result_inactive = sqlQuery("SELECT
        `userid`,
        // Check for all accounts
        $result_inactive = sqlQuery("SELECT
        `userid`,
@@ -77,7 +71,7 @@ WHERE
        (UNIX_TIMESTAMP() - `joined`) >= {?ap_inactive_since?} AND
        (UNIX_TIMESTAMP() - `last_online`) >= {?ap_inactive_since?} AND
        (UNIX_TIMESTAMP() - `ap_notified`) >= {?ap_inactive_since?}
        (UNIX_TIMESTAMP() - `joined`) >= {?ap_inactive_since?} AND
        (UNIX_TIMESTAMP() - `last_online`) >= {?ap_inactive_since?} AND
        (UNIX_TIMESTAMP() - `ap_notified`) >= {?ap_inactive_since?}
-       " . runFilterChain('user_exclusion_sql', $excludeSql) . "
+       " . runFilterChain('user_exclusion_sql', ' ' . $excludeSql) . "
 ORDER BY
        `userid` ASC", __FILE__, __LINE__);
 
 ORDER BY
        `userid` ASC", __FILE__, __LINE__);
 
@@ -130,7 +124,7 @@ FROM
        `{?_MYSQL_PREFIX?}_user_data`
 WHERE
        `status`='CONFIRMED'
        `{?_MYSQL_PREFIX?}_user_data`
 WHERE
        `status`='CONFIRMED'
-       " . runFilterChain('user_exclusion_sql', $excludeSql) . " AND
+       " . runFilterChain('user_exclusion_sql', ' ' . $excludeSql) . " AND
        (UNIX_TIMESTAMP() - `joined`) >= {?ap_inactive_since?} AND
        (UNIX_TIMESTAMP() - `last_online`) >= {?ap_inactive_since?} AND
        (UNIX_TIMESTAMP() - `ap_notified`) >= {?ap_inactive_time?} AND
        (UNIX_TIMESTAMP() - `joined`) >= {?ap_inactive_since?} AND
        (UNIX_TIMESTAMP() - `last_online`) >= {?ap_inactive_since?} AND
        (UNIX_TIMESTAMP() - `ap_notified`) >= {?ap_inactive_time?} AND