unaffectAddressesOfItem() 정적인 공개 메소드

The address can be unaffected, and remain "free"
static public unaffectAddressesOfItem ( $items_id, $itemtype )
$items_id the id of the item
$itemtype the type of the item
예제 #1
0
 /**
  * @param $type
  * @param $items_id
  **/
 static function razPortInfos($type, $items_id)
 {
     global $DB;
     $nn = new NetworkName();
     $conn = new NetworkPort_NetworkPort();
     $vlan = new NetworkPort_Vlan();
     $crit = array('items_id' => $items_id, 'itemtype' => $type);
     foreach ($DB->request('glpi_networkports', $crit) as $data) {
         $nn->unaffectAddressesOfItem($data['id'], 'NetworkPort');
         if ($conn->getFromDBForNetworkPort($data['id'])) {
             $conn->dohistory = false;
             $conn->delete(array('id' => $conn->fields['id']));
         }
         //Delete vlan to port connection
         $crit = array('networkports_id' => $data['id']);
         $vlan->deleteByCriteria($crit);
     }
 }