瀏覽代碼

#509 Error in the display of a replica not yet synchronized

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1739 a333f486-631f-4898-b8df-5754b55c2be0
romainq 13 年之前
父節點
當前提交
c0062afe9c
共有 1 個文件被更改,包括 9 次插入6 次删除
  1. 9 6
      synchro/synchrodatasource.class.inc.php

+ 9 - 6
synchro/synchrodatasource.class.inc.php

@@ -1990,13 +1990,16 @@ class SynchroReplica extends DBObject implements iDisplay
 		}
 		$oPage->Details($aDetails);
 		$oPage->add('</fieldset>');
-		$oDestObj = MetaModel::GetObject($this->Get('dest_class'), $this->Get('dest_id'), false);
-		if (is_object($oDestObj))
+		if (strlen($this->Get('dest_class')) > 0)
 		{
-			$oPage->add('<fieldset>');
-			$oPage->add('<legend>'.Dict::Format('Core:SynchroReplica:TargetObject', $oDestObj->GetHyperlink()).'</legend>');
-				$oDestObj->DisplayBareProperties($oPage, false, $sPrefix, $aExtraParams);
-			$oPage->add('<fieldset>');
+			$oDestObj = MetaModel::GetObject($this->Get('dest_class'), $this->Get('dest_id'), false);
+			if (is_object($oDestObj))
+			{
+				$oPage->add('<fieldset>');
+				$oPage->add('<legend>'.Dict::Format('Core:SynchroReplica:TargetObject', $oDestObj->GetHyperlink()).'</legend>');
+					$oDestObj->DisplayBareProperties($oPage, false, $sPrefix, $aExtraParams);
+				$oPage->add('<fieldset>');
+			}
 		}
 		$oPage->add('</td><td>');
 		$oPage->add('<fieldset>');