lat9 / log_manager

A Log-File Manager for Zen Cart v1.5.1+
GNU General Public License v2.0
0 stars 0 forks source link

Performance improvement: Run the file-check at login-only #1

Closed lat9 closed 7 years ago

lat9 commented 7 years ago

As suggested by @scottcwilson, as a performance improvement, run the file-check only during admin-login. The functionality would otherwise remain the same.

lat9 commented 7 years ago

While this would be a "good idea", I'm wont to require a change to the admin-level login script just to add a notification. I'm also looking to see if the $_SERVER['HTTP_REFERER'] indicates a login request and I'll try heading down that path.

scottcwilson commented 7 years ago

I would just create a session variable and set it once when done. Keep it simple! :)

lat9 commented 7 years ago

That's a good idea, but the approach that I've taken is to run the file check if

  1. The current page is not the login one.
  2. The previous page was the login one (as determined via the HTTP_REFERER.

I think that's just as simple!