]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Minor function definitions so they match Action parent
authorMikael Nordfeldth <mmn@hethane.se>
Sun, 20 Oct 2013 15:21:56 +0000 (17:21 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Sun, 20 Oct 2013 15:21:56 +0000 (17:21 +0200)
plugins/OStatus/actions/ostatusinit.php
plugins/OStatus/actions/pushcallback.php
plugins/OStatus/actions/pushhub.php

index b31320b44483a12660ef535b301122f121b84ace..ba99a84518a29465d4e9cab39e2ecc0ac2fa4614 100644 (file)
@@ -35,14 +35,13 @@ class OStatusInitAction extends Action
     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
@@ -57,9 +56,9 @@ class OStatusInitAction extends Action
         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. */
index 397aa56b9073af9117b767fd0fc8faaba328a4c0..41f5f1691fd1f0e3165f74de7f1ef43ffbcf0e94 100644 (file)
@@ -28,15 +28,15 @@ if (!defined('STATUSNET')) {
 
 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();
     }
 
     /**
index e44d06e1996f93a0fee5c6cafd699ff378338c39..c883647e681ef8768b58694cf9458ca49b81e894 100644 (file)
@@ -47,13 +47,13 @@ class PushHubAction extends Action
         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) {