$pattern['d1g12'] = $http . $domain1 . $getstring1;
$pattern['d2g12'] = $http . $domain2 . $getstring1;
$pattern['ipg12'] = $http . $ip . $getstring1;
+
// Test all patterns
$reg = false;
foreach ($pattern as $key => $pat) {
// Debug regex?
- if (isDebugRegExpressionEnabled()) {
+ if (isDebugRegularExpressionEnabled()) {
// @TODO Are these convertions still required?
$pat = str_replace('.', "\.", $pat);
$pat = str_replace('@', "\@", $pat);
} // END - if
// Check if expression matches
- $reg = ($reg || preg_match(('^' . $pat.'^'), $url));
+ $reg = ($reg || preg_match(('^' . $pat . '^'), $url));
// Does it match?
if ($reg === true) break;
// Checks wether SQL debugging is enabled
function isSqlDebuggingEnabled () {
- return ((isConfigEntrySet('DEBUG_SQL')) && (getConfig('DEBUG_SQL') == 'Y'));
+ // Is cache set?
+ if (!isset($GLOBALS['is_sql_debug_enabled'])) {
+ // Determine if SQL debugging is enabled
+ $GLOBALS['is_sql_debug_enabled'] = ((isConfigEntrySet('DEBUG_SQL')) && (getConfig('DEBUG_SQL') == 'Y'));
+ } // END - if
+
+ // Return it
+ return $GLOBALS['is_sql_debug_enabled'];
}
// Checks wether we shall debug regular expressions
-function isDebugRegExpressionEnabled () {
+function isDebugRegularExpressionEnabled () {
// Simply check it
return ((isConfigEntrySet('DEBUG_REGEX')) && (getConfig('DEBUG_REGEX') == 'Y'));
}