function location_uninstall in Location 5.3
Same name and namespace in other branches
- 6.3 location.install \location_uninstall()
- 7.5 location.install \location_uninstall()
- 7.3 location.install \location_uninstall()
- 7.4 location.install \location_uninstall()
Implentation of hook_uninstall().
File
- ./
location.install, line 153 - Installation / uninstallation routines.
Code
function location_uninstall() {
// Delete tables.
if (db_table_exists('location')) {
db_query('DROP TABLE {location}');
}
if (db_table_exists('zipcodes')) {
db_query('DROP TABLE {zipcodes}');
}
if (db_table_exists('cache_location')) {
db_query('DROP TABLE {cache_location}');
}
if (db_table_exists('location_instance')) {
db_query('DROP TABLE {location_instance}');
}
// Delete variables.
variable_del('location_default_country');
variable_del('location_display_location');
variable_del('location_usegmap');
variable_del('location_locpick_macro');
// Delete geocoder settings.
$result = db_query("SELECT name FROM {variable} WHERE name LIKE 'location_geocode_%'");
while ($row = db_fetch_object($result)) {
variable_del($row->name);
}
}