2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * The navigation panel - displays server, db and table selection tree
6 * @package PhpMyAdmin-Navigation
9 // Include common functionalities
10 require_once './libraries/common.inc.php';
12 // Also initialises the collapsible tree class
13 require_once './libraries/navigation/Navigation.class.php';
15 $response = PMA_Response
::getInstance();
16 $navigation = new PMA_Navigation();
17 if (! $response->isAjax()) {
20 __('Fatal error: The navigation can only be accessed via AJAX')
26 if (isset($_REQUEST['getNaviSettings']) && $_REQUEST['getNaviSettings']) {
27 $response->addJSON('message', PMA_PageSettings
::getNaviSettings());
31 $cfgRelation = PMA_getRelationsParam();
32 if ($cfgRelation['navwork']) {
33 if (isset($_REQUEST['hideNavItem'])) {
34 if (! empty($_REQUEST['itemName'])
35 && ! empty($_REQUEST['itemType'])
36 && ! empty($_REQUEST['dbName'])
38 $navigation->hideNavigationItem(
39 $_REQUEST['itemName'],
40 $_REQUEST['itemType'],
42 (! empty($_REQUEST['tableName']) ?
$_REQUEST['tableName'] : null)
48 if (isset($_REQUEST['unhideNavItem'])) {
49 if (! empty($_REQUEST['itemName'])
50 && ! empty($_REQUEST['itemType'])
51 && ! empty($_REQUEST['dbName'])
53 $navigation->unhideNavigationItem(
54 $_REQUEST['itemName'],
55 $_REQUEST['itemType'],
57 (! empty($_REQUEST['tableName']) ?
$_REQUEST['tableName'] : null)
63 if (isset($_REQUEST['showUnhideDialog'])) {
64 if (! empty($_REQUEST['dbName'])) {
67 $navigation->getItemUnhideDialog($_REQUEST['dbName'])
75 $response->addJSON('message', $navigation->getDisplay());