[Pkg-owncloud-commits] [php-sabredav] 78/275: Always showing the lock-token in lockdiscovery properties.
David Prévot
taffit at moszumanska.debian.org
Thu Sep 25 14:55:54 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabredav.
commit 3b759a25e6702a5521f6d0fadb8d96e0e4a97ca6
Author: Evert Pot <me at evertpot.com>
Date: Wed Jul 2 12:42:24 2014 -0400
Always showing the lock-token in lockdiscovery properties.
Fixes #472.
---
ChangeLog.md | 1 +
lib/DAV/Locks/Plugin.php | 2 +-
lib/DAV/Property/LockDiscovery.php | 18 ++++--------------
3 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/ChangeLog.md b/ChangeLog.md
index 791e937..5e974f1 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -9,6 +9,7 @@ ChangeLog
* #460: PropertyStorage must move properties during MOVE requests
* Changed: Restructured the zip distribution to be a little bit more lean
and consistent.
+* #472: Always returning lock tokens in the lockdiscovery property.
2.0.3 (????-??-??)
diff --git a/lib/DAV/Locks/Plugin.php b/lib/DAV/Locks/Plugin.php
index 7ff5d4b..60efb74 100644
--- a/lib/DAV/Locks/Plugin.php
+++ b/lib/DAV/Locks/Plugin.php
@@ -394,7 +394,7 @@ class Plugin extends DAV\ServerPlugin {
$lockDiscovery = $dom->createElementNS('DAV:','d:lockdiscovery');
$prop->appendChild($lockDiscovery);
- $lockObj = new DAV\Property\LockDiscovery(array($lockInfo),true);
+ $lockObj = new DAV\Property\LockDiscovery(array($lockInfo));
$lockObj->serialize($this->server,$lockDiscovery);
return $dom->saveXML();
diff --git a/lib/DAV/Property/LockDiscovery.php b/lib/DAV/Property/LockDiscovery.php
index 6b47935..0f7e709 100644
--- a/lib/DAV/Property/LockDiscovery.php
+++ b/lib/DAV/Property/LockDiscovery.php
@@ -23,13 +23,6 @@ class LockDiscovery extends DAV\Property {
public $locks;
/**
- * Should we show the locktoken as well?
- *
- * @var bool
- */
- public $revealLockToken;
-
- /**
* Hides the {DAV:}lockroot element from the response.
*
* It was reported that showing the lockroot in the response can break
@@ -43,10 +36,9 @@ class LockDiscovery extends DAV\Property {
* @param array $locks
* @param bool $revealLockToken
*/
- public function __construct($locks, $revealLockToken = false) {
+ public function __construct($locks) {
$this->locks = $locks;
- $this->revealLockToken = $revealLockToken;
}
@@ -88,11 +80,9 @@ class LockDiscovery extends DAV\Property {
$activeLock->appendChild($doc->createElementNS('DAV:','d:depth',($lock->depth == DAV\Server::DEPTH_INFINITY?'infinity':$lock->depth)));
$activeLock->appendChild($doc->createElementNS('DAV:','d:timeout','Second-' . $lock->timeout));
- if ($this->revealLockToken) {
- $lockToken = $doc->createElementNS('DAV:','d:locktoken');
- $activeLock->appendChild($lockToken);
- $lockToken->appendChild($doc->createElementNS('DAV:','d:href','opaquelocktoken:' . $lock->token));
- }
+ $lockToken = $doc->createElementNS('DAV:','d:locktoken');
+ $activeLock->appendChild($lockToken);
+ $lockToken->appendChild($doc->createElementNS('DAV:','d:href','opaquelocktoken:' . $lock->token));
$activeLock->appendChild($doc->createElementNS('DAV:','d:owner',$lock->owner));
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list