Skip to content

Commit

Permalink
Bug 1735 fixed : amend commit 6596
Browse files Browse the repository at this point in the history
Need to add permissions filter to retrieve categories

git-svn-id: http://piwigo.org/svn/trunk@6601 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
nikrou committed Jun 24, 2010
1 parent 4b4293f commit fb1d1c4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion comments.php
Expand Up @@ -367,7 +367,7 @@
com.content,
com.validated
FROM '.IMAGE_CATEGORY_TABLE.' AS ic
LEFT JOIN '.COMMENTS_TABLE.' AS com
INNER JOIN '.COMMENTS_TABLE.' AS com
ON ic.image_id = com.image_id
LEFT JOIN '.USERS_TABLE.' As u
ON u.'.$conf['user_fields']['id'].' = com.author_id
Expand Down Expand Up @@ -418,6 +418,15 @@
ON c.id=ic.category_id
LEFT JOIN '.COMMENTS_TABLE.' AS com
ON ic.image_id=com.image_id
'.get_sql_condition_FandF
(
array
(
'forbidden_categories' => 'c.id',
'visible_categories' => 'c.id'
),
'WHERE'
).'
;';
$categories = hash_from_query($query, 'comment_id');

Expand Down

0 comments on commit fb1d1c4

Please sign in to comment.