dblayeroo : CONCAT must use the local entries if provided
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5165 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* @author Dominique Fournier <dominique@fournier38.fr>
|
||||
*/
|
||||
|
||||
require_once ("domframework/dblayeroo.php");
|
||||
namespace vendor\domframework;
|
||||
|
||||
// dblayeroo.php
|
||||
|
||||
@@ -2079,16 +2079,17 @@ class dblayeroo
|
||||
$newJoinArray = array ();
|
||||
foreach ($joinArray as $fieldLocal=>$fieldToJoin)
|
||||
{
|
||||
if (substr ($fieldToJoin, 0, 7) === "CONCAT(")
|
||||
$fieldLocal = $this->concat ($fieldToJoin, $object);
|
||||
elseif (array_key_exists ($fieldToJoin, $object->fields))
|
||||
if (substr ($fieldLocal, 0, 7) === "CONCAT(")
|
||||
$fieldLocal = $this->concat ($fieldLocal, $this);
|
||||
elseif (array_key_exists ($fieldLocal, $this->fields))
|
||||
$fieldLocal =
|
||||
$this->sep.$object->tableprefix.$object->table.$this->sep.".".
|
||||
$this->sep.$fieldToJoin.$this->sep;
|
||||
$this->sep.$this->tableprefix.$this->table.$this->sep.".".
|
||||
$this->sep.$fieldLocal.$this->sep;
|
||||
else
|
||||
$this->DBException (sprintf (
|
||||
"Invalid field to join '%s' : not defined in Local table",
|
||||
$fieldLocal));
|
||||
|
||||
if (substr ($fieldToJoin, 0, 7) === "CONCAT(")
|
||||
$fieldToJoin = $this->concat ($fieldToJoin, $object);
|
||||
elseif (array_key_exists ($fieldToJoin, $object->fields))
|
||||
|
||||
Reference in New Issue
Block a user