mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
Enhancement: the default value for a module's parameter can now be specified (and altered) via the XML and will no longer reside in the configuration file.
SVN:trunk[3518]
This commit is contained in:
@@ -1150,9 +1150,20 @@ class Config
|
||||
{
|
||||
return $this->m_aModuleSettings[$sModule][$sProperty];
|
||||
}
|
||||
return $defaultvalue;
|
||||
// Fall back to the predefined XML parameter, if any
|
||||
return $this->GetModuleParameter($sModule, $sProperty, $defaultvalue);
|
||||
}
|
||||
|
||||
public function GetModuleParameter($sModule, $sProperty, $defaultvalue = null)
|
||||
{
|
||||
$aAllParams = ModulesXMLParameters::GetData($sModule);
|
||||
if(array_key_exists($sProperty, $aAllParams))
|
||||
{
|
||||
return $aAllParams[$sProperty];
|
||||
}
|
||||
return $defaultvalue;
|
||||
}
|
||||
|
||||
public function SetModuleSetting($sModule, $sProperty, $value)
|
||||
{
|
||||
$this->m_aModuleSettings[$sModule][$sProperty] = $value;
|
||||
|
||||
Reference in New Issue
Block a user