From 160b54760f9373c8c092114e3ca2410af0730ed2 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 2 Apr 2009 13:01:16 +0000 Subject: Fix the issue identified in http://gallery.menalto.com/gallery_3.0_alpha_3_released?page=1#comment-304581 ticket #195 --- core/libraries/MY_View.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'core/libraries/MY_View.php') diff --git a/core/libraries/MY_View.php b/core/libraries/MY_View.php index 26326b5d..9a44652c 100644 --- a/core/libraries/MY_View.php +++ b/core/libraries/MY_View.php @@ -18,6 +18,16 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class View extends View_Core { + /** + * Override View_Core::__construct so that we can set the csrf value into all views. + * + * @see View_Core::__construct + */ + public function __construct($name = NULL, $data = NULL, $type = NULL) { + parent::__construct($name, $data, $type); + $this->set_global("csrf", access::csrf_token()); + } + /** * Override View_Core::render so that we trap errors stemming from bad PHP includes and show a * visible stack trace to help developers. -- cgit v1.2.3