diff options
author | Björn Schießle <schiessle@owncloud.com> | 2012-09-26 13:05:12 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2012-09-26 13:06:43 +0200 |
commit | 50d7cfbbe799969dcf650774dd1af9a0bb1d6c1c (patch) | |
tree | 13cd0af19635bf4c594374c067a5efada60b9a36 | |
parent | 0192d920f05f231018500abf637d9877d779d5b9 (diff) | |
download | nextcloud-server-50d7cfbbe799969dcf650774dd1af9a0bb1d6c1c.tar.gz nextcloud-server-50d7cfbbe799969dcf650774dd1af9a0bb1d6c1c.zip |
prepare server for move of property name "lastmodified" to "getlastmodified" according to RFC4918.
Depreciated const can be removed after sync client update and release
-rw-r--r-- | lib/connector/sabre/node.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/connector/sabre/node.php b/lib/connector/sabre/node.php index e5c76a64911..55fa0dfde66 100644 --- a/lib/connector/sabre/node.php +++ b/lib/connector/sabre/node.php @@ -23,8 +23,9 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IProperties { const GETETAG_PROPERTYNAME = '{DAV:}getetag'; - const LASTMODIFIED_PROPERTYNAME = '{DAV:}lastmodified'; - + const LASTMODIFIED_PROPERTYNAME_DEPRECIATED = '{DAV:}lastmodified'; // FIXME: keept for the transition period, can be removed for OC 4.5.1 if the sync client update too + const GETLASTMODIFIED_PROPERTYNAME = '{DAV:}getlastmodified'; + /** * The path to the current node * @@ -150,8 +151,9 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr $query->execute( array( OC_User::getUser(), $this->path, $propertyName )); } } - else { - if( strcmp( $propertyName, self::LASTMODIFIED_PROPERTYNAME) === 0) { + else { //FIXME: first part of if statement can be removed together with the LASTMODIFIED_PROPERTYNAME_DEPRECIATED const for oc4.5.1 if the sync client was updated too + if( strcmp( $propertyName, self::LASTMODIFIED_PROPERTYNAME_DEPRECIATED) === 0 || + strcmp( $propertyName, self::GETLASTMODIFIED_PROPERTYNAME) === 0 ) { $this->touch($propertyValue); } else { if(!array_key_exists( $propertyName, $existing )) { |