You are here

admin_menu_toolbar.install in Administration menu 6.3

Installation functionality for Administration menu toolbar module.

File

admin_menu_toolbar/admin_menu_toolbar.install
View source
<?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_query("UPDATE {system} SET weight = 101 WHERE type = 'module' AND name = 'admin_menu_toolbar'");
}

/**
 * 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() {
  $ret = array();
  $weight = db_result(db_query("SELECT weight FROM {system} WHERE type = 'module' AND name = 'admin_menu'"));
  $weight++;
  $ret[] = update_sql("UPDATE {system} SET weight = {$weight} WHERE type = 'module' AND name = 'admin_menu_toolbar'");
  return $ret;
}

Functions

Namesort descending Description
admin_menu_toolbar_install Implements hook_install().
admin_menu_toolbar_update_6300 Set module weight to a value higher than admin_menu.