diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2017-10-22 10:19:30 +0200 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2017-10-22 10:19:30 +0200 |
| commit | 3b5c624c03351b4e4acbfc1d1818576e04faea69 (patch) | |
| tree | 103af4d8423e513f62b8e9a4c1740a357c33f9e9 /phpBB/phpbb/db/migration/data/v310 | |
| parent | 1d12d76790a2fa6d1fc746302cb2a33ec41c3341 (diff) | |
| parent | bace8dd31f0a5c2f95ae612e7e1b2e6d3083613b (diff) | |
| download | forums-3b5c624c03351b4e4acbfc1d1818576e04faea69.tar forums-3b5c624c03351b4e4acbfc1d1818576e04faea69.tar.gz forums-3b5c624c03351b4e4acbfc1d1818576e04faea69.tar.bz2 forums-3b5c624c03351b4e4acbfc1d1818576e04faea69.tar.xz forums-3b5c624c03351b4e4acbfc1d1818576e04faea69.zip | |
Merge pull request #4930 from rubencm/ticket/15201
[ticket/15201] Set user style to default style when it is disabled or uninstalled
Diffstat (limited to 'phpBB/phpbb/db/migration/data/v310')
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v310/style_update_p1.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/phpbb/db/migration/data/v310/style_update_p1.php b/phpBB/phpbb/db/migration/data/v310/style_update_p1.php index 2c7b7edf2e..f50ab33830 100644 --- a/phpBB/phpbb/db/migration/data/v310/style_update_p1.php +++ b/phpBB/phpbb/db/migration/data/v310/style_update_p1.php @@ -160,12 +160,12 @@ class style_update_p1 extends \phpbb\db\migration\migration FROM ' . STYLES_TABLE . " WHERE style_name = 'prosilver'"; $result = $this->sql_query($sql); - $default_style = $this->db->sql_fetchfield('style_id'); + $default_style = (int) $this->db->sql_fetchfield('style_id'); $this->db->sql_freeresult($result); $this->config->set('default_style', $default_style); - $sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = 0'; + $sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = ' . (int) $default_style; $this->sql_query($sql); } else @@ -183,9 +183,9 @@ class style_update_p1 extends \phpbb\db\migration\migration } // Reset styles for users - $this->sql_query('UPDATE ' . USERS_TABLE . ' - SET user_style = 0 - WHERE ' . $this->db->sql_in_set('user_style', $valid_styles, true)); + $this->sql_query('UPDATE ' . USERS_TABLE . " + SET user_style = '" . (int) $valid_styles[0] . "' + WHERE " . $this->db->sql_in_set('user_style', $valid_styles, true)); } } } |
