var $profile;
var $err;
- function prepare($args)
+ protected function prepare($args)
{
parent::prepare($args);
if (common_logged_in()) {
// TRANS: Client error.
$this->clientError(_m('You can use the local subscription!'));
- return false;
}
// Local user or group the remote wants to subscribe to
return true;
}
- function handle($args)
+ protected function handle()
{
- parent::handle($args);
+ parent::handle();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
/* Use a session token for CSRF protection. */
class PushCallbackAction extends Action
{
- function handle()
+ protected function handle()
{
StatusNet::setApi(true); // Minimize error messages to aid in debugging
parent::handle();
- if ($_SERVER['REQUEST_METHOD'] == 'POST') {
- $this->handlePost();
- } else {
- $this->handleGet();
+ if ($this->isPost()) {
+ return $this->handlePost();
}
+
+ return $this->handleGet();
}
/**
return parent::arg($arg, $def);
}
- function prepare($args)
+ protected function prepare($args)
{
StatusNet::setApi(true); // reduce exception reports to aid in debugging
return parent::prepare($args);
}
- function handle()
+ protected function handle()
{
$mode = $this->trimmed('hub.mode');
switch ($mode) {