CC-3606: System->Media Folders-> system seems to search
-fixed. Need to check if directory actually exists.
This commit is contained in:
parent
1812db1490
commit
54ec6445c6
1 changed files with 12 additions and 10 deletions
|
@ -261,6 +261,7 @@ class PreferenceController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$path = $path.'/';
|
$path = $path.'/';
|
||||||
$handle = opendir($path);
|
$handle = opendir($path);
|
||||||
|
if ($handle !== false){
|
||||||
while (false !== ($file = readdir($handle))) {
|
while (false !== ($file = readdir($handle))) {
|
||||||
if ($file != "." && $file != "..") {
|
if ($file != "." && $file != "..") {
|
||||||
//only show directories that aren't private.
|
//only show directories that aren't private.
|
||||||
|
@ -274,6 +275,7 @@ class PreferenceController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ksort($result);
|
ksort($result);
|
||||||
//returns format serverBrowse is looking for.
|
//returns format serverBrowse is looking for.
|
||||||
die(json_encode($result));
|
die(json_encode($result));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue