#561452 follow-up by David_Rothstein: Use helper functions rather than file scans to retrieve module data on permissions page.
parent
9ad53c524a
commit
ca7b56e735
|
|
@ -117,7 +117,7 @@ class ThemeUpdater extends Updater implements DrupalUpdaterInterface {
|
||||||
public function postInstall() {
|
public function postInstall() {
|
||||||
// Update the system table.
|
// Update the system table.
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
drupal_static_reset('_system_get_theme_data');
|
drupal_static_reset('_system_rebuild_theme_data');
|
||||||
_system_rebuild_theme_data();
|
_system_rebuild_theme_data();
|
||||||
|
|
||||||
// Active the theme
|
// Active the theme
|
||||||
|
|
|
||||||
|
|
@ -650,12 +650,12 @@ function user_admin_permissions($form, $form_state, $rid = NULL) {
|
||||||
);
|
);
|
||||||
// Render role/permission overview:
|
// Render role/permission overview:
|
||||||
$options = array();
|
$options = array();
|
||||||
|
$module_info = system_get_info('module');
|
||||||
$hide_descriptions = !system_admin_compact_mode();
|
$hide_descriptions = !system_admin_compact_mode();
|
||||||
foreach (module_implements('permission') as $module) {
|
foreach (module_implements('permission') as $module) {
|
||||||
if ($permissions = module_invoke($module, 'permission')) {
|
if ($permissions = module_invoke($module, 'permission')) {
|
||||||
$info = drupal_parse_info_file(drupal_get_path('module', $module) . "/$module.info");
|
|
||||||
$form['permission'][] = array(
|
$form['permission'][] = array(
|
||||||
'#markup' => $info['name'],
|
'#markup' => $module_info[$module]['name'],
|
||||||
'#id' => $module,
|
'#id' => $module,
|
||||||
);
|
);
|
||||||
foreach ($permissions as $perm => $perm_item) {
|
foreach ($permissions as $perm => $perm_item) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue