diff --git a/application/ui.extkeywidget.class.inc.php b/application/ui.extkeywidget.class.inc.php
index 671d14847..4cec8e222 100644
--- a/application/ui.extkeywidget.class.inc.php
+++ b/application/ui.extkeywidget.class.inc.php
@@ -251,7 +251,7 @@ class UIExtKeyWidget
$aOption['picture_url'] = $oImage->GetDisplayURL($sClassAllowed, $oObj->GetKey(), $sObjectImageAttCode);
$aOption['initials'] = '';
} else {
- $aOption['initials'] = utils::ToAcronym($oObj->Get('friendlyname'));
+ $aOption['initials'] = utils::FormatInitialsForMedallion(utils::ToAcronym($oObj->Get('friendlyname')));
}
}
array_push($aOptions, $aOption);
@@ -829,7 +829,7 @@ JS
}
if (array_key_exists('initials', $aValue)) {
- $aElt['initials'] = $aValue['initials'];
+ $aElt['initials'] = utils::FormatInitialsForMedallion($aValue['initials']);
if (array_key_exists('picture_url', $aValue)) {
$aElt['picture_url'] = $aValue['picture_url'];
}
diff --git a/application/utils.inc.php b/application/utils.inc.php
index 556d6ffde..7f761d864 100644
--- a/application/utils.inc.php
+++ b/application/utils.inc.php
@@ -3040,6 +3040,20 @@ HTML;
return $aMentionedObjects;
}
+ /**
+ * Note: This method is not ideal, but other solutions seemed even less ideal:
+ * * Add a "$sMaxLength" param. to utils::ToAcronym(): Does not work for every use cases (see corresponding ticket) as in some parts utils::ToAcronym isn't necessarly meant to be used in a medallion.
+ *
+ * @param string $sInitials
+ *
+ * @return string Truncates $sInitials so it can fit in medallions
+ * @since 3.0.1 N°4913
+ */
+ public static function FormatInitialsForMedallion(string $sInitials): string
+ {
+ return mb_substr($sInitials, 0, 3);
+ }
+
/**
* @param $sUrl
* @param string $sParamName
diff --git a/core/config.class.inc.php b/core/config.class.inc.php
index 795f86e19..11cdaa4f6 100644
--- a/core/config.class.inc.php
+++ b/core/config.class.inc.php
@@ -1200,7 +1200,7 @@ class Config
],
'compatibility.include_deprecated_js_files' => [
'type' => 'bool',
- 'description' => 'Include the deprecated JS files to ease usage of not migrated extensions',
+ 'description' => 'Include the deprecated JS files (in iTop previous version) to ease usage of not migrated extensions',
'default' => false,
'value' => false,
'source_of_value' => '',
@@ -1216,7 +1216,7 @@ class Config
],
'compatibility.include_deprecated_css_files' => [
'type' => 'bool',
- 'description' => 'Include the deprecated CSS files to ease usage of not migrated extensions',
+ 'description' => 'Include the deprecated CSS files (in iTop previous version) to ease usage of not migrated extensions',
'default' => false,
'value' => false,
'source_of_value' => '',
diff --git a/core/dbobject.class.php b/core/dbobject.class.php
index 21704fd4f..0dc184733 100644
--- a/core/dbobject.class.php
+++ b/core/dbobject.class.php
@@ -2936,52 +2936,7 @@ abstract class DBObject implements iDisplay
}
// - TriggerOnObjectMention
- // 1 - Check if any caselog updated
- $aChanges = $this->m_aOrigValues;
- $aUpdatedLogAttCodes = array();
- foreach($aChanges as $sAttCode => $value)
- {
- $oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode);
- if($oAttDef instanceof AttributeCaseLog && $value->GetModifiedEntry() !== '')
- {
- $aUpdatedLogAttCodes[] = $sAttCode;
- }
- }
- // 2 - Find mentioned objects
- $aMentionedObjects = array();
- foreach ($aUpdatedLogAttCodes as $sAttCode) {
- /** @var \ormCaseLog $oUpdatedCaseLog */
- $oUpdatedCaseLog = $this->Get($sAttCode);
- $aMentionedObjects = array_merge_recursive($aMentionedObjects, utils::GetMentionedObjectsFromText($oUpdatedCaseLog->GetModifiedEntry()));
- }
- // 3 - Trigger for those objects
- // TODO: This should be refactored and moved into the caselogs loop, otherwise, we won't be able to know which case log triggered the action.
- foreach ($aMentionedObjects as $sMentionedClass => $aMentionedIds) {
- foreach ($aMentionedIds as $sMentionedId) {
- /** @var \DBObject $oMentionedObject */
- $oMentionedObject = MetaModel::GetObject($sMentionedClass, $sMentionedId);
- $aTriggerArgs = $this->ToArgs('this') + array('mentioned->object()' => $oMentionedObject);
-
- $aParams = array('class_list' => MetaModel::EnumParentClasses($sClass, ENUM_PARENT_CLASSES_ALL));
- $oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT TriggerOnObjectMention AS t WHERE t.target_class IN (:class_list)"), array(), $aParams);
- while ($oTrigger = $oSet->Fetch())
- {
- /** @var \TriggerOnObjectMention $oTrigger */
- try {
- // Ensure to handle only mentioned object in the trigger's scope
- if ($oTrigger->IsMentionedObjectInScope($oMentionedObject) === false) {
- continue;
- }
-
- $oTrigger->DoActivate($aTriggerArgs);
- }
- catch (Exception $e) {
- utils::EnrichRaisedException($oTrigger, $e);
- }
- }
- }
- }
-
+ $this->ActivateOnMentionTriggers(true);
return $this->m_iKey;
}
@@ -3245,50 +3200,7 @@ abstract class DBObject implements iDisplay
// Activate any existing trigger
$sClass = get_class($this);
// - TriggerOnObjectMention
- // 1 - Check if any caselog updated
- $aUpdatedLogAttCodes = array();
- foreach($aChanges as $sAttCode => $value)
- {
- $oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode);
- if($oAttDef instanceof AttributeCaseLog)
- {
- $aUpdatedLogAttCodes[] = $sAttCode;
- }
- }
- // 2 - Find mentioned objects
- $aMentionedObjects = array();
- foreach ($aUpdatedLogAttCodes as $sAttCode) {
- /** @var \ormCaseLog $oUpdatedCaseLog */
- $oUpdatedCaseLog = $this->Get($sAttCode);
- $aMentionedObjects = array_merge_recursive($aMentionedObjects, utils::GetMentionedObjectsFromText($oUpdatedCaseLog->GetModifiedEntry()));
- }
- // 3 - Trigger for those objects
- // TODO: This should be refactored and moved into the caselogs loop, otherwise, we won't be able to know which case log triggered the action.
- foreach ($aMentionedObjects as $sMentionedClass => $aMentionedIds) {
- foreach ($aMentionedIds as $sMentionedId) {
- /** @var \DBObject $oMentionedObject */
- $oMentionedObject = MetaModel::GetObject($sMentionedClass, $sMentionedId);
- $aTriggerArgs = $this->ToArgs('this') + array('mentioned->object()' => $oMentionedObject);
-
- $aParams = array('class_list' => MetaModel::EnumParentClasses($sClass, ENUM_PARENT_CLASSES_ALL));
- $oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT TriggerOnObjectMention AS t WHERE t.target_class IN (:class_list)"), array(), $aParams);
- while ($oTrigger = $oSet->Fetch())
- {
- /** @var \TriggerOnObjectMention $oTrigger */
- try {
- // Ensure to handle only mentioned object in the trigger's scope
- if ($oTrigger->IsMentionedObjectInScope($oMentionedObject) === false) {
- continue;
- }
-
- $oTrigger->DoActivate($aTriggerArgs);
- }
- catch (Exception $e) {
- utils::EnrichRaisedException($oTrigger, $e);
- }
- }
- }
- }
+ $this->ActivateOnMentionTriggers(false);
$bHasANewExternalKeyValue = false;
$aHierarchicalKeys = array();
@@ -3549,6 +3461,74 @@ abstract class DBObject implements iDisplay
return $this->Get($sAttCode);
}
+ /**
+ * Activate TriggerOnObjectMention triggers for the current object
+ *
+ * @param bool $bNewlyCreatedObject
+ *
+ * @throws \ArchivedObjectException
+ * @throws \CoreException
+ * @throws \CoreUnexpectedValue
+ * @throws \MySQLException
+ * @throws \OQLException
+ * @since 3.0.1 N°4741
+ */
+ private function ActivateOnMentionTriggers(bool $bNewlyCreatedObject): void
+ {
+ $sClass = get_class($this);
+ $aChanges = $bNewlyCreatedObject ? $this->m_aOrigValues : $this->ListChanges();
+
+ // 1 - Check if any caselog updated
+ $aUpdatedLogAttCodes = [];
+ foreach ($aChanges as $sAttCode => $value) {
+ $oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode);
+ if ($oAttDef instanceof AttributeCaseLog) {
+ // Skip empty log on creation
+ if ($bNewlyCreatedObject && $value->GetModifiedEntry() === '') {
+ continue;
+ }
+
+ $aUpdatedLogAttCodes[] = $sAttCode;
+ }
+ }
+
+ // 2 - Find mentioned objects
+ $aMentionedObjects = [];
+ foreach ($aUpdatedLogAttCodes as $sAttCode) {
+ /** @var \ormCaseLog $oUpdatedCaseLog */
+ $oUpdatedCaseLog = $this->Get($sAttCode);
+ $aMentionedObjects = array_merge_recursive($aMentionedObjects, utils::GetMentionedObjectsFromText($oUpdatedCaseLog->GetModifiedEntry()));
+ }
+
+ // 3 - Trigger for those objects
+ // TODO: This should be refactored and moved into the caselogs loop, otherwise, we won't be able to know which case log triggered the action.
+ foreach ($aMentionedObjects as $sMentionedClass => $aMentionedIds) {
+ foreach ($aMentionedIds as $sMentionedId) {
+ /** @var \DBObject $oMentionedObject */
+ $oMentionedObject = MetaModel::GetObject($sMentionedClass, $sMentionedId);
+ $aTriggerArgs = $this->ToArgs('this') + ['mentioned->object()' => $oMentionedObject];
+
+ $aParams = ['class_list' => MetaModel::EnumParentClasses($sClass, ENUM_PARENT_CLASSES_ALL)];
+ $oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT TriggerOnObjectMention AS t WHERE t.target_class IN (:class_list)"), [], $aParams);
+ while ($oTrigger = $oSet->Fetch())
+ {
+ /** @var \TriggerOnObjectMention $oTrigger */
+ try {
+ // Ensure to handle only mentioned object in the trigger's scope
+ if ($oTrigger->IsMentionedObjectInScope($oMentionedObject) === false) {
+ continue;
+ }
+
+ $oTrigger->DoActivate($aTriggerArgs);
+ }
+ catch (Exception $e) {
+ utils::EnrichRaisedException($oTrigger, $e);
+ }
+ }
+ }
+ }
+ }
+
/**
* @internal
* Save updated fields previous values for {@see DBObject::DBUpdate()} callbacks
diff --git a/css/backoffice/blocks-integrations/collapsible-section/_all.scss b/css/backoffice/blocks-integrations/collapsible-section/_all.scss
index dfec2d5ff..5f353fef2 100644
--- a/css/backoffice/blocks-integrations/collapsible-section/_all.scss
+++ b/css/backoffice/blocks-integrations/collapsible-section/_all.scss
@@ -4,4 +4,5 @@
*/
@import "collapsible-section-with-blocks";
-@import "collapsible-section-within-caselog-list";
\ No newline at end of file
+@import "collapsible-section-within-caselog-list";
+@import "collapsible-section-within-alert";
\ No newline at end of file
diff --git a/css/backoffice/blocks-integrations/collapsible-section/_collapsible-section-within-alert.scss b/css/backoffice/blocks-integrations/collapsible-section/_collapsible-section-within-alert.scss
new file mode 100644
index 000000000..62c9afab9
--- /dev/null
+++ b/css/backoffice/blocks-integrations/collapsible-section/_collapsible-section-within-alert.scss
@@ -0,0 +1,29 @@
+/*
+ * @copyright Copyright (C) 2010-2021 Combodo SARL
+ * @license http://opensource.org/licenses/AGPL-3.0
+ */
+
+/* SCSS variables */
+$ibo-caselog-entry-in-collapsible-section--body--background-color: transparentize($ibo-color-grey-100,0.5) !default;
+$ibo-caselog-entry-in-collapsible-section--body--padding: $ibo-spacing-300 !default;
+$ibo-caselog-entry-in-collapsible-section--body--color: $ibo-color-grey-900 !default;
+
+/* - caselog display in ormcaselog */
+.ibo-alert--body {
+ .ibo-collapsible-section {
+ margin: 0;
+ min-width: 22em;
+
+ .ibo-collapsible-section--header .ibo-collapsible-section--title {
+ @extend %ibo-font-size-100;
+ }
+
+ .ibo-collapsible-section--body {
+ @extend %ibo-font-size-100;
+ color: $ibo-caselog-entry-in-collapsible-section--body--color;
+ padding: $ibo-caselog-entry-in-collapsible-section--body--padding;
+ background-color: $ibo-caselog-entry-in-collapsible-section--body--background-color;
+ }
+ }
+}
+
\ No newline at end of file
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 a20e94716..245aecdb9 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
@@ -75,7 +75,8 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Application can be updated~~',
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
- 'iTopUpdate:UI:CannotUpdateUseSetup' => 'You must use the setup to update the application.
Some modified files were detected, a partial update cannot be executed.~~',
+ '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:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
'iTopUpdate:UI:SetupMessage:Ready' => 'Ready to start~~',
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 ea8504ea7..dac4a2799 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
@@ -75,7 +75,8 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Application can be updated~~',
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
- 'iTopUpdate:UI:CannotUpdateUseSetup' => 'You must use the setup to update the application.
Some modified files were detected, a partial update cannot be executed.~~',
+ '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:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
'iTopUpdate:UI:SetupMessage:Ready' => 'Ready to start~~',
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 d28ad4594..5eb796ee2 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
@@ -75,7 +75,8 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Anwendungsupgrade kann durchgeführt werden',
'iTopUpdate:UI:CanCoreUpdate:No' => 'Anwendungsupgrade nicht möglich: %1$s',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Vorsicht: App-Upgrade kann fehlerschlagen: %1$s',
- 'iTopUpdate:UI:CannotUpdateUseSetup' => 'Sie müssen das Setup benutzen, um Ihre Applikation zu aktualisieren.
Einige angepasste Dateien wurden erkannt, eine Teil-Update kann nicht ausgeführt werden.',
+ '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:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
'iTopUpdate:UI:SetupMessage:Ready' => 'Bereit zum Upgrade',
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 a38355187..2a85f789a 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
@@ -75,7 +75,10 @@ Dict::Add('EN US', 'English', 'English', array(
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Application can be updated',
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s',
- 'iTopUpdate:UI:CannotUpdateUseSetup' => 'You must use the setup to update the application.
Some modified files were detected, a partial update cannot be executed.',
+ '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:CheckInProgress' => 'Please wait during integrity check',
+
+
// Setup Messages
'iTopUpdate:UI:SetupMessage:Ready' => 'Ready to start',
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 e85b3c3cb..9b4d59793 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
@@ -76,7 +76,8 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'La aplicación puede ser actualizada',
'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' => 'You must use the setup to update the application.
Some modified files were detected, a partial update cannot be executed.~~',
+ '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:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
'iTopUpdate:UI:SetupMessage:Ready' => 'Listo para empezar',
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 ef1cf6c22..1f116f353 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
@@ -75,7 +75,8 @@ Dict::Add('FR FR', 'French', 'Français', array(
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'L\'application peut être mise à jour',
'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' => 'Vous devez utiliser la page d\'installation pour mettre à jour l\'application.
Des fichiers modifiés ont été détectés, une mise à jour partielle ne peut pas être effectuée.',
+ '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',
// 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 4e7b585e3..172dde5a1 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
@@ -75,7 +75,8 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Application can be updated~~',
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
- 'iTopUpdate:UI:CannotUpdateUseSetup' => 'You must use the setup to update the application.
Some modified files were detected, a partial update cannot be executed.~~',
+ '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:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
'iTopUpdate:UI:SetupMessage:Ready' => 'Ready to start~~',
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 9bbe0f5bc..3c1c77623 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
@@ -75,7 +75,8 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Application can be updated~~',
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
- 'iTopUpdate:UI:CannotUpdateUseSetup' => 'You must use the setup to update the application.
Some modified files were detected, a partial update cannot be executed.~~',
+ '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:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
'iTopUpdate:UI:SetupMessage:Ready' => 'Ready to start~~',
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 03a756a17..0f5a4b805 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
@@ -75,7 +75,8 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Application can be updated~~',
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
- 'iTopUpdate:UI:CannotUpdateUseSetup' => 'You must use the setup to update the application.
Some modified files were detected, a partial update cannot be executed.~~',
+ '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:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
'iTopUpdate:UI:SetupMessage:Ready' => 'Ready to start~~',
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 2cc718093..b8aa12230 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
@@ -77,7 +77,8 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Updaten van toepassing is mogelijk',
'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' => 'You must use the setup to update the application.
Some modified files were detected, a partial update cannot be executed.~~',
+ '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:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
'iTopUpdate:UI:SetupMessage:Ready' => 'Klaar om verder te gaan',
diff --git a/datamodels/2.x/itop-core-update/dictionaries/pl.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/dictionaries/pl.dict.itop-core-update.php
index d0b9dc3f3..bb161dcdb 100644
--- a/datamodels/2.x/itop-core-update/dictionaries/pl.dict.itop-core-update.php
+++ b/datamodels/2.x/itop-core-update/dictionaries/pl.dict.itop-core-update.php
@@ -75,7 +75,8 @@ Dict::Add('PL PL', 'Polish', 'Polski', array(
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Aplikacja może być zaktualizowana',
'iTopUpdate:UI:CanCoreUpdate:No' => 'Nie można zaktualizować aplikacji: %1$s',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Ostrzeżenie: aktualizacja aplikacji może się nie powieść: %1$s',
- 'iTopUpdate:UI:CannotUpdateUseSetup' => 'Aby zaktualizować aplikację, musisz skorzystać ze strony setup.
Wykryto niektóre zmodyfikowane pliki, częściowej aktualizacji nie można przeprowadzić.',
+ '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:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
'iTopUpdate:UI:SetupMessage:Ready' => 'Gotowy do startu',
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 db6257f9c..23f9e1620 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
@@ -75,7 +75,8 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Aplicação pode ser atualizada',
'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' => 'You must use the setup to update the application.
Some modified files were detected, a partial update cannot be executed.~~',
+ '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:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
'iTopUpdate:UI:SetupMessage:Ready' => 'Pronto para começar',
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 fa97f9e43..b77889238 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
@@ -63,7 +63,8 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Приложение может быть обновлено',
'iTopUpdate:UI:CanCoreUpdate:No' => 'Приложение не может быть обновлено: %1$s',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
- 'iTopUpdate:UI:CannotUpdateUseSetup' => 'You must use the setup to update the application.
Some modified files were detected, a partial update cannot be executed.~~',
+ '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:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
'iTopUpdate:UI:SetupMessage:Ready' => 'Всё готово к началу',
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 95cefcfa0..83ceca4e3 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
@@ -75,7 +75,8 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Application can be updated~~',
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
- 'iTopUpdate:UI:CannotUpdateUseSetup' => 'You must use the setup to update the application.
Some modified files were detected, a partial update cannot be executed.~~',
+ '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:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
'iTopUpdate:UI:SetupMessage:Ready' => 'Ready to start~~',
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 d71834279..47777b455 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
@@ -75,7 +75,8 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Application can be updated~~',
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
- 'iTopUpdate:UI:CannotUpdateUseSetup' => 'You must use the setup to update the application.
Some modified files were detected, a partial update cannot be executed.~~',
+ '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:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
'iTopUpdate:UI:SetupMessage:Ready' => 'Ready to start~~',
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 c6136c213..f4897936c 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
@@ -75,7 +75,8 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
'iTopUpdate:UI:CanCoreUpdate:Yes' => '应用无法升级',
'iTopUpdate:UI:CanCoreUpdate:No' => '应用无法升级: %1$s',
'iTopUpdate:UI:CanCoreUpdate:Warning' => '警告: 应用升级可能失败: %1$s',
- 'iTopUpdate:UI:CannotUpdateUseSetup' => '您必须使用 安装向导 来升级应用.
已检测到部分文件被修改, 无法执行部分升级.',
+ '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:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
'iTopUpdate:UI:SetupMessage:Ready' => '准备开始',
diff --git a/datamodels/2.x/itop-core-update/src/Controller/AjaxController.php b/datamodels/2.x/itop-core-update/src/Controller/AjaxController.php
index ac4ee29b2..11a1f7dbb 100644
--- a/datamodels/2.x/itop-core-update/src/Controller/AjaxController.php
+++ b/datamodels/2.x/itop-core-update/src/Controller/AjaxController.php
@@ -38,7 +38,9 @@ class AjaxController extends Controller
else
{
$sLink = utils::GetAbsoluteUrlAppRoot().'setup/';
- $aParams['sMessage'] = Dict::Format('iTopUpdate:UI:CannotUpdateUseSetup', $sLink);
+ $sLinkManualUpdate = 'https://www.itophub.io/wiki/page?id='.utils::GetItopVersionWikiSyntax().'%3Ainstall%3Aupgrading_itop#manually';
+ $aParams['sMessage'] = Dict::Format('iTopUpdate:UI:CannotUpdateUseSetup', $sLink, $sLinkManualUpdate);
+ $aParams['sMessageDetails'] = $sMessage;
}
} catch (FileNotExistException $e)
{
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 276289cf6..7a181f70e 100644
--- a/datamodels/2.x/itop-core-update/src/Service/CoreUpdater.php
+++ b/datamodels/2.x/itop-core-update/src/Service/CoreUpdater.php
@@ -535,7 +535,7 @@ final class CoreUpdater
SetupLog::Info('itop-core-update: Archive extracted, check files integrity');
// Check files integrity
- FilesIntegrity::CheckInstallationIntegrity(self::UPDATE_DIR.'web/');
+ FilesIntegrity::CheckInstallationIntegrity(self::UPDATE_DIR.'web/', true);
SetupLog::Info('itop-core-update: Files integrity OK');
} catch (Exception $e)
diff --git a/datamodels/2.x/itop-core-update/view/SelectUpdateFile.html.twig b/datamodels/2.x/itop-core-update/view/SelectUpdateFile.html.twig
index c109287a7..6ffaea734 100644
--- a/datamodels/2.x/itop-core-update/view/SelectUpdateFile.html.twig
+++ b/datamodels/2.x/itop-core-update/view/SelectUpdateFile.html.twig
@@ -15,6 +15,10 @@
{{ 'iTopUpdate:UI:CanCoreUpdate:Loading'|dict_s }}
{% UISpinner Standard {} %}
{% EndUIContentBlock %}
+ {%UICollapsibleSection Standard {'sId':'header-requirements-details','sTitle':'UI:Details+'|dict_s, 'IsCollapsible':true, 'IsClosable':false,'AddCSSClass':'ibo-is-hidden'} %}
+ {% UIContentBlock Standard {'aContainerClasses':['ibo-update-core-header-requirements'], 'sId':'can-core-update-details'} %}
+ {% EndUIContentBlock %}
+ {% EndUICollapsibleSection %}
{% EndUIAlert %}
{% UIField Standard {'sLabel':'iTopUpdate:UI:CurrentVersion'|dict_s} %}
@@ -56,7 +60,11 @@
{% EndUIContentBlock %}
{% EndUIAlert %}
- {% UIFileSelect Standard {sName: 'file', sId: 'file'} %}
+ {% UIAlert ForInformation {'sId':'check-in-progress', 'IsHidden':false} %}
+ {{ 'iTopUpdate:UI:CheckInProgress'|dict_s }}
+ {% EndUIAlert %}
+
+ {% UIFileSelect Standard {sName: 'file', sId: 'file','AddCSSClass':'ibo-is-hidden'} %}
{% UIAlert ForWarning {'sId':'dobackup-warning', 'IsHidden':true} %}
{{ 'iTopUpdate:UI:DoBackup:Warning'|dict_s }}
diff --git a/datamodels/2.x/itop-core-update/view/SelectUpdateFile.ready.js.twig b/datamodels/2.x/itop-core-update/view/SelectUpdateFile.ready.js.twig
index d1cc995a9..dbffbb97c 100644
--- a/datamodels/2.x/itop-core-update/view/SelectUpdateFile.ready.js.twig
+++ b/datamodels/2.x/itop-core-update/view/SelectUpdateFile.ready.js.twig
@@ -14,9 +14,17 @@ $.ajax({
var oRequirements = $("#header-requirements");
var oCanCoreUpdate = $("#can-core-update");
oCanCoreUpdate.html(data.sMessage);
+ if(data.sMessageDetails){
+ $("#header-requirements-details").removeClass("ibo-is-hidden");
+ $('#can-core-update-details').html(data.sMessageDetails);
+ }
oRequirements.removeClass("ibo-is-information");
if (data.bStatus) {
oRequirements.addClass("ibo-is-success");
+ $("#check-update").prop("disabled", false);
+ $("#file").prop("disabled", false);
+ $("#file-container").removeClass("ibo-is-hidden");
+ $("#check-in-progress").addClass("ibo-is-hidden");
} else {
$("#check-update").prop("disabled", true);
$("#file").prop("disabled", true);
diff --git a/datamodels/2.x/itop-files-information/dictionaries/cs.dict.itop-files-information.php b/datamodels/2.x/itop-files-information/dictionaries/cs.dict.itop-files-information.php
index 727c5f7db..3f0f5c75b 100644
--- a/datamodels/2.x/itop-files-information/dictionaries/cs.dict.itop-files-information.php
+++ b/datamodels/2.x/itop-files-information/dictionaries/cs.dict.itop-files-information.php
@@ -25,6 +25,7 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
'FilesInformation:Error:MissingFile' => 'Missing file: %1$s~~',
'FilesInformation:Error:CorruptedFile' => 'File %1$s is corrupted~~',
'FilesInformation:Error:CantWriteToFile' => 'Can not write to file %1$s~~',
+ 'FilesInformation:Error: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.~~',
));
diff --git a/datamodels/2.x/itop-files-information/dictionaries/da.dict.itop-files-information.php b/datamodels/2.x/itop-files-information/dictionaries/da.dict.itop-files-information.php
index 7937f9341..1ab48d49b 100644
--- a/datamodels/2.x/itop-files-information/dictionaries/da.dict.itop-files-information.php
+++ b/datamodels/2.x/itop-files-information/dictionaries/da.dict.itop-files-information.php
@@ -25,6 +25,7 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
'FilesInformation:Error:MissingFile' => 'Missing file: %1$s~~',
'FilesInformation:Error:CorruptedFile' => 'File %1$s is corrupted~~',
'FilesInformation:Error:CantWriteToFile' => 'Can not write to file %1$s~~',
+ 'FilesInformation:Error: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.~~',
));
diff --git a/datamodels/2.x/itop-files-information/dictionaries/de.dict.itop-files-information.php b/datamodels/2.x/itop-files-information/dictionaries/de.dict.itop-files-information.php
index d5937343b..ba6a42ac2 100644
--- a/datamodels/2.x/itop-files-information/dictionaries/de.dict.itop-files-information.php
+++ b/datamodels/2.x/itop-files-information/dictionaries/de.dict.itop-files-information.php
@@ -25,6 +25,8 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
'FilesInformation:Error:MissingFile' => 'Fehlende Datei: %1$s',
'FilesInformation:Error:CorruptedFile' => 'Datei %1$s ist beschädigt',
'FilesInformation:Error:CantWriteToFile' => 'Datei %1$s kann nicht geschrieben werden',
+ 'FilesInformation:Error: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.
',
+
));
diff --git a/datamodels/2.x/itop-files-information/dictionaries/en.dict.itop-files-information.php b/datamodels/2.x/itop-files-information/dictionaries/en.dict.itop-files-information.php
index 111db1404..bbf2dac67 100644
--- a/datamodels/2.x/itop-files-information/dictionaries/en.dict.itop-files-information.php
+++ b/datamodels/2.x/itop-files-information/dictionaries/en.dict.itop-files-information.php
@@ -26,6 +26,7 @@ Dict::Add('EN US', 'English', 'English', array(
'FilesInformation:Error:MissingFile' => 'Missing file: %1$s',
'FilesInformation:Error:CorruptedFile' => 'File %1$s is corrupted',
'FilesInformation:Error:CantWriteToFile' => 'Can not write to file %1$s',
+ 'FilesInformation:Error: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.',
));
diff --git a/datamodels/2.x/itop-files-information/dictionaries/es_cr.dict.itop-files-information.php b/datamodels/2.x/itop-files-information/dictionaries/es_cr.dict.itop-files-information.php
index 49c8848a7..2faa1fd97 100644
--- a/datamodels/2.x/itop-files-information/dictionaries/es_cr.dict.itop-files-information.php
+++ b/datamodels/2.x/itop-files-information/dictionaries/es_cr.dict.itop-files-information.php
@@ -26,6 +26,7 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
'FilesInformation:Error:MissingFile' => 'Archivo faltante: %1$s',
'FilesInformation:Error:CorruptedFile' => 'El archivo %1$s está corrupto',
'FilesInformation:Error:CantWriteToFile' => 'No se puede escribir al archivo %1$s',
+ 'FilesInformation:Error: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.~~',
));
diff --git a/datamodels/2.x/itop-files-information/dictionaries/fr.dict.itop-files-information.php b/datamodels/2.x/itop-files-information/dictionaries/fr.dict.itop-files-information.php
index b8c33835a..60c6af913 100644
--- a/datamodels/2.x/itop-files-information/dictionaries/fr.dict.itop-files-information.php
+++ b/datamodels/2.x/itop-files-information/dictionaries/fr.dict.itop-files-information.php
@@ -25,6 +25,8 @@ Dict::Add('FR FR', 'French', 'Français', array(
'FilesInformation:Error:MissingFile' => 'Ficher manquant : %1$s',
'FilesInformation:Error:CorruptedFile' => 'Le fichier %1$s est corrompu',
'FilesInformation:Error:CantWriteToFile' => 'Impossible de modifier le fichier %1$s',
+ 'FilesInformation:Error: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.',
+
));
diff --git a/datamodels/2.x/itop-files-information/dictionaries/hu.dict.itop-files-information.php b/datamodels/2.x/itop-files-information/dictionaries/hu.dict.itop-files-information.php
index e2a97b9eb..60528771c 100644
--- a/datamodels/2.x/itop-files-information/dictionaries/hu.dict.itop-files-information.php
+++ b/datamodels/2.x/itop-files-information/dictionaries/hu.dict.itop-files-information.php
@@ -25,6 +25,7 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
'FilesInformation:Error:MissingFile' => 'Missing file: %1$s~~',
'FilesInformation:Error:CorruptedFile' => 'File %1$s is corrupted~~',
'FilesInformation:Error:CantWriteToFile' => 'Can not write to file %1$s~~',
+ 'FilesInformation:Error: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.~~',
));
diff --git a/datamodels/2.x/itop-files-information/dictionaries/it.dict.itop-files-information.php b/datamodels/2.x/itop-files-information/dictionaries/it.dict.itop-files-information.php
index 7f4151ce7..4fb5670c1 100644
--- a/datamodels/2.x/itop-files-information/dictionaries/it.dict.itop-files-information.php
+++ b/datamodels/2.x/itop-files-information/dictionaries/it.dict.itop-files-information.php
@@ -25,6 +25,7 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
'FilesInformation:Error:MissingFile' => 'Missing file: %1$s~~',
'FilesInformation:Error:CorruptedFile' => 'File %1$s is corrupted~~',
'FilesInformation:Error:CantWriteToFile' => 'Can not write to file %1$s~~',
+ 'FilesInformation:Error: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.~~',
));
diff --git a/datamodels/2.x/itop-files-information/dictionaries/ja.dict.itop-files-information.php b/datamodels/2.x/itop-files-information/dictionaries/ja.dict.itop-files-information.php
index 1a166e4ed..18a46d644 100644
--- a/datamodels/2.x/itop-files-information/dictionaries/ja.dict.itop-files-information.php
+++ b/datamodels/2.x/itop-files-information/dictionaries/ja.dict.itop-files-information.php
@@ -25,6 +25,7 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
'FilesInformation:Error:MissingFile' => 'Missing file: %1$s~~',
'FilesInformation:Error:CorruptedFile' => 'File %1$s is corrupted~~',
'FilesInformation:Error:CantWriteToFile' => 'Can not write to file %1$s~~',
+ 'FilesInformation:Error: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.~~',
));
diff --git a/datamodels/2.x/itop-files-information/dictionaries/nl.dict.itop-files-information.php b/datamodels/2.x/itop-files-information/dictionaries/nl.dict.itop-files-information.php
index f617386f3..6afda2893 100644
--- a/datamodels/2.x/itop-files-information/dictionaries/nl.dict.itop-files-information.php
+++ b/datamodels/2.x/itop-files-information/dictionaries/nl.dict.itop-files-information.php
@@ -27,6 +27,7 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
'FilesInformation:Error:MissingFile' => 'Ontbrekend bestand: %1$s',
'FilesInformation:Error:CorruptedFile' => 'Corrupt bestand: %1$s',
'FilesInformation:Error:CantWriteToFile' => 'Kan niet schrijven naar bestand %1$s',
+ 'FilesInformation:Error: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.~~',
));
diff --git a/datamodels/2.x/itop-files-information/dictionaries/pl.dict.itop-files-information.php b/datamodels/2.x/itop-files-information/dictionaries/pl.dict.itop-files-information.php
index e641351a1..592518043 100644
--- a/datamodels/2.x/itop-files-information/dictionaries/pl.dict.itop-files-information.php
+++ b/datamodels/2.x/itop-files-information/dictionaries/pl.dict.itop-files-information.php
@@ -1,31 +1,32 @@
-
- */
-
-Dict::Add('PL PL', 'Polish', 'Polski', array(
- // Errors
- 'FilesInformation:Error:MissingFile' => 'Brakujący plik: %1$s',
- 'FilesInformation:Error:CorruptedFile' => 'Plik %1$s jest uszkodzony',
- 'FilesInformation:Error:CantWriteToFile' => 'Nie można zapisać do pliku %1$s',
-));
-
-
+
+ */
+
+Dict::Add('PL PL', 'Polish', 'Polski', array(
+ // Errors
+ 'FilesInformation:Error:MissingFile' => 'Brakujący plik: %1$s',
+ 'FilesInformation:Error:CorruptedFile' => 'Plik %1$s jest uszkodzony',
+ 'FilesInformation:Error:CantWriteToFile' => 'Nie można zapisać do pliku %1$s',
+ 'FilesInformation:Error: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.~~',
+));
+
+
diff --git a/datamodels/2.x/itop-files-information/dictionaries/pt_br.dict.itop-files-information.php b/datamodels/2.x/itop-files-information/dictionaries/pt_br.dict.itop-files-information.php
index 9c2413522..f0d928866 100644
--- a/datamodels/2.x/itop-files-information/dictionaries/pt_br.dict.itop-files-information.php
+++ b/datamodels/2.x/itop-files-information/dictionaries/pt_br.dict.itop-files-information.php
@@ -25,6 +25,7 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
'FilesInformation:Error:MissingFile' => 'Faltando arquivo: %1$s',
'FilesInformation:Error:CorruptedFile' => 'Arquivo %1$s está corrompido',
'FilesInformation:Error:CantWriteToFile' => 'Sem permissão de escrita no arquivo %1$s',
+ 'FilesInformation:Error: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.~~',
));
diff --git a/datamodels/2.x/itop-files-information/dictionaries/ru.dict.itop-files-information.php b/datamodels/2.x/itop-files-information/dictionaries/ru.dict.itop-files-information.php
index bf07888dd..cf4fe9492 100644
--- a/datamodels/2.x/itop-files-information/dictionaries/ru.dict.itop-files-information.php
+++ b/datamodels/2.x/itop-files-information/dictionaries/ru.dict.itop-files-information.php
@@ -13,6 +13,7 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
'FilesInformation:Error:MissingFile' => 'Файл %1$s отсутствует',
'FilesInformation:Error:CorruptedFile' => 'Файл %1$s повреждён',
'FilesInformation:Error:CantWriteToFile' => 'Невозможно выполнить запись в файл %1$s',
+ 'FilesInformation:Error: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.~~',
));
diff --git a/datamodels/2.x/itop-files-information/dictionaries/sk.dict.itop-files-information.php b/datamodels/2.x/itop-files-information/dictionaries/sk.dict.itop-files-information.php
index 0b1ff22fe..34298f121 100644
--- a/datamodels/2.x/itop-files-information/dictionaries/sk.dict.itop-files-information.php
+++ b/datamodels/2.x/itop-files-information/dictionaries/sk.dict.itop-files-information.php
@@ -25,6 +25,7 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
'FilesInformation:Error:MissingFile' => 'Missing file: %1$s~~',
'FilesInformation:Error:CorruptedFile' => 'File %1$s is corrupted~~',
'FilesInformation:Error:CantWriteToFile' => 'Can not write to file %1$s~~',
+ 'FilesInformation:Error: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.~~',
));
diff --git a/datamodels/2.x/itop-files-information/dictionaries/tr.dict.itop-files-information.php b/datamodels/2.x/itop-files-information/dictionaries/tr.dict.itop-files-information.php
index 588f7e263..3b01ce8f8 100644
--- a/datamodels/2.x/itop-files-information/dictionaries/tr.dict.itop-files-information.php
+++ b/datamodels/2.x/itop-files-information/dictionaries/tr.dict.itop-files-information.php
@@ -25,6 +25,7 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
'FilesInformation:Error:MissingFile' => 'Missing file: %1$s~~',
'FilesInformation:Error:CorruptedFile' => 'File %1$s is corrupted~~',
'FilesInformation:Error:CantWriteToFile' => 'Can not write to file %1$s~~',
+ 'FilesInformation:Error: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.~~',
));
diff --git a/datamodels/2.x/itop-files-information/dictionaries/zh_cn.dict.itop-files-information.php b/datamodels/2.x/itop-files-information/dictionaries/zh_cn.dict.itop-files-information.php
index 83e0b76bf..d2103f3cb 100644
--- a/datamodels/2.x/itop-files-information/dictionaries/zh_cn.dict.itop-files-information.php
+++ b/datamodels/2.x/itop-files-information/dictionaries/zh_cn.dict.itop-files-information.php
@@ -25,6 +25,7 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
'FilesInformation:Error:MissingFile' => '文件丢失: %1$s~~',
'FilesInformation:Error:CorruptedFile' => '文件 %1$s 已损坏',
'FilesInformation:Error:CantWriteToFile' => '文件 %1$s 无法写入',
+ 'FilesInformation:Error: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.~~',
));
diff --git a/datamodels/2.x/itop-files-information/src/Service/FilesIntegrity.php b/datamodels/2.x/itop-files-information/src/Service/FilesIntegrity.php
index 8f2a4a6e7..fa40d3ca9 100644
--- a/datamodels/2.x/itop-files-information/src/Service/FilesIntegrity.php
+++ b/datamodels/2.x/itop-files-information/src/Service/FilesIntegrity.php
@@ -13,6 +13,8 @@ use DOMDocument;
use DOMElement;
use DOMNode;
use DOMXPath;
+use MetaModel;
+use utils;
class FilesIntegrity
{
@@ -79,10 +81,12 @@ class FilesIntegrity
* Check that files present in iTop folder corresponds to the manifest
*
* @param string $sRootPath
+ * @param bool $bCheckNewModule
*
* @throws \Combodo\iTop\FilesInformation\Service\FileIntegrityException
+ * @since 3.0.1 Add $bCheckNewModule parameter
*/
- public static function CheckInstallationIntegrity($sRootPath = APPROOT)
+ public static function CheckInstallationIntegrity($sRootPath = APPROOT, $bCheckNewModule = false)
{
$aFilesInfo = FilesIntegrity::GetInstalledFiles($sRootPath.'manifest.xml');
@@ -92,6 +96,7 @@ class FilesIntegrity
}
@clearstatcache();
+ $sSourceDir = MetaModel::GetConfig()->Get('source_dir');
foreach ($aFilesInfo as $aFileInfo)
{
$sFile = $sRootPath.$aFileInfo['path'];
@@ -106,6 +111,15 @@ class FilesIntegrity
throw new FileIntegrityException(Dict::Format('FilesInformation:Error:CorruptedFile', $sFile));
}
}
+ if($bCheckNewModule && strpos($aFileInfo['path'],$sSourceDir) === 0){
+ $aFilePath = explode('/',$aFileInfo['path']);
+ $sFolderPath = $aFilePath[0].'/'.$aFilePath[1].'/'.$aFilePath[2];
+ if (is_dir(APPROOT.'/'.$sFolderPath) && !is_file($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('FilesInformation:Error:CannotUpdateNewModules', $sLink, $sLinkManualUpdate));
+ }
+ }
// Packed with missing files...
}
}
diff --git a/datamodels/2.x/itop-themes-compat/module.itop-themes-compat.php b/datamodels/2.x/itop-themes-compat/module.itop-themes-compat.php
index 056e0714f..e226b1dea 100644
--- a/datamodels/2.x/itop-themes-compat/module.itop-themes-compat.php
+++ b/datamodels/2.x/itop-themes-compat/module.itop-themes-compat.php
@@ -47,6 +47,3 @@ SetupWebPage::AddModule(
),
)
);
-
-
-?>
diff --git a/dictionaries/cs.dictionary.itop.ui.php b/dictionaries/cs.dictionary.itop.ui.php
index 5b66682df..a07a6364b 100755
--- a/dictionaries/cs.dictionary.itop.ui.php
+++ b/dictionaries/cs.dictionary.itop.ui.php
@@ -368,7 +368,14 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
');
$oPage->add('.')