- 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
This commit is contained in:
rvelices 2011-01-10 21:31:05 +00:00
parent 92af24fa17
commit f0dbcf6adf

View file

@ -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);
}