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();