]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Notice.php
Initial move towards microformats2
[quix0rs-gnu-social.git] / classes / Notice.php
index 917095acab075b383e6a754aba3d9c0f1e5ea010..9cf676a664e3a15e10c09b9b00b3b006e74b64f6 100644 (file)
@@ -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.
      */