You are here

function migrate_check_advanced_help in Migrate 6

Check to see if the advanced help module is installed, and if not put up a message.

Only call this function if the user is already in a position for this to be useful.

1 call to migrate_check_advanced_help()
_migrate_dashboard_form in ./migrate_pages.inc
Form definition for dashboard page

File

./migrate.module, line 1445
This module provides tools at "administer >> content >> migrate" for analyzing data from various sources and importing them into Drupal tables.

Code

function migrate_check_advanced_help() {
  if (variable_get('migrate_hide_help_message', FALSE)) {
    return;
  }
  if (!module_exists('advanced_help')) {
    $filename = db_result(db_query("SELECT filename FROM {system} WHERE type = 'module' AND name = 'advanced_help'"));
    if ($filename && file_exists($filename)) {
      drupal_set_message(t('If you <a href="@modules">enable the advanced help module</a>,
              Migrate will provide more and better help. <a href="@hide">Hide this message.</a>', array(
        '@modules' => url('admin/build/modules'),
        '@hide' => url('admin/build/views/tools'),
      )));
    }
    else {
      drupal_set_message(t('If you install the advanced help module from !href, Migrate will provide more and better help. <a href="@hide">Hide this message.</a>', array(
        '!href' => l('http://drupal.org/project/advanced_help', 'http://drupal.org/project/advanced_help'),
        '@hide' => url('admin/content/migrate/settings'),
      )));
    }
  }
}