diff options
author | ot <ot@localhost> | 2007-09-05 08:20:23 +0000 |
---|---|---|
committer | ot <ot@localhost> | 2007-09-05 08:20:23 +0000 |
commit | d3bf5a37117a896c57dc6e25e8d95b9c20be16a5 (patch) | |
tree | 64b7076deed5f2245e169d500e4282c5d1591410 | |
parent | f321f42e1d23095780123a62f0c09f1120c5e837 (diff) | |
download | markup-validator-d3bf5a37117a896c57dc6e25e8d95b9c20be16a5.zip markup-validator-d3bf5a37117a896c57dc6e25e8d95b9c20be16a5.tar.gz markup-validator-d3bf5a37117a896c57dc6e25e8d95b9c20be16a5.tar.bz2 |
for the sake of a lighter memory footprint, making sure that the whole source of the document
is only passed to the template object if necessary (that is, at this point, if the show
source option is on, or if the file was uploaded or direct input was used).
-rwxr-xr-x | httpd/cgi-bin/check | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index 7f2e8ea..4338d6b 100755 --- a/httpd/cgi-bin/check +++ b/httpd/cgi-bin/check @@ -14,7 +14,7 @@ # This source code is available under the license at: # http://www.w3.org/Consortium/Legal/copyright-software # -# $Id: check,v 1.560 2007-09-05 08:14:32 ot Exp $ +# $Id: check,v 1.561 2007-09-05 08:20:23 ot Exp $ # # Disable buffering on STDOUT! @@ -186,7 +186,7 @@ Directory not readable (permission denied): @_r # # Strings - $VERSION = q$Revision: 1.560 $; + $VERSION = q$Revision: 1.561 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; # @@ -961,7 +961,8 @@ if ($File->{Opt}->{Output} eq 'xml') { $template->param(file_warnings => $File->{Warnings}); $template->param(tidy_output => $File->{'Tidy'}); -$template->param(file_source => &source($File)); +$template->param(file_source => &source($File)) + if ($template->param('opt_show_source') or ($File->{'Is Upload'}) or ($File->{'Direct Input'})); #$template->param('opt_show_esis' => TRUE) # if $File->{Opt}->{'Show ESIS'}; #$template->param('opt_show_raw_errors' => TRUE) |