-
Notifications
You must be signed in to change notification settings - Fork 0
chore(Application.php): conditionally load files search script in sim… #122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
38b7638 to
ed44841
Compare
4ee2e83 to
a03704b
Compare
85d5dac to
1cdbd49
Compare
1cdbd49 to
8e0af23
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]> Co-authored-by: Tatjana Kaschperko Lindt <[email protected]>
7f6c6f6 to
2663ee5
Compare
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"