From: moodler Date: Fri, 30 Jul 2004 09:47:41 +0000 (+0000) Subject: Fixed URL detection X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8588f8728361709104fdc5f5eec07aaecf26f000;p=moodle.git Fixed URL detection --- diff --git a/mod/resource/lib.php b/mod/resource/lib.php index d386d124aa..c4f2568274 100644 --- a/mod/resource/lib.php +++ b/mod/resource/lib.php @@ -468,14 +468,11 @@ function resource_redirect_tags($text, $url, $tagtoparse, $keytoparse,$prefix = } function resource_is_url($path) { - $path = strtolower($path); - if (substr($path, 0, 7) == "http://") { - return true; - } - if (substr($path, 0, 6) == "ftp://") { + if (strpos($path, '://')) { return true; + } else { + return false; } - return false; } ?>