dblayeroo : allow to orderAdd on aliases too
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4285 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -2063,9 +2063,11 @@ class dblayeroo
|
||||
if (! in_array ($sort, array ("ASC", "DESC", "NATASC", "NATDESC")))
|
||||
$this->DBException (
|
||||
"Invalid sort provided (not ASC nor DESC nor NATASC nor NATDESC)");
|
||||
if (! array_key_exists ($field, $this->fields))
|
||||
if (! array_key_exists ($field, $this->fields) &&
|
||||
! in_array ($field, $this->displayAlias))
|
||||
$this->DBException (sprintf (
|
||||
"Invalid field to orderAdd '%s' : not defined in table", $field));
|
||||
"Invalid field to orderAdd '%s' : not defined in table nor in alias",
|
||||
$field));
|
||||
$plus = "";
|
||||
if (substr ($sort, 0, 3) === "NAT")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user