From 9c047d26dd11e61a8f17a7b8442ec8c33e151518 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Thu, 10 Jul 2008 10:02:59 +0000 Subject: [PATCH] update function get_where_statement after modified GOsa queries git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11590 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/modules/GosaSupportDaemon.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gosa-si/modules/GosaSupportDaemon.pm b/gosa-si/modules/GosaSupportDaemon.pm index 21db30a59..33c9ec47d 100644 --- a/gosa-si/modules/GosaSupportDaemon.pm +++ b/gosa-si/modules/GosaSupportDaemon.pm @@ -293,6 +293,8 @@ sub get_where_statement { my @xml_tags = keys %{$phrase}; my $tag = $xml_tags[0]; my $val = $phrase->{$tag}[0]; + if( ref($val) eq "HASH" ) { next; } # empty xml-tags should not appear in where statement + # integer columns do not have to have single quotes besides the value if ($tag eq "id") { push(@phrase_l, "$tag$operator$val"); @@ -300,8 +302,11 @@ sub get_where_statement { push(@phrase_l, "$tag$operator'$val'"); } } - my $clause_str .= join(" $connector ", @phrase_l); - push(@clause_l, "($clause_str)"); + + if (not 0 == @phrase_l) { + my $clause_str .= join(" $connector ", @phrase_l); + push(@clause_l, "($clause_str)"); + } } if( not 0 == @clause_l ) { -- 2.30.2