aboutsummaryrefslogtreecommitdiffstats
path: root/admin/comments.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-11-08 04:28:30 +0000
committerrvelices <rv-github@modusoptimus.com>2006-11-08 04:28:30 +0000
commite5e776a263ba63407893a28df379f2ac8152680c (patch)
treecddbdfa05f6c58740161778d78f80112dac1a414 /admin/comments.php
parente44f0b01549d3a52c5b261767c6531044d09a1a1 (diff)
- comments.php improvements:
- unvalidated comments are shown only for administrators - added delete/validate icons for admins - removed some unused code - display of comment content performed through an event - replace some get_thumbnail_src with get_thumbnail_url git-svn-id: http://piwigo.org/svn/trunk@1598 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/comments.php')
-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'.
'&amp;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'])
)
);