Issue #3281772 by mcdruid: Hide the "Only For Testing" package by default on the modules admin page

merge-requests/2343/head
mcdruid 2022-05-27 10:16:14 +01:00
parent c91d728188
commit 82e5f5a353
3 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,5 @@
name = "System null version test"
description = "Support module for testing with a null version."
package = Testing
package = Only For Testing
core = 7.x
hidden = FALSE

View File

@ -1,6 +1,6 @@
name = "System requires null version test"
description = "Support module for testing system_modules()."
package = Testing
package = Only For Testing
core = 7.x
version = VERSION
hidden = FALSE

View File

@ -935,6 +935,8 @@ function system_modules($form, $form_state = array()) {
),
// Ensure that the "Core" package fieldset comes first.
'#weight' => $package == 'Core' ? -10 : NULL,
// Hide this package unless we're running a test.
'#access' => !($package == 'Only For Testing' && !drupal_valid_test_ua()),
);
}