]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Calling parent::handle in ApiCheckHubAction
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 7 Oct 2013 12:51:23 +0000 (14:51 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 7 Oct 2013 12:51:23 +0000 (14:51 +0200)
actions/apicheckhub.php

index e32420d3c383dd8f1955fab1a76ebefec4a34cd8..2650d367ae31eb9d4d23514605968fb02ba8a414 100644 (file)
@@ -41,7 +41,7 @@ class ApiCheckHubAction extends ApiAuthAction
      *
      * @return boolean success flag
      */
-    function prepare($args)
+    protected function prepare($args)
     {
         parent::prepare($args);
 
@@ -67,23 +67,24 @@ class ApiCheckHubAction extends ApiAuthAction
      *
      * @return void
      */
-    function handle($args)
+    protected function handle()
     {
+        parent::handle();
 
-               $discover = new FeedDiscovery();
+        $discover = new FeedDiscovery();
 
-           try {
-                       $feeduri = $discover->discoverFromURL($this->url);
-                       if($feeduri) {
-                       $huburi = $discover->getHubLink();                              
-                               }
-           } catch (FeedSubNoFeedException $e) {
-               $this->clientError(_('No feed found'), 403, 'json');
-               return;
-           } catch (FeedSubBadResponseException $e) {
-               $this->clientError(_('No hub found'), 403, 'json');
-               return;
-           }
+        try {
+            $feeduri = $discover->discoverFromURL($this->url);
+            if($feeduri) {
+                $huburi = $discover->getHubLink();                
+            }
+        } catch (FeedSubNoFeedException $e) {
+            $this->clientError(_('No feed found'), 403, 'json');
+            return;
+        } catch (FeedSubBadResponseException $e) {
+            $this->clientError(_('No hub found'), 403, 'json');
+            return;
+        }
                
                $hub_status = array();
                if ($huburi) {