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 namespace Widget\Metas\Category; use Typecho\Db\Exception; use Widget\Base\Metas; ..
Decoded Output download
<?php
namespace Widget\Metas\Category;
use Typecho\Db\Exception;
use Widget\Base\Metas;
use Widget\Base\TreeTrait;
if (!defined('__TYPECHO_ROOT_DIR__')) {
exit;
}
class Related extends Metas
{
use InitTreeRowsTrait;
use TreeTrait;
/**
* @return void
* @throws Exception
*/
public function execute()
{
$ids = array_column($this->db->fetchAll($this->select('table.metas.mid')
->join('table.relationships', 'table.relationships.mid = table.metas.mid')
->where('table.relationships.cid = ?', $this->parameter->cid)
->where('table.metas.type = ?', 'category')), 'mid');
usort($ids, function ($a, $b) {
$orderA = array_search($a, $this->orders);
$orderB = array_search($b, $this->orders);
return $orderA <=> $orderB;
});
$this->pushAll($this->getRows($ids));
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Widget\Metas\Category;
use Typecho\Db\Exception;
use Widget\Base\Metas;
use Widget\Base\TreeTrait;
if (!defined('__TYPECHO_ROOT_DIR__')) {
exit;
}
class Related extends Metas
{
use InitTreeRowsTrait;
use TreeTrait;
/**
* @return void
* @throws Exception
*/
public function execute()
{
$ids = array_column($this->db->fetchAll($this->select('table.metas.mid')
->join('table.relationships', 'table.relationships.mid = table.metas.mid')
->where('table.relationships.cid = ?', $this->parameter->cid)
->where('table.metas.type = ?', 'category')), 'mid');
usort($ids, function ($a, $b) {
$orderA = array_search($a, $this->orders);
$orderB = array_search($b, $this->orders);
return $orderA <=> $orderB;
});
$this->pushAll($this->getRows($ids));
}
}
Function Calls
None |
Stats
MD5 | 681ddf9babeddb866a3411d08c135eb0 |
Eval Count | 0 |
Decode Time | 87 ms |