Changeset View
Changeset View
Standalone View
Standalone View
src/applications/almanac/controller/AlmanacDeviceViewController.php
Show All 9 Lines | final class AlmanacDeviceViewController | ||||
public function handleRequest(AphrontRequest $request) { | public function handleRequest(AphrontRequest $request) { | ||||
$viewer = $request->getViewer(); | $viewer = $request->getViewer(); | ||||
$name = $request->getURIData('name'); | $name = $request->getURIData('name'); | ||||
$device = id(new AlmanacDeviceQuery()) | $device = id(new AlmanacDeviceQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->withNames(array($name)) | ->withNames(array($name)) | ||||
->needProperties(true) | |||||
->executeOne(); | ->executeOne(); | ||||
if (!$device) { | if (!$device) { | ||||
return new Aphront404Response(); | return new Aphront404Response(); | ||||
} | } | ||||
// We rebuild locks on a device when viewing the detail page, so they | // We rebuild locks on a device when viewing the detail page, so they | ||||
// automatically get corrected if they fall out of sync. | // automatically get corrected if they fall out of sync. | ||||
$device->rebuildDeviceLocks(); | $device->rebuildDeviceLocks(); | ||||
▲ Show 20 Lines • Show All 228 Lines • Show Last 20 Lines |