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
|
@ -260,16 +260,18 @@ class PreferenceController extends Zend_Controller_Action
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$path = $path.'/';
|
$path = $path.'/';
|
||||||
$handle = opendir($path);
|
$handle = opendir($path);
|
||||||
while (false !== ($file = readdir($handle))) {
|
if ($handle !== false){
|
||||||
if ($file != "." && $file != "..") {
|
while (false !== ($file = readdir($handle))) {
|
||||||
//only show directories that aren't private.
|
if ($file != "." && $file != "..") {
|
||||||
if (is_dir($path.$file) && substr($file, 0, 1) != ".") {
|
//only show directories that aren't private.
|
||||||
$element = array();
|
if (is_dir($path.$file) && substr($file, 0, 1) != ".") {
|
||||||
$element["name"] = $file;
|
$element = array();
|
||||||
$element["isFolder"] = true;
|
$element["name"] = $file;
|
||||||
$element["isError"] = false;
|
$element["isFolder"] = true;
|
||||||
$result[$file] = $element;
|
$element["isError"] = false;
|
||||||
|
$result[$file] = $element;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue