summaryrefslogtreecommitdiff
path: root/modules/system/system.api.php
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-09-30 13:24:31 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2011-09-30 13:24:31 -0700
commit18b96d0cda76abc603e4dc9f8e028c7274123d84 (patch)
tree3a3d90a87cc8c71a79bfb219b84840d15e3ba0cb /modules/system/system.api.php
parent5e8f5fbd2fa670126c7e1b39a563439e9b37b136 (diff)
downloadbrdo-18b96d0cda76abc603e4dc9f8e028c7274123d84.tar.gz
brdo-18b96d0cda76abc603e4dc9f8e028c7274123d84.tar.bz2
Issue #1247626 by sven.lauer: Fixed hook_install()/hook_uninstall() doc does not specify that the implementations must live in the .install file.
Diffstat (limited to 'modules/system/system.api.php')
-rw-r--r--modules/system/system.api.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php
index 9cc091b67..1e0ff0fc2 100644
--- a/modules/system/system.api.php
+++ b/modules/system/system.api.php
@@ -3068,11 +3068,13 @@ function hook_query_TAG_alter(QueryAlterableInterface $query) {
* If the module implements hook_schema(), the database tables will
* be created before this hook is fired.
*
- * This hook will only be called the first time a module is enabled or after it
- * is re-enabled after being uninstalled. The module's schema version will be
- * set to the module's greatest numbered update hook. Because of this, anytime a
- * hook_update_N() is added to the module, this function needs to be updated to
- * reflect the current version of the database schema.
+ * Implementations of this hook are by convention declared in the module's
+ * .install file. The hook will only be called the first time a module is
+ * enabled or after it is re-enabled after being uninstalled. The module's
+ * schema version will be set to the module's greatest numbered update hook.
+ * Because of this, any time a hook_update_N() is added to the module, this
+ * function needs to be updated to reflect the current version of the database
+ * schema.
*
* See the Schema API documentation at
* @link http://drupal.org/node/146843 http://drupal.org/node/146843 @endlink
@@ -3298,9 +3300,10 @@ function hook_update_last_removed() {
* The module should not remove its entry from the {system} table. Database
* tables defined by hook_schema() will be removed automatically.
*
- * The uninstall hook will fire when the module gets uninstalled but before the
- * module's database tables are removed, allowing your module to query its own
- * tables during this routine.
+ * The uninstall hook must be implemented in the module's .install file. It
+ * will fire when the module gets uninstalled but before the module's database
+ * tables are removed, allowing your module to query its own tables during
+ * this routine.
*
* When hook_uninstall() is called, your module will already be disabled, so
* its .module file will not be automatically included. If you need to call API