aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/profilefields
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2018-01-07 18:43:45 +0100
committerMarc Alexander <admin@m-a-styles.de>2018-01-07 18:43:45 +0100
commit7e2136587a4d5f2f011189aca6f94ee6a780eaf1 (patch)
tree763217246e4df1f69d6612c0ed1397bc05fbec74 /phpBB/phpbb/profilefields
parent182a96f2738316adcb292816a9ac8af0e0cb5866 (diff)
parent77b275181aeddf43e1077d06abce11a9722bb85a (diff)
downloadforums-7e2136587a4d5f2f011189aca6f94ee6a780eaf1.tar
forums-7e2136587a4d5f2f011189aca6f94ee6a780eaf1.tar.gz
forums-7e2136587a4d5f2f011189aca6f94ee6a780eaf1.tar.bz2
forums-7e2136587a4d5f2f011189aca6f94ee6a780eaf1.tar.xz
forums-7e2136587a4d5f2f011189aca6f94ee6a780eaf1.zip
Merge branch 'prep-release-3.2.2' into 3.2.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);
+ }
}