X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/6b935d522a38e1a20802c25ed51a15e0cd292c1d..e14cb525c640cb15bb6b2dfb62ccebbe78cb45cd:/bin/mozilla/common.pl diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index 64aac69ea..9d78d9f1b 100644 --- a/bin/mozilla/common.pl +++ b/bin/mozilla/common.pl @@ -9,8 +9,8 @@ # ###################################################################### -use Carp; use SL::Common; +use SL::DB::Helper::Mappings; use SL::DBUtils; use SL::Form; use SL::MoreCommon; @@ -390,7 +390,33 @@ sub format_dates { } sub reformat_numbers { - return $::form->format_numbers(@_); + return $::form->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(); } # ------------------------------------------------------------------------- @@ -413,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 }(@_); @@ -501,11 +524,9 @@ sub mark_as_paid_common { } $referer = $script . "?action=mark_as_paid&mark_as_paid=1&id=$form->{id}" . $callback; $form->header(); - print qq|
|; print qq||.$locale->text('Mark as paid?').qq|
|; print qq| |; print qq||; - print qq|