From f0dbcf6adfe271ffe237c31f43b2e65880677039 Mon Sep 17 00:00:00 2001 From: rvelices Date: Mon, 10 Jan 2011 21:31:05 +0000 Subject: - fix undefined function when editing a user comment on picture page git-svn-id: http://piwigo.org/svn/trunk@8600 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/picture_comment.inc.php | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'include/picture_comment.inc.php') diff --git a/include/picture_comment.inc.php b/include/picture_comment.inc.php index adf928bbb..270a2469a 100644 --- a/include/picture_comment.inc.php +++ b/include/picture_comment.inc.php @@ -187,7 +187,7 @@ SELECT } if (can_manage_comment('edit', $row['author_id'])) { - $tpl_comment['U_EDIT'] = add_url_params( + $tpl_comment['U_EDIT'] = add_url_params( $url_self, array( 'action'=>'edit_comment', @@ -195,27 +195,27 @@ SELECT 'pwg_token' => get_pwg_token(), ) ); - if (isset($edit_comment) and ($row['id'] == $edit_comment)) - { - $tpl_comment['IN_EDIT'] = true; - $key = get_comment_post_key(2, $page['image_id']); - $tpl_comment['KEY'] = $key; - $tpl_comment['CONTENT'] = $row['content']; - } + if (isset($edit_comment) and ($row['id'] == $edit_comment)) + { + $tpl_comment['IN_EDIT'] = true; + $key = get_ephemeral_key(2, $page['image_id']); + $tpl_comment['KEY'] = $key; + $tpl_comment['CONTENT'] = $row['content']; + } } if (is_admin()) { - if ($row['validated'] != 'true') - { - $tpl_comment['U_VALIDATE'] = add_url_params( - $url_self, - array( - 'action' => 'validate_comment', - 'comment_to_validate' => $row['id'], - 'pwg_token' => get_pwg_token(), - ) - ); - } + if ($row['validated'] != 'true') + { + $tpl_comment['U_VALIDATE'] = add_url_params( + $url_self, + array( + 'action' => 'validate_comment', + 'comment_to_validate' => $row['id'], + 'pwg_token' => get_pwg_token(), + ) + ); + } } $template->append('comments', $tpl_comment); } -- cgit v1.2.3