mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 08:12:26 +02:00
Merge branch 'support/3.0' into saas/3.0
This commit is contained in:
@@ -1150,8 +1150,8 @@ EOF
|
||||
//
|
||||
$aIssues = $e->getIssues();
|
||||
|
||||
$sObjKey = $oObj->GetKey();
|
||||
$sClassIcon = MetaModel::GetClassIcon($sClass, false);
|
||||
$sClassLabel = MetaModel::GetName($sClass);
|
||||
$sClassIcon = MetaModel::GetClassIcon($sClass);
|
||||
$sHeaderTitle = Dict::Format('UI:CreationTitle_Class', $sClassLabel);
|
||||
|
||||
$oP->set_title(Dict::Format('UI:CreationPageTitle_Class', $sClassLabel));
|
||||
@@ -1162,7 +1162,8 @@ EOF
|
||||
$sWarnings = implode(', ', $aWarnings);
|
||||
$oP->AddHeaderMessage($sWarnings, 'message_warning');
|
||||
}
|
||||
cmdbAbstractObject::DisplayCreationForm($oP, $sClass, $oObj, [], ['transaction_id' => $sTransactionId]);
|
||||
$oP->SetContentLayout(PageContentFactory::MakeForObjectDetails($oObj, cmdbAbstractObject::ENUM_DISPLAY_MODE_CREATE));
|
||||
cmdbAbstractObject::DisplayCreationForm($oP, $sClass, $oObj, [], ['transaction_id' => $sTransactionId, 'wizard_container' => 1, 'keep_source_object' => true]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -877,7 +877,10 @@ try
|
||||
case 'export_dashboard':
|
||||
$oPage = new DownloadPage('');
|
||||
$sDashboardId = utils::ReadParam('id', '', false, 'raw_data');
|
||||
$sDashboardFile = utils::ReadParam('file', '', false, 'raw_data');
|
||||
$sDashboardFileRelative = utils::ReadParam('file', '', false, 'raw_data');
|
||||
|
||||
$sDashboardFile = RuntimeDashboard::GetDashboardFileFromRelativePath($sDashboardFileRelative);
|
||||
|
||||
$oDashboard = RuntimeDashboard::GetDashboard($sDashboardFile, $sDashboardId);
|
||||
if (!is_null($oDashboard)) {
|
||||
$oPage->TrashUnexpectedOutput();
|
||||
@@ -892,18 +895,18 @@ try
|
||||
$oPage->SetOutputDataOnly(true);
|
||||
|
||||
$sTransactionId = utils::ReadParam('transaction_id', '', false, 'transaction_id');
|
||||
if (!utils::IsTransactionValid($sTransactionId, true))
|
||||
{
|
||||
if (!utils::IsTransactionValid($sTransactionId, true)) {
|
||||
throw new SecurityException('ajax.render.php import_dashboard : invalid transaction_id');
|
||||
}
|
||||
$sDashboardId = utils::ReadParam('id', '', false, 'raw_data');
|
||||
$sDashboardFile = utils::ReadParam('file', '', false, 'raw_data');
|
||||
$sDashboardFileRelative = utils::ReadParam('file', '', false, 'raw_data');
|
||||
|
||||
$sDashboardFile = RuntimeDashboard::GetDashboardFileFromRelativePath($sDashboardFileRelative);
|
||||
|
||||
$oDashboard = RuntimeDashboard::GetDashboard($sDashboardFile, $sDashboardId);
|
||||
$aResult = array('error' => '');
|
||||
if (!is_null($oDashboard))
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!is_null($oDashboard)) {
|
||||
try {
|
||||
$oDoc = utils::ReadPostedDocument('dashboard_upload_file');
|
||||
$oDashboard->FromXml($oDoc->GetData());
|
||||
$oDashboard->Save();
|
||||
@@ -1104,7 +1107,7 @@ EOF
|
||||
$aParams = utils::ReadParam('params', '', false, 'raw_data');
|
||||
$sDashletClass = $aParams['attr_dashlet_class'];
|
||||
$sDashletType = $aParams['attr_dashlet_type'];
|
||||
$sDashletId = $aParams['attr_dashlet_id'];
|
||||
$sDashletId = utils::HtmlEntities($aParams['attr_dashlet_id']);
|
||||
$aUpdatedProperties = $aParams['updated']; // Code of the changed properties as an array: 'attr_xxx', 'attr_xxy', etc...
|
||||
$aPreviousValues = $aParams['previous_values']; // hash array: 'attr_xxx' => 'old_value'
|
||||
if (is_subclass_of($sDashletClass, 'Dashlet')) {
|
||||
|
||||
@@ -777,7 +777,7 @@ try {
|
||||
break;
|
||||
case 'apply_keyboard_shortcuts':
|
||||
// Note: Mind the 4 blackslashes, see utils::GetClassesForInterface()
|
||||
$aShortcutClasses = utils::GetClassesForInterface('iKeyboardShortcut', '', array('[\\\\/]lib[\\\\/]', '[\\\\/]node_modules[\\\\/]', '[\\\\/]test[\\\\/]'));
|
||||
$aShortcutClasses = utils::GetClassesForInterface('iKeyboardShortcut', '', array('[\\\\/]lib[\\\\/]', '[\\\\/]node_modules[\\\\/]', '[\\\\/]test[\\\\/]', '[\\\\/]tests[\\\\/]'));
|
||||
$aShortcutPrefs = [];
|
||||
foreach ($aShortcutClasses as $cShortcutPlugin) {
|
||||
foreach ($cShortcutPlugin::GetShortcutKeys() as $aShortcutKey) {
|
||||
|
||||
Reference in New Issue
Block a user