From 1dc01fe0b2b9ab2870c27314ef2a9cb1da14bdee Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Tue, 28 Feb 2023 14:37:15 +0700 Subject: [PATCH] Removed deprecated SQL_CACHE https://dev.mysql.com/worklog/task/?id=10837 --- index.php | 3 +-- library/includes/functions.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 395f1e0f4..e10b0b62c 100644 --- a/index.php +++ b/index.php @@ -102,8 +102,7 @@ $topics_join_sql .= ($only_new == ONLY_NEW_TOPICS) ? " $join_t_type = ($only_new == ONLY_NEW_TOPICS) ? 'INNER JOIN' : 'LEFT JOIN'; $sql = " - SELECT SQL_CACHE - f.cat_id, f.forum_id, f.forum_status, f.forum_parent, f.show_on_index, + SELECT f.cat_id, f.forum_id, f.forum_status, f.forum_parent, f.show_on_index, p.post_id AS last_post_id, p.post_time AS last_post_time, t.topic_id AS last_topic_id, t.topic_title AS last_topic_title, u.user_id AS last_post_user_id, u.user_rank AS last_post_user_rank, diff --git a/library/includes/functions.php b/library/includes/functions.php index 5914932c4..7da441d5b 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -338,7 +338,7 @@ function auth($type, $forum_id, $ug_data, array $f_access = array(), $group_perm } } else { if (!$is_guest && !$is_admin) { - $sql = "SELECT SQL_CACHE aa.forum_id, aa.forum_perm + $sql = "SELECT aa.forum_id, aa.forum_perm FROM " . BB_AUTH_ACCESS_SNAP . " aa WHERE aa.user_id = " . (int)$ug_data['user_id'] . " $forum_match_sql";