diff --git a/core/includes/common.inc b/core/includes/common.inc index 37896ec..f6870aa 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -4868,6 +4868,7 @@ function _drupal_bootstrap_code() { require_once DRUPAL_ROOT . '/core/includes/token.inc'; require_once DRUPAL_ROOT . '/core/includes/errors.inc'; require_once DRUPAL_ROOT . '/core/includes/schema.inc'; + require_once DRUPAL_ROOT . '/core/includes/entity.inc'; // Load all enabled modules module_load_all(); diff --git a/core/includes/entity.inc b/core/includes/entity.inc index a43d234..b651e32 100644 --- a/core/includes/entity.inc +++ b/core/includes/entity.inc @@ -12,33 +12,6 @@ use Drupal\Core\Entity\EntityInterface; /** - * Implements hook_help(). - */ -function entity_help($path, $arg) { - switch ($path) { - case 'admin/help#entity': - $output = ''; - $output .= '

' . t('About') . '

'; - $output .= '

' . t('The Entity module provides an API for managing entities like nodes and users, i.e. an API for loading and identifying entities. For more information, see the online handbook entry for Entity module', array('!url' => 'http://drupal.org/documentation/modules/entity')) . '

'; - return $output; - } -} - -/** - * Implements hook_modules_preenable(). - */ -function entity_modules_preenable() { - entity_info_cache_clear(); -} - -/** - * Implements hook_modules_disabled(). - */ -function entity_modules_disabled() { - entity_info_cache_clear(); -} - -/** * Gets the entity info array of an entity type. * * @param $entity_type diff --git a/core/includes/module.inc b/core/includes/module.inc index cbdbeaf..5a30875 100644 --- a/core/includes/module.inc +++ b/core/includes/module.inc @@ -476,6 +476,7 @@ function module_enable($module_list, $enable_dependencies = TRUE) { } // Allow modules to react prior to the enabling of a module. + entity_info_cache_clear(); module_invoke_all('modules_preenable', array($module)); // Enable the module. @@ -560,6 +561,7 @@ function module_disable($module_list, $disable_dependents = TRUE) { // Refresh the module list to exclude the disabled modules. system_list_reset(); module_implements_reset(); + entity_info_cache_clear(); // Invoke hook_modules_disabled before disabling modules, // so we can still call module hooks to get information. module_invoke_all('modules_disabled', $invoke_modules);