diff options
author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-04-30 21:38:40 -0500 |
---|---|---|
committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-04-30 21:38:40 -0500 |
commit | 2f2feaa4e8ad9a18fd9ddcb7d65ae958c544dbcb (patch) | |
tree | 7a6fbc78628af97c65b5d7ace7443050de27b2d3 /phpBB | |
parent | f2e618a05de5f406477363cb9236aca46569afe1 (diff) | |
download | forums-2f2feaa4e8ad9a18fd9ddcb7d65ae958c544dbcb.tar forums-2f2feaa4e8ad9a18fd9ddcb7d65ae958c544dbcb.tar.gz forums-2f2feaa4e8ad9a18fd9ddcb7d65ae958c544dbcb.tar.bz2 forums-2f2feaa4e8ad9a18fd9ddcb7d65ae958c544dbcb.tar.xz forums-2f2feaa4e8ad9a18fd9ddcb7d65ae958c544dbcb.zip |
[ticket/11413] Don't use the database for the convert test
Different databases seem to work slightly differently here and are causing
errors
PHPBB3-11413
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/db/migration/data/310/notifications2.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/phpBB/includes/db/migration/data/310/notifications2.php b/phpBB/includes/db/migration/data/310/notifications2.php index 44b3f8fd49..c90944dcc9 100644 --- a/phpBB/includes/db/migration/data/310/notifications2.php +++ b/phpBB/includes/db/migration/data/310/notifications2.php @@ -100,7 +100,16 @@ class phpbb_db_migration_data_310_notifications2 extends phpbb_db_migration public function convert_notifications() { $insert_table = $this->table_prefix . 'user_notifications'; + $insert_buffer = new phpbb_db_sql_insert_buffer($this->db, $insert_table); + + $this->perform_conversion($insert_buffer, $insert_table); + } + /** + * Perform the conversion (separate for testability) + */ + public function perform_conversion($insert_buffer, $insert_table) + { $sql = 'DELETE FROM ' . $insert_table; $this->db->sql_query($sql); @@ -108,7 +117,6 @@ class phpbb_db_migration_data_310_notifications2 extends phpbb_db_migration FROM ' . USERS_TABLE; $result = $this->db->sql_query($sql); - $insert_buffer = new phpbb_db_sql_insert_buffer($this->db, $insert_table); while ($row = $this->db->sql_fetchrow($result)) { $notification_methods = array(); @@ -162,6 +170,7 @@ class phpbb_db_migration_data_310_notifications2 extends phpbb_db_migration 'item_type' => $item_type, 'item_id' => (int) $item_id, 'user_id' => (int) $user_id, + 'notify' => 1 ); foreach ($methods as $method) |