]> wagnertech.de Git - kivitendo-erp.git/commitdiff
quote_db_date verschoben nach DBUtils
authorSven Schöling <s.schoeling@linet-services.de>
Tue, 27 Feb 2007 16:21:42 +0000 (16:21 +0000)
committerSven Schöling <s.schoeling@linet-services.de>
Tue, 27 Feb 2007 16:21:42 +0000 (16:21 +0000)
SL/DBUtils.pm
SL/Form.pm

index ecb809baf79bbec60ad5ce0235bef4f99fec15f3..4336446fa6aec6500be1c8d4e7cef42f758cfdf1 100644 (file)
@@ -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;
index 6a73aa415837c6eab10294426ab31e93564026a6..0e59786d9a981d461560d873472b3e06e5cfec12 100644 (file)
@@ -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;