Skip to content

Commit ccf94f8

Browse files
committed
[K7.0] Replace deprecated usage of $this->get() by $model->get
1 parent 9feb242 commit ccf94f8

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

src/site/src/View/Topics/HtmlView.php

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,12 @@ class HtmlView extends KunenaView
127127
public function displayDefault($tpl = null)
128128
{
129129
$this->layout = 'default';
130+
$model = $this->getModel();
130131
$this->params = $this->state->get('params');
131-
$this->topics = $this->get('Topics');
132-
$this->total = $this->get('Total');
133-
$this->topicActions = $this->get('TopicActions');
134-
$this->actionMove = $this->get('ActionMove');
132+
$this->topics = $model->getTopics();
133+
$this->total = $model->getTotal();
134+
$this->topicActions = $model->getTopicActions();
135+
$this->actionMove = $model->getActionMove();
135136
$this->message_ordering = $this->me->getMessageOrdering();
136137

137138
$this->URL = KunenaRoute::_();
@@ -170,11 +171,12 @@ protected function _prepareDocument() {}
170171
public function displayUser($tpl = null)
171172
{
172173
$this->layout = 'user';
174+
$model = $this->getModel();
173175
$this->params = $this->state->get('params');
174-
$this->topics = $this->get('Topics');
175-
$this->total = $this->get('Total');
176-
$this->topicActions = $this->get('TopicActions');
177-
$this->actionMove = $this->get('ActionMove');
176+
$this->topics = $model->getTopics();
177+
$this->total = $model->getTotal();
178+
$this->topicActions = $model->getTopicActions();
179+
$this->actionMove = $model->getActionMove();
178180
$this->message_ordering = $this->me->getMessageOrdering();
179181

180182
$this->URL = KunenaRoute::_();
@@ -206,10 +208,11 @@ public function displayUser($tpl = null)
206208
public function displayPosts($tpl = null)
207209
{
208210
$this->layout = 'posts';
211+
$model = $this->getModel();
209212
$this->params = $this->state->get('params');
210-
$this->messages = $this->get('Messages');
211-
$this->topics = $this->get('Topics');
212-
$this->total = $this->get('Total');
213+
$this->messages = $model->getMessages();
214+
$this->topics = $model->getTopics();
215+
$this->total = $model->getTotal();
213216
$this->actionMove = false;
214217
$this->message_ordering = $this->me->getMessageOrdering();
215218

@@ -340,7 +343,7 @@ public function displayTopicRows()
340343
$params->set('kunena_layout', 'topics');
341344

342345
PluginHelper::importPlugin('kunena');
343-
346+
var_dump($this->topics); die();
344347
$prepareEvent = new KunenaPrepareEvent('onKunenaPrepare', [
345348
'context' => 'kunena.topics',
346349
'subject' => $this->topics,

0 commit comments

Comments
 (0)