summaryrefslogtreecommitdiff
path: root/modules/system/system.api.php
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-10-19 23:30:15 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2011-10-19 23:30:15 -0700
commit5d735a0782967f2ba7ce32f766eb106828ce1f89 (patch)
tree795c52403cd58e8520d5fbc5456de7d2c5336c0c /modules/system/system.api.php
parentc5713b25f3108e5f91477990a43780c86398553c (diff)
downloadbrdo-5d735a0782967f2ba7ce32f766eb106828ce1f89.tar.gz
brdo-5d735a0782967f2ba7ce32f766eb106828ce1f89.tar.bz2
Issue #1307062 by sven.lauer, jhodgdon: Fixed install file hooks should state whether module code is available.
Diffstat (limited to 'modules/system/system.api.php')
-rw-r--r--modules/system/system.api.php22
1 files changed, 14 insertions, 8 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php
index 0ae9b1187..b88e72271 100644
--- a/modules/system/system.api.php
+++ b/modules/system/system.api.php
@@ -2918,6 +2918,10 @@ function hook_requirements($phase) {
* more tables and their related keys and indexes. A schema is defined by
* hook_schema() which must live in your module's .install file.
*
+ * This hook is called at both install and uninstall time, and in the latter
+ * case, it cannot rely on the .module file being loaded or hooks being known.
+ * If the .module file is needed, it may be loaded with drupal_load().
+ *
* By implementing hook_schema() and specifying the tables your module
* declares, you can easily create and drop these tables on all
* supported database engines. You don't have to deal with the
@@ -3080,12 +3084,12 @@ function hook_query_TAG_alter(QueryAlterableInterface $query) {
* be created before this hook is fired.
*
* 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.
+ * .install file. The implementation can rely on the .module file being loaded.
+ * 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
@@ -3337,7 +3341,8 @@ function hook_uninstall() {
* Perform necessary actions after module is enabled.
*
* The hook is called every time the module is enabled. It should be
- * implemented in the module's .install file.
+ * implemented in the module's .install file. The implementation can
+ * rely on the .module file being loaded.
*
* @see module_enable()
* @see hook_install()
@@ -3351,7 +3356,8 @@ function hook_enable() {
* Perform necessary actions before module is disabled.
*
* The hook is called every time the module is disabled. It should be
- * implemented in the module's .install file.
+ * implemented in the module's .install file. The implementation can rely
+ * on the .module file being loaded.
*
* @see hook_uninstall()
* @see hook_modules_disabled()