Project

General

Profile

Revision 2ef80588

ID2ef805887283d67552f52dda63709b6c85d88c78
Parent b204adb9
Child 0d761a49

Added by Romain Chollet about 7 years ago

[#1570] Ajout du TCP dans les tests personnalisés, ajouts de tests pour éviter des warnings PHP, prise en charge du futur champ vigilo_template

Change-Id: I8652384cd1116ce54cdc66e48977c5174b1188be
Reviewed-on: https://vigilo-dev.si.c-s.fr/review/2311
Reviewed-by: Francois POIROTTE <>
Tested-by: Francois POIROTTE <>

View differences:

Vigilo/VigiloHost.php
43 43
        if ($template_name && $template_name !== "N/A") {
44 44
            $this->children[] = new VigiloHostTemplate($this->computer->getField("template_name"));
45 45
        }
46
        $refs = array(
46
        /*$refs = array(
47 47
            "glpi_operatingsystems" => "operatingsystems_id",
48 48
            "glpi_operatingsystemversions" => "operatingsystemversions_id",
49 49
            "glpi_operatingsystemservicepacks" => "operatingsystemservicepacks_id",
......
66 66
            $model = implode(" - ", $model);
67 67
        }
68 68

  
69
        $this->children[] = new VigiloHostTemplate($model);
69
        $this->children[] = new VigiloHostTemplate($model);*/
70

  
71

  
72
        $template_number = $this->computer->getField("vigilo_template");
73
        if ($template_number !== '0') {
74
            $common_dbtm = new CommonDBTM();
75
            $template_name = $this->computer->getVigiloTemplateName($template_number);
76
        }
77
        else {
78
           $template_name = "default";
79
        }
80
        $this->children[] = new VigiloHostTemplate($template_name);
70 81
    }
71 82

  
72 83
    protected function selectGroups()

Also available in: Unified diff