You are here

function hosting_ssl_node_load in Hosting 7.3

Same name and namespace in other branches
  1. 7.4 web_server/ssl/hosting_ssl.nodeapi.inc \hosting_ssl_node_load()

Implements hook_node_load().

File

web_server/ssl/hosting_ssl.nodeapi.inc, line 312
NodeAPI functions for the Hosting SSL module.

Code

function hosting_ssl_node_load($nodes, $types) {
  foreach ($nodes as $k => $node) {
    $result = db_query("SELECT ssl_enabled, ssl_key FROM {hosting_ssl_site} WHERE vid = :vid", array(
      ':vid' => $node->vid,
    ))
      ->fetchObject();
    if ($result) {
      $nodes[$k]->ssl_enabled = $result->ssl_enabled;
      $nodes[$k]->ssl_key = $result->ssl_key;
    }
  }
}