示例#1
0
 /**
  *
  * @param string $url
  * @return Profile
  */
 protected function profileForFeed($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()) {
         // TRANS: Client error displayed when trying to mirror a StatusNet group feed.
         $this->clientError(_m('Cannot mirror a StatusNet group at this time.'));
     }
     $this->oprofile = $oprofile;
     // @todo FIXME: ugly side effect :D
     return $oprofile->localProfile();
 }
示例#2
0
 /**
  *
  * @param string $url
  * @return Profile
  */
 protected function profileForFeed($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."));
     }
     $this->oprofile = $oprofile;
     // @fixme ugly side effect :D
     return $oprofile->localProfile();
 }