mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-14617 removed PHP4 compatibility scandir()
This commit is contained in:
parent
89a169feb8
commit
d6f25e29f7
@ -3,35 +3,6 @@ ini_set('display_errors', "On");
|
||||
|
||||
require_once 'PEAR.php';
|
||||
|
||||
if(!function_exists('scandir'))
|
||||
{
|
||||
function scandir($dir, $sortorder = 0)
|
||||
{
|
||||
if(is_dir($dir))
|
||||
{
|
||||
$dirlist = opendir($dir);
|
||||
|
||||
while( ($file = readdir($dirlist)) !== false)
|
||||
{
|
||||
if(!is_dir($file))
|
||||
{
|
||||
$files[] = $file;
|
||||
}
|
||||
}
|
||||
|
||||
($sortorder == 0) ? asort($files) : arsort($files);
|
||||
|
||||
return $files;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Command-line options parsing class.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user