function flag_update_page in Flag 6.2
Same name and namespace in other branches
- 7.3 includes/flag.export.inc \flag_update_page()
- 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 - Implementation of hook_menu().
File
- includes/
flag.export.inc, line 217 - 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('admin/build/flags');
}
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);
}