Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
94098f7e
Commit
94098f7e
authored
Sep 01, 2006
by
drumm
Browse files
#81033
by webchick and neclimdul. Uninstall module API.
parent
f96e4845
Changes
12
Hide whitespace changes
Inline
Side-by-side
includes/install.inc
View file @
94098f7e
...
...
@@ -350,6 +350,18 @@ function drupal_install_module($module) {
}
}
/**
* Calls the uninstall function and updates the system table for a given module.
*
* @param $module
* The module to uninstall.
*/
function
drupal_uninstall_module
(
$module
)
{
module_load_install
(
$module
);
module_invoke
(
$module
,
'uninstall'
);
drupal_set_installed_schema_version
(
$module
,
SCHEMA_UNINSTALLED
);
}
/**
* Verify the state of the specified file.
*
...
...
modules/aggregator/aggregator.install
View file @
94098f7e
<?php
// $Id$
/**
* Implementation of hook_install().
*/
function
aggregator_install
()
{
switch
(
$GLOBALS
[
'db_type'
])
{
case
'mysql'
:
...
...
@@ -112,3 +115,18 @@ function aggregator_install() {
break
;
}
}
/**
* Implementation of hook_uninstall().
*/
function
aggregator_uninstall
()
{
db_query
(
'DROP TABLE {aggregator_category}'
);
db_query
(
'DROP TABLE {aggregator_category_feed}'
);
db_query
(
'DROP TABLE {aggregator_category_item}'
);
db_query
(
'DROP TABLE {aggregator_feed}'
);
db_query
(
'DROP TABLE {aggregator_item}'
);
variable_del
(
'aggregator_allowed_html_tags'
);
variable_del
(
'aggregator_summary_items'
);
variable_del
(
'aggregator_clear'
);
variable_del
(
'aggregator_category_selector'
);
}
modules/book/book.install
View file @
94098f7e
<?php
// $Id$
/**
* Implementation of hook_install().
*/
function
book_install
()
{
switch
(
$GLOBALS
[
'db_type'
])
{
case
'mysql'
:
...
...
@@ -28,3 +31,10 @@ function book_install() {
break
;
}
}
/**
* Implementation of hook_uninstall().
*/
function
book_uninstall
()
{
db_query
(
'DROP TABLE {book}'
);
}
modules/contact/contact.install
View file @
94098f7e
<?php
// $Id$
/**
* Implementation of hook_install().
*/
function
contact_install
()
{
switch
(
$GLOBALS
[
'db_type'
])
{
case
'mysql'
:
...
...
@@ -30,3 +33,13 @@ function contact_install() {
break
;
}
}
/**
* Implementation of hook_uninstall().
*/
function
contact_uninstall
()
{
db_query
(
'DROP TABLE {contact}'
);
variable_del
(
'contact_default_status'
);
variable_del
(
'contact_form_information'
);
variable_del
(
'contact_hourly_threshold'
);
}
modules/drupal/drupal.install
View file @
94098f7e
<?php
// $Id$
/**
* Implementation of hook_install().
*/
function
drupal_install
()
{
switch
(
$GLOBALS
[
'db_type'
])
{
case
'mysql'
:
...
...
@@ -52,3 +55,20 @@ function drupal_install() {
break
;
}
}
/**
* Implementation of hook_uninstall().
*/
function
drupal_uninstall
()
{
db_query
(
'DROP TABLE {client}'
);
db_query
(
'DROP TABLE {client_system}'
);
variable_del
(
'drupal_authentication_service'
);
variable_del
(
'drupal_directory'
);
variable_del
(
'drupal_register'
);
variable_del
(
'drupal_server'
);
variable_del
(
'drupal_system'
);
variable_del
(
'drupal_statistics'
);
variable_del
(
'drupal_client_service'
);
variable_del
(
'drupal_default_da_server'
);
variable_del
(
'drupal_default_da_server_only'
);
}
modules/forum/forum.install
View file @
94098f7e
<?php
// $Id$
/**
* Implementation of hook_install().
*/
function
forum_install
()
{
switch
(
$GLOBALS
[
'db_type'
])
{
case
'mysql'
:
...
...
@@ -26,3 +29,18 @@ function forum_install() {
break
;
}
}
/**
* Implementation of hook_uninstall().
*/
function
forum_uninstall
()
{
db_query
(
'DROP TABLE {forum}'
);
db_query
(
"DELETE FROM
{
node
}
WHERE type = 'forum'"
);
variable_del
(
'forum_containers'
);
variable_del
(
'forum_nav_vocabulary'
);
variable_del
(
'forum_hot_topic'
);
variable_del
(
'forum_per_page'
);
variable_del
(
'forum_order'
);
variable_del
(
'forum_block_num_0'
);
variable_del
(
'forum_block_num_1'
);
}
modules/locale/locale.install
View file @
94098f7e
<?php
// $Id$
/**
* Implementation of hook_install().
*/
function
locale_install
()
{
switch
(
$GLOBALS
[
'db_type'
])
{
case
'mysql'
:
...
...
@@ -69,3 +72,12 @@ function locale_install() {
}
db_query
(
"INSERT INTO
{
locales_meta
}
(locale, name, enabled, isdefault) VALUES ('en', 'English', '1', '1')"
);
}
/**
* Implementation of hook_uninstall().
*/
function
locale_uninstall
()
{
db_query
(
'DROP TABLE {locales_meta}'
);
db_query
(
'DROP TABLE {locales_source}'
);
db_query
(
'DROP TABLE {locales_target}'
);
}
modules/poll/poll.install
View file @
94098f7e
<?php
// $Id$
/**
* Implementation of hook_install().
*/
function
poll_install
()
{
switch
(
$GLOBALS
[
'db_type'
])
{
case
'mysql'
:
...
...
@@ -63,3 +66,12 @@ function poll_install() {
break
;
}
}
/**
* Implementation of hook_uninstall().
*/
function
poll_uninstall
()
{
db_query
(
'DROP TABLE {poll}'
);
db_query
(
'DROP TABLE {poll_votes}'
);
db_query
(
'DROP TABLE {poll_choices}'
);
}
modules/profile/profile.install
View file @
94098f7e
<?php
// $Id$
/**
* Implementation of hook_install().
*/
function
profile_install
()
{
switch
(
$GLOBALS
[
'db_type'
])
{
case
'mysql'
:
...
...
@@ -63,3 +66,12 @@ function profile_install() {
break
;
}
}
/**
* Implementation of hook_uninstall().
*/
function
profile_uninstall
()
{
db_query
(
'DROP TABLE {profile_fields}'
);
db_query
(
'DROP TABLE {profile_values}'
);
variable_del
(
'profile_block_author_fields'
);
}
modules/search/search.install
View file @
94098f7e
<?php
// $Id$
/**
* Implementation of hook_install().
*/
function
search_install
()
{
switch
(
$GLOBALS
[
'db_type'
])
{
case
'mysql'
:
...
...
@@ -58,3 +61,14 @@ function search_install() {
break
;
}
}
/**
* Implementation of hook_uninstall().
*/
function
search_uninstall
()
{
db_query
(
'DROP TABLE {search_dataset}'
);
db_query
(
'DROP TABLE {search_index}'
);
db_query
(
'DROP TABLE {search_total}'
);
variable_del
(
'minimum_word_size'
);
variable_del
(
'overlap_cjk'
);
}
modules/statistics/statistics.install
View file @
94098f7e
<?php
// $Id$
/**
* Implementation of hook_install().
*/
function
statistics_install
()
{
switch
(
$GLOBALS
[
'db_type'
])
{
case
'mysql'
:
...
...
@@ -36,3 +39,17 @@ function statistics_install() {
break
;
}
}
/**
* Implementation of hook_uninstall().
*/
function
statistics_uninstall
()
{
db_query
(
'DROP TABLE {accesslog}'
);
variable_del
(
'statistics_count_content_views'
);
variable_del
(
'statistics_enable_access_log'
);
variable_del
(
'statistics_flush_accesslog_timer'
);
variable_del
(
'statistics_day_timestamp'
);
variable_del
(
'statistics_block_top_day_num'
);
variable_del
(
'statistics_block_top_all_num'
);
variable_del
(
'statistics_block_top_last_num'
);
}
modules/system/system.install
View file @
94098f7e
<?php
// $Id$
/**
* Implementation of hook_install().
*/
function
system_install
()
{
switch
(
$GLOBALS
[
'db_type'
])
{
case
'mysql'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment