Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/conpherence/controller/ConpherenceParticipantController.php
12262 views
1
<?php
2
3
final class ConpherenceParticipantController extends ConpherenceController {
4
5
public function shouldAllowPublic() {
6
return true;
7
}
8
9
public function handleRequest(AphrontRequest $request) {
10
$viewer = $request->getViewer();
11
12
$conpherence_id = $request->getURIData('id');
13
if (!$conpherence_id) {
14
return new Aphront404Response();
15
}
16
17
$conpherence = id(new ConpherenceThreadQuery())
18
->setViewer($viewer)
19
->withIDs(array($conpherence_id))
20
->needParticipants(true)
21
->executeOne();
22
23
if (!$conpherence) {
24
return new Aphront404Response();
25
}
26
27
$uri = $this->getApplicationURI('update/'.$conpherence->getID().'/');
28
$content = id(new ConpherenceParticipantView())
29
->setUser($this->getViewer())
30
->setConpherence($conpherence)
31
->setUpdateURI($uri);
32
33
$content = array('widgets' => $content);
34
35
return id(new AphrontAjaxResponse())->setContent($content);
36
}
37
38
}
39
40