From: Stephen Paul Weber Date: Fri, 10 Jun 2016 21:00:01 +0000 (+0000) Subject: Allow getting notice title without implying one X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=47e541eaec6dc20d965e033d0af6e468b4d3f572;p=quix0rs-gnu-social.git Allow getting notice title without implying one Sometimes I just want explicit titles, and not the generated "blah posted on date" text --- 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'),