mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-09 03:01:18 +02:00
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() {
|
|
}
|
|
|
|
}
|