fix: show default theme author/version on Settings > Themes (#1466)#1470
Merged
Conversation
…#1466) The theme discovery regex only matched double-quoted define() values, so the default theme card showed "by Unknown · v?" despite valid manifest data.
- Discriminate single- vs double-quoted define() branches so empty "" does not read an unset capture (Settings fatal). - Support escaped apostrophes in single-quoted values. - Sanitize theme_link (http/https only) and screenshot filename (basename). - Expand ThemeConfParseTest; document picker vs API include in system.php, ARCHITECTURE.md, translating.md, and AGENTS.md.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
by Unknown · v?for the shipped default theme.ThemeConf::parseDefine()reads both single- and double-quoteddefine()string literals fromtheme.conf.phpwithout executing the file (the default manifest uses single quotes; fork themes often use double quotes per the docs).Root cause
The discovery loop regex only matched double-quoted values. The default
web/themes/default/theme.conf.phpuses single quotes, so author/version fell through to theUnknown/?defaults.Test plan
ThemeConfParseTest— default manifest + double-quoted sample./sbpp.sh test --filter=ThemeConfParseTest?p=admin&c=settings§ion=themesand confirm the default card reads by SourceBans++ Dev Team · v2.0.0Fixes #1466