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

Contents of /contributions/modules/acronyms/acronyms.install

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


Revision 1.3 - (show annotations) (download) (as text)
Fri Dec 5 16:57:41 2008 UTC (11 months, 2 weeks ago) by dellintosh
Branch: MAIN
CVS Tags: DRUPAL-5--1-1, DRUPAL-5--1-2, HEAD
Branch point for: DRUPAL-5, DRUPAL-6--1
Changes since 1.2: +1 -1 lines
File MIME type: text/x-php
having troubles getting the dir structure right, hopefully this works
1 <?php
2 // $Id: acronyms.install,v 1.1 2008/12/05 16:32:48 dellintosh Exp $
3
4 /*
5 * Implementation of hook_install()
6 */
7 function acronyms_install() {
8 switch ($GLOBALS['db_type']) {
9 case 'mysql':
10 case 'mysqli':
11 db_query("CREATE TABLE {acronyms} (
12 nid int(10) unsigned NOT NULL default '0',
13 vid int(10) unsigned NOT NULL default '0',
14 aid int(10) unsigned NOT NULL default '0',
15 acronym varchar(255) NOT NULL default '',
16 enabled int(1) NOT NULL default '1',
17 PRIMARY KEY (nid, vid, aid)
18 ) /*!40100 DEFAULT CHARACTER SET utf8 */");
19 break;
20 }
21 }
22
23 function acronyms_uninstall() {
24 if (db_table_exists('acronyms')) {
25 db_query("DROP TABLE {acronyms}");
26 }
27 }

  ViewVC Help
Powered by ViewVC 1.1.2