Merge pull request #461 from xmujay/0624
fix the code style of function definition
This commit is contained in:
commit
becfb9fbc2
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
|
||||
/**
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
@ -55,17 +56,17 @@ function PMA_getColumnOrder()
|
||||
return $column_order;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Builds the HTML td elements for one database to display in the list
|
||||
* of databases from server_databases.php (which can be modified by
|
||||
* db_create.php)
|
||||
*
|
||||
* @param array $current
|
||||
* @param boolean $is_superuser
|
||||
* @param string $url_query
|
||||
* @param array $column_order
|
||||
* @param array $replication_types
|
||||
* @param array $replication_info
|
||||
* @param array $current current database
|
||||
* @param boolean $is_superuser user status
|
||||
* @param string $url_query url query
|
||||
* @param array $column_order column order
|
||||
* @param array $replication_types replication types
|
||||
* @param array $replication_info replication info
|
||||
*
|
||||
* @return array $column_order, $out
|
||||
*/
|
||||
|
||||
@ -32,8 +32,8 @@ if (! defined('PHPMYADMIN')) {
|
||||
function PMA_getHtmlForDatabase(
|
||||
$databases, $databases_count, $pos, $dbstats,
|
||||
$sort_by, $sort_order, $is_superuser, $cfg,
|
||||
$replication_types, $replication_info, $url_query)
|
||||
{
|
||||
$replication_types, $replication_info, $url_query
|
||||
) {
|
||||
$html = '<div id="tableslistcontainer">';
|
||||
reset($databases);
|
||||
$first_database = current($databases);
|
||||
@ -137,8 +137,8 @@ function PMA_getHtmlForDatabase(
|
||||
*/
|
||||
function PMA_getHtmlForTableFooterButtons(
|
||||
$is_allowUserDropDatabase, $is_superuser,
|
||||
$sort_by, $sort_order, $dbstats)
|
||||
{
|
||||
$sort_by, $sort_order, $dbstats
|
||||
) {
|
||||
$html = "";
|
||||
if ($is_superuser || $is_allowUserDropDatabase) {
|
||||
$common_url_query = PMA_generate_common_url(
|
||||
@ -151,8 +151,8 @@ function PMA_getHtmlForTableFooterButtons(
|
||||
$html .= '<img class="selectallarrow" src="'
|
||||
. $GLOBALS['pmaThemeImage'] . 'arrow_' . $GLOBALS['text_dir'] . '.png"'
|
||||
. ' width="38" height="22" alt="' . __('With selected:') . '" />' . "\n"
|
||||
. '<input type="checkbox" id="dbStatsForm_checkall" class="checkall_box" '
|
||||
. 'title="' . __('Check All') . '" /> '
|
||||
. '<input type="checkbox" id="dbStatsForm_checkall" '
|
||||
. 'class="checkall_box" title="' . __('Check All') . '" /> '
|
||||
. '<label for="dbStatsForm_checkall">' . __('Check All') . '</label> '
|
||||
. '<i style="margin-left: 2em">' . __('With selected:') . '</i>' . "\n";
|
||||
$html .= PMA_Util::getButtonOrImage(
|
||||
@ -180,8 +180,8 @@ function PMA_getHtmlForTableFooterButtons(
|
||||
function PMA_getHtmlForTableFooter(
|
||||
$is_allowUserDropDatabase, $is_superuser,
|
||||
$databases_count, $column_order,
|
||||
$replication_types, $first_database)
|
||||
{
|
||||
$replication_types, $first_database
|
||||
) {
|
||||
$html = '<tfoot><tr>' . "\n";
|
||||
if ($is_superuser || $is_allowUserDropDatabase) {
|
||||
$html .= ' <th></th>' . "\n";
|
||||
@ -219,8 +219,8 @@ function PMA_getHtmlForTableFooter(
|
||||
*/
|
||||
function PMA_getHtmlForDatabaseList(
|
||||
$databases, $is_superuser, $url_query,
|
||||
$column_order, $replication_types, $replication_info)
|
||||
{
|
||||
$column_order, $replication_types, $replication_info
|
||||
) {
|
||||
$odd_row = true;
|
||||
$html = '<tbody>' . "\n";
|
||||
|
||||
@ -264,7 +264,8 @@ function PMA_getHtmlForColumnOrder($column_order, $first_database)
|
||||
foreach ($column_order as $stat_name => $stat) {
|
||||
if (array_key_exists($stat_name, $first_database)) {
|
||||
if ($stat['format'] === 'byte') {
|
||||
list($value, $unit) = PMA_Util::formatByteDown($stat['footer'], 3, 1);
|
||||
list($value, $unit)
|
||||
= PMA_Util::formatByteDown($stat['footer'], 3, 1);
|
||||
} elseif ($stat['format'] === 'number') {
|
||||
$value = PMA_Util::formatNumber($stat['footer'], 0);
|
||||
} else {
|
||||
@ -306,9 +307,11 @@ function PMA_getHtmlForColumnOrder($column_order, $first_database)
|
||||
function PMA_getHtmlForColumnOrderWithSort(
|
||||
$is_superuser, $is_allowUserDropDatabase,
|
||||
$_url_params, $sort_by, $sort_order,
|
||||
$column_order, $first_database)
|
||||
{
|
||||
$html = ($is_superuser || $is_allowUserDropDatabase ? ' <th></th>' . "\n" : '')
|
||||
$column_order, $first_database
|
||||
) {
|
||||
$html = ($is_superuser || $is_allowUserDropDatabase
|
||||
? ' <th></th>' . "\n"
|
||||
: '')
|
||||
. ' <th><a href="server_databases.php'
|
||||
. PMA_generate_common_url($_url_params) . '">' . "\n"
|
||||
. ' ' . __('Database') . "\n"
|
||||
@ -388,8 +391,9 @@ function PMA_getHtmlForNoticeEnableStatistics($url_query, $html)
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function PMA_getHtmlForReplicationType($is_superuser, $replication_types, $cfg_inconic)
|
||||
{
|
||||
function PMA_getHtmlForReplicationType(
|
||||
$is_superuser, $replication_types, $cfg_inconic
|
||||
) {
|
||||
$html = '';
|
||||
foreach ($replication_types as $type) {
|
||||
if ($type == "master") {
|
||||
|
||||
@ -37,7 +37,8 @@ function PMA_getHtmlForFilter($ServerStatusData)
|
||||
$retval = '';
|
||||
$retval .= '<fieldset id="tableFilter">';
|
||||
$retval .= '<legend>' . __('Filters') . '</legend>';
|
||||
$retval .= '<form action="server_status_variables.php?' . PMA_generate_common_url() . '">';
|
||||
$retval .= '<form action="server_status_variables.php?'
|
||||
. PMA_generate_common_url() . '">';
|
||||
$retval .= '<input type="submit" value="' . __('Refresh') . '" />';
|
||||
$retval .= '<div class="formelement">';
|
||||
$retval .= '<label for="filterText">' . __('Containing the word:') . '</label>';
|
||||
@ -45,7 +46,8 @@ function PMA_getHtmlForFilter($ServerStatusData)
|
||||
. 'style="vertical-align: baseline;" value="' . $filterText . '" />';
|
||||
$retval .= '</div>';
|
||||
$retval .= '<div class="formelement">';
|
||||
$retval .= '<input' . $filterAlert . ' type="checkbox" name="filterAlert" id="filterAlert" />';
|
||||
$retval .= '<input' . $filterAlert . ' type="checkbox" '
|
||||
. 'name="filterAlert" id="filterAlert" />';
|
||||
$retval .= '<label for="filterAlert">';
|
||||
$retval .= __('Show only alert values');
|
||||
$retval .= '</label>';
|
||||
@ -70,7 +72,8 @@ function PMA_getHtmlForFilter($ServerStatusData)
|
||||
$retval .= '</select>';
|
||||
$retval .= '</div>';
|
||||
$retval .= '<div class="formelement">';
|
||||
$retval .= '<input' . $dontFormat . ' type="checkbox" name="dontFormat" id="dontFormat" />';
|
||||
$retval .= '<input' . $dontFormat . ' type="checkbox" '
|
||||
. 'name="dontFormat" id="dontFormat" />';
|
||||
$retval .= '<label for="dontFormat">';
|
||||
$retval .= __('Show unformatted values');
|
||||
$retval .= '</label>';
|
||||
@ -90,7 +93,8 @@ function PMA_getHtmlForFilter($ServerStatusData)
|
||||
*/
|
||||
function PMA_getHtmlForLinkSuggestions($ServerStatusData)
|
||||
{
|
||||
$retval = '<div id="linkSuggestions" class="defaultLinks" style="display:none">';
|
||||
$retval = '<div id="linkSuggestions" class="defaultLinks" '
|
||||
. 'style="display:none">';
|
||||
$retval .= '<p class="notice">' . __('Related links:');
|
||||
foreach ($ServerStatusData->links as $section_name => $section_links) {
|
||||
$retval .= '<span class="status_' . $section_name . '"> ';
|
||||
@ -160,8 +164,10 @@ function PMA_getHtmlForVariablesList($ServerStatusData)
|
||||
'Table_locks_waited' => 0,
|
||||
'Qcache_lowmem_prunes' => 0,
|
||||
|
||||
'Qcache_free_blocks' => isset($ServerStatusData->server_status['Qcache_total_blocks'])
|
||||
? $ServerStatusData->server_status['Qcache_total_blocks'] / 5 : 0,
|
||||
'Qcache_free_blocks' =>
|
||||
isset($ServerStatusData->server_status['Qcache_total_blocks'])
|
||||
? $ServerStatusData->server_status['Qcache_total_blocks'] / 5
|
||||
: 0,
|
||||
'Slow_launch_threads' => 0,
|
||||
|
||||
// depends on Key_read_requests
|
||||
|
||||
Loading…
Reference in New Issue
Block a user