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

Contents of /contributions/modules/comment_og/comment_og.install

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


Revision 1.3 - (show annotations) (download) (as text)
Mon Mar 31 20:15:45 2008 UTC (19 months, 4 weeks ago) by rapsli
Branch: MAIN
CVS Tags: DRUPAL-5--0-3beta2, DRUPAL-5--0-3beta1, DRUPAL-5--0-2beta, DRUPAL-5--0-2beta1, DRUPAL-5--0-1beta, DRUPAL-5--0-1beta2
Changes since 1.2: +6 -2 lines
File MIME type: text/x-php
patch http://drupal.org/node/240989

    * table comment_og replaced by {comment_og}
    * engine MyISAM deleted
    * hook_uninstall added
1 <?php
2 // $Id: comment_og.install,v 1.2 2008/03/31 20:14:23 rapsli Exp $
3
4 /**
5 * Implementation of hook_install().
6 */
7 function comment_og_install() {
8 switch ($GLOBALS['db_type']) {
9 case 'mysql':
10 case 'mysqli':
11 $status[] = db_query("
12 CREATE TABLE {comment_og} (
13 `cid` int(20) NOT NULL,
14 `visibility` int(10) NOT NULL,
15 `ogs` text NOT NULL,
16 PRIMARY KEY (`cid`)
17 ) DEFAULT CHARSET=latin1;");
18 break;
19
20 }
21
22 // If there is one FALSE value in the status array, there was an error.
23 if (array_search(FALSE, $status) !== FALSE) {
24 drupal_set_message(t('Table installation for the comment_og module was unsuccessful. The tables may need to be installed by hand.'), 'error');
25 }
26 else {
27 drupal_set_message(t('comment_og module installed successfully.'));
28 }
29 }
30
31 function comment_og_uninstall() {
32 db_query('DROP TABLE {comment_og}');
33 }

  ViewVC Help
Powered by ViewVC 1.1.2