phpBB

Code Changes

File: phpbb/db/migration/data/v32x/fix_user_styles.php

  Unmodified   Added   Modified   Removed
Line 33Line 33
	public function styles_fix()
{
$default_style = (int) $this->config['default_style'];

	public function styles_fix()
{
$default_style = (int) $this->config['default_style'];

 
		$enabled_styles = array();


// Get enabled styles
$sql = 'SELECT style_id
FROM ' . STYLES_TABLE . '
WHERE style_active = 1';
$result = $this->db->sql_query($sql);


// Get enabled styles
$sql = 'SELECT style_id
FROM ' . STYLES_TABLE . '
WHERE style_active = 1';
$result = $this->db->sql_query($sql);

		$enabled_styles = $result->fetch_array();




		while ($row = $this->db->sql_fetchrow($result))
{
$enabled_styles[] = (int) $row['style_id'];
}

		$this->db->sql_freeresult($result);

// Set the default style to users who have an invalid style

		$this->db->sql_freeresult($result);

// Set the default style to users who have an invalid style