mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-20 09:08:42 +02:00
(Retrofit from trunk) Preparing for the Hub: better decouple the RunTimeEnvironment from the list of directories to scan/install in order to support installation from the Hub.
SVN:2.4[5274]
This commit is contained in:
@@ -666,6 +666,28 @@ class iTopExtensionsMap
|
||||
($this->aExtensions[$sModuleIdToFind]->sInstalledVersion !== '') );
|
||||
}
|
||||
|
||||
/**
|
||||
* Tells if the given module name is "chosen" since it is part of a "chosen" extension (in the specified source dir)
|
||||
* @param string $sModuleNameToFind
|
||||
* @param string $sInSourceOnly
|
||||
* @return boolean
|
||||
*/
|
||||
public function ModuleIsChosenAsPartOfAnExtension($sModuleNameToFind, $sInSourceOnly = iTopExtension::SOURCE_REMOTE)
|
||||
{
|
||||
$bChosen = false;
|
||||
|
||||
foreach($this->GetAllExtensions() as $oExtension)
|
||||
{
|
||||
if (($oExtension->sSource == $sInSourceOnly) &&
|
||||
($oExtension->bMarkedAsChosen == true) &&
|
||||
(array_key_exists($sModuleNameToFind, $oExtension->aModuleVersion)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace a given set of stand-alone modules by one single "extension"
|
||||
* @param string[] $aModules
|
||||
|
||||
Reference in New Issue
Block a user