summaryrefslogtreecommitdiff
path: root/includes/pages/user_questions.php
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2013-09-18 01:38:36 +0200
committerPhilip Häusler <msquare@notrademark.de>2013-09-18 01:38:36 +0200
commitbfb0cacd541cc20129a3c0ac77130370741dca18 (patch)
tree0a0e86e1a53d712065664c12d06603bc044df9ec /includes/pages/user_questions.php
parentd50cc21f50cb3ec3afdabb74a20d81bd1a53dfbd (diff)
mysql to mysqli and a lot of cleanup and mvc
Diffstat (limited to 'includes/pages/user_questions.php')
-rw-r--r--includes/pages/user_questions.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/includes/pages/user_questions.php b/includes/pages/user_questions.php
index 5d55f647..97035546 100644
--- a/includes/pages/user_questions.php
+++ b/includes/pages/user_questions.php
@@ -12,7 +12,12 @@ function user_questions() {
$questions = sql_select("SELECT * FROM `Questions` WHERE `AID`>0 AND `UID`=" . sql_escape($user['UID']));
foreach ($questions as $question) {
$answered_questions .= '<tr><td>' . str_replace("\n", '<br />', $question['Question']) . '</td>';
- $answered_questions .= '<td>' . UID2Nick($question['AID']) . '</td><td>' . str_replace("\n", '<br />', $question['Answer']) . '</td>';
+
+ $answer_user_source = User($question['AID']);
+ if($answer_user_source === false)
+ engelsystem_error("Unable to load user.");
+
+ $answered_questions .= '<td>' . User_Nick_render($answer_user_source) . '</td><td>' . str_replace("\n", '<br />', $question['Answer']) . '</td>';
$answered_questions .= '<td><a href="' . page_link_to("user_questions") . '&action=delete&id=' . $question['QID'] . '">Löschen</a></td><tr>';
}