You are here

function _hosting_ip_load in Hosting 7.4

Same name and namespace in other branches
  1. 7.3 server/hosting.ip.inc \_hosting_ip_load()

IP Utility function for hook_load.

1 call to _hosting_ip_load()
hosting_server_load in server/hosting_server.module
Implements hook_load().

File

server/hosting.ip.inc, line 63
General IP address CRUD routines.

Code

function _hosting_ip_load($node) {
  $ip_list = array();
  $result = db_query("SELECT id,ip_address FROM {hosting_ip_addresses} WHERE nid = :nid ORDER BY id", array(
    ':nid' => $node->nid,
  ));
  while ($obj = $result
    ->fetch()) {
    $ip_list[$obj->id] = $obj->ip_address;
  }
  return $ip_list;
}