mirror of
https://github.com/silverstripe/silverstripe-staticpublisher
synced 2024-10-22 14:05:54 +02:00
Merge pull request #44 from nickspiel/patch-2
Only publish 'legal' pages
This commit is contained in:
commit
136cfea039
@ -149,6 +149,9 @@ abstract class StaticPublisher extends DataExtension {
|
||||
}
|
||||
|
||||
$urls = array_unique($urls);
|
||||
|
||||
$legalPages = singleton('Page')->allPagesToCache();
|
||||
$urls = array_intersect($urls, $legalPages);
|
||||
|
||||
$this->publishPages($urls);
|
||||
}
|
||||
@ -188,4 +191,4 @@ abstract class StaticPublisher extends DataExtension {
|
||||
'Cache generated on ' . date('Y-m-d H:i:s T (O)')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user