MDL-28117 include repo lib when hacking file_picker renderer
authorPetr Skoda <commits@skodak.org>
Mon, 4 Jul 2011 15:09:28 +0000 (17:09 +0200)
committerPetr Skoda <commits@skodak.org>
Mon, 4 Jul 2011 15:09:28 +0000 (17:09 +0200)
mod/data/field/url/field.class.php

index b22e4f8..1c45373 100644 (file)
@@ -28,6 +28,8 @@ class data_field_url extends data_field_base {
     function display_add_field($recordid=0) {
         global $CFG, $DB, $OUTPUT, $PAGE;
 
     function display_add_field($recordid=0) {
         global $CFG, $DB, $OUTPUT, $PAGE;
 
+        require_once($CFG->dirroot. '/repository/lib.php'); // necessary for the constants used in args
+
         $args = new stdClass();
         $args->accepted_types = '*';
         $args->return_types = FILE_EXTERNAL;
         $args = new stdClass();
         $args->accepted_types = '*';
         $args->return_types = FILE_EXTERNAL;