COnsistent use of readdir

This commit is contained in:
moodler
2005-03-10 06:04:29 +00:00
parent 200cc919db
commit 211ea3e9d3
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -665,7 +665,7 @@ function displaydir ($wdir) {
$fullpath = $basedir.$wdir;
$directory = opendir($fullpath); // Find all files
while (($file = readdir($directory)) !== false) {
while (false !== ($file = readdir($directory))) {
if ($file == "." || $file == "..") {
continue;
}
+1 -1
View File
@@ -4486,7 +4486,7 @@ function get_list_of_plugins($plugin='mod', $exclude='') {
global $CFG;
$basedir = opendir($CFG->dirroot .'/'. $plugin);
while ($dir = readdir($basedir)) {
while (false !== ($dir = readdir($basedir))) {
$firstchar = substr($dir, 0, 1);
if ($firstchar == '.' or $dir == 'CVS' or $dir == '_vti_cnf' or $dir == $exclude) {
continue;