CC-3606: System->Media Folders-> system seems to search

-fixed. Need to check if directory actually exists.
This commit is contained in:
Martin Konecny 2012-04-09 12:43:40 -04:00
parent 1812db1490
commit 54ec6445c6

View file

@ -261,6 +261,7 @@ class PreferenceController extends Zend_Controller_Action
{
$path = $path.'/';
$handle = opendir($path);
if ($handle !== false){
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
//only show directories that aren't private.
@ -274,6 +275,7 @@ class PreferenceController extends Zend_Controller_Action
}
}
}
}
ksort($result);
//returns format serverBrowse is looking for.
die(json_encode($result));