Details
-
Bug
-
Resolution: Obsolete
-
Medium
-
None
-
None
-
None
Description
OpenSuse 11.2
PHP Version 5.2.11
ezComponents 2009.2 installed via PEAR
Accessing a Webdav share via Windows webfolders, with auth and locking implemented according to the tutorials will allow a user to open a word document.
Said Worddocument is locked (visible in the ./.ezc/filename.xml).
Saving the Word document will fail. This results from the lock not being properly recognized as being owned by the current user.
This seems to be a result of ezcWebdavFileBackend::getProperty always returning a new, empty instance of lockdiscovery, instead of the existing lockdiscovery instance from $properties[$namespace]['lockdiscovery'] containing the correct locking information. (see lines 670 to 678)
This behavior can be overwritten by extending ezcWebdavFileBackend.
public function getProperty($path, $propertyName, $namespace = 'DAV:') {
if ($namespace == 'DAV:' && in_array($propertyName, array(
'lockdiscovery'
))) {
$storage = $this->getPropertyStorage($path);
$properties = $storage->getAllProperties();
if (is_array($properties[$namespace]) && array_key_exists($propertyName, $properties[$namespace]))
else
{ return new ezcWebdavLockDiscoveryProperty(); } }
return parent::getProperty($path, $propertyName, $namespace);
}