1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-21 07:51:33 +02:00

[ticket/12169] Add new option to display profile fields on memberlist

PHPBB3-12169
This commit is contained in:
Joas Schilling
2014-02-10 16:28:21 +01:00
parent 3c46aeb005
commit 995019a992
15 changed files with 72 additions and 7 deletions

View File

@@ -15,6 +15,7 @@ class profilefield_location extends \phpbb\db\migration\profilefield_base_migrat
{
return array(
'\phpbb\db\migration\data\v310\profilefield_types',
'\phpbb\db\migration\data\v310\profilefield_on_memberlist',
);
}

View File

@@ -0,0 +1,47 @@
<?php
/**
*
* @package migration
* @copyright (c) 2014 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
*
*/
namespace phpbb\db\migration\data\v310;
class profilefield_on_memberlist extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
return $this->db_tools->sql_column_exists($this->table_prefix . 'profile_fields', 'field_show_on_ml');
}
static public function depends_on()
{
return array(
'\phpbb\db\migration\data\v310\profilefield_cleanup',
);
}
public function update_schema()
{
return array(
'add_columns' => array(
$this->table_prefix . 'profile_fields' => array(
'field_show_on_ml' => array('BOOL', 0),
),
),
);
}
public function revert_schema()
{
return array(
'drop_columns' => array(
$this->table_prefix . 'profile_fields' => array(
'field_show_on_ml',
),
),
);
}
}