summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.install
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.15/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.install')
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.install37
1 files changed, 37 insertions, 0 deletions
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.install b/kolab.org/www/drupal-7.15/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.install
new file mode 100644
index 0000000..bf067d7
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.install
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * @file
+ * Installation functionality for Administration menu toolbar module.
+ */
+
+/**
+ * Implements hook_install().
+ */
+function admin_menu_toolbar_install() {
+ // Required to load JS/CSS in hook_init() after admin_menu.
+ db_update('system')
+ ->fields(array('weight' => 101))
+ ->condition('type', 'module')
+ ->condition('name', 'admin_menu_toolbar')
+ ->execute();
+}
+
+/**
+ * Set module weight to a value higher than admin_menu.
+ *
+ * At this point, admin_menu should have a weight of 100. To account for
+ * customized weights, we increase the weight relatively.
+ *
+ * @see admin_menu_toolbar_install()
+ */
+function admin_menu_toolbar_update_6300() {
+ $weight = db_query("SELECT weight FROM {system} WHERE type = 'module' AND name = 'admin_menu'")->fetchField();
+ $weight++;
+ db_update('system')
+ ->fields(array('weight' => $weight))
+ ->condition('type', 'module')
+ ->condition('name', 'admin_menu_toolbar')
+ ->execute();
+}
+