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 PhameBlogDatasource extends PhabricatorTypeaheadDatasource { publi..
Decoded Output download
<?php
final class PhameBlogDatasource
extends PhabricatorTypeaheadDatasource {
public function getBrowseTitle() {
return pht('Browse Blogs');
}
public function getPlaceholderText() {
return pht('Type a blog name...');
}
public function getDatasourceApplicationClass() {
return 'PhabricatorPhameApplication';
}
public function loadResults() {
$viewer = $this->getViewer();
$blogs = id(new PhameBlogQuery())
->setViewer($viewer)
->needProfileImage(true)
->requireCapabilities(
array(
PhabricatorPolicyCapability::CAN_VIEW,
PhabricatorPolicyCapability::CAN_EDIT,
))
->execute();
$results = array();
foreach ($blogs as $blog) {
$closed = null;
$status = $blog->getStatus();
if ($status === PhabricatorBadgesBadge::STATUS_ARCHIVED) {
$closed = pht('Archived');
}
$results[] = id(new PhabricatorTypeaheadResult())
->setName($blog->getName())
->setClosed($closed)
->addAttribute(pht('Phame Blog'))
->setImageURI($blog->getProfileImageURI())
->setPHID($blog->getPHID());
}
$results = $this->filterResultsAgainstTokens($results);
return $results;
}
}
?>
Did this file decode correctly?
Original Code
<?php
final class PhameBlogDatasource
extends PhabricatorTypeaheadDatasource {
public function getBrowseTitle() {
return pht('Browse Blogs');
}
public function getPlaceholderText() {
return pht('Type a blog name...');
}
public function getDatasourceApplicationClass() {
return 'PhabricatorPhameApplication';
}
public function loadResults() {
$viewer = $this->getViewer();
$blogs = id(new PhameBlogQuery())
->setViewer($viewer)
->needProfileImage(true)
->requireCapabilities(
array(
PhabricatorPolicyCapability::CAN_VIEW,
PhabricatorPolicyCapability::CAN_EDIT,
))
->execute();
$results = array();
foreach ($blogs as $blog) {
$closed = null;
$status = $blog->getStatus();
if ($status === PhabricatorBadgesBadge::STATUS_ARCHIVED) {
$closed = pht('Archived');
}
$results[] = id(new PhabricatorTypeaheadResult())
->setName($blog->getName())
->setClosed($closed)
->addAttribute(pht('Phame Blog'))
->setImageURI($blog->getProfileImageURI())
->setPHID($blog->getPHID());
}
$results = $this->filterResultsAgainstTokens($results);
return $results;
}
}
Function Calls
None |
Stats
MD5 | 90c90bf97cdd3a0f944e76bd527d6024 |
Eval Count | 0 |
Decode Time | 94 ms |