mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 17:23:04 +02:00
merge r15570 from trunk
bug:2645 author field is kept when comment not validated git-svn-id: http://piwigo.org/svn/branches/2.3@15571 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -233,17 +233,19 @@ SELECT
|
||||
if ($show_add_comment_form)
|
||||
{
|
||||
$key = get_ephemeral_key(3, $page['image_id']);
|
||||
$content = '';
|
||||
$content = $author = '';
|
||||
if ('reject'===@$comment_action)
|
||||
{
|
||||
$content = htmlspecialchars( stripslashes($comm['content']) );
|
||||
$author = htmlspecialchars( stripslashes($comm['author']) );
|
||||
}
|
||||
$template->assign('comment_add',
|
||||
array(
|
||||
'F_ACTION' => $url_self,
|
||||
'KEY' => $key,
|
||||
'CONTENT' => $content,
|
||||
'SHOW_AUTHOR' => !is_classic_user()
|
||||
'SHOW_AUTHOR' => !is_classic_user(),
|
||||
'AUTHOR' => $author ,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ y.callService(
|
||||
<fieldset>
|
||||
<legend>{'Add a comment'|@translate}</legend>
|
||||
{if $comment_add.SHOW_AUTHOR}
|
||||
<label>{'Author'|@translate}<input type="text" name="author"></label>
|
||||
<label>{'Author'|@translate}<input type="text" name="author" value="{$comment_add.AUTHOR}"></label>
|
||||
{/if}
|
||||
<label>{'Comment'|@translate}<textarea name="content" id="contentid" rows="5" cols="80">{$comment_add.CONTENT}</textarea></label>
|
||||
<input type="hidden" name="key" value="{$comment_add.KEY}">
|
||||
|
||||
Reference in New Issue
Block a user