diff --git a/core/modules/locale/locale.install b/core/modules/locale/locale.install index f01935a..cb3b916 100644 --- a/core/modules/locale/locale.install +++ b/core/modules/locale/locale.install @@ -33,6 +33,9 @@ function locale_uninstall() { variable_del('locale_translation_plurals'); variable_del('locale_translation_javascript'); + // Locale module still in memory so reset it's cache. + drupal_static_reset('locale'); + // Remove all node type language variables. Node module might have been // enabled, but may be disabled, so use a wildcard delete. db_delete('variable') diff --git a/core/modules/node/node.install b/core/modules/node/node.install index 697d3a7..6cb5a21 100644 --- a/core/modules/node/node.install +++ b/core/modules/node/node.install @@ -724,13 +724,21 @@ function node_update_8012() { function node_update_8013() { $actions = array('view', 'delete', 'revert'); - foreach ($actions as $action) { - db_update('role_permission') - ->fields(array('permission' => $action . ' all revisions')) - ->condition('permission', $action . ' revisions') - ->condition('module', 'node') - ->execute(); + foreach (config_get_storage_names_with_prefix('user.role.') as $name) { + $role = config($name)->get(); + $config_changed = FALSE; + foreach ($actions as $action) { + if (isset($role['permissions'][$action . ' revisions'])) { + unset($role['permissions'][$action . ' revisions']); + $role['permissions'][$action . ' all revisions'] = $action . ' all revisions'; + $config_changed = TRUE; + } + } + if ($config_changed) { + config($name)->setData($role)->save(); + } } + } /** diff --git a/core/modules/translation/translation.install b/core/modules/translation/translation.install index 2d9463a..26fa4f7 100644 --- a/core/modules/translation/translation.install +++ b/core/modules/translation/translation.install @@ -5,14 +5,13 @@ * Update function for the translation module. */ - /** * Rename the translate content permission. */ function translation_update_8000() { foreach (config_get_storage_names_with_prefix('user.role.') as $name) { $role = config($name)->get(); - if (array_key_exists('translate content', $role['permissions'])) { + if (isset($role['permissions']['translate content'])) { unset($role['permissions']['translate content']); $role['permissions']['translate all content'] = 'translate all content'; config($name)->setData($role)->save(); diff --git a/core/modules/user/user.install b/core/modules/user/user.install index 84e1e9f..f287425 100644 --- a/core/modules/user/user.install +++ b/core/modules/user/user.install @@ -910,7 +910,12 @@ function user_update_8017() { ->set('permissions', $permissions ?: array()) ->save(); } +} +/** + * Drop {role} and {role_permission} tables. + */ +function user_update_8018() { db_drop_table('role'); db_drop_table('role_permission'); } diff --git a/core/modules/user/user.module b/core/modules/user/user.module index d5e0661..7e0d35b 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -1,7 +1,7 @@