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

Contents of /contributions/modules/simple_review/simple_review.install

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


Revision 1.2 - (show annotations) (download) (as text)
Wed Jan 23 10:57:07 2008 UTC (22 months ago) by smk
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +3 -1 lines
File MIME type: text/x-php
- Clearing out variable storage when uninstalling module.
1 <?php
2 // $Id: simple_review.install,v 1.1 2007/09/09 17:07:10 smk Exp $
3
4 function simple_review_install() {
5 switch ($GLOBALS['db_type']) {
6 case 'mysql':
7 case 'mysqli':
8 db_query("CREATE TABLE {simple_review} (
9 cid int(10) unsigned NOT NULL,
10 vid int(10) unsigned NOT NULL,
11 PRIMARY KEY (cid)
12 )");
13 break;
14
15 case 'pgsql':
16 db_query("CREATE TABLE {simple_review} (
17 cid INTEGER NOT NULL,
18 vid INTEGER NOT NULL,
19 PRIMARY KEY (cid)
20 )");
21 break;
22 }
23 }
24
25 function simple_review_uninstall() {
26 db_query("DROP TABLE {simple_review}");
27 db_query("DELETE FROM {variable} WHERE name LIKE 'simple_review_%%'");
28 cache_clear_all('variables', 'cache');
29 }
30

  ViewVC Help
Powered by ViewVC 1.1.2