Welcome Guest, Not a member yet? Register   Sign In
MaintenanceFilter vs JavaScript
#1
Question 
(This post was last modified: 05-03-2024, 01:28 AM by Gary.)

With all the changes to CI's routing, I'm wondering if there is a clever trick to be able to bypass the Maintenance filter on a (in my case necessary) second entry?

In order to refresh the page (with a "Down for Maintenance" page), it is necessary to initiate a page refresh... which is easy enough to initiate in the (now enabled) MainenanceFilter.  The problem is that this means there is now a second request (redirection) coming in from the client... which then gets repeatedly caught by the MaintenanceFilter.

I have patched it with a few new $_SESSION variables... to indicate that it's a reentry call... and also some changed to the users' $_SESSION (so as to disable the users' control/input, in such a manner that the session can be be restored/re-enabled, if the maintenance outage is only going to be brief).

So the question is... although I have it working, there are messy (and seldom required) $_SESSION checks and processing now dotted around elsewhere in the code, which irritates me... is there a more elegant way of handling this need for the reentry/second run though the Filter/s?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB