diff --git a/authorizationdb.php b/authorizationdb.php index 75e7f13..afa08db 100644 --- a/authorizationdb.php +++ b/authorizationdb.php @@ -188,7 +188,7 @@ class authorizationdb extends authorization return TRUE; } - /** Remove the informations about an object + /** Remove the informations about an object and all its sub-objects @param string $object Object path to drop @return TRUE or an exception with the error message */ public function drop ($object) @@ -229,6 +229,7 @@ class authorizationdb extends authorization throw new Exception (_("Removing more than one object"), 412); if ($rc == 0) throw new Exception (_("No object removed"), 412); + $rc = $this->db->delete ("$object$this->separator%"); return TRUE; } @@ -246,6 +247,7 @@ class authorizationdb extends authorization throw new Exception (_("Removing more than one object"), 412); if ($rc == 0) throw new Exception (_("No object removed"), 412); + $rc = $this->db->delete ("$object$this->separator%"); return TRUE; } @@ -361,6 +363,7 @@ class authorizationdb extends authorization throw new Exception (sprintf (_("Object %s doesn't exists"), $object), 400); $search = reset ($search); + // TODO : Don't update if the user is not the owner of the file $this->db->update ($object, array ("modbits"=>$modbits)); return TRUE; }