diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-22 14:25:49 -0700 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-22 14:25:49 -0700 |
commit | 70b02f0513758febe17c13526d96d80c6003284b (patch) | |
tree | 912e37f971b69ef4b47cff46323c73203c60a9ae | |
parent | cea1f80c1a124d7963568bd095f1dbbaf7fd0a39 (diff) | |
parent | 09903aa36c54f68f38bece19e418ba34ac6d1491 (diff) | |
download | nextcloud-server-70b02f0513758febe17c13526d96d80c6003284b.tar.gz nextcloud-server-70b02f0513758febe17c13526d96d80c6003284b.zip |
Merge pull request #5479 from owncloud/fixing-4502-master
Fix webdav to fullfil litmus test suite
-rw-r--r-- | lib/private/connector/sabre/file.php | 3 | ||||
-rw-r--r-- | lib/private/connector/sabre/node.php | 11 | ||||
-rw-r--r-- | lib/private/connector/sabre/objecttree.php | 5 |
3 files changed, 19 insertions, 0 deletions
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php index 3402946a136..6ace8d14484 100644 --- a/lib/private/connector/sabre/file.php +++ b/lib/private/connector/sabre/file.php @@ -148,6 +148,9 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D } \OC\Files\Filesystem::unlink($this->path); + // remove properties + $this->removeProperties(); + } /** 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 diff --git a/lib/private/connector/sabre/objecttree.php b/lib/private/connector/sabre/objecttree.php index df8902f66e2..cd3f081f7cc 100644 --- a/lib/private/connector/sabre/objecttree.php +++ b/lib/private/connector/sabre/objecttree.php @@ -97,6 +97,11 @@ class ObjectTree extends \Sabre_DAV_ObjectTree { throw new \Sabre_DAV_Exception_Forbidden(''); } + // update properties + $query = \OC_DB::prepare( 'UPDATE `*PREFIX*properties` SET `propertypath` = ?' + .' WHERE `userid` = ? AND `propertypath` = ?' ); + $query->execute( array( $destinationPath, \OC_User::getUser(), $sourcePath )); + $this->markDirty($sourceDir); $this->markDirty($destinationDir); |