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 2014-07-08 14:59:14

aargentiero
Member
From: Italy
Registered: 2014-03-10
Posts: 3

Bug in PDF plugin

Sorry if this is not the right place.
I think there is a mistake in the PDF plugin.
When enumerating the connections on a computer report, it also report the deleted ones.
I check the computer_items.class code and the query do not take care of the "is_deleted" field.

         $query = "SELECT *
                   FROM `glpi_computers_items`
                   WHERE `computers_id` = '".$ID."'
                         AND `itemtype` = '".$type."'";

I solved changing it like that:

         $query = "SELECT *
                   FROM `glpi_computers_items`
                   WHERE `computers_id` = '".$ID."'
                      AND is_deleted = 0
                         AND `itemtype` = '".$type."'";

Last edited by aargentiero (2014-07-08 14:59:50)


I always thought there was something fundamentally wrong with the universe

Offline

#2 2014-07-11 12:17:13

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: Bug in PDF plugin

It's not a bug.
If the link already exists between computer and item, you will have the computer.


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

Board footer

Powered by FluxBB