diff --git a/module/bug/control.php b/module/bug/control.php index 06e2a9df25..3362367200 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -390,7 +390,9 @@ class bug extends control if(is_dir($extractPath)) { $titles = array(); - foreach(glob($extractPath . '/*') as $fileName) + $files = glob($extractPath . '/*'); + sort($files); + foreach($files as $fileName) { $fileName = basename($fileName); $titles[$fileName] = preg_replace('/^\d+_/', '', pathinfo($fileName, PATHINFO_FILENAME)); diff --git a/module/story/control.php b/module/story/control.php index 3bde39b232..3c4e4556eb 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -229,7 +229,9 @@ class story extends control if(is_dir($extractPath)) { $titles = array(); - foreach(glob($extractPath . '/*') as $fileName) + $files = glob($extractPath . '/*'); + sort($files); + foreach($files as $fileName) { $fileName = basename($fileName); $titles[$fileName] = preg_replace('/^\d+_/', '', pathinfo($fileName, PATHINFO_FILENAME));