silverstripe/silverstripe-subsites — pull request #95 by frankmullenger (2013-07-05 02:08:02+00:00)
Title: BUGFIX: Session var for active subsite out of sync with current subsite.

Refs silverstripe/silverstripe-subsites#93.

Subsite ID is set in the session for use in the CMS only, frontend pages no longer inspect the session variable for the subsite ID at all. Frontend pages first look for SubsiteID in the URL, then find the subsite ID based on the current domain.

When page preview is rendered in the CMS the SubsiteID is passed via the URL.

I have tidied up this pull request so that the previous one could be closed without being merged.