| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id: gallery_menu.install,v 1.1.2.2 2008/06/14 19:59:14 profix898 Exp $ 3 4 /** 5 * gallery_menu.module : gallery_menu.install 6 * Install/Uninstall functions 7 */ 8 9 /** 10 * Implementation of hook_install(). 11 */ 12 function gallery_menu_install() { 13 } 14 15 /** 16 * Implementation of hook_update_N(). 17 */ 18 function gallery_menu_update_6000() { 19 $ret = array(); 20 // Remove all 'gallery_menu_*' variables except 'gallery_menu_depth' 21 $depth = variable_get('gallery_menu_depth', 3); 22 $ret[] = update_sql("DELETE FROM {variable} WHERE name LIKE 'gallery_menu_%'"); 23 variable_set('gallery_menu_depth', $depth); 24 25 return $ret; 26 } 27 28 /** 29 * Implementation of hook_uninstall(). 30 */ 31 function gallery_menu_uninstall() { 32 // Remove all link items 33 $result = db_query("SELECT link_path FROM {menu_links} WHERE module = '%s' AND link_path LIKE '%s'", 'gallery_menu', variable_get('gallery_base', 'gallery') .'/%'); 34 while ($item = db_fetch_object($result)) { 35 menu_link_delete(NULL, $item->link_path); 36 } 37 // 38 db_query("DELETE FROM {variable} WHERE name LIKE '%s'", 'gallery_menu_%'); 39 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |