1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-20 13:52:40 +01:00

Don't hide columns with stats from previous age, hide columns with no data

Summary:
This does two things:

- don't fill '-' for columns where there are data from previous week
- completele hide columns if there are now new data so that noobs don't have a
55 years of history

Test Plan:
View my commits stats.
View my requested changes stats.
View epriestley FB stats.

Reviewers: vii, epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1750
This commit is contained in:
vrana 2012-03-01 16:32:31 -08:00
parent d8c601f21b
commit 1febd32a76

View file

@ -101,10 +101,12 @@ final class DifferentialRevisionStatsView extends AphrontView {
}
$old_count = 0;
foreach ($dates as $age => $cutoff) {
foreach (array_reverse($dates) as $age => $cutoff) {
$weeks = ($now - $cutoff + 0.) / (7 * 60 * 60 * 24);
if ($old_count == $counts[$age]) {
continue;
if ($old_count == $counts[$age] && count($row_array) == 1) {
end($row_array);
unset($dates[key($row_array)]);
$row_array = array();
}
$old_count = $counts[$age];