From eec10ebfc5c14ab9b72d3b81b7d44a2e507f5473 Mon Sep 17 00:00:00 2001 From: msquare Date: Tue, 4 Oct 2016 16:50:06 +0200 Subject: reduce complexity of user angeltypes controller --- includes/pages/admin_questions.php | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'includes/pages/admin_questions.php') diff --git a/includes/pages/admin_questions.php b/includes/pages/admin_questions.php index 8e7507da..8c16255c 100644 --- a/includes/pages/admin_questions.php +++ b/includes/pages/admin_questions.php @@ -26,9 +26,6 @@ function admin_questions() { $questions = sql_select("SELECT * FROM `Questions` WHERE `AID` IS NULL"); foreach ($questions as $question) { $user_source = User($question['UID']); - if ($user_source === false) { - engelsystem_error("Unable to load user."); - } $unanswered_questions_table[] = [ 'from' => User_Nick_render($user_source), @@ -45,14 +42,7 @@ function admin_questions() { $questions = sql_select("SELECT * FROM `Questions` WHERE NOT `AID` IS NULL"); foreach ($questions as $question) { $user_source = User($question['UID']); - if ($user_source === false) { - engelsystem_error("Unable to load user."); - } - $answer_user_source = User($question['AID']); - if ($answer_user_source === false) { - engelsystem_error("Unable to load user."); - } $answered_questions_table[] = [ 'from' => User_Nick_render($user_source), 'question' => str_replace("\n", "
", $question['Question']), -- cgit v1.2.3-70-g09d2