From 7d4080f030a203a36965d6d53021fcbe7c8179e2 Mon Sep 17 00:00:00 2001 From: dongsheng Date: Thu, 8 Oct 2009 07:00:48 +0000 Subject: [PATCH] "MDL-16698, fixed patameter for editor element" --- lib/form/editor.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/form/editor.php b/lib/form/editor.php index dc68ec5402..271895aa91 100644 --- a/lib/form/editor.php +++ b/lib/form/editor.php @@ -173,7 +173,7 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element { $str .= '
'; /// embedded image files - TODO: hide on the fly when switching editors $str .= '
'; - $editorurl = "$CFG->wwwroot/repository/filepicker.php?action=embedded&itemid=$draftitemid&subdirs=$subdirs&maxbytes=$maxbytes&ctx_id=".$ctx->id; + $editorurl = "$CFG->wwwroot/repository/filepicker.php?action=browse&env=editor&itemid=$draftitemid&subdirs=$subdirs&maxbytes=$maxbytes&ctx_id=".$ctx->id; $str .= 'Error'; // TODO: localise, fix styles, etc. $str .= '
'; @@ -186,8 +186,11 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element { $str .= $PAGE->requires->js_function_call('id2_add_itemid', array($id, $draftitemid))->asap(); if ($editor->supports_repositories()) { - $str .= $PAGE->requires->js_function_call('hide_item', array("{$id}_filemanager"))->asap(); + $str .= $PAGE->requires->js_function_call('destroy_item', array("{$id}_filemanager"))->asap(); } + } else { + // should disable file picker + $str .= 'No file allowed'; } $str .= ''; -- 2.39.5