🎨 Fix parameter for all DBSearch::AllowAllData impl

This commit is contained in:
Pierre Goiffon
2020-10-01 09:45:00 +02:00
parent e9f81bd978
commit 6cd0670d6b
2 changed files with 30 additions and 35 deletions

View File

@@ -107,14 +107,12 @@ abstract class DBSearch
}
/**
* whether or not some information should be hidden to the current user.
*
* @api
* @see IsAllDataAllowed()
*
* @return mixed
* @param bool $bAllowAllData whether or not some information should be hidden to the current user.
*/
abstract public function AllowAllData();
abstract public function AllowAllData($bAllowAllData = true);
/**
* Current state of AllowAllData

View File

@@ -65,9 +65,7 @@ class DBUnionSearch extends DBSearch
{
$this->aSearches[] = $oSubSearch->DeepClone();
}
}
else
{
} else {
$this->aSearches[] = $oSearch->DeepClone();
}
}
@@ -75,17 +73,16 @@ class DBUnionSearch extends DBSearch
$this->ComputeSelectedClasses();
}
public function AllowAllData()
{
foreach ($this->aSearches as $oSearch)
public function AllowAllData($bAllowAllData = true)
{
foreach ($this->aSearches as $oSearch) {
$oSearch->AllowAllData();
}
}
public function IsAllDataAllowed()
{
foreach ($this->aSearches as $oSearch)
{
foreach ($this->aSearches as $oSearch) {
if ($oSearch->IsAllDataAllowed() === false) return false;
}
return true;