We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 2729c622 authored by mattl's avatar mattl

Minor function definitions so they match Action parent

parent 9811783f
...@@ -35,14 +35,13 @@ class OStatusInitAction extends Action ...@@ -35,14 +35,13 @@ class OStatusInitAction extends Action
var $profile; var $profile;
var $err; var $err;
function prepare($args) protected function prepare($args)
{ {
parent::prepare($args); parent::prepare($args);
if (common_logged_in()) { if (common_logged_in()) {
// TRANS: Client error. // TRANS: Client error.
$this->clientError(_m('You can use the local subscription!')); $this->clientError(_m('You can use the local subscription!'));
return false;
} }
// Local user or group the remote wants to subscribe to // Local user or group the remote wants to subscribe to
...@@ -57,9 +56,9 @@ class OStatusInitAction extends Action ...@@ -57,9 +56,9 @@ class OStatusInitAction extends Action
return true; return true;
} }
function handle($args) protected function handle()
{ {
parent::handle($args); parent::handle();
if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_SERVER['REQUEST_METHOD'] == 'POST') {
/* Use a session token for CSRF protection. */ /* Use a session token for CSRF protection. */
......
...@@ -28,15 +28,15 @@ if (!defined('STATUSNET')) { ...@@ -28,15 +28,15 @@ if (!defined('STATUSNET')) {
class PushCallbackAction extends Action class PushCallbackAction extends Action
{ {
function handle() protected function handle()
{ {
StatusNet::setApi(true); // Minimize error messages to aid in debugging StatusNet::setApi(true); // Minimize error messages to aid in debugging
parent::handle(); parent::handle();
if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($this->isPost()) {
$this->handlePost(); return $this->handlePost();
} else {
$this->handleGet();
} }
return $this->handleGet();
} }
/** /**
......
...@@ -47,13 +47,13 @@ class PushHubAction extends Action ...@@ -47,13 +47,13 @@ class PushHubAction extends Action
return parent::arg($arg, $def); return parent::arg($arg, $def);
} }
function prepare($args) protected function prepare($args)
{ {
StatusNet::setApi(true); // reduce exception reports to aid in debugging StatusNet::setApi(true); // reduce exception reports to aid in debugging
return parent::prepare($args); return parent::prepare($args);
} }
function handle() protected function handle()
{ {
$mode = $this->trimmed('hub.mode'); $mode = $this->trimmed('hub.mode');
switch ($mode) { switch ($mode) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment