[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openpkg-cvs
Subject:    [CVS] OpenPKG: openpkg-registry/ registry-ui.pl
From:       "Thomas Lotterer" <thl () openpkg ! org>
Date:       2006-06-30 12:15:30
Message-ID: 20060630121530.26DCA1B5064 () master ! openpkg ! org
[Download RAW message or body]

  OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Thomas Lotterer
  Root:   /v/openpkg/cvs                   Email:  thl@openpkg.org
  Module: openpkg-registry                 Date:   30-Jun-2006 14:15:29
  Branch: HEAD                             Handle: 2006063013152900

  Modified files:
    openpkg-registry        registry-ui.pl

  Log:
    more graceful handling exceptional situations where either db or ase
    is down (import from live hack dated 2006-04-17)

  Summary:
    Revision    Changes     Path
    1.61        +7  -7      openpkg-registry/registry-ui.pl
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-registry/registry-ui.pl
  ============================================================================
  $ cvs diff -u -r1.60 -r1.61 registry-ui.pl
  --- openpkg-registry/registry-ui.pl	30 Jun 2006 12:10:02 -0000	1.60
  +++ openpkg-registry/registry-ui.pl	30 Jun 2006 12:15:29 -0000	1.61
  @@ -160,7 +160,7 @@
   #
   $dbh = &dbopen("registry");
   if (not defined $dbh) {
  -    &printprettyerror("Registry database backend unavailable", &prettydbi());
  +    &printprettyerror("Registry database backend unavailable", &prettydbi()); \
#FIXME we get a guru here but it should be a pretty message  goto CUS;
   }
   $dbs = &dbopen("session");
  @@ -330,7 +330,7 @@
   
       $username = &identifyusername();
       if (not defined $username or $username eq '') {
  -        if    ($cfg->{identification}->{mode} eq "ase") {
  +        if    ($cfg->{identification}->{mode} eq "ase" and defined $ase) {
               $header->{redirect} = $cgi->redirect(-uri => $ase->url(-action => \
"login", -mode_during => "ase", -mode_after => $page));  }
       }
  @@ -345,7 +345,7 @@
       $head .= "<html>\n";
       $head .= "  <head>\n";
       $head .= "    <link rel=\"stylesheet\" type=\"text/css\" \
                href=\"$myurl?page=css\"/>\n";
  -    if ($cfg->{identification}->{mode} eq "ase") {
  +    if ($cfg->{identification}->{mode} eq "ase" and defined $ase) {
           $head .= $ase->canvas(-part => "head") . "\n";
       }
       $head .= &printjscheckallboxes();
  @@ -415,7 +415,7 @@
   
       $html = "";
   
  -    if ($cfg->{identification}->{mode} eq "ase") {
  +    if ($cfg->{identification}->{mode} eq "ase" and defined $ase) {
           $html .= $ase->canvas(-part => "body") . "\n";
       }
   
  @@ -990,7 +990,7 @@
       my $html;
       $html = '';
       $html .= '<td>';
  -    if    ($cfg->{identification}->{mode} eq "ase") {
  +    if    ($cfg->{identification}->{mode} eq "ase" and defined $ase) {
           $html .= $cgi->start_form(-action => $ase->url(-action => "login", \
-mode_during => "ase", -mode_after => "asecomeback"));  $html .= "<div>" . \
$cgi->submit('submit','login') . "</div>";  $html .= $cgi->end_form;
  @@ -1127,7 +1127,7 @@
       my $html;
       $html = '';
       $html .= '<td>';
  -    if    ($cfg->{identification}->{mode} eq "ase") {
  +    if    ($cfg->{identification}->{mode} eq "ase" and defined $ase) {
           $html .= $cgi->start_form(-action => $ase->url(-action => "logout", \
-mode_during => "ase", -mode_after => "logout"));  $html .= "<div>" . \
$cgi->submit('submit','logout') . "</div>";  $html .= $cgi->end_form;
  @@ -1801,7 +1801,7 @@
       my $username;
       $username = undef;
   
  -    if    ($cfg->{identification}->{mode} eq "ase") {
  +    if    ($cfg->{identification}->{mode} eq "ase" and defined $ase) {
           $username = $ase->attr("client-login-name") if ($ase->login);
       }
       elsif ($cfg->{identification}->{mode} eq "basicauth") {
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic