Skip to content

Commit

Permalink
removed getBaseUri from debug, used getFullUri from request
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Jan 24, 2017
1 parent eaf137c commit 67297d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
9 changes: 0 additions & 9 deletions src/debug/DebugPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,6 @@ public function getDetail()
]);
}

public function getBaseUri($dbname)
{
try {
return Yii::$app->get($dbname)->getBaseUri();
} catch (InvalidConfigException $e) {
return null;
}
}

private $_timings;

public function getTimings()
Expand Down
14 changes: 2 additions & 12 deletions src/debug/Timing.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function getMethod()

public function getUrlEncoded()
{
return Html::encode($this->getFullUri());
return Html::encode($this->request->getFullUri());
}

public function getBodyEncoded()
Expand Down Expand Up @@ -110,20 +110,10 @@ public function getRunLink()

public function getNewTabLink()
{
$uri = $this->getFullUri();
$uri = $this->request->getFullUri();
$sign = strpos($uri, '?') === false ? '?' : '';
$newTabUrl = rtrim($uri, '&') . $sign . $this->request->getBody();

return Html::a('to new tab', $newTabUrl, ['target' => '_blank']);
}

public function getFullUri()
{
return $this->getBaseUri() . '/' . $this->request->getUri();
}

public function getBaseUri()
{
return $this->panel->getBaseUri($this->request->getDbname());
}
}

0 comments on commit 67297d4

Please sign in to comment.