]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-13766, move require_once"
authordongsheng <dongsheng>
Thu, 31 Jul 2008 03:13:49 +0000 (03:13 +0000)
committerdongsheng <dongsheng>
Thu, 31 Jul 2008 03:13:49 +0000 (03:13 +0000)
lib/weblib.php

index 83174aa19a762fcc46fe8d4b5167dd01555237af..751e26904b2dde6b500e54fef457b6b19f47a6c1 100644 (file)
@@ -43,8 +43,6 @@ require_once("$CFG->libdir/filterlib.php");
 
 require_once("$CFG->libdir/ajax/ajaxlib.php");
 
-require_once("$CFG->dirroot/repository/lib.php");
-
 /// Constants
 
 /// Define text formatting types ... eventually we can add Wiki, BBcode etc
@@ -4871,6 +4869,7 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v
     $str .= '</textarea>'."\n";
 
     if ($usehtmleditor) {
+        require_once("$CFG->dirroot/repository/lib.php");
         $str_toggle = '<span class="helplink"><a href="javascript:mce_toggleEditor(\''. $id .'\');"><img width="50" height="17" src="'. $CFG->httpswwwroot .'/lib/editor/tinymce/images/toggle.gif" alt="'. get_string('editortoggle') .'" title="'. get_string('editortoggle') .'" class="icontoggle" /></a></span>';
         // Show shortcuts button if HTML editor is in use, but only if JavaScript is enabled (MDL-9556)
         $ret = get_repository_client();