diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-11-25 20:05:38 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-11-25 20:05:38 -0800 |
commit | 4b2e1344b4e4d110a9f61d09b8756d9948de24ac (patch) | |
tree | 2256305c41b520798afb1c738774ddeaddff029c /modules | |
parent | 9d9e4bdb675154c1046b25dcb3777be61b410e4e (diff) |
Move the CSRF initialization into the constructor, I don't see why we
need it also in render().
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/libraries/MY_Forge.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/gallery/libraries/MY_Forge.php b/modules/gallery/libraries/MY_Forge.php index b40d067d..6bdadea3 100644 --- a/modules/gallery/libraries/MY_Forge.php +++ b/modules/gallery/libraries/MY_Forge.php @@ -24,14 +24,13 @@ class Forge extends Forge_Core { */ public function __construct($action=null, $title='', $method=null, $attr=array()) { parent::__construct($action, $title, $method, $attr); - $this->hidden("csrf")->value(""); + $this->hidden("csrf")->value(access::csrf_token()); } /** * Use our own template */ public function render($template="form.html", $custom=false) { - $this->hidden["csrf"]->value(access::csrf_token()); return parent::render($template, $custom); } |