Permalink
Browse files

Fix incorrect set call.

  • Loading branch information...
1 parent efb7b1d commit 1a4e07c0360bb67038d752ef62d94f4f1ade9c29 @wilr wilr committed Mar 23, 2014
Showing with 8 additions and 5 deletions.
  1. +8 −5 code/controllers/StaticExporter.php
@@ -47,10 +47,13 @@ public function __construct() {
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 @@ public function getExportUrls() {
return $urls;
}
-}
+}

0 comments on commit 1a4e07c

Please sign in to comment.