Various code cleanup [skip ci]

This commit is contained in:
James Cole
2017-01-02 20:42:29 +01:00
parent e323f5a2d5
commit ad116d1959
7 changed files with 88 additions and 68 deletions

View File

@@ -65,7 +65,12 @@ class CategoryController extends Controller
return Response::json($cache->get());
}
$start = $repository->firstUseDate($category);
$start = $repository->firstUseDate($category);
if ($start->year == 1900) {
$start = new Carbon;
}
$range = Preferences::get('viewRange', '1M')->data;
$start = Navigation::startOfPeriod($start, $range);
$end = new Carbon;