diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-08-19 10:34:26 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-09-26 01:14:36 +0200 |
commit | 8aa9f1d3abe4ec2ad7d7692d70d19c4accb6ec43 (patch) | |
tree | e3ee68d5e7ffebc2dd868f493c02587c99f2c50c /phpBB/phpbb | |
parent | 3b7abb98e1178733054d91d260e8a6329ddaecca (diff) | |
download | forums-8aa9f1d3abe4ec2ad7d7692d70d19c4accb6ec43.tar forums-8aa9f1d3abe4ec2ad7d7692d70d19c4accb6ec43.tar.gz forums-8aa9f1d3abe4ec2ad7d7692d70d19c4accb6ec43.tar.bz2 forums-8aa9f1d3abe4ec2ad7d7692d70d19c4accb6ec43.tar.xz forums-8aa9f1d3abe4ec2ad7d7692d70d19c4accb6ec43.zip |
[ticket/11691] Move purge code into new function
PHPBB3-11691
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/db/migration/data/v310/notification_options_reconvert.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/phpbb/db/migration/data/v310/notification_options_reconvert.php b/phpBB/phpbb/db/migration/data/v310/notification_options_reconvert.php index 16509d7833..a4962b177d 100644 --- a/phpBB/phpbb/db/migration/data/v310/notification_options_reconvert.php +++ b/phpBB/phpbb/db/migration/data/v310/notification_options_reconvert.php @@ -19,22 +19,22 @@ class notification_options_reconvert extends \phpbb\db\migration\migration public function update_data() { return array( + array('custom', array(array($this, 'purge_notifications'))), array('custom', array(array($this, 'convert_notifications'))), ); } + public function purge_notifications() + { + $sql = 'DELETE FROM ' . $insert_table; + $this->sql_query($sql); + } + public function convert_notifications($start) { $insert_table = $this->table_prefix . 'user_notifications'; $insert_buffer = new \phpbb\db\sql_insert_buffer($this->db, $insert_table); - $start = (int) $start; - if ($start == 0) - { - $sql = 'DELETE FROM ' . $insert_table; - $this->db->sql_query($sql); - } - return $this->perform_conversion($insert_buffer, $insert_table, $start); } |