Index: deprecatedlib.php =================================================================== RCS file: /cvsroot/moodle/moodle/lib/deprecatedlib.php,v retrieving revision 1.66 diff -c -r1.66 deprecatedlib.php *** deprecatedlib.php 1 May 2008 22:36:49 -0000 1.66 --- deprecatedlib.php 4 May 2008 20:19:52 -0000 *************** *** 960,1003 **** } - /** - * Can include a given document file (depends on second - * parameter) or just return info about it. - * - * @uses $CFG - * @param string $file ? - * @param bool $include ? - * @return ? - * @todo Finish documenting this function - */ - function document_file($file, $include=true) { - global $CFG; - - debugging('The document_file() function is deprecated.', DEBUG_DEVELOPER); - - $file = clean_filename($file); - - if (empty($file)) { - return false; - } - - $langs = array(current_language(), get_string('parentlanguage'), 'en'); - - foreach ($langs as $lang) { - $info = new object(); - $info->filepath = $CFG->dirroot .'/lang/'. $lang .'/docs/'. $file; - $info->urlpath = $CFG->wwwroot .'/lang/'. $lang .'/docs/'. $file; - - if (file_exists($info->filepath)) { - if ($include) { - include($info->filepath); - } - return $info; - } - } - - return false; - } /** * Print an error page displaying an error message. --- 960,965 ----