diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2017-12-31 17:12:50 +0100 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2017-12-31 17:12:50 +0100 |
| commit | b2dacefbe7123cf8e4e854b2f4de959d82ab1ee2 (patch) | |
| tree | e23e7665082f5c9453c42732d24b601b891fc436 /phpBB/phpbb | |
| parent | 93621aa1844ab48d9bae068d9872d2c49ae86de4 (diff) | |
| parent | 0c3f7c6c8e352a73dacc1ff21a2b39a556ea6deb (diff) | |
| download | forums-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')
| -rw-r--r-- | phpBB/phpbb/cache/driver/memcached.php | 2 | ||||
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v31x/v3112.php | 36 | ||||
| -rw-r--r-- | phpBB/phpbb/profilefields/type/type_url.php | 15 |
3 files changed, 51 insertions, 2 deletions
diff --git a/phpBB/phpbb/cache/driver/memcached.php b/phpBB/phpbb/cache/driver/memcached.php index a7da22d7e8..808e15afe8 100644 --- a/phpBB/phpbb/cache/driver/memcached.php +++ b/phpBB/phpbb/cache/driver/memcached.php @@ -68,7 +68,7 @@ class memcached extends \phpbb\cache\driver\memory foreach (explode(',', PHPBB_ACM_MEMCACHE) as $u) { preg_match('#(.*)/(\d+)#', $u, $parts); - $this->memcache->addServer(trim($parts[1]), (int) trim($parts[2])); + $this->memcached->addServer(trim($parts[1]), (int) trim($parts[2])); } } diff --git a/phpBB/phpbb/db/migration/data/v31x/v3112.php b/phpBB/phpbb/db/migration/data/v31x/v3112.php new file mode 100644 index 0000000000..0d75d35184 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v31x/v3112.php @@ -0,0 +1,36 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\db\migration\data\v31x; + +class v3112 extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + return phpbb_version_compare($this->config['version'], '3.1.12', '>='); + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v31x\v3111', + ); + } + + public function update_data() + { + return array( + array('config.update', array('version', '3.1.12')), + ); + } +} 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); + } } |
