]> git.mxchange.org Git - mailer.git/blobdiff - inc/filter/holiday_filter.php
Rewrote many parts:
[mailer.git] / inc / filter / holiday_filter.php
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]
+?>