diff --git a/ChangeLog b/ChangeLog index 2b5c530a64..5291c8a71c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,7 @@ phpMyAdmin - ChangeLog 4.3.7.0 (not yet released) - bug #4694 js error on marking table as favorite in Safari (in private mode) +- bug #4695 Changing $cfg['DefaultTabTable'] doesn't update link and title 4.3.6.0 (2015-01-07) - bug Undefined index notices while configuring recent and favorite tables diff --git a/js/navigation.js b/js/navigation.js index 614c0a93bd..f994951840 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -435,7 +435,9 @@ $(function () { var storage = window.sessionStorage; // remove tree from storage if Navi_panel config form is submitted $(document).on('submit', 'form.config-form', function(event) { - if ($(this).attr('action').indexOf('form=Navi_panel') >= 0) { + if ($(this).attr('action').indexOf('form=Navi_panel') >= 0 || + $(this).attr('action').indexOf('form=Main_panel') >= 0 + ) { storage.removeItem('navTree'); } }); diff --git a/libraries/navigation/Nodes/Node.class.php b/libraries/navigation/Nodes/Node.class.php index 5499c5fba4..eb3b38f94b 100644 --- a/libraries/navigation/Nodes/Node.class.php +++ b/libraries/navigation/Nodes/Node.class.php @@ -90,6 +90,11 @@ class Node */ public $links; + /** + * @var string HTML title + */ + public $title; + /** * @var string Extra CSS classes for the node */ diff --git a/libraries/navigation/Nodes/Node_Table.class.php b/libraries/navigation/Nodes/Node_Table.class.php index 4bcc8d4829..9ac1a34487 100644 --- a/libraries/navigation/Nodes/Node_Table.class.php +++ b/libraries/navigation/Nodes/Node_Table.class.php @@ -48,6 +48,23 @@ class Node_Table extends Node_DatabaseChild $this->icon = PMA_Util::getImage('b_browse.png', __('Browse')); break; } + switch($GLOBALS['cfg']['DefaultTabTable']) { + case 'tbl_structure.php': + $this->title = __('Structure'); + break; + case 'tbl_select.php': + $this->title = __('Search'); + break; + case 'tbl_change.php': + $this->title = __('Insert'); + break; + case 'tbl_sql.php': + $this->title = __('SQL'); + break; + case 'sql.php': + $this->title = __('Browse'); + break; + } $this->links = array( 'text' => $GLOBALS['cfg']['DefaultTabTable'] . '?server=' . $GLOBALS['server'] @@ -57,7 +74,7 @@ class Node_Table extends Node_DatabaseChild . '?server=' . $GLOBALS['server'] . '&db=%2$s&table=%1$s&token=' . $_SESSION[' PMA_token '], - 'title' => __('Browse') + 'title' => $this->title ); $this->classes = 'table'; }