mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-19 02:14:10 +01:00
Compare commits
1 Commits
support/3.
...
issue/8782
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0cfd5c044b |
@@ -59,7 +59,7 @@ class DBUnionSearch extends DBSearch
|
||||
public function AllowAllData($bAllowAllData = true)
|
||||
{
|
||||
foreach ($this->aSearches as $oSearch) {
|
||||
$oSearch->AllowAllData();
|
||||
$oSearch->AllowAllData($bAllowAllData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -694,6 +694,15 @@ class DBSearchTest extends ItopDataTestCase
|
||||
$this->CheckNestedSearch($sNestedQuery, false);
|
||||
}
|
||||
|
||||
public function testAllowAllDataOnUnions()
|
||||
{
|
||||
$oSearch = \DBObjectSearch::FromOQL('SELECT Server UNION SELECT VirtualMachine');
|
||||
$oSearch->AllowAllData(false);
|
||||
self::assertFalse($oSearch->IsAllDataAllowed(), 'DBUnionSearch AllowData value');
|
||||
$oSearch->AllowAllData(true);
|
||||
self::assertTrue($oSearch->IsAllDataAllowed(), 'DBUnionSearch AllowData value');
|
||||
}
|
||||
|
||||
private function CheckNestedSearch($sQuery, $bAllowAllData)
|
||||
{
|
||||
$oNestedQuerySearch = \DBObjectSearch::FromOQL($sQuery);
|
||||
|
||||
Reference in New Issue
Block a user