From 1a4e07c0360bb67038d752ef62d94f4f1ade9c29 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Sun, 23 Mar 2014 18:09:04 +1300 Subject: [PATCH] Fix incorrect set call. --- code/controllers/StaticExporter.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/code/controllers/StaticExporter.php b/code/controllers/StaticExporter.php index 6b00b2a..35d7822 100644 --- a/code/controllers/StaticExporter.php +++ b/code/controllers/StaticExporter.php @@ -47,10 +47,13 @@ class StaticExporter extends Controller { if(class_exists('SiteTree')) { if(!$this->config()->get('disable_sitetree_export')) { - $objs[] = $this->config()->get('export_objects'); - $objs[] = "SiteTree"; - - $this->config()->set('export_objects', $objs); + $objs[] = $this->config()->export_objects; + + if(!in_array('SiteTree', $objs)) { + $objs[] = "SiteTree"; + } + + $this->config()->export_objects = $objs; } } } @@ -250,4 +253,4 @@ class StaticExporter extends Controller { return $urls; } -} \ No newline at end of file +}