Skip to content

Commit ab61f27

Browse files
committed
Merge branch 'release/2.9.2'
2 parents f276c96 + d335898 commit ab61f27

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

genericobject.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
<author>Walid Nouh</author>
2525
</authors>
2626
<versions>
27+
<version>
28+
<num>2.9.2</num>
29+
<compatibility>~9.5.0</compatibility>
30+
<download_url>https://github.com/pluginsGLPI/genericobject/releases/download/2.9.2/glpi-genericobject-2.9.2.tar.bz2</download_url>
31+
</version>
2732
<version>
2833
<num>2.9.1</num>
2934
<compatibility>~9.5.0</compatibility>

inc/object.class.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -602,8 +602,8 @@ function displayField($canedit, $name, $value, $template, $description = []) {
602602
}
603603
$this->endColumn();
604604
$this->startColumn();
605-
switch ($description['Type']) {
606-
case "int(11)":
605+
switch (preg_replace('/\(\d+\)$/', '', $description['Type'])) {
606+
case "int":
607607
$fk_table = getTableNameForForeignKeyField($name);
608608
if ($fk_table != '') {
609609
$itemtype = getItemTypeForTable($fk_table);
@@ -653,11 +653,11 @@ function displayField($canedit, $name, $value, $template, $description = []) {
653653
}
654654
break;
655655

656-
case "tinyint(1)":
656+
case "tinyint":
657657
Dropdown::showYesNo($name, $value);
658658
break;
659659

660-
case "varchar(255)":
660+
case "varchar":
661661
if (isset($searchoption['autoname']) && $searchoption['autoname']) {
662662
$objectName = autoName($this->fields[$name], $name, ($template === "newcomp"),
663663
$this->getType(), $this->fields["entities_id"]);

setup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
----------------------------------------------------------------------
3636
*/
3737

38-
define ('PLUGIN_GENERICOBJECT_VERSION', '2.9.1');
38+
define ('PLUGIN_GENERICOBJECT_VERSION', '2.9.2');
3939

4040
// Minimal GLPI version, inclusive
4141
define("PLUGIN_GENERICOBJECT_MIN_GLPI", "9.5");

0 commit comments

Comments
 (0)