Differential D21048 Diff 50148 src/applications/differential/controller/DifferentialRevisionViewController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/controller/DifferentialRevisionViewController.php
| <?php | <?php | ||||
| final class DifferentialRevisionViewController | final class DifferentialRevisionViewController | ||||
| extends DifferentialController { | extends DifferentialController { | ||||
| private $revisionID; | private $revisionID; | ||||
| private $changesetCount; | private $changesetCount; | ||||
| private $hiddenChangesets; | private $hiddenChangesets; | ||||
| private $warnings = array(); | private $warnings = array(); | ||||
| public function shouldAllowPublic() { | public function shouldAllowPublic() { | ||||
| return true; | return true; | ||||
| } | } | ||||
| public function isLargeDiff() { | public function isLargeDiff() { | ||||
| return ($this->getChangesetCount() > $this->getLargeDiffLimit()); | return ($this->getChangesetCount() > $this->getLargeDiffLimit()); | ||||
artms: We also can substract hidden changesets here instead of setting changeset size artificially… | |||||
| } | } | ||||
| public function isVeryLargeDiff() { | public function isVeryLargeDiff() { | ||||
| return ($this->getChangesetCount() > $this->getVeryLargeDiffLimit()); | return ($this->getChangesetCount() > $this->getVeryLargeDiffLimit()); | ||||
| } | } | ||||
| public function getLargeDiffLimit() { | public function getLargeDiffLimit() { | ||||
| return 100; | return 100; | ||||
| ▲ Show 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | public function handleRequest(AphrontRequest $request) { | ||||
| } | } | ||||
| list($changesets, $vs_map, $vs_changesets, $rendering_references) = | list($changesets, $vs_map, $vs_changesets, $rendering_references) = | ||||
| $this->loadChangesetsAndVsMap( | $this->loadChangesetsAndVsMap( | ||||
| $target, | $target, | ||||
| idx($diffs, $diff_vs), | idx($diffs, $diff_vs), | ||||
| $repository); | $repository); | ||||
| $this->setChangesetCount(count($rendering_references)); | $this->setChangesetCount(count($rendering_references) - | ||||
| count($this->hiddenChangesets)); | |||||
| if ($request->getExists('download')) { | if ($request->getExists('download')) { | ||||
| return $this->buildRawDiffResponse( | return $this->buildRawDiffResponse( | ||||
| $revision, | $revision, | ||||
| $changesets, | $changesets, | ||||
| $vs_changesets, | $vs_changesets, | ||||
| $vs_map, | $vs_map, | ||||
| $repository); | $repository); | ||||
| ▲ Show 20 Lines • Show All 1,324 Lines • Show Last 20 Lines | |||||
We also can substract hidden changesets here instead of setting changeset size artificially smaller...