@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Calendar event detail view should show "Unnamed Event" as title for events with no title

Summary: Closes T8048, Calendar event detail view should show "Unnamed Event" as title for events with no title

Test Plan: Open an old event created before titles were required, event detail view should display title as "Unnamed Event" instead of a blank title

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8048

Differential Revision: https://secure.phabricator.com/D12736

+34 -1
+33
resources/sql/autopatches/20150506.calendarunnamedevents.1.php
··· 1 + <?php 2 + 3 + echo "Retro-naming unnamed events.\n"; 4 + 5 + $table = new PhabricatorCalendarEvent(); 6 + $conn_w = $table->establishConnection('w'); 7 + $iterator = new LiskMigrationIterator($table); 8 + foreach ($iterator as $event) { 9 + $id = $event->getID(); 10 + 11 + if (strlen($event->getName()) == 0) { 12 + echo "Renaming event {$id}...\n"; 13 + $viewer = PhabricatorUser::getOmnipotentUser(); 14 + $handle = id(new PhabricatorHandleQuery()) 15 + ->setViewer($viewer) 16 + ->withPHIDs(array($event->getUserPHID())) 17 + ->executeOne(); 18 + if ($handle->isComplete()) { 19 + $new_name = $handle->getName(); 20 + } else { 21 + $new_name = pht('Unnamed Event'); 22 + } 23 + 24 + queryfx( 25 + $conn_w, 26 + 'UPDATE %T SET name = %s WHERE id = %d', 27 + $table->getTableName(), 28 + $new_name, 29 + $id); 30 + } 31 + } 32 + 33 + echo "Done.\n";
+1 -1
src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
··· 76 76 $is_cancelled = $event->getIsCancelled(); 77 77 $icon = $is_cancelled ? ('fa-times') : ('fa-calendar'); 78 78 $color = $is_cancelled ? ('grey') : ('green'); 79 - $status = $is_cancelled ? ('Cancelled') : ('Active'); 79 + $status = $is_cancelled ? pht('Cancelled') : pht('Active'); 80 80 81 81 $invite_status = $event->getUserInviteStatus($viewer->getPHID()); 82 82 $status_invited = PhabricatorCalendarEventInvitee::STATUS_INVITED;