diff options
author | Fyorl <gaelreth@gmail.com> | 2012-08-15 06:08:18 +0800 |
---|---|---|
committer | Fyorl <gaelreth@gmail.com> | 2012-08-15 06:08:18 +0800 |
commit | 5827250a94e38d9b637ed8ae9e9c4a584223cc31 (patch) | |
tree | 76f98ea8abe04aa2f01de9ad1626d9aa965c088a /phpBB/includes/functions_download.php | |
parent | f6e8d938cb4fcd0bee2340033328f2f7cfade232 (diff) | |
download | forums-5827250a94e38d9b637ed8ae9e9c4a584223cc31.tar forums-5827250a94e38d9b637ed8ae9e9c4a584223cc31.tar.gz forums-5827250a94e38d9b637ed8ae9e9c4a584223cc31.tar.bz2 forums-5827250a94e38d9b637ed8ae9e9c4a584223cc31.tar.xz forums-5827250a94e38d9b637ed8ae9e9c4a584223cc31.zip |
[feature/attach-dl] Fixed the logic in an sql statement
PHPBB3-11042
Diffstat (limited to 'phpBB/includes/functions_download.php')
-rw-r--r-- | phpBB/includes/functions_download.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php index 0be12aa617..182fce222b 100644 --- a/phpBB/includes/functions_download.php +++ b/phpBB/includes/functions_download.php @@ -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); |