| 1 |
<?php
|
| 2 |
// $Id$
|
| 3 |
|
| 4 |
/**
|
| 5 |
* Implementation of hook_install()
|
| 6 |
*/
|
| 7 |
function nodetemplate_install() {
|
| 8 |
switch ($GLOBALS['db_type']) {
|
| 9 |
case 'mysql':
|
| 10 |
case 'mysqli':
|
| 11 |
db_query("CREATE TABLE {node_template} (
|
| 12 |
nid int(10) unsigned NOT NULL,
|
| 13 |
is_template tinyint(1) default '0',
|
| 14 |
PRIMARY KEY (nid)
|
| 15 |
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
|
| 16 |
break;
|
| 17 |
case 'pgsql':
|
| 18 |
break;
|
| 19 |
}
|
| 20 |
drupal_set_message(t('node template has created the required tables.'));
|
| 21 |
}
|
| 22 |
|
| 23 |
/**
|
| 24 |
* Updates
|
| 25 |
*/
|
| 26 |
function nodetemplate_update_1() {
|
| 27 |
return _system_update_utf8(array('nodetemplate'));
|
| 28 |
}
|