dblayeroo : update to ORDER in the well known order

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3540 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-04-25 12:03:57 +00:00
parent 152cd7048f
commit 48ce12accc
2 changed files with 10 additions and 9 deletions

View File

@@ -677,6 +677,11 @@ class test_dblayeroo_{ENGINE} extends PHPUnit_Framework_TestCase
$db2->disconnect (); $db2->disconnect ();
$db4->disconnect (); $db4->disconnect ();
$this->assertSame (array ( $this->assertSame (array (
array (
'groupedoo.group' => 'group2',
'rightsoo.name' => NULL,
'usersoo.gecos' => NULL,
),
array ( array (
'groupedoo.group' => 'group1', 'groupedoo.group' => 'group1',
'rightsoo.name' => 'RO', 'rightsoo.name' => 'RO',
@@ -697,11 +702,6 @@ class test_dblayeroo_{ENGINE} extends PHPUnit_Framework_TestCase
'rightsoo.name' => 'RO', 'rightsoo.name' => 'RO',
'usersoo.gecos' => 'name4', 'usersoo.gecos' => 'name4',
), ),
array (
'groupedoo.group' => 'group2',
'rightsoo.name' => NULL,
'usersoo.gecos' => NULL,
),
), $res); ), $res);
} }
} }

View File

@@ -1701,11 +1701,7 @@ class dblayeroo
{ {
$order = array (); $order = array ();
if ($this->joinObject) if ($this->joinObject)
{
foreach ($this->joinObject as $obj)
$order = array_merge ($order, $obj->orderGet (true));
$full = true; $full = true;
}
foreach ($this->orderExpression as $o) foreach ($this->orderExpression as $o)
{ {
if ($full !== false) if ($full !== false)
@@ -1713,6 +1709,11 @@ class dblayeroo
else else
$order[] = $o; $order[] = $o;
} }
if ($this->joinObject)
{
foreach ($this->joinObject as $obj)
$order = array_merge ($order, $obj->orderGet (true));
}
return $order; return $order;
} }
/* }}} */ /* }}} */