You are here

function pmtask_load in Drupal PM (Project Management) 7

Implements hook_load().

File

pmtask/pmtask.module, line 619

Code

function pmtask_load($nodes) {
  foreach ($nodes as $nid => &$node) {
    $result = db_select('pmtask', 'sta')
      ->fields('sta')
      ->condition('vid', $node->vid)
      ->execute();
    $record = $result
      ->fetchAssoc();
    foreach ($record as $key => $value) {
      $node->{$key} = $value;
    }
    $node->title_old = $node->title;
    $node->stepno_old = isset($node->stepno) ? $node->stepno : NULL;
  }
}