🎨 clarify \Config::UpdateIncludes with $sModulesDir=null

This commit is contained in:
Pierre Goiffon
2019-09-12 09:53:01 +02:00
parent 24a0cc2f64
commit 99e21652a0

View File

@@ -2056,7 +2056,7 @@ class Config
* selected modules
*
* @param string $sModulesDir The relative path to the directory to scan for modules (typically the 'env-xxx'
* directory resulting from the compilation)
* directory resulting from the compilation). If null nothing will be done.
* @param array $aSelectedModules An array of selected modules' identifiers. If null all modules found will be
* considered as installed
*
@@ -2064,8 +2064,11 @@ class Config
*/
public function UpdateIncludes($sModulesDir, $aSelectedModules = null)
{
if (!is_null($sModulesDir))
if ($sModulesDir === null)
{
return;
}
// Initialize the arrays below with default values for the application...
$oEmptyConfig = new Config('dummy_file', false); // Do NOT load any config file, just set the default values
$aAddOns = $oEmptyConfig->GetAddOns();
@@ -2109,7 +2112,6 @@ class Config
}
$this->SetAddOns($aAddOns);
}
}
/**
* Helper: for an array of string, change the prefix when found