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
This commit is contained in:
Ankit Agarwal
2017-04-24 11:47:29 +05:30
parent 4a1f3cf807
commit 2bbd04781c
+1 -1
View File
@@ -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;
}