summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xLedgerSMB/Form.pm15
-rwxr-xr-xadmin.pl1
-rwxr-xr-xbin/menu.pl2
-rwxr-xr-xlogin.pl1
-rwxr-xr-xmenu.pl1
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);
diff --git a/admin.pl b/admin.pl
index b8551e04..a3b9de31 100755
--- a/admin.pl
+++ b/admin.pl
@@ -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}&amp;sessionid=$form->{sessionid}&amp;action=acc_menu&amp;path=$form->{path}&amp;js=$form->{js}" />
+ <frame name="acc_menu" src="menu.pl?login=$form->{login}&amp;sessionid=$form->{sessionid}&amp;action=acc_menu&amp;path=$form->{path}&amp;js=$form->{js}" />
<frame name="main_window" src="am.pl?login=$form->{login}&amp;sessionid=$form->{sessionid}&amp;action=$form->{main}&amp;path=$form->{path}" />
</frameset>
</html>
diff --git a/login.pl b/login.pl
index 993f008a..ff1cba7e 100755
--- a/login.pl
+++ b/login.pl
@@ -50,6 +50,7 @@
#######################################################################
use LedgerSMB::Sysconfig;
+require "common.pl";
$| = 1;
diff --git a/menu.pl b/menu.pl
index f1adbb58..b55144ec 100755
--- a/menu.pl
+++ b/menu.pl
@@ -56,6 +56,7 @@ use LedgerSMB::Form;
use LedgerSMB::Locale;
use LedgerSMB::Session;
use Data::Dumper;
+require "common.pl";
# for custom preprocessing logic