forked from GNUsocial/gnu-social
Calling parent::handle in ApiCheckHubAction
This commit is contained in:
parent
8912cdc7a4
commit
ece8ba8ea4
@ -41,7 +41,7 @@ class ApiCheckHubAction extends ApiAuthAction
|
|||||||
*
|
*
|
||||||
* @return boolean success flag
|
* @return boolean success flag
|
||||||
*/
|
*/
|
||||||
function prepare($args)
|
protected function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
|
|
||||||
@ -67,23 +67,24 @@ class ApiCheckHubAction extends ApiAuthAction
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function handle($args)
|
protected function handle()
|
||||||
{
|
{
|
||||||
|
parent::handle();
|
||||||
|
|
||||||
$discover = new FeedDiscovery();
|
$discover = new FeedDiscovery();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$feeduri = $discover->discoverFromURL($this->url);
|
$feeduri = $discover->discoverFromURL($this->url);
|
||||||
if($feeduri) {
|
if($feeduri) {
|
||||||
$huburi = $discover->getHubLink();
|
$huburi = $discover->getHubLink();
|
||||||
}
|
}
|
||||||
} catch (FeedSubNoFeedException $e) {
|
} catch (FeedSubNoFeedException $e) {
|
||||||
$this->clientError(_('No feed found'), 403, 'json');
|
$this->clientError(_('No feed found'), 403, 'json');
|
||||||
return;
|
return;
|
||||||
} catch (FeedSubBadResponseException $e) {
|
} catch (FeedSubBadResponseException $e) {
|
||||||
$this->clientError(_('No hub found'), 403, 'json');
|
$this->clientError(_('No hub found'), 403, 'json');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$hub_status = array();
|
$hub_status = array();
|
||||||
if ($huburi) {
|
if ($huburi) {
|
||||||
|
Loading…
Reference in New Issue
Block a user