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
1 changed files with 2 additions and 2 deletions

View File

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