/[drupal]/contributions/modules/spaces/spaces_announce/spaces_announce.install
ViewVC logotype

Contents of /contributions/modules/spaces/spaces_announce/spaces_announce.install

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


Revision 1.1 - (show annotations) (download) (as text)
Thu Jul 24 02:33:32 2008 UTC (16 months ago) by jmiccolis
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-5, DRUPAL-6--1, DRUPAL-5--2
File MIME type: text/x-php
Adding spaces_announce, which lets spaces broadcast to each other.
1 <?php
2 // $Id:$
3
4 /**
5 * Implementaton of hook_install().
6 */
7 function spaces_announce_install() {
8 switch ($GLOBALS['db_type']) {
9 case 'mysqli':
10 case 'mysql':
11 db_query("UPDATE {system} SET weight = 25 WHERE name = 'spaces_announce'");
12 db_query("CREATE TABLE {spaces_announce} (
13 nid int(10) NOT NULL default '0',
14 gid int(10) NOT NULL default '0',
15 KEY (nid),
16 KEY (gid)
17 ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
18 db_query("CREATE TABLE {spaces_announce_log} (
19 nid int(10) NOT NULL default '0',
20 count int NOT NULL default '0',
21 viewed int unsigned NOT NULL default '0',
22 KEY (nid)
23 ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
24 }
25 }
26
27 /**
28 * Implmentation of hook_uninstall().
29 */
30 function spaces_announce_uninstall() {
31 db_query('DROP TABLE {spaces_announce}');
32 db_query('DROP TABLE {spaces_announce_log}');
33 }

  ViewVC Help
Powered by ViewVC 1.1.2