validator/httpd/cgi-bin check,1.466,1.467

Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv11405

Modified Files:
	check 
Log Message:
* workaround for bug 798 does not need s:p:o 0.100 any more, we can put req back to .99
* port from 0.7.4 to HEAD - bringing back outline option (still need filter) and commenting out parse tree etc.



Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.466
retrieving revision 1.467
diff -u -d -r1.466 -r1.467
--- check	8 Nov 2006 01:18:49 -0000	1.466
+++ check	13 Nov 2006 04:26:29 -0000	1.467
@@ -55,7 +55,7 @@
 use Encode                    qw();
 use Encode::Alias             qw();
 use HTML::Encoding       0.52 qw();
-use SGML::Parser::OpenSP      qw();
+use SGML::Parser::OpenSP 0.99 qw();
 
 ###############################################################################
 #### Constant definitions. ####################################################
@@ -322,6 +322,13 @@
   loop_context_vars => TRUE,
   cache             => TRUE,
 );
+my $SOAPDIS = HTML::Template->new(
+  filename          => File::Spec->catfile($CFG->{Paths}->{Templates},
+                                          $lang, 'soap_disabled.tmpl'),
+  die_on_bad_params => FALSE,
+  loop_context_vars => TRUE,
+  cache             => TRUE,
+);
 my $EARLT = HTML::Template->new(
   filename          => File::Spec->catfile($CFG->{Paths}->{Templates},
                                           $lang, 'earl_xml.tmpl'),
@@ -689,7 +696,12 @@
 } elsif ($File->{Opt}->{Output} eq 'ucn') {
   $template = $UCNT;
 } elsif ($File->{Opt}->{Output} eq 'soap12') {
-  if ($File->{'Error Flagged'}) {
+  if ($CFG->{'Enable SOAP'} != 1) { # API disabled - ideally this should have been sent before performing validation...
+    print CGI::header(-status => 503, -content_language => "en",
+    -type => "text/html", -charset => "utf-8"
+    );
+    $template = $SOAPDIS;
+  } elsif ($File->{'Error Flagged'}) { # should send SOAP fault message
     $template = $SOAPFT;
   } else {
     $template = $SOAPT;
@@ -704,12 +716,13 @@
 $template->param(file_warnings => $File->{Warnings});
 $template->param(file_source => &source($File))
   if $template->param('opt_show_source');
-$template->param('opt_show_esis' => TRUE)
-  if $File->{Opt}->{'Show ESIS'};
-$template->param('opt_show_raw_errors' => TRUE)
-  if $File->{Opt}->{'Show Errors'};
-$template->param('file_raw_errors' => &show_errors($File))
-  if $template->param('opt_show_raw_errors');
+#$template->param('opt_show_esis' => TRUE)
+#  if $File->{Opt}->{'Show ESIS'};
+#$template->param('opt_show_raw_errors' => TRUE)
+#  if $File->{Opt}->{'Show Errors'};
+#$template->param('file_raw_errors' => &show_errors($File))
+#  if $template->param('opt_show_raw_errors');
+  $T->param(file_outline   => &outline($File)) if $T->param('opt_show_outline');
 
 print $template->output;
 

Received on Monday, 13 November 2006 04:26:40 UTC