shortname: $stredithelpdocs: $currentfile", "$site->fullname", "$stradministration -> ". "$strconfiguration -> $strlanguage -> $stredithelpdocs", 'choosefile.popup', '', true); $currentlang = current_language(); $langdir = "$CFG->dirroot/lang/$currentlang"; $enlangdir = "$CFG->dirroot/lang/en"; error_reporting(0); // Error reporting turned off due to non-existing files // Generate selection for all help and documentation files // Get all files from /docs directory if (! $files = get_directory_list("$CFG->dirroot/lang/en/docs", "CVS")) { error("Could not find English language docs files!"); } $options = array(); foreach ($files as $filekey => $file) { // check all the docs files. $options["docs/$file"] = "docs/$file"; // add (!) if file doesn't exists or is empty if (( !file_exists("$langdir/docs/$file")) || (filesize("$langdir/docs/$file") == 0)) { $options["docs/$file"] .= "$filemissingmark"; } } // Get all files from /help directory if (! $files = get_directory_list("$CFG->dirroot/lang/en/help", "CVS")) { error("Could not find English language help files!"); } foreach ($files as $filekey => $file) { // check all the help files. $options["help/$file"] = "help/$file"; if (!file_exists("$langdir/help/$file")) { $options["help/$file"] .= "$filemissingmark"; } } echo "
| "; echo $prevfile; echo popup_form ("$CFG->wwwroot/$CFG->admin/langdoc.php?sesskey=$USER->sesskey¤tfile=", $options, "choosefile", $currentfile, "", "", "", true); echo $nextfile; echo " |
".get_string("filemissing", "", "$langdir/$currentfile")."
"; } } if ($f = fopen("$langdir/$currentfile","r+")) { $editable = true; fclose($f); } else { $editable = false; echo "".get_string("makeeditable", "", "$langdir/$currentfile")."
"; } echo "| \n"; echo "\n"; link_to_popup_window("/lang/en/$currentfile", "popup", get_string("preview")); echo " | \n"; if ($fileeditorinline == 1) { echo "
| \n"; if ($editable) { echo " | \n