Skip to content

Commit

Permalink
Merge pull request #44 from nickspiel/patch-2
Browse files Browse the repository at this point in the history
Only publish 'legal' pages
  • Loading branch information
wilr committed May 11, 2015
2 parents 4504fd0 + 0ebd8c7 commit 136cfea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/extensions/StaticPublisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ public function republish($original) {
}

$urls = array_unique($urls);

$legalPages = singleton('Page')->allPagesToCache();
$urls = array_intersect($urls, $legalPages);

$this->publishPages($urls);
}
Expand Down Expand Up @@ -188,4 +191,4 @@ public function getMetadata($url) {
'Cache generated on ' . date('Y-m-d H:i:s T (O)')
);
}
}
}

0 comments on commit 136cfea

Please sign in to comment.