mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 10:08:45 +02:00
Merge remote-tracking branch 'origin/support/2.7' into support/3.0
# Conflicts: # application/cmdbabstract.class.inc.php # core/coreexception.class.inc.php # core/dbobject.class.php
This commit is contained in:
@@ -754,7 +754,7 @@ HTML
|
||||
$oClassIcon = new MedallionIcon(MetaModel::GetClassIcon($sTargetClass, false));
|
||||
$oClassIcon->SetDescription($oAttDef->GetDescription())->AddCSSClass('ibo-block-list--medallion');
|
||||
$oPage->AddUiBlock($oClassIcon);
|
||||
|
||||
|
||||
$sDisplayValue = ''; // not used
|
||||
$sHTMLValue = "<span id=\"field_{$sInputId}\">".self::GetFormElementForField($oPage, $sClass, $sAttCode,
|
||||
$oAttDef, $oLinkSet, $sDisplayValue, $sInputId, '', $iFlags, $aArgs).'</span>';
|
||||
@@ -5239,11 +5239,14 @@ EOF
|
||||
} else {
|
||||
$sStatus = $bResult ? Dict::S('UI:BulkModifyStatusModified') : Dict::S('UI:BulkModifyStatusSkipped');
|
||||
}
|
||||
$sChecked = $bResult ? 'checked' : '';
|
||||
|
||||
$aErrorsToDisplay = array_map(function($sError) {
|
||||
return utils::HtmlEntities($sError);
|
||||
}, $aErrors);
|
||||
$aRows[] = array(
|
||||
'object' => $oObj->GetHyperlink(),
|
||||
'status' => $sStatus,
|
||||
'errors' => '<p>'.($bResult ? '' : implode('</p><p>', $aErrors)).'</p>',
|
||||
'errors' => '<p>'.($bResult ? '' : implode('</p><p>', $aErrorsToDisplay)).'</p>',
|
||||
);
|
||||
if ($bResult && (!$bPreview)) {
|
||||
$oObj->DBUpdate();
|
||||
@@ -5252,7 +5255,7 @@ EOF
|
||||
set_time_limit(intval($iPreviousTimeLimit));
|
||||
$oTable = DataTableUIBlockFactory::MakeForForm('BulkModify', $aHeaders, $aRows);
|
||||
$oTable->AddOption("bFullscreen", true);
|
||||
|
||||
|
||||
$oPanel = PanelUIBlockFactory::MakeForClass($sClass, '');
|
||||
$oPanel->SetIcon($sClassIcon);
|
||||
$oPanel->SetTitle($sHeaderTitle);
|
||||
@@ -5458,13 +5461,13 @@ EOF
|
||||
$oFailAlertBlock = AlertUIBlockFactory::MakeForDanger('', Dict::S('UI:Delete:SorryDeletionNotAllowed'));
|
||||
$oFailAlertBlock->SetIsClosable(false);
|
||||
$oP->AddUiBlock($oFailAlertBlock);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$oWarningAlertBlock = AlertUIBlockFactory::MakeForWarning('', Dict::S('UI:Delete:PleaseDoTheManualOperations'));
|
||||
$oWarningAlertBlock->SetIsClosable(false);
|
||||
$oP->AddUiBlock($oWarningAlertBlock);
|
||||
}
|
||||
|
||||
|
||||
$oForm = FormUIBlockFactory::MakeStandard('');
|
||||
$oP->AddSubBlock($oForm);
|
||||
$oForm->AddSubBlock(InputUIBlockFactory::MakeForHidden('transaction_id', utils::ReadParam('transaction_id', '', false, 'transaction_id')));
|
||||
|
||||
@@ -1929,7 +1929,7 @@ abstract class DBObject implements iDisplay
|
||||
/** @var \AttributeExternalKey $oAtt */
|
||||
$sTargetClass = $oAtt->GetTargetClass();
|
||||
if (false === MetaModel::IsObjectInDB($sTargetClass, $toCheck)) {
|
||||
return "Target object not found (".utils::HtmlEntities($sTargetClass).".::".utils::HtmlEntities($toCheck).")";
|
||||
return "Target object not found (".$sTargetClass.".::".$toCheck.")";
|
||||
}
|
||||
}
|
||||
if ($oAtt->IsHierarchicalKey())
|
||||
@@ -1938,7 +1938,7 @@ abstract class DBObject implements iDisplay
|
||||
$aValues = $oAtt->GetAllowedValues(array('this' => $this));
|
||||
if (!array_key_exists($toCheck, $aValues))
|
||||
{
|
||||
return "Value not allowed [". utils::HtmlEntities($toCheck)."]";
|
||||
return "Value not allowed [$toCheck]";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1952,7 +1952,7 @@ abstract class DBObject implements iDisplay
|
||||
$oTag->SetValues(explode(' ', $toCheck));
|
||||
} catch (Exception $e)
|
||||
{
|
||||
return "Tag value [". utils::HtmlEntities($toCheck)."] is not a valid tag list";
|
||||
return "Tag value '$toCheck' is not a valid tag list";
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1980,7 +1980,7 @@ abstract class DBObject implements iDisplay
|
||||
$oTag->SetValues($aValues);
|
||||
} catch (Exception $e)
|
||||
{
|
||||
return "Set value[". utils::HtmlEntities($toCheck)."] is not a valid set";
|
||||
return "Set value '$toCheck' is not a valid set";
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -2000,7 +2000,7 @@ abstract class DBObject implements iDisplay
|
||||
{
|
||||
if (!array_key_exists($toCheck, $aValues))
|
||||
{
|
||||
return "Value not allowed [". utils::HtmlEntities($toCheck)."]";
|
||||
return "Value not allowed [$toCheck]";
|
||||
}
|
||||
}
|
||||
if (!is_null($iMaxSize = $oAtt->GetMaxSize()))
|
||||
@@ -2013,7 +2013,7 @@ abstract class DBObject implements iDisplay
|
||||
}
|
||||
if (!$oAtt->CheckFormat($toCheck))
|
||||
{
|
||||
return "Wrong format [". utils::HtmlEntities($toCheck)."]";
|
||||
return "Wrong format [$toCheck]";
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1474,7 +1474,10 @@ EOF
|
||||
}
|
||||
else
|
||||
{
|
||||
$sError = '<p>'.implode('</p></p>',$aErrors)."</p>\n";
|
||||
$aErrorsToDisplay = array_map(function($sError) {
|
||||
return utils::HtmlEntities($sError);
|
||||
}, $aErrors);
|
||||
$sError = '<p>'.implode('</p></p>',$aErrorsToDisplay)."</p>\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user