mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
N°4642 - Core Update : limit the usage of this function to minor version or disable the functionality ?
This commit is contained in:
@@ -4,4 +4,5 @@
|
||||
*/
|
||||
|
||||
@import "collapsible-section-with-blocks";
|
||||
@import "collapsible-section-within-caselog-list";
|
||||
@import "collapsible-section-within-caselog-list";
|
||||
@import "collapsible-section-within-alert";
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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' => '<b>Some new modules were detected</b>, a partial update cannot be executed.</br>Follow the <a href="%2$s"> procedure</a> in order to manually upgrade your iTop. You must use the <a href="%1$s">setup</a> to update the application.~~',
|
||||
));
|
||||
|
||||
|
||||
|
||||
@@ -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' => '<b>Some new modules were detected</b>, a partial update cannot be executed.</br>Follow the <a href="%2$s"> procedure</a> in order to manually upgrade your iTop. You must use the <a href="%1$s">setup</a> to update the application.~~',
|
||||
));
|
||||
|
||||
|
||||
|
||||
@@ -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' => '<b>Einige neue Module wurden erkannt</b>, eine Teil-Update kann nicht ausgeführt werden.<br/>Befolgen Sie das <a href="%2$s">Verfahren</a>, um Ihr iTop manuell zu aktualisieren. Sie müssen das <a href="%1$s">Setup</a> benutzen, um Ihre Applikation zu aktualisieren.<br />',
|
||||
|
||||
));
|
||||
|
||||
|
||||
|
||||
@@ -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' => '<b>Some new modules were detected</b>, a partial update cannot be executed.</br>Follow the <a href="%2$s"> procedure</a> in order to manually upgrade your iTop. You must use the <a href="%1$s">setup</a> to update the application.',
|
||||
));
|
||||
|
||||
|
||||
|
||||
@@ -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' => '<b>Some new modules were detected</b>, a partial update cannot be executed.</br>Follow the <a href="%2$s"> procedure</a> in order to manually upgrade your iTop. You must use the <a href="%1$s">setup</a> to update the application.~~',
|
||||
));
|
||||
|
||||
|
||||
|
||||
@@ -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' => '<b>De nouveaux modules ont été détectés</b>, une mise à jour partielle ne peut pas être effectuée.<br />Suivez la <a href="%2$s"> procedure</a> pour mettre à jour manuellement votre iTop. Vous devez utiliser la page <a href="%1$s">d\'installation</a> pour mettre à jour l\'application.',
|
||||
|
||||
));
|
||||
|
||||
|
||||
|
||||
@@ -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' => '<b>Some new modules were detected</b>, a partial update cannot be executed.</br>Follow the <a href="%2$s"> procedure</a> in order to manually upgrade your iTop. You must use the <a href="%1$s">setup</a> to update the application.~~',
|
||||
));
|
||||
|
||||
|
||||
|
||||
@@ -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' => '<b>Some new modules were detected</b>, a partial update cannot be executed.</br>Follow the <a href="%2$s"> procedure</a> in order to manually upgrade your iTop. You must use the <a href="%1$s">setup</a> to update the application.~~',
|
||||
));
|
||||
|
||||
|
||||
|
||||
@@ -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' => '<b>Some new modules were detected</b>, a partial update cannot be executed.</br>Follow the <a href="%2$s"> procedure</a> in order to manually upgrade your iTop. You must use the <a href="%1$s">setup</a> to update the application.~~',
|
||||
));
|
||||
|
||||
|
||||
|
||||
@@ -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' => '<b>Some new modules were detected</b>, a partial update cannot be executed.</br>Follow the <a href="%2$s"> procedure</a> in order to manually upgrade your iTop. You must use the <a href="%1$s">setup</a> to update the application.~~',
|
||||
));
|
||||
|
||||
|
||||
|
||||
@@ -1,31 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2018 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
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',
|
||||
));
|
||||
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2018 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
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' => '<b>Some new modules were detected</b>, a partial update cannot be executed.</br>Follow the <a href="%2$s"> procedure</a> in order to manually upgrade your iTop. You must use the <a href="%1$s">setup</a> to update the application.~~',
|
||||
));
|
||||
|
||||
|
||||
|
||||
@@ -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' => '<b>Some new modules were detected</b>, a partial update cannot be executed.</br>Follow the <a href="%2$s"> procedure</a> in order to manually upgrade your iTop. You must use the <a href="%1$s">setup</a> to update the application.~~',
|
||||
));
|
||||
|
||||
|
||||
|
||||
@@ -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' => '<b>Some new modules were detected</b>, a partial update cannot be executed.</br>Follow the <a href="%2$s"> procedure</a> in order to manually upgrade your iTop. You must use the <a href="%1$s">setup</a> to update the application.~~',
|
||||
));
|
||||
|
||||
|
||||
|
||||
@@ -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' => '<b>Some new modules were detected</b>, a partial update cannot be executed.</br>Follow the <a href="%2$s"> procedure</a> in order to manually upgrade your iTop. You must use the <a href="%1$s">setup</a> to update the application.~~',
|
||||
));
|
||||
|
||||
|
||||
|
||||
@@ -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' => '<b>Some new modules were detected</b>, a partial update cannot be executed.</br>Follow the <a href="%2$s"> procedure</a> in order to manually upgrade your iTop. You must use the <a href="%1$s">setup</a> to update the application.~~',
|
||||
));
|
||||
|
||||
|
||||
|
||||
@@ -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' => '<b>Some new modules were detected</b>, a partial update cannot be executed.</br>Follow the <a href="%2$s"> procedure</a> in order to manually upgrade your iTop. You must use the <a href="%1$s">setup</a> to update the application.~~',
|
||||
));
|
||||
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ use DOMDocument;
|
||||
use DOMElement;
|
||||
use DOMNode;
|
||||
use DOMXPath;
|
||||
use MetaModel;
|
||||
use utils;
|
||||
|
||||
class FilesIntegrity
|
||||
{
|
||||
@@ -82,7 +84,7 @@ class FilesIntegrity
|
||||
*
|
||||
* @throws \Combodo\iTop\FilesInformation\Service\FileIntegrityException
|
||||
*/
|
||||
public static function CheckInstallationIntegrity($sRootPath = APPROOT)
|
||||
public static function CheckInstallationIntegrity($sRootPath = APPROOT, $bCheckNewModule = false)
|
||||
{
|
||||
$aFilesInfo = FilesIntegrity::GetInstalledFiles($sRootPath.'manifest.xml');
|
||||
|
||||
@@ -92,6 +94,7 @@ class FilesIntegrity
|
||||
}
|
||||
|
||||
@clearstatcache();
|
||||
$sSourceDir = MetaModel::GetConfig()->Get('source_dir');
|
||||
foreach ($aFilesInfo as $aFileInfo)
|
||||
{
|
||||
$sFile = $sRootPath.$aFileInfo['path'];
|
||||
@@ -106,6 +109,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...
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user