Repository navigation
Fix validation findings and remove the German language pack - #5
Merged
Merged
Conversation
- Load the edit notice's usernames in one query instead of one per post, and load viewtopic's language so the notice is no longer shown as a raw key. - Show the posters' profile fields, which never appeared because the code read a variable nothing set. - Remove code and template variables nothing used: contact links, online status, joined date, the controller's icon images, the unapproved/deleted post forms and the unused request service. - Write the templates in Twig only, with language strings in HTML attributes escaped. - Who is online names a news category only when the viewer may see the forum. - Remove the newspage_mod_version config value with a new migration. - Replace license.txt with the extension skeleton's text. - Remove the unused NEWS_GO_TO_TOPIC, NEWS_READ_FULL and NEWS_READ_HERE keys and the incomplete German translation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the findings from a validation pass in the style of phpBB.com's extension checks. None were security problems. This also removes the German translation, which only covered one of the three language files.
Fixes
Edit notice. The "Last edited by" usernames were loaded with one query per edited post, and that query read every editor on the board. They now come from one query for the posts on the page. The notice also showed the raw key
EDITED_TIMES_TOTAL, because the news page never loaded phpBB's viewtopic language file. It now does.Profile fields. Fields set to show on topic pages never appeared on news items: the code read a variable nothing set. They now show in the poster line when "Show user information" is on, the same way viewtopic picks them.
Unused code removed:
requestservice thatnewspagewas given but never usedKept for other styles and event templates: the comment count, forum name and link, and rank image address.
Templates. All templates now use Twig syntax only; before, they mixed Twig and the old phpBB syntax. Language strings used in HTML attributes are escaped. The "in forum" byline link is now built in PHP.
Who is online. A news category is named only when the forum exists and the viewer may see it, as
viewonline.phpdoes for forums. Otherwise it shows "Viewing news", or the archive month when there is one.Version in config. A new migration removes
newspage_mod_version, which the 1.0 and 1.1 migrations stored. phpBB reads the version fromcomposer.json.license.txt now matches the extension skeleton's text.
Language. Removed the unused
NEWS_GO_TO_TOPIC,NEWS_READ_FULLandNEWS_READ_HEREkeys, andlanguage/de/. The German TODO item is gone too.Testing
Claude ran:
main.Investigated and written by Claude on behalf of William Jacoby (bonelifer).