]> git.mjollnir.org Git - moodle.git/commitdiff
There's no point in printing the notice - if there's no directory
authormoodler <moodler>
Sun, 17 Aug 2003 14:14:12 +0000 (14:14 +0000)
committermoodler <moodler>
Sun, 17 Aug 2003 14:14:12 +0000 (14:14 +0000)
there's no files ... pretty simple.

lib/moodlelib.php

index 7d5e7e4831e62aa018cba606f4d6442cd7a0c786..59bbc4549d3cbdd996977304fed1245b4515750e 100644 (file)
@@ -1063,11 +1063,8 @@ function get_directory_list($rootdir, $excludefile="", $descend=true) {
 /// If excludefile is defined, then that file/directory is ignored
 
     $dirs = array();
-   
-    $dir = opendir($rootdir);
 
-    if (!$dir) {
-        notify("Error: unable to read this directory! : $rootdir");
+    if (!$dir = opendir($rootdir)) {
         return $dirs;
     }