// Normalize Validate class
This commit is contained in:
@@ -117,17 +117,17 @@ abstract class ModuleGridCore extends Module
|
||||
|
||||
$grider .= '&width='.$params['width'];
|
||||
$grider .= '&height='.$params['height'];
|
||||
if (isset($params['start']) AND Validate::IsUnsignedInt($params['start']))
|
||||
if (isset($params['start']) && Validate::IsUnsignedInt($params['start']))
|
||||
$grider .= '&start='.$params['start'];
|
||||
if (isset($params['limit']) AND Validate::IsUnsignedInt($params['limit']))
|
||||
if (isset($params['limit']) && Validate::IsUnsignedInt($params['limit']))
|
||||
$grider .= '&limit='.$params['limit'];
|
||||
if (isset($params['type']) AND Validate::IsName($params['type']))
|
||||
if (isset($params['type']) && Validate::IsName($params['type']))
|
||||
$grider .= '&type='.$params['type'];
|
||||
if (isset($params['option']) AND Validate::IsGenericName($params['option']))
|
||||
if (isset($params['option']) && Validate::IsGenericName($params['option']))
|
||||
$grider .= '&option='.$params['option'];
|
||||
if (isset($params['sort']) AND Validate::IsName($params['sort']))
|
||||
if (isset($params['sort']) && Validate::IsName($params['sort']))
|
||||
$grider .= '&sort='.$params['sort'];
|
||||
if (isset($params['dir']) AND Validate::IsSortDirection($params['dir']))
|
||||
if (isset($params['dir']) && Validate::isSortDirection($params['dir']))
|
||||
$grider .= '&dir='.$params['dir'];
|
||||
|
||||
require_once(dirname(__FILE__).'/../modules/'.$render.'/'.$render.'.php');
|
||||
|
||||
+416
-401
File diff suppressed because it is too large
Load Diff
@@ -194,7 +194,7 @@ class StatsBestCategories extends ModuleGrid
|
||||
if (Validate::IsName($this->_sort))
|
||||
{
|
||||
$this->_query .= ' ORDER BY `'.$this->_sort.'`';
|
||||
if (isset($this->_direction) && Validate::IsSortDirection($this->_direction))
|
||||
if (isset($this->_direction) && Validate::isSortDirection($this->_direction))
|
||||
$this->_query .= ' '.$this->_direction;
|
||||
}
|
||||
if (($this->_start === 0 || Validate::IsUnsignedInt($this->_start)) && Validate::IsUnsignedInt($this->_limit))
|
||||
|
||||
@@ -153,7 +153,7 @@ class StatsBestCustomers extends ModuleGrid
|
||||
if (Validate::IsName($this->_sort))
|
||||
{
|
||||
$this->_query .= ' ORDER BY `'.$this->_sort.'`';
|
||||
if (isset($this->_direction) && Validate::IsSortDirection($this->_direction))
|
||||
if (isset($this->_direction) && Validate::isSortDirection($this->_direction))
|
||||
$this->_query .= ' '.$this->_direction;
|
||||
}
|
||||
if (($this->_start === 0 || Validate::IsUnsignedInt($this->_start)) && Validate::IsUnsignedInt($this->_limit))
|
||||
|
||||
@@ -141,7 +141,7 @@ class StatsBestManufacturers extends ModuleGrid
|
||||
if (Validate::IsName($this->_sort))
|
||||
{
|
||||
$this->_query .= ' ORDER BY `'.$this->_sort.'`';
|
||||
if (isset($this->_direction) && Validate::IsSortDirection($this->_direction))
|
||||
if (isset($this->_direction) && Validate::isSortDirection($this->_direction))
|
||||
$this->_query .= ' '.$this->_direction;
|
||||
}
|
||||
if (($this->_start === 0 || Validate::IsUnsignedInt($this->_start)) && Validate::IsUnsignedInt($this->_limit))
|
||||
|
||||
@@ -178,7 +178,7 @@ class StatsBestProducts extends ModuleGrid
|
||||
if (Validate::IsName($this->_sort))
|
||||
{
|
||||
$this->_query .= ' ORDER BY `'.$this->_sort.'`';
|
||||
if (isset($this->_direction) && Validate::IsSortDirection($this->_direction))
|
||||
if (isset($this->_direction) && Validate::isSortDirection($this->_direction))
|
||||
$this->_query .= ' '.$this->_direction;
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ class StatsBestSuppliers extends ModuleGrid
|
||||
if (Validate::IsName($this->_sort))
|
||||
{
|
||||
$this->_query .= ' ORDER BY `'.$this->_sort.'`';
|
||||
if (isset($this->_direction) && Validate::IsSortDirection($this->_direction))
|
||||
if (isset($this->_direction) && Validate::isSortDirection($this->_direction))
|
||||
$this->_query .= ' '.$this->_direction;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user