From 21c5b71795aec277a8b01ecea74e809a24be0229 Mon Sep 17 00:00:00 2001 From: Steven Wittens <steven@10.no-reply.drupal.org> Date: Fri, 6 Apr 2007 05:29:22 +0000 Subject: [PATCH] #130991: Custom menu items, part 1 --- modules/menu/menu.install | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 modules/menu/menu.install diff --git a/modules/menu/menu.install b/modules/menu/menu.install new file mode 100644 index 000000000000..784bae5551ee --- /dev/null +++ b/modules/menu/menu.install @@ -0,0 +1,45 @@ +<?php +// $Id$ + +/** + * Implementation of hook_install(). + */ +function menu_install() { + switch ($GLOBALS['db_type']) { + case 'mysql': + case 'mysqli': + db_query("CREATE TABLE {menu_edit} ( + path varchar(255) NOT NULL default '' , + disabled int NOT NULL default 0, + title varchar(255) NOT NULL default '', + description varchar(255) NOT NULL default '', + weight int NOT NULL default 0 , + type int NOT NULL default 0 , + admin int NOT NULL default 0, + parent varchar(255) NOT NULL default '', + PRIMARY KEY (path) + ) /*!40100 DEFAULT CHARACTER SET UTF8 */ "); + break; + case 'pgsql': + db_query("CREATE TABLE {menu_edit} ( + path varchar(255) NOT NULL default '' , + disabled int NOT NULL default 0, + title varchar(255) NOT NULL default '', + description varchar(255) NOT NULL default '', + weight int NOT NULL default 0 , + type int NOT NULL default 0 , + admin int NOT NULL default 0, + parent varchar(255) NOT NULL default '', + PRIMARY KEY (path) + )"); + break; + } +} + +/** + * Implementation of hook_uninstall(). + */ +function menu_uninstall() { + db_query('DROP TABLE {menu_edit}'); + menu_rebuild(); +} -- GitLab