diff options
Diffstat (limited to 'phpBB/phpbb/db')
| -rw-r--r-- | phpBB/phpbb/db/driver/mssql.php | 8 | ||||
| -rw-r--r-- | phpBB/phpbb/db/driver/mssql_odbc.php | 8 | ||||
| -rw-r--r-- | phpBB/phpbb/db/driver/mssqlnative.php | 8 | ||||
| -rw-r--r-- | phpBB/phpbb/db/driver/mysql.php | 8 | ||||
| -rw-r--r-- | phpBB/phpbb/db/driver/mysqli.php | 45 | ||||
| -rw-r--r-- | phpBB/phpbb/db/driver/oracle.php | 8 | ||||
| -rw-r--r-- | phpBB/phpbb/db/driver/postgres.php | 8 | ||||
| -rw-r--r-- | phpBB/phpbb/db/driver/sqlite.php | 8 | ||||
| -rw-r--r-- | phpBB/phpbb/db/driver/sqlite3.php | 8 | ||||
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v310/contact_admin_acp_module.php | 10 | ||||
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v310/contact_admin_form.php | 10 | ||||
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v310/profilefield_facebook.php | 60 | ||||
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php | 60 | ||||
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v310/profilefield_skype.php | 60 | ||||
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v310/profilefield_twitter.php | 60 | ||||
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v310/profilefield_youtube.php | 60 | 
16 files changed, 411 insertions, 18 deletions
diff --git a/phpBB/phpbb/db/driver/mssql.php b/phpBB/phpbb/db/driver/mssql.php index 2e56638617..268463a151 100644 --- a/phpBB/phpbb/db/driver/mssql.php +++ b/phpBB/phpbb/db/driver/mssql.php @@ -137,6 +137,10 @@ class mssql extends \phpbb\db\driver\driver  			{  				$this->sql_report('start', $query);  			} +			else if (defined('PHPBB_DISPLAY_LOAD_TIME')) +			{ +				$this->curtime = microtime(true); +			}  			$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;  			$this->sql_add_num_queries($this->query_result); @@ -152,6 +156,10 @@ class mssql extends \phpbb\db\driver\driver  				{  					$this->sql_report('stop', $query);  				} +				else if (defined('PHPBB_DISPLAY_LOAD_TIME')) +				{ +					$this->sql_time += microtime(true) - $this->curtime; +				}  				if ($cache && $cache_ttl)  				{ diff --git a/phpBB/phpbb/db/driver/mssql_odbc.php b/phpBB/phpbb/db/driver/mssql_odbc.php index de90d878e7..8e5d4c7a4c 100644 --- a/phpBB/phpbb/db/driver/mssql_odbc.php +++ b/phpBB/phpbb/db/driver/mssql_odbc.php @@ -156,6 +156,10 @@ class mssql_odbc extends \phpbb\db\driver\mssql_base  			{  				$this->sql_report('start', $query);  			} +			else if (defined('PHPBB_DISPLAY_LOAD_TIME')) +			{ +				$this->curtime = microtime(true); +			}  			$this->last_query_text = $query;  			$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false; @@ -172,6 +176,10 @@ class mssql_odbc extends \phpbb\db\driver\mssql_base  				{  					$this->sql_report('stop', $query);  				} +				else if (defined('PHPBB_DISPLAY_LOAD_TIME')) +				{ +					$this->sql_time += microtime(true) - $this->curtime; +				}  				if ($cache && $cache_ttl)  				{ diff --git a/phpBB/phpbb/db/driver/mssqlnative.php b/phpBB/phpbb/db/driver/mssqlnative.php index a7f93c8feb..46a9b3a477 100644 --- a/phpBB/phpbb/db/driver/mssqlnative.php +++ b/phpBB/phpbb/db/driver/mssqlnative.php @@ -127,6 +127,10 @@ class mssqlnative extends \phpbb\db\driver\mssql_base  			{  				$this->sql_report('start', $query);  			} +			else if (defined('PHPBB_DISPLAY_LOAD_TIME')) +			{ +				$this->curtime = microtime(true); +			}  			$this->last_query_text = $query;  			$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false; @@ -145,6 +149,10 @@ class mssqlnative extends \phpbb\db\driver\mssql_base  				{  					$this->sql_report('stop', $query);  				} +				else if (defined('PHPBB_DISPLAY_LOAD_TIME')) +				{ +					$this->sql_time += microtime(true) - $this->curtime; +				}  				if ($cache && $cache_ttl)  				{ diff --git a/phpBB/phpbb/db/driver/mysql.php b/phpBB/phpbb/db/driver/mysql.php index 569bd4f10a..e93c7239e8 100644 --- a/phpBB/phpbb/db/driver/mysql.php +++ b/phpBB/phpbb/db/driver/mysql.php @@ -166,6 +166,10 @@ class mysql extends \phpbb\db\driver\mysql_base  			{  				$this->sql_report('start', $query);  			} +			else if (defined('PHPBB_DISPLAY_LOAD_TIME')) +			{ +				$this->curtime = microtime(true); +			}  			$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;  			$this->sql_add_num_queries($this->query_result); @@ -181,6 +185,10 @@ class mysql extends \phpbb\db\driver\mysql_base  				{  					$this->sql_report('stop', $query);  				} +				else if (defined('PHPBB_DISPLAY_LOAD_TIME')) +				{ +					$this->sql_time += microtime(true) - $this->curtime; +				}  				if ($cache && $cache_ttl)  				{ diff --git a/phpBB/phpbb/db/driver/mysqli.php b/phpBB/phpbb/db/driver/mysqli.php index 58361ff0f8..8fc306b2cc 100644 --- a/phpBB/phpbb/db/driver/mysqli.php +++ b/phpBB/phpbb/db/driver/mysqli.php @@ -71,10 +71,17 @@ class mysqli extends \phpbb\db\driver\mysql_base  			if (version_compare($this->sql_server_info(true), '5.0.2', '>='))  			{  				$result = @mysqli_query($this->db_connect_id, 'SELECT @@session.sql_mode AS sql_mode'); -				$row = @mysqli_fetch_assoc($result); -				@mysqli_free_result($result); +				if ($result !== null) +				{ +					$row = @mysqli_fetch_assoc($result); -				$modes = array_map('trim', explode(',', $row['sql_mode'])); +					$modes = array_map('trim', explode(',', $row['sql_mode'])); +				} +				else +				{ +					$modes = array(); +				} +				@mysqli_free_result($result);  				// TRADITIONAL includes STRICT_ALL_TABLES and STRICT_TRANS_TABLES  				if (!in_array('TRADITIONAL', $modes)) @@ -109,15 +116,18 @@ class mysqli extends \phpbb\db\driver\mysql_base  		if (!$use_cache || empty($cache) || ($this->sql_server_version = $cache->get('mysqli_version')) === false)  		{  			$result = @mysqli_query($this->db_connect_id, 'SELECT VERSION() AS version'); -			$row = @mysqli_fetch_assoc($result); -			@mysqli_free_result($result); +			if ($result !== null) +			{ +				$row = @mysqli_fetch_assoc($result); -			$this->sql_server_version = $row['version']; +				$this->sql_server_version = $row['version']; -			if (!empty($cache) && $use_cache) -			{ -				$cache->put('mysqli_version', $this->sql_server_version); +				if (!empty($cache) && $use_cache) +				{ +					$cache->put('mysqli_version', $this->sql_server_version); +				}  			} +			@mysqli_free_result($result);  		}  		return ($raw) ? $this->sql_server_version : 'MySQL(i) ' . $this->sql_server_version; @@ -165,6 +175,10 @@ class mysqli extends \phpbb\db\driver\mysql_base  			{  				$this->sql_report('start', $query);  			} +			else if (defined('PHPBB_DISPLAY_LOAD_TIME')) +			{ +				$this->curtime = microtime(true); +			}  			$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;  			$this->sql_add_num_queries($this->query_result); @@ -180,6 +194,10 @@ class mysqli extends \phpbb\db\driver\mysql_base  				{  					$this->sql_report('stop', $query);  				} +				else if (defined('PHPBB_DISPLAY_LOAD_TIME')) +				{ +					$this->sql_time += microtime(true) - $this->curtime; +				}  				if ($cache && $cache_ttl)  				{ @@ -224,7 +242,7 @@ class mysqli extends \phpbb\db\driver\mysql_base  			return $cache->sql_fetchrow($query_id);  		} -		if ($query_id !== false) +		if ($query_id !== false && $query_id !== null)  		{  			$result = @mysqli_fetch_assoc($query_id);  			return $result !== null ? $result : false; @@ -434,9 +452,12 @@ class mysqli extends \phpbb\db\driver\mysql_base  				$endtime = $endtime[0] + $endtime[1];  				$result = @mysqli_query($this->db_connect_id, $query); -				while ($void = @mysqli_fetch_assoc($result)) +				if ($result !== null)  				{ -					// Take the time spent on parsing rows into account +					while ($void = @mysqli_fetch_assoc($result)) +					{ +						// Take the time spent on parsing rows into account +					}  				}  				@mysqli_free_result($result); diff --git a/phpBB/phpbb/db/driver/oracle.php b/phpBB/phpbb/db/driver/oracle.php index bfc5373e35..d1a186f1ba 100644 --- a/phpBB/phpbb/db/driver/oracle.php +++ b/phpBB/phpbb/db/driver/oracle.php @@ -253,6 +253,10 @@ class oracle extends \phpbb\db\driver\driver  			{  				$this->sql_report('start', $query);  			} +			else if (defined('PHPBB_DISPLAY_LOAD_TIME')) +			{ +				$this->curtime = microtime(true); +			}  			$this->last_query_text = $query;  			$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false; @@ -430,6 +434,10 @@ class oracle extends \phpbb\db\driver\driver  				{  					$this->sql_report('stop', $query);  				} +				else if (defined('PHPBB_DISPLAY_LOAD_TIME')) +				{ +					$this->sql_time += microtime(true) - $this->curtime; +				}  				if ($cache && $cache_ttl)  				{ diff --git a/phpBB/phpbb/db/driver/postgres.php b/phpBB/phpbb/db/driver/postgres.php index a4aa9497ed..a67cd9f7c2 100644 --- a/phpBB/phpbb/db/driver/postgres.php +++ b/phpBB/phpbb/db/driver/postgres.php @@ -179,6 +179,10 @@ class postgres extends \phpbb\db\driver\driver  			{  				$this->sql_report('start', $query);  			} +			else if (defined('PHPBB_DISPLAY_LOAD_TIME')) +			{ +				$this->curtime = microtime(true); +			}  			$this->last_query_text = $query;  			$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false; @@ -195,6 +199,10 @@ class postgres extends \phpbb\db\driver\driver  				{  					$this->sql_report('stop', $query);  				} +				else if (defined('PHPBB_DISPLAY_LOAD_TIME')) +				{ +					$this->sql_time += microtime(true) - $this->curtime; +				}  				if ($cache && $cache_ttl)  				{ diff --git a/phpBB/phpbb/db/driver/sqlite.php b/phpBB/phpbb/db/driver/sqlite.php index f4c5e240fc..2112e5ba2f 100644 --- a/phpBB/phpbb/db/driver/sqlite.php +++ b/phpBB/phpbb/db/driver/sqlite.php @@ -121,6 +121,10 @@ class sqlite extends \phpbb\db\driver\driver  			{  				$this->sql_report('start', $query);  			} +			else if (defined('PHPBB_DISPLAY_LOAD_TIME')) +			{ +				$this->curtime = microtime(true); +			}  			$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;  			$this->sql_add_num_queries($this->query_result); @@ -136,6 +140,10 @@ class sqlite extends \phpbb\db\driver\driver  				{  					$this->sql_report('stop', $query);  				} +				else if (defined('PHPBB_DISPLAY_LOAD_TIME')) +				{ +					$this->sql_time += microtime(true) - $this->curtime; +				}  				if ($cache && $cache_ttl)  				{ diff --git a/phpBB/phpbb/db/driver/sqlite3.php b/phpBB/phpbb/db/driver/sqlite3.php index 2c6bf99497..6511c755a0 100644 --- a/phpBB/phpbb/db/driver/sqlite3.php +++ b/phpBB/phpbb/db/driver/sqlite3.php @@ -121,6 +121,10 @@ class sqlite3 extends \phpbb\db\driver\driver  			{  				$this->sql_report('start', $query);  			} +			else if (defined('PHPBB_DISPLAY_LOAD_TIME')) +			{ +				$this->curtime = microtime(true); +			}  			$this->last_query_text = $query;  			$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false; @@ -137,6 +141,10 @@ class sqlite3 extends \phpbb\db\driver\driver  				{  					$this->sql_report('stop', $query);  				} +				else if (defined('PHPBB_DISPLAY_LOAD_TIME')) +				{ +					$this->sql_time += microtime(true) - $this->curtime; +				}  				if ($cache && $cache_ttl)  				{ diff --git a/phpBB/phpbb/db/migration/data/v310/contact_admin_acp_module.php b/phpBB/phpbb/db/migration/data/v310/contact_admin_acp_module.php index bd682e2f7c..20bd547ac3 100644 --- a/phpBB/phpbb/db/migration/data/v310/contact_admin_acp_module.php +++ b/phpBB/phpbb/db/migration/data/v310/contact_admin_acp_module.php @@ -1,9 +1,13 @@  <?php  /**  * -* @package migration -* @copyright (c) 2014 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* 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.  *  */ diff --git a/phpBB/phpbb/db/migration/data/v310/contact_admin_form.php b/phpBB/phpbb/db/migration/data/v310/contact_admin_form.php index e255efb99d..c2dd09ddf6 100644 --- a/phpBB/phpbb/db/migration/data/v310/contact_admin_form.php +++ b/phpBB/phpbb/db/migration/data/v310/contact_admin_form.php @@ -1,9 +1,13 @@  <?php  /**  * -* @package migration -* @copyright (c) 2014 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* 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.  *  */ diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_facebook.php b/phpBB/phpbb/db/migration/data/v310/profilefield_facebook.php new file mode 100644 index 0000000000..5964e7a997 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_facebook.php @@ -0,0 +1,60 @@ +<?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\v310; + +class profilefield_facebook extends \phpbb\db\migration\profilefield_base_migration +{ +	static public function depends_on() +	{ +		return array( +			'\phpbb\db\migration\data\v310\profilefield_types', +			'\phpbb\db\migration\data\v310\profilefield_show_novalue', +		); +	} + +	public function update_data() +	{ +		return array( +			array('custom', array(array($this, 'create_custom_field'))), +		); +	} + +	protected $profilefield_name = 'phpbb_facebook'; + +	protected $profilefield_database_type = array('VCHAR', ''); + +	protected $profilefield_data = array( +		'field_name'			=> 'phpbb_facebook', +		'field_type'			=> 'profilefields.type.string', +		'field_ident'			=> 'phpbb_facebook', +		'field_length'			=> '20', +		'field_minlen'			=> '5', +		'field_maxlen'			=> '50', +		'field_novalue'			=> '', +		'field_default_value'	=> '', +		'field_validation'		=> '[\w.]+', +		'field_required'		=> 0, +		'field_show_novalue'	=> 0, +		'field_show_on_reg'		=> 0, +		'field_show_on_pm'		=> 1, +		'field_show_on_vt'		=> 1, +		'field_show_profile'	=> 1, +		'field_hide'			=> 0, +		'field_no_view'			=> 0, +		'field_active'			=> 1, +		'field_is_contact'		=> 1, +		'field_contact_desc'	=> 'VIEW_FACEBOOK_PROFILE', +		'field_contact_url'		=> 'http://facebook.com/%s/', +	); +} diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php b/phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php new file mode 100644 index 0000000000..9bef0a4c0b --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php @@ -0,0 +1,60 @@ +<?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\v310; + +class profilefield_googleplus extends \phpbb\db\migration\profilefield_base_migration +{ +	static public function depends_on() +	{ +		return array( +			'\phpbb\db\migration\data\v310\profilefield_types', +			'\phpbb\db\migration\data\v310\profilefield_show_novalue', +		); +	} + +	public function update_data() +	{ +		return array( +			array('custom', array(array($this, 'create_custom_field'))), +		); +	} + +	protected $profilefield_name = 'phpbb_googleplus'; + +	protected $profilefield_database_type = array('VCHAR', ''); + +	protected $profilefield_data = array( +		'field_name'			=> 'phpbb_googleplus', +		'field_type'			=> 'profilefields.type.googleplus', +		'field_ident'			=> 'phpbb_googleplus', +		'field_length'			=> '20', +		'field_minlen'			=> '3', +		'field_maxlen'			=> '255', +		'field_novalue'			=> '', +		'field_default_value'	=> '', +		'field_validation'		=> '[\w]+', +		'field_required'		=> 0, +		'field_show_novalue'	=> 0, +		'field_show_on_reg'		=> 0, +		'field_show_on_pm'		=> 1, +		'field_show_on_vt'		=> 1, +		'field_show_profile'	=> 1, +		'field_hide'			=> 0, +		'field_no_view'			=> 0, +		'field_active'			=> 1, +		'field_is_contact'		=> 1, +		'field_contact_desc'	=> 'VIEW_GOOGLEPLUS_PROFILE', +		'field_contact_url'		=> 'http://plus.google.com/%s', +	); +} diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_skype.php b/phpBB/phpbb/db/migration/data/v310/profilefield_skype.php new file mode 100644 index 0000000000..9a5de9d0eb --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_skype.php @@ -0,0 +1,60 @@ +<?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\v310; + +class profilefield_skype extends \phpbb\db\migration\profilefield_base_migration +{ +	static public function depends_on() +	{ +		return array( +			'\phpbb\db\migration\data\v310\profilefield_types', +			'\phpbb\db\migration\data\v310\profilefield_show_novalue', +		); +	} + +	public function update_data() +	{ +		return array( +			array('custom', array(array($this, 'create_custom_field'))), +		); +	} + +	protected $profilefield_name = 'phpbb_skype'; + +	protected $profilefield_database_type = array('VCHAR', ''); + +	protected $profilefield_data = array( +		'field_name'			=> 'phpbb_skype', +		'field_type'			=> 'profilefields.type.string', +		'field_ident'			=> 'phpbb_skype', +		'field_length'			=> '20', +		'field_minlen'			=> '6', +		'field_maxlen'			=> '32', +		'field_novalue'			=> '', +		'field_default_value'	=> '', +		'field_validation'		=> '[a-zA-Z][\w\.,\-_]+', +		'field_required'		=> 0, +		'field_show_novalue'	=> 0, +		'field_show_on_reg'		=> 0, +		'field_show_on_pm'		=> 1, +		'field_show_on_vt'		=> 1, +		'field_show_profile'	=> 1, +		'field_hide'			=> 0, +		'field_no_view'			=> 0, +		'field_active'			=> 1, +		'field_is_contact'		=> 1, +		'field_contact_desc'	=> 'VIEW_SKYPE_PROFILE', +		'field_contact_url'		=> 'skype:%s?userinfo', +	); +} diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_twitter.php b/phpBB/phpbb/db/migration/data/v310/profilefield_twitter.php new file mode 100644 index 0000000000..68d038f609 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_twitter.php @@ -0,0 +1,60 @@ +<?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\v310; + +class profilefield_twitter extends \phpbb\db\migration\profilefield_base_migration +{ +	static public function depends_on() +	{ +		return array( +			'\phpbb\db\migration\data\v310\profilefield_types', +			'\phpbb\db\migration\data\v310\profilefield_show_novalue', +		); +	} + +	public function update_data() +	{ +		return array( +			array('custom', array(array($this, 'create_custom_field'))), +		); +	} + +	protected $profilefield_name = 'phpbb_twitter'; + +	protected $profilefield_database_type = array('VCHAR', ''); + +	protected $profilefield_data = array( +		'field_name'			=> 'phpbb_twitter', +		'field_type'			=> 'profilefields.type.string', +		'field_ident'			=> 'phpbb_twitter', +		'field_length'			=> '20', +		'field_minlen'			=> '1', +		'field_maxlen'			=> '15', +		'field_novalue'			=> '', +		'field_default_value'	=> '', +		'field_validation'		=> '[\w_]+', +		'field_required'		=> 0, +		'field_show_novalue'	=> 0, +		'field_show_on_reg'		=> 0, +		'field_show_on_pm'		=> 1, +		'field_show_on_vt'		=> 1, +		'field_show_profile'	=> 1, +		'field_hide'			=> 0, +		'field_no_view'			=> 0, +		'field_active'			=> 1, +		'field_is_contact'		=> 1, +		'field_contact_desc'	=> 'VIEW_TWITTER_PROFILE', +		'field_contact_url'		=> 'http://twitter.com/%s', +	); +} diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_youtube.php b/phpBB/phpbb/db/migration/data/v310/profilefield_youtube.php new file mode 100644 index 0000000000..bb90c0aa5c --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_youtube.php @@ -0,0 +1,60 @@ +<?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\v310; + +class profilefield_youtube extends \phpbb\db\migration\profilefield_base_migration +{ +	static public function depends_on() +	{ +		return array( +			'\phpbb\db\migration\data\v310\profilefield_types', +			'\phpbb\db\migration\data\v310\profilefield_show_novalue', +		); +	} + +	public function update_data() +	{ +		return array( +			array('custom', array(array($this, 'create_custom_field'))), +		); +	} + +	protected $profilefield_name = 'phpbb_youtube'; + +	protected $profilefield_database_type = array('VCHAR', ''); + +	protected $profilefield_data = array( +		'field_name'			=> 'phpbb_youtube', +		'field_type'			=> 'profilefields.type.string', +		'field_ident'			=> 'phpbb_youtube', +		'field_length'			=> '20', +		'field_minlen'			=> '3', +		'field_maxlen'			=> '60', +		'field_novalue'			=> '', +		'field_default_value'	=> '', +		'field_validation'		=> '[a-zA-Z][\w\.,\-_]+', +		'field_required'		=> 0, +		'field_show_novalue'	=> 0, +		'field_show_on_reg'		=> 0, +		'field_show_on_pm'		=> 1, +		'field_show_on_vt'		=> 1, +		'field_show_profile'	=> 1, +		'field_hide'			=> 0, +		'field_no_view'			=> 0, +		'field_active'			=> 1, +		'field_is_contact'		=> 1, +		'field_contact_desc'	=> 'VIEW_YOUTUBE_CHANNEL', +		'field_contact_url'		=> 'http://youtube.com/user/%s', +	); +}  | 
