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 PhabricatorMacroController extends PhabricatorController { protec..

Decoded Output download

<?php

abstract class PhabricatorMacroController extends PhabricatorController {

  protected function buildSideNavView($for_app = false) {
    $nav = new AphrontSideNavFilterView();
    $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));

    if ($for_app) {
      $nav->addLabel(pht('Create'));
      $nav->addFilter('',
        pht('Create Macro'),
        $this->getApplicationURI('/create/'));
    }

    id(new PhabricatorMacroSearchEngine())
      ->setViewer($this->getRequest()->getUser())
      ->addNavigationItems($nav->getMenu());

    return $nav;
  }

  public function buildApplicationMenu() {
    return $this->buildSideNavView($for_app = true)->getMenu();
  }

  protected function buildApplicationCrumbs() {
    $crumbs = parent::buildApplicationCrumbs();

    $can_manage = $this->hasApplicationCapability(
      PhabricatorMacroManageCapability::CAPABILITY);

    $crumbs->addAction(
      id(new PHUIListItemView())
        ->setName(pht('Create Macro'))
        ->setHref($this->getApplicationURI('/create/'))
        ->setIcon('fa-plus-square')
        ->setDisabled(!$can_manage)
        ->setWorkflow(!$can_manage));

    return $crumbs;
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

abstract class PhabricatorMacroController extends PhabricatorController {

  protected function buildSideNavView($for_app = false) {
    $nav = new AphrontSideNavFilterView();
    $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));

    if ($for_app) {
      $nav->addLabel(pht('Create'));
      $nav->addFilter('',
        pht('Create Macro'),
        $this->getApplicationURI('/create/'));
    }

    id(new PhabricatorMacroSearchEngine())
      ->setViewer($this->getRequest()->getUser())
      ->addNavigationItems($nav->getMenu());

    return $nav;
  }

  public function buildApplicationMenu() {
    return $this->buildSideNavView($for_app = true)->getMenu();
  }

  protected function buildApplicationCrumbs() {
    $crumbs = parent::buildApplicationCrumbs();

    $can_manage = $this->hasApplicationCapability(
      PhabricatorMacroManageCapability::CAPABILITY);

    $crumbs->addAction(
      id(new PHUIListItemView())
        ->setName(pht('Create Macro'))
        ->setHref($this->getApplicationURI('/create/'))
        ->setIcon('fa-plus-square')
        ->setDisabled(!$can_manage)
        ->setWorkflow(!$can_manage));

    return $crumbs;
  }

}

Function Calls

None

Variables

None

Stats

MD5 b41dedb395a76a22130d447d16409044
Eval Count 0
Decode Time 178 ms