BUG Fix publishing of blog posts

This commit is contained in:
Damian Mooyman 2014-08-25 11:06:01 +12:00
parent 095a97018e
commit d64b418ff1

View File

@ -313,8 +313,11 @@ class BlogHolder_Controller extends BlogTree_Controller {
$blogentry->Locale = $this->Locale; $blogentry->Locale = $this->Locale;
} }
$blogentry->writeToStage("Stage"); $oldMode = Versioned::get_reading_mode();
Versioned::reading_stage('Stage');
$blogentry->write();
$blogentry->publish("Stage", "Live"); $blogentry->publish("Stage", "Live");
Versioned::set_reading_mode($oldMode);
$this->redirect($this->Link()); $this->redirect($this->Link());
} }