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 2013-09-05 18:06:13

Jm0u
Member
Registered: 2005-01-05
Posts: 910

plugin adressing version 0.84

Bonjour,

Dans la version publier pour le version 0.84 du plugin adressing

il y a une erreur dans l'affichage des adresses IP .

erreur dans la requêtes ci-dessous
la table

dev

n'est pas connu

version de glpi 0.84

cf la requéte :

SELECT `port`.`id`, 'NetworkEquipment' AS itemtype, `dev`.`id` AS on_device, `dev`.`name` AS dname, '' AS pname, `glpi_ipaddresses`.`name` as ip, `port`.`mac`, `dev`.`users_id`, INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum 
FROM `glpi_networkports` port 
LEFT JOIN `glpi_networkequipments` dev ON (`port`.`items_id` = `dev`.`id` AND `port`.`itemtype` = 'NetworkEquipment') 
LEFT JOIN `glpi_networknames` ON (`port`.`id` = `glpi_networknames`.`items_id`) 
LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`) 
WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= '3232236288' AND INET_ATON(`glpi_ipaddresses`.`name`) <= '3232236337' AND `dev`.`is_deleted` = 0 AND `dev`.`is_template` = 0 AND ( `dev`.`entities_id` IN ('10', '12', '6', '11', '20', '23', '18', '21', '24', '17', '19', '1', '22') ) 
UNION
SELECT `port`.`id`, 'Computer' AS `itemtype`, `port`.`items_id`, `dev`.`name` AS dname, `port`.`name` AS pname, `glpi_ipaddresses`.`name` as ip, `port`.`mac`, `dev`.`users_id`, INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum 
FROM `glpi_networkports` port 
LEFT JOIN `glpi_computers` dev ON (`port`.`items_id` = `dev`.`id` AND `port`.`itemtype` = 'Computer') 
LEFT JOIN `glpi_networknames` ON (`port`.`id` = `glpi_networknames`.`items_id`) 
LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`) 
WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= '3232236288' AND INET_ATON(`glpi_ipaddresses`.`name`) <= '3232236337' AND `dev`.`is_deleted` = 0 AND `dev`.`is_template` = 0 AND ( `dev`.`entities_id` IN ('10', '12', '6', '11', '20', '23', '18', '21', '24', '17', '19', '1', '22') ) 
UNION
SELECT `port`.`id`, 'NetworkEquipment' AS `itemtype`, `port`.`items_id`, `dev`.`name` AS dname, `port`.`name` AS pname, `glpi_ipaddresses`.`name` as ip, `port`.`mac`, `dev`.`users_id`, INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum 
FROM `glpi_networkports` port 
LEFT JOIN `glpi_networkequipments` dev ON (`port`.`items_id` = `dev`.`id` AND `port`.`itemtype` = 'NetworkEquipment') 
LEFT JOIN `glpi_networknames` ON (`port`.`id` = `glpi_networknames`.`items_id`) 
LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`) 
WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= '3232236288' AND INET_ATON(`glpi_ipaddresses`.`name`) <= '3232236337' AND `dev`.`is_deleted` = 0 AND `dev`.`is_template` = 0 AND ( `dev`.`entities_id` IN ('10', '12', '6', '11', '20', '23', '18', '21', '24', '17', '19', '1', '22') ) 
UNION
SELECT `port`.`id`, 'Peripheral' AS `itemtype`, `port`.`items_id`, `dev`.`name` AS dname, `port`.`name` AS pname, `glpi_ipaddresses`.`name` as ip, `port`.`mac`, `dev`.`users_id`, INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum 
FROM `glpi_networkports` port 
LEFT JOIN `glpi_peripherals` dev ON (`port`.`items_id` = `dev`.`id` AND `port`.`itemtype` = 'Peripheral') 
LEFT JOIN `glpi_networknames` ON (`port`.`id` = `glpi_networknames`.`items_id`) 
LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`) 
WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= '3232236288' AND INET_ATON(`glpi_ipaddresses`.`name`) <= '3232236337' AND `dev`.`is_deleted` = 0 AND `dev`.`is_template` = 0 AND ( `dev`.`entities_id` IN ('10', '12', '6', '11', '20', '23', '18', '21', '24', '17', '19', '1', '22') ) 
UNION
SELECT `port`.`id`, 'Phone' AS `itemtype`, `port`.`items_id`, `dev`.`name` AS dname, `port`.`name` AS pname, `glpi_ipaddresses`.`name` as ip, `port`.`mac`, `dev`.`users_id`, INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum 
FROM `glpi_networkports` port 
LEFT JOIN `glpi_phones` dev ON (`port`.`items_id` = `dev`.`id` AND `port`.`itemtype` = 'Phone') 
LEFT JOIN `glpi_networknames` ON (`port`.`id` = `glpi_networknames`.`items_id`) 
LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`) 
WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= '3232236288' AND INET_ATON(`glpi_ipaddresses`.`name`) <= '3232236337' AND `dev`.`is_deleted` = 0 AND `dev`.`is_template` = 0 AND ( `dev`.`entities_id` IN ('10', '12', '6', '11', '20', '23', '18', '21', '24', '17', '19', '1', '22') ) 
UNION
SELECT `port`.`id`, 'Printer' AS `itemtype`, `port`.`items_id`, `dev`.`name` AS dname, `port`.`name` AS pname, `glpi_ipaddresses`.`name` as ip, `port`.`mac`, `dev`.`users_id`, INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum 
FROM `glpi_networkports` port 
LEFT JOIN `glpi_printers` dev ON (`port`.`items_id` = `dev`.`id` AND `port`.`itemtype` = 'Printer') 
LEFT JOIN `glpi_networknames` ON (`port`.`id` = `glpi_networknames`.`items_id`) 
LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`) 
WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= '3232236288' AND INET_ATON(`glpi_ipaddresses`.`name`) <= '3232236337' AND `dev`.`is_deleted` = 0 AND `dev`.`is_template` = 0 AND ( `dev`.`entities_id` IN ('10', '12', '6', '11', '20', '23', '18', '21', '24', '17', '19', '1', '22') ) 
UNION
SELECT `port`.`id`, 'PluginFusioninventoryUnknownDevice' AS `itemtype`, `port`.`items_id`, `dev`.`name` AS dname, `port`.`name` AS pname, `glpi_ipaddresses`.`name` as ip, `port`.`mac`, `dev`.`users_id`, INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum 
FROM `glpi_networkports` port 
LEFT JOIN `glpi_plugin_fusioninventory_unknowndevices` dev ON (`port`.`items_id` = `dev`.`id` AND `port`.`itemtype` = 'PluginFusioninventoryUnknownDevice') 
LEFT JOIN `glpi_networknames` ON (`port`.`id` = `glpi_networknames`.`items_id`) 
LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`) 
WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= '3232236288' AND INET_ATON(`glpi_ipaddresses`.`name`) <= '3232236337' AND `dev`.`is_deleted` = 0 AND `dev`.`is_template` = 0 AND ( `dev`.`entities_id` IN ('10', '12', '6', '11', '20', '23', '18', '21', '24', '17', '19', '1', '22') )

Navigateurs : Chrome
Installation : Package GLPI 0.84.2
Serveur  : Apache 2 / Base : 5.0.15 / Langage : PHP 4.4.1 pl1 / PhpMyAdmin 2.6.4-pl3

Offline

#2 2013-09-06 09:16:12

daprod
Member
Registered: 2009-10-29
Posts: 4

Re: plugin adressing version 0.84

Pour corriger le problème :

Modifier le fichier inc\addressing.class.php

Remplacer la ligne Ligne 328 :

$sql .= " AND `glpi_networkequipments`.`networks_id` = ".$this->fields["networks_id"];

Par

$sql .= " AND `dev`.`networks_id` = ".$this->fields["networks_id"];

Remplacer la ligne Ligne 354 :

$sql .= " AND `" . $itemtable . "`.`networks_id`= ".$this->fields["networks_id"];

Par

$sql .= " AND `dev`.`networks_id`= ".$this->fields["networks_id"];

Last edited by daprod (2013-09-06 09:25:14)

Offline

#3 2013-09-06 09:23:48

ripp2003
Member
Registered: 2006-08-24
Posts: 14

Re: plugin adressing version 0.84

Merci, cela fonctionne parfaitement; Par contre la seconde modification est à la ligne 354 ;-)

Offline

#4 2013-09-06 09:25:47

daprod
Member
Registered: 2009-10-29
Posts: 4

Re: plugin adressing version 0.84

copier/coller smile

Offline

#5 2013-09-06 09:37:06

Jm0u
Member
Registered: 2005-01-05
Posts: 910

Re: plugin adressing version 0.84

Merci pour cette correction
Mais nouvelle erreur

Unknown column 'dev.users_id' in 'field list'

dans la même requéte

Last edited by Jm0u (2013-09-06 09:39:17)


Navigateurs : Chrome
Installation : Package GLPI 0.84.2
Serveur  : Apache 2 / Base : 5.0.15 / Langage : PHP 4.4.1 pl1 / PhpMyAdmin 2.6.4-pl3

Offline

#6 2014-07-02 11:08:21

manul
Member
From: Marseille
Registered: 2005-04-26
Posts: 46

Re: plugin adressing version 0.84

Salut,

Vraisemblablement le même problème que celui qui est évoqué ici : http://www.glpi-project.org/forum/viewt … 85#p178385

Non ?

Offline

Board footer

Powered by FluxBB