diff --git a/core/event.class.inc.php b/core/event.class.inc.php
index 303f4d0f4..882a8d9ac 100644
--- a/core/event.class.inc.php
+++ b/core/event.class.inc.php
@@ -187,13 +187,21 @@ class EventIssue extends Event
$aPost = array();
foreach($GLOBALS['_POST'] as $sKey => $sValue)
{
- if (strlen($sValue) < 256)
+ if (is_string($sValue))
{
- $aPost[$sKey] = $sValue;
+ if (strlen($sValue) < 256)
+ {
+ $aPost[$sKey] = $sValue;
+ }
+ else
+ {
+ $aPost[$sKey] = "!long string: ".strlen($sValue). " chars";
+ }
}
else
{
- $aPost[$sKey] = "!long string: ".strlen($sValue). " chars";
+ // Not a string
+ $aPost[$sKey] = (string) $sValue;
}
}
$this->Set('arguments_post', $aPost);
diff --git a/pages/UI.php b/pages/UI.php
index ab9186825..1c362a224 100644
--- a/pages/UI.php
+++ b/pages/UI.php
@@ -307,8 +307,9 @@ function DeleteObjects(WebPage $oP, $sClass, $aObjects, $bDeleteConfirmed)
$oP->p(Dict::S('UI:Delete:PleaseDoTheManualOperations'));
}
$oP->add("
\n");
}
else
@@ -319,11 +320,12 @@ function DeleteObjects(WebPage $oP, $sClass, $aObjects, $bDeleteConfirmed)
$id = $oObj->GetKey();
$oP->p(''.Dict::Format('UI:Delect:Confirm_Object', $oObj->GetHyperLink()).'
');
$oP->add("\n");
}
else
@@ -332,14 +334,15 @@ function DeleteObjects(WebPage $oP, $sClass, $aObjects, $bDeleteConfirmed)
$oSet = CMDBobjectSet::FromArray($sClass, $aObjects);
CMDBAbstractObject::DisplaySet($oP, $oSet, array('display_limit' => false, 'menu' => false));
$oP->add("\n");
}
}
@@ -850,7 +853,6 @@ try
case 'select_for_deletion':
$sFilter = utils::ReadParam('filter', '');
$sFormat = utils::ReadParam('format', '');
- $bSearchForm = utils::ReadParam('search_form', true);
if (empty($sFilter))
{
throw new ApplicationException(Dict::Format('UI:Error:1ParametersMissing', 'filter'));
@@ -860,36 +862,31 @@ try
// TO DO: limit the search filter by the user context
$oFilter = CMDBSearchFilter::unserialize($sFilter); // TO DO : check that the filter is valid
$oSet = new DBObjectSet($oFilter);
- if ($bSearchForm)
- {
- $oBlock = new DisplayBlock($oFilter, 'search', false);
- $oBlock->Display($oP, 0);
- }
$oBlock = new DisplayBlock($oFilter, 'list', false);
$oP->add("\n");
break;
- case 'bulk_delete':
case 'bulk_delete_confirmed':
+ $sTransactionId = utils::ReadPostedParam('transaction_id', '');
+ if (!utils::IsTransactionValid($sTransactionId))
+ {
+ throw new ApplicationException(Dict::S('UI:Error:ObjectsAlreadyDeleted'));
+ }
+ case 'bulk_delete':
$sClass = utils::ReadPostedParam('class', '');
$sClassLabel = MetaModel::GetName($sClass);
$aSelectObject = utils::ReadPostedParam('selectObject', '');
$aObjects = array();
- $sTransactionId = utils::ReadPostedParam('transaction_id', '');
if ( empty($sClass) || empty($aSelectObject)) // TO DO: check that the class name is valid !
{
throw new ApplicationException(Dict::Format('UI:Error:2ParametersMissing', 'class', 'selectObject[]'));
}
- if (!utils::IsTransactionValid($sTransactionId))
- {
- throw new ApplicationException(Dict::S('UI:Error:ObjectsAlreadyDeleted'));
- }
foreach($aSelectObject as $iId)
{
$aObjects[] = $oContext->GetObject($sClass, $iId);