You are here

function pmnote_load in Drupal PM (Project Management) 7

Implements hook_load().

File

pmnote/pmnote.module, line 425
Functions for the PM Note module.

Code

function pmnote_load($nodes) {
  foreach ($nodes as $nid => &$node) {
    $result = db_select('pmnote', 'sno')
      ->fields('sno')
      ->condition('sno.vid', $node->vid)
      ->execute();
    $record = $result
      ->fetchAssoc();
    foreach ($record as $key => $value) {
      $node->{$key} = $value;
    }
    $node->title_old = $node->title;
  }
}