Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/auth/controller/message/PhabricatorAuthMessageEditController.php
12263 views
1
<?php
2
3
final class PhabricatorAuthMessageEditController
4
extends PhabricatorAuthMessageController {
5
6
public function handleRequest(AphrontRequest $request) {
7
$this->requireApplicationCapability(
8
AuthManageProvidersCapability::CAPABILITY);
9
10
$engine = id(new PhabricatorAuthMessageEditEngine())
11
->setController($this);
12
13
$id = $request->getURIData('id');
14
if (!$id) {
15
$message_key = $request->getStr('messageKey');
16
17
$message_types = PhabricatorAuthMessageType::getAllMessageTypes();
18
$message_type = idx($message_types, $message_key);
19
if (!$message_type) {
20
return new Aphront404Response();
21
}
22
23
$engine
24
->addContextParameter('messageKey', $message_key)
25
->setMessageType($message_type);
26
}
27
28
return $engine->buildResponse();
29
}
30
31
}
32
33