Created
November 5, 2014 12:03
-
-
Save vijaycs85/d0a813deaba5ddede546 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/modules/update/src/UpdateManager.php b/core/modules/update/src/UpdateManager.php | |
index 21cfe80..833b8e5 100644 | |
--- a/core/modules/update/src/UpdateManager.php | |
+++ b/core/modules/update/src/UpdateManager.php | |
@@ -13,6 +13,7 @@ | |
use Drupal\Core\StringTranslation\TranslationInterface; | |
use Drupal\Core\StringTranslation\StringTranslationTrait; | |
use Drupal\Core\Utility\ProjectInfo; | |
+use Drupal\Core\Extension\ThemeHandler; | |
/** | |
* Default implementation of UpdateManagerInterface. | |
@@ -64,6 +65,13 @@ class UpdateManager implements UpdateManagerInterface { | |
protected $availableReleasesTempStore; | |
/** | |
+ * Theme handler. | |
+ * | |
+ * @var \Drupal\Core\Extension\ThemeHandler | |
+ */ | |
+ protected $themeHandler; | |
+ | |
+ /** | |
* Constructs a UpdateManager. | |
* | |
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory | |
@@ -77,13 +85,14 @@ class UpdateManager implements UpdateManagerInterface { | |
* @param \Drupal\Core\KeyValueStore\KeyValueFactoryInterface $key_value_expirable_factory | |
* The expirable key/value factory. | |
*/ | |
- public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, UpdateProcessorInterface $update_processor, TranslationInterface $translation, KeyValueFactoryInterface $key_value_expirable_factory) { | |
+ public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, UpdateProcessorInterface $update_processor, TranslationInterface $translation, KeyValueFactoryInterface $key_value_expirable_factory, ThemeHandler $theme_handler) { | |
$this->updateSettings = $config_factory->get('update.settings'); | |
$this->moduleHandler = $module_handler; | |
$this->updateProcessor = $update_processor; | |
$this->stringTranslation = $translation; | |
$this->keyValueStore = $key_value_expirable_factory->get('update'); | |
$this->availableReleasesTempStore = $key_value_expirable_factory->get('update_available_releases'); | |
+ $this->themeHandler = $theme_handler; | |
$this->projects = array(); | |
} | |
@@ -123,7 +132,7 @@ public function getProjects() { | |
if (empty($this->projects)) { | |
// Still empty, so we have to rebuild. | |
$module_data = system_rebuild_module_data(); | |
- $theme_data = system_rebuild_theme_data(); | |
+ $theme_data = $this->themeHandler->rebuildThemeData(); | |
$project_info = new ProjectInfo(); | |
$project_info->processInfoList($this->projects, $module_data, 'module', TRUE); | |
$project_info->processInfoList($this->projects, $theme_data, 'theme', TRUE); | |
diff --git a/core/modules/update/update.services.yml b/core/modules/update/update.services.yml | |
index fe01f47..3564412 100644 | |
--- a/core/modules/update/update.services.yml | |
+++ b/core/modules/update/update.services.yml | |
@@ -6,7 +6,7 @@ services: | |
- { name: access_check, applies_to: _access_update_manager } | |
update.manager: | |
class: Drupal\update\UpdateManager | |
- arguments: ['@config.factory', '@module_handler', '@update.processor', '@string_translation', '@keyvalue.expirable'] | |
+ arguments: ['@config.factory', '@module_handler', '@update.processor', '@string_translation', '@keyvalue.expirable', '@module_handler'] | |
update.processor: | |
class: Drupal\update\UpdateProcessor | |
arguments: ['@config.factory', '@queue', '@update.fetcher', '@state', '@private_key', '@keyvalue', '@keyvalue.expirable'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment