aboutsummaryrefslogtreecommitdiffstats
path: root/config/squidGuard
diff options
context:
space:
mode:
authorsullrich <sullrich@pfsense.org>2009-12-12 00:05:18 -0500
committersullrich <sullrich@pfsense.org>2009-12-12 00:05:18 -0500
commit953a7ac711c1f56d6919c9a94b980ae14f7de0df (patch)
tree82e98c232a390158d2ddf3b0a84dc5d92d3d56e2 /config/squidGuard
parent486864632718f8783772a4ebc2956c4b09196e0f (diff)
downloadpfsense-packages-953a7ac711c1f56d6919c9a94b980ae14f7de0df.tar.gz
pfsense-packages-953a7ac711c1f56d6919c9a94b980ae14f7de0df.tar.bz2
pfsense-packages-953a7ac711c1f56d6919c9a94b980ae14f7de0df.zip
Test to see if is_url() exists
Diffstat (limited to 'config/squidGuard')
-rw-r--r--config/squidGuard/squidguard_configurator.inc20
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'