From 34773ccf70236d31d22ac7a86481a4cc8d768ed8 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 4114ad654f9..29702410b1e 100644 --- a/lib/externallib.php +++ b/lib/externallib.php @@ -1136,7 +1136,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; }