diff options
author | Brion Vibber <brion@pobox.com> | 2010-08-13 11:02:21 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-08-13 12:23:32 -0700 |
commit | 60c36c1868f6bed18b2ac71ffb37f09ef1cbc472 (patch) | |
tree | c0ee9468fe3d7a5b3719cb1a26b52493e536fbe3 /plugins/SubMirror | |
parent | f7b2bb09e66d3985ce6f524e6841e5f6a473afdc (diff) |
SubMirror: check feel-url discovery if profile-url discovery failed; should help when giving direct feeds to subscribe to
Diffstat (limited to 'plugins/SubMirror')
-rw-r--r-- | plugins/SubMirror/actions/basemirror.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/SubMirror/actions/basemirror.php b/plugins/SubMirror/actions/basemirror.php index 5be0699f0..be6942efa 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.")); } |