aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/profilefields
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2017-12-31 17:12:50 +0100
committerMarc Alexander <admin@m-a-styles.de>2017-12-31 17:12:50 +0100
commitb2dacefbe7123cf8e4e854b2f4de959d82ab1ee2 (patch)
treee23e7665082f5c9453c42732d24b601b891fc436 /phpBB/phpbb/profilefields
parent93621aa1844ab48d9bae068d9872d2c49ae86de4 (diff)
parent0c3f7c6c8e352a73dacc1ff21a2b39a556ea6deb (diff)
downloadforums-b2dacefbe7123cf8e4e854b2f4de959d82ab1ee2.tar
forums-b2dacefbe7123cf8e4e854b2f4de959d82ab1ee2.tar.gz
forums-b2dacefbe7123cf8e4e854b2f4de959d82ab1ee2.tar.bz2
forums-b2dacefbe7123cf8e4e854b2f4de959d82ab1ee2.tar.xz
forums-b2dacefbe7123cf8e4e854b2f4de959d82ab1ee2.zip
Merge branch 'prep-release-3.1.12' into 3.1.x
Diffstat (limited to 'phpBB/phpbb/profilefields')
-rw-r--r--phpBB/phpbb/profilefields/type/type_url.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/phpBB/phpbb/profilefields/type/type_url.php b/phpBB/phpbb/profilefields/type/type_url.php
index 375cf5b19a..37815b66a5 100644
--- a/phpBB/phpbb/profilefields/type/type_url.php
+++ b/phpBB/phpbb/profilefields/type/type_url.php
@@ -64,11 +64,24 @@ class type_url extends type_string
return false;
}
- if (!preg_match('#^' . get_preg_expression('url') . '$#iu', $field_value))
+ if (!preg_match('#^' . get_preg_expression('url_http') . '$#iu', $field_value))
{
return $this->user->lang('FIELD_INVALID_URL', $this->get_field_name($field_data['lang_name']));
}
return false;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_profile_value($field_value, $field_data)
+ {
+ if (!preg_match('#^' . get_preg_expression('url_http') . '$#iu', $field_value))
+ {
+ return null;
+ }
+
+ return parent::get_profile_value($field_value, $field_data);
+ }
}