mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
Obsolescence: finalizing the implementation of the flag (hide obsolete objects, show an icon on hyperlinks and a tag on the object details, user preference defaulting to the new setting 'show_obsolete_data')
SVN:trunk[4739]
This commit is contained in:
@@ -1351,9 +1351,17 @@ class QueryBuilderExpressions
|
||||
protected $m_aJoinFields;
|
||||
protected $m_aClassIds;
|
||||
|
||||
public function __construct($oSearch, $aGroupByExpr = null)
|
||||
public function __construct(DBObjectSearch $oSearch, $aGroupByExpr = null)
|
||||
{
|
||||
$this->m_oConditionExpr = $oSearch->GetCriteria();
|
||||
if ($oSearch->GetShowObsoleteData() || !MetaModel::IsObsoletable($oSearch->GetClass()))
|
||||
{
|
||||
$this->m_oConditionExpr = $oSearch->GetCriteria();
|
||||
}
|
||||
else
|
||||
{
|
||||
$oNotObsolete = new BinaryExpression(new FieldExpression('obsolescence_flag', $oSearch->GetClassAlias()), '=', new ScalarExpression(0));
|
||||
$this->m_oConditionExpr = new BinaryExpression($oSearch->GetCriteria(), 'AND', $oNotObsolete);
|
||||
}
|
||||
$this->m_aSelectExpr = array();
|
||||
$this->m_aGroupByExpr = $aGroupByExpr;
|
||||
$this->m_aJoinFields = array();
|
||||
|
||||
Reference in New Issue
Block a user