Added feature #13379: Introduced a Sprite Icon API to render icons from sprites ...
[Packages/TYPO3.CMS.git] / typo3 / class.filelistfoldertree.php
index 39719f6..1847791 100644 (file)
@@ -133,7 +133,7 @@ class filelistFolderTree extends t3lib_folderTree {
 
                $out = '
                        <!-- TYPO3 folder tree structure. -->
-                       <ul class="tree">
+                       <ul class="tree" id="treeRoot">
                ';
                $titleLen=intval($this->BE_USER->uc['titleLen']);
                if (!is_array($treeArr))        $treeArr=$this->tree;
@@ -406,6 +406,13 @@ class filelistFolderTree extends t3lib_folderTree {
                                $HTML = $this->PMicon($row,$a,$c,$nextCount,$exp);
 
                                $webpath = t3lib_BEfunc::getPathType_web_nonweb($path);
+
+                               if (is_writable($path)) {
+                                       $type = '';
+                               } else {
+                                       $type = 'readonly';
+                               }
+
                                $icon = 'gfx/i/_icon_' .$webpath . 'folders' . ($type == 'readonly' ? '_ro' : '') . '.gif';
                                if ($val == '_temp_')   {
                                        $icon = 'gfx/i/sysf.gif';