diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-11-25 14:27:06 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-11-25 14:27:06 -0800 |
commit | daedadda751a188c20f032b09c1ca32e39279360 (patch) | |
tree | 4ad1e209557deb6c2043dde1ce0efbaef6f59d0c | |
parent | 7c9bd9e8e8c4d2e57c4f08f526e5464236fa90e3 (diff) |
Switch from stdClass to arrays for global data.
-rw-r--r-- | modules/gallery/libraries/MY_View.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/gallery/libraries/MY_View.php b/modules/gallery/libraries/MY_View.php index 0311f2dd..d1ec6684 100644 --- a/modules/gallery/libraries/MY_View.php +++ b/modules/gallery/libraries/MY_View.php @@ -18,27 +18,26 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class View extends View_Core { - static $global_data; + static $global_data = array(); /** * Reimplement Kohana 2.3's View::set_global() functionality. */ public function set_global($key, $value) { - View::$global_data->$key = $value; + View::$global_data[$key] = $value; $this->$key = $value; } public function __isset($key) { - if (isset(View::$global_data->$key)) { + if (array_key_exists($key, View::$global_data)) { return true; } return parent::__isset($key); } public function &__get($key) { - Kohana_Log::add("error",print_r("__get($key)",1)); - if (isset(View::$global_data->$key)) { - return View::$global_data->$key; + if (array_key_exists($key, View::$global_data)) { + return View::$global_data[$key]; } return parent::__get($key); } |