diff --git a/core/modules/system/lib/Drupal/system/Form/ModulesListConfirmForm.php b/core/modules/system/lib/Drupal/system/Form/ModulesListConfirmForm.php index adb0fac..1037e8d 100644 --- a/core/modules/system/lib/Drupal/system/Form/ModulesListConfirmForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ModulesListConfirmForm.php @@ -122,6 +122,10 @@ public function getFormID() { * {@inheritdoc} */ public function buildForm(array $form, array &$form_state, Request $request = NULL) { + // Store the request for use in the submit handler. + $this->request = $request; + + // Retrieve the list of modules to disable/enable from the key value store. $account = $request->attributes->get('account')->id(); $this->modules = $this->keyValueExpirable->get($account); @@ -152,9 +156,6 @@ public function buildForm(array $form, array &$form_state, Request $request = NU '#items' => $items, ); - // Store the request for use in the submit handler. - $this->request = $request; - return parent::buildForm($form, $form_state, $request); } diff --git a/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php b/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php index 58a343c..d4a37c5 100644 --- a/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php @@ -13,6 +13,7 @@ use Drupal\Core\KeyValueStore\KeyValueExpirableFactory; use Drupal\Core\StringTranslation\TranslationManager; use Drupal\Component\Utility\Unicode; +use Drupal\Component\Utility\String; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; @@ -92,15 +93,15 @@ public function getFormID() { * {@inheritdoc} */ public function buildForm(array $form, array &$form_state, Request $request = NULL) { + // Store the request for use in the submit handler. + $this->request = $request; + require_once DRUPAL_ROOT . '/core/includes/install.inc'; - $distribution = check_plain(drupal_install_profile_distribution_name()); + $distribution = String::checkPlain(drupal_install_profile_distribution_name()); // Include system.admin.inc so we can use the sort callbacks. $this->moduleHandler->loadInclude('system', 'inc', 'system.admin'); - // Store the request for use in the submit handler. - $this->request = $request; - $form['filters'] = array( '#type' => 'container', '#attributes' => array( diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index 9d92d66..004d03a 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -6,7 +6,7 @@ */ use Drupal\system\DateFormatInterface; -use Drupal\system\Form\ModulesInstallConfirmForm; +use Drupal\system\Form\ModulesUninstallConfirmForm; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;