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

Contents of /contributions/modules/page_lang/page_lang.install

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


Revision 1.1 - (show annotations) (download) (as text)
Fri May 25 23:39:42 2007 UTC (2 years, 6 months ago) by cay
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-php
can use these to ensure that their HTML is easily adaptable for an international audience.
1 <?php
2
3 function page_lang_install() {
4 switch ($GLOBALS['db_type']) {
5 case 'mysqli':
6 case 'mysql':
7 $query1 = db_query("CREATE TABLE IF NOT EXISTS {page_lang} (
8 nid INT NOT NULL,
9 page_lang VARCHAR( 128 ) NOT NULL,
10 PRIMARY KEY ( `nid` )
11 ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
12 if ($query1) {
13 $created = TRUE;
14 }
15 break;
16
17 case 'pgsql':
18 $query1 = db_query("CREATE TABLE {page_lang} (
19 nid integer NOT NULL default '0',
20 page_lang text NOT NULL default ''
21 );");
22 if ($query1) {
23 $created = TRUE;
24 }
25 break;
26 }
27
28 if ($created) {
29 drupal_set_message(t('Page lang module installed successfully.'));
30 }
31 else {
32 drupal_set_message(t('Table installation for the Page lang module was unsuccessful. The tables may need to be installed by hand. See the README.txt file for a list of the installation queries.'), 'error');
33 }
34 }

  ViewVC Help
Powered by ViewVC 1.1.2