From da2c292d2d68e5b7eaf61e345f4f8fddfba57696 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Thu, 5 Jun 2003 13:22:29 +0000 Subject: [PATCH] Minor fix git-svn-id: file:///svn/phpbb/trunk@4082 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/download.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/phpBB/download.php b/phpBB/download.php index b2859e33b5..5912749908 100644 --- a/phpBB/download.php +++ b/phpBB/download.php @@ -225,17 +225,19 @@ $sql = 'SELECT a.*, p.forum_id AND (a.post_id = p.post_id OR a.post_id = 0)'; $result = $db->sql_query($sql); -while ($row = $db->sql_fetchrow($result) && !$authorised) +while ($row = $db->sql_fetchrow($result)) { if ($row['post_id'] && $auth->acl_get('f_download', $row['forum_id'])) { $authorised = TRUE; + break; } else { - if (intval($config['allow_pm_attach']) && ($user->data['user_id'] == $row['user_id_2'] || $user->data['user_id'] == $row['user_id_1'])) + if ($config['allow_pm_attach'] && ($user->data['user_id'] == $row['user_id_2'] || $user->data['user_id'] == $row['user_id_1'])) { $authorised = TRUE; + break; } } }