Page MenuHomestyx hydra

No OneTemporary

diff --git a/src/applications/differential/xaction/DifferentialRevisionReopenTransaction.php b/src/applications/differential/xaction/DifferentialRevisionReopenTransaction.php
index e2b217603a..7ba20772c7 100644
--- a/src/applications/differential/xaction/DifferentialRevisionReopenTransaction.php
+++ b/src/applications/differential/xaction/DifferentialRevisionReopenTransaction.php
@@ -1,73 +1,73 @@
<?php
final class DifferentialRevisionReopenTransaction
extends DifferentialRevisionActionTransaction {
const TRANSACTIONTYPE = 'differential.revision.reopen';
const ACTIONKEY = 'reopen';
protected function getRevisionActionLabel() {
return pht('Reopen Revision');
}
protected function getRevisionActionDescription() {
return pht('This revision will be reopened for review.');
}
public function getIcon() {
return 'fa-bullhorn';
}
public function getColor() {
return 'sky';
}
protected function getRevisionActionOrder() {
return 400;
}
public function getActionName() {
return pht('Reopened');
}
public function generateOldValue($object) {
return !$object->isClosed();
}
public function applyInternalEffects($object, $value) {
$object->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW);
}
protected function validateAction($object, PhabricatorUser $viewer) {
- if ($object->isPublished()) {
+ if (!$object->isPublished()) {
throw new Exception(
pht(
'You can not reopen this revision because it is not closed. '.
'Only closed revisions can be reopened.'));
}
$config_key = 'differential.allow-reopen';
if (!PhabricatorEnv::getEnvConfig($config_key)) {
throw new Exception(
pht(
'You can not reopen this revision because configuration prevents '.
'any revision from being reopened. You can change this behavior '.
'by adjusting the "%s" setting in Config.',
$config_key));
}
}
public function getTitle() {
return pht(
'%s reopened this revision.',
$this->renderAuthor());
}
public function getTitleForFeed() {
return pht(
'%s reopened %s.',
$this->renderAuthor(),
$this->renderObject());
}
}

File Metadata

Mime Type
text/x-diff
Expires
Tue, Jun 10, 3:37 PM (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
140460
Default Alt Text
(2 KB)

Event Timeline