Skip to content

Commit b221133

Browse files
committed
Revert "Update field.class.php"
This reverts commit ab0813a.
1 parent 992b5f6 commit b221133

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,6 +887,15 @@ 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+
890899
$functions = array_column(debug_backtrace(), 'function');
891900
$subtype = isset($_SESSION['glpi_tabs'][strtolower($item::getType())]) ? $_SESSION['glpi_tabs'][strtolower($item::getType())] : '';
892901
$type = substr($subtype, -strlen('$main')) === '$main'
@@ -967,15 +976,6 @@ public static function showForTab($params)
967976
echo "<div id='{$html_id}'>";
968977
}
969978
$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)