Sfoglia il codice sorgente

Fixed a bug when using a hierarchy of locations, since locatins genreally depends on the object's organization

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1385 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 14 anni fa
parent
commit
4bebd0a442
2 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 2 2
      application/ui.extkeywidget.class.inc.php
  2. 1 1
      pages/ajax.render.php

+ 2 - 2
application/ui.extkeywidget.class.inc.php

@@ -336,7 +336,7 @@ EOF
 	/**
 	 * Display the hierarchy of the 'target' class
 	 */
-	public function DisplayHierarchy(WebPage $oPage, $sFilter, $currValue)
+	public function DisplayHierarchy(WebPage $oPage, $sFilter, $currValue, $oObj)
 	{
 		$sDialogTitle = addslashes(Dict::Format('UI:HierarchyOf_Class', MetaModel::GetName($this->sTargetClass)));
 		$oPage->add('<div id="dlg_tree_'.$this->iId.'"><div class="wizContainer" style="vertical-align:top;"><div style="overflow:auto;background:#fff;margin-bottom:5px;" id="tree_'.$this->iId.'">');
@@ -348,7 +348,7 @@ EOF
 		try
 		{
 			$oFilter = DBObjectSearch::FromOQL($sFilter);
-			$oSet = new DBObjectSet($oFilter);
+			$oSet = new DBObjectSet($oFilter, array(), array('this' => $oObj));
 		}
 		catch(MissingQueryArgument $e)
 		{

+ 1 - 1
pages/ajax.render.php

@@ -278,7 +278,7 @@ try
 			$oObj = null;
 		}
 		$oWidget = new UIExtKeyWidget($sTargetClass, $sInputId);
-		$oWidget->DisplayHierarchy($oPage, $sFilter, $currValue);
+		$oWidget->DisplayHierarchy($oPage, $sFilter, $currValue, $oObj);
 		break;
 		
 		////////////////////////////////////////////////////