From 5732d25c9c8cd1b60a2df6673a2d34fea5448119 Mon Sep 17 00:00:00 2001 From: aFolletete Date: Tue, 31 Jan 2012 15:24:02 +0000 Subject: [PATCH] // Clean code --- modules/statsbestvouchers/statsbestvouchers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/statsbestvouchers/statsbestvouchers.php b/modules/statsbestvouchers/statsbestvouchers.php index 30a8d3895..909f05c6e 100644 --- a/modules/statsbestvouchers/statsbestvouchers.php +++ b/modules/statsbestvouchers/statsbestvouchers.php @@ -121,8 +121,8 @@ class StatsBestVouchers extends ModuleGrid if (Validate::IsName($this->_sort)) { $this->_query .= ' ORDER BY `'.$this->_sort.'`'; - if (isset($this->_direction)) - $this->_query .= ' '.$this->_direction; + if (isset($this->_direction) && (strtoupper($this->_direction) == 'ASC' || strtoupper($this->_direction) == 'DESC')) + $this->_query .= ' '.pSQL($this->_direction); } if (($this->_start === 0 || Validate::IsUnsignedInt($this->_start)) && Validate::IsUnsignedInt($this->_limit)) $this->_query .= ' LIMIT '.$this->_start.', '.($this->_limit);