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

SF.net SVN: ledger-smb: [1827] trunk/common.pl



Revision: 1827
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1827&view=rev
Author:   tetragon
Date:     2007-10-30 14:16:19 -0700 (Tue, 30 Oct 2007)

Log Message:
-----------
Load the destination script after initiating a db connection.  Stops redirects
to bin/ps.pl from blowing up.

Modified Paths:
--------------
    trunk/common.pl

Modified: trunk/common.pl
===================================================================
--- trunk/common.pl	2007-10-30 21:14:50 UTC (rev 1826)
+++ trunk/common.pl	2007-10-30 21:16:19 UTC (rev 1827)
@@ -49,20 +49,20 @@
 
     undef $form;
     $form = new Form($argv);
-    require "bin/$script";
 
     for (@common_attrs) {
         $form->{$_} = $temphash{$_};
     }
     $form->{script} = $script;
 
-    if ( !$myconfig ) {    # needed for login
+    if ( !%myconfig ) {    # needed for login
         %myconfig = %{ LedgerSMB::User->fetch_config( $form ) };
     }
     if ( !$form->{dbh} and ( $script ne 'admin.pl' ) ) {
         $form->db_init( \%myconfig );
     }
 
+    require "bin/$script";
     &{ $form->{action} };
 }
 


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