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 2009-09-08 16:00:42

SilentFrame
Member
Registered: 2009-05-12
Posts: 22

Bug with dropdownConnectPortDeviceType.php ???

Hi,

I'm trying to connect networking port device or computer port to a special port manage by my plugin TransitNetwork (The plugin is for internal purpose only). I added the following line in the setup.php for the plugin

$CFG_GLPI["netport_types"][]=PLUGIN_TRANSITNETWORK_TYPE;

Now, the device "Transit Network" appears in the dropdown box for connection. But then things became ugly, unlike printer or computer no other dropdown boxes appears. After investigations, it seems the problem occured in dropdownConnectPortDeviceType.php at the line
if (isset($LINK_ID_TABLE[$_POST["type"]])&&$_POST["type"]>0). In fact, the $LINK_ID_TABLE  global seems altered.
I printed the $LINK_ID_TABLE after the call for registerPluginType in my plugin and before the call to if (isset($LINK_ID_TABLE[$_POST["type"]])&&$_POST["type"]>0)

After registerPluginType :
Array ( [1] => glpi_computers [2] => glpi_networking [3] => glpi_printers [4] => glpi_monitors [5] => glpi_peripherals [6] => glpi_software [7] => glpi_contacts [8] => glpi_enterprises [9] => glpi_infocoms [10] => glpi_contracts [11] => glpi_cartridges_type [12] => glpi_type_docs [13] => glpi_docs [14] => glpi_kbitems [15] => glpi_users [16] => glpi_tracking [17] => glpi_consumables_type [18] => glpi_consumables [19] => glpi_cartridges [20] => glpi_softwarelicenses [21] => glpi_links [22] => [23] => glpi_phones [24] => ??? [25] => glpi_reminder [26] => ??? [27] => glpi_groups [28] => glpi_entities [29] => glpi_reservation_item [32] => glpi_ocs_config [33] => glpi_registry [34] => glpi_profiles [35] => glpi_mailgate [36] => glpi_rules_descriptions [37] => glpi_transfers [39] => glpi_softwareversions [41] => glpi_computerdisks [42] => glpi_networking_ports [43] => glpi_followups [1050] => glpi_plugin_room [13100] => glpi_plugin_transitnetwork_object )
We can see the two plugins already installed 1050 (room) et 13100 (mine).

Before checking type in dropdownConnectPortDeviceType.php :
Array ( [1] => glpi_computers [2] => glpi_networking [3] => glpi_printers [4] => glpi_monitors [5] => glpi_peripherals [6] => glpi_software [7] => glpi_contacts [8] => glpi_enterprises [9] => glpi_infocoms [10] => glpi_contracts [11] => glpi_cartridges_type [12] => glpi_type_docs [13] => glpi_docs [14] => glpi_kbitems [15] => glpi_users [16] => glpi_tracking [17] => glpi_consumables_type [18] => glpi_consumables [19] => glpi_cartridges [20] => glpi_softwarelicenses [21] => glpi_links [22] => [23] => glpi_phones [24] => ??? [25] => glpi_reminder [26] => ??? [27] => glpi_groups [28] => glpi_entities [29] => glpi_reservation_item [32] => glpi_ocs_config [33] => glpi_registry [34] => glpi_profiles [35] => glpi_mailgate [36] => glpi_rules_descriptions [37] => glpi_transfers [39] => glpi_softwareversions [41] => glpi_computerdisks [42] => glpi_networking_ports [43] => glpi_followups )
The two plugins have disappeared ..

I have tried different values for the plugin type 44, 90 and 24 did not work at all.

Any idea ?

Paolo.

Offline

#2 2009-09-13 11:47:12

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: Bug with dropdownConnectPortDeviceType.php ???

Duplicate, I close


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

Board footer

Powered by FluxBB