mirror of
https://github.com/silverstripe/silverstripe-staticpublisher
synced 2024-10-22 14:05:54 +02:00
Only publish 'legal' pages
The republish function now only publishes pages that are returned in the allPagesToCache(); function in the Page class.
This commit is contained in:
parent
4504fd0900
commit
0ebd8c7c0b
@ -149,6 +149,9 @@ abstract class StaticPublisher extends DataExtension {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$urls = array_unique($urls);
|
$urls = array_unique($urls);
|
||||||
|
|
||||||
|
$legalPages = singleton('Page')->allPagesToCache();
|
||||||
|
$urls = array_intersect($urls, $legalPages);
|
||||||
|
|
||||||
$this->publishPages($urls);
|
$this->publishPages($urls);
|
||||||
}
|
}
|
||||||
@ -188,4 +191,4 @@ abstract class StaticPublisher extends DataExtension {
|
|||||||
'Cache generated on ' . date('Y-m-d H:i:s T (O)')
|
'Cache generated on ' . date('Y-m-d H:i:s T (O)')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user