/** * Add a new port with the instance values * *@param $p_id Networking ID *@param $p_force=FALSE Force add even if no updates where done *@return nothing **/ function addDB($p_id, $p_force = FALSE) { if (count($this->ptcdUpdates) or $p_force) { // update core $this->ptcdUpdates['on_device'] = $p_id; $this->ptcdUpdates['device_type'] = $this->glpi_type; // $this->ptcdUpdates['device_type']=NETWORKING_TYPE; $portID = parent::add($this->ptcdUpdates); $this->load($portID); // update fusioninventory if (count($this->oFusionInventory_networking_ports->ptcdUpdates) or $p_force) { // $this->oFusionInventory_networking_ports->ptcdUpdates['FK_networking_ports']=$this->getValue('ID'); // $this->oFusionInventory_networking_ports->add($this->oFusionInventory_networking_ports->ptcdUpdates); $this->fusioninventory_networking_ports_ID = $this->addDBFusionInventory(); } $this->load($portID); $this->connect(); // update connections $this->assignVlans(); // update vlans } }