mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-18 09:48:39 +01:00
Minor linter and stylistic fixes
Summary: Self-explanatory. Test Plan: `arc lint` Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D13574
This commit is contained in:
parent
f695dcea9e
commit
a1c46d2586
6 changed files with 30 additions and 35 deletions
|
@ -81,40 +81,40 @@ final class PhabricatorCalendarEventCancelController
|
||||||
if ($is_cancelled) {
|
if ($is_cancelled) {
|
||||||
if ($sequence || $is_parent_cancelled) {
|
if ($sequence || $is_parent_cancelled) {
|
||||||
$title = pht('Cannot Reinstate Instance');
|
$title = pht('Cannot Reinstate Instance');
|
||||||
$paragraph = pht('Cannot reinstate an instance of a ' .
|
$paragraph = pht(
|
||||||
'cancelled recurring event.');
|
'Cannot reinstate an instance of a cancelled recurring event.');
|
||||||
$cancel = pht('Cancel');
|
$cancel = pht('Cancel');
|
||||||
$submit = null;
|
$submit = null;
|
||||||
} else if ($is_parent) {
|
} else if ($is_parent) {
|
||||||
$title = pht('Reinstate Recurrence');
|
$title = pht('Reinstate Recurrence');
|
||||||
$paragraph = pht('Reinstate the entire series ' .
|
$paragraph = pht(
|
||||||
'of recurring events?');
|
'Reinstate the entire series of recurring events?');
|
||||||
$cancel = pht('Don\'t Reinstate Recurrence');
|
$cancel = pht("Don't Reinstate Recurrence");
|
||||||
$submit = pht('Reinstate Recurrence');
|
$submit = pht('Reinstate Recurrence');
|
||||||
} else {
|
} else {
|
||||||
$title = pht('Reinstate Event');
|
$title = pht('Reinstate Event');
|
||||||
$paragraph = pht('Reinstate this event?');
|
$paragraph = pht('Reinstate this event?');
|
||||||
$cancel = pht('Don\'t Reinstate Event');
|
$cancel = pht("Don't Reinstate Event");
|
||||||
$submit = pht('Reinstate Event');
|
$submit = pht('Reinstate Event');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($sequence) {
|
if ($sequence) {
|
||||||
$title = pht('Cancel Instance');
|
$title = pht('Cancel Instance');
|
||||||
$paragraph = pht('Cancel just this instance ' .
|
$paragraph = pht(
|
||||||
'of a recurring event.');
|
'Cancel just this instance of a recurring event.');
|
||||||
$cancel = pht('Don\'t Cancel Instance');
|
$cancel = pht("Don't Cancel Instance");
|
||||||
$submit = pht('Cancel Instance');
|
$submit = pht('Cancel Instance');
|
||||||
} else if ($is_parent) {
|
} else if ($is_parent) {
|
||||||
$title = pht('Cancel Recurrence');
|
$title = pht('Cancel Recurrence');
|
||||||
$paragraph = pht('Cancel the entire series ' .
|
$paragraph = pht(
|
||||||
'of recurring events?');
|
'Cancel the entire series of recurring events?');
|
||||||
$cancel = pht('Don\'t Cancel Recurrence');
|
$cancel = pht("Don't Cancel Recurrence");
|
||||||
$submit = pht('Cancel Recurrence');
|
$submit = pht('Cancel Recurrence');
|
||||||
} else {
|
} else {
|
||||||
$title = pht('Cancel Event');
|
$title = pht('Cancel Event');
|
||||||
$paragraph = pht('You can always reinstate ' .
|
$paragraph = pht(
|
||||||
'the event later.');
|
'You can always reinstate the event later.');
|
||||||
$cancel = pht('Don\'t Cancel Event');
|
$cancel = pht("Don't Cancel Event");
|
||||||
$submit = pht('Cancel Event');
|
$submit = pht('Cancel Event');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@ final class PhabricatorCalendarEventCommentController
|
||||||
|
|
||||||
private $id;
|
private $id;
|
||||||
|
|
||||||
|
|
||||||
public function willProcessRequest(array $data) {
|
public function willProcessRequest(array $data) {
|
||||||
$this->id = idx($data, 'id');
|
$this->id = idx($data, 'id');
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,13 +43,11 @@ final class PhabricatorCalendarEventDragController
|
||||||
|
|
||||||
|
|
||||||
$xactions[] = id(new PhabricatorCalendarEventTransaction())
|
$xactions[] = id(new PhabricatorCalendarEventTransaction())
|
||||||
->setTransactionType(
|
->setTransactionType(PhabricatorCalendarEventTransaction::TYPE_START_DATE)
|
||||||
PhabricatorCalendarEventTransaction::TYPE_START_DATE)
|
|
||||||
->setNewValue($start_value);
|
->setNewValue($start_value);
|
||||||
|
|
||||||
$xactions[] = id(new PhabricatorCalendarEventTransaction())
|
$xactions[] = id(new PhabricatorCalendarEventTransaction())
|
||||||
->setTransactionType(
|
->setTransactionType(PhabricatorCalendarEventTransaction::TYPE_END_DATE)
|
||||||
PhabricatorCalendarEventTransaction::TYPE_END_DATE)
|
|
||||||
->setNewValue($end_value);
|
->setNewValue($end_value);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -302,13 +302,13 @@ final class PhabricatorCalendarEventEditController
|
||||||
} catch (PhabricatorApplicationTransactionValidationException $ex) {
|
} catch (PhabricatorApplicationTransactionValidationException $ex) {
|
||||||
$validation_exception = $ex;
|
$validation_exception = $ex;
|
||||||
$error_name = $ex->getShortMessage(
|
$error_name = $ex->getShortMessage(
|
||||||
PhabricatorCalendarEventTransaction::TYPE_NAME);
|
PhabricatorCalendarEventTransaction::TYPE_NAME);
|
||||||
$error_start_date = $ex->getShortMessage(
|
$error_start_date = $ex->getShortMessage(
|
||||||
PhabricatorCalendarEventTransaction::TYPE_START_DATE);
|
PhabricatorCalendarEventTransaction::TYPE_START_DATE);
|
||||||
$error_end_date = $ex->getShortMessage(
|
$error_end_date = $ex->getShortMessage(
|
||||||
PhabricatorCalendarEventTransaction::TYPE_END_DATE);
|
PhabricatorCalendarEventTransaction::TYPE_END_DATE);
|
||||||
$error_recurrence_end_date = $ex->getShortMessage(
|
$error_recurrence_end_date = $ex->getShortMessage(
|
||||||
PhabricatorCalendarEventTransaction::TYPE_RECURRENCE_END_DATE);
|
PhabricatorCalendarEventTransaction::TYPE_RECURRENCE_END_DATE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -424,11 +424,11 @@ final class PhabricatorCalendarEventEditController
|
||||||
$recurrence_frequency_select = id(new AphrontFormSelectControl())
|
$recurrence_frequency_select = id(new AphrontFormSelectControl())
|
||||||
->setName('frequency')
|
->setName('frequency')
|
||||||
->setOptions(array(
|
->setOptions(array(
|
||||||
'daily' => pht('Daily'),
|
'daily' => pht('Daily'),
|
||||||
'weekly' => pht('Weekly'),
|
'weekly' => pht('Weekly'),
|
||||||
'monthly' => pht('Monthly'),
|
'monthly' => pht('Monthly'),
|
||||||
'yearly' => pht('Yearly'),
|
'yearly' => pht('Yearly'),
|
||||||
))
|
))
|
||||||
->setValue($frequency)
|
->setValue($frequency)
|
||||||
->setLabel(pht('Recurring Event Frequency'))
|
->setLabel(pht('Recurring Event Frequency'))
|
||||||
->setID($frequency_id)
|
->setID($frequency_id)
|
||||||
|
@ -583,7 +583,7 @@ final class PhabricatorCalendarEventEditController
|
||||||
array(
|
array(
|
||||||
$crumbs,
|
$crumbs,
|
||||||
$object_box,
|
$object_box,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => $page_title,
|
'title' => $page_title,
|
||||||
));
|
));
|
||||||
|
|
|
@ -54,8 +54,7 @@ final class PhabricatorCalendarEventJoinController
|
||||||
$new_status = array($viewer->getPHID() => $new_status);
|
$new_status = array($viewer->getPHID() => $new_status);
|
||||||
|
|
||||||
$xaction = id(new PhabricatorCalendarEventTransaction())
|
$xaction = id(new PhabricatorCalendarEventTransaction())
|
||||||
->setTransactionType(
|
->setTransactionType(PhabricatorCalendarEventTransaction::TYPE_INVITE)
|
||||||
PhabricatorCalendarEventTransaction::TYPE_INVITE)
|
|
||||||
->setNewValue($new_status);
|
->setNewValue($new_status);
|
||||||
|
|
||||||
$editor = id(new PhabricatorCalendarEventEditor())
|
$editor = id(new PhabricatorCalendarEventEditor())
|
||||||
|
|
|
@ -83,10 +83,10 @@ final class PhabricatorCalendarEventViewController
|
||||||
$draft = PhabricatorDraft::newFromUserAndKey($viewer, $event->getPHID());
|
$draft = PhabricatorDraft::newFromUserAndKey($viewer, $event->getPHID());
|
||||||
if ($sequence) {
|
if ($sequence) {
|
||||||
$comment_uri = $this->getApplicationURI(
|
$comment_uri = $this->getApplicationURI(
|
||||||
'/event/comment/'.$event->getID().'/'.$sequence.'/');
|
'/event/comment/'.$event->getID().'/'.$sequence.'/');
|
||||||
} else {
|
} else {
|
||||||
$comment_uri = $this->getApplicationURI(
|
$comment_uri = $this->getApplicationURI(
|
||||||
'/event/comment/'.$event->getID().'/');
|
'/event/comment/'.$event->getID().'/');
|
||||||
}
|
}
|
||||||
$add_comment_form = id(new PhabricatorApplicationTransactionCommentView())
|
$add_comment_form = id(new PhabricatorApplicationTransactionCommentView())
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
|
@ -372,7 +372,6 @@ final class PhabricatorCalendarEventViewController
|
||||||
$icon_display);
|
$icon_display);
|
||||||
|
|
||||||
if (strlen($event->getDescription())) {
|
if (strlen($event->getDescription())) {
|
||||||
|
|
||||||
$description = PhabricatorMarkupEngine::renderOneObject(
|
$description = PhabricatorMarkupEngine::renderOneObject(
|
||||||
id(new PhabricatorMarkupOneOff())->setContent($event->getDescription()),
|
id(new PhabricatorMarkupOneOff())->setContent($event->getDescription()),
|
||||||
'default',
|
'default',
|
||||||
|
|
Loading…
Add table
Reference in a new issue