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 PonderQuestionHistoryController extends PonderController { public fu..

Decoded Output download

<?php

final class PonderQuestionHistoryController extends PonderController {

  public function shouldAllowPublic() {
    return true;
  }

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

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

    $timeline = $this->buildTransactionTimeline(
      $question,
      new PonderQuestionTransactionQuery());
    $timeline->setShouldTerminate(true);

    $qid = $question->getID();

    $crumbs = $this->buildApplicationCrumbs();
    $crumbs->setBorder(true);
    $crumbs->addTextCrumb("Q{$qid}", "/Q{$qid}");
    $crumbs->addTextCrumb(pht('History'));
    $crumbs->setBorder(true);

    $header = id(new PHUIHeaderView())
      ->setHeader($question->getTitle())
      ->setHeaderIcon('fa-history');

    $view = id(new PHUITwoColumnView())
      ->setHeader($header)
      ->setFooter($timeline);

    return $this->newPage()
      ->setTitle(pht('Question History'))
      ->setCrumbs($crumbs)
      ->appendChild($view);
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class PonderQuestionHistoryController extends PonderController {

  public function shouldAllowPublic() {
    return true;
  }

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

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

    $timeline = $this->buildTransactionTimeline(
      $question,
      new PonderQuestionTransactionQuery());
    $timeline->setShouldTerminate(true);

    $qid = $question->getID();

    $crumbs = $this->buildApplicationCrumbs();
    $crumbs->setBorder(true);
    $crumbs->addTextCrumb("Q{$qid}", "/Q{$qid}");
    $crumbs->addTextCrumb(pht('History'));
    $crumbs->setBorder(true);

    $header = id(new PHUIHeaderView())
      ->setHeader($question->getTitle())
      ->setHeaderIcon('fa-history');

    $view = id(new PHUITwoColumnView())
      ->setHeader($header)
      ->setFooter($timeline);

    return $this->newPage()
      ->setTitle(pht('Question History'))
      ->setCrumbs($crumbs)
      ->appendChild($view);
  }

}

Function Calls

None

Variables

None

Stats

MD5 03ec842fd77847914fc2626d0196f2c6
Eval Count 0
Decode Time 104 ms