From 2bbd04781cefe545c1243e3fa7c3dbbdbdddbdd3 Mon Sep 17 00:00:00 2001 From: Ankit Agarwal Date: Mon, 24 Apr 2017 11:47:29 +0530 Subject: [PATCH] MDL-58691 exporter: Filters should always apply for web pages The variables AJAX_SCIRPT, CLI_SCRIPT, WS_SERVER are always defined (and set to false) when webpages are rendered, hence the check of 'defined' is invalid --- lib/externallib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/externallib.php b/lib/externallib.php index 8cff238f16e..571ea0ff745 100644 --- a/lib/externallib.php +++ b/lib/externallib.php @@ -984,7 +984,7 @@ class external_settings { * Constructor - protected - can not be instanciated */ protected function __construct() { - if (!defined('AJAX_SCRIPT') && !defined('CLI_SCRIPT') && !defined('WS_SERVER')) { + if ((AJAX_SCRIPT == false) && (CLI_SCRIPT == false) && (WS_SERVER == false)) { // For normal pages, the default should match the default for format_text. $this->filter = true; }