From 8fa84ae0355063a152328dcfa43d5eba8734e174 Mon Sep 17 00:00:00 2001 From: Juan Leyva Date: Wed, 22 Oct 2014 13:23:19 +0200 Subject: [PATCH] MDL-47817 web services: Fixed check of inexistent constant WS_SERVER --- lib/pagelib.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/pagelib.php b/lib/pagelib.php index dca6bd6f6d6..94596338d15 100644 --- a/lib/pagelib.php +++ b/lib/pagelib.php @@ -931,11 +931,7 @@ class moodle_page { } else { // We do not want devs to do weird switching of context levels on the fly because we might have used // the context already such as in text filter in page title. - // This is explicitly allowed for webservices though which may - // call "external_api::validate_context on many contexts in a single request. - if (!WS_SERVER) { - debugging("Coding problem: unsupported modification of PAGE->context from {$current} to {$context->contextlevel}"); - } + debugging("Coding problem: unsupported modification of PAGE->context from {$current} to {$context->contextlevel}"); } }