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

Contents of /contributions/modules/ezshop/ezshop.install

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


Revision 1.1 - (show annotations) (download) (as text)
Wed Nov 5 09:57:20 2008 UTC (12 months, 3 weeks ago) by boobaa
Branch: MAIN
CVS Tags: DRUPAL-5--1-0, HEAD
Branch point for: DRUPAL-5, DRUPAL-6--1
File MIME type: text/x-php
Initial commit of EZShop module - Drupal webshop made easy
1 <?php
2 // $Id$
3
4 /**
5 * Implementation of hook_install().
6 */
7 function ezshop_install() {
8 switch ($GLOBALS['db_type']) {
9 case 'mysql':
10 case 'mysqli':
11 db_query("CREATE TABLE {ezshop_items} (
12 uid int unsigned default '0',
13 nid int unsigned default '0',
14 cnt tinyint unsigned default '0',
15 PRIMARY KEY (uid, nid),
16 KEY (uid)
17 ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
18 // TODO: Development path: store the orders to be able to follow and/or review them.
19 // db_query("CREATE TABLE {ezshop_orders} (
20 // oid int unsigned default '0',
21 // uid int unsigned default '0',
22 // status tinyint unsigned default '0',
23 // PRIMARY KEY (oid)
24 // ) /*!40100 DEFAULT CHARACTER SET UTF8 */"); // TODO: add more keys as needed.
25 break;
26 case 'pgsql':
27 // FIXME: to be implemented
28 break;
29 }
30 }
31
32 /**
33 * Implementation of hook_uninstall().
34 */
35 function ezshop_uninstall() {
36 db_query('DROP TABLE {ezshop_items}');
37 // db_query('DROP TABLE {ezshop_orders}');
38 variable_del('ezshop_content_types');
39 variable_del('ezshop_linkweight');
40 variable_del('ezshop_ordermail');
41 variable_del('ezshop_mailfooter');
42 }
43
44 // vim: set ft=php syntax=php expandtab ts=2 sw=2 autoindent smartindent:

  ViewVC Help
Powered by ViewVC 1.1.2