X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FNotice.php;h=9cf676a664e3a15e10c09b9b00b3b006e74b64f6;hb=414a95a784294d63f4c636ef17e468db9428a446;hp=917095acab075b383e6a754aba3d9c0f1e5ea010;hpb=d16af504f6b7158fa5dfca2dde0fa1f9621330ee;p=quix0rs-gnu-social.git diff --git a/classes/Notice.php b/classes/Notice.php index 917095acab..9cf676a664 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -232,6 +232,19 @@ class Notice extends Managed_DataObject return common_local_url('shownotice', array('notice' => $this->id), null, null, false); } + public function getTitle() + { + $title = null; + if (Event::handle('GetNoticeTitle', array($this, &$title))) { + // 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'), + $this->getProfile()->getFancyName(), + common_exact_date($this->created)); + } + return $title; + } + /* * Get the original representation URL of this notice. */