Project

General

Profile

Revision 79397eb3

ID79397eb307af2cf4bb9f3ed86dc10be42ef9e2f8
Parent 0d761a49
Child 8b28e91d

Added by Romain Chollet about 7 years ago

[#1572] Chargement du champ vigilo_template en ajax

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

View differences:

hook.php
37 37
        if ($computer->getField("is_template")==0) {
38 38
            global $DB;
39 39
            $template_id = PluginVigiloVigiloTemplate::getVigiloTemplateNameByID($computer->getField("vigilo_template"));
40
            
40

  
41 41
            if(!empty($template_id)) {
42 42
                $query = "UPDATE glpi_computers
43 43
                          SET vigilo_template = '" . PluginVigiloVigiloTemplate::getVigiloTemplateNameByID($computer->getField("vigilo_template")) .
44 44
                         "' WHERE id = " . $computer->getField("id") . ";";
45 45
                $DB->queryOrDie($query, "update vigilo_template field");
46 46
            }
47
    
47

  
48 48
            $query = "UPDATE glpi_computers
49 49
                      SET is_dynamic = ' 1
50 50
                      ' WHERE id = " . $computer->getField("id") . ";";
......
96 96
        global $DB;
97 97
        $computer=new Computer();
98 98
        $computer->getFromDB($computer_software_version->getField("computers_id"));
99
        $this->update($computer);   
99
        $this->update($computer);
100 100
    }
101 101

  
102 102
    public function manageSoftwares($software)

Also available in: Unified diff