Пример #1
0
 /**
  * Get author and time of an edited forum entry as a string.
  *
  * @param string  $description  Database entry of forum entry's body.
  * @param bool    $anonymous    True, if only root is allowed to see
  *                              authors.
  * @return string  Author and time or empty string if not edited.
  */
 static function getEditComment($description, $anonymous = false)
 {
     $info = ForumEntry::getEditInfo($description);
     if ($info) {
         $root = $GLOBALS['perm']->have_perm('root');
         $author = $anonymous && !$root ? _('Anonym') : $info['author'];
         $time = date('d.m.y - H:i', $info['time']);
         return '[' . _('Zuletzt editiert von') . " {$author} - {$time}]";
     }
     return '';
 }