From: Brion Vibber Date: Fri, 13 Aug 2010 18:02:21 +0000 (-0700) Subject: SubMirror: check feel-url discovery if profile-url discovery failed; should help... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=60c36c1868f6bed18b2ac71ffb37f09ef1cbc472;p=quix0rs-gnu-social.git SubMirror: check feel-url discovery if profile-url discovery failed; should help when giving direct feeds to subscribe to --- diff --git a/plugins/SubMirror/actions/basemirror.php b/plugins/SubMirror/actions/basemirror.php index 5be0699f09..be6942efa7 100644 --- a/plugins/SubMirror/actions/basemirror.php +++ b/plugins/SubMirror/actions/basemirror.php @@ -92,7 +92,13 @@ abstract class BaseMirrorAction extends Action */ protected function profileForFeed($url) { - $oprofile = Ostatus_profile::ensureProfileURL($url); + try { + // Maybe we got a web page? + $oprofile = Ostatus_profile::ensureProfileURL($url); + } catch (Exception $e) { + // Direct feed URL? + $oprofile = Ostatus_profile::ensureFeedURL($url); + } if ($oprofile->isGroup()) { $this->clientError(_m("Can't mirror a StatusNet group at this time.")); }