Skip to content

Commit

Permalink
Get response instance just once
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Dec 15, 2016
1 parent f914fca commit f089075
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libraries/navigation/Navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ public function getDisplay()
{
/* Init */
$retval = '';
if (!Response::getInstance()->isAjax()) {
$response = Response::getInstance();
if (! $response->isAjax()) {
$header = new NavigationHeader();
$retval = $header->getDisplay();
}
$tree = new NavigationTree();
if (! Response::getInstance()->isAjax()
if (! $response->isAjax()
|| ! empty($_REQUEST['full'])
|| ! empty($_REQUEST['reload'])
) {
Expand All @@ -57,7 +58,7 @@ public function getDisplay()
$retval .= $navRender;
}

if (! Response::getInstance()->isAjax()) {
if (! $response->isAjax()) {
// closes the tags that were opened by the navigation header
$retval .= '</div>'; // pma_navigation_tree
$retval .= '<div id="pma_navi_settings_container">';
Expand Down

0 comments on commit f089075

Please sign in to comment.