mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/12317] Do not repeat SQL query in notification_submit_post_base.
PHPBB3-12317
This commit is contained in:
parent
e742d1ec26
commit
043b6a207a
1 changed files with 1 additions and 6 deletions
|
@ -133,7 +133,7 @@ abstract class phpbb_notification_submit_post_base extends phpbb_database_test_c
|
||||||
FROM ' . NOTIFICATIONS_TABLE . ' n, ' . NOTIFICATION_TYPES_TABLE . " nt
|
FROM ' . NOTIFICATIONS_TABLE . ' n, ' . NOTIFICATION_TYPES_TABLE . " nt
|
||||||
WHERE nt.notification_type_name = '" . $this->item_type . "'
|
WHERE nt.notification_type_name = '" . $this->item_type . "'
|
||||||
AND n.notification_type_id = nt.notification_type_id
|
AND n.notification_type_id = nt.notification_type_id
|
||||||
ORDER BY user_id, item_id ASC";
|
ORDER BY user_id ASC, item_id ASC";
|
||||||
$result = $this->db->sql_query($sql);
|
$result = $this->db->sql_query($sql);
|
||||||
$this->assertEquals($expected_before, $this->db->sql_fetchrowset($result));
|
$this->assertEquals($expected_before, $this->db->sql_fetchrowset($result));
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
@ -142,11 +142,6 @@ abstract class phpbb_notification_submit_post_base extends phpbb_database_test_c
|
||||||
$post_data = array_merge($this->post_data, $additional_post_data);
|
$post_data = array_merge($this->post_data, $additional_post_data);
|
||||||
submit_post('reply', '', 'poster-name', POST_NORMAL, $poll_data, $post_data, false, false);
|
submit_post('reply', '', 'poster-name', POST_NORMAL, $poll_data, $post_data, false, false);
|
||||||
|
|
||||||
$sql = 'SELECT user_id, item_id, item_parent_id
|
|
||||||
FROM ' . NOTIFICATIONS_TABLE . ' n, ' . NOTIFICATION_TYPES_TABLE . " nt
|
|
||||||
WHERE nt.notification_type_name = '" . $this->item_type . "'
|
|
||||||
AND n.notification_type_id = nt.notification_type_id
|
|
||||||
ORDER BY user_id ASC, item_id ASC";
|
|
||||||
$result = $this->db->sql_query($sql);
|
$result = $this->db->sql_query($sql);
|
||||||
$this->assertEquals($expected_after, $this->db->sql_fetchrowset($result));
|
$this->assertEquals($expected_after, $this->db->sql_fetchrowset($result));
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
Loading…
Add table
Reference in a new issue