MDL-37552 external_format_text: missing require_once filelib.php (shared credits...
authorJerome Mouneyrac <jerome@mouneyrac.com>
Tue, 7 May 2013 06:55:55 +0000 (14:55 +0800)
committerJerome Mouneyrac <jerome@mouneyrac.com>
Tue, 7 May 2013 09:59:07 +0000 (17:59 +0800)
lib/externallib.php

index da21ace..d458d11 100644 (file)
@@ -687,6 +687,7 @@ function external_format_text($text, $textformat, $contextid, $component, $filea
     $settings = external_settings::get_instance();
 
     if ($settings->get_fileurl()) {
+        require_once($CFG->libdir . "/filelib.php");
         $text = file_rewrite_pluginfile_urls($text, $settings->get_file(), $contextid, $component, $filearea, $itemid);
     }