summaryrefslogtreecommitdiff
path: root/utils/modules/news.php
diff options
context:
space:
mode:
Diffstat (limited to 'utils/modules/news.php')
-rw-r--r--utils/modules/news.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/utils/modules/news.php b/utils/modules/news.php
index 6cab087..57e9da7 100644
--- a/utils/modules/news.php
+++ b/utils/modules/news.php
@@ -29,15 +29,17 @@ class NewsEntry {
$icons = new Icons($ICONS_DIR."/");
$icon = $icons->icons[$this->icon];
+ $userid = $users->findUser($this->userid)->userid;
+ if(!$userid) $userid = "admin"; // Fallback from old data.
+
$str = "<div class=\"news_entry\">\n";
+ $str .= " <div class=\"news_time\">" .
+ date("D M jS Y G:i", $this->time) . "</div>\n";
$str .= " <div class=\"news_title\">\n";
$str .= " <a href=\"?page=".$NEWS_PAGE."&amp;newsid=".$this->time."\">" .
htmlspecialchars_decode($this->title, ENT_QUOTES) . "</a>\n";
$str .= " </div>\n";
- $str .= " <div class=\"news_time\">" .
- date("D M jS Y G:i", $this->time) . "</div>\n";
- $str .= " <div class=\"news_user\">By: " .
- $users->findUser($this->userid)->userid . "</div>\n";
+ $str .= " <div class=\"news_user\">By: " . $userid . "</div>\n";
$str .= " <div class=\"news_description\">\n";
if($this->icon) $str .= " <img alt=\"icon\" class=\"news_icon\" src=\"" .
$icon->prefix.$icon->file . "\"/>\n";