Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-16468

ezcWebdavFileBackend::getProperty will allways return empty lockdiscovery

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Medium Medium
    • None
    • None
    • Legacy > WebDAV
    • 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]))

      { return $properties[$namespace][$propertyName]; }

      else

      { return new ezcWebdavLockDiscoveryProperty(); }

      }
      return parent::getProperty($path, $propertyName, $namespace);
      }

      Attachments

        Activity

          People

            unknown unknown
            mgriesbach mgriesbach
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: