Commit a16cbda0 authored by alexpott's avatar alexpott

Issue #2470145 by rbmboogie: Update manager displays checkbox for disabled extensions

parent 2febbfff
check:
disabled_extensions: false
interval_days: 1
fetch:
url: ''
......
......@@ -8,9 +8,6 @@ update.settings:
type: mapping
label: 'Check settings'
mapping:
disabled_extensions:
type: boolean
label: 'Check for updates of disabled modules and themes'
interval_days:
type: integer
label: 'Days since last check'
......
......@@ -250,23 +250,6 @@ function testUpdateShowDisabledThemes() {
);
$base_theme_project_link = \Drupal::l(t('Update test base theme'), Url::fromUri('http://example.com/project/update_test_basetheme'));
$sub_theme_project_link = \Drupal::l(t('Update test subtheme'), Url::fromUri('http://example.com/project/update_test_subtheme'));
foreach (array(TRUE, FALSE) as $check_disabled) {
$update_settings->set('check.disabled_extensions', $check_disabled)->save();
$this->refreshUpdateStatus($xml_mapping);
// In neither case should we see the "Themes" heading for installed
// themes.
$this->assertNoText(t('Themes'));
if ($check_disabled) {
$this->assertText(t('Disabled themes'));
$this->assertRaw($base_theme_project_link, 'Link to the Update test base theme project appears.');
$this->assertRaw($sub_theme_project_link, 'Link to the Update test subtheme project appears.');
}
else {
$this->assertNoText(t('Disabled themes'));
$this->assertNoRaw($base_theme_project_link, 'Link to the Update test base theme project does not appear.');
$this->assertNoRaw($sub_theme_project_link, 'Link to the Update test subtheme project does not appear.');
}
}
}
/**
......
......@@ -138,10 +138,6 @@ public function getProjects() {
$project_info = new ProjectInfo();
$project_info->processInfoList($this->projects, $module_data, 'module', TRUE);
$project_info->processInfoList($this->projects, $theme_data, 'theme', TRUE);
if ($this->updateSettings->get('check.disabled_extensions')) {
$project_info->processInfoList($this->projects, $module_data, 'module', FALSE);
$project_info->processInfoList($this->projects, $theme_data, 'theme', FALSE);
}
// Allow other modules to alter projects before fetching and comparing.
$this->moduleHandler->alter('update_projects', $this->projects);
// Store the site's project data for at most 1 hour.
......
......@@ -75,12 +75,6 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'#description' => t('Select how frequently you want to automatically check for new releases of your currently installed modules and themes.'),
);
$form['update_check_disabled'] = array(
'#type' => 'checkbox',
'#title' => t('Check for updates of disabled modules and themes'),
'#default_value' => $config->get('check.disabled_extensions'),
);
$notification_emails = $config->get('notification.emails');
$form['update_notify_emails'] = array(
'#type' => 'textarea',
......@@ -142,14 +136,8 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this->config('update.settings');
// See if the update_check_disabled setting is being changed, and if so,
// invalidate all update status data.
if ($form_state->getValue('update_check_disabled') != $config->get('check.disabled_extensions')) {
update_storage_clear();
}
$config
->set('check.disabled_extensions', $form_state->getValue('update_check_disabled'))
->set('check.interval_days', $form_state->getValue('update_check_frequency'))
->set('notification.emails', $form_state->get('notify_emails'))
->set('notification.threshold', $form_state->getValue('update_notification_threshold'))
......
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