From: moodler Date: Thu, 12 Jun 2003 11:55:03 +0000 (+0000) Subject: Some fixes to display documentation better in other languages X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=686be5b0771b41bd8a2b040b48a7c02098c80edf;p=moodle.git Some fixes to display documentation better in other languages --- diff --git a/doc/contents.php b/doc/contents.php index f6f9407ece..a5aa475274 100755 --- a/doc/contents.php +++ b/doc/contents.php @@ -2,16 +2,18 @@ require("../config.php"); - $info = document_file("files.php", false); + if (! $info = document_file("files.php", false)) { + error("404 - File Not Found"); + } include($info->filepath); print_header(); - echo ""; + echo ""; foreach ($string as $file => $filename) { - echo "
  • wwwroot/doc/?file=$file\">$filename
  • "; + echo "
  • wwwroot/doc/?file=$file\">$filename
  • "; } - echo "
    "; + echo "
    "; ?> diff --git a/doc/index.php b/doc/index.php index 59e29a9c5c..a73030b188 100644 --- a/doc/index.php +++ b/doc/index.php @@ -28,7 +28,9 @@ $include = true; } - document_file($file, $include); + if (! document_file($file, $include)) { + error("Error 404 - File Not Found"); + } if ($include) { exit; @@ -36,14 +38,14 @@ ?> - - Moodle Documentation - - - - - - - "> - - + + <?php print_string("documentation")?> + + + + + + + "> + + diff --git a/doc/view.php b/doc/view.php index 89d95d5f93..088c59f306 100644 --- a/doc/view.php +++ b/doc/view.php @@ -13,22 +13,24 @@ } $strhelp = get_string("help"); print_header("$course->shortname: $strhelp", "$course->fullname", - "id\">$course->shortname -> $strhelp"); + "id\">$course->shortname -> $strhelp"); } else { if (! $site = get_site()) { error("Site is misconfigured"); } $strdocumentation = get_string("documentation"); print_header("$site->shortname: $strhelp", "$site->fullname", - "$strdocumentation"); + "$strdocumentation"); } - echo "
    "; + echo "
    "; - document_file($file, true); + if (! document_file($file, true)) { + notify("404 - File Not Found"); + } - echo "
    "; + echo "
    "; ?>