Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14014925
D12736.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D12736.id.diff
View Options
diff --git a/resources/sql/autopatches/20150506.calendarunnamedevents.1.php b/resources/sql/autopatches/20150506.calendarunnamedevents.1.php
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20150506.calendarunnamedevents.1.php
@@ -0,0 +1,33 @@
+<?php
+
+echo "Retro-naming unnamed events.\n";
+
+$table = new PhabricatorCalendarEvent();
+$conn_w = $table->establishConnection('w');
+$iterator = new LiskMigrationIterator($table);
+foreach ($iterator as $event) {
+ $id = $event->getID();
+
+ if (strlen($event->getName()) == 0) {
+ echo "Renaming event {$id}...\n";
+ $viewer = PhabricatorUser::getOmnipotentUser();
+ $handle = id(new PhabricatorHandleQuery())
+ ->setViewer($viewer)
+ ->withPHIDs(array($event->getUserPHID()))
+ ->executeOne();
+ if ($handle->isComplete()) {
+ $new_name = $handle->getName();
+ } else {
+ $new_name = pht('Unnamed Event');
+ }
+
+ queryfx(
+ $conn_w,
+ 'UPDATE %T SET name = %s WHERE id = %d',
+ $table->getTableName(),
+ $new_name,
+ $id);
+ }
+}
+
+echo "Done.\n";
diff --git a/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php b/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
--- a/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
+++ b/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
@@ -76,7 +76,7 @@
$is_cancelled = $event->getIsCancelled();
$icon = $is_cancelled ? ('fa-times') : ('fa-calendar');
$color = $is_cancelled ? ('grey') : ('green');
- $status = $is_cancelled ? ('Cancelled') : ('Active');
+ $status = $is_cancelled ? pht('Cancelled') : pht('Active');
$invite_status = $event->getUserInviteStatus($viewer->getPHID());
$status_invited = PhabricatorCalendarEventInvitee::STATUS_INVITED;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 4, 10:16 AM (2 w, 8 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6717216
Default Alt Text
D12736.id.diff (1 KB)
Attached To
Mode
D12736: Calendar event detail view should show "Unnamed Event" as title for events with no title
Attached
Detach File
Event Timeline
Log In to Comment