deprecate Notice::bestUrl() in favor of getUrl()
This commit is contained in:
parent
7ca6597c7f
commit
72707ddc26
@ -1697,15 +1697,13 @@ class Notice extends Managed_DataObject
|
|||||||
return $noun->asString('activity:' . $element);
|
return $noun->asString('activity:' . $element);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: Replace all bestUrl with getUrl and do exception handling
|
||||||
function bestUrl()
|
function bestUrl()
|
||||||
{
|
{
|
||||||
if (!empty($this->url)) {
|
try {
|
||||||
return $this->url;
|
return $this->getUrl();
|
||||||
} else if (!empty($this->uri) && preg_match('/^https?:/', $this->uri)) {
|
} catch (InvalidUrlException $e) {
|
||||||
return $this->uri;
|
return common_local_url('shownotice', array('notice' => $this->id));
|
||||||
} else {
|
|
||||||
return common_local_url('shownotice',
|
|
||||||
array('notice' => $this->id));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user