mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°2589 - Infinite loops when logging with a Contact having a non empty TagSet field
This commit is contained in:
@@ -158,6 +158,9 @@ abstract class Expression
|
||||
// recursively builds an array of [classAlias][fieldName] => value
|
||||
abstract public function ListConstantFields();
|
||||
|
||||
// recursively builds an array of parameters to give to current request
|
||||
abstract public function ListParameters();
|
||||
|
||||
public function RequiresField($sClass, $sFieldName)
|
||||
{
|
||||
// #@# todo - optimize : this is called quite often when building a single query !
|
||||
@@ -354,6 +357,11 @@ class SQLExpression extends Expression
|
||||
return array();
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function RenameParam($sOldName, $sNewName)
|
||||
{
|
||||
// Do nothing, since there is nothing to rename
|
||||
@@ -593,6 +601,13 @@ class BinaryExpression extends Expression
|
||||
return $aResult;
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
$aLeft = $this->GetLeftExpr()->ListParameters();
|
||||
$aRight = $this->GetRightExpr()->ListParameters();
|
||||
return array_merge($aLeft, $aRight);
|
||||
}
|
||||
|
||||
public function RenameParam($sOldName, $sNewName)
|
||||
{
|
||||
$this->GetLeftExpr()->RenameParam($sOldName, $sNewName);
|
||||
@@ -934,6 +949,11 @@ class UnaryExpression extends Expression
|
||||
return array();
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function RenameParam($sOldName, $sNewName)
|
||||
{
|
||||
// Do nothing
|
||||
@@ -1848,6 +1868,12 @@ class VariableExpression extends UnaryExpression
|
||||
}
|
||||
return $oRet;
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
return array($this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Temporary, until we implement functions and expression casting!
|
||||
@@ -2001,6 +2027,16 @@ class ListExpression extends Expression
|
||||
return $aRes;
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
$aRes = array();
|
||||
foreach ($this->m_aExpressions as $oExpr)
|
||||
{
|
||||
$aRes = array_merge($aRes, $oExpr->ListParameters());
|
||||
}
|
||||
return $aRes;
|
||||
}
|
||||
|
||||
public function RenameParam($sOldName, $sNewName)
|
||||
{
|
||||
foreach ($this->m_aExpressions as $key => $oExpr)
|
||||
@@ -2142,6 +2178,11 @@ class NestedQueryExpression extends Expression
|
||||
return $this->m_oNestedQuery->ListConstantFields();
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function RenameParam($sOldName, $sNewName)
|
||||
{
|
||||
$this->m_oNestedQuery->RenameParam($sOldName, $sNewName);
|
||||
@@ -2289,6 +2330,11 @@ class FunctionExpression extends Expression
|
||||
return $aRes;
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function RenameParam($sOldName, $sNewName)
|
||||
{
|
||||
foreach ($this->m_aArgs as $key => $oExpr)
|
||||
@@ -2570,6 +2616,11 @@ class IntervalExpression extends Expression
|
||||
return array();
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function RenameParam($sOldName, $sNewName)
|
||||
{
|
||||
$this->m_oValue->RenameParam($sOldName, $sNewName);
|
||||
@@ -2716,6 +2767,11 @@ class CharConcatExpression extends Expression
|
||||
return $aRes;
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function RenameParam($sOldName, $sNewName)
|
||||
{
|
||||
foreach ($this->m_aExpressions as $key => $oExpr)
|
||||
|
||||
Reference in New Issue
Block a user