Page MenuHomePhabricator

D13069.diff
No OneTemporary

D13069.diff

diff --git a/src/applications/calendar/query/PhabricatorCalendarEventQuery.php b/src/applications/calendar/query/PhabricatorCalendarEventQuery.php
--- a/src/applications/calendar/query/PhabricatorCalendarEventQuery.php
+++ b/src/applications/calendar/query/PhabricatorCalendarEventQuery.php
@@ -101,13 +101,14 @@
foreach ($events as $event) {
$sequence_start = 0;
$instance_count = null;
+ $duration = $event->getDateTo() - $event->getDateFrom();
if ($event->getIsRecurring()) {
$frequency = $event->getFrequencyUnit();
$modify_key = '+1 '.$frequency;
if ($this->rangeBegin && $this->rangeBegin > $event->getDateFrom()) {
- $max_date = $this->rangeBegin;
+ $max_date = $this->rangeBegin - $duration;
$date = $event->getDateFrom();
$datetime = PhabricatorTime::getDateTimeFromEpoch($date, $viewer);
@@ -120,7 +121,7 @@
$start = $this->rangeBegin;
} else {
- $start = $event->getDateFrom();
+ $start = $event->getDateFrom() - $duration;
}
$date = $start;
diff --git a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
--- a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
+++ b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
@@ -307,7 +307,6 @@
$viewer = $this->requireViewer();
$list = new PHUIObjectItemListView();
foreach ($events as $event) {
- // $href = '/E'.$event->getID();
$from = phabricator_datetime($event->getDateFrom(), $viewer);
$to = phabricator_datetime($event->getDateTo(), $viewer);
$creator_handle = $handles[$event->getUserPHID()];
diff --git a/src/view/phui/calendar/PHUICalendarMonthView.php b/src/view/phui/calendar/PHUICalendarMonthView.php
--- a/src/view/phui/calendar/PHUICalendarMonthView.php
+++ b/src/view/phui/calendar/PHUICalendarMonthView.php
@@ -89,13 +89,21 @@
}
}
+ $max_daily = 15;
+ $counter = 0;
+
$list = new PHUICalendarListView();
$list->setUser($this->user);
foreach ($all_day_events as $item) {
- $list->addEvent($item);
+ if ($counter <= $max_daily) {
+ $list->addEvent($item);
+ }
+ $counter++;
}
foreach ($list_events as $item) {
- $list->addEvent($item);
+ if ($counter <= $max_daily) {
+ $list->addEvent($item);
+ }
}
$uri = $this->getBrowseURI();

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 24, 2:12 PM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6732990
Default Alt Text
D13069.diff (2 KB)

Event Timeline