mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
Merge remote-tracking branch 'origin/support/3.0' into develop
This commit is contained in:
@@ -44,7 +44,7 @@ abstract class HTMLSanitizer
|
||||
{
|
||||
$sSanitizerClass = utils::GetConfig()->Get($sConfigKey);
|
||||
if (!class_exists($sSanitizerClass)) {
|
||||
IssueLog::Warning('The configured "html_sanitizer" class "'.$sSanitizerClass.'" is not a valid class. Will use HTMLDOMSanitizer as the default sanitizer.');
|
||||
IssueLog::Warning('The configured "'.$sConfigKey.'" class "'.$sSanitizerClass.'" is not a valid class. Will use HTMLDOMSanitizer as the default sanitizer.');
|
||||
$sSanitizerClass = 'HTMLDOMSanitizer';
|
||||
} else if (!is_subclass_of($sSanitizerClass, 'HTMLSanitizer')) {
|
||||
if ($sConfigKey === 'html_sanitizer') {
|
||||
|
||||
@@ -46,7 +46,7 @@ function UsageAndExit($oP)
|
||||
}
|
||||
else
|
||||
{
|
||||
$oP->p("The parameter 'data_sources' is mandatory, and must contain a comma separated list of data sources\n");
|
||||
$oP->p("The parameter 'data_sources' is mandatory, and must contain a comma separated list of data sources\n");
|
||||
}
|
||||
$oP->output();
|
||||
exit -2;
|
||||
@@ -105,6 +105,9 @@ if (utils::IsModeCLI())
|
||||
else
|
||||
{
|
||||
require_once(APPROOT.'/application/loginwebpage.class.inc.php');
|
||||
|
||||
//N°6022 - Make synchro scripts work by http via token authentication with SYNCHRO scopes
|
||||
$oCtx = new ContextTag(ContextTag::TAG_SYNCHRO);
|
||||
LoginWebPage::DoLogin(); // Check user rights and prompt if needed
|
||||
}
|
||||
|
||||
@@ -166,7 +169,7 @@ foreach(explode(',', $sDataSourcesList) as $iSDS)
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
$oP->add($e->getMessage());
|
||||
$oP->add($e->getMessage());
|
||||
if ($bSimulate)
|
||||
{
|
||||
CMDBSource::Query('ROLLBACK');
|
||||
|
||||
@@ -255,7 +255,7 @@ if (utils::IsModeCLI())
|
||||
{
|
||||
// Next steps:
|
||||
// specific arguments: 'csvfile'
|
||||
//
|
||||
//
|
||||
$sAuthUser = ReadMandatoryParam($oP, 'auth_user', 'raw_data');
|
||||
$sAuthPwd = ReadMandatoryParam($oP, 'auth_pwd', 'raw_data');
|
||||
$sCsvFile = ReadMandatoryParam($oP, 'csvfile', 'raw_data');
|
||||
@@ -282,6 +282,9 @@ if (utils::IsModeCLI())
|
||||
else
|
||||
{
|
||||
require_once APPROOT.'/application/loginwebpage.class.inc.php';
|
||||
|
||||
//N°6022 - Make synchro scripts work by http via token authentication with SYNCHRO scopes
|
||||
$oCtx = new ContextTag(ContextTag::TAG_SYNCHRO);
|
||||
LoginWebPage::DoLogin(); // Check user rights and prompt if needed
|
||||
|
||||
$sCSVData = utils::ReadPostedParam('csvdata', '', 'raw_data');
|
||||
|
||||
Reference in New Issue
Block a user