You are here

function pmtimetracking_pmorganization_change in Drupal PM (Project Management) 7

Implements hook_pmorganization_change().

File

pmtimetracking/pmtimetracking.module, line 164
Main module functions for PM Timetracking.

Code

function pmtimetracking_pmorganization_change($organization_nid, $organization_title) {
  $num_updated = db_update('pmtimetracking')
    ->fields(array(
    'organization_title' => $organization_title,
  ))
    ->condition('organization_nid', $organization_nid, '=')
    ->condition('organization_title', $organization_title, '<>')
    ->execute();
  if ($num_update) {
    watchdog('PM Timetracking:', "{$num_updated} number of entries updated silently.");
  }
}