X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Ffilters.php;h=4380a52ba341912cd0b7f7ff4bbb2ae0bf349350;hb=8268379f7f0f38f5cd605714ecd5cbfacff0e282;hp=1b26cddabb587c8d6bdbb2372242e0cbc950aad2;hpb=06d97fddd5c72e2b1c14ddb855b7eddc53f169a7;p=mailer.git diff --git a/inc/filters.php b/inc/filters.php index 1b26cddabb..4380a52ba3 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -95,20 +95,14 @@ function FILTER_FLUSH_FILTERS () { // Something has been added? if ($inserted > 0) { - // Finish SQL command - $insertSQL = substr($insertSQL, 0, -1); - - // And run it - addSql($insertSQL); + // Finish SQL command and add it + addSql(substr($insertSQL, 0, -1)); } // END - if // Something has been removed? if ($removed > 0) { - // Finish SQL command - $removeSQL = substr($removeSQL, 0, -2) . 'LIMIT '.$removed; - - // And run it - addSql($removeSQL); + // Finish SQL command and add it + addSql(substr($removeSQL, 0, -2) . 'LIMIT ' . $removed); } // END - if // Shall we update usage counters (ONLY FOR DEBUGGING!) @@ -331,28 +325,6 @@ function FILTER_UPDATE_LOGIN_DATA () { SQL_FREERESULT($result); } -// Filter for checking admin ACL -function FILTER_CHECK_ADMIN_ACL () { - // Extension not installed so it's always allowed to access everywhere! - $ret = true; - - // Ok, Cookie-Update done - if ((isExtensionInstalledAndNewer('admins', '0.3.0')) && (isExtensionActive('admins'))) { - // Check if action GET variable was set - $action = getAction(); - if (isWhatSet()) { - // Get action value by what-value - $action = getModeAction('admin', getWhat()); - } // END - if - - // Check for access control line of current menu entry - $ret = adminsCheckAdminAcl($action, getWhat()); - } // END - if - - // Return result - return $ret; -} - // Filter for initializing randomizer function FILTER_INIT_RANDOMIZER () { // Simply init the randomizer with seed and _ADD value @@ -442,9 +414,15 @@ function FILTER_COMPILE_CONFIG ($code) { if (isConfigEntrySet($matches[1][$key])) { // Set it for caching $GLOBALS['compile_config'][$matches[1][$key]] = getConfig($matches[1][$key]); - } else { + } elseif (isConfigEntrySet('default_' . strtoupper($matches[1][$key]))) { + // Use default value + $GLOBALS['compile_config'][$matches[1][$key]] = getConfig('DEFAULT_' . strtoupper($matches[1][$key])); + } elseif (isMessageIdValid('DEFAULT_' . strtoupper($matches[1][$key]))) { // No config, try the language system $GLOBALS['compile_config'][$matches[1][$key]] = getMessage('DEFAULT_' . strtoupper($matches[1][$key])); + } else { + // Unhandled! + $GLOBALS['compile_config'][$matches[1][$key]] = '!' . $matches[1][$key] . '!'; } } // END - if