aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to 'admin')
-rw-r--r--admin/comments.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/admin/comments.php b/admin/comments.php
index 3debab9d0..1371f72f2 100644
--- a/admin/comments.php
+++ b/admin/comments.php
@@ -47,7 +47,7 @@ if (isset($_POST))
$to_reject = array();
if (isset($_POST['submit']) and !is_adviser())
- {
+ {
foreach (explode(',', $_POST['list']) as $comment_id)
{
if (isset($_POST['action-'.$comment_id]))
@@ -141,8 +141,15 @@ SELECT c.id, c.image_id, c.date, c.author, c.content, i.path, i.tn_ext
WHERE validated = \'false\'
;';
$result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
{
+ $thumb = get_thumbnail_url(
+ array(
+ 'id'=>$row['image_id'],
+ 'path'=>$row['path'],
+ 'tn_ext'=>@$row['tn_ext']
+ )
+ );
$template->assign_block_vars(
'comment',
array(
@@ -150,10 +157,10 @@ while ($row = mysql_fetch_array($result))
PHPWG_ROOT_PATH.'admin.php?page=picture_modify'.
'&image_id='.$row['image_id'],
'ID' => $row['id'],
- 'TN_SRC' => get_thumbnail_src($row['path'], @$row['tn_ext']),
+ 'TN_SRC' => $thumb,
'AUTHOR' => $row['author'],
'DATE' => format_date($row['date'],'mysql_datetime',true),
- 'CONTENT' => parse_comment_content($row['content'])
+ 'CONTENT' => trigger_event('render_comment_content',$row['content'])
)
);