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

Contents of /contributions/modules/rotor/rotor.install

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


Revision 1.1 - (show annotations) (download) (as text)
Tue Apr 1 18:14:43 2008 UTC (19 months, 4 weeks ago) by nestormata
Branch: MAIN
CVS Tags: DRUPAL-5--7-2, DRUPAL-5--1-5, DRUPAL-5--1-4, DRUPAL-5--1-6, DRUPAL-5--1-1, DRUPAL-5--1-0, DRUPAL-5--1-3, DRUPAL-5--1-2, HEAD
Branch point for: DRUPAL-5, DRUPAL-5--7, DRUPAL-6--1
File MIME type: text/x-php
Initial commit for the rotor module, fully functionally for production
1 <?php
2 // $Id$
3
4 /**
5 * Install hook
6 */
7 function rotor_install() {
8 switch ($GLOBALS['db_type']) {
9 case 'mysql':
10 case 'mysqli':
11 db_query("CREATE TABLE {rotor_item} (
12 nid int(10) unsigned NOT NULL,
13 file_path varchar(255) NULL,
14 PRIMARY KEY (nid));"
15 );
16 drupal_set_message(t('Rotor table created'));
17 break;
18 }
19 }
20
21 /**
22 * Unistalla hook
23 */
24 function rotor_uninstall() {
25 switch ($GLOBALS['db_type']) {
26 case 'mysql':
27 case 'mysqli':
28 db_query("DROP TABLE {rotor_item};");
29 variable_del('rotor_max_items');
30 variable_del('rotor_seconds');
31 variable_del('rotor_show_tabs');
32 variable_del('rotor_group_tabs');
33 drupal_set_message(t('Rotor unistalled'));
34 break;
35 }
36 }

  ViewVC Help
Powered by ViewVC 1.1.2