Add $this->request to module and template instances

This commit is contained in:
Kijin Sung 2023-10-29 23:37:08 +09:00
parent a196706d7f
commit 96330593fd
2 changed files with 7 additions and 3 deletions

View file

@ -32,6 +32,7 @@ class ModuleObject extends BaseObject
// Variables for convenience
public $user;
public $request;
// Other variables for compatibility
public $ajaxRequestMethod = array('XMLRPC', 'JSON');
@ -89,6 +90,7 @@ class ModuleObject extends BaseObject
{
$obj->user = Rhymix\Framework\Session::getMemberInfo();
}
$obj->request = \Context::getCurrentRequest();
// Return the instance.
return $GLOBALS['_module_instances_'][$class_name] = $obj;