summaryrefslogtreecommitdiff
path: root/inc/form.php
diff options
context:
space:
mode:
authorMichael Klier <chi@chimeric.de>2009-11-17 10:21:14 +0100
committerMichael Klier <chi@chimeric.de>2009-11-17 10:21:14 +0100
commitb4033556bb721349b00671fe7fe7db2d474e1e71 (patch)
treee6396f4b2d9cc1704009da86fe770f7e6e198d3b /inc/form.php
parent76ec546799e5b8919a22548e7559aba7f50cd78b (diff)
downloadrpg-b4033556bb721349b00671fe7fe7db2d474e1e71.tar.gz
rpg-b4033556bb721349b00671fe7fe7db2d474e1e71.tar.bz2
form method should be lowercase and action should be set always
darcs-hash:20091117092114-23886-69852bb75c1a5d630797741c736159b726dfd334.gz
Diffstat (limited to 'inc/form.php')
-rw-r--r--inc/form.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/inc/form.php b/inc/form.php
index 56afd3fec..4e245c93a 100644
--- a/inc/form.php
+++ b/inc/form.php
@@ -63,14 +63,20 @@ class Doku_Form {
if(!is_array($params)) {
$this->params = array('id' => $params);
if ($action !== false) $this->params['action'] = $action;
- if ($method !== false) $this->params['method'] = $method;
+ if ($method !== false) $this->params['method'] = strtolower($method);
if ($enctype !== false) $this->params['enctype'] = $enctype;
} else {
$this->params = $params;
}
if (!isset($this->params['method'])) {
- $this->params['method'] = 'POST';
+ $this->params['method'] = 'post';
+ } else {
+ $this->params['method'] = strtolower($this->params['method']);
+ }
+
+ if (!isset($this->params['action'])) {
+ $this->params['action'] = '';
}
$this->addHidden('sectok', getSecurityToken());