You are here

function flag_update_page in Flag 7.3

Same name and namespace in other branches
  1. 6.2 includes/flag.export.inc \flag_update_page()
  2. 7.2 includes/flag.export.inc \flag_update_page()

Page for displaying an upgrade message and export form for Flag 1.x flags.

1 string reference to 'flag_update_page'
flag_menu in ./flag.module
Implements hook_menu().

File

includes/flag.export.inc, line 234
Import/Export functionality provided by Flag module.

Code

function flag_update_page($flag) {
  if ($flag
    ->is_compatible()) {
    drupal_set_message(t('The flag %name is already up-to-date with the latest Flag API and does not need upgrading.', array(
      '%name' => $flag->name,
    )));
    drupal_goto(FLAG_ADMIN_PATH);
  }
  drupal_set_message(t('The flag %name is currently using the Flag API version @version, which is not compatible with the current version of Flag. You can upgrade this flag by pasting the below code into <em>@module_flag_default_flags()</em> function in the @module.module file.', array(
    '%name' => $flag->name,
    '@version' => $flag->api_version,
    '@module' => $flag->module,
  )), 'warning');
  flag_update_export($flag);
  return drupal_get_form('flag_export_form', $flag);
}