@@ -192,8 +192,9 @@ class HtmlView extends KunenaView
192
192
public function displayUnread ($ tpl = null )
193
193
{
194
194
// Redirect unread layout to the page that contains the first unread message
195
- $ category = $ this ->get ('Category ' );
196
- $ topic = $ this ->get ('Topic ' );
195
+ $ model = $ this ->getModel ();
196
+ $ category = $ model ->getCategory ();
197
+ $ topic = $ model ->getTopic ();
197
198
KunenaTopicHelper::fetchNewStatus ([$ topic ->id => $ topic ]);
198
199
199
200
$ message = KunenaMessage::getInstance ($ topic ->lastread ? $ topic ->lastread : $ topic ->last_post_id );
@@ -241,9 +242,10 @@ public function displayDefault($tpl = null)
241
242
242
243
$ this ->setLayout ($ this ->layout );
243
244
244
- $ this ->category = $ this ->get ('Category ' );
245
- $ this ->topic = $ this ->get ('Topic ' );
246
- $ this ->message = $ this ->get ('Messages ' );
245
+ $ model = $ this ->getModel ();
246
+ $ this ->category = $ model ->getCategory ();
247
+ $ this ->topic = $ model ->getTopic ();
248
+ $ this ->message = $ model ->getMessages ();
247
249
$ channels = $ this ->category ->getChannels ();
248
250
249
251
$ options = [];
@@ -297,8 +299,8 @@ public function displayDefault($tpl = null)
297
299
return ;
298
300
}
299
301
300
- $ this ->messages = $ this -> get ( ' Messages ' );
301
- $ this ->total = $ this -> get ( ' Total ' );
302
+ $ this ->messages = $ model -> getMessages ( );
303
+ $ this ->total = model-> getTotal ( );
302
304
303
305
// If page does not exist, redirect to the last page (no redirect in embedded mode).
304
306
if (empty ($ this ->embedded ) && $ this ->total && $ this ->total <= $ this ->state ->get ('list.start ' )) {
@@ -333,7 +335,7 @@ public function displayDefault($tpl = null)
333
335
$ this ->app ->getDispatcher ()->dispatch ('onKunenaPrepare ' , $ prepareEvent );
334
336
}
335
337
336
- $ this ->moderators = $ this -> get ( ' Moderators ' );
338
+ $ this ->moderators = $ model -> getModerators ( );
337
339
$ this ->usertopic = $ this ->topic ->getUserTopic ();
338
340
339
341
$ this ->pagination = $ this ->getPagination (5 );
0 commit comments