summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1419542)
raw | patch | inline | side by side (parent: 1419542)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 10 Jul 2008 10:02:59 +0000 (10:02 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 10 Jul 2008 10:02:59 +0000 (10:02 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11590 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/modules/GosaSupportDaemon.pm | patch | blob | history |
index 21db30a5974acedb2677887fe3bb5df3828f0b34..33c9ec47d741532fc1548a18599757a98c6ee4f4 100644 (file)
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");
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 ) {