projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Scriptname steht nicht mehr in $form
[kivitendo-erp.git]
/
SL
/
Dispatcher.pm
diff --git
a/SL/Dispatcher.pm
b/SL/Dispatcher.pm
index
76d49b5
..
b4f75ba
100644
(file)
--- a/
SL/Dispatcher.pm
+++ b/
SL/Dispatcher.pm
@@
-70,6
+70,7
@@
sub pre_startup_setup {
$::userspath = "users";
$::templates = "templates";
$::memberfile = "users/members";
$::userspath = "users";
$::templates = "templates";
$::memberfile = "users/members";
+ $::menufile = "menu.ini";
$::sendmail = "| /usr/sbin/sendmail -t";
$::lxdebug = LXDebug->new;
$::auth = SL::Auth->new;
$::sendmail = "| /usr/sbin/sendmail -t";
$::lxdebug = LXDebug->new;
$::auth = SL::Auth->new;
@@
-101,10
+102,10
@@
sub require_main_code {
};
$::form->error($EVAL_ERROR) if ($EVAL_ERROR);
}
};
$::form->error($EVAL_ERROR) if ($EVAL_ERROR);
}
- if ($::form->{login} && -f "bin/mozilla/$::form->{login}_$
::form->{script}
") {
+ if ($::form->{login} && -f "bin/mozilla/$::form->{login}_$
script
") {
eval {
package main;
eval {
package main;
- require "bin/mozilla/$::form->{login}_$
::form->{script}
";
+ require "bin/mozilla/$::form->{login}_$
script
";
};
$::form->error($EVAL_ERROR) if ($EVAL_ERROR);
}
};
$::form->error($EVAL_ERROR) if ($EVAL_ERROR);
}
@@
-125,9
+126,10
@@
sub handle_request {
$script_name = $0;
}
$script_name = $0;
}
- $::cgi = CGI->new('');
- $::locale = Locale->new($::language);
- $::form = Form->new;
+ $::cgi = CGI->new('');
+ $::locale = Locale->new($::language);
+ $::form = Form->new;
+ %::called_subs = ();
eval { ($script_name, $action) = _route_request($script_name); 1; } or return;
eval { ($script_name, $action) = _route_request($script_name); 1; } or return;
@@
-206,18
+208,18
@@
sub _route_request {
}
sub _route_dispatcher_request {
}
sub _route_dispatcher_request {
- my $
action_re = '[a-z0-9_\-]+'
;
+ my $
name_re = qr{[a-z]\w*}
;
my ($script_name, $action);
eval {
my ($script_name, $action);
eval {
- die "Unroutable request -- inavlid module name.\n" if !$::form->{M} || ($::form->{M} !~ m/^$
action_re
$/);
+ die "Unroutable request -- inavlid module name.\n" if !$::form->{M} || ($::form->{M} !~ m/^$
{name_re}
$/);
$script_name = $::form->{M} . '.pl';
if ($::form->{A}) {
$action = $::form->{A};
} else {
$script_name = $::form->{M} . '.pl';
if ($::form->{A}) {
$action = $::form->{A};
} else {
- $action = first { m/^A_${
action
_re}$/ } keys %{ $::form };
+ $action = first { m/^A_${
name
_re}$/ } keys %{ $::form };
die "Unroutable request -- inavlid action name.\n" if !$action;
delete $::form->{$action};
die "Unroutable request -- inavlid action name.\n" if !$action;
delete $::form->{$action};