aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2011-01-10 21:31:05 +0000
committerrvelices <rv-github@modusoptimus.com>2011-01-10 21:31:05 +0000
commitf0dbcf6adfe271ffe237c31f43b2e65880677039 (patch)
tree282cf2e0d33fffee40663321d1d008928eaaf572 /include
parent92af24fa1723b301bba1a6ec45d0aee92caf97c8 (diff)
- 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
Diffstat (limited to 'include')
-rw-r--r--include/picture_comment.inc.php38
1 files changed, 19 insertions, 19 deletions
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);
}