X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FNotice.php;h=7311a257a618180d3cdb688fbf8f7d73ea996784;hb=27ed6b7db05bd2879841d6d95d9d8e273d7454b5;hp=a72e04746c5bdc1ab77c9e9d1fcc780f58b1c79a;hpb=0883f54f62f3f2d512d3b3e965eb84b5d9102b50;p=quix0rs-gnu-social.git diff --git a/classes/Notice.php b/classes/Notice.php index a72e04746c..7311a257a6 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -210,6 +210,27 @@ class Notice extends Managed_DataObject return $this->uri; } + /* + * @param $root boolean If true, link to just the conversation root. + * + * @return URL to conversation + */ + public function getConversationUrl($anchor=true) + { + return Conversation::getUrlFromNotice($this, $anchor); + } + + /* + * Get the local representation URL of this notice. + */ + public function getLocalUrl() + { + return common_local_url('shownotice', array('notice' => $this->id), null, null, false); + } + + /* + * Get the original representation URL of this notice. + */ public function getUrl() { // The risk is we start having empty urls and non-http uris... @@ -1697,17 +1718,6 @@ class Notice extends Managed_DataObject return $noun->asString('activity:' . $element); } - // FIXME: Replace all bestUrl with getUrl and do exception handling - function bestUrl() - { - try { - return $this->getUrl(); - } catch (InvalidUrlException $e) { - return common_local_url('shownotice', array('notice' => $this->id)); - } - } - - /** * Determine which notice, if any, a new notice is in reply to. *