]> git.mxchange.org Git - mailer.git/blobdiff - inc/filters.php
Extension ext-user (sub-id tracking) continued:
[mailer.git] / inc / filters.php
index f5b846c5b9db2151f49171df4aa8d2b20b975707..d69f999d2665876f910ffce9d93b02fa7b4c264a 100644 (file)
@@ -70,7 +70,7 @@ function FILTER_FLUSH_FILTERS () {
        $removed = '0';
 
        // Prepare SQL queries
-       $insertSQL = 'INSERT INTO `{?_MYSQL_PREFIX?}_filters` (`filter_name`,`filter_function`,`filter_active`) VALUES';
+       $insertSQL = 'INSERT INTO `{?_MYSQL_PREFIX?}_filters` (`filter_name`, `filter_function`, `filter_active`) VALUES';
        $removeSQL = 'DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_filters` WHERE';
 
        // Write all filters to database
@@ -993,10 +993,12 @@ function FILTER_FLUSH_TEMPLATE_CACHE () {
        // Is there cached eval() data?
        if ((isset($GLOBALS['template_eval'])) && (count($GLOBALS['template_eval']) > 0)) {
                // Now flush all
-               foreach ($GLOBALS['template_eval'] as $template => $eval) {
-                       // Flush the cache (if not yet found)
-                       flushTemplateCache($template, $eval);
-               } // END - if
+               foreach ($GLOBALS['template_eval'] as $prefix => $templateArray) {
+                       foreach ($templateArray as $template => $eval) {
+                               // Flush the cache (if not yet found)
+                               flushTemplateCache($prefix, $template, $eval);
+                       } // END - foreach
+               } // END - foreach
        } // END - if
 }
 
@@ -1174,7 +1176,7 @@ function FILTER_HANDLE_HOME_IN_INDEX_SETTING ($filterData) {
 // Filter to add history entry
 function FILTER_ADD_HISTORY_ENTRY ($filterData) {
        // Add the entry
-       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_history` (`history_subject`,`history_userid`,`history_value`) VALUES ('%s',%s,'%s')",
+       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_history` (`history_subject`, `history_userid`, `history_value`) VALUES ('%s',%s,'%s')",
                $filterData,
                __FUNCTION__, __LINE__);
 
@@ -1234,23 +1236,11 @@ function FILTER_INIT_SESSION ($filterData) {
 }
 
 // Filter for sending "build mail" to admin
-function FILTER_SEND_ADMIN_BUILD_MAIL ($filterData) {
-       // Is the module 'admin'?
-       if (getModule() == 'admin') {
-               // Okay, then call the proper function
-               call_user_func_array('sendAdminBuildMails', $filterData);
-       } // END - if
-
-       // Return data
-       return $filterData;
-}
-
-// Filter for sending "build mail" to member
-function FILTER_SEND_MEMBER_BUILD_MAIL ($filterData) {
-       // Is the module 'login'?
-       if (getModule() == 'login') {
-               // Okay, then call the proper function
-               call_user_func_array('sendMemberBuildMails', $filterData);
+function FILTER_SEND_BUILD_MAIL ($filterData) {
+       // Was one line updated?
+       if ($filterData['affected'] > 0) {
+               // Then call the proper function
+               call_user_func_array('sendGenericBuildMails', $filterData);
        } // END - if
 
        // Return data