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

webdav: make it possible to use ClassIdentifer for FolderClass Setting

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Obsolete
    • Icon: Medium Medium
    • None
    • 3.10.0, 3.9.4, 4.0.0
    • Legacy > WebDAV
    • None

    Description

      In webdav.ini.append.php you can set the FolderClass which webdav use to create new folders

      # webdav.ini
      [FolderSettings]
      FolderClass=2
      

      It would be nice to set the FolderClass by classIdentifer like this

      <code>
      [FolderSettings]
      FolderClass=folder
      

      The following code do this:

      // kernel/classes/webdav/ezwebdavcontentserver.php
          function createFolder( $parentNode, $target )
          {
              // Grab settings from the ini file:
              $webdavINI = eZINI::instance( eZWebDAVContentServer::WEBDAV_INI_FILE );
              $folderClassID = $webdavINI->variable( 'FolderSettings', 'FolderClass' );
              $languageCode = eZContentObject::defaultLanguage();
      
              // classidentifier nutzen für standarfolder
              $class = eZContentClass::fetch( $folderClassID );
              if( !is_object($class) )
              {
                  $class = eZContentClass::fetchByIdentifier( $folderClass );
                  if( is_object($class) )
                      $folderClassID = $class->attribute('id');
              }
      
      ...
      

      Then i found a comment in webdav.ini

      # DEPRECATED: WebDAV will use the settings in upload.ini
      #
      # This setting reveales the ID of the folder class.
      # In addition, it is also used to determine which
      # attribute to use when creating/naming/renaming the folder.
      #
      [FolderSettings]
      FolderClass=1
      NameAttribute=name
      

      that the FolderClass Setting is depricated. It isn't. It is still used to define the default Class for creating new webdavfolders.

      Attachments

        Activity

          People

            unknown unknown
            4d91e976-d41f-487b-ae85-f7216bd06dac@accounts.ibexa.co Felix Woldt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: