From: Happy-melon Date: Wed, 15 Dec 2010 19:33:03 +0000 (+0000) Subject: Allow HTMLForms to be submitted by GET requests. X-Git-Tag: 1.31.0-rc.0~33284 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=7d41eadb8ead48da9b838927cae7fa2152f44b20;p=lhc%2Fweb%2Fwiklou.git Allow HTMLForms to be submitted by GET requests. --- diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index 62aecb0c95..cd3dc1ff3d 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -92,6 +92,7 @@ class HTMLForm { protected $mSubmitText; protected $mSubmitTooltip; protected $mTitle; + protected $mMethod = 'post'; protected $mUseMultipart = false; protected $mHiddenFields = array(); @@ -375,7 +376,7 @@ class HTMLForm { # Attributes $attribs = array( 'action' => $this->getTitle()->getFullURL(), - 'method' => 'post', + 'method' => $this->mMethod, 'class' => 'visualClear', 'enctype' => $encType, ); @@ -586,6 +587,14 @@ class HTMLForm { function getTitle() { return $this->mTitle; } + + /** + * Set the method used to submit the form + * @param $method String + */ + public function setMethod( $method='post' ){ + $this->mMethod = $method; + } /** * TODO: Document