]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
SubMirror: check feel-url discovery if profile-url discovery failed; should help...
authorBrion Vibber <brion@pobox.com>
Fri, 13 Aug 2010 18:02:21 +0000 (11:02 -0700)
committerBrion Vibber <brion@pobox.com>
Fri, 13 Aug 2010 18:02:21 +0000 (11:02 -0700)
plugins/SubMirror/actions/basemirror.php

index 5be0699f09b10f774334824e9df06efba618f22b..be6942efa7ca3a263a85954dfdf0f10d644ecd04 100644 (file)
@@ -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."));
         }