diff options
author | Cash Costello <cash.costello@gmail.com> | 2013-03-21 15:40:14 -0700 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2013-03-21 15:40:14 -0700 |
commit | ea5cb2677411bf9f0307d650399a848c4c8e208d (patch) | |
tree | 843f13b4d401fe139e879ce0e47e3f9940c8d591 /mod | |
parent | 4da579033674ecdb134bc921f3f0666072419e6c (diff) | |
parent | 33015121e7ec691372a56be0c5ef03d24d9c3aac (diff) | |
download | elgg-ea5cb2677411bf9f0307d650399a848c4c8e208d.tar.gz elgg-ea5cb2677411bf9f0307d650399a848c4c8e208d.tar.bz2 |
Merge pull request #5263 from mrclay/5232-autofix
Auto-fixes profile URLs broken by #5232
Diffstat (limited to 'mod')
-rw-r--r-- | mod/profile/views/default/profile/details.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mod/profile/views/default/profile/details.php b/mod/profile/views/default/profile/details.php index 15df6c2fd..da4e95690 100644 --- a/mod/profile/views/default/profile/details.php +++ b/mod/profile/views/default/profile/details.php @@ -23,6 +23,14 @@ if (is_array($profile_fields) && sizeof($profile_fields) > 0) { $value = $user->$shortname; if (!empty($value)) { + + // 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"; |