From 04c852931c480acc14560633c9768777758ecb27 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 27 Feb 2007 16:21:42 +0000 Subject: [PATCH] quote_db_date verschoben nach DBUtils --- SL/DBUtils.pm | 10 +++++++++- SL/Form.pm | 9 --------- 2 files changed, 9 insertions(+), 10 deletions(-) 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; -- 2.20.1