diff options
-rwxr-xr-x | LedgerSMB/Form.pm | 15 | ||||
-rwxr-xr-x | admin.pl | 1 | ||||
-rwxr-xr-x | bin/menu.pl | 2 | ||||
-rwxr-xr-x | login.pl | 1 | ||||
-rwxr-xr-x | menu.pl | 1 |
5 files changed, 11 insertions, 9 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index c9af2d1e..d514adf7 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -43,15 +43,18 @@ sub new { my $type = shift; - my $self = {}; + my $argstr = shift; read(STDIN, $_, $ENV{CONTENT_LENGTH}); - if ($ENV{QUERY_STRING}) { + if ($argstr){ + $_ = $argstr; + } + elsif ($ENV{QUERY_STRING}) { $_ = $ENV{QUERY_STRING}; } - if ($ARGV[0]) { + elsif ($ARGV[0]) { $_ = $ARGV[0]; } @@ -321,11 +324,7 @@ sub redirect { if ($self->{callback}) { - my ($script, $argv) = split(/\?/, $self->{callback}); - $self->error($locale->text("Invalid redirect")) unless - first {$_ eq $script} @{LedgerSMB::Sysconfig::scripts}; - exec ("perl", $script, $argv); - + main::redirect(); } else { $self->info($msg); @@ -49,6 +49,7 @@ ####################################################################### use LedgerSMB::Sysconfig; +require "common.pl"; $| = 1; diff --git a/bin/menu.pl b/bin/menu.pl index 1a25014e..c44da8be 100755 --- a/bin/menu.pl +++ b/bin/menu.pl @@ -56,7 +56,7 @@ sub display { print qq| <frameset cols="$menuwidth,*" border="1"> - <frame name="acc_menu" src="$form->{script}?login=$form->{login}&sessionid=$form->{sessionid}&action=acc_menu&path=$form->{path}&js=$form->{js}" /> + <frame name="acc_menu" src="menu.pl?login=$form->{login}&sessionid=$form->{sessionid}&action=acc_menu&path=$form->{path}&js=$form->{js}" /> <frame name="main_window" src="am.pl?login=$form->{login}&sessionid=$form->{sessionid}&action=$form->{main}&path=$form->{path}" /> </frameset> </html> @@ -50,6 +50,7 @@ ####################################################################### use LedgerSMB::Sysconfig; +require "common.pl"; $| = 1; @@ -56,6 +56,7 @@ use LedgerSMB::Form; use LedgerSMB::Locale; use LedgerSMB::Session; use Data::Dumper; +require "common.pl"; # for custom preprocessing logic |