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 DiffusionCommitTagsController extends DiffusionController { public f..
Decoded Output download
<?php
final class DiffusionCommitTagsController extends DiffusionController {
public function shouldAllowPublic() {
return true;
}
public function handleRequest(AphrontRequest $request) {
$response = $this->loadDiffusionContext();
if ($response) {
return $response;
}
$drequest = $this->getDiffusionRequest();
$repository = $drequest->getRepository();
$tag_limit = 10;
$tags = DiffusionRepositoryTag::newFromConduit(
$this->callConduitWithDiffusionRequest(
'diffusion.tagsquery',
array(
'commit' => $drequest->getCommit(),
'limit' => $tag_limit + 1,
)));
$has_more_tags = (count($tags) > $tag_limit);
$tags = array_slice($tags, 0, $tag_limit);
$tag_links = array();
foreach ($tags as $tag) {
$tag_links[] = phutil_tag(
'a',
array(
'href' => $drequest->generateURI(
array(
'action' => 'browse',
'commit' => $tag->getName(),
)),
),
$tag->getName());
}
if ($has_more_tags) {
$tag_links[] = phutil_tag(
'a',
array(
'href' => $drequest->generateURI(
array(
'action' => 'tags',
)),
),
pht("More Tags"));
}
return id(new AphrontAjaxResponse())
->setContent($tag_links ? implode(', ', $tag_links) : pht('None'));
}
}
?>
Did this file decode correctly?
Original Code
<?php
final class DiffusionCommitTagsController extends DiffusionController {
public function shouldAllowPublic() {
return true;
}
public function handleRequest(AphrontRequest $request) {
$response = $this->loadDiffusionContext();
if ($response) {
return $response;
}
$drequest = $this->getDiffusionRequest();
$repository = $drequest->getRepository();
$tag_limit = 10;
$tags = DiffusionRepositoryTag::newFromConduit(
$this->callConduitWithDiffusionRequest(
'diffusion.tagsquery',
array(
'commit' => $drequest->getCommit(),
'limit' => $tag_limit + 1,
)));
$has_more_tags = (count($tags) > $tag_limit);
$tags = array_slice($tags, 0, $tag_limit);
$tag_links = array();
foreach ($tags as $tag) {
$tag_links[] = phutil_tag(
'a',
array(
'href' => $drequest->generateURI(
array(
'action' => 'browse',
'commit' => $tag->getName(),
)),
),
$tag->getName());
}
if ($has_more_tags) {
$tag_links[] = phutil_tag(
'a',
array(
'href' => $drequest->generateURI(
array(
'action' => 'tags',
)),
),
pht("More Tags\xE2\x80\xA6"));
}
return id(new AphrontAjaxResponse())
->setContent($tag_links ? implode(', ', $tag_links) : pht('None'));
}
}
Function Calls
None |
Stats
MD5 | 398c87b63ea4dc9d455b9a120e6e2d41 |
Eval Count | 0 |
Decode Time | 91 ms |