Properly check validity of sort parameter.

This commit is contained in:
Michal Čihař
2010-08-18 12:31:54 +02:00
parent be0f47a931
commit 48e9096600

View File

@@ -213,7 +213,8 @@ if (! isset($sot_ready)) {
);
// Make sure the sort type is implemented
if ($sort = $sortable_name_mappings[$_REQUEST['sort']]) {
if (isset($sortable_name_mappings[$_REQUEST['sort']])) {
$sort = $sortable_name_mappings[$_REQUEST['sort']];
if ($_REQUEST['sort_order'] == 'DESC') {
$sort_order = 'DESC';
}