git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit ece8ba8e authored by mmn's avatar mmn

Calling parent::handle in ApiCheckHubAction

parent 8912cdc7
......@@ -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) {
......
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