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

Contents of /contributions/modules/replication/replication.install

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


Revision 1.1 - (show annotations) (download) (as text)
Mon Nov 5 15:02:55 2007 UTC (2 years ago) by rooey
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-5
File MIME type: text/x-php
by Rooey. Initial replication module checkin
1 <?php
2 //$Id$
3 /**
4 * Implementation of hook_install().
5 */
6 function replication_install() {
7 switch ($GLOBALS['db_type']) {
8 case 'mysql':
9 case 'mysqli':
10 db_query("CREATE TABLE {local_variable} (
11 `name` varchar(48) NOT NULL DEFAULT '',
12 `value` longtext NOT NULL,
13 PRIMARY KEY (`name`)
14 ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
15 drupal_set_message("Please ensure that you correctly patch your mysql/mysqli.inc and bootstrap files!");
16 variable_set('localvars','true');
17 break;
18 case 'pgsql':
19 drupal_set_message("Your database is not supported by this module");
20 break;
21 }
22 }
23
24 /**
25 * Implementation of hook_uninstall().
26 */
27 function replication_uninstall() {
28 db_query('DROP TABLE {local_variable}');
29 variable_del('localvars');
30
31 }
32
33 /**
34 * Implementation of hook_update_N()
35 */
36
37 /**
38 * function replication_update_1() {
39 * $ret = array();
40 * switch ($GLOBALS['db_type']) {
41 * case 'mysql':
42 * case 'mysqli':
43 * $ret[] = update_sql("ALTER TABLE {replication} ADD ldapdata_binddn VARCHAR(255) NOT NULL default '' ");
44 * break;
45 * case 'pgsql':
46 * break;
47 * }
48 */

  ViewVC Help
Powered by ViewVC 1.1.2