Project

General

Profile

Revision 22344d19

ID22344d196d55f3b18f5c63bb8cf3d174b7e31b0f
Parent e878cf6c
Child 0548a1f2

Added by Francois POIROTTE about 7 years ago

[#1621] Suppression HLS avec suppr. de l'hôte

La suppression d'un hôte dans GLPI doit supprimer non seulement sa
configuration côté Vigilo, mais aussi la configuration des HLS qui
lui sont associés.

Change-Id: I0309c65b22e604b2b613826cd98baa99fe0a8de7
Refs: #1621
Reviewed-on: https://vigilo-dev.si.c-s.fr/review/2522
Reviewed-by: Francois POIROTTE <>
Tested-by: Francois POIROTTE <>

View differences:

src/plugins/vigilo/vigilo_hooks.php
146 146

  
147 147
    public function unmonitor($host)
148 148
    {
149
        $dirs = array(VIGILO_CONFDIR, "hosts", "managed", $host . ".xml");
150
        $filename = implode(DIRECTORY_SEPARATOR, $dirs);
151
        if (file_exists($filename)) {
152
            unlink($filename);
149
        $dirs = array(
150
            array(VIGILO_CONFDIR, "hosts", "managed", $host . ".xml"),
151
            array(VIGILO_CONFDIR, "hlservices", "managed", $host . ".xml"),
152
        );
153
        foreach ($dirs as $components) {
154
            $filename = implode(DIRECTORY_SEPARATOR, $components);
155
            if (file_exists($filename)) {
156
                unlink($filename);
157
            }
153 158
        }
154 159
    }
155 160

  

Also available in: Unified diff