X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fcommon.pl;h=1b054cf22ab4858d2ba94408da07566850d6b743;hb=8a2d9daf01083e1271cf6118591bb2c242734261;hp=cef7fcab88b169215be3150eef9861dd7fbe397c;hpb=89c9ff022d3f13e27ba6bda085df15707fcfb0eb;p=kivitendo-erp.git diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index cef7fcab8..1b054cf22 100644 --- a/bin/mozilla/common.pl +++ b/bin/mozilla/common.pl @@ -9,7 +9,6 @@ # ###################################################################### -use Carp; use SL::Common; use SL::DB::Helper::Mappings; use SL::DBUtils; @@ -396,6 +395,32 @@ sub reformat_numbers { # ------------------------------------------------------------------------- +sub show_history { + $main::lxdebug->enter_sub(); + + my $form = $main::form; + my %myconfig = %main::myconfig; + my $locale = $main::locale; + + my $dbh = $form->dbconnect(\%myconfig); + my ($sort, $sortby) = split(/\-\-/, $form->{order}); + $sort =~ s/.*\.(.*)/$1/; + + $form->{title} = $locale->text("History"); + $form->header(); + print $form->parse_html_template( "common/show_history", { + "DATEN" => $form->get_history($dbh,$form->{input_name},"",$form->{order}), + "SUCCESS" => ($form->get_history($dbh,$form->{input_name}) ne "0"), + uc($sort) => 1, + uc($sort)."BY" => $sortby + } ); + + $dbh->disconnect(); + $main::lxdebug->leave_sub(); +} + +# ------------------------------------------------------------------------- + sub call_sub { $main::lxdebug->enter_sub(); @@ -414,9 +439,6 @@ sub call_sub { $form->error(sprintf($locale->text("Attempt to call an undefined sub named '%s'"), $name)); } - $::called_subs{$name}++; - confess "RECURSION DETECTION: call_sub($name) called " . $::called_subs{$name} . " time(s)" if $::called_subs{$name} > 10; - { no strict "refs"; &{ $name }(@_);