OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-registry Date: 28-Nov-2005 09:57:15 Branch: HEAD Handle: 2005112808571500 Modified files: openpkg-registry registry-ui.pl Log: use out variable to carry information about work that was done across the two page split cascades, otherwise css/gif/jpg are handled by the first block and a default page is appended by the second block Summary: Revision Changes Path 1.46 +9 -17 openpkg-registry/registry-ui.pl ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-registry/registry-ui.pl ============================================================================ $ cvs diff -u -r1.45 -r1.46 registry-ui.pl --- openpkg-registry/registry-ui.pl 28 Nov 2005 08:54:31 -0000 1.45 +++ openpkg-registry/registry-ui.pl 28 Nov 2005 08:57:15 -0000 1.46 @@ -90,6 +90,7 @@ my $requestedpage = $cgi->url_param("page"); $requestedpage = $cfg->{page}->{default} if (not defined $requestedpage); $cgi->delete(-name=>'page'); +my $out = undef; # database handle and scratch variables # @@ -137,21 +138,18 @@ # first check for pages which do not require database access # if ($requestedpage eq "css") { - my $out; $out = ''; $out .= &viewhttp('text/css', '+3600s'); $out .= &viewcss(); print STDOUT $out; } elsif ($requestedpage eq "jpg") { - my $out; $out = ''; $out .= &viewhttp('image/jpg', '+3600s'); $out .= &viewjpg($cgi->param("name")); print STDOUT $out; } elsif ($requestedpage eq "gif") { - my $out; $out = ''; $out .= &viewhttp('image/gif', '+3600s'); $out .= &viewgif($cgi->param("name")); @@ -215,7 +213,6 @@ # continue to the pages that require database access # if ($requestedpage eq "login") { - my $out; $out = ''; $out .= &viewhttplogin("association"); $out .= &viewhtmlhead(-menu); @@ -224,19 +221,16 @@ print STDOUT &canvas($out); } elsif ($requestedpage eq "logout") { - my $out; $out = ''; $out .= &viewlogout(); print STDOUT &canvas($out); } elsif ($requestedpage eq "asecomeback") { - my $out; $out = ''; $out .= &viewasecomeback(); print STDOUT &canvas($out); } elsif ($requestedpage eq "association") { - my $out; $out = ''; $out .= viewhttpauthrequired("association"); $out .= &viewhtmlhead(-menu); @@ -245,7 +239,6 @@ print STDOUT &canvas($out); } elsif ($requestedpage eq "dropxml" and not &uao()) { - my $out; $out = ''; $out .= &viewhttp(); $out .= &viewhtmlhead(-menu); @@ -254,14 +247,12 @@ print STDOUT &canvas($out); } elsif ($requestedpage eq "dropxml" and &uao()) { - my $out; $out = ''; $out .= &viewhttp("plain/text"); $out .= &viewdropxml(); print STDOUT $out; } elsif ($requestedpage eq "ase") { - my $out; $out = ''; $out .= &viewhttp(); $out .= &viewhtmlhead(-menu); @@ -269,13 +260,14 @@ print STDOUT &canvas($out); } else { - my $out; - $out = ''; - $cgi->delete_all(); - $out .= &viewhttp(); - $out .= &viewhtmlhead(-menu); - $out .= &viewhtmltail(); - print STDOUT &canvas($out); + if (not defined $out) { + $out = ''; + $cgi->delete_all(); + $out .= &viewhttp(); + $out .= &viewhtmlhead(-menu); + $out .= &viewhtmltail(); + print STDOUT &canvas($out); + } } # die gracefully ;-) @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org