diff options
author | Sem <sembrestels@riseup.net> | 2014-01-22 04:05:47 +0100 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2014-01-22 04:05:47 +0100 |
commit | 68614b769f4ae4f28c3f395f47b68baba7c48c64 (patch) | |
tree | 2c5a744a3859d27883f92b72aef9cf81f1a947d0 /mod/profile/views/default/profile/details.php | |
parent | 69e2d8c5d8732042c9319aef1fdea45a82b63e42 (diff) | |
parent | c0295c275d6edbca6c6c8bb51dc199150d0d5fc3 (diff) | |
download | elgg-68614b769f4ae4f28c3f395f47b68baba7c48c64.tar.gz elgg-68614b769f4ae4f28c3f395f47b68baba7c48c64.tar.bz2 |
Merge branch 'release/1.8.1'
Diffstat (limited to 'mod/profile/views/default/profile/details.php')
-rw-r--r-- | mod/profile/views/default/profile/details.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/mod/profile/views/default/profile/details.php b/mod/profile/views/default/profile/details.php index 7b05b0e15..da4e95690 100644 --- a/mod/profile/views/default/profile/details.php +++ b/mod/profile/views/default/profile/details.php @@ -21,8 +21,22 @@ if (is_array($profile_fields) && sizeof($profile_fields) > 0) { continue; } $value = $user->$shortname; + if (!empty($value)) { - //This function controls the alternating class + + // fix profile URLs populated by https://github.com/Elgg/Elgg/issues/5232 + // @todo Replace with upgrade script, only need to alter users with last_update after 1.8.13 + if ($valtype == 'url' && $value == 'http://') { + $user->$shortname = ''; + continue; + } + + // validate urls + if ($valtype == 'url' && !preg_match('~^https?\://~i', $value)) { + $value = "http://$value"; + } + + // this controls the alternating class $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; ?> <div class="<?php echo $even_odd; ?>"> |