mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
All the overloads of DisplayBareProperties must return an array (otherwise a warning is issued and field validation will not work as expected)
SVN:trunk[2752]
This commit is contained in:
@@ -88,7 +88,7 @@ class QueryOQL extends Query
|
||||
|
||||
function DisplayBareProperties(WebPage $oPage, $bEditMode = false, $sPrefix = '', $aExtraParams = array())
|
||||
{
|
||||
parent::DisplayBareProperties($oPage, $bEditMode, $sPrefix, $aExtraParams);
|
||||
$aFieldsMap = parent::DisplayBareProperties($oPage, $bEditMode, $sPrefix, $aExtraParams);
|
||||
|
||||
if (!$bEditMode)
|
||||
{
|
||||
@@ -102,6 +102,7 @@ class QueryOQL extends Query
|
||||
}
|
||||
$oPage->p(Dict::S('UI:Query:UrlForExcel').':<br/><textarea cols="80" rows="3" READONLY>'.$sUrl.'</textarea>');
|
||||
}
|
||||
return $aFieldsMap;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -142,6 +142,7 @@ EOF
|
||||
|
||||
function DisplayBareProperties(WebPage $oPage, $bEditMode = false, $sPrefix = '', $aExtraParams = array())
|
||||
{
|
||||
return array();
|
||||
}
|
||||
// End of the minimal implementation of iDisplay
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ class Event extends DBObject implements iDisplay
|
||||
|
||||
function DisplayBareProperties(WebPage $oPage, $bEditMode = false, $sPrefix = '', $aExtraParams = array())
|
||||
{
|
||||
if ($bEditMode) return; // Not editable
|
||||
if ($bEditMode) return array(); // Not editable
|
||||
|
||||
$aDetails = array();
|
||||
$sClass = get_class($this);
|
||||
@@ -118,6 +118,7 @@ class Event extends DBObject implements iDisplay
|
||||
$aDetails[] = array('label' => '<span title="'.MetaModel::GetDescription($sClass, $sAttCode).'">'.MetaModel::GetLabel($sClass, $sAttCode).'</span>', 'value' => $sDisplayValue);
|
||||
}
|
||||
$oPage->Details($aDetails);
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1277,7 +1277,7 @@
|
||||
<type>Overload-cmdbAbstractObject</type>
|
||||
<code><![CDATA[ public function DisplayBareProperties(WebPage $oPage, $bEditMode = false, $sPrefix = '', $aExtraParams = array())
|
||||
{
|
||||
parent::DisplayBareProperties($oPage, $bEditMode, $sPrefix, $aExtraParams);
|
||||
$aFieldsMap = parent::DisplayBareProperties($oPage, $bEditMode, $sPrefix, $aExtraParams);
|
||||
if (!$bEditMode)
|
||||
{
|
||||
$oPage->add('<fieldset>');
|
||||
@@ -1285,6 +1285,7 @@
|
||||
$oPage->add($this->DisplayDocumentInline($oPage, 'contents'));
|
||||
$oPage->add('</fieldset>');
|
||||
}
|
||||
return $aFieldsMap;
|
||||
}]]></code>
|
||||
</method>
|
||||
</methods>
|
||||
|
||||
@@ -982,7 +982,7 @@
|
||||
]]></comment>
|
||||
<code><![CDATA[public function DisplayBareProperties(WebPage $oPage, $bEditMode = false, $sPrefix = '', $aExtraParams = array())
|
||||
{
|
||||
parent::DisplayBareProperties($oPage, $bEditMode, $sPrefix, $aExtraParams);
|
||||
$aFieldsMap = parent::DisplayBareProperties($oPage, $bEditMode, $sPrefix, $aExtraParams);
|
||||
if (!$bEditMode)
|
||||
{
|
||||
$oPage->add('<fieldset>');
|
||||
@@ -990,6 +990,7 @@
|
||||
$oPage->add($this->DisplayDocumentInline($oPage, 'file'));
|
||||
$oPage->add('</fieldset>');
|
||||
}
|
||||
return $aFieldsMap;
|
||||
}]]></code>
|
||||
</method>
|
||||
</methods>
|
||||
|
||||
@@ -105,7 +105,7 @@ class SynchroDataSource extends cmdbAbstractObject
|
||||
{
|
||||
$this->Set('database_table_name', $this->GetDataTable());
|
||||
}
|
||||
parent::DisplayBareProperties($oPage, $bEditMode, $sPrefix, $aExtraParams);
|
||||
return parent::DisplayBareProperties($oPage, $bEditMode, $sPrefix, $aExtraParams);
|
||||
}
|
||||
|
||||
public function DisplayBareRelations(WebPage $oPage, $bEditMode = false)
|
||||
|
||||
Reference in New Issue
Block a user