Skip to content

Commit

Permalink
Authorization failed: Invalid action approve! #6757
Browse files Browse the repository at this point in the history
  • Loading branch information
810 committed Mar 9, 2020
1 parent 7bac803 commit 53b2474
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/libraries/kunena/forum/message/helper.php
Expand Up @@ -242,11 +242,10 @@ public static function getLatestMessages($categories = false, $limitstart = 0, $
$user = isset($params['user']) ? $params['user'] : false;
$where = isset($params['where']) ? (string) $params['where'] : '';
$childforums = isset($params['childforums']) ? (bool) $params['childforums'] : false;
$view = Factory::getApplication()->input->getCmd('view');

if ($limit < 1 && empty($params['nolimit']))
{
$view = Factory::getApplication()->input->getCmd('view');

if ($view == 'search')
{
$limit = KunenaFactory::getConfig()->messages_per_page_search;
Expand Down Expand Up @@ -311,7 +310,14 @@ public static function getLatestMessages($categories = false, $limitstart = 0, $

foreach ($categories as $category)
{
if ($category->isAuthorised($authorise))
if ($view == 'search')
{
if ($category->isAuthorised('read'))
{
$catlist += $category->getChannels();
}
}
else
{
$catlist += $category->getChannels();
}
Expand Down

0 comments on commit 53b2474

Please sign in to comment.