mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°8528 - ignore silo not applied on 1:n linkedset displayed in form in portal
This commit is contained in:
@@ -232,6 +232,7 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
|
||||
{
|
||||
$aRet = array();
|
||||
$this->oOriginalSet->Rewind();
|
||||
$this->oOriginalSet->OptimizeColumnLoad([$this->sClass => []]);
|
||||
$iRow = 0;
|
||||
while ($oObject = $this->oOriginalSet->Fetch())
|
||||
{
|
||||
@@ -321,8 +322,6 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
|
||||
*/
|
||||
public function Fetch()
|
||||
{
|
||||
$this->LoadOriginalIds();
|
||||
|
||||
$ret = $this->current();
|
||||
if ($ret === false)
|
||||
{
|
||||
@@ -353,7 +352,7 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
|
||||
if ($this->iCursor < $iPreservedCount)
|
||||
{
|
||||
$sId = key($this->aPreserved);
|
||||
$oRet = MetaModel::GetObject($this->sClass, $sId);
|
||||
$oRet = MetaModel::GetObject($this->sClass, $sId, true, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace Combodo\iTop\Core\AttributeDefinition;
|
||||
use CMDBSource;
|
||||
use Combodo\iTop\Application\UI\Links\Set\BlockLinkSetDisplayAsProperty;
|
||||
use Combodo\iTop\Form\Field\LinkedSetField;
|
||||
use Combodo\iTop\Portal\Helper\ScopeValidatorHelper;
|
||||
use Combodo\iTop\Renderer\Console\ConsoleBlockRenderer;
|
||||
use Combodo\iTop\Service\Links\LinkSetModel;
|
||||
use CoreException;
|
||||
@@ -21,6 +22,7 @@ use Exception;
|
||||
use ExceptionLog;
|
||||
use IssueLog;
|
||||
use MetaModel;
|
||||
use ModuleDesign;
|
||||
use ormLinkSet;
|
||||
use ValueSetObjects;
|
||||
|
||||
@@ -154,6 +156,14 @@ class AttributeLinkedSet extends AttributeDefinition
|
||||
$oLinkSearch->AddCondition_PointingTo($oRemoteSearch, $this->GetExtKeyToRemote());
|
||||
}
|
||||
}
|
||||
//Add silo in portal context
|
||||
if (defined('PORTAL_ID'))
|
||||
{
|
||||
$oModuleDesign = new ModuleDesign(PORTAL_ID);
|
||||
$oScopeValidatorHelper = new ScopeValidatorHelper($oModuleDesign, PORTAL_ID);
|
||||
$oScopeValidatorHelper->AddScopeToQuery($oLinkSearch, $oLinkSearch->GetClass());
|
||||
}
|
||||
|
||||
$oLinks = new DBObjectSet($oLinkSearch);
|
||||
$oLinkSet = new ormLinkSet($this->GetHostClass(), $this->GetCode(), $oLinks);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user