From a3b557dcbc3149f305f2f82500940c95cbd13463 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 31 Jul 2017 15:57:53 +0900 Subject: [PATCH] Revert "Fix #881 disable display.before triggers if site is locked and visitor is not admin" This reverts commit 44be0468abce9666a532bfefde8361f41172d75b. --- classes/display/DisplayHandler.class.php | 28 +++++++++++------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/classes/display/DisplayHandler.class.php b/classes/display/DisplayHandler.class.php index ad9dcef68..0da729298 100644 --- a/classes/display/DisplayHandler.class.php +++ b/classes/display/DisplayHandler.class.php @@ -15,6 +15,7 @@ class DisplayHandler extends Handler public static $debug_printed = 0; var $content_size = 0; // /< The size of displaying contents var $gz_enabled = FALSE; // / toDoc($oModule); - // Skip the following if site lock is effective - if(!config('lock.locked') || Context::get('logged_info')->is_admin === 'Y') - { - // call a trigger before display - ModuleHandler::triggerCall('display', 'before', $output); - $original_output = $output; + // call a trigger before display + ModuleHandler::triggerCall('display', 'before', $output); + $original_output = $output; - // execute add-on - $called_position = 'before_display_content'; - $oAddonController = getController('addon'); - $addon_file = $oAddonController->getCacheFilePath(Mobile::isFromMobilePhone() ? "mobile" : "pc"); - if(file_exists($addon_file)) include($addon_file); - if($output === false || $output === null || $output instanceof Object) - { - $output = $original_output; - } + // execute add-on + $called_position = 'before_display_content'; + $oAddonController = getController('addon'); + $addon_file = $oAddonController->getCacheFilePath(Mobile::isFromMobilePhone() ? "mobile" : "pc"); + if(file_exists($addon_file)) include($addon_file); + if($output === false || $output === null || $output instanceof Object) + { + $output = $original_output; } if(method_exists($handler, "prepareToPrint")) @@ -143,6 +140,7 @@ class DisplayHandler extends Handler public function getDebugInfo(&$output = null) { // Check if debugging information has already been printed. + if (self::$debug_printed) { return;