X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fform.php;h=f6501dc6daf699b0b190f748c459d34a064638f9;hb=3dd4157f2601d15dbcfc77162de53347864ba96e;hp=dffb6bce4c9fe55a6e7dfd68f0aeb16b4f1b64ad;hpb=c5cf2c4c94794a1aeea32a427ddd50e157fa893d;p=quix0rs-gnu-social.git diff --git a/lib/form.php b/lib/form.php index dffb6bce4c..f6501dc6da 100644 --- a/lib/form.php +++ b/lib/form.php @@ -28,7 +28,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -67,7 +67,7 @@ class Form extends Widget { $attributes = array('id' => $this->id(), 'class' => $this->formClass(), - 'method' => 'post', + 'method' => $this->method(), 'action' => $this->action()); if (!empty($this->enctype)) { @@ -119,6 +119,18 @@ class Form extends Widget { } + /** + * HTTP method used to submit the form + * + * Defaults to post. Subclasses can override if they need to. + * + * @return string the method to use for submitting + */ + function method() + { + return 'post'; + } + /** * Buttons for form actions * @@ -169,4 +181,14 @@ class Form extends Widget { return 'form'; } + + function li() + { + $this->out->elementStart('li'); + } + + function unli() + { + $this->out->elementEnd('li'); + } }