mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-14 10:52:41 +01:00
21 lines
432 B
PHP
21 lines
432 B
PHP
|
<?php
|
||
|
|
||
|
final class PhabricatorFileShortcutController
|
||
|
extends PhabricatorFileController {
|
||
|
|
||
|
private $id;
|
||
|
|
||
|
public function willProcessRequest(array $data) {
|
||
|
$this->id = $data['id'];
|
||
|
}
|
||
|
|
||
|
public function processRequest() {
|
||
|
$file = id(new PhabricatorFile())->load($this->id);
|
||
|
if (!$file) {
|
||
|
return new Aphront404Response();
|
||
|
}
|
||
|
return id(new AphrontRedirectResponse())->setURI($file->getBestURI());
|
||
|
}
|
||
|
|
||
|
}
|