From aef4125146a34c3b6967af4789d2ac60650e9ec3 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 3 May 2009 18:48:36 +0000 Subject: [PATCH] "- using an ordered list to get a count of dir entries - caching the current path in session, for easier debugging" --- filemanager/test.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/filemanager/test.php b/filemanager/test.php index 695f1c2503..833bc8d8db 100644 --- a/filemanager/test.php +++ b/filemanager/test.php @@ -15,8 +15,10 @@ $GLOBALS['egw_info']['flags'] = array( ); include('../header.inc.php'); -$path = '/home/'.$GLOBALS['egw_info']['user']['account_lid']; - +if (!($path = egw_cache::getSession('filemanger','test'))) +{ + $path = '/home/'.$GLOBALS['egw_info']['user']['account_lid']; +} if (isset($_REQUEST['path'])) $path = $_REQUEST['path']; echo html::form("

Path: ".html::input('path',$path,'text','size="40"'). html::submit_button('',lang('Submit'))."

\n",array(),'','','','','GET'); @@ -27,6 +29,8 @@ if (isset($path) && !empty($path)) { throw new egw_exception_wrong_userinput('Not an absolute path!'); } + egw_cache::setSession('filemanger','test',$path); + echo "

"; foreach(explode('/',$path) as $n => $part) { @@ -54,7 +58,7 @@ if (isset($path) && !empty($path)) $files[] = $file; } closedir($d); - echo ($files ? '' : '

Empty directory

')."\n"; + echo ($files ? '
  1. '.implode("
  2. \n
  3. ",$files).'
' : '

Empty directory

')."\n"; } echo "

stat('$path') took $time ms (mode = ".(isset($stat['mode'])?sprintf('%o',$stat['mode']).' = '.egw_vfs::int2mode($stat['mode']):'NULL').')';