From 8588f8728361709104fdc5f5eec07aaecf26f000 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 30 Jul 2004 09:47:41 +0000 Subject: [PATCH] Fixed URL detection --- mod/resource/lib.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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; } ?> -- 2.39.5