You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2017-11-14 10:48:16

machobymb
Member
Registered: 2017-11-14
Posts: 4

[Solved] Add room problem in Room plugin in GLPI 9.2

Hi,

I installed the Room plugin to 9.2, but if I would add a new room, add button isn't in bottom of form. The room management must have for me.
How upgrade the plugin, or upgrade GLPI to 9.1.6?

Thanks!

Last edited by machobymb (2017-11-26 23:05:46)

Offline

#2 2017-11-17 01:28:39

machobymb
Member
Registered: 2017-11-14
Posts: 4

Re: [Solved] Add room problem in Room plugin in GLPI 9.2

I viewed the source (room.class.php). The  form rendering is incorrect, because  in debug mode wrote  this error message:
"Fatal error: Call to undefined method Dropdown::showInteger() in /var/www/html/glpi/plugins/room/inc/room.class.php on line 315"

This line is in  source:

Dropdown::showInteger("size", $this->fields["size"],0, 500);

What is the problem in this line?

Last edited by machobymb (2017-11-17 01:37:29)

Offline

#3 2017-11-23 00:48:21

machobymb
Member
Registered: 2017-11-14
Posts: 4

Re: [Solved] Add room problem in Room plugin in GLPI 9.2

Heureka!

I found this information in GitHub: the showInteger function  is deprecated.
I changed the line 315 in room.class.php:

if (version_compare(GLPI_VERSION, '9.2', '<')) {
Dropdown::showInteger("size", $this->fields["size"],0, 500);
} else  {
Dropdown::showNumber("size", array('value' => $this->fields["size"], 'min' =>  0, 'max' => 500));
}

This code  was perfect!
I  thought that showDateFormItem  is deprecated too in line 331.
I changed the line 331 (now 335) in room.class.php:

if (version_compare(GLPI_VERSION, '9.2', '<')) {
Dropdown::showDateFormItem("buy", $this->fields["buy"],true, true);
} else  {
Dropdown::showDateField("buy", array('value' => $this->fields["buy"], 'maybeempty' =>  true, 'canedit' => true, 'min' => '', 'max' => ''));
}

The form  is good now.
Where can I found full documentation from GLPI functions. I'd like develop  a specific event calendar plugin to my  workplace.

Offline

#4 2018-01-14 22:53:38

CDuv
Member
Registered: 2007-04-12
Posts: 102

Re: [Solved] Add room problem in Room plugin in GLPI 9.2

Please note that plugin Room is being updated for GLPI v9.2, see https://github.com/pluginsGLPI/room/issues/27

Offline

Board footer

Powered by FluxBB