Skip to content

Chore: Optimized saving of "navbar_type" in session and cookies (index.php)#4670

Open
IgorA100 wants to merge 1 commit intoZoneMinder:masterfrom
IgorA100:patch-64749
Open

Chore: Optimized saving of "navbar_type" in session and cookies (index.php)#4670
IgorA100 wants to merge 1 commit intoZoneMinder:masterfrom
IgorA100:patch-64749

Conversation

@IgorA100
Copy link
Contributor

@IgorA100 IgorA100 commented Mar 1, 2026

No description provided.

) {
$_SESSION['navbar_type'] = $navbar_type;
zm_setcookie('zmNavbar_type', $navbar_type);
if (!defined('ZM_FORCE_NAVBAR_TYPE')) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't check for the presence of ZM_FORCE_NAVBAR_TYPE, the constant's value will always be stored in cookies and the session. But this shouldn't be done, because if a constant is defined, it will be used unconditionally (regardless of the session or cookies). This follows from the code above. if (defined('ZM_FORCE_NAVBAR_TYPE')) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant