]> git.mxchange.org Git - mailer.git/blobdiff - inc/filters.php
A lot has been rewritten, ext-teams added, ext-forced continued:
[mailer.git] / inc / filters.php
index 34574e46a599b1ca839a33a326f3610cc14ee2f8..2b241f52d69f48ad12796c5002bde464e67a0c87 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
@@ -487,7 +487,7 @@ function FILTER_COMPILE_EXPRESSION_CODE ($code) {
                        $callback       = '';
                        $extraFunction  = '';
                        $extraFunction2 = '';
-                       $value          = null;
+                       $value          = NULL;
 
                        // Extract command and call-back
                        $cmdArray = explode(',', $cmd);
@@ -842,9 +842,11 @@ function FILTER_INIT_RANDOM_NUMBER () {
 
 // Update module counter
 function FILTER_COUNT_MODULE () {
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getModule()=' . getModule() . ' - ENTERED!');
        // Do count all other modules but not accesses on CSS file css.php!
        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `clicks`=`clicks`+1 WHERE `module`='%s' LIMIT 1",
                array(getModule()), __FUNCTION__, __LINE__);
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getModule()=' . getModule() . ',SQL_AFFECTEDROWS()=' . SQL_AFFECTEDROWS() . ' - EXIT!');
 }
 
 // Handles fatal errors
@@ -861,10 +863,7 @@ function FILTER_HANDLE_FATAL_ERRORS () {
        // Load config here
        loadIncludeOnce('inc/load_config.php');
 
-       // Set unset variable
-       if (empty($check)) $check = '';
-
-       // Default is none
+       // Default content is none
        $content = '';
 
        // Installation phase or regular mode?
@@ -905,9 +904,9 @@ function FILTER_HANDLE_FATAL_ERRORS () {
        // Message to regular users (non-admin)
        $CORR = '{--FATAL_REPORT_ERRORS--}';
 
-       // PHP warnings fixed
-       if ($check == 'done') {
-               if (isAdmin()) $CORR = '{--FATAL_CORRECT_ERRORS--}';
+       // Maybe the admin wants to take a look?
+       if (isAdmin()) {
+               $CORR = '{--FATAL_CORRECT_ERRORS--}';
        } // END - if
 
        // Remember all in array
@@ -1128,5 +1127,20 @@ function FILTER_ACTIVATE_EXCHANGE () {
        } // END - if
 }
 
+// Filter to handle configuration
+function FILTER_HANDLE_HOME_IN_INDEX_SETTING ($data) {
+       // Is ext-sql_patches up-to-date?
+       if ((isExtensionInstalledAndNewer('sql_patches', '0.8.3')) && (isDisplayHomeInIndexEnabled())) {
+               // Is 'search' as same as 'index_home'?
+               if ($data['search'] == getIndexHome()) {
+                       // Then set 'content' to link to index.php
+                       $data['content'] = $data['prefix'] . '<strong><a class="you_are_here" href="{%url=index.php' . $data['link_add'] . '%}">' . getTitleFromMenu($data['access_level'], $data['search'], $data['type'], $data['add']) . '</a></strong>';
+               } // END - if
+       } // END - if
+
+       // Return data
+       return $data;
+}
+
 // [EOF]
 ?>