aboutsummaryrefslogtreecommitdiffstats
path: root/comments.php
diff options
context:
space:
mode:
Diffstat (limited to 'comments.php')
-rw-r--r--comments.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/comments.php b/comments.php
index efcd7dfb5..dd722f588 100644
--- a/comments.php
+++ b/comments.php
@@ -69,7 +69,7 @@ $page['since'] = isset($_GET['since']) ? $_GET['since'] : 4;
//
$page['sort_by'] = 'date';
// if the form was submitted, it overloads default behaviour
-if (isset($_GET['sort_by']))
+if (isset($_GET['sort_by']) and isset($sort_by[$_GET['sort_by']]) )
{
$page['sort_by'] = $_GET['sort_by'];
}
@@ -78,7 +78,7 @@ if (isset($_GET['sort_by']))
//
$page['sort_order'] = $sort_order['descending'];
// if the form was submitted, it overloads default behaviour
-if (isset($_GET['sort_order']))
+if (isset($_GET['sort_order']) and isset($sort_order[$_GET['sort_order']]))
{
$page['sort_order'] = $sort_order[$_GET['sort_order']];
}