aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-08-20 00:35:34 +0200
committerJoas Schilling <nickvergessen@gmx.de>2013-09-26 01:16:37 +0200
commit07186656c8ea73a3e303998d465f08cc9f4598c4 (patch)
tree8023bb5fdaa9f466b14c94ddc3add5b0c4f73a6b
parent8aa9f1d3abe4ec2ad7d7692d70d19c4accb6ec43 (diff)
downloadforums-07186656c8ea73a3e303998d465f08cc9f4598c4.tar
forums-07186656c8ea73a3e303998d465f08cc9f4598c4.tar.gz
forums-07186656c8ea73a3e303998d465f08cc9f4598c4.tar.bz2
forums-07186656c8ea73a3e303998d465f08cc9f4598c4.tar.xz
forums-07186656c8ea73a3e303998d465f08cc9f4598c4.zip
[ticket/11691] Fix table names and arguments/docs
PHPBB3-11691
-rw-r--r--phpBB/phpbb/db/migration/data/v310/notification_options_reconvert.php16
1 files changed, 8 insertions, 8 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 a4962b177d..4195623618 100644
--- a/phpBB/phpbb/db/migration/data/v310/notification_options_reconvert.php
+++ b/phpBB/phpbb/db/migration/data/v310/notification_options_reconvert.php
@@ -26,31 +26,31 @@ class notification_options_reconvert extends \phpbb\db\migration\migration
public function purge_notifications()
{
- $sql = 'DELETE FROM ' . $insert_table;
+ $sql = 'DELETE FROM ' . $this->table_prefix . 'user_notifications';
$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);
+ $insert_buffer = new \phpbb\db\sql_insert_buffer($this->db, $this->table_prefix . 'user_notifications');
- return $this->perform_conversion($insert_buffer, $insert_table, $start);
+ return $this->perform_conversion($insert_buffer, $start);
}
/**
* Perform the conversion (separate for testability)
*
- * @param \phpbb\db\sql_insert_buffer $insert_buffer
- * @param string $insert_table
+ * @param \phpbb\db\sql_insert_buffer $insert_buffer
+ * @param int $start Start of staggering step
+ * @return mixed int start of the next step, null if the end was reached
*/
- public function perform_conversion(\phpbb\db\sql_insert_buffer $insert_buffer, $insert_table, $start)
+ public function perform_conversion(\phpbb\db\sql_insert_buffer $insert_buffer, $start)
{
$limit = 250;
$converted_users = 0;
$sql = 'SELECT user_id, user_notify_type, user_notify_pm
- FROM ' . USERS_TABLE . '
+ FROM ' . $this->table_prefix . 'users
ORDER BY user_id';
$result = $this->db->sql_query_limit($sql, $limit, $start);