mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-01 12:40:45 -04:00
Move the CSRF initialization into the constructor, I don't see why we
need it also in render().
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user