mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
156bb87d57
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.
18 lines
262 B
PHP
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() {
|
|
}
|
|
|
|
}
|