mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +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:
parent
d8c601f21b
commit
1febd32a76
1 changed files with 5 additions and 3 deletions
|
@ -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];
|
||||
|
||||
|
|
Loading…
Reference in a new issue