2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * This class is responsible for instanciating
5 * the various components of the navigation panel
7 * @package PhpMyAdmin-navigation
9 if (! defined('PHPMYADMIN')) {
13 require_once 'libraries/navigation/NodeFactory.class.php';
14 require_once 'libraries/navigation/NavigationHeader.class.php';
15 require_once 'libraries/navigation/NavigationTree.class.php';
18 * The navigation panel - displays server, db and table selection tree
20 * @package PhpMyAdmin-Navigation
25 * Initialises the class
29 public function __construct()
31 if (empty($GLOBALS['token'])) {
32 $GLOBALS['token'] = $_SESSION[' PMA_token '];
37 * Renders the navigation tree, or part of it
39 * @return string The navigation tree
41 public function getDisplay()
45 if (! PMA_Response
::getInstance()->isAjax()) {
46 $header = new PMA_NavigationHeader();
47 $retval = $header->getDisplay();
49 $tree = new PMA_NavigationTree();
50 if (! PMA_Response
::getInstance()->isAjax()
51 ||
! empty($_REQUEST['full'])
52 ||
! empty($_REQUEST['reload'])
54 $treeRender = $tree->renderState();
56 $treeRender = $tree->renderPath();
60 $retval .= PMA_Message
::error(
61 __('An error has occured while loading the navigation tree')
64 $retval .= $treeRender;
67 if (! PMA_Response
::getInstance()->isAjax()) {
68 // closes the tags that were opened by the navigation header