akm77 / ldapcomputers

LDAP computers - GLPI plugin
GNU General Public License v3.0
7 stars 6 forks source link

Clusters Objects #18

Closed EC2311 closed 3 years ago

EC2311 commented 3 years ago

Hello

In GLPI 9.5.5 there are the clusters. Such objects may exist in AD : so LDAP will see them

-> Take care of CLusters table in LDAPcomputers. Thanks

EC2311 commented 3 years ago

After few researches I found the way to do it ! Update the request in inc/Computer.class.php Old request : / $select = "SELECT DISTINCT glpi_plugin_ldapcomputers_computers.id , objectGUID , plugin_ldapcomputers_states_id , plugin_ldapcomputers_configs_id , is_in_glpi_computers , IF ( ISNULL(glpi_computers.name) ,0 ,1 ) AS inglpi FROM glpi_plugin_ldapcomputers_computers LEFT JOIN glpi_computers ON glpi_plugin_ldapcomputers_computers.name = glpi_computers.name"; / New Request $select = "SELECT DISTINCT glpi_plugin_ldapcomputers_computers.id , objectGUID , plugin_ldapcomputers_states_id , plugin_ldapcomputers_configs_id , is_in_glpi_computers , IF ( (ISNULL(glpi_computers.name) and isnull(glpi_clusters.name)) , 0 ,1 ) AS inglpi FROM glpi_plugin_ldapcomputers_computers LEFT JOIN glpi_computers ON glpi_plugin_ldapcomputers_computers.name = glpi_computers.name LEFT JOIN glpi_clusters ON glpi_plugin_ldapcomputers_computers.name = glpi_clusters.name

and it works.
";