Rename "status" to "event" in most URIs / classes / etc

Summary: Ref T4375. This doesn't get everything (I figure I'll clean up the actual UI strings when I touch the UIs) but should get the bulk of the URIs and class names and stuff.

Test Plan: Clicked every calendar-related link I could find/grep, they all still seem to work. URIs now say "event".

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4375

Differential Revision: https://secure.phabricator.com/D8147
This commit is contained in:
epriestley
2014-02-06 10:10:07 -08:00
parent 258cf23684
commit 8410cbecb0
9 changed files with 32 additions and 38 deletions

View File

@@ -1260,15 +1260,15 @@ phutil_register_library_map(array(
'PhabricatorCalendarBrowseController' => 'applications/calendar/controller/PhabricatorCalendarBrowseController.php', 'PhabricatorCalendarBrowseController' => 'applications/calendar/controller/PhabricatorCalendarBrowseController.php',
'PhabricatorCalendarController' => 'applications/calendar/controller/PhabricatorCalendarController.php', 'PhabricatorCalendarController' => 'applications/calendar/controller/PhabricatorCalendarController.php',
'PhabricatorCalendarDAO' => 'applications/calendar/storage/PhabricatorCalendarDAO.php', 'PhabricatorCalendarDAO' => 'applications/calendar/storage/PhabricatorCalendarDAO.php',
'PhabricatorCalendarDeleteStatusController' => 'applications/calendar/controller/PhabricatorCalendarDeleteStatusController.php',
'PhabricatorCalendarEditStatusController' => 'applications/calendar/controller/PhabricatorCalendarEditStatusController.php',
'PhabricatorCalendarEvent' => 'applications/calendar/storage/PhabricatorCalendarEvent.php', 'PhabricatorCalendarEvent' => 'applications/calendar/storage/PhabricatorCalendarEvent.php',
'PhabricatorCalendarEventDeleteController' => 'applications/calendar/controller/PhabricatorCalendarEventDeleteController.php',
'PhabricatorCalendarEventEditController' => 'applications/calendar/controller/PhabricatorCalendarEventEditController.php',
'PhabricatorCalendarEventInvalidEpochException' => 'applications/calendar/exception/PhabricatorCalendarEventInvalidEpochException.php', 'PhabricatorCalendarEventInvalidEpochException' => 'applications/calendar/exception/PhabricatorCalendarEventInvalidEpochException.php',
'PhabricatorCalendarEventListController' => 'applications/calendar/controller/PhabricatorCalendarEventListController.php',
'PhabricatorCalendarEventOverlapException' => 'applications/calendar/exception/PhabricatorCalendarEventOverlapException.php', 'PhabricatorCalendarEventOverlapException' => 'applications/calendar/exception/PhabricatorCalendarEventOverlapException.php',
'PhabricatorCalendarEventQuery' => 'applications/calendar/query/PhabricatorCalendarEventQuery.php', 'PhabricatorCalendarEventQuery' => 'applications/calendar/query/PhabricatorCalendarEventQuery.php',
'PhabricatorCalendarHoliday' => 'applications/calendar/storage/PhabricatorCalendarHoliday.php', 'PhabricatorCalendarHoliday' => 'applications/calendar/storage/PhabricatorCalendarHoliday.php',
'PhabricatorCalendarHolidayTestCase' => 'applications/calendar/storage/__tests__/PhabricatorCalendarHolidayTestCase.php', 'PhabricatorCalendarHolidayTestCase' => 'applications/calendar/storage/__tests__/PhabricatorCalendarHolidayTestCase.php',
'PhabricatorCalendarViewStatusController' => 'applications/calendar/controller/PhabricatorCalendarViewStatusController.php',
'PhabricatorCampfireProtocolAdapter' => 'infrastructure/daemon/bot/adapter/PhabricatorCampfireProtocolAdapter.php', 'PhabricatorCampfireProtocolAdapter' => 'infrastructure/daemon/bot/adapter/PhabricatorCampfireProtocolAdapter.php',
'PhabricatorChangeParserTestCase' => 'applications/repository/worker/__tests__/PhabricatorChangeParserTestCase.php', 'PhabricatorChangeParserTestCase' => 'applications/repository/worker/__tests__/PhabricatorChangeParserTestCase.php',
'PhabricatorChangesetResponse' => 'infrastructure/diff/PhabricatorChangesetResponse.php', 'PhabricatorChangesetResponse' => 'infrastructure/diff/PhabricatorChangesetResponse.php',
@@ -3899,19 +3899,19 @@ phutil_register_library_map(array(
'PhabricatorCalendarBrowseController' => 'PhabricatorCalendarController', 'PhabricatorCalendarBrowseController' => 'PhabricatorCalendarController',
'PhabricatorCalendarController' => 'PhabricatorController', 'PhabricatorCalendarController' => 'PhabricatorController',
'PhabricatorCalendarDAO' => 'PhabricatorLiskDAO', 'PhabricatorCalendarDAO' => 'PhabricatorLiskDAO',
'PhabricatorCalendarDeleteStatusController' => 'PhabricatorCalendarController',
'PhabricatorCalendarEditStatusController' => 'PhabricatorCalendarController',
'PhabricatorCalendarEvent' => 'PhabricatorCalendarEvent' =>
array( array(
0 => 'PhabricatorCalendarDAO', 0 => 'PhabricatorCalendarDAO',
1 => 'PhabricatorPolicyInterface', 1 => 'PhabricatorPolicyInterface',
), ),
'PhabricatorCalendarEventDeleteController' => 'PhabricatorCalendarController',
'PhabricatorCalendarEventEditController' => 'PhabricatorCalendarController',
'PhabricatorCalendarEventInvalidEpochException' => 'Exception', 'PhabricatorCalendarEventInvalidEpochException' => 'Exception',
'PhabricatorCalendarEventListController' => 'PhabricatorCalendarController',
'PhabricatorCalendarEventOverlapException' => 'Exception', 'PhabricatorCalendarEventOverlapException' => 'Exception',
'PhabricatorCalendarEventQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'PhabricatorCalendarEventQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'PhabricatorCalendarHoliday' => 'PhabricatorCalendarDAO', 'PhabricatorCalendarHoliday' => 'PhabricatorCalendarDAO',
'PhabricatorCalendarHolidayTestCase' => 'PhabricatorTestCase', 'PhabricatorCalendarHolidayTestCase' => 'PhabricatorTestCase',
'PhabricatorCalendarViewStatusController' => 'PhabricatorCalendarController',
'PhabricatorCampfireProtocolAdapter' => 'PhabricatorBotBaseStreamingProtocolAdapter', 'PhabricatorCampfireProtocolAdapter' => 'PhabricatorBotBaseStreamingProtocolAdapter',
'PhabricatorChangeParserTestCase' => 'PhabricatorWorkingCopyTestCase', 'PhabricatorChangeParserTestCase' => 'PhabricatorWorkingCopyTestCase',
'PhabricatorChangesetResponse' => 'AphrontProxyResponse', 'PhabricatorChangesetResponse' => 'AphrontProxyResponse',

View File

@@ -36,16 +36,14 @@ final class PhabricatorApplicationCalendar extends PhabricatorApplication {
return array( return array(
'/calendar/' => array( '/calendar/' => array(
'' => 'PhabricatorCalendarBrowseController', '' => 'PhabricatorCalendarBrowseController',
'status/' => array( 'event/' => array(
'' => 'PhabricatorCalendarViewStatusController', '' => 'PhabricatorCalendarEventListController',
'create/' => 'create/' =>
'PhabricatorCalendarEditStatusController', 'PhabricatorCalendarEventEditController',
'delete/(?P<id>[1-9]\d*)/' =>
'PhabricatorCalendarDeleteStatusController',
'edit/(?P<id>[1-9]\d*)/' => 'edit/(?P<id>[1-9]\d*)/' =>
'PhabricatorCalendarEditStatusController', 'PhabricatorCalendarEventEditController',
'view/(?P<phid>[^/]+)/' => 'delete/(?P<id>[1-9]\d*)/' =>
'PhabricatorCalendarViewStatusController', 'PhabricatorCalendarEventDeleteController',
), ),
), ),
); );
@@ -57,7 +55,7 @@ final class PhabricatorApplicationCalendar extends PhabricatorApplication {
$item = id(new PHUIListItemView()) $item = id(new PHUIListItemView())
->setName(pht('Calendar Event')) ->setName(pht('Calendar Event'))
->setAppIcon('calendar-dark') ->setAppIcon('calendar-dark')
->setHref($this->getBaseURI().'status/create/'); ->setHref($this->getBaseURI().'event/create/');
$items[] = $item; $items[] = $item;
return $items; return $items;

View File

@@ -9,12 +9,12 @@ abstract class PhabricatorCalendarController extends PhabricatorController {
$nav->addLabel(pht('Calendar')); $nav->addLabel(pht('Calendar'));
$nav->addFilter('/', pht('View All')); $nav->addFilter('/', pht('View All'));
$nav->addFilter('status/create/', pht('New Status')); $nav->addFilter('event/create/', pht('New Status'));
if ($status && $status->getID()) { if ($status && $status->getID()) {
$nav->addFilter('status/edit/'.$status->getID().'/', pht('Edit Status')); $nav->addFilter('event/edit/'.$status->getID().'/', pht('Edit Status'));
} }
$nav->addFilter('status/', pht('Upcoming Statuses')); $nav->addFilter('event/', pht('Upcoming Statuses'));
return $nav; return $nav;
} }

View File

@@ -1,6 +1,6 @@
<?php <?php
final class PhabricatorCalendarDeleteStatusController final class PhabricatorCalendarEventDeleteController
extends PhabricatorCalendarController { extends PhabricatorCalendarController {
private $id; private $id;
@@ -45,7 +45,7 @@ final class PhabricatorCalendarDeleteStatusController
pht('Permanently delete this status? This action can not be undone.')); pht('Permanently delete this status? This action can not be undone.'));
$dialog->addSubmitButton(pht('Delete')); $dialog->addSubmitButton(pht('Delete'));
$dialog->addCancelButton( $dialog->addCancelButton(
$this->getApplicationURI('status/edit/'.$status->getID().'/')); $this->getApplicationURI('event/'));
return id(new AphrontDialogResponse())->setDialog($dialog); return id(new AphrontDialogResponse())->setDialog($dialog);

View File

@@ -1,6 +1,6 @@
<?php <?php
final class PhabricatorCalendarEditStatusController final class PhabricatorCalendarEventEditController
extends PhabricatorCalendarController { extends PhabricatorCalendarController {
private $id; private $id;
@@ -35,7 +35,7 @@ final class PhabricatorCalendarEditStatusController
$start_value = $start_time->readValueFromRequest($request); $start_value = $start_time->readValueFromRequest($request);
$submit_label = pht('Create'); $submit_label = pht('Create');
$filter = 'status/create/'; $filter = 'status/create/';
$page_title = pht('Create Status'); $page_title = pht('Create Event');
$redirect = 'created'; $redirect = 'created';
} else { } else {
$status = id(new PhabricatorCalendarEventQuery()) $status = id(new PhabricatorCalendarEventQuery())
@@ -51,8 +51,8 @@ final class PhabricatorCalendarEditStatusController
$end_time->setValue($status->getDateTo()); $end_time->setValue($status->getDateTo());
$start_time->setValue($status->getDateFrom()); $start_time->setValue($status->getDateFrom());
$submit_label = pht('Update'); $submit_label = pht('Update');
$filter = 'status/edit/'.$status->getID().'/'; $filter = 'event/edit/'.$status->getID().'/';
$page_title = pht('Update Status'); $page_title = pht('Update Event');
$redirect = 'updated'; $redirect = 'updated';
} }
@@ -125,10 +125,10 @@ final class PhabricatorCalendarEditStatusController
->setTitle($page_title) ->setTitle($page_title)
->setWidth(AphrontDialogView::WIDTH_FORM); ->setWidth(AphrontDialogView::WIDTH_FORM);
if ($this->isCreate()) { if ($this->isCreate()) {
$dialog->setSubmitURI($this->getApplicationURI('status/create/')); $dialog->setSubmitURI($this->getApplicationURI('event/create/'));
} else { } else {
$dialog->setSubmitURI( $dialog->setSubmitURI(
$this->getApplicationURI('status/edit/'.$status->getID().'/')); $this->getApplicationURI('event/edit/'.$status->getID().'/'));
} }
$form = new PHUIFormLayoutView(); $form = new PHUIFormLayoutView();
if ($error_view) { if ($error_view) {
@@ -156,8 +156,8 @@ final class PhabricatorCalendarEditStatusController
$submit->addCancelButton($this->getApplicationURI()); $submit->addCancelButton($this->getApplicationURI());
} else { } else {
$submit->addCancelButton( $submit->addCancelButton(
$this->getApplicationURI('status/delete/'.$status->getID().'/'), $this->getApplicationURI('event/delete/'.$status->getID().'/'),
pht('Delete Status')); pht('Delete Event'));
} }
if ($request->isAjax()) { if ($request->isAjax()) {

View File

@@ -1,6 +1,6 @@
<?php <?php
final class PhabricatorCalendarViewStatusController final class PhabricatorCalendarEventListController
extends PhabricatorCalendarController { extends PhabricatorCalendarController {
private $phid; private $phid;
@@ -52,7 +52,7 @@ final class PhabricatorCalendarViewStatusController
$list = new PHUIObjectItemListView(); $list = new PHUIObjectItemListView();
foreach ($statuses as $status) { foreach ($statuses as $status) {
if ($status->getUserPHID() == $user->getPHID()) { if ($status->getUserPHID() == $user->getPHID()) {
$href = $this->getApplicationURI('/status/edit/'.$status->getID().'/'); $href = $this->getApplicationURI('/event/edit/'.$status->getID().'/');
} else { } else {
$from = $status->getDateFrom(); $from = $status->getDateFrom();
$month = phabricator_format_local_time($from, $user, 'm'); $month = phabricator_format_local_time($from, $user, 'm');
@@ -99,11 +99,7 @@ final class PhabricatorCalendarViewStatusController
} }
private function getFilter() { private function getFilter() {
if ($this->isUserRequest()) { $filter = 'event/';
$filter = 'status/';
} else {
$filter = 'status/view/'.$this->phid.'/';
}
return $filter; return $filter;
} }

View File

@@ -303,7 +303,7 @@ final class AphrontCalendarMonthView extends AphrontView {
if ($user->getPHID() == $event->getUserPHID()) { if ($user->getPHID() == $event->getUserPHID()) {
$tag = 'a'; $tag = 'a';
$href = '/calendar/status/edit/'.$event->getEventID().'/'; $href = '/calendar/event/edit/'.$event->getEventID().'/';
} else { } else {
$tag = 'div'; $tag = 'div';
$href = null; $href = null;

View File

@@ -25,7 +25,7 @@ abstract class ConpherenceController extends PhabricatorController {
id(new PHUIListItemView()) id(new PHUIListItemView())
->setName(pht('New Calendar Item')) ->setName(pht('New Calendar Item'))
->setType(PHUIListItemView::TYPE_LINK) ->setType(PHUIListItemView::TYPE_LINK)
->setHref('/calendar/status/create/') ->setHref('/calendar/event/create/')
->addSigil('conpherence-widget-adder') ->addSigil('conpherence-widget-adder')
->setMetadata(array('widget' => 'widgets-calendar'))); ->setMetadata(array('widget' => 'widgets-calendar')));

View File

@@ -106,7 +106,7 @@ final class ConpherenceLayoutView extends AphrontView {
'createData' => array( 'createData' => array(
'refreshFromResponse' => false, 'refreshFromResponse' => false,
'action' => ConpherenceUpdateActions::ADD_STATUS, 'action' => ConpherenceUpdateActions::ADD_STATUS,
'customHref' => '/calendar/status/create/' 'customHref' => '/calendar/event/create/'
) )
), ),
'widgets-settings' => array( 'widgets-settings' => array(