diff --git a/genericobject.xml b/genericobject.xml
index 1647f9f4..d78c0e51 100644
--- a/genericobject.xml
+++ b/genericobject.xml
@@ -24,6 +24,11 @@
Walid Nouh
+
+ 2.9.2
+ ~9.5.0
+ https://github.com/pluginsGLPI/genericobject/releases/download/2.9.2/glpi-genericobject-2.9.2.tar.bz2
+
2.9.1
~9.5.0
diff --git a/inc/object.class.php b/inc/object.class.php
index af1547bb..51cd515f 100644
--- a/inc/object.class.php
+++ b/inc/object.class.php
@@ -602,8 +602,8 @@ function displayField($canedit, $name, $value, $template, $description = []) {
}
$this->endColumn();
$this->startColumn();
- switch ($description['Type']) {
- case "int(11)":
+ switch (preg_replace('/\(\d+\)$/', '', $description['Type'])) {
+ case "int":
$fk_table = getTableNameForForeignKeyField($name);
if ($fk_table != '') {
$itemtype = getItemTypeForTable($fk_table);
@@ -653,11 +653,11 @@ function displayField($canedit, $name, $value, $template, $description = []) {
}
break;
- case "tinyint(1)":
+ case "tinyint":
Dropdown::showYesNo($name, $value);
break;
- case "varchar(255)":
+ case "varchar":
if (isset($searchoption['autoname']) && $searchoption['autoname']) {
$objectName = autoName($this->fields[$name], $name, ($template === "newcomp"),
$this->getType(), $this->fields["entities_id"]);
diff --git a/setup.php b/setup.php
index b81ef76d..d351c429 100644
--- a/setup.php
+++ b/setup.php
@@ -35,7 +35,7 @@
----------------------------------------------------------------------
*/
-define ('PLUGIN_GENERICOBJECT_VERSION', '2.9.1');
+define ('PLUGIN_GENERICOBJECT_VERSION', '2.9.2');
// Minimal GLPI version, inclusive
define("PLUGIN_GENERICOBJECT_MIN_GLPI", "9.5");