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

This commit is contained in:
scyrma 2008-04-11 06:58:20 +00:00
parent 0a013367cb
commit c18a3c1ffd

View File

@ -296,7 +296,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'])) {