diff --git a/Documentation.html b/Documentation.html index ce08ff826e..307a24a41c 100644 --- a/Documentation.html +++ b/Documentation.html @@ -1349,7 +1349,15 @@ CREATE DATABASE,ALTER DATABASE,DROP DATABASE redirected after logout (doesn't affect config authentication method). Should be absolute including protocol. - +
$cfg['Servers'][$i]['StatusCacheDatabases'] array of strings
+
Enables caching of TABLE STATUS outputs for specific databases on this server (in some cases TABLE STATUS can be very slow, so you may want to cache it). APC is used (if the PHP extension is available, if not, this setting is ignored silently). You have to provide StatusCacheLifetime.
+ Takes effect only if + DisableIS + is true. +
+
$cfg['Servers'][$i]['StatusCacheLifetime'] integer
+
Lifetime in seconds of the TABLE STATUS cache if StatusCacheDatabases is used. +
$cfg['ServerDefault'] integer
If you have more than one server configured, you can set $cfg['ServerDefault'] to any one of them to autoconnect to diff --git a/js/navigation.js b/js/navigation.js index 843a998675..cd65e595d8 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -202,6 +202,37 @@ function clear_fast_filter() fast_filter(''); } +/** + * hide all LI elements with second A tag which doesn`t contain requested value + * + * @param string value requested value + * + */ +function fast_db_filter(value) +{ + var lowercase_value = value.toLowerCase(); + + $('#databaseList li a').each(function(idx, elem) { + var $elem = $(elem); + if (value && $elem.html().toLowerCase().indexOf(lowercase_value) == -1) { + $elem.parent().hide(); + } else { + $elem.parents('li').show(); + } + }); + +} + +/** + * Clears fast database filter. + */ +function clear_fast_db_filter() +{ + var $elm = $('#fast_db_filter'); + $elm.val(''); + fast_db_filter(''); +} + /** * Reloads the recent tables list. */ @@ -251,6 +282,32 @@ $(function(){ } }); + /* Fast database filter */ + var txtDb = $('#fast_db_filter').val(); + + $('#fast_db_filter.gray').live('focus', function() { + $(this).removeClass('gray'); + clear_fast_db_filter(); + }); + + $('#fast_db_filter:not(.gray)').live('focusout', function() { + var $input = $(this); + if ($input.val() == '') { + $input + .addClass('gray') + .val(txtDb); + } + }); + + $('#clear_fast_db_filter').click(function() { + clear_fast_db_filter(); + $('#fast_db_filter').focus(); + }); + + $('#fast_db_filter').keyup(function(evt) { + fast_db_filter($(this).val()); + }); + /* Jump to recent table */ $('#recentTable').change(function() { if (this.value != '') { diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 6c53abf628..d9de2abee9 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -953,7 +953,7 @@ function PMA_reloadNavigation($jsonly = false) '', '&' ); - if (!$jsonly) { + if (! $jsonly) { echo '' . PHP_EOL; } @@ -1370,11 +1370,11 @@ function PMA_profilingSupported() } /** - * Displays a form with the Profiling checkbox + * Returns HTML for the form with the Profiling checkbox * * @param string $sql_query sql query * - * @return void + * @return string HTML for the form with the Profiling checkbox * * @access public */ @@ -1869,7 +1869,7 @@ function PMA_linkOrButton($url, $message, $tag_params = array(), $displayed_message = ''; // Add text if not already added if (stristr($message, ''; } else { echo '