diff --git a/core/modules/forum/lib/Drupal/forum/ForumManager.php b/core/modules/forum/lib/Drupal/forum/ForumManager.php index bdc9ceb..5186859 100644 --- a/core/modules/forum/lib/Drupal/forum/ForumManager.php +++ b/core/modules/forum/lib/Drupal/forum/ForumManager.php @@ -41,9 +41,9 @@ class ForumManager implements ForumManagerInterface { /** * Forum settings config object. * - * @var \Drupal\Core\Config\Config + * @var \Drupal\Core\Config\ConfigFactory */ - protected $config; + protected $configFactory; /** * Entity manager service @@ -114,7 +114,7 @@ class ForumManager implements ForumManagerInterface { * The field info service. */ public function __construct(ConfigFactory $config_factory, EntityManager $entity_manager, Connection $connection, FieldInfo $field_info) { - $this->config = $config_factory->get('forum.settings'); + $this->configFactory = $config_factory; $this->entityManager = $entity_manager; $this->connection = $connection; $this->fieldInfo = $field_info; @@ -124,8 +124,9 @@ public function __construct(ConfigFactory $config_factory, EntityManager $entity * {@inheritdoc} */ public function getTopics($tid) { - $forum_per_page = $this->config->get('topics.page_limit'); - $sortby = $this->config->get('topics.order'); + $config = $this->configFactory->get('forum.settings'); + $forum_per_page = $config->get('topics.page_limit'); + $sortby = $config->get('topics.order'); global $user, $forum_topic_list_header; @@ -290,7 +291,7 @@ protected function getTopicOrder($sortby) { } /** - * Provides a new comment number. + * Wraps comment_num_new() in a method. * * @param int $nid * Node ID. @@ -413,7 +414,7 @@ public function getChildren($vid, $tid) { $_forums = taxonomy_get_tree($vid, $tid, NULL, TRUE); foreach ($_forums as $forum) { // Determine if the child term is a container. - if (in_array($forum->id(), $this->config->get('containers'))) { + if (in_array($forum->id(), $this->configFactory->get('forum.settings')->get('containers'))) { $forum->container = TRUE; } @@ -444,7 +445,7 @@ public function getIndex() { return $index; } - $vid = $this->config->get('vocabulary'); + $vid = $this->configFactory->get('forum.settings')->get('vocabulary'); $index = $this->entityManager->getStorageController('taxonomy_term')->create(array( 'tid' => 0, 'container' => TRUE,