You are here

function features_cleanup in Features 7.2

Page callback for 'admin/structure/features/cleanup'.

Callback for clearing cache after enabling a feature.

Return value

int|void If the token is missing or invalid, a MENU_NOT_FOUND. If the token is valid, the process will exit here.

1 string reference to 'features_cleanup'
features_menu in ./features.module
Implements hook_menu().

File

./features.admin.inc, line 1540
Forms for Features admin screens.

Code

function features_cleanup() {
  if (!empty($_GET['token']) && drupal_valid_token($_GET['token'])) {
    drupal_flush_all_caches();

    // The following functions need to be run because drupal_flush_all_caches()
    // runs rebuilds in the wrong order. The node type cache is rebuilt *after*
    // the menu is rebuilt, meaning that the menu tree is stale in certain
    // circumstances after drupal_flush_all_caches(). We rebuild again.
    menu_rebuild();
    drupal_goto('admin/structure/features');
  }
  return MENU_NOT_FOUND;
}