From 87bff520d057b58dbaa19fec7823441e18b7e293 Mon Sep 17 00:00:00 2001 From: Nathaniel Catchpole Date: Fri, 31 Jan 2014 11:52:42 +0000 Subject: [PATCH] Issue #2159911 by InternetDevels, ParisLiakos: drupal_load() is called pointlessly. --- core/modules/forum/forum.install | 6 ------ core/modules/simpletest/simpletest.install | 1 - .../lib/Drupal/system/Tests/File/ScanDirectoryTest.php | 1 - 3 files changed, 8 deletions(-) diff --git a/core/modules/forum/forum.install b/core/modules/forum/forum.install index 55539ae5779..257972d4b68 100644 --- a/core/modules/forum/forum.install +++ b/core/modules/forum/forum.install @@ -104,16 +104,10 @@ function forum_module_preinstall($module) { * Implements hook_uninstall(). */ function forum_uninstall() { - // Load the dependent Taxonomy module, in case it has been disabled. - drupal_load('module', 'taxonomy'); - if ($field = field_info_field('node', 'taxonomy_forums')) { $field->delete(); } - // Load the dependent Comment module, in case it has been disabled. - drupal_load('module', 'comment'); - if ($field = field_info_field('node', 'comment_forum')) { $field->delete(); } diff --git a/core/modules/simpletest/simpletest.install b/core/modules/simpletest/simpletest.install index 4b940eddbfa..a863581192b 100644 --- a/core/modules/simpletest/simpletest.install +++ b/core/modules/simpletest/simpletest.install @@ -157,7 +157,6 @@ function simpletest_schema() { * Implements hook_uninstall(). */ function simpletest_uninstall() { - drupal_load('module', 'simpletest'); simpletest_clean_database(); // Remove generated files. diff --git a/core/modules/system/lib/Drupal/system/Tests/File/ScanDirectoryTest.php b/core/modules/system/lib/Drupal/system/Tests/File/ScanDirectoryTest.php index b4a4885c207..7caae460a4d 100644 --- a/core/modules/system/lib/Drupal/system/Tests/File/ScanDirectoryTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/File/ScanDirectoryTest.php @@ -61,7 +61,6 @@ class ScanDirectoryTest extends FileTestBase { * Check that the callback function is called correctly. */ function testOptionCallback() { - drupal_load('module', 'file_test'); // When nothing is matched nothing should be passed to the callback. $all_files = file_scan_directory($this->path, '/^NONEXISTINGFILENAME/', array('callback' => 'file_test_file_scan_callback'));