aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/connector/sabre/node.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-10-22 19:41:26 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-10-22 19:41:26 +0200
commit09903aa36c54f68f38bece19e418ba34ac6d1491 (patch)
treeb515a416898a58820f46bbe6d44e1bfbb60edab4 /lib/private/connector/sabre/node.php
parentcadd71ec8a02fc5619a9347109f9e588e13b3e3b (diff)
downloadnextcloud-server-09903aa36c54f68f38bece19e418ba34ac6d1491.tar.gz
nextcloud-server-09903aa36c54f68f38bece19e418ba34ac6d1491.zip
- delete properties on node delete
- move properties on node move
Diffstat (limited to 'lib/private/connector/sabre/node.php')
-rw-r--r--lib/private/connector/sabre/node.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/private/connector/sabre/node.php b/lib/private/connector/sabre/node.php
index c38e9f86375..3c2ad60f1dd 100644
--- a/lib/private/connector/sabre/node.php
+++ b/lib/private/connector/sabre/node.php
@@ -191,6 +191,17 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
}
/**
+ * removes all properties for this node and user
+ */
+ public function removeProperties() {
+ $query = OC_DB::prepare( 'DELETE FROM `*PREFIX*properties`'
+ .' WHERE `userid` = ? AND `propertypath` = ?' );
+ $query->execute( array( OC_User::getUser(), $this->path));
+
+ $this->setPropertyCache(null);
+ }
+
+ /**
* @brief Returns a list of properties for this nodes.;
* @param array $properties
* @return array