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

Contents of /contributions/modules/antiproxyhack/antiproxyhack.install

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


Revision 1.2 - (show annotations) (download) (as text)
Sat Sep 22 09:29:28 2007 UTC (2 years, 2 months ago) by geojaz
Branch: MAIN
CVS Tags: DRUPAL-5--1-2, HEAD
Changes since 1.1: +4 -3 lines
File MIME type: text/x-php
#176685 bug noted by toma.  Code suggestions by LUTi.  Renames cloak_update table and includes the .module for update function.
1 <?php
2 // antiproxyhack.install
3 include_once('./'. drupal_get_path('module', 'antiproxyhack') .'/antiproxyhack.module');
4
5 function antiproxyhack_install() {
6 switch ($GLOBALS['db_type']) {
7 case 'mysql':
8 case 'mysqli':
9 db_query("CREATE TABLE {antiproxyhack_cloak_data} (
10 id int(11) NOT NULL auto_increment,
11 spider_name varchar(255) NOT NULL default '',
12 record_type enum('UA','IP') NOT NULL default 'UA',
13 value varchar(255) NOT NULL default '',
14 is_user_defined enum('N','Y') NOT NULL default 'N',
15 PRIMARY KEY (`id`), KEY `value` (`value`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
16 db_query("CREATE TABLE {antiproxyhack_cloak_update} (
17 version varchar(255) NOT NULL default '',
18 updated_on datetime NOT NULL default '0000-00-00 00:00:00') ENGINE=MyISAM DEFAULT CHARSET=utf8;");
19 antiproxyhack_update_all();
20 break;
21 }
22 }
23
24
25

  ViewVC Help
Powered by ViewVC 1.1.2