From 98c06a0c8e8d1e621423c6340bcf88baaf2f0b73 Mon Sep 17 00:00:00 2001 From: Andy Vandenberghe Date: Sun, 4 Oct 2026 22:40:46 +0200 Subject: [PATCH 1/2] Release 3.0.12 Version 3.0.12 in ext.php, composer.json (time 2026-10-04) and the README; the README lists the new "Show announcements first" ACP option. CHANGELOG gets the 3.0.12 section: #201, the fixes #192-#199, and #200. Co-Authored-By: Claude Opus 5.5 --- README.md | 3 ++- composer.json | 4 ++-- contrib/CHANGELOG.md | 20 ++++++++++++++++++++ ext.php | 2 +- 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5c8baaa..e29077a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Recent Topics for phpBB 3.3 Extension for phpBB to display recent topics on the index page. Originally based on NV Recent Topics by Joas Schilling ([nickvergessen](https://github.com/nickvergessen)), later maintained by PayBas. Now maintained by [avathar](https://www.avathar.be). -**Version:** 3.0.11 (10/08/2026) +**Version:** 3.0.12 (04/10/2026) #### Requirements - phpBB 3.3.0 or higher @@ -28,6 +28,7 @@ Originally based on NV Recent Topics by Joas Schilling ([nickvergessen](https:// - Per-forum include/exclude (in ACP Forum Management) - Pagination: page limit, show all pages toggle - Minimum topic type level (normal/sticky/announcement/global) +- Show announcements first: announcements and global announcements lead each page of the list - Exclude topics by ID - Display parent forum names - Topic title link target (first post, last post, or first unread) diff --git a/composer.json b/composer.json index 4cbed19..6c7bd65 100644 --- a/composer.json +++ b/composer.json @@ -3,8 +3,8 @@ "type": "phpbb-extension", "description": "Recent Topics Extension for phpBB 3.3. Adds a list with recent topics to the index page.", "homepage": "https://www.avathar.be/forum/app.php/dlext/details?df_id=35", - "version": "3.0.11", - "time": "2026-08-10", + "version": "3.0.12", + "time": "2026-10-04", "keywords": ["phpbb", "extension", "Recent Topics"], "license": "GPL-2.0-only", "authors": [ diff --git a/contrib/CHANGELOG.md b/contrib/CHANGELOG.md index 1d1b1fe..8c6cfe8 100644 --- a/contrib/CHANGELOG.md +++ b/contrib/CHANGELOG.md @@ -1,5 +1,25 @@ ### Changelog +- 3.0.12 (04/10/2026) — bugfix release + + New features + - [NEW] ACP option "Show announcements first": the announcements and global announcements on each page of the list move to the top of that page. Only topics already on the page move, so older announcements are not pulled back in; off by default (#201) + + Fixes + - [FIX] Password-protected forums no longer leak topic titles, last-post subjects and authors into Recent Topics (index, viewforum and the standalone pages) before the password is entered (#193) + - [FIX] Existing members see Recent Topics straight after the extension is enabled — the install now clears the cached permissions, so the new `u_rt_view` grant takes effect (#194) + - [FIX] With "Show all recent topic pages" on, the page count now covers the user's Recent Topics forums instead of only forums they moderate, so the list is no longer cut short (#195) + - [FIX] New members get the board's Recent Topics defaults on registration — the defaults were written before the account existed, to user id 0 (#196) + - [FIX] The ACP "Show like counts" setting now works; like counts showed whenever Post Love was installed (#197) + - [FIX] UCP location and topic-count preferences are validated: locations must be one of the offered options, the count is kept within 1–999 (#198) + - [FIX] Who Is Online shows "Viewing Recent Topics" as plain text in every language instead of a nested link with a stray `%s` (#199) + - [FIX] The last-post link in the list has a screen-reader label again (#192, thanks karelpak1) + + Housekeeping + - [CHANGE] The ACP "Become a patron" button is bundled with the extension instead of loaded from Patreon's servers on every ACP page view (#200) + - [CHANGE] New `release_3_0_12` migration adds the `rt_announcements_first` setting + - [CHANGE] Unit tests for the forum list, the page count, like counts, announcement ordering, the UCP checks and the language packs; functional tests for the ACP settings + - 3.0.11 (10/08/2026) — validation release Version jumps from 3.0.1 to 3.0.11: the number was reset to 3.0.0 during the 3.0.0 namespace diff --git a/ext.php b/ext.php index 2b0ba0e..a6c232d 100644 --- a/ext.php +++ b/ext.php @@ -15,7 +15,7 @@ */ class ext extends \phpbb\extension\base { - const RT_VERSION = '3.0.11'; + const RT_VERSION = '3.0.12'; const MIN_PHP_VERSION = '8.1.0'; const MIN_PHPBB_VERSION = '3.3.0'; From 6e0630b25899f181c94504a093245baf8dda582f Mon Sep 17 00:00:00 2001 From: Andy Vandenberghe Date: Sun, 4 Oct 2026 22:45:15 +0200 Subject: [PATCH 2/2] Clear the permission cache on upgrade; document upgrading release_3_0_12 gets a custom step that runs acl_clear_prefetch(). The #194 fix lives in rt_perms, which already ran on every existing install, so boards that enabled an earlier 3.0.x and still hold cached permissions without u_rt_view only recover through this upgrade step. README gains an Upgrading section (disable, replace files, enable, purge): a plain file swap does not run the new migration. The CHANGELOG says the same and mentions the cache clear. Co-Authored-By: Claude Opus 5.5 --- README.md | 6 ++++++ contrib/CHANGELOG.md | 4 +++- migrations/v300/release_3_0_12.php | 20 +++++++++++++++++++- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e29077a..b7117fc 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,12 @@ prosilver, pbTech, pbWow3, WE Clearblue 4. Navigate in the ACP to `Customise -> Manage extensions`. 5. Find `Recent Topics` under "Disabled Extensions" and click `Enable`. +#### Upgrading +1. Navigate in the ACP to `Customise -> Manage extensions` and click `Disable` for `Recent Topics` (do not delete its data). +2. Replace the files in `/ext/avathar/recenttopics/` with the new release. +3. Click `Enable` for `Recent Topics`. Enabling runs the new version's database migrations, so a plain file swap is not enough. +4. Purge the cache (`General -> Purge the cache`). + #### Uninstallation 1. Navigate in the ACP to `Customise -> Manage extensions`. 2. Click the `Disable` link for `Recent Topics`. diff --git a/contrib/CHANGELOG.md b/contrib/CHANGELOG.md index 8c6cfe8..ea51813 100644 --- a/contrib/CHANGELOG.md +++ b/contrib/CHANGELOG.md @@ -2,6 +2,8 @@ - 3.0.12 (04/10/2026) — bugfix release + Upgrading: disable the extension, replace the files, enable it again. Enabling runs the 3.0.12 migration; a plain file swap does not. + New features - [NEW] ACP option "Show announcements first": the announcements and global announcements on each page of the list move to the top of that page. Only topics already on the page move, so older announcements are not pulled back in; off by default (#201) @@ -17,7 +19,7 @@ Housekeeping - [CHANGE] The ACP "Become a patron" button is bundled with the extension instead of loaded from Patreon's servers on every ACP page view (#200) - - [CHANGE] New `release_3_0_12` migration adds the `rt_announcements_first` setting + - [CHANGE] New `release_3_0_12` migration adds the `rt_announcements_first` setting and clears the permission cache once, so boards that enabled an earlier 3.0.x and were hit by #194 recover on upgrade - [CHANGE] Unit tests for the forum list, the page count, like counts, announcement ordering, the UCP checks and the language packs; functional tests for the ACP settings - 3.0.11 (10/08/2026) — validation release diff --git a/migrations/v300/release_3_0_12.php b/migrations/v300/release_3_0_12.php index 2189171..3d8d585 100644 --- a/migrations/v300/release_3_0_12.php +++ b/migrations/v300/release_3_0_12.php @@ -5,7 +5,8 @@ * @copyright (c) 2026 Andreas Vandenberghe (avathar) * @license GNU General Public License, version 2 (GPL-2.0) * - * Release 3.0.12 — adds the "Show announcements first" setting (issue #201). + * Release 3.0.12 — adds the "Show announcements first" setting (issue #201) and clears the + * permission cache once for boards affected by issue #194. */ namespace avathar\recenttopics\migrations\v300; @@ -26,9 +27,26 @@ public function update_data() { return [ ['config.add', ['rt_announcements_first', 0]], + ['custom', [[$this, 'clear_permission_cache']]], ]; } + /** + * Clear every user's cached permission set. + * + * Boards that enabled 3.0.11 or earlier may still hold cached sets without u_rt_view, because + * rt_perms added the permissions without clearing the cache (issue #194). That fix only reaches + * fresh installs, so the upgrade clears the cache once here. Same pattern as core's + * remove_orphaned_roles migration; no $auth is injected into a migration. + * + * @return void + */ + public function clear_permission_cache() + { + $auth = new \phpbb\auth\auth(); + $auth->acl_clear_prefetch(); + } + public function revert_data() { return [