]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14683 remove document_file()
authormudrd8mz <mudrd8mz>
Tue, 6 May 2008 18:23:05 +0000 (18:23 +0000)
committermudrd8mz <mudrd8mz>
Tue, 6 May 2008 18:23:05 +0000 (18:23 +0000)
lib/deprecatedlib.php

index a3edb5592f3691f0bdd630347777aa1ffd541dc1..1a53ace13a4e83061510191b1ad0744345d34135 100644 (file)
@@ -960,44 +960,6 @@ function print_group_menu($groups, $groupmode, $currentgroup, $urlroot, $showall
 
 }
 
-/**
- * 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.