coding standard: no spaces inside braces
This commit is contained in:
@@ -75,11 +75,11 @@ require './libraries/server_links.inc.php';
|
||||
* Displays the sub-page heading
|
||||
*/
|
||||
echo '<h2>' . "\n"
|
||||
. ( $GLOBALS['cfg']['MainPageIconic']
|
||||
. ($GLOBALS['cfg']['MainPageIconic']
|
||||
? '<img class="icon" src="' . $pmaThemeImage . 's_db.png" width="16"'
|
||||
.' height="16" alt="" />'
|
||||
: '' )
|
||||
. ( $dbstats ? $strDatabasesStats : $strDatabases ) . "\n"
|
||||
: '')
|
||||
. ($dbstats ? $strDatabasesStats : $strDatabases) . "\n"
|
||||
.'</h2>' . "\n";
|
||||
|
||||
/**
|
||||
@@ -224,9 +224,9 @@ if ($databases_count > 0) {
|
||||
. ($sort_by == 'SCHEMA_NAME' ? ' <img class="icon" src="' . $pmaThemeImage . 's_' . $sort_order . '.png" width="11" height="9" alt="' . ($sort_order == 'asc' ? $strAscending : $strDescending) . '" />' . "\n" : '')
|
||||
. ' </a></th>' . "\n";
|
||||
$table_columns = 3;
|
||||
foreach ( $column_order as $stat_name => $stat ) {
|
||||
if ( array_key_exists( $stat_name, $first_database ) ) {
|
||||
if ( $stat['format'] === 'byte' ) {
|
||||
foreach ($column_order as $stat_name => $stat) {
|
||||
if (array_key_exists($stat_name, $first_database)) {
|
||||
if ($stat['format'] === 'byte') {
|
||||
$table_columns += 2;
|
||||
$colspan = ' colspan="2"';
|
||||
} else {
|
||||
@@ -243,7 +243,7 @@ if ($databases_count > 0) {
|
||||
}
|
||||
}
|
||||
if ($is_superuser) {
|
||||
echo ' <th>' . ($cfg['PropertiesIconic'] ? ' ' : $strAction ) . "\n"
|
||||
echo ' <th>' . ($cfg['PropertiesIconic'] ? ' ' : $strAction) . "\n"
|
||||
. ' </th>' . "\n";
|
||||
}
|
||||
echo '</tr>' . "\n"
|
||||
@@ -252,10 +252,10 @@ if ($databases_count > 0) {
|
||||
|
||||
$odd_row = true;
|
||||
foreach ($databases as $current) {
|
||||
echo '<tr class="' . ( $odd_row ? 'odd' : 'even' ) . '">' . "\n";
|
||||
echo '<tr class="' . ($odd_row ? 'odd' : 'even') . '">' . "\n";
|
||||
$odd_row = ! $odd_row;
|
||||
|
||||
if ( $is_superuser || $cfg['AllowUserDropDatabase'] ) {
|
||||
if ($is_superuser || $cfg['AllowUserDropDatabase']) {
|
||||
echo ' <td class="tool">' . "\n";
|
||||
if ($current['SCHEMA_NAME'] != 'mysql' && (PMA_MYSQL_INT_VERSION < 50002 || $current['SCHEMA_NAME'] != 'information_schema')) {
|
||||
echo ' <input type="checkbox" name="selected_dbs[]" title="' . htmlspecialchars($current['SCHEMA_NAME']) . '" value="' . htmlspecialchars($current['SCHEMA_NAME']) . '" ' . (empty($checkall) ? '' : 'checked="checked" ') . '/>' . "\n";
|
||||
@@ -265,33 +265,33 @@ if ($databases_count > 0) {
|
||||
echo ' </td>' . "\n";
|
||||
}
|
||||
echo ' <td class="name">' . "\n"
|
||||
. ' <a onclick="if ( window.parent.openDb(\'' . urlencode($current['SCHEMA_NAME']) . '\') ) return false;" href="index.php?' . $url_query . '&db=' . urlencode($current['SCHEMA_NAME']) . '" title="' . sprintf($strJumpToDB, htmlspecialchars($current['SCHEMA_NAME'])) . '" target="_parent">' . "\n"
|
||||
. ' <a onclick="if (window.parent.openDb(\'' . urlencode($current['SCHEMA_NAME']) . '\')) return false;" href="index.php?' . $url_query . '&db=' . urlencode($current['SCHEMA_NAME']) . '" title="' . sprintf($strJumpToDB, htmlspecialchars($current['SCHEMA_NAME'])) . '" target="_parent">' . "\n"
|
||||
. ' ' . htmlspecialchars($current['SCHEMA_NAME']) . "\n"
|
||||
. ' </a>' . "\n"
|
||||
. ' </td>' . "\n";
|
||||
|
||||
foreach ( $column_order as $stat_name => $stat ) {
|
||||
if ( array_key_exists( $stat_name, $current ) ) {
|
||||
if ( is_numeric( $stat['footer'] ) ) {
|
||||
foreach ($column_order as $stat_name => $stat) {
|
||||
if (array_key_exists($stat_name, $current)) {
|
||||
if (is_numeric($stat['footer'])) {
|
||||
$column_order[$stat_name]['footer'] += $current[$stat_name];
|
||||
}
|
||||
if ( $stat['format'] === 'byte' ) {
|
||||
list( $value, $unit ) = PMA_formatByteDown( $current[$stat_name], 3, 1 );
|
||||
} elseif ( $stat['format'] === 'number' ) {
|
||||
$value = PMA_formatNumber( $current[$stat_name], 0 );
|
||||
if ($stat['format'] === 'byte') {
|
||||
list($value, $unit) = PMA_formatByteDown($current[$stat_name], 3, 1);
|
||||
} elseif ($stat['format'] === 'number') {
|
||||
$value = PMA_formatNumber($current[$stat_name], 0);
|
||||
} else {
|
||||
$value = htmlentities( $current[$stat_name], 0 );
|
||||
$value = htmlentities($current[$stat_name], 0);
|
||||
}
|
||||
echo ' <td class="value">';
|
||||
if ( isset( $stat['description_function'] ) ) {
|
||||
echo '<dfn title="' . $stat['description_function']( $current[$stat_name] ) . '">';
|
||||
if (isset($stat['description_function'])) {
|
||||
echo '<dfn title="' . $stat['description_function']($current[$stat_name]) . '">';
|
||||
}
|
||||
echo $value;
|
||||
if ( isset( $stat['description_function'] ) ) {
|
||||
if (isset($stat['description_function'])) {
|
||||
echo '</dfn>';
|
||||
}
|
||||
echo '</td>' . "\n";
|
||||
if ( $stat['format'] === 'byte' ) {
|
||||
if ($stat['format'] === 'byte') {
|
||||
echo ' <td class="unit">' . $unit . '</td>' . "\n";
|
||||
}
|
||||
}
|
||||
@@ -300,42 +300,42 @@ if ($databases_count > 0) {
|
||||
if ($is_superuser) {
|
||||
echo ' <td class="tool">' . "\n"
|
||||
. ' <a onclick="window.parent.setDb(\'' . urlencode($current['SCHEMA_NAME']) . '\');" href="./server_privileges.php?' . $url_query . '&checkprivs=' . urlencode($current['SCHEMA_NAME']) . '" title="' . sprintf($strCheckPrivsLong, htmlspecialchars($current['SCHEMA_NAME'])) . '">'. "\n"
|
||||
. ' ' .($cfg['PropertiesIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 's_rights.png" width="16" height="16" alt=" ' .$strCheckPrivs . '" /> ' : $strCheckPrivs ). "\n"
|
||||
. ' ' .($cfg['PropertiesIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 's_rights.png" width="16" height="16" alt=" ' .$strCheckPrivs . '" /> ' : $strCheckPrivs). "\n"
|
||||
. ' </a></td>' . "\n";
|
||||
}
|
||||
echo '</tr>' . "\n";
|
||||
} // end foreach ( $databases as $key => $current )
|
||||
} // end foreach ($databases as $key => $current)
|
||||
unset($current, $odd_row);
|
||||
|
||||
echo '<tr>' . "\n";
|
||||
if ( $is_superuser || $cfg['AllowUserDropDatabase'] ) {
|
||||
if ($is_superuser || $cfg['AllowUserDropDatabase']) {
|
||||
echo ' <th> </th>' . "\n";
|
||||
}
|
||||
echo ' <th>' . $strTotalUC . ': ' . $databases_count . '</th>' . "\n";
|
||||
foreach ( $column_order as $stat_name => $stat ) {
|
||||
if ( array_key_exists( $stat_name, $first_database ) ) {
|
||||
if ( $stat['format'] === 'byte' ) {
|
||||
list( $value, $unit ) = PMA_formatByteDown( $stat['footer'], 3, 1 );
|
||||
} elseif ( $stat['format'] === 'number' ) {
|
||||
$value = PMA_formatNumber( $stat['footer'], 0 );
|
||||
foreach ($column_order as $stat_name => $stat) {
|
||||
if (array_key_exists($stat_name, $first_database)) {
|
||||
if ($stat['format'] === 'byte') {
|
||||
list($value, $unit) = PMA_formatByteDown($stat['footer'], 3, 1);
|
||||
} elseif ($stat['format'] === 'number') {
|
||||
$value = PMA_formatNumber($stat['footer'], 0);
|
||||
} else {
|
||||
$value = htmlentities( $stat['footer'], 0 );
|
||||
$value = htmlentities($stat['footer'], 0);
|
||||
}
|
||||
echo ' <th class="value">';
|
||||
if ( isset( $stat['description_function'] ) ) {
|
||||
echo '<dfn title="' . $stat['description_function']( $stat['footer'] ) . '">';
|
||||
if (isset($stat['description_function'])) {
|
||||
echo '<dfn title="' . $stat['description_function']($stat['footer']) . '">';
|
||||
}
|
||||
echo $value;
|
||||
if ( isset( $stat['description_function'] ) ) {
|
||||
if (isset($stat['description_function'])) {
|
||||
echo '</dfn>';
|
||||
}
|
||||
echo '</th>' . "\n";
|
||||
if ( $stat['format'] === 'byte' ) {
|
||||
if ($stat['format'] === 'byte') {
|
||||
echo ' <th class="unit">' . $unit . '</th>' . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( $is_superuser ) {
|
||||
if ($is_superuser) {
|
||||
echo ' <th> </th>' . "\n";
|
||||
}
|
||||
echo '</tr>' . "\n";
|
||||
@@ -346,16 +346,16 @@ if ($databases_count > 0) {
|
||||
if ($is_superuser || $cfg['AllowUserDropDatabase']) {
|
||||
$common_url_query = PMA_generate_common_url() . '&sort_by=' . $sort_by . '&sort_order=' . $sort_order . '&dbstats=' . $dbstats;
|
||||
echo '<img class="selectallarrow" src="' . $pmaThemeImage . 'arrow_' . $text_dir . '.png" width="38" height="22" alt="' . $strWithChecked . '" />' . "\n"
|
||||
. '<a href="./server_databases.php?' . $common_url_query . '&checkall=1" onclick="if ( markAllRows(\'tabledatabases\') ) return false;">' . "\n"
|
||||
. '<a href="./server_databases.php?' . $common_url_query . '&checkall=1" onclick="if (markAllRows(\'tabledatabases\')) return false;">' . "\n"
|
||||
. ' ' . $strCheckAll . '</a> / ' . "\n"
|
||||
. '<a href="./server_databases.php?' . $common_url_query . '" onclick="if ( unMarkAllRows(\'tabledatabases\') ) return false;">' . "\n"
|
||||
. '<a href="./server_databases.php?' . $common_url_query . '" onclick="if (unMarkAllRows(\'tabledatabases\')) return false;">' . "\n"
|
||||
. ' ' . $strUncheckAll . '</a>' . "\n"
|
||||
. '<i>' . $strWithChecked . '</i>' . "\n";
|
||||
PMA_buttonOrImage( 'drop_selected_dbs', 'mult_submit', 'drop_selected_dbs', $strDrop, 'b_deltbl.png' );
|
||||
PMA_buttonOrImage('drop_selected_dbs', 'mult_submit', 'drop_selected_dbs', $strDrop, 'b_deltbl.png');
|
||||
}
|
||||
|
||||
echo '<ul><li id="li_switch_dbstats"><strong>' . "\n";
|
||||
if ( empty( $dbstats ) ) {
|
||||
if (empty($dbstats)) {
|
||||
echo ' <a href="./server_databases.php?' . $url_query . '&dbstats=1"'
|
||||
.' title="' . $strDatabasesStatsEnable . '">' . "\n"
|
||||
.' ' . $strDatabasesStatsEnable;
|
||||
|
Reference in New Issue
Block a user