| 1 |
<?php
|
| 2 |
/**
|
| 3 |
gem_cat_index provides a navigational tree listings per node.
|
| 4 |
This module depends on the Category module.
|
| 5 |
|
| 6 |
Copyright (C) 2007 Jared Eckersley <jared@jaredeckersley.com>
|
| 7 |
|
| 8 |
This program is free software; you can redistribute it and/or modify
|
| 9 |
it under the terms of the GNU General Public License as published by
|
| 10 |
the Free Software Foundation; either version 2 of the License, or
|
| 11 |
(at your option) any later version.
|
| 12 |
|
| 13 |
This program is distributed in the hope that it will be useful,
|
| 14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
GNU General Public License for more details.
|
| 17 |
|
| 18 |
You should have received a copy of the GNU General Public License
|
| 19 |
along with this program; if not, write to the Free Software
|
| 20 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
| 21 |
*/
|
| 22 |
// $Id$
|
| 23 |
|
| 24 |
/**
|
| 25 |
* Implementation of hook_install()
|
| 26 |
*
|
| 27 |
* This will automatically install the database tables for the release module for both the MySQL and PostgreSQL databases.
|
| 28 |
*/
|
| 29 |
|
| 30 |
function gem_cat_index_install() {
|
| 31 |
switch ($GLOBALS['db_type']) {
|
| 32 |
case 'mysql':
|
| 33 |
case 'mysqli':
|
| 34 |
db_query("CREATE TABLE {gem_cat_index} (
|
| 35 |
nid int(10) unsigned NOT NULL default '0',
|
| 36 |
PRIMARY KEY (nid)
|
| 37 |
) /*!40100 DEFAULT CHARACTER SET utf8 */;");
|
| 38 |
break;
|
| 39 |
case 'pgsql':
|
| 40 |
db_query("CREATE TABLE {gem_cat_index} (
|
| 41 |
nid int(10) unsigned NOT NULL default '0',
|
| 42 |
PRIMARY KEY (nid),)
|
| 43 |
);");
|
| 44 |
break;
|
| 45 |
}
|
| 46 |
}
|
| 47 |
|
| 48 |
?>
|