Skip to content

Commit

Permalink
Merge branch 'release/2.9.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-anne committed Dec 14, 2020
2 parents f276c96 + d335898 commit ab61f27
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions genericobject.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
<author>Walid Nouh</author>
</authors>
<versions>
<version>
<num>2.9.2</num>
<compatibility>~9.5.0</compatibility>
<download_url>https://github.com/pluginsGLPI/genericobject/releases/download/2.9.2/glpi-genericobject-2.9.2.tar.bz2</download_url>
</version>
<version>
<num>2.9.1</num>
<compatibility>~9.5.0</compatibility>
Expand Down
8 changes: 4 additions & 4 deletions inc/object.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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"]);
Expand Down
2 changes: 1 addition & 1 deletion setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit ab61f27

Please sign in to comment.