mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-11 21:12:15 +09:00
Fix #881 disable display.before triggers if site is locked and visitor is not admin
This commit is contained in:
parent
468b1cc00f
commit
44be0468ab
1 changed files with 15 additions and 13 deletions
|
|
@ -15,7 +15,6 @@ 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
|
||||
|
|
@ -59,6 +58,9 @@ 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;
|
||||
|
|
@ -72,6 +74,7 @@ class DisplayHandler extends Handler
|
|||
{
|
||||
$output = $original_output;
|
||||
}
|
||||
}
|
||||
|
||||
if(method_exists($handler, "prepareToPrint"))
|
||||
{
|
||||
|
|
@ -140,7 +143,6 @@ 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