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: 25-Nov-2005 19:12:10 Branch: HEAD Handle: 2005112518120900 Modified files: openpkg-registry registry-ui.pl Log: reanimate ase-less operation Summary: Revision Changes Path 1.17 +37 -28 openpkg-registry/registry-ui.pl ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-registry/registry-ui.pl ============================================================================ $ cvs diff -u -r1.16 -r1.17 registry-ui.pl --- openpkg-registry/registry-ui.pl 24 Nov 2005 22:34:36 -0000 1.16 +++ openpkg-registry/registry-ui.pl 25 Nov 2005 18:12:09 -0000 1.17 @@ -35,8 +35,6 @@ use DBD::Pg; use MIME::Base64; use XML::Simple; -#use OSSP::ase::client; # FIXME production -BEGIN { require "./ase.pm"; import OSSP::ase::client; } # FIXME development # configure optional debugging $Data::Dumper::Purity = 1; @@ -74,6 +72,13 @@ $cfg->{canvas}->{mark_head}="<!-- CANVAS: HEAD -->"; $cfg->{canvas}->{mark_body}="<!-- CANVAS: BODY -->"; +my $ase; +$ase = undef; +if ($cfg->{identification}->{mode} eq "ase") { + #use OSSP::ase::client; # FIXME production + BEGIN { require "./ase.pm"; import OSSP::ase::client; } # FIXME development +} + # create objects my $cgi = new CGI; my $myurl = $cgi->url(-relative => 1); @@ -175,31 +180,31 @@ CGI::Session->find(sub {}); } -# establish ASE object -# -my $ase; -$ase = undef; -my $ase = new OSSP::ase::client( - -server => "http://registry.openpkg.org/ase", - -cgi => $cgi, - -mode => "page", - -session => $session, -); -if (not defined $ase) { - &printprettyerror("Affiliation Services Environment", ""); - goto CUS; -} - -# give it a chance to run -# -if ($ase->responsible()) { - if($ase->action()) { - print $ase->response(); +if ($cfg->{identification}->{mode} eq "ase") { + # establish ASE object + # + $ase = new OSSP::ase::client( + -server => "http://registry.openpkg.org/ase", + -cgi => $cgi, + -mode => "page", + -session => $session, + ); + if (not defined $ase) { + &printprettyerror("Affiliation Services Environment", ""); + goto CUS; } - else { - &printprettyerror("Affiliation Services Environment", $ase->error()); + + # give it a chance to run + # + if ($ase->responsible()) { + if($ase->action()) { + print $ase->response(); + } + else { + &printprettyerror("Affiliation Services Environment", $ase->error()); + } + goto CUS; } - goto CUS; } # continue to the pages that require database access @@ -327,7 +332,9 @@ $head .= " <head>\n"; $head .= " <link rel=\"stylesheet\" type=\"text/css\" href=\"$myurl?page=css\">\n"; $head .= &printjscheckallboxes(); - $head .= $ase->canvas(-part => "head"); + if ($cfg->{identification}->{mode} eq "ase") { + $head .= $ase->canvas(-part => "head"); + } $head .= " </head>\n"; $head .= " <body class=\"registry\"><div class=\"registry\">\n"; $head .= " <img id=\"logo\" src=\"http://www.openpkg.org/openpkg.gif\" alt=\"\" width=\"148\" height=\"80\" align=\"right\">\n"; @@ -875,8 +882,9 @@ { my $html; $html = ''; + $html .= '<td>'; if ($cfg->{identification}->{mode} eq "ase") { - $html .= $cgi->start_form(-action => $ase->url(-action => "login", -mode_during => "ase", -mode_after => "ase")); + $html .= $cgi->start_form(-action => $ase->url(-action => "login")); $html .= $cgi->delete(-name=>'page'); $html .= $cgi->hidden(-name=>'page', -value => "ase"); $html .= $cgi->hidden(-name=>'ase-action', -value => "login"); @@ -1022,8 +1030,9 @@ { my $html; $html = ''; + $html .= '<td>'; if ($cfg->{identification}->{mode} eq "ase") { - $html .= $cgi->start_form(-action => $ase->url(-action => "logout", -mode_during => "ase", -mode_after => "ase")); + $html .= $cgi->start_form(-action => $ase->url(-action => "logout")); $html .= $cgi->delete(-name=>'page'); $html .= $cgi->hidden(-name=>'page', -value => "ase"); $html .= $cgi->hidden(-name=>'ase-action', -value => "logout"); @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org