Add an administration tool to install all approved styles on the demo board - #459
Open
ECYaz wants to merge 2 commits into
Open
Add an administration tool to install all approved styles on the demo board#459ECYaz wants to merge 2 commits into
ECYaz wants to merge 2 commits into
Conversation
… board Installing styles on the demo board could only be done one contribution at a time, from each contribution's manage page. When the demo board has to be repopulated, for example after a rebuild, every approved style has to be installed by hand (issue phpbb#378). Add a staggered administration tool that walks every approved and visible style contribution and installs its latest approved revision for the requested branch through the existing demo manager, reusing the same install_demo() path as the per contribution button. One entry is added to the administration tool list for each branch with a configured demo board. Styles already present and active on the demo board are skipped, both the board's styles table and the style directory are checked so a wiped database or a wiped filesystem each count as not installed. The confirmation dialog reports how many styles the run would install, mirroring the revision selection get_download() makes. Contributions without a package for the branch are counted as skipped and a failing install does not abort the run.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an Administration “tool” to bulk-install missing approved style demos onto a configured demo board per phpBB branch, with a confirmation dialog that reports how many installs are pending and staggered/batched execution via the existing manage-tool AJAX flow.
Changes:
- Introduces a new manage tool (
manage/tool/demo/install_all.php) that processes approved visible styles in small batches and installs missing demos. - Adds a dedicated controller route/controller to customize confirmation messaging and preserve progress counters across batches.
- Extends the style demo manager with branch selection + an “is style installed” check, and wires the new tool into Administration for each configured demo board branch.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| manage/tool/demo/install_all.php | New staggered admin tool that iterates styles and installs missing demos for a selected branch. |
| controller/manage/tool/demo/install_all.php | New tool controller overriding confirmation messaging and carrying batch counters forward. |
| controller/manage/administration.php | Dynamically registers the new tool per configured demo branch and adds branch display naming. |
| contribution/style/demo/manager.php | Adds branch setter, installed-style caching, and helpers for style directory naming/installed detection. |
| language/en/manage_tools.php | Adds language strings for the new demo installation tool. |
| config/services.yml | Registers the new manage tool service. |
| config/routes/manage.yml | Adds the route for the new install-all tool endpoint. |
| config/controllers.yml | Registers the new controller service and injects the tool. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…ch state Addresses the three Copilot review remarks on PR 459. When the branch has no usable demo board, confirm_action() now throws the not configured message as an http_exception(200) instead of showing a generic Yes/No box whose confirmation could only ever end in that same error; the AJAX subscriber turns the exception into the inline tool message. The tool's set_branch() now clears the cached board_ready so a reused instance can never carry the previous branch's connection state. Also fixes the retun docblock typo in the demo manager.
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.
Adds an Administration tool for each branch with a configured demo board. It installs every approved style that is missing from the demo board, skips the ones already installed and the confirmation dialog says how many need installation before anything runs.
Fixes #378