/[drupal]/contributions/modules/me/me.install
ViewVC logotype

Contents of /contributions/modules/me/me.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (show annotations) (download) (as text)
Sun Feb 22 21:15:19 2009 UTC (9 months ago) by cdale
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-5
Changes since 1.4: +15 -2 lines
File MIME type: text/x-php
Fix for issue [#368252] which changes the weight of the 'me' module.
1 <?php
2 // $Id: me.install,v 1.4 2009/01/30 21:39:28 cdale Exp $
3
4 /**
5 * @file
6 *
7 * Provides 'me' aliases install and uninstall routines.
8 */
9
10 /**
11 * Implementation of hook_uninstall().
12 */
13 function me_uninstall() {
14 $vars = array(
15 'me_alias',
16 'me_case_insensitive',
17 'me_redirect',
18 'me_path_rule',
19 'me_paths',
20 'me_redirect_anonymous',
21 'me_rewrite_link',
22 'me_theme_menu_item_link_func',
23 'me_user_override',
24 );
25
26 foreach ($vars as $var) {
27 variable_del($var);
28 }
29 }
30
31 /**
32 * Implementation of hook_update_N() to rebuild the menu so users upgrading don't get crictical errors.
33 */
34 function me_update_6001() {
35 $ret = array();
36
37 menu_rebuild();
38
39 $ret[] = array('success' => TRUE, 'query' => 'The menu has been rebuilt.');
40
41 return $ret;
42 }
43
44 /**
45 * Implementation of hook_update_N() to increase the weight of me
46 * to make sure other modules can use the %user wildcards as they expect
47 * them to be.
48 */
49 function me_update_6002() {
50 $ret = array();
51
52 $ret[] = update_sql("UPDATE {system} SET weight = 999 WHERE name = 'me'");
53
54 return $ret;
55 }

  ViewVC Help
Powered by ViewVC 1.1.2