summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2012-09-26 10:48:30 +0200
committerBjörn Schießle <schiessle@owncloud.com>2012-09-26 10:48:30 +0200
commitc3c6e52104d7a3979b3a67069652e4d08e5b781e (patch)
treed4df5e4fed4e34a16b2d53fe4be1d9edb79b61c1 /lib
parent25499644e3ee38a8417b33b8817655ee1b0cf18d (diff)
downloadnextcloud-server-c3c6e52104d7a3979b3a67069652e4d08e5b781e.tar.gz
nextcloud-server-c3c6e52104d7a3979b3a67069652e4d08e5b781e.zip
- take webdav namespace for properties into account
- change update routine to add the namesapce to all stored properties
Diffstat (limited to 'lib')
-rw-r--r--lib/connector/sabre/node.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/connector/sabre/node.php b/lib/connector/sabre/node.php
index ecbbef81292..e5c76a64911 100644
--- a/lib/connector/sabre/node.php
+++ b/lib/connector/sabre/node.php
@@ -23,6 +23,7 @@
abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IProperties {
const GETETAG_PROPERTYNAME = '{DAV:}getetag';
+ const LASTMODIFIED_PROPERTYNAME = '{DAV:}lastmodified';
/**
* The path to the current node
@@ -142,7 +143,6 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
public function updateProperties($properties) {
$existing = $this->getProperties(array());
foreach($properties as $propertyName => $propertyValue) {
- $propertyName = preg_replace("/^{.*}/", "", $propertyName); // remove leading namespace from property name
// If it was null, we need to delete the property
if (is_null($propertyValue)) {
if(array_key_exists( $propertyName, $existing )) {
@@ -151,7 +151,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
}
}
else {
- if( strcmp( $propertyName, "lastmodified") === 0) {
+ if( strcmp( $propertyName, self::LASTMODIFIED_PROPERTYNAME) === 0) {
$this->touch($propertyValue);
} else {
if(!array_key_exists( $propertyName, $existing )) {