]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed URL detection
authormoodler <moodler>
Fri, 30 Jul 2004 09:47:41 +0000 (09:47 +0000)
committermoodler <moodler>
Fri, 30 Jul 2004 09:47:41 +0000 (09:47 +0000)
mod/resource/lib.php

index d386d124aaca12917976bdcee3257e26238f19a2..c4f2568274b2ed8f46df9d33f548ae93fa49c966 100644 (file)
@@ -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;
 }
 
 ?>