summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4914a52)
raw | patch | inline | side by side (parent: 4914a52)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 24 Jan 2008 10:34:14 +0000 (10:34 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 24 Jan 2008 10:34:14 +0000 (10:34 +0000) |
- Supports multiple updates now.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8586 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8586 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_gosaSupportDaemon.inc | patch | blob | history |
diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc
index 7c15430ecab66becf5fc9c60e0d44fd3744b2d89..2e04ab0399e0243dbbe4d1ec0f9ef0dc26f492f3 100644 (file)
<?php
+
+/*
+ __construct - Create a new deamon handle.
+ connect - Connect to deamon socket.
+ disconnect - Disconnect from socket.
+ set_error - Sets a new error.
+ is_error - Returns TRUE if there was an error.
+ get_error - Returns the last error or "".
+ get_queued_entries - Returns all queued entries, with limitations.
+ ids_exist - Checks if the given id exists.
+ get_entries_by_id - Returns a set of entries.
+ id_exists - Checks if a set entries exists.
+ get_entry_by_id - Returns a single entry.
+ remove_entries - Remove a set of entries.
+ remove_entry - Removes a single entry.
+ update_entry - Updates a single entry.
+ xml_to_array - XML to Array.
+*/
+
+
+
class gosaSupportDaemon
{
private $o_sock = NULL;
$this->b_error = FALSE;
$this->s_error = "";
-
$xml_msg = "<xml>
<header>gosa_query_jobdb</header>
<where>
@param Array The variables to update.
@return Boolean Returns TRUE on success.
*/
- public function update_entry($id,$entry)
+ public function update_entries($ids,$entry)
{
$this->b_error = FALSE;
$this->s_error = "";
- if(!is_numeric($id)){
- trigger_error("Requires an integer value as ID parameter.");
+ if(!is_array($ids)){
+ trigger_error("Requires an array as first parameter.");
return;
}
foreach($entry as $name => $entry){
$attr.="<".strtolower($name).">".$entry."</".strtolower($name).">\n";
}
-
- $xml_msg = "<xml>
+ $xml_msg = "<xml>
<header>gosa_update_status_jobdb_entry</header>
<where>
- <id>".$id."</id>
+ <clause>
+ <connector>or</connector>";
+ foreach($ids as $id){
+ $xml_msg .= "<phrase>
+ <operator>eq</operator>
+ <id>".$id."</id>
+ </phrase>";
+ }
+ $xml_msg .= "</clause>
</where>
<update>
".$attr."