/** * Handle the request * * On GET, show the form. On POST, try to save the app. * * @param array $args unused * * @return void */ function handle($args) { parent::handle($args); if ($_SERVER['REQUEST_METHOD'] == 'POST') { $this->handlePost($args); } else { $this->showForm(); } }
function handle($args) { parent::handle($args); # Post from the tag dropdown; redirect to a GET if ($_SERVER['REQUEST_METHOD'] == 'POST') { common_redirect($this->selfUrl(), 303); return; } $this->showPage(); }
function handle($args) { parent::handle($args); $this->showPage(); }
/** * Handle the request * * Shows info about the app * * @return void */ function handle($args) { parent::handle($args); if ($_SERVER['REQUEST_METHOD'] == 'POST') { // CSRF protection $token = $this->trimmed('token'); if (!$token || $token != common_session_token()) { $this->clientError(_('There was a problem with your session token.')); return; } if ($this->arg('reset')) { $this->resetKey(); } } else { $this->showPage(); } }
/** * Handle input * * Only handles get, so just show the page. * * @param array $args $_REQUEST data (unused) * * @return void */ function handle($args) { parent::handle($args); if ($this->notice->is_local == Notice::REMOTE_OMB) { if (!empty($this->notice->url)) { $target = $this->notice->url; } else { if (!empty($this->notice->uri) && preg_match('/^https?:/', $this->notice->uri)) { // Old OMB posts saved the remote URL only into the URI field. $target = $this->notice->uri; } else { // Shouldn't happen. $target = false; } } if ($target && $target != $this->selfUrl()) { common_redirect($target, 301); return false; } } $this->showPage(); }