Project

General

Profile

Revision 077e4de7

ID077e4de7489b5ceb6478a9386f61293bac14c26e
Parent 0ec9e450
Child ad6689da

Added by Francois POIROTTE about 7 years ago

Prise en compte conventions de codage

Change-Id: I74d6ea904e099519e7d2b08f0586696470514280
Reviewed-on: https://vigilo-dev.si.c-s.fr/review/2367
Tested-by: Build system <>
Reviewed-by: Francois POIROTTE <>

View differences:

src/Vigilo/VigiloHost.php
38 38

  
39 39
    protected function selectTemplates()
40 40
    {
41
	$template_name = $this->computer->getField("template_name");
41
        $template_name = $this->computer->getField("template_name");
42 42

  
43 43
        if ($template_name && $template_name !== "N/A") {
44 44
            $this->children[] = new VigiloHostTemplate($this->computer->getField("template_name"));
......
49 49
            $common_dbtm = new CommonDBTM();
50 50
            $template_name = PluginVigiloVigiloTemplate::getVigiloTemplateNameByID($template_number);
51 51
            $this->children[] = new VigiloHostTemplate($template_name);
52
        }
53
        else {
54
           if (empty($this->children)) {
55
               $template_name = "default";
56
               $this->children[] = new VigiloHostTemplate($template_name);
57
           }
52
        } elseif (empty($this->children)) {
53
            $template_name = "default";
54
            $this->children[] = new VigiloHostTemplate($template_name);
58 55
        }
59 56
    }
60 57

  
......
62 59
    {
63 60
        $location = new Location();
64 61
        $location->getFromDB($this->computer->fields["locations_id"]);
65
        if (!($location->getName()=='N/A')) {
62
        if (!($location->getName() == 'N/A')) {
66 63
            $locationCompleteName=explode(" > ", $location->getField("completename"));
67 64
            $locationRealName=implode("/", $locationCompleteName);
68 65
            $this->children[] = new VigiloGroup($locationRealName);
......
70 67

  
71 68
        $entity = new Entity();
72 69
        $entity->getFromDB($this->computer->fields["entities_id"]);
73
        if (!($entity->getName()=='N/A')) {
70
        if (!($entity->getName() == 'N/A')) {
74 71
            $entityCompleteName=explode(" > ", $entity->getField("completename"));
75 72
            $entityRealName=implode("/", $entityCompleteName);
76 73
            $this->children[] = new VigiloGroup($entityRealName);
......
78 75

  
79 76
        $manufacturer = new Manufacturer();
80 77
        $manufacturer->getFromDB($this->computer->fields["manufacturers_id"]);
81
        if (!($manufacturer->getName()=='N/A')) {
78
        if (!($manufacturer->getName() == 'N/A')) {
82 79
            $this->children[] = new VigiloGroup($manufacturer->getName());
83 80
        }
84 81
    }

Also available in: Unified diff