commit 131cb7ac07e4025bb762128ed703ffd7f22684a8 Author: Joel Pittet Date: Fri Nov 15 20:26:44 2013 -0800 get rid of diff --git a/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php b/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php index 8bbd02b..a0427e4 100644 --- a/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php @@ -163,18 +163,18 @@ public function buildForm(array $form, array &$form_state) { protected function buildRow(array $modules, $module, $distribution) { // Set the basic properties. $row['#version'] = $module->info['version']; - $row['#requires'] = isset($extra['#requires']) ? $extra['#requires'] : FALSE; - $row['#required_by'] = isset($extra['#required_by']) ? $extra['#required_by'] : FALSE; + $row['#requires'] = isset($row['#requires']) ? $row['#requires'] : FALSE; + $row['#required_by'] = isset($row['#required_by']) ? $row['#required_by'] : FALSE; // Add links for each module. // Used when checking if a module implements a help page. $help = $this->moduleHandler->moduleExists('help') ? drupal_help_arg() : FALSE; // Generate link for module's help page, if there is one. - $extra['links']['help'] = array(); + $row['links']['help'] = array(); if ($help && $module->status && in_array($module->name, $this->moduleHandler->getImplementations('help'))) { if ($this->moduleHandler->invoke($module->name, 'help', array("admin/help#$module->name", $help))) { - $extra['links']['help'] = array( + $row['links']['help'] = array( '#type' => 'link', '#title' => $this->t('Help'), '#href' => "admin/help/$module->name", @@ -184,9 +184,9 @@ protected function buildRow(array $modules, $module, $distribution) { } // Generate link for module's permission, if the user has access to it. - $extra['links']['permissions'] = array(); + $row['links']['permissions'] = array(); if ($module->status && user_access('administer permissions') && in_array($module->name, $this->moduleHandler->getImplementations('permission'))) { - $extra['links']['permissions'] = array( + $row['links']['permissions'] = array( '#type' => 'link', '#title' => $this->t('Permissions'), '#href' => 'admin/people/permissions', @@ -195,11 +195,11 @@ protected function buildRow(array $modules, $module, $distribution) { } // Generate link for module's configuration page, if it has one. - $extra['links']['configure'] = array(); + $row['links']['configure'] = array(); if ($module->status && isset($module->info['configure'])) { if ($this->accessManager->checkNamedRoute($module->info['configure'], array(), \Drupal::currentUser())) { $item = menu_get_item(trim($this->url($module->info['configure']), '/')); - $extra['links']['configure'] = array( + $row['links']['configure'] = array( '#type' => 'link', '#title' => $this->t('Configure'), '#route_name' => $module->info['configure'], @@ -224,7 +224,7 @@ protected function buildRow(array $modules, $module, $distribution) { if (!empty($module->info['required'])) { // Used when displaying modules that are required by the installation profile $row['enable']['#disabled'] = TRUE; - $extra['#required_by'][] = $distribution . (!empty($module->info['explanation']) ? ' ('. $module->info['explanation'] .')' : ''); + $row['#required_by'][] = $distribution . (!empty($module->info['explanation']) ? ' ('. $module->info['explanation'] .')' : ''); } // Check the compatibilities. @@ -252,7 +252,7 @@ protected function buildRow(array $modules, $module, $distribution) { // If this module is not compatible, disable the checkbox. if (!$compatible) { $row['enable']['#disabled'] = TRUE; - $extra['description'] = array( + $row['description'] = array( '#theme' => 'system_modules_incompatible', '#message' => $status, ); @@ -261,7 +261,7 @@ protected function buildRow(array $modules, $module, $distribution) { // If this module requires other modules, add them to the array. foreach ($module->requires as $dependency => $version) { if (!isset($modules[$dependency])) { - $extra['#requires'][$dependency] = $this->t('@module (missing)', array('@module' => Unicode::ucfirst($dependency))); + $row['#requires'][$dependency] = $this->t('@module (missing)', array('@module' => Unicode::ucfirst($dependency))); $row['enable']['#disabled'] = TRUE; } // Only display visible modules. @@ -270,7 +270,7 @@ protected function buildRow(array $modules, $module, $distribution) { // Disable the module's checkbox if it is incompatible with the // dependency's version. if ($incompatible_version = drupal_check_incompatibility($version, str_replace(\Drupal::CORE_COMPATIBILITY . '-', '', $modules[$dependency]->info['version']))) { - $extra['#requires'][$dependency] = $this->t('@module (incompatible with version @version)', array( + $row['#requires'][$dependency] = $this->t('@module (incompatible with version @version)', array( '@module' => $name . $incompatible_version, '@version' => $modules[$dependency]->info['version'], )); @@ -279,16 +279,16 @@ protected function buildRow(array $modules, $module, $distribution) { // Disable the checkbox if the dependency is incompatible with this // version of Drupal core. elseif ($modules[$dependency]->info['core'] != \Drupal::CORE_COMPATIBILITY) { - $extra['#requires'][$dependency] = $this->t('@module (incompatible with this version of Drupal core)', array( + $row['#requires'][$dependency] = $this->t('@module (incompatible with this version of Drupal core)', array( '@module' => $name, )); $row['enable']['#disabled'] = TRUE; } elseif ($modules[$dependency]->status) { - $extra['#requires'][$dependency] = $this->t('@module', array('@module' => $name)); + $row['#requires'][$dependency] = $this->t('@module', array('@module' => $name)); } else { - $extra['#requires'][$dependency] = $this->t('@module (disabled)', array('@module' => $name)); + $row['#requires'][$dependency] = $this->t('@module (disabled)', array('@module' => $name)); } } } @@ -298,11 +298,11 @@ protected function buildRow(array $modules, $module, $distribution) { foreach ($module->required_by as $dependent => $version) { if (isset($modules[$dependent]) && empty($modules[$dependent]->info['hidden'])) { if ($modules[$dependent]->status == 1 && $module->status == 1) { - $extra['#required_by'][$dependent] = $this->t('@module', array('@module' => $modules[$dependent]->info['name'])); + $row['#required_by'][$dependent] = $this->t('@module', array('@module' => $modules[$dependent]->info['name'])); $row['enable']['#disabled'] = TRUE; } else { - $extra['#required_by'][$dependent] = $this->t('@module (disabled)', array('@module' => $modules[$dependent]->info['name'])); + $row['#required_by'][$dependent] = $this->t('@module (disabled)', array('@module' => $modules[$dependent]->info['name'])); } } } @@ -338,17 +338,17 @@ protected function buildRow(array $modules, $module, $distribution) { $description .= '
' . t('Version: !module-version', array('!module-version' => $module->info['version'])) . '
'; } if ($row['#requires']) { - $description .= '
' . t('Requires: !module-list', array('!module-list' => implode(', ', $extra['#requires']))) . '
'; + $description .= '
' . t('Requires: !module-list', array('!module-list' => implode(', ', $row['#requires']))) . '
'; } if ($row['#required_by']) { - $description .= '
' . t('Required by: !module-list', array('!module-list' => implode(', ', $extra['#required_by']))) . '
'; + $description .= '
' . t('Required by: !module-list', array('!module-list' => implode(', ', $row['#required_by']))) . '
'; } $description .= ''; } $links = ''; foreach (array('help', 'permissions', 'configure') as $key) { - $links .= (isset($extra['links'][$key]) ? drupal_render($extra['links'][$key]) : ''); + $links .= (isset($row['links'][$key]) ? drupal_render($row['links'][$key]) : ''); } if ($links) {