Merge pull request #33 from dhensby/patch-2

FIX start and count of urls is ignored
This commit is contained in:
Will Rossiter 2014-03-01 09:09:48 +13:00
commit efb7b1dc94

View File

@ -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();