mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/attach-dl] Fixed the logic in an sql statement
PHPBB3-11042
This commit is contained in:
parent
f6e8d938cb
commit
5827250a94
1 changed files with 4 additions and 2 deletions
|
@ -690,8 +690,10 @@ function phpbb_download_check_pm_auth($db, $user_id, $msg_id)
|
|||
$sql = 'SELECT user_id, author_id
|
||||
FROM ' . PRIVMSGS_TO_TABLE . '
|
||||
WHERE msg_id = ' . (int) $msg_id . '
|
||||
AND user_id = ' . (int) $user_id . '
|
||||
OR author_id = ' . (int) $user_id;
|
||||
AND (
|
||||
user_id = ' . (int) $user_id . '
|
||||
OR author_id = ' . (int) $user_id . '
|
||||
)';
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$allowed = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
|
Loading…
Add table
Reference in a new issue