mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 10:08:45 +02:00
Allow filtering of the languages to install
SVN:trunk[2713]
This commit is contained in:
@@ -320,8 +320,9 @@ class ModelFactory
|
||||
/**
|
||||
* Loads the definitions corresponding to the given Module
|
||||
* @param MFModule $oModule
|
||||
* @param Array $aLanguages The list of languages to process (for the dictionaries). If empty all languages are kept
|
||||
*/
|
||||
public function LoadModule(MFModule $oModule)
|
||||
public function LoadModule(MFModule $oModule, $aLanguages = array())
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -395,6 +396,12 @@ class ModelFactory
|
||||
|
||||
foreach ($this->aDict as $sLanguageCode => $aDictDefinition)
|
||||
{
|
||||
if ((count($aLanguages) > 0 ) && !in_array($sLanguageCode, $aLanguages))
|
||||
{
|
||||
// skip some languages if the parameter says so
|
||||
continue;
|
||||
}
|
||||
|
||||
$oNodes = $this->GetNodeById('dictionary', $sLanguageCode, $this->oDictionaries);
|
||||
if ($oNodes->length == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user