]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed SC#83 and the HTML to boot. I 'll add some styles to bring the
authordefacer <defacer>
Thu, 27 Jan 2005 05:01:16 +0000 (05:01 +0000)
committerdefacer <defacer>
Thu, 27 Jan 2005 05:01:16 +0000 (05:01 +0000)
end result back to normal.

doc/contents.php

index f101a467ab4a5031d8e71896cd574d75fc82a227..dba83a7d43919930718c7c2685d8a2d0ba3a13da 100755 (executable)
@@ -5,7 +5,8 @@
     if (! $info = document_file("files.php", false)) {\r
         error("404 - File Not Found");\r
     }\r
-\r
+
+    $string = array();
     if ($CFG->forcelogin) {\r
         require_login();\r
     }\r
     include($info->filepath);\r
 \r
     print_header();\r
-\r
+
+    $ulopen = false;
+
     foreach ($string as $file => $filename) {\r
-        if (substr($file,0,1) == "-") {\r
-            echo '<p style="font-size:small;margin-bottom:0px;font-family:Trebuchet MS, Verdana, Arial, Helvetica, sans-serif;">'.\r
-                  $filename.'</p>';\r
+        if (substr($file,0,1) == "-") {
+            if($ulopen) {
+                echo '</ul>';
+            }
+            echo '<h1>'.$filename.'</h1><ul>';
+            $ulopen = true;
         } else {\r
-            echo "<li style=\"font-size:small\"><a target=\"main\" href=\"$CFG->wwwroot/doc/?file=$file\">$filename</a></li>";\r
+            echo '<li><a target="main" href="'.$CFG->wwwroot.'/doc/?file='.$file.'">'.$filename.'</a></li>';\r
         }\r
     }\r
+    if($ulopen) {
+        echo '</ul>';
+    }
+
     \r
 ?>\r