mirror of
https://github.com/silverstripe/silverstripe-staticpublisher
synced 2024-10-22 14:05:54 +02:00
Merge pull request #33 from dhensby/patch-2
FIX start and count of urls is ignored
This commit is contained in:
commit
efb7b1dc94
@ -70,8 +70,6 @@ class RebuildStaticCacheTask extends BuildTask {
|
|||||||
$urls = array_unique($urls);
|
$urls = array_unique($urls);
|
||||||
sort($urls);
|
sort($urls);
|
||||||
|
|
||||||
$mappedUrls = $page->urlsToPaths($urls);
|
|
||||||
|
|
||||||
$start = isset($_GET['start']) ? $_GET['start'] : 0;
|
$start = isset($_GET['start']) ? $_GET['start'] : 0;
|
||||||
$count = isset($_GET['count']) ? $_GET['count'] : sizeof($urls);
|
$count = isset($_GET['count']) ? $_GET['count'] : sizeof($urls);
|
||||||
|
|
||||||
@ -81,6 +79,8 @@ class RebuildStaticCacheTask extends BuildTask {
|
|||||||
|
|
||||||
$urls = array_slice($urls, $start, $count);
|
$urls = array_slice($urls, $start, $count);
|
||||||
|
|
||||||
|
$mappedUrls = $page->urlsToPaths($urls);
|
||||||
|
|
||||||
if($removeAll && !isset($_GET['urls']) && $start == 0 && file_exists("../cache")) {
|
if($removeAll && !isset($_GET['urls']) && $start == 0 && file_exists("../cache")) {
|
||||||
echo "Removing stale cache files... \n";
|
echo "Removing stale cache files... \n";
|
||||||
flush();
|
flush();
|
||||||
|
Loading…
Reference in New Issue
Block a user