Fixed the New Topic button showing in archived categories.
This commit is contained in:
parent
be0efed5b6
commit
9a41b8536e
2 changed files with 3 additions and 2 deletions
|
@ -82,7 +82,7 @@ function forum_fetch(int $forumId): array
|
|||
{
|
||||
$getForum = db_prepare('
|
||||
SELECT
|
||||
`forum_id`, `forum_name`, `forum_type`, `forum_link`,
|
||||
`forum_id`, `forum_name`, `forum_type`, `forum_link`, `forum_archived`,
|
||||
`forum_link_clicks`, `forum_parent`, `forum_colour`,
|
||||
(
|
||||
SELECT COUNT(`topic_id`)
|
||||
|
|
|
@ -56,7 +56,8 @@
|
|||
{% macro forum_category_tools(info, perms, take, offset) %}
|
||||
{% from 'macros.twig' import pagination %}
|
||||
|
||||
{% set can_topic = perms|perms_check(constant('MSZ_FORUM_PERM_CREATE_TOPIC')) %}
|
||||
{% set is_locked = info.forum_archived is not null %}
|
||||
{% set can_topic = not is_locked and perms|perms_check(constant('MSZ_FORUM_PERM_CREATE_TOPIC')) %}
|
||||
{% set pag = pagination(
|
||||
info.forum_topic_count,
|
||||
take,
|
||||
|
|
Loading…
Reference in a new issue