From 1a0005418bf6f07ff0ac29d9e96702d2fba0e759 Mon Sep 17 00:00:00 2001 From: Hugues Peccatte Date: Mon, 15 Jun 2015 00:41:27 +0200 Subject: [PATCH] Manage logo display in navigation panel, with a template. Signed-off-by: Hugues Peccatte --- .../navigation/NavigationHeader.class.php | 95 +++++++++++-------- templates/logo.phtml | 15 +++ 2 files changed, 70 insertions(+), 40 deletions(-) create mode 100644 templates/logo.phtml diff --git a/libraries/navigation/NavigationHeader.class.php b/libraries/navigation/NavigationHeader.class.php index 9d9ec76ab3..a5023e4a27 100644 --- a/libraries/navigation/NavigationHeader.class.php +++ b/libraries/navigation/NavigationHeader.class.php @@ -9,6 +9,9 @@ if (! defined('PHPMYADMIN')) { exit; } +require_once 'libraries/Template.class.php'; +use PMA\Template; + /** * This class renders the logo, links, server selection, * which are then displayed at the top of the navigation panel @@ -73,11 +76,10 @@ class PMA_NavigationHeader */ private function _logo() { - $retval = ''; // display Logo, depending on $GLOBALS['cfg']['NavigationDisplayLogo'] if (!$GLOBALS['cfg']['NavigationDisplayLogo']) { - $retval .= ''; - return $retval; + return Template::get('logo') + ->render(array('displayLogo' => false)); } $logo = 'phpMyAdmin'; @@ -88,44 +90,57 @@ class PMA_NavigationHeader $logo = ''; } - $retval .= '