X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fformaction.php;h=7d74fc47130eaf20f6bb23b116e21eab8f9d6664;hb=feb97cfc2288169fbf8f1f47393c9735c017eeb6;hp=73576bf46a464604cafb8af2e847f82eb514dedc;hpb=9a92b8ba33e445174aae46acac58c91c78df5f9b;p=quix0rs-gnu-social.git diff --git a/lib/formaction.php b/lib/formaction.php index 73576bf46a..7d74fc4713 100644 --- a/lib/formaction.php +++ b/lib/formaction.php @@ -27,9 +27,7 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET')) { - exit(1); -} +if (!defined('GNUSOCIAL')) { exit(1); } /** * Form action extendable class @@ -52,7 +50,7 @@ class FormAction extends ManagedAction protected function prepare(array $args=array()) { parent::prepare($args); - $this->form = $this->form ?: $this->action; + $this->form = $this->form ?: ucfirst($this->action); $this->args['form'] = $this->form; $this->type = !is_null($this->type) ? $this->type : $this->trimmed('type'); @@ -94,7 +92,7 @@ class FormAction extends ManagedAction /** * @return string with instructions to pass into common_markup_to_html() */ - public function getInstructions() + protected function getInstructions() { return null; } @@ -118,26 +116,4 @@ class FormAction extends ManagedAction $form = new $class($this, $this->formOpts); return $form; } - - /** - * Gets called from handle() if isPost() is true; - * @return void - */ - protected function handlePost() - { - parent::handlePost(); - - // check for this before token since all POST and FILES data - // is losts when size is exceeded - if (empty($_POST) && $_SERVER['CONTENT_LENGTH']>0) { - // TRANS: Client error displayed when the number of bytes in a POST request exceeds a limit. - // TRANS: %s is the number of bytes of the CONTENT_LENGTH. - $msg = _m('The server was unable to handle that much POST data (%s MiB) due to its current configuration.', - 'The server was unable to handle that much POST data (%s MiB) due to its current configuration.', - round($_SERVER['CONTENT_LENGTH']/1024/1024,2)); - throw new ClientException($msg); - } - - $this->checkSessionToken(); - } }