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(
  • Spravovat Vaše nejdůležitější IT aktivum - Dokumentaci.
  • ', - 'UI:WelcomeMenu:Text'=> '~~', + 'UI:WelcomeMenu:Text'=> '
    Congratulations, you landed on '.ITOP_APPLICATION.' '.ITOP_VERSION_NAME.'!
    + +
    This version features a brand new modern and accessible backoffice design.
    + +
    We kept '.ITOP_APPLICATION.' core functions that you liked and modernized them to make you love them. +We hope you’ll enjoy this version as much as we enjoyed imagining and creating it.
    + +
    Customize your '.ITOP_APPLICATION.' preferences for a personalized experience.
    ~~', 'UI:WelcomeMenu:AllOpenRequests' => 'Otevřené požadavky: %1$d', 'UI:WelcomeMenu:MyCalls' => 'Mé požadavky', 'UI:WelcomeMenu:OpenIncidents' => 'Otevřené incidenty: %1$d', diff --git a/dictionaries/da.dictionary.itop.ui.php b/dictionaries/da.dictionary.itop.ui.php index a3a209ad3..4c0fb5501 100644 --- a/dictionaries/da.dictionary.itop.ui.php +++ b/dictionaries/da.dictionary.itop.ui.php @@ -357,7 +357,14 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
  • Manage the most important asset of your IT: Documentation.
  • ~~', - 'UI:WelcomeMenu:Text'=> '~~', + 'UI:WelcomeMenu:Text'=> '
    Congratulations, you landed on '.ITOP_APPLICATION.' '.ITOP_VERSION_NAME.'!
    + +
    This version features a brand new modern and accessible backoffice design.
    + +
    We kept '.ITOP_APPLICATION.' core functions that you liked and modernized them to make you love them. +We hope you’ll enjoy this version as much as we enjoyed imagining and creating it.
    + +
    Customize your '.ITOP_APPLICATION.' preferences for a personalized experience.
    ~~', 'UI:WelcomeMenu:AllOpenRequests' => 'Åbne anmodninger: %1$d', 'UI:WelcomeMenu:MyCalls' => 'Mine brugerhenvendelser', 'UI:WelcomeMenu:OpenIncidents' => 'Åbne Incidents: %1$d', diff --git a/dictionaries/de.dictionary.itop.ui.php b/dictionaries/de.dictionary.itop.ui.php index 5ff7bda75..d69780ae8 100644 --- a/dictionaries/de.dictionary.itop.ui.php +++ b/dictionaries/de.dictionary.itop.ui.php @@ -357,7 +357,14 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
  • und ein besseres Verwalten des wichtigsten Bestandteiles Ihrer IT: der Dokumentation.
  • ', - 'UI:WelcomeMenu:Text'=> 'Willkommen bei '.ITOP_APPLICATION_SHORT, + 'UI:WelcomeMenu:Text'=> '
    Willkommen bei '.ITOP_APPLICATION.' '.ITOP_VERSION_NAME.'!
    + +
    This version features a brand new modern and accessible backoffice design.
    + +
    We kept '.ITOP_APPLICATION.' core functions that you liked and modernized them to make you love them. +We hope you’ll enjoy this version as much as we enjoyed imagining and creating it.
    + +
    Customize your '.ITOP_APPLICATION.' preferences for a personalized experience.
    ~~', 'UI:WelcomeMenu:AllOpenRequests' => 'Offene Requests: %1$d', 'UI:WelcomeMenu:MyCalls' => 'An mich gestellte Benutzeranfragen', 'UI:WelcomeMenu:OpenIncidents' => 'Offene Incidents: %1$d', diff --git a/dictionaries/es_cr.dictionary.itop.ui.php b/dictionaries/es_cr.dictionary.itop.ui.php index 476df0c22..7baa808cf 100644 --- a/dictionaries/es_cr.dictionary.itop.ui.php +++ b/dictionaries/es_cr.dictionary.itop.ui.php @@ -369,7 +369,14 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
  • Administrar el bien más importante de su infraestructura de TI: La Documentación.
  • ', - 'UI:WelcomeMenu:Text'=> '~~', + 'UI:WelcomeMenu:Text'=> '
    Congratulations, you landed on '.ITOP_APPLICATION.' '.ITOP_VERSION_NAME.'!
    + +
    This version features a brand new modern and accessible backoffice design.
    + +
    We kept '.ITOP_APPLICATION.' core functions that you liked and modernized them to make you love them. +We hope you’ll enjoy this version as much as we enjoyed imagining and creating it.
    + +
    Customize your '.ITOP_APPLICATION.' preferences for a personalized experience.
    ~~', 'UI:WelcomeMenu:AllOpenRequests' => 'Requerimientos Abiertos: %1$d', 'UI:WelcomeMenu:MyCalls' => 'Mis Requerimientos', 'UI:WelcomeMenu:OpenIncidents' => 'Incidentes Abiertos: %1$d', diff --git a/dictionaries/fr.dictionary.itop.ui.php b/dictionaries/fr.dictionary.itop.ui.php index 76181cdcf..6fbd327a9 100644 --- a/dictionaries/fr.dictionary.itop.ui.php +++ b/dictionaries/fr.dictionary.itop.ui.php @@ -1434,7 +1434,7 @@ Lors de l\'association à un déclencheur, on attribue à chaque action un numé 'UI:About:InstallationOptions' => 'Options d\'installation', 'UI:About:ManualExtensionSource' => 'Extension', 'UI:About:Extension_Version' => 'Version: %1$s', - 'UI:About:RemoteExtensionSource' => 'iTop Hub', + 'UI:About:RemoteExtensionSource' => 'Data', 'UI:DisconnectedDlgMessage' => 'Vous êtes déconnecté(e). Vous devez vous identifier pour pouvoir continuer à utiliser l\'application.', 'UI:DisconnectedDlgTitle' => 'Attention !', diff --git a/dictionaries/hu.dictionary.itop.ui.php b/dictionaries/hu.dictionary.itop.ui.php index 29483fa4b..a2ab95317 100755 --- a/dictionaries/hu.dictionary.itop.ui.php +++ b/dictionaries/hu.dictionary.itop.ui.php @@ -357,7 +357,14 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
  • hatékonyan tudja kezelni az egyik legfontosabb IT eszközt, a dokumentációt.
  • ', - 'UI:WelcomeMenu:Text'=> '~~', + 'UI:WelcomeMenu:Text'=> '
    Congratulations, you landed on '.ITOP_APPLICATION.' '.ITOP_VERSION_NAME.'!
    + +
    This version features a brand new modern and accessible backoffice design.
    + +
    We kept '.ITOP_APPLICATION.' core functions that you liked and modernized them to make you love them. +We hope you’ll enjoy this version as much as we enjoyed imagining and creating it.
    + +
    Customize your '.ITOP_APPLICATION.' preferences for a personalized experience.
    ~~', 'UI:WelcomeMenu:AllOpenRequests' => 'Összes nyitott kérés: %1$d', 'UI:WelcomeMenu:MyCalls' => 'Saját kérések', 'UI:WelcomeMenu:OpenIncidents' => 'Nyitott incidensek: %1$d', diff --git a/dictionaries/it.dictionary.itop.ui.php b/dictionaries/it.dictionary.itop.ui.php index 3091e1a30..76408ff80 100644 --- a/dictionaries/it.dictionary.itop.ui.php +++ b/dictionaries/it.dictionary.itop.ui.php @@ -368,7 +368,14 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
  • Gestire la risorsa più importante della tua IT: Documentazione.
  • ', - 'UI:WelcomeMenu:Text'=> '~~', + 'UI:WelcomeMenu:Text'=> '
    Congratulations, you landed on '.ITOP_APPLICATION.' '.ITOP_VERSION_NAME.'!
    + +
    This version features a brand new modern and accessible backoffice design.
    + +
    We kept '.ITOP_APPLICATION.' core functions that you liked and modernized them to make you love them. +We hope you’ll enjoy this version as much as we enjoyed imagining and creating it.
    + +
    Customize your '.ITOP_APPLICATION.' preferences for a personalized experience.
    ~~', 'UI:WelcomeMenu:AllOpenRequests' => 'Apri le richieste: %1$d', 'UI:WelcomeMenu:MyCalls' => 'Le mie richieste', 'UI:WelcomeMenu:OpenIncidents' => 'Apri gli incidenti: %1$d', diff --git a/dictionaries/ja.dictionary.itop.ui.php b/dictionaries/ja.dictionary.itop.ui.php index 8e8968723..76c3f0ae1 100644 --- a/dictionaries/ja.dictionary.itop.ui.php +++ b/dictionaries/ja.dictionary.itop.ui.php @@ -357,7 +357,14 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
  • ITの中でもっとも重要な財産である「文書化」の管理。
  • ', - 'UI:WelcomeMenu:Text'=> '~~', + 'UI:WelcomeMenu:Text'=> '
    Congratulations, you landed on '.ITOP_APPLICATION.' '.ITOP_VERSION_NAME.'!
    + +
    This version features a brand new modern and accessible backoffice design.
    + +
    We kept '.ITOP_APPLICATION.' core functions that you liked and modernized them to make you love them. +We hope you’ll enjoy this version as much as we enjoyed imagining and creating it.
    + +
    Customize your '.ITOP_APPLICATION.' preferences for a personalized experience.
    ~~', 'UI:WelcomeMenu:AllOpenRequests' => '要求を開く: %1$d', 'UI:WelcomeMenu:MyCalls' => '担当中の要求', 'UI:WelcomeMenu:OpenIncidents' => 'インシデントを開く: %1$d', diff --git a/dictionaries/nl.dictionary.itop.ui.php b/dictionaries/nl.dictionary.itop.ui.php index 5c534b138..ba5824b1e 100644 --- a/dictionaries/nl.dictionary.itop.ui.php +++ b/dictionaries/nl.dictionary.itop.ui.php @@ -368,7 +368,14 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
  • Het beheren van het belangrijkste middel: documentatie.
  • ', - 'UI:WelcomeMenu:Text'=> '~~', + 'UI:WelcomeMenu:Text'=> '
    Congratulations, you landed on '.ITOP_APPLICATION.' '.ITOP_VERSION_NAME.'!
    + +
    This version features a brand new modern and accessible backoffice design.
    + +
    We kept '.ITOP_APPLICATION.' core functions that you liked and modernized them to make you love them. +We hope you’ll enjoy this version as much as we enjoyed imagining and creating it.
    + +
    Customize your '.ITOP_APPLICATION.' preferences for a personalized experience.
    ~~', 'UI:WelcomeMenu:AllOpenRequests' => 'Open aanvragen: %1$d', 'UI:WelcomeMenu:MyCalls' => 'Mijn aanvragen', 'UI:WelcomeMenu:OpenIncidents' => 'Open incidenten: %1$d', @@ -551,22 +558,22 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array( 'UI:ResetPwd-Ready' => 'Het wachtwoord is veranderd', 'UI:ResetPwd-Login' => 'Klik hier om in te loggen', - 'UI:Login:About' => 'ITOP_APPLICATION', + 'UI:Login:About' => ITOP_APPLICATION, 'UI:Login:ChangeYourPassword' => 'Verander jouw wachtwoord', 'UI:Login:OldPasswordPrompt' => 'Oud wachtwoord', 'UI:Login:NewPasswordPrompt' => 'Nieuw wachtwoord', 'UI:Login:RetypeNewPasswordPrompt' => 'Herhaal nieuwe wachtwoord', 'UI:Login:IncorrectOldPassword' => 'Fout: het oude wachtwoord is incorrect', 'UI:LogOffMenu' => 'Log uit', - 'UI:LogOff:ThankYou' => 'Bedankt voor het gebruiken van ITOP_APPLICATION', + 'UI:LogOff:ThankYou' => 'Bedankt voor het gebruiken van '.ITOP_APPLICATION, 'UI:LogOff:ClickHereToLoginAgain' => 'Klik hier om in te loggen', 'UI:ChangePwdMenu' => 'Verander wachtwoord', 'UI:Login:PasswordChanged' => 'Wachtwoord met succes aangepast', - 'UI:AccessRO-All' => 'ITOP_APPLICATION is alleen-lezen', - 'UI:AccessRO-Users' => 'ITOP_APPLICATION is alleen-lezen voor eindgebruikers', + 'UI:AccessRO-All' => ITOP_APPLICATION.' is alleen-lezen', + 'UI:AccessRO-Users' => ITOP_APPLICATION.' is alleen-lezen voor eindgebruikers', 'UI:ApplicationEnvironment' => 'Omgeving van de applicatie: %1$s', 'UI:Login:RetypePwdDoesNotMatch' => 'Het nieuwe wachtwoord en de herhaling van het nieuwe wachtwoord komen niet overeen', - 'UI:Button:Login' => 'Ga naar ITOP_APPLICATION', + 'UI:Button:Login' => 'Ga naar '.ITOP_APPLICATION, 'UI:Login:Error:AccessRestricted' => 'Geen toegang tot '.ITOP_APPLICATION_SHORT.'. Neem contact op met een '.ITOP_APPLICATION_SHORT.'-beheerder.', 'UI:Login:Error:AccessAdmin' => 'Alleen toegankelijk voor mensen met beheerdersrechten. Neem contact op met een '.ITOP_APPLICATION_SHORT.'-beheerder', 'UI:Login:Error:WrongOrganizationName' => 'Onbekende organisatie', @@ -835,7 +842,7 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array( 'UI:Delete:PleaseDoTheManualOperations' => 'Verricht eerst de handmatige handelingen die hierboven staan voordat je dit object verwijdert', 'UI:Delect:Confirm_Object' => 'Bevestig dat je %1$s wil verwijderen.', 'UI:Delect:Confirm_Count_ObjectsOf_Class' => 'Bevestig dat je de volgende %1$d objecten van klasse %2$s wilt verwijderen.', - 'UI:WelcomeToITop' => 'Welkom in ITOP_APPLICATION', + 'UI:WelcomeToITop' => 'Welkom in '.ITOP_APPLICATION, 'UI:DetailsPageTitle' => ITOP_APPLICATION_SHORT.' - %1$s - %2$s details', 'UI:ErrorPageTitle' => ITOP_APPLICATION_SHORT.' - Fout', 'UI:ObjectDoesNotExist' => 'Sorry, dit object bestaat niet (of je bent niet gemachtigd het te bekijken).', diff --git a/dictionaries/pl.dictionary.itop.ui.php b/dictionaries/pl.dictionary.itop.ui.php index 571d3442e..82d9133de 100644 --- a/dictionaries/pl.dictionary.itop.ui.php +++ b/dictionaries/pl.dictionary.itop.ui.php @@ -369,7 +369,14 @@ Dict::Add('PL PL', 'Polish', 'Polski', array(
  • Zarządzaj najważniejszym zasobem swojego IT: dokumentacją.
  • ', - 'UI:WelcomeMenu:Text'=> '~~', + 'UI:WelcomeMenu:Text'=> '
    Congratulations, you landed on '.ITOP_APPLICATION.' '.ITOP_VERSION_NAME.'!
    + +
    This version features a brand new modern and accessible backoffice design.
    + +
    We kept '.ITOP_APPLICATION.' core functions that you liked and modernized them to make you love them. +We hope you’ll enjoy this version as much as we enjoyed imagining and creating it.
    + +
    Customize your '.ITOP_APPLICATION.' preferences for a personalized experience.
    ~~', 'UI:WelcomeMenu:AllOpenRequests' => 'Otwarte zgłoszenia: %1$d', 'UI:WelcomeMenu:MyCalls' => 'Moje zgłoszenia', 'UI:WelcomeMenu:OpenIncidents' => 'Otwarte incydenty: %1$d', diff --git a/dictionaries/pt_br.dictionary.itop.ui.php b/dictionaries/pt_br.dictionary.itop.ui.php index ad5458bab..1e8c7dc63 100644 --- a/dictionaries/pt_br.dictionary.itop.ui.php +++ b/dictionaries/pt_br.dictionary.itop.ui.php @@ -368,7 +368,14 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
  • gerenciar o ativo mais importante de sua TI: Documentação
  • ', - 'UI:WelcomeMenu:Text'=> '~~', + 'UI:WelcomeMenu:Text'=> '
    Congratulations, you landed on '.ITOP_APPLICATION.' '.ITOP_VERSION_NAME.'!
    + +
    This version features a brand new modern and accessible backoffice design.
    + +
    We kept '.ITOP_APPLICATION.' core functions that you liked and modernized them to make you love them. +We hope you’ll enjoy this version as much as we enjoyed imagining and creating it.
    + +
    Customize your '.ITOP_APPLICATION.' preferences for a personalized experience.
    ~~', 'UI:WelcomeMenu:AllOpenRequests' => 'Solicitações abertas: %1$d', 'UI:WelcomeMenu:MyCalls' => 'Minhas solicitações', 'UI:WelcomeMenu:OpenIncidents' => 'Incidentes abertos: %1$d', diff --git a/dictionaries/sk.dictionary.itop.ui.php b/dictionaries/sk.dictionary.itop.ui.php index 15b18f33b..95bb4e6d3 100644 --- a/dictionaries/sk.dictionary.itop.ui.php +++ b/dictionaries/sk.dictionary.itop.ui.php @@ -358,7 +358,14 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
  • Manažovať najdôležitejšie aktíva Vášho IT: Dokumentáciu.
  • ', - 'UI:WelcomeMenu:Text'=> '~~', + 'UI:WelcomeMenu:Text'=> '
    Congratulations, you landed on '.ITOP_APPLICATION.' '.ITOP_VERSION_NAME.'!
    + +
    This version features a brand new modern and accessible backoffice design.
    + +
    We kept '.ITOP_APPLICATION.' core functions that you liked and modernized them to make you love them. +We hope you’ll enjoy this version as much as we enjoyed imagining and creating it.
    + +
    Customize your '.ITOP_APPLICATION.' preferences for a personalized experience.
    ~~', 'UI:WelcomeMenu:AllOpenRequests' => 'Otvoriť žiadosť: %1$d', 'UI:WelcomeMenu:MyCalls' => 'Moje žiadosti', 'UI:WelcomeMenu:OpenIncidents' => 'Otvoriť incidenty: %1$d', @@ -1424,7 +1431,7 @@ Keď sú priradené spúštačom, každej akcii je dané číslo "príkazu", šp 'UI:About:InstallationOptions' => 'Installation options~~', 'UI:About:ManualExtensionSource' => 'Extension~~', 'UI:About:Extension_Version' => 'Version: %1$s~~', - 'UI:About:RemoteExtensionSource' => 'iTop Hub~~', + 'UI:About:RemoteExtensionSource' => 'Data~~', 'UI:DisconnectedDlgMessage' => 'You are disconnected. You must identify yourself to continue using the application.~~', 'UI:DisconnectedDlgTitle' => 'Warning!~~', diff --git a/dictionaries/tr.dictionary.itop.ui.php b/dictionaries/tr.dictionary.itop.ui.php index 426eaf1fd..574774bb8 100644 --- a/dictionaries/tr.dictionary.itop.ui.php +++ b/dictionaries/tr.dictionary.itop.ui.php @@ -368,7 +368,14 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
  • İşletmenin en önemli kaynağı olan dokümantasyonu yönetmesine imkan sağlar.
  • ', - 'UI:WelcomeMenu:Text'=> '~~', + 'UI:WelcomeMenu:Text'=> '
    Congratulations, you landed on '.ITOP_APPLICATION.' '.ITOP_VERSION_NAME.'!
    + +
    This version features a brand new modern and accessible backoffice design.
    + +
    We kept '.ITOP_APPLICATION.' core functions that you liked and modernized them to make you love them. +We hope you’ll enjoy this version as much as we enjoyed imagining and creating it.
    + +
    Customize your '.ITOP_APPLICATION.' preferences for a personalized experience.
    ~~', 'UI:WelcomeMenu:AllOpenRequests' => 'Açık istekler: %1$d', 'UI:WelcomeMenu:MyCalls' => 'İsteklerim', 'UI:WelcomeMenu:OpenIncidents' => 'Açık Arızalar: %1$d', diff --git a/js/pages/backoffice/toolbox.js b/js/pages/backoffice/toolbox.js index 2f4b3251d..9002f4d9f 100644 --- a/js/pages/backoffice/toolbox.js +++ b/js/pages/backoffice/toolbox.js @@ -19,10 +19,11 @@ // Helpers function ShowAboutBox(sTitle) { - var loadingDialog = $('
    '); - loadingDialog.dialog( {title:sTitle,autoOpen: true, modal: true}); + var loadingDialog = $('
    '); + loadingDialog.dialog( {title:sTitle,autoOpen: true, modal: true, width: 700, height:350}); + $('#ibo-about-box--loader').block(); $.post(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', {operation: 'about_box'}, function(data){ - + $('#ibo-about-box--loader').unblock(); $('body').append(data); }).always(function() { loadingDialog.empty(); diff --git a/pages/ajax.render.php b/pages/ajax.render.php index 62d6767d2..a704c407f 100644 --- a/pages/ajax.render.php +++ b/pages/ajax.render.php @@ -2495,7 +2495,7 @@ EOF ); $oSet = new DBObjectSet($oSearch, [], $aSearchParams); - $oSet->OptimizeColumnLoad(array($oSearch->GetClassAlias() => array())); + $oSet->OptimizeColumnLoad([$oSearch->GetClassAlias() => [$sObjectImageAttCode]]); $oSet->SetLimit(MetaModel::GetConfig()->Get('max_autocomplete_results')); // Note: We have to this manually because of a bug in DBSearch not checking the user prefs. by default. $oSet->SetShowObsoleteData(utils::ShowObsoleteData()); @@ -2520,7 +2520,7 @@ EOF } else { // If no image found, fallback on initials $aMatch['picture_style'] = ''; - $aMatch['initials'] = utils::ToAcronym($oObject->Get('friendlyname')); + $aMatch['initials'] = utils::FormatInitialsForMedallion(utils::ToAcronym($oObject->Get('friendlyname'))); } } diff --git a/sources/Application/WebPage/WebPage.php b/sources/Application/WebPage/WebPage.php index 3b26d691d..9d1fb358c 100644 --- a/sources/Application/WebPage/WebPage.php +++ b/sources/Application/WebPage/WebPage.php @@ -88,7 +88,7 @@ class WebPage implements Page */ protected const COMPATIBILITY_MOVED_LINKED_SCRIPTS_REL_PATH = []; /** - * @var array Script linked to the page through URIs, which were deprecated but can be added back if necessary {@see "compatibility.include_deprecated_js_files" conf. param.} + * @var array Script linked to the page through URIs, which were deprecated (in iTop previous version) but can be added back if necessary {@see "compatibility.include_deprecated_js_files" conf. param.} * @since 3.0.0 */ protected const COMPATIBILITY_DEPRECATED_LINKED_SCRIPTS_REL_PATH = []; @@ -98,7 +98,7 @@ class WebPage implements Page */ protected const COMPATIBILITY_MOVED_LINKED_STYLESHEETS_REL_PATH = []; /** - * @var array Stylesheets linked to the page through URIs, which were deprecated but can be added back if necessary {@see "compatibility.include_deprecated_css_files" conf. param.} + * @var array Stylesheets linked to the page through URIs, which were deprecated (in iTop previous version) but can be added back if necessary {@see "compatibility.include_deprecated_css_files" conf. param.} * @since 3.0.0 */ protected const COMPATIBILITY_DEPRECATED_LINKED_STYLESHEETS_REL_PATH = []; diff --git a/sources/Controller/AjaxRenderController.php b/sources/Controller/AjaxRenderController.php index e1a0b822c..4eb127624 100644 --- a/sources/Controller/AjaxRenderController.php +++ b/sources/Controller/AjaxRenderController.php @@ -772,13 +772,53 @@ class AjaxRenderController self::DisplayUserAboutBox($oPage); } + /** + * Display list of licenses in "About iTop" popup + * @param \AjaxPage $oPage + * + * @throws \Exception + * @since 3.0.1 + */ + private static function DisplayAboutLicenses(AjaxPage $oPage): void + { + $sCurrEnv = utils::GetCurrentEnvironment(); + require_once(APPROOT.'setup/setuputils.class.inc.php'); + $aLicenses = SetupUtils::GetLicenses($sCurrEnv); + $oPage->add("
    "); + $oPage->add('
    '); + $oPage->add(''.Dict::S('UI:About:Licenses').''); + $oPage->add(''); + $oPage->add('
    '); + $oPage->add("
    "); + } + + /** + * Display about iTop for all user non admin + * @param \AjaxPage $oPage + * + * @throws \Exception + */ private static function DisplayUserAboutBox(AjaxPage $oPage): void { $sDialogTitle = addslashes(Dict::S('UI:About:Title')); $oPage->add_ready_script( <<add(''); $oPage->add('
    '.$sVersionString.'
    '); $oPage->add(""); + self::DisplayAboutLicenses($oPage); $oPage->add(""); } + /** + * Display about iTop for admin user + * @param \AjaxPage $oPage + * + * @throws \Exception + */ private static function DisplayAdminAboutBox(AjaxPage $oPage): void { $sDialogTitle = addslashes(Dict::S('UI:About:Title')); @@ -824,7 +871,6 @@ EOF $oSet = new DBObjectSet($oFilter, array('installed' => false)); // Most recent first $oLastInstall = $oSet->Fetch(); $sLastInstallDate = $oLastInstall->Get('installed'); - $sDataModelVersion = $oLastInstall->Get('version'); $aDataModelInfo = json_decode($oLastInstall->Get('comment'), true); $sDataModelSourceDir = $aDataModelInfo['source_dir']; @@ -841,9 +887,6 @@ EOF } $aAvailableModules = $oRuntimeEnv->AnalyzeInstallation(MetaModel::GetConfig(), $aSearchDirs); - require_once(APPROOT.'setup/setuputils.class.inc.php'); - $aLicenses = SetupUtils::GetLicenses($sCurrEnv); - $aItopSettings = array('cron_max_execution_time', 'timezone'); $aPHPSettings = array('memory_limit', 'max_execution_time', 'upload_max_filesize', 'post_max_size'); $aMySQLSettings = array('max_allowed_packet', 'key_buffer_size', 'query_cache_size'); @@ -873,7 +916,6 @@ EOF $oPage->add(''); $oPage->add(''); $oPage->add($sVersionString.'
    '); - //$oPage->add(Dict::S('UI:About:DataModel').': '.$sDataModelVersion.'
    '); $oPage->add('MySQL: '.$sMySQLVersion.'
    '); $oPage->add('PHP: '.$sPHPVersion.'
    '); $oPage->add(''); @@ -881,26 +923,7 @@ EOF $oPage->add(''); $oPage->add(""); - $oPage->add("
    "); - $oPage->add('
    '); - $oPage->add(''.Dict::S('UI:About:Licenses').''); - $oPage->add('
      '); - $index = 0; - foreach ($aLicenses as $oLicense) { - $oPage->add('
    • '.$oLicense->product.', © '.$oLicense->author.' is licensed under the '.$oLicense->license_type.' license. (Details)'); - $oPage->add(''); - $oPage->add_ready_script(<<add('
    '); - $oPage->add('
    '); - $oPage->add("
    "); + self::DisplayAboutLicenses($oPage); $oPage->add('
    '); $oPage->add(''.Dict::S('UI:About:InstallationOptions').''); @@ -942,7 +965,6 @@ JS $oPage->add('iTopVersion: '.ITOP_VERSION."\n"); $oPage->add('iTopBuild: '.ITOP_REVISION."\n"); $oPage->add('iTopBuildDate: '.ITOP_BUILD_DATE."\n"); - $oPage->add('DataModelVersion: '.$sDataModelVersion."\n"); $oPage->add('MySQLVersion: '.$sMySQLVersion."\n"); $oPage->add('PHPVersion: '.$sPHPVersion."\n"); $oPage->add('OSVersion: '.$sOSVersion."\n"); diff --git a/sources/Renderer/Bootstrap/FieldRenderer/BsSimpleFieldRenderer.php b/sources/Renderer/Bootstrap/FieldRenderer/BsSimpleFieldRenderer.php index 495223db5..aedd0918c 100644 --- a/sources/Renderer/Bootstrap/FieldRenderer/BsSimpleFieldRenderer.php +++ b/sources/Renderer/Bootstrap/FieldRenderer/BsSimpleFieldRenderer.php @@ -648,7 +648,7 @@ HTML // Open medallion from profile picture or first name letter $bEntryHasMedallionPicture = (empty($aContactPicturesCache[$iEntryUserId]) === false); $sEntryMedallionStyle = $bEntryHasMedallionPicture ? ' background-image: url(\''.$aContactPicturesCache[$iEntryUserId].'\');' : ''; - $sEntryMedallionContent = $bEntryHasMedallionPicture ? '' : UserRights::GetUserInitials($sEntryUserLogin); + $sEntryMedallionContent = $bEntryHasMedallionPicture ? '' : utils::FormatInitialsForMedallion(UserRights::GetUserInitials($sEntryUserLogin)); // - Entry tooltip $sEntryMedallionTooltip = utils::HtmlEntities($sEntryUserLogin); $sEntryMedallionTooltipPlacement = ($iEntryUserId === $iCurrentUserId) ? 'left' : 'right'; diff --git a/templates/base/layouts/activity-panel/activity-entry/layout.html.twig b/templates/base/layouts/activity-panel/activity-entry/layout.html.twig index bae577579..d7fa10811 100644 --- a/templates/base/layouts/activity-panel/activity-entry/layout.html.twig +++ b/templates/base/layouts/activity-panel/activity-entry/layout.html.twig @@ -10,7 +10,7 @@ {% if oUIBlock.GetAuthorPictureAbsUrl() is not empty %} {% else %} - + {% endif %} {% endblock %} diff --git a/test/application/UtilsTest.php b/test/application/UtilsTest.php index eeec7f8cf..1b425ccda 100644 --- a/test/application/UtilsTest.php +++ b/test/application/UtilsTest.php @@ -434,7 +434,7 @@ class UtilsTest extends \Combodo\iTop\Test\UnitTest\ItopTestCase public function testToAcronym(string $sInput, string $sExceptedAcronym) { $sTestedAcronym = utils::ToAcronym($sInput); - $this->assertEquals($sTestedAcronym, $sExceptedAcronym, "Acronym for '$sInput' doesn't match. Got '$sTestedAcronym', expected '$sExceptedAcronym'."); + $this->assertEquals($sExceptedAcronym, $sTestedAcronym, "Acronym for '$sInput' doesn't match. Got '$sTestedAcronym', expected '$sExceptedAcronym'."); } /** @@ -479,6 +479,10 @@ class UtilsTest extends \Combodo\iTop\Test\UnitTest\ItopTestCase 'Jada Pinkett-smith', 'JP', ], + 'Several words, cyrillic alphabet' => [ + 'Денис Александра', + 'ДА', + ], ]; } @@ -550,6 +554,40 @@ class UtilsTest extends \Combodo\iTop\Test\UnitTest\ItopTestCase ]; } + /** + * @dataProvider FormatInitialsForMedallionProvider + * @covers utils::FormatInitialsForMedallion + * + * @param string $sInput + * @param string $sExpected + */ + public function testFormatInitialsForMedallion(string $sInput, string $sExpected) + { + $sTested = utils::FormatInitialsForMedallion($sInput); + $this->assertEquals($sExpected, $sTested); + } + + /** + * @since 3.0.1 + */ + public function FormatInitialsForMedallionProvider() + { + return [ + 'All letters kept (2)' => [ + 'AB', + 'AB', + ], + 'All letters kept (3)' => [ + 'ABC', + 'ABC', + ], + 'Only 3 first letters kept (4)' => [ + 'ABCD', + 'ABC', + ], + ]; + } + /** * @param string $sExpressionToConvert * @param int $iExpectedConvertedValue diff --git a/test/postbuild_integration/iTopModuleXmlInstallationChecklistTest.php b/test/postbuild_integration/iTopModuleXmlInstallationChecklistTest.php index b554b865e..02d9d5645 100644 --- a/test/postbuild_integration/iTopModuleXmlInstallationChecklistTest.php +++ b/test/postbuild_integration/iTopModuleXmlInstallationChecklistTest.php @@ -36,30 +36,36 @@ class iTopModuleXmlInstallationChecklistTest extends ItopTestCase public function testAllModuleAreIncludedInInstallationXml() { $sInstallationXmlPath = APPROOT.'datamodels/2.x/installation.xml'; - if (!is_file($sInstallationXmlPath)) - { + if (!is_file($sInstallationXmlPath)) { $sInstallationXmlPath = APPROOT.'datamodels/1.x/installation.xml'; } $this->assertTrue(is_file($sInstallationXmlPath), "$sInstallationXmlPath does not exist"); $sInstallationXmlContent = file_get_contents($sInstallationXmlPath); preg_match_all("|(.*)|", $sInstallationXmlContent, $aMatches); - $aDeclaredModules = [] ; - if (!empty($aMatches)) - { - foreach ($aMatches[1] as $sModule) - { - if (!array_key_exists($sModule, $aDeclaredModules)) - { + $aDeclaredModules = []; + if (!empty($aMatches)) { + foreach ($aMatches[1] as $sModule) { + if (!array_key_exists($sModule, $aDeclaredModules)) { $aDeclaredModules[$sModule] = $sModule; } } } - $this->assertArraySubset($this->GetFilteredModulesFromDatamodels(APPROOT.'/datamodels'), $aDeclaredModules, false, "$sInstallationXmlPath does not refer to all provided modules. Refered modules:\n " . var_export($aDeclaredModules, true)); + $this->assertArraySubset( + $this->GetFilteredModulesFromDatamodels(APPROOT.'/datamodels'), + $aDeclaredModules, + false, + "{$sInstallationXmlPath} does not list all modules in /datamodels ! List of modules in installation.xml:\n ".var_export($aDeclaredModules, true) + ); $aModulesFromDatamodels = $this->GetAllModules(APPROOT.'/datamodels'); - $this->assertArraySubset($aDeclaredModules, $aModulesFromDatamodels, false, "Not all modules are contained in $sInstallationXmlPath. Refered modules:\n " . var_export($aModulesFromDatamodels, true)); + $this->assertArraySubset( + $aDeclaredModules, + $aModulesFromDatamodels, + false, + "Not all modules are contained in {$sInstallationXmlPath}. List of modules in /datamodels:\n ".var_export($aModulesFromDatamodels, true) + ); } public function GetFilteredModulesFromDatamodels($sFolder)