summaryrefslogtreecommitdiffstats
path: root/3rdparty/Sabre/DAV/Locks/Backend/FS.php
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/Sabre/DAV/Locks/Backend/FS.php')
-rwxr-xr-x[-rw-r--r--]3rdparty/Sabre/DAV/Locks/Backend/FS.php62
1 files changed, 32 insertions, 30 deletions
diff --git a/3rdparty/Sabre/DAV/Locks/Backend/FS.php b/3rdparty/Sabre/DAV/Locks/Backend/FS.php
index 8653f55b1c6..02cab87fc82 100644..100755
--- a/3rdparty/Sabre/DAV/Locks/Backend/FS.php
+++ b/3rdparty/Sabre/DAV/Locks/Backend/FS.php
@@ -1,28 +1,30 @@
<?php
/**
- * The Lock manager allows you to handle all file-locks centrally.
+ * This Lock Backend stores all its data in the filesystem in separate file per
+ * node.
*
- * This Lock Manager is now deprecated. It has a bug that allows parent
- * collections to be deletes when children deeper in the tree are locked.
+ * This Lock Manager is now deprecated. It has a bug that allows parent
+ * collections to be deletes when children deeper in the tree are locked.
+ *
+ * This also means that using this backend means you will not pass the Neon
+ * Litmus test.
*
* You are recommended to use either the PDO or the File backend instead.
*
- * This Lock Manager stores all its data in the filesystem.
- *
* @package Sabre
* @subpackage DAV
* @deprecated
- * @copyright Copyright (C) 2007-2011 Rooftop Solutions. All rights reserved.
- * @author Evert Pot (http://www.rooftopsolutions.nl/)
+ * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
+ * @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
*/
class Sabre_DAV_Locks_Backend_FS extends Sabre_DAV_Locks_Backend_Abstract {
/**
- * The default data directory
- *
- * @var string
+ * The default data directory
+ *
+ * @var string
*/
private $dataDir;
@@ -40,17 +42,17 @@ class Sabre_DAV_Locks_Backend_FS extends Sabre_DAV_Locks_Backend_Abstract {
/**
- * Returns a list of Sabre_DAV_Locks_LockInfo objects
- *
+ * Returns a list of Sabre_DAV_Locks_LockInfo objects
+ *
* This method should return all the locks for a particular uri, including
* locks that might be set on a parent uri.
*
* If returnChildLocks is set to true, this method should also look for
* any locks in the subtree of the uri for locks.
*
- * @param string $uri
+ * @param string $uri
* @param bool $returnChildLocks
- * @return array
+ * @return array
*/
public function getLocks($uri, $returnChildLocks) {
@@ -59,15 +61,15 @@ class Sabre_DAV_Locks_Backend_FS extends Sabre_DAV_Locks_Backend_Abstract {
foreach(explode('/',$uri) as $uriPart) {
- // weird algorithm that can probably be improved, but we're traversing the path top down
- if ($currentPath) $currentPath.='/';
+ // weird algorithm that can probably be improved, but we're traversing the path top down
+ if ($currentPath) $currentPath.='/';
$currentPath.=$uriPart;
$uriLocks = $this->getData($currentPath);
foreach($uriLocks as $uriLock) {
- // Unless we're on the leaf of the uri-tree we should ingore locks with depth 0
+ // Unless we're on the leaf of the uri-tree we should ignore locks with depth 0
if($uri==$currentPath || $uriLock->depth!=0) {
$uriLock->uri = $currentPath;
$lockList[] = $uriLock;
@@ -79,18 +81,18 @@ class Sabre_DAV_Locks_Backend_FS extends Sabre_DAV_Locks_Backend_Abstract {
// Checking if we can remove any of these locks
foreach($lockList as $k=>$lock) {
- if (time() > $lock->timeout + $lock->created) unset($lockList[$k]);
+ if (time() > $lock->timeout + $lock->created) unset($lockList[$k]);
}
return $lockList;
}
/**
- * Locks a uri
- *
- * @param string $uri
- * @param Sabre_DAV_Locks_LockInfo $lockInfo
- * @return bool
+ * Locks a uri
+ *
+ * @param string $uri
+ * @param Sabre_DAV_Locks_LockInfo $lockInfo
+ * @return bool
*/
public function lock($uri,Sabre_DAV_Locks_LockInfo $lockInfo) {
@@ -109,11 +111,11 @@ class Sabre_DAV_Locks_Backend_FS extends Sabre_DAV_Locks_Backend_Abstract {
}
/**
- * Removes a lock from a uri
- *
- * @param string $uri
- * @param Sabre_DAV_Locks_LockInfo $lockInfo
- * @return bool
+ * Removes a lock from a uri
+ *
+ * @param string $uri
+ * @param Sabre_DAV_Locks_LockInfo $lockInfo
+ * @return bool
*/
public function unlock($uri,Sabre_DAV_Locks_LockInfo $lockInfo) {
@@ -136,7 +138,7 @@ class Sabre_DAV_Locks_Backend_FS extends Sabre_DAV_Locks_Backend_Abstract {
* Returns the stored data for a uri
*
* @param string $uri
- * @return array
+ * @return array
*/
protected function getData($uri) {
@@ -167,7 +169,7 @@ class Sabre_DAV_Locks_Backend_FS extends Sabre_DAV_Locks_Backend_Abstract {
* Updates the lock information
*
* @param string $uri
- * @param array $newData
+ * @param array $newData
* @return void
*/
protected function putData($uri,array $newData) {