mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
#137 #203 #204 #119 - Finalized the new (simplified) module for user rights management ; needed to review deeply the data integrity management to have the setup working again!
SVN:trunk[697]
This commit is contained in:
@@ -320,13 +320,15 @@ class BulkChange
|
||||
// skip the private key, if any
|
||||
if ($sAttCode == 'id') continue;
|
||||
|
||||
if (!$oTargetObj->CheckValue($sAttCode, $aRowData[$iCol]))
|
||||
$res = $oTargetObj->CheckValue($sAttCode, $aRowData[$iCol]);
|
||||
if ($res === true)
|
||||
{
|
||||
$aErrors[$sAttCode] = "Unexpected value";
|
||||
$oTargetObj->Set($sAttCode, $aRowData[$iCol]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$oTargetObj->Set($sAttCode, $aRowData[$iCol]);
|
||||
// $res is a string with the error description
|
||||
$aErrors[$sAttCode] = "Unexpected value for attribute '$sAttCode': $res";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -363,9 +365,11 @@ class BulkChange
|
||||
|
||||
// Checks
|
||||
//
|
||||
if (!$oTargetObj->CheckConsistency())
|
||||
$res = $oTargetObj->CheckConsistency();
|
||||
if ($res !== true)
|
||||
{
|
||||
$aErrors["GLOBAL"] = "Attributes not consistent with each others";
|
||||
// $res contains the error description
|
||||
$aErrors["GLOBAL"] = "Attributes not consistent with each others: $res";
|
||||
}
|
||||
return $aResults;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user