mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
explorer: allow /explorer/SYM url format
This commit is contained in:
parent
382131c413
commit
b97682e225
1 changed files with 22 additions and 0 deletions
|
@ -6,6 +6,23 @@ class ExplorerController extends CommonController
|
|||
{
|
||||
public $defaultAction='index';
|
||||
|
||||
public function run($actionID)
|
||||
{
|
||||
// Forward the url /explorer/BTC to the BTC block explorer
|
||||
if (!empty($actionID) && !isset($_REQUEST['id'])) {
|
||||
if (strlen($actionID) <= 5) {
|
||||
$coin = getdbosql('db_coins', "enable AND visible AND symbol=:symbol", array(
|
||||
':symbol'=>strtoupper($actionID)
|
||||
));
|
||||
if ($coin) {
|
||||
$_REQUEST['id'] = $coin->id;
|
||||
$this->forward('id');
|
||||
}
|
||||
}
|
||||
}
|
||||
return parent::run($actionID);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
public function actionIndex()
|
||||
|
@ -45,6 +62,11 @@ class ExplorerController extends CommonController
|
|||
$this->render('index');
|
||||
}
|
||||
|
||||
public function actionId()
|
||||
{
|
||||
return $this->actionIndex();
|
||||
}
|
||||
|
||||
/**
|
||||
* Difficulty Graph
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue