// Normalize Validate class
This commit is contained in:
1 parent
4fdae718ed
commit
3c395ccefa
7 files changed
+426
-411
No files matched your search
@@ -117,17 +117,17 @@ abstract class ModuleGridCore extends Module
|
|||||||
|
|
||||||
$grider .= '&width='.$params['width'];
|
$grider .= '&width='.$params['width'];
|
||||||
$grider .= '&height='.$params['height'];
|
$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'];
|
$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'];
|
$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'];
|
$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'];
|
$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'];
|
$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'];
|
$grider .= '&dir='.$params['dir'];
|
||||||
|
|
||||||
require_once(dirname(__FILE__).'/../modules/'.$render.'/'.$render.'.php');
|
require_once(dirname(__FILE__).'/../modules/'.$render.'/'.$render.'.php');
|
||||||
|
|||||||
+415
-400
File diff suppressed because it is too large.
Load diff
@@ -194,7 +194,7 @@ class StatsBestCategories extends ModuleGrid
|
|||||||
if (Validate::IsName($this->_sort))
|
if (Validate::IsName($this->_sort))
|
||||||
{
|
{
|
||||||
$this->_query .= ' ORDER BY `'.$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;
|
$this->_query .= ' '.$this->_direction;
|
||||||
}
|
}
|
||||||
if (($this->_start === 0 || Validate::IsUnsignedInt($this->_start)) && Validate::IsUnsignedInt($this->_limit))
|
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))
|
if (Validate::IsName($this->_sort))
|
||||||
{
|
{
|
||||||
$this->_query .= ' ORDER BY `'.$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;
|
$this->_query .= ' '.$this->_direction;
|
||||||
}
|
}
|
||||||
if (($this->_start === 0 || Validate::IsUnsignedInt($this->_start)) && Validate::IsUnsignedInt($this->_limit))
|
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))
|
if (Validate::IsName($this->_sort))
|
||||||
{
|
{
|
||||||
$this->_query .= ' ORDER BY `'.$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;
|
$this->_query .= ' '.$this->_direction;
|
||||||
}
|
}
|
||||||
if (($this->_start === 0 || Validate::IsUnsignedInt($this->_start)) && Validate::IsUnsignedInt($this->_limit))
|
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))
|
if (Validate::IsName($this->_sort))
|
||||||
{
|
{
|
||||||
$this->_query .= ' ORDER BY `'.$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;
|
$this->_query .= ' '.$this->_direction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ class StatsBestSuppliers extends ModuleGrid
|
|||||||
if (Validate::IsName($this->_sort))
|
if (Validate::IsName($this->_sort))
|
||||||
{
|
{
|
||||||
$this->_query .= ' ORDER BY `'.$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;
|
$this->_query .= ' '.$this->_direction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user