[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[4196] branches/1.3/LedgerSMB/Form.pm



Revision: 4196
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4196&view=rev
Author:   tshvr
Date:     2011-12-11 21:30:09 +0000 (Sun, 11 Dec 2011)
Log Message:
-----------
less logging for session-id

Modified Paths:
--------------
    branches/1.3/LedgerSMB/Form.pm

Modified: branches/1.3/LedgerSMB/Form.pm
===================================================================
--- branches/1.3/LedgerSMB/Form.pm	2011-12-11 09:23:19 UTC (rev 4195)
+++ branches/1.3/LedgerSMB/Form.pm	2011-12-11 21:30:09 UTC (rev 4196)
@@ -196,21 +196,30 @@
 
 sub open_form {
     my ($self) = @_;
+    my @results ;
     if ($self->{form_id} =~ '^\s*$'){
         delete $self->{form_id};
     }
     if (!$ENV{GATEWAY_INTERFACE}){
         return 1;
     }
+    #HV session_id not always set in LedgerSMB/Auth/DB.pm because of mix old,new code-chain?
+    if($self->{session_id})
+    {
     my $sth = $self->{dbh}->prepare('select form_open(?)');
-    #HV session_id not always set in LedgerSMB/Auth/DB.pm because of mix old,new code-chain?
     my $rc=$sth->execute($self->{session_id});#HV ERROR:Invalid session,if count(*) FROM session!=1,multiple login
     if(! $rc)
     {
      $logger->error("select form_open \$self->{form_id}=$self->{form_id} \$self->{session_id}=$self->{session_id} \$rc=$rc,invalid count FROM session?");
      return undef;
     }
-    my @results = $sth->fetchrow_array();
+    @results = $sth->fetchrow_array();
+    }
+    else
+    {
+     $logger->debug("no \$self->{session_id}!");
+     return undef;
+    }
 
     $self->{form_id} = $results[0];
     return $results[0];

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.