Fix: Save the selected filter level in the session on Log page#4837
Open
IgorA100 wants to merge 3 commits into
Open
Fix: Save the selected filter level in the session on Log page#4837IgorA100 wants to merge 3 commits into
IgorA100 wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes persistence of the selected log Level filter on the classic skin System Log page by saving the chosen level into the user session (and renaming the session key to match existing naming patterns like zmLogComponent).
Changes:
- Read the selected log level from
$_SESSION['zmLogFilterLevel']when rendering the Level filter dropdown. - Persist the requested log level (
level) into$_SESSION['zmLogFilterLevel']during AJAX log queries.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| web/skins/classic/views/log.php | Switches the Level filter’s selected value to use the new session key (zmLogFilterLevel). |
| web/ajax/log.php | Saves the requested Level filter value into the session during task=query requests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Open and close the session only once per page refresh. First, save all changes in the $newSessionValue array, then open the session, set the new session values, and close the session. Only write the correct $_REQUEST['level'] values to "zmLogFilterLevel" (if they are in ZM\Logger::$codes).
Contributor
Author
|
@connortechnology |
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.
\skins\classic\views\log.php, we tried to read the `ZM_LOG_FILTER_LEVEL' session, but it was always empty because we didn't save anything to it.ZM_LOG_FILTER_LEVEL' tozmLogFilterLevel' for code consistency.