silverstripe-framework/control/VersionedRequestFilter.php
Andrew Short 156bb87d57 FIX: Move stage choosing into a pre-request filter.
This ensures that the correct stage is selected, even if the request
does not come through the model as controller system. This fixes an
issue where custom controllers would always be on the "Stage" stage.
2013-10-23 18:29:13 +13:00

18 lines
262 B
PHP

<?php
/**
* Initialises the versioned stage when a request is made.
*
* @package framework
* @subpackage control
*/
class VersionedRequestFilter {
public function preRequest() {
Versioned::choose_site_stage();
}
public function postRequest() {
}
}