From 47e541eaec6dc20d965e033d0af6e468b4d3f572 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Fri, 10 Jun 2016 21:00:01 +0000 Subject: [PATCH] Allow getting notice title without implying one Sometimes I just want explicit titles, and not the generated "blah posted on date" text --- classes/Notice.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/Notice.php b/classes/Notice.php index f38de37167..c130cccc26 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -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'), -- 2.39.5