Merge remote-tracking branch 'origin/support/2.7' into support/3.0

# Conflicts:
#	composer.json
#	composer.lock
#	core/config.class.inc.php
#	core/dbobject.class.php
#	core/email.class.inc.php
#	datamodels/2.x/itop-core-update/dictionaries/hu.dict.itop-core-update.php
#	datamodels/2.x/itop-core-update/dictionaries/it.dict.itop-core-update.php
#	datamodels/2.x/itop-core-update/dictionaries/ja.dict.itop-core-update.php
#	datamodels/2.x/itop-core-update/dictionaries/nl.dict.itop-core-update.php
#	datamodels/2.x/itop-core-update/dictionaries/ru.dict.itop-core-update.php
#	datamodels/2.x/itop-core-update/dictionaries/sk.dict.itop-core-update.php
#	datamodels/2.x/itop-core-update/dictionaries/tr.dict.itop-core-update.php
#	datamodels/2.x/itop-core-update/dictionaries/zh_cn.dict.itop-core-update.php
#	datamodels/2.x/itop-core-update/pt_br.dict.itop-core-update.php
#	datamodels/2.x/itop-core-update/view/ConfirmUpdate.html.twig
#	datamodels/2.x/itop-portal-base/portal/src/Twig/AppExtension.php
#	datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml
#	datamodels/2.x/itop-welcome-itil/datamodel.itop-welcome-itil.xml
#	dictionaries/cs.dictionary.itop.core.php
#	dictionaries/cs.dictionary.itop.ui.php
#	dictionaries/da.dictionary.itop.core.php
#	dictionaries/da.dictionary.itop.ui.php
#	dictionaries/de.dictionary.itop.core.php
#	dictionaries/de.dictionary.itop.ui.php
#	dictionaries/en.dictionary.itop.ui.php
#	dictionaries/es_cr.dictionary.itop.core.php
#	dictionaries/es_cr.dictionary.itop.ui.php
#	dictionaries/fr.dictionary.itop.core.php
#	dictionaries/fr.dictionary.itop.ui.php
#	dictionaries/hu.dictionary.itop.core.php
#	dictionaries/hu.dictionary.itop.ui.php
#	dictionaries/it.dictionary.itop.core.php
#	dictionaries/it.dictionary.itop.ui.php
#	dictionaries/ja.dictionary.itop.core.php
#	dictionaries/ja.dictionary.itop.ui.php
#	dictionaries/nl.dictionary.itop.core.php
#	dictionaries/nl.dictionary.itop.ui.php
#	dictionaries/pt_br.dictionary.itop.core.php
#	dictionaries/pt_br.dictionary.itop.ui.php
#	dictionaries/ru.dictionary.itop.core.php
#	dictionaries/ru.dictionary.itop.ui.php
#	dictionaries/sk.dictionary.itop.core.php
#	dictionaries/sk.dictionary.itop.ui.php
#	dictionaries/tr.dictionary.itop.core.php
#	dictionaries/tr.dictionary.itop.ui.php
#	dictionaries/zh_cn.dictionary.itop.core.php
#	dictionaries/zh_cn.dictionary.itop.ui.php
#	lib/composer/autoload_classmap.php
#	lib/composer/autoload_real.php
#	lib/composer/autoload_static.php
#	lib/composer/installed.json
#	lib/composer/installed.php
#	sources/application/TwigBase/Controller/Controller.php
#	sources/application/TwigBase/Twig/TwigHelper.php
This commit is contained in:
Benjamin Dalsass
2022-06-02 14:27:08 +02:00
702 changed files with 90691 additions and 2659 deletions

22
setup/appupgradecopy.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
use Combodo\iTop\CoreUpdate\Service\CoreUpdater;
/**
* iTop
*
* @copyright Copyright (C) 2010,2022 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*
*/
function AppUpgradeCopyFiles($sSourceDir)
{
CoreUpdater::CopyDir($sSourceDir, APPROOT);
// Update Core update files
$sSource = realpath($sSourceDir.'/datamodels/2.x/itop-core-update');
if ($sSource !== false)
{
CoreUpdater::CopyDir($sSource, APPROOT.'env-production/itop-core-update');
}
}

View File

@@ -107,9 +107,9 @@ function CheckEmailSetting($oP)
}
}
break;
case 'SMTP':
$oP->info("iTop is configured to use the <b>SMTP</b> transport.");
$oP->info("iTop is configured to use the <b>$sTransport</b> transport.");
$sHost = MetaModel::GetConfig()->Get('email_transport_smtp.host');
$sPort = MetaModel::GetConfig()->Get('email_transport_smtp.port');
$sEncryption = MetaModel::GetConfig()->Get('email_transport_smtp.encryption');
@@ -124,7 +124,26 @@ function CheckEmailSetting($oP)
$oP->warning("The default settings may not be suitable for your environment. You may want to adjust these values by editing iTop's configuration file (".utils::GetConfigFilePathRelative().").");
}
break;
case 'SMTP_OAuth':
$oP->info("iTop is configured to use the <b>$sTransport</b> transport.");
$sHost = MetaModel::GetConfig()->Get('email_transport_smtp.host');
$sPort = MetaModel::GetConfig()->Get('email_transport_smtp.port');
$sEncryption = MetaModel::GetConfig()->Get('email_transport_smtp.encryption');
$sDisplayEncryption = empty($sEncryption) ? '<em>no encryption</em> ' : $sEncryption;
$sUserName = MetaModel::GetConfig()->Get('email_transport_smtp.username');
$sDisplayUserName = empty($sUserName) ? '<em>no user</em> ' : $sUserName;
$sProvider = MetaModel::GetConfig()->Get('email_transport_smtp.oauth.provider');
$sDisplayProvider = empty($sProvider) ? '<em>no Provider</em> ' : $sProvider;
$sClientID = MetaModel::GetConfig()->Get('email_transport_smtp.oauth.client_id');
$sDisplayClientID = empty($sClientID) ? '<em>no password</em> ' : $sClientID;
$oP->info("SMTP configuration (from config-itop.php): host: $sHost, port: $sPort, provider: $sDisplayProvider, user: $sDisplayUserName, client id: $sDisplayClientID, encryption: $sDisplayEncryption.");
if (($sHost == 'localhost') && ($sPort == '25') && ($sUserName == '') && ($sClientID == '') && ($sProvider == '')) {
$oP->warning("The default settings may not be suitable for your environment. You may want to adjust these values by editing iTop's configuration file (".utils::GetConfigFilePathRelative().').');
}
break;
case 'Null':
$oP->warning("iTop is configured to use the <b>Null</b> transport: emails sending will have no effect.");
$bRet = false;