Created
August 22, 2026 13:25
-
-
Save hipot/96349b047b820036fe2b623bec92f28c to your computer and use it in GitHub Desktop.
tmp open site when it's closed in config
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
| // tmp open site when it's closed in config | |
| Bitrix\Main\EventManager::getInstance()->addEventHandler("main", "OnBeforeProlog", static function () { | |
| if (\Bitrix\Main\Application::getInstance()?->getContext()?->getRequest()->get('site_closed') == 'N') { | |
| \Bitrix\Main\Application::getInstance()->getKernelSession()['SESS_OPERATIONS']['edit_other_settings'] = 'Y'; | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment