mirror of
https://github.com/silverstripe/silverstripe-staticpublisher
synced 2024-10-22 14:05:54 +02:00
FIX start and count of urls is ignored
When setting the start and count values for the `RebuildStaticCacheTask` the limits are ignored because the $urls variable is never reused after it is defined.
This commit is contained in:
parent
3bb94ab139
commit
e0ea5aa89b
@ -69,8 +69,6 @@ class RebuildStaticCacheTask extends BuildTask {
|
||||
|
||||
$urls = array_unique($urls);
|
||||
sort($urls);
|
||||
|
||||
$mappedUrls = $page->urlsToPaths($urls);
|
||||
|
||||
$start = isset($_GET['start']) ? $_GET['start'] : 0;
|
||||
$count = isset($_GET['count']) ? $_GET['count'] : sizeof($urls);
|
||||
@ -81,6 +79,8 @@ class RebuildStaticCacheTask extends BuildTask {
|
||||
|
||||
$urls = array_slice($urls, $start, $count);
|
||||
|
||||
$mappedUrls = $page->urlsToPaths($urls);
|
||||
|
||||
if($removeAll && !isset($_GET['urls']) && $start == 0 && file_exists("../cache")) {
|
||||
echo "Removing stale cache files... \n";
|
||||
flush();
|
||||
|
Loading…
Reference in New Issue
Block a user