Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2896649
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/applications/project/controller/PhabricatorProjectArchiveController.php b/src/applications/project/controller/PhabricatorProjectArchiveController.php
index aa6fd6f178..1138581fdc 100644
--- a/src/applications/project/controller/PhabricatorProjectArchiveController.php
+++ b/src/applications/project/controller/PhabricatorProjectArchiveController.php
@@ -1,74 +1,74 @@
<?php
final class PhabricatorProjectArchiveController
extends PhabricatorProjectController {
private $id;
public function willProcessRequest(array $data) {
$this->id = $data['id'];
}
public function processRequest() {
$request = $this->getRequest();
$viewer = $request->getUser();
$project = id(new PhabricatorProjectQuery())
->setViewer($viewer)
->withIDs(array($this->id))
->requireCapabilities(
array(
PhabricatorPolicyCapability::CAN_VIEW,
PhabricatorPolicyCapability::CAN_EDIT,
))
->executeOne();
if (!$project) {
return new Aphront404Response();
}
$edit_uri = $this->getApplicationURI('edit/'.$project->getID().'/');
if ($request->isFormPost()) {
if ($project->isArchived()) {
$new_status = PhabricatorProjectStatus::STATUS_ACTIVE;
} else {
$new_status = PhabricatorProjectStatus::STATUS_ARCHIVED;
}
$xactions = array();
$xactions[] = id(new PhabricatorProjectTransaction())
->setTransactionType(PhabricatorProjectTransaction::TYPE_STATUS)
->setNewValue($new_status);
id(new PhabricatorProjectTransactionEditor())
->setActor($viewer)
->setContentSourceFromRequest($request)
->setContinueOnNoEffect(true)
->setContinueOnMissingFields(true)
->applyTransactions($project, $xactions);
return id(new AphrontRedirectResponse())->setURI($edit_uri);
}
if ($project->isArchived()) {
$title = pht('Really unarchive project?');
$body = pht('This project will become active again.');
$button = pht('Unarchive Project');
} else {
$title = pht('Really archive project?');
- $body = pht('This project will moved to the archive.');
+ $body = pht('This project will be moved to the archive.');
$button = pht('Archive Project');
}
$dialog = id(new AphrontDialogView())
->setUser($viewer)
->setTitle($title)
->appendChild($body)
->addCancelButton($edit_uri)
->addSubmitButton($button);
return id(new AphrontDialogResponse())->setDialog($dialog);
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Jan 19 2025, 23:23 (6 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1129856
Default Alt Text
(2 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment