mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 22:02:13 +09:00
Prevent addons from overwriting important variables with nonsense
This commit is contained in:
parent
8f9011a235
commit
82da535ec6
2 changed files with 25 additions and 7 deletions
|
|
@ -60,12 +60,17 @@ class DisplayHandler extends Handler
|
|||
|
||||
// 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 = $original_output;
|
||||
}
|
||||
|
||||
if(method_exists($handler, "prepareToPrint"))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue