mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
Revert "Fix #881 disable display.before triggers if site is locked and visitor is not admin"
This reverts commit 44be0468ab.
This commit is contained in:
parent
44be0468ab
commit
a3b557dcbc
1 changed files with 13 additions and 15 deletions
|
|
@ -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; // / <a flog variable whether to call contents after compressing by gzip
|
||||
var $handler = NULL;
|
||||
|
||||
/**
|
||||
* print either html or xml content given oModule object
|
||||
|
|
@ -58,22 +59,18 @@ class DisplayHandler extends Handler
|
|||
|
||||
$output = $handler->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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue