summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-10-13 12:51:21 +0200
committerVincent Petry <pvince81@owncloud.com>2015-10-13 12:51:21 +0200
commit02513f8d040fd081a308f80c887f91b86bcc2a70 (patch)
treefc40e14f1ac22eb10bbacc4b6d797a943d2fb751 /lib
parent3891cd9068596481cf1717e9b1a5bcae1cc0ce09 (diff)
downloadnextcloud-server-02513f8d040fd081a308f80c887f91b86bcc2a70.tar.gz
nextcloud-server-02513f8d040fd081a308f80c887f91b86bcc2a70.zip
Fix mtime PROPPATCH to be "lastmodified" instead of "getlastmodified"
Fix regression that makes PROPPATCH of mtime work like it did in OC <= 8.0. The PROPPATCH must be done on the "lastmodified" property. The "getlastmodified" now return 403 again.
Diffstat (limited to 'lib')
-rw-r--r--lib/private/connector/sabre/filesplugin.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/connector/sabre/filesplugin.php b/lib/private/connector/sabre/filesplugin.php
index ab7f6884a5e..38a7139d9e9 100644
--- a/lib/private/connector/sabre/filesplugin.php
+++ b/lib/private/connector/sabre/filesplugin.php
@@ -41,7 +41,7 @@ class FilesPlugin extends \Sabre\DAV\ServerPlugin {
const DOWNLOADURL_PROPERTYNAME = '{http://owncloud.org/ns}downloadURL';
const SIZE_PROPERTYNAME = '{http://owncloud.org/ns}size';
const GETETAG_PROPERTYNAME = '{DAV:}getetag';
- const GETLASTMODIFIED_PROPERTYNAME = '{DAV:}getlastmodified';
+ const LASTMODIFIED_PROPERTYNAME = '{DAV:}lastmodified';
/**
* Reference to main server object
@@ -101,7 +101,7 @@ class FilesPlugin extends \Sabre\DAV\ServerPlugin {
$server->protectedProperties[] = self::DOWNLOADURL_PROPERTYNAME;
// normally these cannot be changed (RFC4918), but we want them modifiable through PROPPATCH
- $allowedProperties = ['{DAV:}getetag', '{DAV:}getlastmodified'];
+ $allowedProperties = ['{DAV:}getetag'];
$server->protectedProperties = array_diff($server->protectedProperties, $allowedProperties);
$this->server = $server;
@@ -208,7 +208,7 @@ class FilesPlugin extends \Sabre\DAV\ServerPlugin {
* @return void
*/
public function handleUpdateProperties($path, PropPatch $propPatch) {
- $propPatch->handle(self::GETLASTMODIFIED_PROPERTYNAME, function($time) use ($path) {
+ $propPatch->handle(self::LASTMODIFIED_PROPERTYNAME, function($time) use ($path) {
if (empty($time)) {
return false;
}