]> git.mjollnir.org Git - moodle.git/commitdiff
Merged robustness check
authormoodler <moodler>
Tue, 31 Aug 2004 13:37:24 +0000 (13:37 +0000)
committermoodler <moodler>
Tue, 31 Aug 2004 13:37:24 +0000 (13:37 +0000)
theme/index.php

index b8cf52c2e3f9465f8145d74436551de1b3e61175..54ecababdcb1e8ebdc57b78d002b21fc093704b3 100644 (file)
     echo "<TABLE ALIGN=CENTER cellpadding=7 cellspacing=5>";
     echo "<TR><TH class=\"generaltableheader\">$strtheme<TH class=\"generaltableheader\">&nbsp;</TR>";
     foreach ($themes as $theme) {
-        include ("$theme/config.php");
+
+        if (!file_exists("$CFG->dirroot/theme/$theme/config.php")) {   // bad folder
+            continue;
+        }
+        include ("$CFG->dirroot/theme/$theme/config.php");
+
         echo "<TR>";
         if ($CFG->theme == $theme) {
             echo "<TD ALIGN=CENTER BGCOLOR=\"$THEME->body\">$theme</TD>";