function pmperson_requirements in Drupal PM (Project Management) 7.3
Same name and namespace in other branches
- 8 pmperson/pmperson.install \pmperson_requirements()
- 7.2 pmperson/pmperson.install \pmperson_requirements()
Implements hook_requirements().
File
- pmperson/pmperson.install, line 73 
- Installation and update functions for PM Person module.
Code
function pmperson_requirements($phase) {
  $requirements = array();
  if ($phase == 'update') {
    module_load_include('inc', 'pmperson', 'includes/pmperson.migrate');
    if (pmperson_migrate_update_could_be_performed() == FALSE) {
      $t = get_t();
      // Rebuild the menu to allow access to PMPERSON_RESOLVE_DEPENDENCIES_LINK.
      menu_rebuild();
      $link = l($t('migration conflicts page'), PMPERSON_RESOLVE_DEPENDENCIES_LINK);
      $requirements['pmperson_migrate'] = array(
        'title' => $t('PM Person migration'),
        'value' => $t('Migration to Drupal users cannot be performed. Resolve the conflicts listed on the !link and try again.', array(
          '!link' => $link,
        )),
        'severity' => REQUIREMENT_ERROR,
      );
    }
  }
  return $requirements;
}