projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bcc9961
)
Dispatcher: end_of_request() sub aus main namespace verbannt
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Tue, 3 May 2016 16:09:54 +0000
(18:09 +0200)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Tue, 3 May 2016 16:10:26 +0000
(18:10 +0200)
25 files changed:
SL/Auth.pm
patch
|
blob
|
history
SL/Controller/CustomerVendor.pm
patch
|
blob
|
history
SL/Controller/LoginScreen.pm
patch
|
blob
|
history
SL/DBUpgrade2.pm
patch
|
blob
|
history
SL/Dispatcher.pm
patch
|
blob
|
history
SL/Form.pm
patch
|
blob
|
history
SL/USTVA.pm
patch
|
blob
|
history
SL/User.pm
patch
|
blob
|
history
bin/mozilla/am.pl
patch
|
blob
|
history
bin/mozilla/ap.pl
patch
|
blob
|
history
bin/mozilla/ar.pl
patch
|
blob
|
history
bin/mozilla/arap.pl
patch
|
blob
|
history
bin/mozilla/bp.pl
patch
|
blob
|
history
bin/mozilla/cp.pl
patch
|
blob
|
history
bin/mozilla/do.pl
patch
|
blob
|
history
bin/mozilla/fu.pl
patch
|
blob
|
history
bin/mozilla/ic.pl
patch
|
blob
|
history
bin/mozilla/installationcheck.pl
patch
|
blob
|
history
bin/mozilla/io.pl
patch
|
blob
|
history
bin/mozilla/ir.pl
patch
|
blob
|
history
bin/mozilla/is.pl
patch
|
blob
|
history
bin/mozilla/oe.pl
patch
|
blob
|
history
bin/mozilla/ustva.pl
patch
|
blob
|
history
bin/mozilla/wh.pl
patch
|
blob
|
history
scripts/task_server.pl
patch
|
blob
|
history
diff --git
a/SL/Auth.pm
b/SL/Auth.pm
index
30aa40b
..
8b7ea55
100644
(file)
--- a/
SL/Auth.pm
+++ b/
SL/Auth.pm
@@
-89,7
+89,7
@@
sub mini_error {
} else {
print STDERR "Error: @msg\n";
}
} else {
print STDERR "Error: @msg\n";
}
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
sub _read_auth_config {
}
sub _read_auth_config {
diff --git
a/SL/Controller/CustomerVendor.pm
b/SL/Controller/CustomerVendor.pm
index
46857cb
..
b5c2151
100644
(file)
--- a/
SL/Controller/CustomerVendor.pm
+++ b/
SL/Controller/CustomerVendor.pm
@@
-145,7
+145,7
@@
sub _save {
title => ($self->is_vendor() ? t8('Edit Vendor') : t8('Edit Customer')),
%{$self->{template_args}}
);
title => ($self->is_vendor() ? t8('Edit Vendor') : t8('Edit Customer')),
%{$self->{template_args}}
);
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
my $db = $self->{cv}->db;
}
my $db = $self->{cv}->db;
diff --git
a/SL/Controller/LoginScreen.pm
b/SL/Controller/LoginScreen.pm
index
da2c0bf
..
1590e61
100644
(file)
--- a/
SL/Controller/LoginScreen.pm
+++ b/
SL/Controller/LoginScreen.pm
@@
-79,7
+79,7
@@
sub action_login {
}
# Database update available?
}
# Database update available?
-
::end_of_request()
if User::LOGIN_DBUPDATE_AVAILABLE() == $result;
+
$::dispatcher->end_request
if User::LOGIN_DBUPDATE_AVAILABLE() == $result;
# Other login errors.
if (User::LOGIN_OK() != $result) {
# Other login errors.
if (User::LOGIN_OK() != $result) {
diff --git
a/SL/DBUpgrade2.pm
b/SL/DBUpgrade2.pm
index
840a1dd
..
01af8f6
100644
(file)
--- a/
SL/DBUpgrade2.pm
+++ b/
SL/DBUpgrade2.pm
@@
-262,10
+262,10
@@
sub process_perl_script {
if (!defined($result)) {
print $::form->parse_html_template("dbupgrade/error", { file => $filename, error => $error });
if (!defined($result)) {
print $::form->parse_html_template("dbupgrade/error", { file => $filename, error => $error });
-
::end_of_request()
;
+
$::dispatcher->end_request
;
} elsif (1 != $result) {
SL::System::InstallationLock->unlock if 2 == $result;
} elsif (1 != $result) {
SL::System::InstallationLock->unlock if 2 == $result;
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
if (ref($version_or_control) eq "HASH") {
}
if (ref($version_or_control) eq "HASH") {
diff --git
a/SL/Dispatcher.pm
b/SL/Dispatcher.pm
index
7126513
..
a37a01e
100644
(file)
--- a/
SL/Dispatcher.pm
+++ b/
SL/Dispatcher.pm
@@
-143,7
+143,7
@@
sub show_error {
print $::form->parse_html_template($template, \%params);
$::lxdebug->leave_sub;
print $::form->parse_html_template($template, \%params);
$::lxdebug->leave_sub;
-
::end_of
_request();
+
end
_request();
}
sub pre_startup_setup {
}
sub pre_startup_setup {
@@
-305,7
+305,7
@@
sub handle_request {
action => $action,
);
action => $action,
);
-
::end_of_request()
unless $auth_result{auth_ok};
+
$self->end_request
unless $auth_result{auth_ok};
delete @{ $::form }{ grep { m/^\{AUTH\}/ } keys %{ $::form } } unless $auth_result{keep_auth_vars};
delete @{ $::form }{ grep { m/^\{AUTH\}/ } keys %{ $::form } } unless $auth_result{keep_auth_vars};
@@
-370,7
+370,7
@@
sub redirect_to_login {
$action .= '&error=' . $params{error} if $params{error};
print $::request->cgi->redirect("controller.pl?action=${action}");
$action .= '&error=' . $params{error} if $params{error};
print $::request->cgi->redirect("controller.pl?action=${action}");
-
::end_of_request()
;
+
$self->end_request
;
}
sub unrequire_bin_mozilla {
}
sub unrequire_bin_mozilla {
@@
-498,7
+498,7
@@
sub _check_for_old_config_files {
$::form->header;
print $::form->parse_html_template('login_screen/old_configuration_files', { FILES => \@old_files });
$::form->header;
print $::form->parse_html_template('login_screen/old_configuration_files', { FILES => \@old_files });
-
::end_of
_request();
+
end
_request();
}
sub _parse_number_with_unit {
}
sub _parse_number_with_unit {
@@
-549,11
+549,7
@@
sub _memory_usage_is_too_high {
return 0;
}
return 0;
}
-package main;
-
-use strict;
-
-sub end_of_request {
+sub end_request {
die SL::Dispatcher->END_OF_REQUEST;
}
die SL::Dispatcher->END_OF_REQUEST;
}
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
41cb861
..
fbcbe56
100644
(file)
--- a/
SL/Form.pm
+++ b/
SL/Form.pm
@@
-608,7
+608,7
@@
sub _prepare_html_template {
my $info = "Web page template '${file}' not found.\n";
$::form->header;
print qq|<pre>$info</pre>|;
my $info = "Web page template '${file}' not found.\n";
$::form->header;
print qq|<pre>$info</pre>|;
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
$additional_params->{AUTH} = $::auth;
}
$additional_params->{AUTH} = $::auth;
@@
-685,7
+685,7
@@
sub show_generic_error {
SL::ClientJS->new
->error($error)
->render(SL::Controller::Base->new);
SL::ClientJS->new
->error($error)
->render(SL::Controller::Base->new);
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
my $add_params = {
}
my $add_params = {
@@
-716,7
+716,7
@@
sub show_generic_error {
$main::lxdebug->leave_sub();
$main::lxdebug->leave_sub();
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
sub show_generic_information {
}
sub show_generic_information {
@@
-736,7
+736,7
@@
sub show_generic_information {
$main::lxdebug->leave_sub();
$main::lxdebug->leave_sub();
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
sub _store_redirect_info_in_session {
}
sub _store_redirect_info_in_session {
@@
-762,7
+762,7
@@
sub redirect {
print $::form->redirect_header($self->{callback});
}
print $::form->redirect_header($self->{callback});
}
-
::end_of_request()
;
+
$::dispatcher->end_request
;
$main::lxdebug->leave_sub();
}
$main::lxdebug->leave_sub();
}
@@
-2630,7
+2630,7
@@
sub mtime_ischanged {
t8("The document has been changed by another user. No mail was sent. Please reopen it in another window and copy the changes to the new window") :
t8("The document has been changed by another user. Please reopen it in another window and copy the changes to the new window")
);
t8("The document has been changed by another user. No mail was sent. Please reopen it in another window and copy the changes to the new window") :
t8("The document has been changed by another user. Please reopen it in another window and copy the changes to the new window")
);
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
}
}
}
diff --git
a/SL/USTVA.pm
b/SL/USTVA.pm
index
a80372b
..
93f83df
100644
(file)
--- a/
SL/USTVA.pm
+++ b/
SL/USTVA.pm
@@
-401,7
+401,7
@@
sub info {
</body>
|;
</body>
|;
-
::end_of_request()
;
+
$::dispatcher->end_request
;
} else {
} else {
diff --git
a/SL/User.pm
b/SL/User.pm
index
37e1a9b
..
00c25d5
100644
(file)
--- a/
SL/User.pm
+++ b/
SL/User.pm
@@
-149,7
+149,7
@@
sub login {
if ($form->{"show_dbupdate_warning"}) {
print $form->parse_html_template("dbupgrade/warning", { unapplied_scripts => \@unapplied_scripts });
if ($form->{"show_dbupdate_warning"}) {
print $form->parse_html_template("dbupgrade/warning", { unapplied_scripts => \@unapplied_scripts });
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
# update the tables
}
# update the tables
@@
-164,7
+164,7
@@
sub login {
# If $self->dbupdate2 returns than this means all upgrade scripts
# have been applied successfully, none required user
# interaction. Otherwise the deeper layers would have called
# If $self->dbupdate2 returns than this means all upgrade scripts
# have been applied successfully, none required user
# interaction. Otherwise the deeper layers would have called
- #
::end_of_request()
already, and return would not have returned to
+ #
$::dispatcher->end_request
already, and return would not have returned to
# us. Therefore we can now use RDBO instances because their supposed
# table structures do match the actual structures. So let's ensure
# that the "employee" table contains the appropriate entries for all
# us. Therefore we can now use RDBO instances because their supposed
# table structures do match the actual structures. So let's ensure
# that the "employee" table contains the appropriate entries for all
diff --git
a/bin/mozilla/am.pl
b/bin/mozilla/am.pl
index
2000513
..
62c645a
100644
(file)
--- a/
bin/mozilla/am.pl
+++ b/
bin/mozilla/am.pl
@@
-1634,7
+1634,7
@@
sub delete_warehouse {
$form->header();
print $form->parse_html_template('am/confirm_delete_warehouse');
$form->header();
print $form->parse_html_template('am/confirm_delete_warehouse');
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
if (AM->delete_warehouse(\%myconfig, $form)) {
}
if (AM->delete_warehouse(\%myconfig, $form)) {
diff --git
a/bin/mozilla/ap.pl
b/bin/mozilla/ap.pl
index
b3b111a
..
dd9a46d
100644
(file)
--- a/
bin/mozilla/ap.pl
+++ b/
bin/mozilla/ap.pl
@@
-693,7
+693,7
@@
sub post {
my ($vendor) = split /--/, $form->{vendor};
if ($form->{oldvendor} ne "$vendor--$form->{vendor_id}") {
&update;
my ($vendor) = split /--/, $form->{vendor};
if ($form->{oldvendor} ne "$vendor--$form->{vendor_id}") {
&update;
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
my ($debitaccno, $debittaxkey) = split /--/, $form->{AP_amountselected};
my ($taxkey, $NULL) = split /--/, $form->{taxchartselected};
}
my ($debitaccno, $debittaxkey) = split /--/, $form->{AP_amountselected};
my ($taxkey, $NULL) = split /--/, $form->{taxchartselected};
diff --git
a/bin/mozilla/ar.pl
b/bin/mozilla/ar.pl
index
444f7f9
..
8a0d780
100644
(file)
--- a/
bin/mozilla/ar.pl
+++ b/
bin/mozilla/ar.pl
@@
-723,7
+723,7
@@
sub post {
my ($customer) = split /--/, $form->{customer};
if ($form->{oldcustomer} ne "$customer--$form->{customer_id}") {
update();
my ($customer) = split /--/, $form->{customer};
if ($form->{oldcustomer} ne "$customer--$form->{customer_id}") {
update();
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
$form->{AR}{receivables} = $form->{ARselected};
}
$form->{AR}{receivables} = $form->{ARselected};
diff --git
a/bin/mozilla/arap.pl
b/bin/mozilla/arap.pl
index
75764a4
..
a1ba9f2
100644
(file)
--- a/
bin/mozilla/arap.pl
+++ b/
bin/mozilla/arap.pl
@@
-109,7
+109,7
@@
sub check_name {
$form->error($locale->text("More than one #1 found matching, please be more specific.", $locale->text(ucfirst $name)));
} else {
&select_name($name);
$form->error($locale->text("More than one #1 found matching, please be more specific.", $locale->text(ucfirst $name)));
} else {
&select_name($name);
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
}
}
}
diff --git
a/bin/mozilla/bp.pl
b/bin/mozilla/bp.pl
index
d448685
..
fe8a3fa
100644
(file)
--- a/
bin/mozilla/bp.pl
+++ b/
bin/mozilla/bp.pl
@@
-135,7
+135,7
@@
sub print {
print $::locale->text('done');
$::form->redirect($::locale->text('Marked entries printed!'));
}
print $::locale->text('done');
$::form->redirect($::locale->text('Marked entries printed!'));
}
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
}
}
}
@@
-198,4
+198,3
@@
sub list_spool {
}
sub continue { call_sub($::form->{"nextsub"}); }
}
sub continue { call_sub($::form->{"nextsub"}); }
-
diff --git
a/bin/mozilla/cp.pl
b/bin/mozilla/cp.pl
index
888bf8a
..
ccecac3
100644
(file)
--- a/
bin/mozilla/cp.pl
+++ b/
bin/mozilla/cp.pl
@@
-459,7
+459,7
@@
sub check_form {
if ($form->{currency} ne $form->{oldcurrency}) {
&update;
if ($form->{currency} ne $form->{oldcurrency}) {
&update;
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
$form->error($locale->text('Date missing!')) unless $form->{datepaid};
my $selected_check = 1;
}
$form->error($locale->text('Date missing!')) unless $form->{datepaid};
my $selected_check = 1;
diff --git
a/bin/mozilla/do.pl
b/bin/mozilla/do.pl
index
b5015e7
..
7e3ccb4
100644
(file)
--- a/
bin/mozilla/do.pl
+++ b/
bin/mozilla/do.pl
@@
-429,7
+429,7
@@
sub update_delivery_order {
if ($rows > 1) {
select_item(mode => $mode, pre_entered_qty => $form->{"qty_$i"});
if ($rows > 1) {
select_item(mode => $mode, pre_entered_qty => $form->{"qty_$i"});
-
::end_of_request()
;
+
$::dispatcher->end_request
;
} else {
} else {
@@
-741,7
+741,7
@@
sub save {
# if the name changed get new values
if (check_name($form->{vc})) {
update();
# if the name changed get new values
if (check_name($form->{vc})) {
update();
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
$form->{id} = 0 if $form->{saveasnew};
}
$form->{id} = 0 if $form->{saveasnew};
@@
-759,7
+759,7
@@
sub save {
if (!$params{no_redirect} && !$form->{print_and_save}) {
delete @{$form}{ary_diff([keys %{ $form }], [qw(login id script type cursor_fokus)])};
edit();
if (!$params{no_redirect} && !$form->{print_and_save}) {
delete @{$form}{ary_diff([keys %{ $form }], [qw(login id script type cursor_fokus)])};
edit();
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
$main::lxdebug->leave_sub();
}
}
$main::lxdebug->leave_sub();
}
@@
-783,7
+783,7
@@
sub delete {
# /saving the history
$form->info($locale->text('Delivery Order deleted!'));
# /saving the history
$form->info($locale->text('Delivery Order deleted!'));
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
$form->error($locale->text('Cannot delete delivery order!'));
}
$form->error($locale->text('Cannot delete delivery order!'));
@@
-1405,7
+1405,7
@@
sub transfer_in {
update();
$main::lxdebug->leave_sub();
update();
$main::lxdebug->leave_sub();
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
}
}
}
@@
-1524,7
+1524,7
@@
sub transfer_out {
update();
$main::lxdebug->leave_sub();
update();
$main::lxdebug->leave_sub();
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
}
DO->transfer_in_out('direction' => 'out',
}
}
DO->transfer_in_out('direction' => 'out',
diff --git
a/bin/mozilla/fu.pl
b/bin/mozilla/fu.pl
index
5cd6a07
..
660e982
100644
(file)
--- a/
bin/mozilla/fu.pl
+++ b/
bin/mozilla/fu.pl
@@
-126,7
+126,7
@@
sub save_follow_up {
if ($form->{POPUP_MODE}) {
$form->header();
print $form->parse_html_template('fu/close_window');
if ($form->{POPUP_MODE}) {
$form->header();
print $form->parse_html_template('fu/close_window');
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
$form->{SAVED_MESSAGE} = $locale->text('Follow-Up saved.');
}
$form->{SAVED_MESSAGE} = $locale->text('Follow-Up saved.');
@@
-172,7
+172,7
@@
sub finish {
if ($form->{POPUP_MODE}) {
$form->header();
print $form->parse_html_template('fu/close_window');
if ($form->{POPUP_MODE}) {
$form->header();
print $form->parse_html_template('fu/close_window');
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
$form->redirect() if ($form->{callback});
}
$form->redirect() if ($form->{callback});
@@
-210,7
+210,7
@@
sub delete {
if ($form->{POPUP_MODE}) {
$form->header();
print $form->parse_html_template('fu/close_window');
if ($form->{POPUP_MODE}) {
$form->header();
print $form->parse_html_template('fu/close_window');
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
$form->redirect() if ($form->{callback});
}
$form->redirect() if ($form->{callback});
diff --git
a/bin/mozilla/ic.pl
b/bin/mozilla/ic.pl
index
519ab79
..
6cb9e9c
100644
(file)
--- a/
bin/mozilla/ic.pl
+++ b/
bin/mozilla/ic.pl
@@
-1846,7
+1846,7
@@
sub update {
if ($rows > 1) {
$form->{makemodel_rows}--;
select_item(mode => 'IC', pre_entered_qty => $form->parse_amount(\%myconfig, $form->{"qty_$i"}));
if ($rows > 1) {
$form->{makemodel_rows}--;
select_item(mode => 'IC', pre_entered_qty => $form->parse_amount(\%myconfig, $form->{"qty_$i"}));
-
::end_of_request()
;
+
$::dispatcher->end_request
;
} else {
map { $form->{item_list}[$i]{$_} =~ s/\"/"/g }
qw(partnumber description unit partsgroup);
} else {
map { $form->{item_list}[$i]{$_} =~ s/\"/"/g }
qw(partnumber description unit partsgroup);
diff --git
a/bin/mozilla/installationcheck.pl
b/bin/mozilla/installationcheck.pl
index
fdffa64
..
f52cc52
100644
(file)
--- a/
bin/mozilla/installationcheck.pl
+++ b/
bin/mozilla/installationcheck.pl
@@
-87,7
+87,7
@@
sub verify_installation {
</html>
|);
</html>
|);
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
1;
}
1;
diff --git
a/bin/mozilla/io.pl
b/bin/mozilla/io.pl
index
cdf43d3
..
d8f53db
100644
(file)
--- a/
bin/mozilla/io.pl
+++ b/
bin/mozilla/io.pl
@@
-860,7
+860,7
@@
sub validate_items {
if ($form->{rowcount} == 1) {
flash('warning', $::locale->text('The action you\'ve chosen has not been executed because the document does not contain any item yet.'));
&update;
if ($form->{rowcount} == 1) {
flash('warning', $::locale->text('The action you\'ve chosen has not been executed because the document does not contain any item yet.'));
&update;
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
for my $i (1 .. $form->{rowcount} - 1) {
}
for my $i (1 .. $form->{rowcount} - 1) {
@@
-1147,7
+1147,7
@@
sub print {
$form->{formname} = $formname;
&edit();
$::lxdebug->leave_sub();
$form->{formname} = $formname;
&edit();
$::lxdebug->leave_sub();
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
&print_form($old_form);
}
&print_form($old_form);
@@
-1591,7
+1591,7
@@
sub print_form {
}
call_sub($display_form);
}
call_sub($display_form);
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
my $msg =
}
my $msg =
@@
-1605,7
+1605,7
@@
sub print_form {
}
if ($form->{printing}) {
call_sub($display_form);
}
if ($form->{printing}) {
call_sub($display_form);
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
$main::lxdebug->leave_sub();
}
$main::lxdebug->leave_sub();
diff --git
a/bin/mozilla/ir.pl
b/bin/mozilla/ir.pl
index
4611989
..
5b62ea5
100644
(file)
--- a/
bin/mozilla/ir.pl
+++ b/
bin/mozilla/ir.pl
@@
-525,7
+525,7
@@
sub update {
if ($rows > 1) {
select_item(mode => 'IR', pre_entered_qty => $form->{"qty_$i"});
if ($rows > 1) {
select_item(mode => 'IR', pre_entered_qty => $form->{"qty_$i"});
-
::end_of_request()
;
+
$::dispatcher->end_request
;
} else {
} else {
@@
-746,7
+746,7
@@
sub post {
# if the vendor changed get new values
if (&check_name('vendor')) {
&update;
# if the vendor changed get new values
if (&check_name('vendor')) {
&update;
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
if ($myconfig{mandatory_departments} && !$form->{department_id}) {
}
if ($myconfig{mandatory_departments} && !$form->{department_id}) {
diff --git
a/bin/mozilla/is.pl
b/bin/mozilla/is.pl
index
1612750
..
fa5e319
100644
(file)
--- a/
bin/mozilla/is.pl
+++ b/
bin/mozilla/is.pl
@@
-605,7
+605,7
@@
sub update {
if ($rows > 1) {
select_item(mode => 'IS', pre_entered_qty => $form->{"qty_$i"});
if ($rows > 1) {
select_item(mode => 'IS', pre_entered_qty => $form->{"qty_$i"});
-
::end_of_request()
;
+
$::dispatcher->end_request
;
} else {
} else {
@@
-760,7
+760,7
@@
sub post {
# if oldcustomer ne customer redo form
if (&check_name('customer')) {
&update;
# if oldcustomer ne customer redo form
if (&check_name('customer')) {
&update;
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
if ($myconfig{mandatory_departments} && !$form->{department_id}) {
}
if ($myconfig{mandatory_departments} && !$form->{department_id}) {
diff --git
a/bin/mozilla/oe.pl
b/bin/mozilla/oe.pl
index
4870287
..
0e7dc7a
100644
(file)
--- a/
bin/mozilla/oe.pl
+++ b/
bin/mozilla/oe.pl
@@
-651,7
+651,7
@@
sub update {
if ($rows > 1) {
select_item(mode => $mode, pre_entered_qty => $form->{"qty_$i"});
if ($rows > 1) {
select_item(mode => $mode, pre_entered_qty => $form->{"qty_$i"});
-
::end_of_request()
;
+
$::dispatcher->end_request
;
} else {
} else {
@@
-1195,7
+1195,7
@@
sub save_and_close {
$form->{payment_id} = $payment_id;
}
&update;
$form->{payment_id} = $payment_id;
}
&update;
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
$form->{id} = 0 if $form->{saveasnew};
}
$form->{id} = 0 if $form->{saveasnew};
@@
-1303,7
+1303,7
@@
sub save {
$form->{payment_id} = $payment_id;
}
&update;
$form->{payment_id} = $payment_id;
}
&update;
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
$form->{id} = 0 if $form->{saveasnew};
}
$form->{id} = 0 if $form->{saveasnew};
@@
-1366,7
+1366,7
@@
sub save {
if(!$form->{print_and_save}) {
delete @{$form}{ary_diff([keys %{ $form }], [qw(login id script type cursor_fokus)])};
edit();
if(!$form->{print_and_save}) {
delete @{$form}{ary_diff([keys %{ $form }], [qw(login id script type cursor_fokus)])};
edit();
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
$main::lxdebug->leave_sub();
}
}
$main::lxdebug->leave_sub();
}
@@
-1402,7
+1402,7
@@
sub delete {
}
# /saving the history
$form->info($msg);
}
# /saving the history
$form->info($msg);
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
$form->error($err);
}
$form->error($err);
@@
-1454,7
+1454,7
@@
sub invoice {
if (&check_name($form->{vc})) {
$form->{payment_id} = $payment_id if $form->{payment_id} eq "";
&update;
if (&check_name($form->{vc})) {
$form->{payment_id} = $payment_id if $form->{payment_id} eq "";
&update;
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
_oe_remove_delivered_or_billed_rows(id => $form->{id}, type => 'billed');
}
_oe_remove_delivered_or_billed_rows(id => $form->{id}, type => 'billed');
@@
-1756,7
+1756,7
@@
sub check_for_direct_delivery {
$main::lxdebug->leave_sub();
$main::lxdebug->leave_sub();
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
sub purchase_order {
}
sub purchase_order {
diff --git
a/bin/mozilla/ustva.pl
b/bin/mozilla/ustva.pl
index
b66fead
..
f88fce5
100644
(file)
--- a/
bin/mozilla/ustva.pl
+++ b/
bin/mozilla/ustva.pl
@@
-818,12
+818,12
@@
sub generate_ustva {
} elsif ( $form->{format} eq '' ){ # No format error.
$form->header;
USTVA::error( $locale->text('Application Error. No Format given' ) . "!");
} elsif ( $form->{format} eq '' ){ # No format error.
$form->header;
USTVA::error( $locale->text('Application Error. No Format given' ) . "!");
-
::end_of_request()
;
+
$::dispatcher->end_request
;
} else { # All other Formats are wrong
$form->header;
USTVA::error( $locale->text('Application Error. Wrong Format') . ": " . $form->{format} );
} else { # All other Formats are wrong
$form->header;
USTVA::error( $locale->text('Application Error. Wrong Format') . ": " . $form->{format} );
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
}
diff --git
a/bin/mozilla/wh.pl
b/bin/mozilla/wh.pl
index
5c0a5e7
..
5ffa382
100644
(file)
--- a/
bin/mozilla/wh.pl
+++ b/
bin/mozilla/wh.pl
@@
-290,7
+290,7
@@
sub transfer_parts {
if (!scalar @transfers) {
$form->show_generic_information($locale->text('Nothing has been selected for transfer.'));
if (!scalar @transfers) {
$form->show_generic_information($locale->text('Nothing has been selected for transfer.'));
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
WH->transfer(@transfers);
}
WH->transfer(@transfers);
@@
-624,7
+624,7
@@
sub remove_parts {
if (!scalar @transfers) {
$form->show_generic_information($locale->text('Nothing has been selected for removal.'));
if (!scalar @transfers) {
$form->show_generic_information($locale->text('Nothing has been selected for removal.'));
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
WH->transfer(@transfers);
}
WH->transfer(@transfers);
diff --git
a/scripts/task_server.pl
b/scripts/task_server.pl
index
2fd93de
..
c946371
100755
(executable)
--- a/
scripts/task_server.pl
+++ b/
scripts/task_server.pl
@@
-297,17
+297,6
@@
sub gd_run {
}
}
}
}
-sub end_of_request {
- $main::lxdebug->show_backtrace();
- die <<EOF;
-Job called ::end_of_request()!
-
-This usually indicates success but should not be used by background jobs. A
-backtrace has been logged. Please tell the job author to have a look at it.
-EOF
-
-}
-
chdir $exe_dir;
mkdir SL::System::TaskServer::PID_BASE() if !-d SL::System::TaskServer::PID_BASE();
chdir $exe_dir;
mkdir SL::System::TaskServer::PID_BASE() if !-d SL::System::TaskServer::PID_BASE();