diff --git a/datamodels/2.x/itop-core-update/dictionaries/cs.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/dictionaries/cs.dict.itop-core-update.php
index 245aecdb9f..0c03734af8 100644
--- a/datamodels/2.x/itop-core-update/dictionaries/cs.dict.itop-core-update.php
+++ b/datamodels/2.x/itop-core-update/dictionaries/cs.dict.itop-core-update.php
@@ -76,6 +76,7 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
'iTopUpdate:UI:CannotUpdateUseSetup' => 'Some modified files were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
+ 'iTopUpdate:UI:CannotUpdateNewModules' => 'Some new modules were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
'iTopUpdate:UI:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
diff --git a/datamodels/2.x/itop-core-update/dictionaries/da.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/dictionaries/da.dict.itop-core-update.php
index dac4a27997..b360505631 100644
--- a/datamodels/2.x/itop-core-update/dictionaries/da.dict.itop-core-update.php
+++ b/datamodels/2.x/itop-core-update/dictionaries/da.dict.itop-core-update.php
@@ -76,6 +76,7 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
'iTopUpdate:UI:CannotUpdateUseSetup' => 'Some modified files were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
+ 'iTopUpdate:UI:CannotUpdateNewModules' => 'Some new modules were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
'iTopUpdate:UI:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
diff --git a/datamodels/2.x/itop-core-update/dictionaries/de.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/dictionaries/de.dict.itop-core-update.php
index e3e8466d4e..03f10433fb 100644
--- a/datamodels/2.x/itop-core-update/dictionaries/de.dict.itop-core-update.php
+++ b/datamodels/2.x/itop-core-update/dictionaries/de.dict.itop-core-update.php
@@ -76,6 +76,7 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
'iTopUpdate:UI:CanCoreUpdate:No' => 'Anwendungsupgrade nicht möglich: %1$s',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Vorsicht: App-Upgrade kann fehlschlagen: %1$s',
'iTopUpdate:UI:CannotUpdateUseSetup' => 'Einige angepasste Dateien wurden erkannt, eine Teil-Update kann nicht ausgeführt werden.
Befolgen Sie das Verfahren, um Ihr iTop manuell zu aktualisieren. Sie müssen das Setup benutzen, um Ihre Applikation zu aktualisieren.
',
+ 'iTopUpdate:UI:CannotUpdateNewModules' => 'Einige neue Module wurden erkannt, eine Teil-Update kann nicht ausgeführt werden.
Befolgen Sie das Verfahren, um Ihr iTop manuell zu aktualisieren. Sie müssen das Setup benutzen, um Ihre Applikation zu aktualisieren.
',
'iTopUpdate:UI:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
diff --git a/datamodels/2.x/itop-core-update/dictionaries/en.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/dictionaries/en.dict.itop-core-update.php
index 2a85f789a1..a8e6c8298c 100644
--- a/datamodels/2.x/itop-core-update/dictionaries/en.dict.itop-core-update.php
+++ b/datamodels/2.x/itop-core-update/dictionaries/en.dict.itop-core-update.php
@@ -76,6 +76,7 @@ Dict::Add('EN US', 'English', 'English', array(
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s',
'iTopUpdate:UI:CannotUpdateUseSetup' => 'Some modified files were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.',
+ 'iTopUpdate:UI:CannotUpdateNewModules' => 'Some new modules were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.',
'iTopUpdate:UI:CheckInProgress' => 'Please wait during integrity check',
diff --git a/datamodels/2.x/itop-core-update/dictionaries/es_cr.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/dictionaries/es_cr.dict.itop-core-update.php
index 9b4d59793b..5057f51af3 100644
--- a/datamodels/2.x/itop-core-update/dictionaries/es_cr.dict.itop-core-update.php
+++ b/datamodels/2.x/itop-core-update/dictionaries/es_cr.dict.itop-core-update.php
@@ -77,6 +77,7 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
'iTopUpdate:UI:CanCoreUpdate:No' => 'La aplicación no puede ser actualizada: %1$s',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Advertencia: la actualización de la aplicación puede fallar: %1$s',
'iTopUpdate:UI:CannotUpdateUseSetup' => 'Some modified files were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
+ 'iTopUpdate:UI:CannotUpdateNewModules' => 'Some new modules were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
'iTopUpdate:UI:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
diff --git a/datamodels/2.x/itop-core-update/dictionaries/fr.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/dictionaries/fr.dict.itop-core-update.php
index 1f116f3533..37fa00edc1 100644
--- a/datamodels/2.x/itop-core-update/dictionaries/fr.dict.itop-core-update.php
+++ b/datamodels/2.x/itop-core-update/dictionaries/fr.dict.itop-core-update.php
@@ -76,7 +76,8 @@ Dict::Add('FR FR', 'French', 'Français', array(
'iTopUpdate:UI:CanCoreUpdate:No' => 'L\'application ne peut pas être mise à jour : %1$s',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Attention : la mise à jour de l\'application peut échouer : %1$s',
'iTopUpdate:UI:CannotUpdateUseSetup' => 'Des fichiers modifiés ont été détectés, une mise à jour partielle ne peut pas être effectuée.
Suivez la procedure pour mettre à jour manuellement votre iTop. Vous devez utiliser la page d\'installation pour mettre à jour l\'application.',
- 'iTopUpdate:UI:CheckInProgress' => 'Veuillez patienter pendant la vérification des fichiers',
+ 'iTopUpdate:UI:CannotUpdateNewModules' => 'De nouveaux modules ont été détectés, une mise à jour partielle ne peut pas être effectuée.
Suivez la procedure pour mettre à jour manuellement votre iTop. Vous devez utiliser la page d\'installation pour mettre à jour l\'application.',
+ 'iTopUpdate:UI:CheckInProgress'=>'Veuillez patienter pendant la vérification des fichiers',
// Setup Messages
'iTopUpdate:UI:SetupMessage:Ready' => 'Prêt pour l\\installation',
diff --git a/datamodels/2.x/itop-core-update/dictionaries/hu.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/dictionaries/hu.dict.itop-core-update.php
index 172dde5a18..ef11d0293a 100644
--- a/datamodels/2.x/itop-core-update/dictionaries/hu.dict.itop-core-update.php
+++ b/datamodels/2.x/itop-core-update/dictionaries/hu.dict.itop-core-update.php
@@ -76,6 +76,7 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
'iTopUpdate:UI:CannotUpdateUseSetup' => 'Some modified files were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
+ 'iTopUpdate:UI:CannotUpdateNewModules' => 'Some new modules were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
'iTopUpdate:UI:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
diff --git a/datamodels/2.x/itop-core-update/dictionaries/it.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/dictionaries/it.dict.itop-core-update.php
index 3c1c776235..cc5e99b232 100644
--- a/datamodels/2.x/itop-core-update/dictionaries/it.dict.itop-core-update.php
+++ b/datamodels/2.x/itop-core-update/dictionaries/it.dict.itop-core-update.php
@@ -76,6 +76,7 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
'iTopUpdate:UI:CannotUpdateUseSetup' => 'Some modified files were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
+ 'iTopUpdate:UI:CannotUpdateNewModules' => 'Some new modules were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
'iTopUpdate:UI:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
diff --git a/datamodels/2.x/itop-core-update/dictionaries/ja.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/dictionaries/ja.dict.itop-core-update.php
index 0f5a4b8056..a226d1d36f 100644
--- a/datamodels/2.x/itop-core-update/dictionaries/ja.dict.itop-core-update.php
+++ b/datamodels/2.x/itop-core-update/dictionaries/ja.dict.itop-core-update.php
@@ -76,6 +76,7 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
'iTopUpdate:UI:CannotUpdateUseSetup' => 'Some modified files were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
+ 'iTopUpdate:UI:CannotUpdateNewModules' => 'Some new modules were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
'iTopUpdate:UI:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
diff --git a/datamodels/2.x/itop-core-update/dictionaries/nl.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/dictionaries/nl.dict.itop-core-update.php
index b8aa122305..76f0b5cc79 100644
--- a/datamodels/2.x/itop-core-update/dictionaries/nl.dict.itop-core-update.php
+++ b/datamodels/2.x/itop-core-update/dictionaries/nl.dict.itop-core-update.php
@@ -78,6 +78,7 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
'iTopUpdate:UI:CanCoreUpdate:No' => 'Updaten van de toepassing is niet mogelijk: %1$s',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
'iTopUpdate:UI:CannotUpdateUseSetup' => 'Some modified files were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
+ 'iTopUpdate:UI:CannotUpdateNewModules' => 'Some new modules were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
'iTopUpdate:UI:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
diff --git a/datamodels/2.x/itop-core-update/dictionaries/pt_br.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/dictionaries/pt_br.dict.itop-core-update.php
index 23f9e1620e..c94eeaff4a 100644
--- a/datamodels/2.x/itop-core-update/dictionaries/pt_br.dict.itop-core-update.php
+++ b/datamodels/2.x/itop-core-update/dictionaries/pt_br.dict.itop-core-update.php
@@ -76,6 +76,7 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
'iTopUpdate:UI:CanCoreUpdate:No' => 'Aplicação não pode ser atualizada: %1$s',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Atenção: a atualização da aplicação pode falhar: %1$s',
'iTopUpdate:UI:CannotUpdateUseSetup' => 'Some modified files were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
+ 'iTopUpdate:UI:CannotUpdateNewModules' => 'Some new modules were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
'iTopUpdate:UI:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
diff --git a/datamodels/2.x/itop-core-update/dictionaries/ru.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/dictionaries/ru.dict.itop-core-update.php
index b77889238e..2660e60bf7 100644
--- a/datamodels/2.x/itop-core-update/dictionaries/ru.dict.itop-core-update.php
+++ b/datamodels/2.x/itop-core-update/dictionaries/ru.dict.itop-core-update.php
@@ -64,6 +64,7 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
'iTopUpdate:UI:CanCoreUpdate:No' => 'Приложение не может быть обновлено: %1$s',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
'iTopUpdate:UI:CannotUpdateUseSetup' => 'Some modified files were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
+ 'iTopUpdate:UI:CannotUpdateNewModules' => 'Some new modules were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
'iTopUpdate:UI:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
diff --git a/datamodels/2.x/itop-core-update/dictionaries/sk.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/dictionaries/sk.dict.itop-core-update.php
index 83ceca4e34..c0cbbca0f6 100644
--- a/datamodels/2.x/itop-core-update/dictionaries/sk.dict.itop-core-update.php
+++ b/datamodels/2.x/itop-core-update/dictionaries/sk.dict.itop-core-update.php
@@ -76,6 +76,7 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
'iTopUpdate:UI:CannotUpdateUseSetup' => 'Some modified files were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
+ 'iTopUpdate:UI:CannotUpdateNewModules' => 'Some new modules were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
'iTopUpdate:UI:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
diff --git a/datamodels/2.x/itop-core-update/dictionaries/tr.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/dictionaries/tr.dict.itop-core-update.php
index 47777b4556..6a82278bf6 100644
--- a/datamodels/2.x/itop-core-update/dictionaries/tr.dict.itop-core-update.php
+++ b/datamodels/2.x/itop-core-update/dictionaries/tr.dict.itop-core-update.php
@@ -76,6 +76,7 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
'iTopUpdate:UI:CannotUpdateUseSetup' => 'Some modified files were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
+ 'iTopUpdate:UI:CannotUpdateNewModules' => 'Some new modules were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
'iTopUpdate:UI:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
diff --git a/datamodels/2.x/itop-core-update/dictionaries/zh_cn.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/dictionaries/zh_cn.dict.itop-core-update.php
index f4897936c5..4d06b4be3f 100644
--- a/datamodels/2.x/itop-core-update/dictionaries/zh_cn.dict.itop-core-update.php
+++ b/datamodels/2.x/itop-core-update/dictionaries/zh_cn.dict.itop-core-update.php
@@ -76,6 +76,7 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
'iTopUpdate:UI:CanCoreUpdate:No' => '应用无法升级: %1$s',
'iTopUpdate:UI:CanCoreUpdate:Warning' => '警告: 应用升级可能失败: %1$s',
'iTopUpdate:UI:CannotUpdateUseSetup' => 'Some modified files were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
+ 'iTopUpdate:UI:CannotUpdateNewModules' => 'Some new modules were detected, a partial update cannot be executed.Follow the procedure in order to manually upgrade your iTop. You must use the setup to update the application.~~',
'iTopUpdate:UI:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
diff --git a/datamodels/2.x/itop-core-update/src/Service/CoreUpdater.php b/datamodels/2.x/itop-core-update/src/Service/CoreUpdater.php
index 7a181f70e9..f69b9f86b2 100644
--- a/datamodels/2.x/itop-core-update/src/Service/CoreUpdater.php
+++ b/datamodels/2.x/itop-core-update/src/Service/CoreUpdater.php
@@ -9,6 +9,7 @@
namespace Combodo\iTop\CoreUpdate\Service;
+use Combodo\iTop\FilesInformation\Service\FileIntegrityException;
use Combodo\iTop\FilesInformation\Service\FilesIntegrity;
use DBBackup;
use Dict;
@@ -535,7 +536,11 @@ final class CoreUpdater
SetupLog::Info('itop-core-update: Archive extracted, check files integrity');
// Check files integrity
- FilesIntegrity::CheckInstallationIntegrity(self::UPDATE_DIR.'web/', true);
+ $sRootPath = self::UPDATE_DIR.'web/';
+ FilesIntegrity::CheckInstallationIntegrity($sRootPath);
+
+ ///Check new modules
+ self::CheckNewModules($sRootPath);
SetupLog::Info('itop-core-update: Files integrity OK');
} catch (Exception $e)
@@ -604,4 +609,38 @@ final class CoreUpdater
throw $e;
}
}
+
+ /**
+ * Check if new modules (not already installed) are present, and throw an exception if that is the case as core update doesn't know how to install them automatically for know
+ *
+ * @param string $sRootPath
+ *
+ * @throws \ApplicationException
+ * @since 2.7.7 3.0.1
+ */
+ private static function CheckNewModules($sRootPath)
+ {
+ $aFilesInfo = FilesIntegrity::GetInstalledFiles($sRootPath.'manifest.xml');
+
+ if ($aFilesInfo === false) {
+ throw new FileIntegrityException(Dict::Format('FilesInformation:Error:MissingFile', 'manifest.xml'));
+ }
+
+ @clearstatcache();
+ $sSourceDir = MetaModel::GetConfig()->Get('source_dir');
+ foreach ($aFilesInfo as $aFileInfo) {
+ if (strpos($aFileInfo['path'], $sSourceDir) === 0) {
+ $aFilePath = explode('/', $aFileInfo['path']);
+ $sFolderPath = $aFilePath[0].'/'.$aFilePath[1].'/'.$aFilePath[2];
+ //if module don't already exist in itop and if module listed in manifest.xml is included in zip
+ if (!is_dir(APPROOT.'/'.$sFolderPath) && !is_file(APPROOT.'/'.$sFolderPath)
+ && is_dir($sRootPath.'/'.$sFolderPath)) {
+ $sLink = utils::GetAbsoluteUrlAppRoot().'setup/';
+ $sLinkManualUpdate = 'https://www.itophub.io/wiki/page?id='.utils::GetItopVersionWikiSyntax().'%3Ainstall%3Aupgrading_itop#manually';
+ throw new FileIntegrityException(Dict::Format('iTopUpdate:UI:CannotUpdateNewModules' , $sLink, $sLinkManualUpdate));
+ }
+ }
+ // Packed with missing files...
+ }
+ }
}