diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-10-30 21:16:19 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-10-30 21:16:19 +0000 |
commit | aa4852be2023c2bd6cabbaadfadf93789e5d812a (patch) | |
tree | 380e6b632a3698e5e7c7a3d20b7fce2ea48f8a44 | |
parent | c6cad25ff528b9b4e6a56cfa29c8a5fb23713a5d (diff) |
Load the destination script after initiating a db connection. Stops redirects
to bin/ps.pl from blowing up.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1827 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r-- | common.pl | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -49,20 +49,20 @@ sub redirect { 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} }; } |