MDL-9410 - In user profile display, add http:// to web links if it's not already there

This commit is contained in:
scyrma 2008-04-11 07:03:20 +00:00
parent 388370bf88
commit a2ae4ee63b

View file

@ -277,7 +277,11 @@
}
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'])) {