aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/migration/3_0_6_rc3.php
blob: 6a7ad1c56d34195cc19892467dde98aa5a296099 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
*
* @package migration
* @copyright (c) 2012 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
*
*/

class phpbb_db_migration_3_0_6_rc3 extends phpbb_db_migration
{
	function depends_on()
	{
		return array('phpbb_db_migration_3_0_6_rc2');
	}

	function update_schema()
	{
		return array();
	}

	function update_data()
	{
		return array(
			array('custom', array(array(&$this, 'update_cp_fields'))),
		);
	}

	function update_cp_fields()
	{
		// Update the Custom Profile Fields based on previous settings to the new format
		$sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . '
			SET field_show_on_vt = 1
			WHERE field_hide = 0
				AND (field_required = 1 OR field_show_on_reg = 1 OR field_show_profile = 1)';
		$this->sql_query($sql);
	}
}