You are here

function og_migrate_init in Organic groups 7

Implements hook_init().

File

og_migrate/og_migrate.module, line 65
Migrate and upgrade Organic groups data.

Code

function og_migrate_init() {
  og_migrate_register_plugins();
  $item = menu_get_item();
  if ($item['path'] == 'batch') {

    // Load all the plugins, so it will work in the batch.
    og_migrate_get_plugins();
  }
  elseif (!og_migrate_is_pending() && user_access('access administration pages')) {
    og_needs_migrate(FALSE);
    drupal_set_message(t('There are no pending migration plugins that need to be executed. You can disable Organic groups migrate module.'));
  }
}