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 DrydockRepositoryOperationStatusController extends DrydockRepositoryO..

Decoded Output download

<?php

final class DrydockRepositoryOperationStatusController
  extends DrydockRepositoryOperationController {

  public function shouldAllowPublic() {
    return true;
  }

  public function handleRequest(AphrontRequest $request) {
    $viewer = $request->getViewer();
    $id = $request->getURIData('id');

    $operation = id(new DrydockRepositoryOperationQuery())
      ->setViewer($viewer)
      ->withIDs(array($id))
      ->executeOne();
    if (!$operation) {
      return new Aphront404Response();
    }

    $id = $operation->getID();

    $status_view = id(new DrydockRepositoryOperationStatusView())
      ->setUser($viewer)
      ->setOperation($operation);

    if ($request->isAjax()) {
      $payload = array(
        'markup' => $status_view->renderUnderwayState(),
        'isUnderway' => $operation->isUnderway(),
      );

      return id(new AphrontAjaxResponse())
        ->setContent($payload);
    }

    $title = pht('Repository Operation %d', $id);

    $crumbs = $this->buildApplicationCrumbs();
    $crumbs->addTextCrumb(
      pht('Operations'),
      $this->getApplicationURI('operation/'));
    $crumbs->addTextCrumb($title);

    return $this->newPage()
      ->setTitle(pht('Status'))
      ->setCrumbs($crumbs)
      ->appendChild($status_view);
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class DrydockRepositoryOperationStatusController
  extends DrydockRepositoryOperationController {

  public function shouldAllowPublic() {
    return true;
  }

  public function handleRequest(AphrontRequest $request) {
    $viewer = $request->getViewer();
    $id = $request->getURIData('id');

    $operation = id(new DrydockRepositoryOperationQuery())
      ->setViewer($viewer)
      ->withIDs(array($id))
      ->executeOne();
    if (!$operation) {
      return new Aphront404Response();
    }

    $id = $operation->getID();

    $status_view = id(new DrydockRepositoryOperationStatusView())
      ->setUser($viewer)
      ->setOperation($operation);

    if ($request->isAjax()) {
      $payload = array(
        'markup' => $status_view->renderUnderwayState(),
        'isUnderway' => $operation->isUnderway(),
      );

      return id(new AphrontAjaxResponse())
        ->setContent($payload);
    }

    $title = pht('Repository Operation %d', $id);

    $crumbs = $this->buildApplicationCrumbs();
    $crumbs->addTextCrumb(
      pht('Operations'),
      $this->getApplicationURI('operation/'));
    $crumbs->addTextCrumb($title);

    return $this->newPage()
      ->setTitle(pht('Status'))
      ->setCrumbs($crumbs)
      ->appendChild($status_view);
  }

}

Function Calls

None

Variables

None

Stats

MD5 9228a1593b6eb3650b59675182c516d2
Eval Count 0
Decode Time 97 ms