1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-20 13:52:40 +01:00

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

View file

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

View file

@ -9,12 +9,12 @@ abstract class PhabricatorCalendarController extends PhabricatorController {
$nav->addLabel(pht('Calendar'));
$nav->addFilter('/', pht('View All'));
$nav->addFilter('status/create/', pht('New Status'));
$nav->addFilter('event/create/', pht('New Status'));
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;
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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