| 1 |
<?php |
<?php |
| 2 |
/* $Id: tw.install,v 1.1.2.2 2009/03/24 00:05:38 mikeryan Exp $ */ |
// $Id$ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 7 |
|
|
| 8 |
/** |
/** |
| 9 |
* Implementation of hook_schema(). |
* Implementation of hook_schema(). |
|
* |
|
|
* @return unknown |
|
| 10 |
*/ |
*/ |
| 11 |
function tw_schema() { |
function tw_schema() { |
| 12 |
$schema['tw_tables'] = array( |
$schema['tw_tables'] = array( |
| 154 |
|
|
| 155 |
/** |
/** |
| 156 |
* Implementation of hook_install(). |
* Implementation of hook_install(). |
|
* |
|
|
* @return unknown |
|
| 157 |
*/ |
*/ |
| 158 |
function tw_install() { |
function tw_install() { |
| 159 |
// Create tables |
// Create tables |
| 162 |
|
|
| 163 |
/** |
/** |
| 164 |
* Implementation of hook_uninstall(). |
* Implementation of hook_uninstall(). |
|
* |
|
|
* @return unknown |
|
| 165 |
*/ |
*/ |
| 166 |
function tw_uninstall() { |
function tw_uninstall() { |
| 167 |
// Remove tables |
// Remove tables |
| 189 |
while ($row = db_fetch_object($result)) { |
while ($row = db_fetch_object($result)) { |
| 190 |
$unprefixed = schema_unprefix_table($row->tablename); |
$unprefixed = schema_unprefix_table($row->tablename); |
| 191 |
$ret[] = update_sql("UPDATE {tw_tables} |
$ret[] = update_sql("UPDATE {tw_tables} |
| 192 |
SET tablename='" . $unprefixed."' |
SET tablename='" . $unprefixed ."' |
| 193 |
WHERE twtid=" . $row->twtid); |
WHERE twtid=" . $row->twtid); |
| 194 |
} |
} |
| 195 |
return $ret; |
return $ret; |