glob rather than readdir, sorts too
This commit is contained in:
parent
f58fec3094
commit
62ba59a421
@ -61,8 +61,7 @@ class BulkAdd extends SimpleExtension {
|
|||||||
|
|
||||||
$list = "";
|
$list = "";
|
||||||
|
|
||||||
$dir = opendir("$base/$subdir");
|
foreach(glob("$base/$subdir/*") as $filename) {
|
||||||
while($filename = readdir($dir)) {
|
|
||||||
$fullpath = "$base/$subdir/$filename";
|
$fullpath = "$base/$subdir/$filename";
|
||||||
|
|
||||||
if(is_link($fullpath)) {
|
if(is_link($fullpath)) {
|
||||||
@ -89,7 +88,6 @@ class BulkAdd extends SimpleExtension {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir($dir);
|
|
||||||
|
|
||||||
if(strlen($list) > 0) {
|
if(strlen($list) > 0) {
|
||||||
$this->theme->add_status("Adding $subdir", $list);
|
$this->theme->add_status("Adding $subdir", $list);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user