From bfb0cacd541cc20129a3c0ac77130370741dca18 Mon Sep 17 00:00:00 2001 From: Philip Häusler Date: Wed, 18 Sep 2013 01:38:36 +0200 Subject: mysql to mysqli and a lot of cleanup and mvc --- includes/pages/user_news.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'includes/pages/user_news.php') diff --git a/includes/pages/user_news.php b/includes/pages/user_news.php index a8d819d0..481cf738 100644 --- a/includes/pages/user_news.php +++ b/includes/pages/user_news.php @@ -35,7 +35,12 @@ function display_news($news) { $html .= '
'; $html .= '
'; $html .= date("Y-m-d H:i", $news['Datum']) . ', '; - $html .= UID2Nick($news['UID']); + + $user_source = User($news['UID']); + if($user_source === false) + engelsystem_error("Unable to load user."); + + $html .= User_Nick_render($user_source); if ($p != "news_comments") $html .= ', Kommentare (' . sql_num_query("SELECT * FROM `news_comments` WHERE `Refid`='" . sql_escape($news['ID']) . "'") . ') »'; $html .= '
'; @@ -69,11 +74,15 @@ function user_news_comments() { $comments = sql_select("SELECT * FROM `news_comments` WHERE `Refid`='" . sql_escape($nid) . "' ORDER BY 'ID'"); foreach ($comments as $comment) { + $user_source = User($comment['UID']); + if($user_source === false) + engelsystem_error("Unable to load user."); + $html .= '
'; - $html .= DisplayAvatar($comment['UID']); + $html .= User_Avatar_render($user_source); $html .= '
'; $html .= $comment['Datum'] . ', '; - $html .= UID2Nick($comment['UID']); + $html .= User_Nick_render($user_source); $html .= '
'; $html .= '

' . nl2br($comment['Text']) . '

'; $html .= '
'; -- cgit v1.2.3-54-g00ecf