Merge pull request #5005 from dhensby/pulls/modeladmin-reading-mode

Set the stage reading mode in LeftAndMain
This commit is contained in:
Damian Mooyman 2016-02-03 16:54:02 +13:00
commit eaf9d32bc7

View File

@ -444,6 +444,9 @@ class LeftAndMain extends Controller implements PermissionProvider {
// The user's theme shouldn't affect the CMS, if, for example, they have // The user's theme shouldn't affect the CMS, if, for example, they have
// replaced TableListField.ss or Form.ss. // replaced TableListField.ss or Form.ss.
Config::inst()->update('SSViewer', 'theme_enabled', false); Config::inst()->update('SSViewer', 'theme_enabled', false);
//set the reading mode for the admin to stage
Versioned::set_reading_mode('Stage');
} }
public function handleRequest(SS_HTTPRequest $request, DataModel $model = null) { public function handleRequest(SS_HTTPRequest $request, DataModel $model = null) {