From a050c7d031311b97c72b62263c94aff74acda69f Mon Sep 17 00:00:00 2001 From: Joshua Sherman Date: Sat, 28 Dec 2013 16:22:22 -0500 Subject: [PATCH] Hacked in some public variables Very hacky, switched variables to public and added a catch in the __get method to assign to the right place for the variables that modules are using (instead of having to update all of the modules in the wild) --- classes/Module.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/classes/Module.php b/classes/Module.php index 2eb2def..5493812 100644 --- a/classes/Module.php +++ b/classes/Module.php @@ -167,7 +167,7 @@ class Module extends Object * @access protected * @var string, 'index' by default */ - protected $template = 'index'; + public $template = 'index'; /** * Return @@ -180,7 +180,8 @@ class Module extends Object * @access protected * @var array */ - protected $return = array(); + protected $return_data = array(); + public $return = array(); /** * Constructor @@ -242,7 +243,14 @@ class Module extends Object */ public function __set($name, $value) { - $this->return[$name] = $value; + if ($name == 'method') + { + $this->method = $value; + } + else + { + $this->return_data[$name] = $value; + } } /** @@ -308,6 +316,11 @@ class Module extends Object if ($this->validate !== false) { + if (is_array($this->method)) + { + $this->method = $this->method[0]; + } + switch (strtoupper($this->method)) { case 'GET': $global = &$_GET; break;