diff modules/overlay/overlay.install @ 0:ff03f76ab3fe

initial version
author danieleb <danielebarchiesi@me.com>
date Wed, 21 Aug 2013 18:51:11 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/overlay/overlay.install	Wed Aug 21 18:51:11 2013 +0100
@@ -0,0 +1,19 @@
+<?php
+
+/**
+ * @file
+ * Install, update, and uninstall functions for the Overlay module.
+ */
+
+/**
+ * Implements hook_enable().
+ *
+ * If the module is being enabled through the admin UI, and not from an
+ * installation profile, reopen the modules page in an overlay.
+ */
+function overlay_enable() {
+  if (strpos(current_path(), 'admin/modules') === 0) {
+    // Flag for a redirect to <front>#overlay=admin/modules on hook_init().
+    $_SESSION['overlay_enable_redirect'] = 1;
+  }
+}