]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-9410 - In user profile display, add http:// to web links if it's not already...
authorscyrma <scyrma>
Fri, 11 Apr 2008 06:58:20 +0000 (06:58 +0000)
committerscyrma <scyrma>
Fri, 11 Apr 2008 06:58:20 +0000 (06:58 +0000)
user/view.php

index 2b535032a8886fe8b9b246b54674ff08c05e81a7..c42633307fc712fc9dbfb33ef37c1783116e4f33 100644 (file)
     }
 
     if ($user->url && !isset($hiddenfields['webpage'])) {
-        print_row(get_string("webpage").":", "<a href=\"$user->url\">$user->url</a>");
+        $url = $user->url;
+        if (strpos($user->url, '://') === false) {
+            $url = 'http://'. $url;
+        }
+        print_row(get_string("webpage") .":", "<a href=\"$url\">$user->url</a>");
     }
 
     if ($user->icq && !isset($hiddenfields['icqnumber'])) {