From 8213007c7fbf33ea4d64970224fcdbb76979e66e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20S=CC=8Ckoda?= Date: Thu, 7 Nov 2013 23:51:59 +0100 Subject: [PATCH] MDL-42769 use only text area editor before install completed --- lib/editorlib.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/editorlib.php b/lib/editorlib.php index 645073ca58a..fbafa1a5a47 100644 --- a/lib/editorlib.php +++ b/lib/editorlib.php @@ -33,7 +33,12 @@ defined('MOODLE_INTERNAL') || die(); * @return texteditor object */ function editors_get_preferred_editor($format = NULL) { - global $USER; + global $USER, $CFG; + + if (!empty($CFG->adminsetuppending)) { + // Must not use other editors before install completed! + return get_texteditor('textarea'); + } $enabled = editors_get_enabled();