Skip to content

Commit ab0813a

Browse files
authored
Update field.class.php
Moved code after new Display Condition
1 parent b7d2e25 commit ab0813a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

inc/field.class.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -887,15 +887,6 @@ public static function showForTab($params)
887887
{
888888
$item = $params['item'];
889889

890-
if($item->fields['type'] == "")
891-
{
892-
$item->fields['type'] = $params['options']['type'];
893-
}
894-
if($item->fields['itilcategories_id'] == "")
895-
{
896-
$item->fields['itilcategories_id'] = $params['options']['itilcategories_id'];
897-
}
898-
899890
$functions = array_column(debug_backtrace(), 'function');
900891
$subtype = isset($_SESSION['glpi_tabs'][strtolower($item::getType())]) ? $_SESSION['glpi_tabs'][strtolower($item::getType())] : '';
901892
$type = substr($subtype, -strlen('$main')) === '$main'
@@ -976,6 +967,15 @@ public static function showForTab($params)
976967
echo "<div id='{$html_id}'>";
977968
}
978969
$display_condition = new PluginFieldsContainerDisplayCondition();
970+
971+
if($item->fields['type'] == "")
972+
{
973+
$item->fields['type'] = $params['options']['type'];
974+
}
975+
if($item->fields['itilcategories_id'] == "")
976+
{
977+
$item->fields['itilcategories_id'] = $params['options']['itilcategories_id'];
978+
}
979979

980980
if ($display_condition->computeDisplayContainer($item, $c_id))
981981
{

0 commit comments

Comments
 (0)