diff options
-rw-r--r-- | config/squidGuard/squidguard_configurator.inc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/config/squidGuard/squidguard_configurator.inc b/config/squidGuard/squidguard_configurator.inc index 81177b52..dcbb28f4 100644 --- a/config/squidGuard/squidguard_configurator.inc +++ b/config/squidGuard/squidguard_configurator.inc @@ -1758,15 +1758,17 @@ function sg_list_itemsfield($xml_items, $fld_name) # ------------------------------------------------------------------------------ # is_url - check url an err_codes # ------------------------------------------------------------------------------ -function is_url($url) -{ - if (empty($url)) return false; - if (eregi("^http://", $url)) return true; - if (eregi("^https://", $url)) return true; - if (strstr("blank", $url)) return true; - if (strstr("blank_img", $url)) return true; - if (eregi("^((30[1235]{1})|(40[0-9]{1})|(41[0-7]{1})|(50[0-5]{1}))", $url)) return true; # http error code 30x, 4xx, 50x. - return false; +if(!function_exists("is_url")) { + function is_url($url) + { + if (empty($url)) return false; + if (eregi("^http://", $url)) return true; + if (eregi("^https://", $url)) return true; + if (strstr("blank", $url)) return true; + if (strstr("blank_img", $url)) return true; + if (eregi("^((30[1235]{1})|(40[0-9]{1})|(41[0-7]{1})|(50[0-5]{1}))", $url)) return true; # http error code 30x, 4xx, 50x. + return false; + } } # url as 'domain/path': 'mydomain.com/index.php' |