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

Contents of /contributions/modules/menutranslation/menutranslation.install

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


Revision 1.2 - (show annotations) (download) (as text)
Fri Nov 2 08:44:30 2007 UTC (2 years ago) by svendecabooter
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +8 -0 lines
File MIME type: text/x-php
added PostgreSQL support (issue #188307)
1 <?php
2
3 function menutranslation_install() {
4 switch ($GLOBALS['db_type']) {
5 case 'mysql':
6 case 'mysqli':
7 db_query("CREATE TABLE {menutranslation} (
8 mid int unsigned NOT NULL,
9 lang varchar(12) NOT NULL,
10 title varchar(255) NOT NULL default '',
11 PRIMARY KEY (mid,lang)
12 ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
13 break;
14 case 'pgsql':
15 db_query("CREATE TABLE {menutranslation} (
16 mid int4 NOT NULL,
17 lang varchar(12) NOT NULL,
18 title varchar(256) NOT NULL,
19 CONSTRAINT menutranslation_pkey PRIMARY KEY (mid, lang)
20 );");
21 break;
22 }
23 }
24
25 function menutranslation_uninstall() {
26 db_query('DROP TABLE {menutranslation}');
27 variable_del('menutranslation_menu');
28 }
29 ?>

  ViewVC Help
Powered by ViewVC 1.1.2