summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-08-13 11:02:21 -0700
committerBrion Vibber <brion@pobox.com>2010-08-13 11:02:21 -0700
commit85693884994bda3067d2b9a46d279fd3a5c1c9f5 (patch)
treebe136ddef9ebb3b0afe0fbb10af8b3f2a53d5ca6
parent115231f917c9c9c67fe3768310c4852d8e1cada1 (diff)
SubMirror: check feel-url discovery if profile-url discovery failed; should help when giving direct feeds to subscribe to
-rw-r--r--plugins/SubMirror/actions/basemirror.php8
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."));
}