From: cajus Date: Fri, 9 Jun 2006 07:16:11 +0000 (+0000) Subject: Updated debug function for snapshots X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8ea4da6f606b187f014fa03e69c997ae1a447f48;p=gosa.git Updated debug function for snapshots git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3736 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_ldap.inc b/include/class_ldap.inc index 6a2c44510..b289ffe4d 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -1130,11 +1130,18 @@ function gen_xls ($dn, $filter= "(objectClass=*)", $attributes= array('*'), $rec return $objectclasses; } - function create_snapshot($dn) + function create_snapshot($dn, $type= "snapshot", $description= "") { if ($this->dn_exists($dn) && $dn != ""){ $data= preg_replace('/^dn:.*\n/', '', $this->gen_ldif($dn)); - echo base64_encode(gzcompress($data, 6)); + $target= array(); + $target['objectClass']= array("top", "gosaObjectSnapshot"); + $target['gosaSnapshotData']= gzcompress($data, 6); + $target['gosaSnapshotType']= $type; + list($usec, $sec)= explode(" ", microtime()); + $target['gosaShapshotTimestamp']= preg_replace("/\./", "", $sec.$usec); + $target['gosaShapshotDN']= $dn; + print_a($target); } }