From cedddbf053339615522de6f64a4af11ed971453d Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Tue, 13 Sep 2011 11:39:08 +0200 Subject: [PATCH] When "EnableContextLinks" was disabled, the "IPAddressResolve" setting was ignored. The check order in AddContextLinks has been fixed now in order to solve the problem. --- src/include/functions_common.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/include/functions_common.php b/src/include/functions_common.php index eef4a76..32466d2 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -1350,10 +1350,6 @@ function AddContextLinks(&$sourceTxt) { global $szTLDDomains; - // check if user disabled Context Links. - if ( GetConfigSetting("EnableContextLinks", 1, CFGLEVEL_USER) == 0 ) - return; - // Return if not enabled! if ( GetConfigSetting("EnableIPAddressResolve", 0, CFGLEVEL_USER) == 1 ) { @@ -1361,6 +1357,10 @@ function AddContextLinks(&$sourceTxt) $sourceTxt = preg_replace( '/([^\[])\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/ie', "'\\1\\2.\\3.\\4.\\5' . ReverseResolveIP('\\2.\\3.\\4.\\5', ' {', '} ')", $sourceTxt ); } + // check if user disabled Context Links. + if ( GetConfigSetting("EnableContextLinks", 1, CFGLEVEL_USER) == 0 ) + return; + // Create if not set! if ( !isset($szTLDDomains) ) CreateTopLevelDomainSearch();