Skip to content

Commit

Permalink
Merge pull request #33 from dhensby/patch-2
Browse files Browse the repository at this point in the history
FIX start and count of urls is ignored
  • Loading branch information
wilr committed Feb 28, 2014
2 parents 3bb94ab + e0ea5aa commit efb7b1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/tasks/RebuildStaticCacheTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ public function rebuildCache($urls, $removeAll = true) {

$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);
Expand All @@ -81,6 +79,8 @@ public function rebuildCache($urls, $removeAll = true) {

$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();
Expand Down

0 comments on commit efb7b1d

Please sign in to comment.