Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
a16cbda0
Commit
a16cbda0
authored
Apr 15, 2015
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2470145
by rbmboogie: Update manager displays checkbox for disabled extensions
parent
2febbfff
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
37 deletions
+0
-37
core/modules/update/config/install/update.settings.yml
core/modules/update/config/install/update.settings.yml
+0
-1
core/modules/update/config/schema/update.schema.yml
core/modules/update/config/schema/update.schema.yml
+0
-3
core/modules/update/src/Tests/UpdateContribTest.php
core/modules/update/src/Tests/UpdateContribTest.php
+0
-17
core/modules/update/src/UpdateManager.php
core/modules/update/src/UpdateManager.php
+0
-4
core/modules/update/src/UpdateSettingsForm.php
core/modules/update/src/UpdateSettingsForm.php
+0
-12
No files found.
core/modules/update/config/install/update.settings.yml
View file @
a16cbda0
check
:
disabled_extensions
:
false
interval_days
:
1
fetch
:
url
:
'
'
...
...
core/modules/update/config/schema/update.schema.yml
View file @
a16cbda0
...
...
@@ -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'
...
...
core/modules/update/src/Tests/UpdateContribTest.php
View file @
a16cbda0
...
...
@@ -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.'
);
}
}
}
/**
...
...
core/modules/update/src/UpdateManager.php
View file @
a16cbda0
...
...
@@ -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.
...
...
core/modules/update/src/UpdateSettingsForm.php
View file @
a16cbda0
...
...
@@ -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'
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment