diff options
Diffstat (limited to 'modules/gallery/libraries/MY_Forge.php')
-rw-r--r-- | modules/gallery/libraries/MY_Forge.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/gallery/libraries/MY_Forge.php b/modules/gallery/libraries/MY_Forge.php index b40d067d..9564f941 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); } @@ -43,8 +42,8 @@ class Forge extends Forge_Core { if (isset($input->inputs)) { $input->add_rules_from($model); } - if (isset($model->rules[$name])) { - $input->rules($model->rules[$name]); + if (isset($model->form_rules[$name])) { + $input->rules($model->form_rules[$name]); } } } |