summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries/MY_Forge.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-12-26 11:24:50 -0800
committerTim Almdal <tnalmdal@shaw.ca>2009-12-26 11:24:50 -0800
commit3060a6f662da66008d57a461bf1c9b5b4aa2b002 (patch)
tree442fd290505817efc0324f2af6e01805cb7396aa /modules/gallery/libraries/MY_Forge.php
parent1cd6a615bb47a33794e4a4f690c87a348ab752d7 (diff)
parent32d25dafd5b033338b6a9bb8c7c53edab462543a (diff)
Merge branch 'master' into talmdal_dev
Conflicts: modules/gallery/controllers/albums.php modules/gallery/controllers/movies.php modules/gallery/controllers/photos.php
Diffstat (limited to 'modules/gallery/libraries/MY_Forge.php')
-rw-r--r--modules/gallery/libraries/MY_Forge.php7
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]);
}
}
}