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 final class FileDeletionWorker extends PhabricatorWorker { private function load..
Decoded Output download
<?php
final class FileDeletionWorker extends PhabricatorWorker {
private function loadFile() {
$phid = idx($this->getTaskData(), 'objectPHID');
if (!$phid) {
throw new PhabricatorWorkerPermanentFailureException(
pht('No "%s" in task data.', 'objectPHID'));
}
$file = id(new PhabricatorFileQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
->withPHIDs(array($phid))
->executeOne();
if (!$file) {
throw new PhabricatorWorkerPermanentFailureException(
pht('File "%s" does not exist.', $phid));
}
return $file;
}
protected function doWork() {
$file = $this->loadFile();
$engine = new PhabricatorDestructionEngine();
$engine->destroyObject($file);
}
}
?>
Did this file decode correctly?
Original Code
<?php
final class FileDeletionWorker extends PhabricatorWorker {
private function loadFile() {
$phid = idx($this->getTaskData(), 'objectPHID');
if (!$phid) {
throw new PhabricatorWorkerPermanentFailureException(
pht('No "%s" in task data.', 'objectPHID'));
}
$file = id(new PhabricatorFileQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
->withPHIDs(array($phid))
->executeOne();
if (!$file) {
throw new PhabricatorWorkerPermanentFailureException(
pht('File "%s" does not exist.', $phid));
}
return $file;
}
protected function doWork() {
$file = $this->loadFile();
$engine = new PhabricatorDestructionEngine();
$engine->destroyObject($file);
}
}
Function Calls
None |
Stats
MD5 | 56b4c1fbac18532cdf38f891abef17e8 |
Eval Count | 0 |
Decode Time | 74 ms |