diff options
Diffstat (limited to 'comments.php')
-rw-r--r-- | comments.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/comments.php b/comments.php index 9a41dcb2b..b46ee3f8e 100644 --- a/comments.php +++ b/comments.php @@ -369,17 +369,12 @@ SELECT id, name, file, path, tn_ext } // retrieving category informations - $categories = array(); $query = ' -SELECT id, name, uppercats +SELECT id, name, permalink, uppercats FROM '.CATEGORIES_TABLE.' WHERE id IN ('.implode(',', $category_ids).') ;'; - $result = pwg_query($query); - while ($row = mysql_fetch_assoc($result)) - { - $categories[$row['id']] = $row; - } + $categories = hash_from_query($query, 'id'); foreach ($comments as $comment) { |