Bug fixes:

- properly detect missing dependencies when deploying extensions from the Hub (and not only when deploying a 2nd time an extension, cf bug n°1284).
- setup hangs when upgrading to 2.4.1 with some "old" extensions in the "extensions" folder.

SVN:trunk[5290]
This commit is contained in:
Denis Flaven
2018-01-23 10:37:50 +00:00
parent 93526c8a44
commit 63ba267da0
3 changed files with 32 additions and 22 deletions

View File

@@ -11,12 +11,13 @@ function DisplayStatus(WebPage $oPage)
$oPage->add('<div class="module-selection-body">');
// Now scan the extensions and display a report of the extensions brought by the hub
$oExtensionsMap = new iTopExtensionsMap();
$sPath = APPROOT.'data/downloaded-extensions/';
$aExtraDirs = array();
if (is_dir($sPath))
{
$oExtensionsMap->ReadDir($sPath, iTopExtension::SOURCE_REMOTE); // Also read the extra downloaded-modules directory
$aExtraDirs[] = $sPath; // Also read the extra downloaded-modules directory
}
$oExtensionsMap = new iTopExtensionsMap('production', true, $aExtraDirs);
$oExtensionsMap->LoadChoicesFromDatabase(MetaModel::GetConfig());
foreach($oExtensionsMap->GetAllExtensions() as $oExtension)
@@ -157,10 +158,14 @@ function DoInstall(WebPage $oPage)
// Now scan the extensions and display a report of the extensions brought by the hub
$oExtensionsMap = new iTopExtensionsMap();
$oExtensionsMap->NormalizeOldExtensions(iTopExtension::SOURCE_REMOTE);
// Now scan the extensions and display a report of the extensions brought by the hub
$sPath = APPROOT.'data/downloaded-extensions/';
$oExtensionsMap->ReadDir($sPath, iTopExtension::SOURCE_REMOTE); // Also read the extra downloaded-extensions directory
$aExtraDirs = array();
if (is_dir($sPath))
{
$aExtraDirs[] = $sPath; // Also read the extra downloaded-modules directory
}
$oExtensionsMap = new iTopExtensionsMap('production', true, $aExtraDirs);
$oExtensionsMap->LoadChoicesFromDatabase(MetaModel::GetConfig());
foreach($oExtensionsMap->GetAllExtensions() as $oExtension)