From a22c82103324acc222287b59022a7445f2956c73 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Fri, 23 Aug 2019 11:21:28 +0200 Subject: [PATCH] MDL-66483 lib: remove recent xmlize dep on setuplib/CFG This removes the dependency added by MDL-66110 (aiming to fix a CI job). So we keep things as they were and will fix the CI job separately. --- lib/xmlize.php | 3 --- mod/glossary/lib.php | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/xmlize.php b/lib/xmlize.php index a8ec8c8d9bc..78cf82b2a87 100644 --- a/lib/xmlize.php +++ b/lib/xmlize.php @@ -39,9 +39,6 @@ defined('MOODLE_INTERNAL') || die(); -// Add setuplib in case it has not been loaded yet as it's required by \xml_format_exception. -require_once($CFG->libdir.'/setuplib.php'); - class xml_format_exception extends moodle_exception { /** @var string */ public $errorstring; diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php index c0b44d147de..e15d7359eb7 100644 --- a/mod/glossary/lib.php +++ b/mod/glossary/lib.php @@ -2438,8 +2438,8 @@ function glossary_generate_export_file($glossary, $ignored = "", $hook = 0) { * @return string */ function glossary_read_imported_file($file_content) { - require_once "../../lib/xmlize.php"; global $CFG; + require_once "../../lib/xmlize.php"; return xmlize($file_content, 0); }