mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 03:58:45 +02:00
N°3233 - Remove "display_template" from the metamodel and compiler
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
require_once(APPROOT.'/application/displayblock.class.inc.php');
|
||||
/**
|
||||
* This class manages the special template format used internally to build the iTop web pages
|
||||
*
|
||||
* @deprecated Since 2.8.0
|
||||
*/
|
||||
class DisplayTemplate
|
||||
{
|
||||
|
||||
@@ -867,18 +867,6 @@ abstract class MetaModel
|
||||
return self::$m_aClassParams[$sClass]["reconc_keys"];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sClass
|
||||
*
|
||||
* @return string
|
||||
* @throws \CoreException
|
||||
*/
|
||||
final static public function GetDisplayTemplate($sClass)
|
||||
{
|
||||
self::_check_subclass($sClass);
|
||||
return array_key_exists("display_template", self::$m_aClassParams[$sClass]) ? self::$m_aClassParams[$sClass]["display_template"] : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sClass
|
||||
* @param bool $bOnlyDeclared
|
||||
|
||||
@@ -1081,12 +1081,6 @@ EOF
|
||||
}
|
||||
$aClassParams['db_finalclass_field'] = $this->GetPropString($oProperties, 'db_final_class_field', $sDefaultFinalClass);
|
||||
|
||||
if (($sDisplayTemplate = $oProperties->GetChildText('display_template')) && (strlen($sDisplayTemplate) > 0))
|
||||
{
|
||||
$sDisplayTemplate = $sModuleRelativeDir.'/'.$sDisplayTemplate;
|
||||
$aClassParams['display_template'] = "utils::GetAbsoluteUrlModulesRoot().'$sDisplayTemplate'";
|
||||
}
|
||||
|
||||
$this->CompileFiles($oProperties, $sTempTargetDir.'/'.$sModuleRelativeDir, $sFinalTargetDir.'/'.$sModuleRelativeDir, '');
|
||||
if (($sIcon = $oProperties->GetChildText('icon')) && (strlen($sIcon) > 0))
|
||||
{
|
||||
|
||||
@@ -770,7 +770,9 @@ class iTopDesignFormat
|
||||
*/
|
||||
protected function From17To18($oFactory)
|
||||
{
|
||||
// Nothing
|
||||
// -- 3233 - Remove "display template" feature from MetaModel
|
||||
$sPath = "/itop_design//class/properties/display_template";
|
||||
$this->RemoveNodeFromXPath($sPath);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1197,7 +1197,6 @@ $sHeader
|
||||
</properties>
|
||||
<naming format=""><attributes/></naming>
|
||||
<reconciliation><attributes/></reconciliation>
|
||||
<display_template/>
|
||||
<icon>$sIcon</icon>
|
||||
</properties>
|
||||
<fields/>
|
||||
|
||||
Reference in New Issue
Block a user