diff --git a/Tests/dblayerooComplet.php b/Tests/dblayerooComplet.php index 243e5c4..d81ff30 100644 --- a/Tests/dblayerooComplet.php +++ b/Tests/dblayerooComplet.php @@ -677,6 +677,11 @@ class test_dblayeroo_{ENGINE} extends PHPUnit_Framework_TestCase $db2->disconnect (); $db4->disconnect (); $this->assertSame (array ( + array ( + 'groupedoo.group' => 'group2', + 'rightsoo.name' => NULL, + 'usersoo.gecos' => NULL, + ), array ( 'groupedoo.group' => 'group1', 'rightsoo.name' => 'RO', @@ -697,11 +702,6 @@ class test_dblayeroo_{ENGINE} extends PHPUnit_Framework_TestCase 'rightsoo.name' => 'RO', 'usersoo.gecos' => 'name4', ), - array ( - 'groupedoo.group' => 'group2', - 'rightsoo.name' => NULL, - 'usersoo.gecos' => NULL, - ), ), $res); } } diff --git a/dblayeroo.php b/dblayeroo.php index 2e17bf3..48fcf71 100644 --- a/dblayeroo.php +++ b/dblayeroo.php @@ -1701,11 +1701,7 @@ class dblayeroo { $order = array (); if ($this->joinObject) - { - foreach ($this->joinObject as $obj) - $order = array_merge ($order, $obj->orderGet (true)); $full = true; - } foreach ($this->orderExpression as $o) { if ($full !== false) @@ -1713,6 +1709,11 @@ class dblayeroo else $order[] = $o; } + if ($this->joinObject) + { + foreach ($this->joinObject as $obj) + $order = array_merge ($order, $obj->orderGet (true)); + } return $order; } /* }}} */