Only load status_config.php CSS when necessary#1833
Merged
dregad merged 2 commits intomantisbt:masterfrom Jul 28, 2022
Merged
Conversation
atrol
reviewed
Jul 10, 2022
Member
|
@dregad do we still need this ugly special handling in status_config.php after your change? |
vboctor
approved these changes
Jul 17, 2022
Member
Author
Possibly not. I'll check. |
The dynamic CSS for status colors was included in relationship_api.php and bug_group_action_api.php, which caused status_config.php to be loaded for every MantisBT page even though it is not needed for many of them. This moves the require_css() call to the individual files that require the specific color classes. NOTE: This could introduce regression issues for Plugins relying on the status_config.php CSS to be loaded by MantisBT core. - Affected plugins: relying on html_get_status_css_* functions - Symptoms: The status indicators are displayed in black instead of the expected color - Solution: add `require_css( 'status_config.php' );` to the relevant plugin pages or in the EVENT_LAYOUT_RESOURCES hook, as appropriate. Fixes #30773
The logic to load the dynamic CSS only for certain pages based on HTTP_REFERER is no longer needed, as the script is only called when it is actually needed Issue #30773 Signed-off-by: Damien Regad <dregad@mantisbt.org>
cac399f to
fe94f64
Compare
Member
Author
|
@atrol I removed the code and performed some testing, did not notice any regressions. |
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.
As mentioned in #1831 (comment)
Fixes #30773