Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php abstract class AlmanacPropertyController extends AlmanacController { private $pr..
Decoded Output download
<?php
abstract class AlmanacPropertyController extends AlmanacController {
private $propertyObject;
public function getPropertyObject() {
return $this->propertyObject;
}
protected function loadPropertyObject() {
$viewer = $this->getViewer();
$request = $this->getRequest();
$object_phid = $request->getStr('objectPHID');
switch (phid_get_type($object_phid)) {
case AlmanacBindingPHIDType::TYPECONST:
$query = new AlmanacBindingQuery();
break;
case AlmanacDevicePHIDType::TYPECONST:
$query = new AlmanacDeviceQuery();
break;
case AlmanacServicePHIDType::TYPECONST:
$query = new AlmanacServiceQuery();
break;
default:
return new Aphront404Response();
}
$object = $query
->setViewer($viewer)
->withPHIDs(array($object_phid))
->requireCapabilities(
array(
PhabricatorPolicyCapability::CAN_VIEW,
PhabricatorPolicyCapability::CAN_EDIT,
))
->needProperties(true)
->executeOne();
if (!$object) {
return new Aphront404Response();
}
if (!($object instanceof AlmanacPropertyInterface)) {
return new Aphront404Response();
}
$this->propertyObject = $object;
return null;
}
}
?>
Did this file decode correctly?
Original Code
<?php
abstract class AlmanacPropertyController extends AlmanacController {
private $propertyObject;
public function getPropertyObject() {
return $this->propertyObject;
}
protected function loadPropertyObject() {
$viewer = $this->getViewer();
$request = $this->getRequest();
$object_phid = $request->getStr('objectPHID');
switch (phid_get_type($object_phid)) {
case AlmanacBindingPHIDType::TYPECONST:
$query = new AlmanacBindingQuery();
break;
case AlmanacDevicePHIDType::TYPECONST:
$query = new AlmanacDeviceQuery();
break;
case AlmanacServicePHIDType::TYPECONST:
$query = new AlmanacServiceQuery();
break;
default:
return new Aphront404Response();
}
$object = $query
->setViewer($viewer)
->withPHIDs(array($object_phid))
->requireCapabilities(
array(
PhabricatorPolicyCapability::CAN_VIEW,
PhabricatorPolicyCapability::CAN_EDIT,
))
->needProperties(true)
->executeOne();
if (!$object) {
return new Aphront404Response();
}
if (!($object instanceof AlmanacPropertyInterface)) {
return new Aphront404Response();
}
$this->propertyObject = $object;
return null;
}
}
Function Calls
None |
Stats
MD5 | e9514b46fb8bb7900c12a118433afae3 |
Eval Count | 0 |
Decode Time | 77 ms |