Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xoops, Events and Session cleanup and fixes #412

Merged
merged 1 commit into from
Oct 8, 2015

Conversation

geekwright
Copy link
Contributor

\Xoops

  • PSR-2 cleanup
  • add \Xoops::simpleRedirect(). This replaces simple redirects using PHP header() to change the location. This makes it possible to trigger an event prior to redirecting. Debugbar was modified to stack data on these events, so activity logged prior to the redirect is available.
  • event core.include.functions.redirectheader.start changed to core.redirect.start which is triggered both by \Xoops::redirect() and \Xoops::simpleRedirect().

\Xoops\Core\Session\

  • added locking transaction to write. This seems to have solved Exception when viewing admin account. #370 (This was related to the, now simple, redirect done when the profile module is active, causing two writes to compete for the row.)
  • added a core.session.shutdown event just before the session is written out and closed. This allows things like Debugbar to close everything out, so that the state can be saved in the session. Without this, for example, stacked data in Debugbar stayed around forever, as the session was saved before it was cleared when the debugbar was rendered. This allows this delicate balance to be controlled. (Down side, the final session write is not captured, although if needed, Monolog keeps going all the way to shutdown.)

\Xoops\Core\Events

  • visibility of initializeListeners() reduced to protected, and it now is invoked automatically in the constructor. It really should be a private concern of Events, and should not be invoked externally. With this method exposed, any program could compromise the integrity of the events system.

\Xoops\Core\HttpRequest

  • PSR-2 cleanup

geekwright added a commit that referenced this pull request Oct 8, 2015
Xoops, Events and Session cleanup and fixes
@geekwright geekwright merged commit 6b9e1b0 into XOOPS:master Oct 8, 2015
@geekwright geekwright deleted the sessionfix branch October 8, 2015 00:40
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