From 791275fb68a81061eee5cac3daccc06cbb6f2d27 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Wed, 23 Apr 2008 10:24:10 +0000 Subject: [PATCH] change function get_where_statement, to handle the INTEGER column id git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10642 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/modules/GosaSupportDaemon.pm | 7 ++++++- gosa-si/tests/client.php | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gosa-si/modules/GosaSupportDaemon.pm b/gosa-si/modules/GosaSupportDaemon.pm index 0560933c1..a14d5def0 100644 --- a/gosa-si/modules/GosaSupportDaemon.pm +++ b/gosa-si/modules/GosaSupportDaemon.pm @@ -264,7 +264,12 @@ sub get_where_statement { my @xml_tags = keys %{$phrase}; my $tag = $xml_tags[0]; my $val = $phrase->{$tag}[0]; - push(@phrase_l, "$tag$operator'$val'"); + # integer columns do not have to have single quotes besides the value + if ($tag eq "id") { + push(@phrase_l, "$tag$operator$val"); + } else { + push(@phrase_l, "$tag$operator'$val'"); + } } my $clause_str .= join(" $connector ", @phrase_l); push(@clause_l, "($clause_str)"); diff --git a/gosa-si/tests/client.php b/gosa-si/tests/client.php index 4348bea9c..dafcce5cd 100755 --- a/gosa-si/tests/client.php +++ b/gosa-si/tests/client.php @@ -10,7 +10,7 @@ for($count = 1; $count <= $zahl; $count++) { $sock = new Socket_Client("127.0.0.1","20081",TRUE,1); - $sock->setEncryptionKey("secret-gosa-password"); + $sock->setEncryptionKey("UldOjon9gra"); if($sock->connected()){ @@ -21,7 +21,7 @@ for($count = 1; $count <= $zahl; $count++) #$data = "
job_ping
GOSA 00:01:6c:9d:b9:fa 00:01:6c:9d:b9:fa19700101000000
"; # jobdb delete - #$data = "
gosa_delete_jobdb_entry
GOSA GOSA 1
"; + $data = "
gosa_delete_jobdb_entry
GOSA GOSA 3
"; # smbhash #$data = "
gosa_gen_smb_hash
GOSAGOSAtester
"; @@ -99,7 +99,7 @@ for($count = 1; $count <= $zahl; $count++) ######### # Kerberos test query - $data = "
gosa_krb5_list_principals
00:01:6c:9d:b9:fa GOSA
"; + #$data = "
gosa_krb5_list_principals
00:01:6c:9d:b9:fa GOSA
"; $sock->write($data); $answer = "nothing"; -- 2.30.2