Bugfix: show (cleaned) comment back on detail page.

Also added minor debug feedback to review page.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Joe Atzberger 2008-06-09 13:52:41 -05:00 committed by Joshua Ferraro
parent 233a40f1d1
commit fc24df29d2
2 changed files with 5 additions and 4 deletions
koha-tmpl/opac-tmpl/prog/en/modules
opac

View file

@ -49,6 +49,7 @@
<body id="comment">
<div id="custom-doc" class="yui-t7">
<div class="container">
<!-- TMPL_IF NAME="cgi_debug" --><div class="debug">CGI debug is on.</div><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="ERRORS" -->
<div class="error">
<!-- TMPL_LOOP NAME="ERRORS" -->
@ -64,7 +65,7 @@
<!-- TMPL_IF NAME="WINDOW_CLOSE" -->Note: this window will close automatically in 5 seconds<!-- /TMPL_IF -->
</div>
<!-- /TMPL_IF -->
<form id="reviewf" action="/cgi-bin/koha/opac-review.pl" method="post">
<form id="reviewf" action="/cgi-bin/koha/opac-review.pl<!-- TMPL_IF NAME="cgi_debug" -->?debug=1<!-- /TMPL_IF -->" method="post">
<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
<fieldset class="brief">
<legend>Comments on <i><!--TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" --></i><!-- TMPL_IF NAME="author" -->by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --></legend>

View file

@ -55,10 +55,10 @@ if (defined $review) {
} else {
if ($clean ne $review) {
push @errors, {scrubbed=>$clean};
my $js_ok_review = $clean;
$js_ok_review =~ s/"/&quot;/g; # probably redundant w/ TMPL ESCAPE=JS
$template->param(clean_review=>$js_ok_review);
}
my $js_ok_review = $clean;
$js_ok_review =~ s/"/&quot;/g; # probably redundant w/ TMPL ESCAPE=JS
$template->param(clean_review=>$js_ok_review);
if ($savedreview) {
updatereview($biblionumber, $borrowernumber, $clean);
} else {