[Phpcms-plugins-cvs] admin4phpCMS/modules/filemanager class.module_filemanager.php,1.4,1.5
Brought to you by:
mjahn
From: Martin J. <mj...@us...> - 2004-08-05 16:39:21
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/filemanager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4032/modules/filemanager Modified Files: class.module_filemanager.php Log Message: tweaked phpcms::cache-module output Index: class.module_filemanager.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/filemanager/class.module_filemanager.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- class.module_filemanager.php 24 Jul 2004 08:58:25 -0000 1.4 +++ class.module_filemanager.php 5 Aug 2004 16:38:41 -0000 1.5 @@ -28,6 +28,9 @@ /* * $Log$ +* Revision 1.5 2004/08/05 16:38:41 mjahn +* tweaked phpcms::cache-module output +* * Revision 1.4 2004/07/24 08:58:25 mjahn * changed some things * @@ -222,16 +225,17 @@ if ($entry{0} == '.' && $entry{1} != '.') { continue; } - - // entry is file - if (is_file ($dir.'/'.$entry)) { - $files[] = $entry; - } + + $direntry = realpath ($dir.'/'.$entry); // entry is directory - if (is_dir ($dir.'/'.$entry)) { + if (@is_dir ($direntry.'/.')) { $dirs[] = $entry; } + + if (@is_file ($direntry)) { + $files[] = $entry; + } } closedir ($dh); sort ($dirs); @@ -299,8 +303,10 @@ 'extra'=>'class="line'.$alternate++.'"'); $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $entrypath = realpath ($dir.'/'.$entry); + // entry is directory - if (is_dir ($dir.'/'.$entry)) { + if (is_dir ($entrypath)) { $nolink = false; @@ -316,17 +322,17 @@ $actiondata = array ('_root'=>'list-'.$entry, '_id'=>'select-'.$entry, '_type'=>'form_checkbox_simple', 'id'=>'select['.$entry.']', 'name'=>'select['.$entry.']', 'value'=>'selected', 'title'=>'Auswählen', 'extra'=>'class="input"'); $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - if (!is_executable ($dir.'/'.$entry)) { + if (!@file_exists($entrypath.'/.')) { $type = 'folder_inactive'; $nolink = true; } - if (!is_readable ($dir.'/'.$entry)) { + if (!is_readable ($entrypath)) { $type = 'folder_inactive'; $nolink = true; } - if (is_link ($dir.'/'.$entry)) { + if (is_link ($entrypath)) { $type = 'symlink'; } |