function pmexpense_load in Drupal PM (Project Management) 7
Implements hook_load().
File
- pmexpense/
pmexpense.module, line 692 - Hook implementations and main functions for PM Expense.
Code
function pmexpense_load($nodes) {
foreach ($nodes as $nid => &$node) {
$result = db_select('pmexpense', 'pmex')
->fields('pmex')
->condition('vid', $node->vid)
->execute();
$record = $result
->fetchAssoc();
if (!empty($record)) {
foreach ($record as $key => $value) {
$node->{$key} = $value;
}
}
$node->title_old = $node->title;
}
}