From: Sven Schöling Date: Tue, 27 Feb 2007 16:21:42 +0000 (+0000) Subject: quote_db_date verschoben nach DBUtils X-Git-Tag: release-2.4.3^2~655 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=04c852931c480acc14560633c9768777758ecb27;p=kivitendo-erp.git quote_db_date verschoben nach DBUtils --- diff --git a/SL/DBUtils.pm b/SL/DBUtils.pm index ecb809baf..4336446fa 100644 --- a/SL/DBUtils.pm +++ b/SL/DBUtils.pm @@ -3,7 +3,7 @@ package SL::DBUtils; require Exporter; @ISA = qw(Exporter); -@EXPORT = qw(conv_i conv_date conv_dateq do_query selectrow_query do_statement dump_query); +@EXPORT = qw(conv_i conv_date conv_dateq do_query selectrow_query do_statement dump_query quote_db_date); sub conv_i { my ($value, $default) = @_; @@ -74,4 +74,12 @@ sub dump_query { $main::lxdebug->message($level, $msg . $query); } +sub quote_db_date { + my ($str) = @_; + return "NULL" unless defined $str; + return "current_date" if $str =~ /current_date/; + $str =~ s/'/''/g; + return "'$str'"; +} + 1; diff --git a/SL/Form.pm b/SL/Form.pm index 6a73aa415..0e59786d9 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -239,15 +239,6 @@ sub quote_html { return $str; } -sub quote_db_date { - $main::lxdebug->enter_sub(2) and my ($self, $str) = @_; - $main::lxdebug->leave_sub(2) and return "NULL" unless defined $str; - $main::lxdebug->leave_sub(2) and return "current_date" if $str =~ /current_date/; - $str =~ s/'/''/g; - $main::lxdebug->leave_sub(2) and return "'$str'"; -} - - sub hide_form { my $self = shift;