From 0a454adbf65947398e4a364a376cf2874fb8a118 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Tue, 5 Jun 2012 19:55:23 +0000 Subject: 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 --- include/picture_comment.inc.php | 6 ++++-- themes/default/template/picture.tpl | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/picture_comment.inc.php b/include/picture_comment.inc.php index 064e02056..9e52f0126 100644 --- a/include/picture_comment.inc.php +++ b/include/picture_comment.inc.php @@ -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 , )); } } diff --git a/themes/default/template/picture.tpl b/themes/default/template/picture.tpl index d98160a73..b38f6c50b 100644 --- a/themes/default/template/picture.tpl +++ b/themes/default/template/picture.tpl @@ -306,7 +306,7 @@ y.callService(
{'Add a comment'|@translate} {if $comment_add.SHOW_AUTHOR} - + {/if} -- cgit v1.2.3