From d39ed3455a87702e84ab3e2ebb1ec575b22e0db2 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 27 Oct 2013 12:37:38 -0700 Subject: [PATCH] Fixed: Download sort pref was breaking download-list sql query. --- e107_plugins/download/handlers/download_class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e107_plugins/download/handlers/download_class.php b/e107_plugins/download/handlers/download_class.php index adcb4de92..92b002ae0 100644 --- a/e107_plugins/download/handlers/download_class.php +++ b/e107_plugins/download/handlers/download_class.php @@ -37,10 +37,12 @@ class download $pref = e107::getPref(); $tmp = explode('.', e_QUERY); + + $order = str_replace("download_","",$pref['download_order']); // Set Defaults $this->qry['action'] = 'maincats'; - $this->qry['order'] = vartrue($pref['download_order'],'download_datestamp'); + $this->qry['order'] = vartrue($order, 'datestamp'); $this->qry['sort'] = vartrue($pref['download_sort'], 'desc'); $this->qry['view'] = vartrue($pref['download_view'], 10); $this->qry['from'] = 0;