Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions code/LeftAndMain.php
Original file line number Diff line number Diff line change
Expand Up @@ -752,12 +752,15 @@ protected function init()

// Assign default cms theme and replace user-specified themes
SSViewer::set_themes(LeftAndMain::config()->uninherited('admin_themes'));

// Set the current reading mode
Versioned::set_stage(Versioned::DRAFT);

// Set default reading mode to suppress ?stage=Stage querystring params in CMS
Versioned::set_default_reading_mode(Versioned::get_reading_mode());

// Check the presence of Silverstripe-Versioned module
if (class_exists(Versioned::class)) {
// Set the current reading mode
Versioned::set_stage(Versioned::DRAFT);

// Set default reading mode to suppress ?stage=Stage querystring params in CMS
Versioned::set_default_reading_mode(Versioned::get_reading_mode());
}
}

public function handleRequest(HTTPRequest $request)
Expand Down