phpBB

Code Changes

File: phpbb/db/migration/data/v310/style_update_p1.php

  Unmodified   Added   Modified   Removed
Line 92Line 92
		else
{
$sql = 'SELECT s.style_id, t.template_path, t.template_id, t.bbcode_bitfield, t.template_inherits_id, t.template_inherit_path, c.theme_path, c.theme_id

		else
{
$sql = 'SELECT s.style_id, t.template_path, t.template_id, t.bbcode_bitfield, t.template_inherits_id, t.template_inherit_path, c.theme_path, c.theme_id

				FROM ' . STYLES_TABLE . ' s, ' . $this->table_prefix . 'styles_template t, ' . $this->table_prefix . "stles_theme c

				FROM ' . STYLES_TABLE . ' s, ' . $this->table_prefix . 'styles_template t, ' . $this->table_prefix . "styles_theme c

				WHERE t.template_id = s.template_id
AND c.theme_id = s.theme_id";
}

				WHERE t.template_id = s.template_id
AND c.theme_id = s.theme_id";
}

Line 136Line 136
		if (!sizeof($valid_styles))
{
// No valid styles: remove everything and add prosilver

		if (!sizeof($valid_styles))
{
// No valid styles: remove everything and add prosilver

			$this->sql_query('DELETE FROM ' . STYLES_TABLE, $errored, $error_ary);

			$this->sql_query('DELETE FROM ' . STYLES_TABLE);


$sql_ary = array(
'style_name' => 'prosilver',


$sql_ary = array(
'style_name' => 'prosilver',

Line 157Line 157
			$this->sql_query($sql);

$sql = 'SELECT style_id

			$this->sql_query($sql);

$sql = 'SELECT style_id

				FROM ' . $table . "

				FROM ' . STYLES_TABLE . "

				WHERE style_name = 'prosilver'";
$result = $this->sql_query($sql);

				WHERE style_name = 'prosilver'";
$result = $this->sql_query($sql);

			$default_style = $this->db->sql_fetchfield($result);

			$default_style = $this->db->sql_fetchfield('style_id');

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


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


			set_config('default_style', $default_style);

			$this->config->set('default_style', $default_style);


$sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = 0';
$this->sql_query($sql);


$sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = 0';
$this->sql_query($sql);