You are here

function pmproject_load in Drupal PM (Project Management) 7

Implements hook_load().

File

pmproject/pmproject.module, line 560

Code

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