mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 20:13:22 +01:00
[ticket/11162] Review comments fixed.
PHPBB3-11162
This commit is contained in:
parent
16966f52d3
commit
fe87d441ee
@ -39,19 +39,19 @@ function phpbb_update_rows_avoiding_duplicates($db, $table, $column, $from_value
|
||||
$old_user_ids = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$old_user_ids[$row[$column]][] = $row['user_id'];
|
||||
$old_user_ids[$row[$column]][] = (int) $row['user_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = "SELECT $column, user_id
|
||||
FROM $table
|
||||
WHERE $column = '" . (int) $to_value . "'";
|
||||
WHERE $column = " . (int) $to_value;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$new_user_ids = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$new_user_ids[$row[$column]][] = $row['user_id'];
|
||||
$new_user_ids[$row[$column]][] = (int) $row['user_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@ -126,19 +126,19 @@ function phpbb_update_rows_avoiding_duplicates_notify_status($db, $table, $colum
|
||||
$old_user_ids = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$old_user_ids[(int) $row['notify_status']][$row[$column]][] = $row['user_id'];
|
||||
$old_user_ids[(int) $row['notify_status']][$row[$column]][] = (int) $row['user_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = "SELECT $column, user_id
|
||||
FROM $table
|
||||
WHERE $column = '" . (int) $to_value . "'";
|
||||
WHERE $column = " . (int) $to_value;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$new_user_ids = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$new_user_ids[$row[$column]][] = $row['user_id'];
|
||||
$new_user_ids[$row[$column]][] = (int) $row['user_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
@ -90,7 +90,8 @@ class phpbb_update_rows_avoiding_duplicates_notify_status_test extends phpbb_dat
|
||||
// user id of 1 is the user being updated
|
||||
$sql = 'SELECT notify_status
|
||||
FROM ' . TOPICS_WATCH_TABLE . '
|
||||
WHERE topic_id = ' . (int) $to . ' AND user_id = 1';
|
||||
WHERE topic_id = ' . (int) $to . '
|
||||
AND user_id = 1';
|
||||
$result = $db->sql_query($sql);
|
||||
$notify_status = $db->sql_fetchfield('notify_status');
|
||||
$db->sql_freeresult($result);
|
||||
|
Loading…
x
Reference in New Issue
Block a user