From 5e168b629ddac94c7e47e5d3cef1c257facc77fb Mon Sep 17 00:00:00 2001 From: lkassianik Date: Tue, 2 Jun 2015 18:26:51 -0700 Subject: [PATCH] List view should only allow 100 ghost events per recurring event. Summary: Ref T8394, List view should only allow 100 ghost events per recurring event Test Plan: Open list view with many recurring events. Shouldn't hang. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T8394 Differential Revision: https://secure.phabricator.com/D13132 --- .../calendar/query/PhabricatorCalendarEventSearchEngine.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php index 321e0e1439..e0f561b97f 100644 --- a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php +++ b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php @@ -462,7 +462,11 @@ final class PhabricatorCalendarEventSearchEngine } public function getPageSize(PhabricatorSavedQuery $saved) { - return $saved->getParameter('limit', 1000); + if ($this->isMonthView($saved) || $this->isDayView($saved)) { + return $saved->getParameter('limit', 1000); + } else { + return $saved->getParameter('limit', 100); + } } private function getDateFrom(PhabricatorSavedQuery $saved) {