mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
BUG Fix publishing of blog posts
This commit is contained in:
parent
095a97018e
commit
d64b418ff1
@ -313,8 +313,11 @@ class BlogHolder_Controller extends BlogTree_Controller {
|
||||
$blogentry->Locale = $this->Locale;
|
||||
}
|
||||
|
||||
$blogentry->writeToStage("Stage");
|
||||
$oldMode = Versioned::get_reading_mode();
|
||||
Versioned::reading_stage('Stage');
|
||||
$blogentry->write();
|
||||
$blogentry->publish("Stage", "Live");
|
||||
Versioned::set_reading_mode($oldMode);
|
||||
|
||||
$this->redirect($this->Link());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user