Index: 4.2.0/kernel/private/classes/webdav/ezwebdavcontentbackend.php
===================================================================
--- 4.2.0/kernel/private/classes/webdav/ezwebdavcontentbackend.php	(revision 101)
+++ 4.2.0/kernel/private/classes/webdav/ezwebdavcontentbackend.php	(working copy)
@@ -1,4 +1,7 @@
 <?php
+// ###JAC_PATCH_G_07_EZ_4.2.0### webdav patch for extension siteaccesses
+// + Enhancement createFolder() FolderClass can be ClassId or ClassIdentifer
+// + Enhancement createFolder() ProcessFolderNamePostfix
 //
 // This is the eZWebDAVContentBackend class. Manages WebDAV sessions.
 // Based on the eZ Components Webdav component.
@@ -1386,6 +1389,21 @@
         // Clear/flush global database instance.
         $nullVar = null;
         eZDB::setInstance( $nullVar );
+
+        // ###JAC_PATCH_G_07_EZ_4.2.0###
+        //
+        // reload webdav.ini and set FolderClasses for current siteaccess
+        // needed if FolderClasses is set in siteaccess webdav.ini.append.php
+        // for example in multisite ez installations
+        $webdavINI = eZINI::instance( self::WEBDAV_INI_FILE );
+        $webdavINI->loadCache( true );
+        $folderClasses = array();
+        if ( $webdavINI->hasGroup( 'GeneralSettings' ) and
+             $webdavINI->hasVariable( 'GeneralSettings', 'FolderClasses' ) )
+        {
+            $folderClasses = $webdavINI->variable( 'GeneralSettings', 'FolderClasses' );
+        }
+        $this->FolderClasses = $folderClasses;
     }
 
     /**
@@ -1750,8 +1768,9 @@
         $contentEntry["name"]     = $nodeName;
         $contentEntry["size"]     = 0;
         $contentEntry["mimetype"] = self::DIRECTORY_MIMETYPE;
-        $contentEntry["ctime"]    = filectime( 'settings/siteaccess/' . $site );
-        $contentEntry["mtime"]    = filemtime( 'settings/siteaccess/' . $site );
+        // ###JAC_PATCH_G_07_EZ_4.2.0###
+        $contentEntry["ctime"]    = 0; //filectime( 'settings/siteaccess/' . $site );
+        $contentEntry["mtime"]    = 0; //filemtime( 'settings/siteaccess/' . $site );
         $contentEntry["href"]     = $fullPath;
 
         $entries[] = $contentEntry;
@@ -1796,8 +1815,9 @@
         $contentEntry["name"]     = $scriptURL;
         $contentEntry["size"]     = 0;
         $contentEntry["mimetype"] = self::DIRECTORY_MIMETYPE;
-        $contentEntry["ctime"]    = filectime( 'settings/siteaccess/' . $site );
-        $contentEntry["mtime"]    = filemtime( 'settings/siteaccess/' . $site );
+        // ###JAC_PATCH_G_07_EZ_4.2.0###
+        $contentEntry["ctime"]    = 0; //filectime( 'settings/siteaccess/' . $site );
+        $contentEntry["mtime"]    = 0; //filemtime( 'settings/siteaccess/' . $site );
         $contentEntry["href"]     = $requestUri;
         $entries[] = $contentEntry;
 
@@ -2061,8 +2081,9 @@
                 $contentEntry["name"]     = $scriptURL . $site . '/'; // @as added '/'
                 $contentEntry["size"]     = 0;
                 $contentEntry["mimetype"] = self::DIRECTORY_MIMETYPE;
-                $contentEntry["ctime"]    = filectime( 'settings/siteaccess/' . $site );
-                $contentEntry["mtime"]    = filemtime( 'settings/siteaccess/' . $site );
+                // ###JAC_PATCH_G_07_EZ_4.2.0###
+                $contentEntry["ctime"]    = 0; //filectime( 'settings/siteaccess/' . $site );
+                $contentEntry["mtime"]    = 0; //filemtime( 'settings/siteaccess/' . $site );
 
                 if ( $target === '/' )
                 {
@@ -2293,9 +2314,56 @@
     {
         // Grab settings from the ini file:
         $webdavINI = eZINI::instance( self::WEBDAV_INI_FILE );
+        $webdavINI->loadCache( true );
+
         $folderClassID = $webdavINI->variable( 'FolderSettings', 'FolderClass' );
         $languageCode = eZContentObject::defaultLanguage();
 
+        // Enhancement START - ###JAC_PATCH_G_07_EZ_4.2.0###
+        //
+        // try to get the new class_identifer from folder name
+        // for example  new Folder Name 'New Gallery.gallery' => creates new gallery object with name 'New Gallery'
+        // webdav.ini.append.php
+        // [FolderSettings]
+        // ProcessFolderNamePostfix=enabled
+        $processFolderNamePostfix = false;
+
+        if ( $webdavINI->hasGroup( 'FolderSettings' ) and
+             $webdavINI->hasVariable( 'FolderSettings', 'ProcessFolderNamePostfix' ) )
+        {
+            $processFolderNamePostfix = $webdavINI->variable( 'FolderSettings', 'ProcessFolderNamePostfix' );
+            if( $processFolderNamePostfix === 'enabled' )
+            {
+                $explodeTarget = explode( '.', $target );
+                if( count( $explodeTarget ) >= 2 )
+                {
+                    $postFolderClassIdentifer = array_pop( $explodeTarget );
+                    $class = eZContentClass::fetchByIdentifier( $postFolderClassIdentifer, false );
+                    if( is_array( $class ) && isset( $class['id'] ) )
+                    {
+                        $folderClassID = $class['id'];
+                        eZWebDAVContentBackend::appendLogEntry( 'createFolder() with ClassIdentifer from target '. $postFolderClassIdentifer );
+                        $target = implode( '.', $explodeTarget );
+                    }
+                }
+            }
+        }
+        // Enhancement END
+
+        // Enhancement START - ###JAC_PATCH_G_07_EZ_4.2.0###
+        // FolderClass can be ClassId or ClassIdentifer
+        // if class_identifier is set try to use it
+        if( !is_numeric( $folderClassID ) )
+        {
+            $class = eZContentClass::fetchByIdentifier( $folderClassID, false );
+            if(  is_array( $class ) && isset( $class['id'] ) )
+                $folderClassID = $class['id'];
+            else
+                eZWebDAVContentBackend::appendLogEntry( 'ERROR: can not createFolder() with ClassIdentifer '. $folderClassID );
+        }
+        eZWebDAVContentBackend::appendLogEntry( 'createFolder() with ClassID '. $folderClassID );
+        // Enhancement END
+
         $contentObject = eZContentObject::createWithNodeAssignment( $parentNode, $folderClassID, $languageCode );
         if ( $contentObject )
         {
