You are here

function pmperson_update_7104 in Drupal PM (Project Management) 7.2

Same name and namespace in other branches
  1. 8 pmperson/pmperson.install \pmperson_update_7104()
  2. 7.3 pmperson/pmperson.install \pmperson_update_7104()

Migrate PM Person nodes to fields on Drupal users.

File

pmperson/pmperson.install, line 56
Installation and update functions for PM Person module.

Code

function pmperson_update_7104(&$sandbox) {
  $t = get_t();
  module_load_include('inc', 'pmperson', 'includes/pmperson.migrate');

  // Check if update could be performed.
  $link = l(PMPERSON_RESOLVE_DEPENDENCIES_LINK, PMPERSON_RESOLVE_DEPENDENCIES_LINK);
  if (pmperson_migrate_update_could_be_performed() == FALSE) {
    drupal_set_message($t('Cannot perform update. Please visit !link to check how to resolve this issue.', array(
      '!link' => $link,
    )), 'warning', FALSE);
    throw new DrupalUpdateException($t('Cannot perform update. Please visit !link to check how to resolve this issue.', array(
      '!link' => PMPERSON_RESOLVE_DEPENDENCIES_LINK,
    )));
  }
  return pmperson_migrate($sandbox);
}