aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/migration/data/style_update_p2.php
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2013-01-08 22:09:14 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2013-01-09 16:44:07 -0600
commit5c91e2569cb3a400acd20bf06cc0e609dd63a778 (patch)
tree0e449198b6e9c5c0875b5107008de4e633b63cd3 /phpBB/includes/db/migration/data/style_update_p2.php
parent826607a40509d40ba5a85e5b0bc72a54f77d41d6 (diff)
downloadforums-5c91e2569cb3a400acd20bf06cc0e609dd63a778.tar
forums-5c91e2569cb3a400acd20bf06cc0e609dd63a778.tar.gz
forums-5c91e2569cb3a400acd20bf06cc0e609dd63a778.tar.bz2
forums-5c91e2569cb3a400acd20bf06cc0e609dd63a778.tar.xz
forums-5c91e2569cb3a400acd20bf06cc0e609dd63a778.zip
[feature/migrations] Migrations now somewhat works
PHPBB3-9737
Diffstat (limited to 'phpBB/includes/db/migration/data/style_update_p2.php')
-rw-r--r--phpBB/includes/db/migration/data/style_update_p2.php43
1 files changed, 1 insertions, 42 deletions
diff --git a/phpBB/includes/db/migration/data/style_update_p2.php b/phpBB/includes/db/migration/data/style_update_p2.php
index 2c0991de59..db4b7f1753 100644
--- a/phpBB/includes/db/migration/data/style_update_p2.php
+++ b/phpBB/includes/db/migration/data/style_update_p2.php
@@ -37,47 +37,6 @@ class phpbb_db_migration_data_style_update_p2 extends phpbb_db_migration
public function update_data()
{
- return array(
- array('custom', array(array($this, 'styles_update'))),
- );
- }
-
- public function styles_update()
- {
- // Remove old entries from styles table
- if (!sizeof($valid_styles))
- {
- // No valid styles: remove everything and add prosilver
- $this->sql_query('DELETE FROM ' . STYLES_TABLE, $errored, $error_ary);
-
- $sql = 'INSERT INTO ' . STYLES_TABLE . " (style_name, style_copyright, style_active, style_path, bbcode_bitfield, style_parent_id, style_parent_tree) VALUES ('prosilver', '&copy; phpBB Group', 1, 'prosilver', 'kNg=', 0, '')";
- $this->sql_query($sql);
-
- $sql = 'SELECT style_id
- FROM ' . $table . "
- WHERE style_name = 'prosilver'";
- $result = $this->sql_query($sql);
- $default_style = $this->db->sql_fetchfield($result);
- $this->db->sql_freeresult($result);
-
- set_config('default_style', $default_style);
-
- $sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = 0';
- $this->sql_query($sql);
- }
- else
- {
- // There are valid styles in styles table. Remove styles that are outdated
- $this->sql_query('DELETE FROM ' . STYLES_TABLE . ' WHERE ' . $this->db->sql_in_set('style_id', $valid_styles, true), $errored, $error_ary);
-
- // Change default style
- if (!in_array($config['default_style'], $valid_styles))
- {
- set_config('default_style', $valid_styles[0]);
- }
-
- // 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), $errored, $error_ary);
- }
+ return array();
}
}