Commit f15438cc authored by Dries's avatar Dries
Browse files

- Patch #521838 by jrchamp: (temporary) fix for drupal_get_schema_versions().

parent d734f2f2
......@@ -93,12 +93,10 @@ function drupal_load_updates() {
*/
function drupal_get_schema_versions($module) {
$updates = &drupal_static(__FUNCTION__, NULL);
if (!isset($updates)) {
if (!isset($updates[$module])) {
$updates = array();
// Prepare regular expression to match all possible defined hook_update_N().
$modules = db_query("SELECT name FROM {system} WHERE type = 'module'")
->fetchCol();
$regexp = '/^(?P<module>' . implode('|', $modules) . ')_update_(?P<version>\d+)$/';
$regexp = '/^(?P<module>.+)_update_(?P<version>\d+)$/';
$functions = get_defined_functions();
// Narrow this down to functions ending with an integer, since all
// hook_update_N() functions end this way, and there are other
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment