summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-12-17 12:23:01 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-12-17 12:23:01 +0000
commitdfe1225147f48fa36db8507020795278c9270bda (patch)
tree3559e3230651a51ac50fc992c1ae0dd5800ca901 /includes
parenta0bea004022d38c9b145a3652f44820b18727456 (diff)
downloadbrdo-dfe1225147f48fa36db8507020795278c9270bda.tar.gz
brdo-dfe1225147f48fa36db8507020795278c9270bda.tar.bz2
#194310 by chx, catch, KarenS: run updates for disabled but previously installed modules, if they are compatible with the current system
Diffstat (limited to 'includes')
-rw-r--r--includes/install.inc15
1 files changed, 11 insertions, 4 deletions
diff --git a/includes/install.inc b/includes/install.inc
index 2ce311ee5..87ae7ff7b 100644
--- a/includes/install.inc
+++ b/includes/install.inc
@@ -22,8 +22,10 @@ define('FILE_NOT_EXECUTABLE', 128);
* Initialize the update system by loading all installed module's .install files.
*/
function drupal_load_updates() {
- foreach (module_list() as $module) {
- module_load_install($module);
+ foreach (drupal_get_installed_schema_version(NULL, FALSE, TRUE) as $module => $schema_version) {
+ if ($schema_version > -1) {
+ module_load_install($module);
+ }
}
}
@@ -58,10 +60,15 @@ function drupal_get_schema_versions($module) {
*
* @param $module
* A module name.
+ * @param $reset
+ * Set to TRUE after modifying the system table.
+ * @param $array
+ * Set to TRUE if you want to get information about all modules in the
+ * system.
* @return
* The currently installed schema version.
*/
-function drupal_get_installed_schema_version($module, $reset = FALSE) {
+function drupal_get_installed_schema_version($module, $reset = FALSE, $array = FALSE) {
static $versions = array();
if ($reset) {
@@ -76,7 +83,7 @@ function drupal_get_installed_schema_version($module, $reset = FALSE) {
}
}
- return $versions[$module];
+ return $array ? $versions : $versions[$module];
}
/**