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

SF.net SVN: ledger-smb:[6567] trunk/LedgerSMB/Database.pm



Revision: 6567
          http://sourceforge.net/p/ledger-smb/code/6567
Author:   einhverfr
Date:     2014-01-21 05:00:48 +0000 (Tue, 21 Jan 2014)
Log Message:
-----------
Fixing selectrow bug in favor of a more minor one (extra auth dialog).  Need to check the js login functionality

Modified Paths:
--------------
    trunk/LedgerSMB/Database.pm

Modified: trunk/LedgerSMB/Database.pm
===================================================================
--- trunk/LedgerSMB/Database.pm	2014-01-21 04:58:13 UTC (rev 6566)
+++ trunk/LedgerSMB/Database.pm	2014-01-21 05:00:48 UTC (rev 6567)
@@ -22,6 +22,7 @@
 # Methods are documented inline.  
 
 package LedgerSMB::Database;
+use LedgerSMB::Auth;
 use DBI;
 
 our $VERSION = '1';
@@ -301,7 +302,6 @@
 =cut 
 
 sub get_info {
-    use LedgerSMB::Auth;
     my $self = shift @_;
     my $retval = { # defaults
          appname => undef,
@@ -444,7 +444,7 @@
     my $dbh = DBI->connect(
         "dbi:Pg:dbname=postgres", 
          "$creds->{login}", "$creds->{password}", { AutoCommit => 0 }
-    );
+    ) or LedgerSMB::Auth::credential_prompt;
     my ($version) = $dbh->selectrow_array('SELECT version()');
     $version =~ /(\d+\.\d+\.\d+)/;
     my $retval = $1;

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


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits