1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-18 05:09:05 +01:00

Use e107::getFile() to get directories.

This commit is contained in:
Lóna Lore 2016-02-14 13:34:02 +01:00
parent b6225413b9
commit cbc096b74b

View File

@ -406,24 +406,15 @@ class e_library_manager
private function getLibraries()
{
$dir = e_WEB . 'lib';
$directories = array();
// Retrieve list of directories.
/* FIXME Use e107::getFile() or just scandir() ? */
$directories = array();
$nomask = array('CVS');
if(is_dir($dir) && $handle = opendir($dir))
$file = e107::getFile();
$dirs = $file->get_dirs($dir);
foreach($dirs as $dirName)
{
while(false !== ($file = readdir($handle)))
{
if(!in_array($file, $nomask) && $file[0] != '.')
{
if(is_dir("$dir/$file"))
{
$directories[$file] = "{e_WEB}lib/$file";
}
}
}
closedir($handle);
$directories[$dirName] = "{e_WEB}lib/$dirName";
}
return $directories;