Fix incorrect set call.

This commit is contained in:
Will Rossiter 2014-03-23 18:09:04 +13:00
parent efb7b1dc94
commit 1a4e07c036

View File

@ -47,10 +47,13 @@ class StaticExporter extends Controller {
if(class_exists('SiteTree')) { if(class_exists('SiteTree')) {
if(!$this->config()->get('disable_sitetree_export')) { if(!$this->config()->get('disable_sitetree_export')) {
$objs[] = $this->config()->get('export_objects'); $objs[] = $this->config()->export_objects;
$objs[] = "SiteTree";
$this->config()->set('export_objects', $objs); if(!in_array('SiteTree', $objs)) {
$objs[] = "SiteTree";
}
$this->config()->export_objects = $objs;
} }
} }
} }