mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
Update functions.php
This commit is contained in:
parent
6b78c96b8f
commit
2510cbedaa
1 changed files with 2 additions and 5 deletions
|
@ -271,10 +271,7 @@ function auth($type, $forum_id, $ug_data, array $f_access = [], $group_perm = UG
|
||||||
$add_auth_type_desc = ($forum_id != AUTH_LIST_ALL);
|
$add_auth_type_desc = ($forum_id != AUTH_LIST_ALL);
|
||||||
|
|
||||||
// Check forum existence
|
// Check forum existence
|
||||||
if (!forum_exists()) {
|
if (!forum_exists() || ($add_auth_type_desc && !forum_exists($forum_id))) {
|
||||||
return [];
|
|
||||||
}
|
|
||||||
if ($add_auth_type_desc && !forum_exists($forum_id)) {
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1612,7 +1609,7 @@ function get_topic_title($topic_id)
|
||||||
|
|
||||||
function forum_exists($forum_id = null): bool
|
function forum_exists($forum_id = null): bool
|
||||||
{
|
{
|
||||||
if (!isset($forum_id)) {
|
if ($forum_id === null) {
|
||||||
return (bool)DB()->fetch_row("SELECT 1 FROM " . BB_FORUMS . " LIMIT 1");
|
return (bool)DB()->fetch_row("SELECT 1 FROM " . BB_FORUMS . " LIMIT 1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue