summaryrefslogtreecommitdiff
path: root/includes/pages/admin_questions.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/pages/admin_questions.php')
-rw-r--r--includes/pages/admin_questions.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/includes/pages/admin_questions.php b/includes/pages/admin_questions.php
index 8c16255c..13614a66 100644
--- a/includes/pages/admin_questions.php
+++ b/includes/pages/admin_questions.php
@@ -4,18 +4,23 @@ function admin_questions_title() {
return _("Answer questions");
}
+/**
+ * Renders a hint for new questions to answer.
+ */
function admin_new_questions() {
- global $privileges;
+ global $privileges, $page;
- if (in_array("admin_questions", $privileges)) {
- $new_messages = sql_num_query("SELECT * FROM `Questions` WHERE `AID` IS NULL");
-
- if ($new_messages > 0) {
- return info('<a href="' . page_link_to("admin_questions") . '">' . _('There are unanswered questions!') . '</a>', true);
+ if ($page != "admin_questions") {
+ if (in_array("admin_questions", $privileges)) {
+ $new_messages = sql_num_query("SELECT * FROM `Questions` WHERE `AID` IS NULL");
+
+ if ($new_messages > 0) {
+ return info('<a href="' . page_link_to("admin_questions") . '">' . _('There are unanswered questions!') . '</a>', true);
+ }
}
}
- return "";
+ return null;
}
function admin_questions() {