Allow getting notice title without implying one

Sometimes I just want explicit titles, and not the generated "blah posted on date" text
This commit is contained in:
Stephen Paul Weber 2016-06-10 21:00:01 +00:00
parent bd306bdb9f
commit 47e541eaec
1 changed files with 2 additions and 2 deletions

View File

@ -248,10 +248,10 @@ class Notice extends Managed_DataObject
return common_local_url('shownotice', array('notice' => $this->id), null, null, false);
}
public function getTitle()
public function getTitle($imply=true)
{
$title = null;
if (Event::handle('GetNoticeTitle', array($this, &$title))) {
if (Event::handle('GetNoticeTitle', array($this, &$title)) && $imply) {
// TRANS: Title of a notice posted without a title value.
// TRANS: %1$s is a user name, %2$s is the notice creation date/time.
$title = sprintf(_('%1$s\'s status on %2$s'),