mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-18 23:51:20 +00:00
check for extension dir before reading contents
This commit is contained in:
parent
b25184af17
commit
3fc72a3fff
|
@ -76,16 +76,18 @@ class SeedDMS_Extension_Mgr {
|
||||||
|
|
||||||
function getExtensions() { /* {{{ */
|
function getExtensions() { /* {{{ */
|
||||||
$extensions = array();
|
$extensions = array();
|
||||||
$handle = opendir($this->extdir);
|
if(file_exists($this->extdir)) {
|
||||||
while ($entry = readdir($handle) ) {
|
$handle = opendir($this->extdir);
|
||||||
if ($entry == ".." || $entry == ".")
|
while ($entry = readdir($handle) ) {
|
||||||
continue;
|
if ($entry == ".." || $entry == ".")
|
||||||
else if (is_dir($this->extdir ."/". $entry))
|
continue;
|
||||||
array_push($extensions, $entry);
|
else if (is_dir($this->extdir ."/". $entry))
|
||||||
}
|
array_push($extensions, $entry);
|
||||||
closedir($handle);
|
}
|
||||||
|
closedir($handle);
|
||||||
|
|
||||||
asort($extensions);
|
asort($extensions);
|
||||||
|
}
|
||||||
return $extensions;
|
return $extensions;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user