Index: securesite.install =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/securesite/securesite.install,v retrieving revision 1.9.2.7 diff -u -p -r1.9.2.7 securesite.install --- securesite.install 15 Apr 2009 19:12:06 -0000 1.9.2.7 +++ securesite.install 15 Jul 2009 20:39:22 -0000 @@ -10,6 +10,13 @@ * Implementation of hook_enable(). */ function securesite_enable() { + // Make sure other boot functions run before ours. + $boot = drupal_map_assoc(module_implements('boot')); + unset($boot['securesite']); + if (!empty($boot)) { + $weight = db_result(db_query("SELECT MAX(weight) FROM {system} WHERE type = 'module' AND status = 1 AND name IN('". implode("', '", $boot) ."')")); + db_query("UPDATE {system} SET weight = %d WHERE type = 'module' AND status = 1 AND name = 'securesite'", ++$weight); + } if (variable_get('securesite_enabled', SECURESITE_DISABLED) == SECURESITE_403) { if (($site_403 = variable_get('site_403', '')) != 'securesite_403') { variable_set('securesite_403', variable_get('site_403', '')); @@ -63,3 +70,16 @@ function securesite_update_6200() { variable_del('securesite_filter_pages_type'); return array(); } + +/** + * Implementation of hook_update_N(). + * Make sure other boot functions run before ours. + */ +function securesite_update_6201() { + $boot = drupal_map_assoc(module_implements('boot')); + unset($boot['securesite']); + if (!empty($boot)) { + $weight = db_result(db_query("SELECT MAX(weight) FROM {system} WHERE type = 'module' AND status = 1 AND name IN('". implode("', '", $boot) ."')")); + db_query("UPDATE {system} SET weight = %d WHERE type = 'module' AND status = 1 AND name = 'securesite'", ++$weight); + } +}