chore(Application.php): conditionally load files search script in sim…#122
Merged
printminion-co merged 1 commit intomainfrom Sep 5, 2025
Merged
chore(Application.php): conditionally load files search script in sim…#122printminion-co merged 1 commit intomainfrom
printminion-co merged 1 commit intomainfrom
Conversation
38b7638 to
ed44841
Compare
4ee2e83 to
a03704b
Compare
85d5dac to
1cdbd49
Compare
1cdbd49 to
8e0af23
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a language detection issue in the simplesettings app where the files search script was being loaded globally, causing browser language to override user-configured language settings.
- Moved files search script loading from global Application constructor to specific page controller
- Added test isolation utilities to reset script and style state between tests
- Added test to verify files search script injection behavior
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lib/AppInfo/Application.php | Removed global files search script loading from constructor |
| lib/Controller/PageController.php | Added conditional files search script loading in index method |
| tests/Controller/PageControllerTest.php | Added test isolation utilities and test for script injection behavior |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
03c7cbb to
7f6c6f6
Compare
printminion-co
requested changes
Sep 4, 2025
Contributor
printminion-co
left a comment
There was a problem hiding this comment.
review ok
if changes accepted.
lets ensure that script addition happens in proper context
…plesettings context lets ensure that script addition happens in proper context inspired by https://github.com/IONOS-Productivity/nc-server/blob/e68ddae1e3c1e4532043f07bbc1bd9d1c96aa8a1/apps/files/lib/Controller/ViewController.php#L188 Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de> Co-authored-by: Tatjana Kaschperko Lindt <kaschperko-lindt@strato.de>
7f6c6f6 to
2663ee5
Compare
printminion-co
approved these changes
Sep 5, 2025
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.
Fix context menu language not depending on Setting > Language
The simplesettings app was loading files/search script on every page load (due to being globally enabled), which interfered with language detection causing browser language to override user configured language.
Run test via:
../d-n-t/container/dev bash -c "cd apps-custom/simplesettings/ && phpunit -c tests/phpunit.xml --colors=always --fail-on-warning --fail-on-risky"