mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°1582 Fix audit when a current organization is set and there is an audit rule with valid=true
Was generating an OQL missing query argument error SVN:trunk[5991]
This commit is contained in:
@@ -127,5 +127,3 @@ class SecurityException extends CoreException
|
||||
class ArchivedObjectException extends CoreException
|
||||
{
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -497,6 +497,8 @@ class DBObjectSearch extends DBSearch
|
||||
* @param bool $bPositiveMatch if true will add a IN filter, else a NOT IN
|
||||
*
|
||||
* @throws \CoreException
|
||||
*
|
||||
* @since 2.5 N°1418
|
||||
*/
|
||||
public function AddConditionForInOperatorUsingParam($sFilterCode, $aValues, $bPositiveMatch = true)
|
||||
{
|
||||
@@ -506,7 +508,7 @@ class DBObjectSearch extends DBSearch
|
||||
|
||||
$sInParamName = $this->GenerateUniqueParamName();
|
||||
$oParamExpression = new VariableExpression($sInParamName);
|
||||
$this->SetInternalParams(array($sInParamName => $aValues));
|
||||
$this->GetInternalParamsByRef()[$sInParamName] = $aValues;
|
||||
|
||||
$oListExpression = new ListExpression(array($oParamExpression));
|
||||
|
||||
@@ -1086,11 +1088,45 @@ class DBObjectSearch extends DBSearch
|
||||
return $this->m_aParams = $aParams;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array <strong>warning</strong> : array returned by value
|
||||
* @see self::GetInternalParamsByRef to get the attribute by reference
|
||||
*/
|
||||
public function GetInternalParams()
|
||||
{
|
||||
return $this->m_aParams;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @see http://php.net/manual/en/language.references.return.php
|
||||
* @since 2.5.1 N°1582
|
||||
*/
|
||||
public function &GetInternalParamsByRef()
|
||||
{
|
||||
return $this->m_aParams;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sKey
|
||||
* @param mixed $value
|
||||
* @param bool $bDoNotOverride
|
||||
*
|
||||
* @throws \CoreUnexpectedValue if $bDoNotOverride and $sKey already exists
|
||||
*/
|
||||
public function AddInternalParam($sKey, $value, $bDoNotOverride = false)
|
||||
{
|
||||
if ($bDoNotOverride)
|
||||
{
|
||||
if (array_key_exists($sKey, $this->m_aParams))
|
||||
{
|
||||
throw new CoreUnexpectedValue("The key $sKey already exists with value : ".$this->m_aParams[$sKey]);
|
||||
}
|
||||
}
|
||||
|
||||
$this->m_aParams[$sKey] = $value;
|
||||
}
|
||||
|
||||
public function GetQueryParams($bExcludeMagicParams = true)
|
||||
{
|
||||
$aParams = array();
|
||||
|
||||
Reference in New Issue
Block a user