Differential D20423 Diff 48777 src/applications/repository/xaction/PhabricatorRepositoryAutocloseOnlyTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/xaction/PhabricatorRepositoryAutocloseOnlyTransaction.php
| Show All 13 Lines | final class PhabricatorRepositoryAutocloseOnlyTransaction | ||||
| } | } | ||||
| public function getTitle() { | public function getTitle() { | ||||
| $old = $this->getOldValue(); | $old = $this->getOldValue(); | ||||
| $new = $this->getNewValue(); | $new = $this->getNewValue(); | ||||
| if (!$new) { | if (!$new) { | ||||
| return pht( | return pht( | ||||
| '%s set this repository to autoclose on all branches.', | '%s marked all branches in this repository as permanent.', | ||||
| $this->renderAuthor()); | $this->renderAuthor()); | ||||
| } else if (!$old) { | } else if (!$old) { | ||||
| return pht( | return pht( | ||||
| '%s set this repository to autoclose on branches: %s.', | '%s set the permanent refs for this repository to: %s.', | ||||
| $this->renderAuthor(), | $this->renderAuthor(), | ||||
| $this->renderValue(implode(', ', $new))); | $this->renderValue(implode(', ', $new))); | ||||
| } else { | } else { | ||||
| return pht( | return pht( | ||||
| '%s changed autoclose branches from %s to %s.', | '%s changed permanent refs for this repository from %s to %s.', | ||||
| $this->renderAuthor(), | $this->renderAuthor(), | ||||
| $this->renderValue(implode(', ', $old)), | $this->renderValue(implode(', ', $old)), | ||||
| $this->renderValue(implode(', ', $new))); | $this->renderValue(implode(', ', $new))); | ||||
| } | } | ||||
| } | } | ||||
| public function validateTransactions($object, array $xactions) { | public function validateTransactions($object, array $xactions) { | ||||
| return $this->validateRefList($object, $xactions); | return $this->validateRefList($object, $xactions); | ||||
| } | } | ||||
| } | } | ||||