SubMirror: check feel-url discovery if profile-url discovery failed; should help when giving direct feeds to subscribe to

This commit is contained in:
Brion Vibber 2010-08-13 11:02:21 -07:00
parent 115231f917
commit 8569388499
1 changed files with 7 additions and 1 deletions

View 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."));
}