overlay.install 480 B

12345678910111213141516171819
  1. <?php
  2. /**
  3. * @file
  4. * Install, update, and uninstall functions for the Overlay module.
  5. */
  6. /**
  7. * Implements hook_enable().
  8. *
  9. * If the module is being enabled through the admin UI, and not from an
  10. * installation profile, reopen the modules page in an overlay.
  11. */
  12. function overlay_enable() {
  13. if (strpos(current_path(), 'admin/modules') === 0) {
  14. // Flag for a redirect to <front>#overlay=admin/modules on hook_init().
  15. $_SESSION['overlay_enable_redirect'] = 1;
  16. }
  17. }