From 9710752d03b9982ad72e43691faedd8ddf664161 Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 19 Nov 2008 20:32:18 +0000 Subject: [PATCH] MDL-16698 formslib editor element: tweaked maxfiles option --- lib/form/editor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/form/editor.php b/lib/form/editor.php index 6199784692..2d18a16236 100644 --- a/lib/form/editor.php +++ b/lib/form/editor.php @@ -12,7 +12,7 @@ require_once('HTML/QuickForm/element.php'); class MoodleQuickForm_editor extends HTML_QuickForm_element { protected $_helpbutton = ''; - protected $_options = array('subdirs'=>0, 'maxbytes'=>0, 'maxfiles'=>-1, 'changeformat'=>0); + protected $_options = array('subdirs'=>0, 'maxbytes'=>0, 'maxfiles'=>0, 'changeformat'=>0); protected $_values = array('text'=>null, 'format'=>null, 'itemid'=>null); function MoodleQuickForm_editor($elementName=null, $elementLabel=null, $options=null, $attributes=null) { @@ -158,7 +158,7 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element { $str .= ''; /// embedded image files - TODO: hide if tinymce used because it has own image upload/manage dialog - if ($maxfiles >=0) { // -1 means no files, 0 unlimited + if ($maxfiles != 0 ) { // 0 means no files, -1 unlimited if (empty($draftitemid)) { // no existing area info provided - let's use fresh new draft area require_once("$CFG->libdir/filelib.php"); -- 2.39.5