Mercurial > hg > rr-repo
comparison modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.install @ 6:a75ead649730
added biblio, admin_menu and reference modules
author | danieleb <danielebarchiesi@me.com> |
---|---|
date | Fri, 20 Sep 2013 11:18:21 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
5:d72257b2ddc2 | 6:a75ead649730 |
---|---|
1 <?php | |
2 | |
3 /** | |
4 * @file | |
5 * Installation functionality for Administration menu toolbar module. | |
6 */ | |
7 | |
8 /** | |
9 * Implements hook_install(). | |
10 */ | |
11 function admin_menu_toolbar_install() { | |
12 // Required to load JS/CSS in hook_init() after admin_menu. | |
13 db_update('system') | |
14 ->fields(array('weight' => 101)) | |
15 ->condition('type', 'module') | |
16 ->condition('name', 'admin_menu_toolbar') | |
17 ->execute(); | |
18 } | |
19 | |
20 /** | |
21 * Set module weight to a value higher than admin_menu. | |
22 * | |
23 * At this point, admin_menu should have a weight of 100. To account for | |
24 * customized weights, we increase the weight relatively. | |
25 * | |
26 * @see admin_menu_toolbar_install() | |
27 */ | |
28 function admin_menu_toolbar_update_6300() { | |
29 $weight = db_query("SELECT weight FROM {system} WHERE type = 'module' AND name = 'admin_menu'")->fetchField(); | |
30 $weight++; | |
31 db_update('system') | |
32 ->fields(array('weight' => $weight)) | |
33 ->condition('type', 'module') | |
34 ->condition('name', 'admin_menu_toolbar') | |
35 ->execute(); | |
36 } | |
37 |