Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLPI 9.2 #28

Closed
machobymb opened this issue Nov 18, 2017 · 2 comments
Closed

GLPI 9.2 #28

machobymb opened this issue Nov 18, 2017 · 2 comments

Comments

@machobymb
Copy link

I tried it 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"

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

@machobymb
Copy link
Author

machobymb commented Nov 22, 2017

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.

@jackburton79
Copy link
Collaborator

works in 9.4 now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants