Index: branches/5.1.x/core/units/fck/fck_tp.php =================================================================== diff -u -N -r12127 -r12657 --- branches/5.1.x/core/units/fck/fck_tp.php (.../fck_tp.php) (revision 12127) +++ branches/5.1.x/core/units/fck/fck_tp.php (.../fck_tp.php) (revision 12657) @@ -1,6 +1,6 @@ ReadFolders($user_files_dir); $fck_helper =& $this->Application->recallObject('FCKHelper'); /* @var fck_helper fckFCKHelper*/ - foreach ($FCKDefaultFolders as $k=>$v) - { - if (!in_array($v,$aFolders)) { - if ($fck_helper->CreateFolder($v)) { - $aFolders[] = $v; - } + $default_folders = defined('FCK_DEFAULT_FOLDERS') ? FCK_DEFAULT_FOLDERS : Array ('Files', 'Images', 'Flash', 'Documents'); + + foreach ($default_folders as $index => $folder) { + if (!$fck_helper->CreateFolder($folder)) { + unset($default_folders[$index]); } } - if (count($aFolders) > 0) { - natcasesort($aFolders); - foreach($aFolders AS $k=>$v) { - $selected = ($this->Application->GetVar('type') == $v) ? 'selected' : ''; - $ret.= '