From ab83995f4493f78aec3d3281650c0f9d8bb74843 Mon Sep 17 00:00:00 2001 From: Shitiz Garg Date: Wed, 18 Jun 2014 19:36:14 +0530 Subject: [ticket/12730] Add a Google+ field by default PHPBB3-12730 --- .../data/v310/profilefield_googleplus.php | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php (limited to 'phpBB/phpbb/db/migration') 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..8f9a9ed32f --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php @@ -0,0 +1,60 @@ + +* @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' => '', + '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', + ); +} \ No newline at end of file -- cgit v1.2.1 From e1454ec4872e22d9a3fe6e9a147d9926212c11b7 Mon Sep 17 00:00:00 2001 From: Shitiz Garg Date: Thu, 19 Jun 2014 03:45:51 +0530 Subject: [ticket/12730] Minor formatting fixes PHPBB3-12730 --- phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/db/migration') diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php b/phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php index 8f9a9ed32f..bba20d117b 100644 --- a/phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php @@ -57,4 +57,4 @@ class profilefield_googleplus extends \phpbb\db\migration\profilefield_base_migr 'field_contact_desc' => 'VIEW_GOOGLEPLUS_PROFILE', 'field_contact_url' => 'http://plus.google.com/%s', ); -} \ No newline at end of file +} -- cgit v1.2.1 From e51a5791dd66870ae056394efca759338dd4d9c4 Mon Sep 17 00:00:00 2001 From: Shitiz Garg Date: Sat, 21 Jun 2014 03:51:08 +0530 Subject: [ticket/12730] Update maxlen for type_googleplus to 255 PHPBB3-12730 --- phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/db/migration') diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php b/phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php index bba20d117b..9bef0a4c0b 100644 --- a/phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php @@ -40,7 +40,7 @@ class profilefield_googleplus extends \phpbb\db\migration\profilefield_base_migr 'field_ident' => 'phpbb_googleplus', 'field_length' => '20', 'field_minlen' => '3', - 'field_maxlen' => '', + 'field_maxlen' => '255', 'field_novalue' => '', 'field_default_value' => '', 'field_validation' => '[\w]+', -- cgit v1.2.1