[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_5_0BETA1-18-g90d81d9
Dieter Adriaenssens
ruleant at users.sourceforge.net
Thu Jan 26 14:42:26 CET 2012
The branch, master has been updated
via 90d81d90c79b1400c6fb6b0a9ce22b5616653edd (commit)
via 4a5e87186b4f0324f89f5a2ed3d8990044ec32db (commit)
from d7082cd85659dd8f7279fee9e83c507eafcef2ce (commit)
- Log -----------------------------------------------------------------
commit 90d81d90c79b1400c6fb6b0a9ce22b5616653edd
Merge: 4a5e871 d7082cd
Author: Dieter Adriaenssens <ruleant at users.sourceforge.net>
Date: Thu Jan 26 14:41:13 2012 +0100
Merge branch 'master' of ssh://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
commit 4a5e87186b4f0324f89f5a2ed3d8990044ec32db
Author: Dieter Adriaenssens <ruleant at users.sourceforge.net>
Date: Thu Jan 26 14:40:39 2012 +0100
fix coding style
-----------------------------------------------------------------------
Summary of changes:
server_status.php | 23 ++++++++++------
tbl_operations.php | 72 ++++++++++++++++++++++++++++++++++-----------------
2 files changed, 62 insertions(+), 33 deletions(-)
diff --git a/server_status.php b/server_status.php
index 3a891ba..24dcb9b 100644
--- a/server_status.php
+++ b/server_status.php
@@ -61,7 +61,8 @@ if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) {
$queries = PMA_DBI_fetch_result(
"SHOW GLOBAL STATUS
WHERE (Variable_name LIKE 'Com_%' OR Variable_name = 'Questions')
- AND Value > 0", 0, 1);
+ AND Value > 0", 0, 1
+ );
}
cleanDeprecated($queries);
// admin commands are not queries
@@ -83,7 +84,8 @@ if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) {
$traffic = PMA_DBI_fetch_result(
"SHOW GLOBAL STATUS
WHERE Variable_name = 'Bytes_received'
- OR Variable_name = 'Bytes_sent'", 0, 1);
+ OR Variable_name = 'Bytes_sent'", 0, 1
+ );
$ret = array(
'x' => microtime(true) * 1000,
@@ -943,12 +945,12 @@ function printQueryStatistics()
echo '<br />';
echo 'ø ' . __('per minute') . ': ';
- echo PMA_formatNumber( $total_queries * 60 / $server_status['Uptime'], 0);
+ echo PMA_formatNumber($total_queries * 60 / $server_status['Uptime'], 0);
echo '<br />';
if ($total_queries / $server_status['Uptime'] >= 1) {
echo 'ø ' . __('per second') . ': ';
- echo PMA_formatNumber( $total_queries / $server_status['Uptime'], 0);
+ echo PMA_formatNumber($total_queries / $server_status['Uptime'], 0);
}
?>
</span>
@@ -1038,22 +1040,25 @@ function printServerTraffic()
* starttime calculation
*/
$start_time = PMA_DBI_fetch_value(
- 'SELECT UNIX_TIMESTAMP() - ' . $server_status['Uptime']);
+ 'SELECT UNIX_TIMESTAMP() - ' . $server_status['Uptime']
+ );
?>
<h3><?php
echo sprintf(
__('Network traffic since startup: %s'),
- implode(' ', PMA_formatByteDown( $server_status['Bytes_received'] + $server_status['Bytes_sent'], 3, 1))
- );
+ implode(' ', PMA_formatByteDown($server_status['Bytes_received'] + $server_status['Bytes_sent'], 3, 1))
+ );
?>
</h3>
<p>
<?php
- echo sprintf(__('This MySQL server has been running for %1$s. It started up on %2$s.'),
+ echo sprintf(
+ __('This MySQL server has been running for %1$s. It started up on %2$s.'),
PMA_timespanFormat($server_status['Uptime']),
- PMA_localisedDate($start_time)) . "\n";
+ PMA_localisedDate($start_time)
+ ) . "\n";
?>
</p>
diff --git a/tbl_operations.php b/tbl_operations.php
index a09528b..da2291e 100644
--- a/tbl_operations.php
+++ b/tbl_operations.php
@@ -380,8 +380,10 @@ if (strstr($show_comment, '; InnoDB free') === false) {
<!-- Table character set -->
<tr><td><?php echo __('Collation'); ?></td>
- <td><?php echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION,
- 'tbl_collation', null, $tbl_collation, false, 3); ?>
+ <td><?php echo PMA_generateCharsetDropdownBox(
+ PMA_CSDROPDOWN_COLLATION,
+ 'tbl_collation', null, $tbl_collation, false, 3
+ ); ?>
</td>
</tr>
<?php
@@ -598,11 +600,13 @@ if (isset($possible_row_formats[$tbl_type])) {
// Note: BERKELEY (BDB) is no longer supported, starting with MySQL 5.1
if ($is_myisam_or_aria || $is_innodb || $is_berkeleydb) {
if ($is_myisam_or_aria || $is_innodb) {
- $this_url_params = array_merge($url_params,
+ $this_url_params = array_merge(
+ $url_params,
array(
'sql_query' => 'CHECK TABLE ' . PMA_backquote($GLOBALS['table']),
'table_maintenance' => 'Go',
- ));
+ )
+ );
?>
<li><a class='maintain_action' href="tbl_operations.php<?php echo PMA_generate_common_url($this_url_params); ?>">
<?php echo __('Check table'); ?></a>
@@ -611,8 +615,10 @@ if ($is_myisam_or_aria || $is_innodb || $is_berkeleydb) {
<?php
}
if ($is_innodb) {
- $this_url_params = array_merge($url_params,
- array('sql_query' => 'ALTER TABLE ' . PMA_backquote($GLOBALS['table']) . ' ENGINE = InnoDB'));
+ $this_url_params = array_merge(
+ $url_params,
+ array('sql_query' => 'ALTER TABLE ' . PMA_backquote($GLOBALS['table']) . ' ENGINE = InnoDB')
+ );
?>
<li><a class='maintain_action' href="sql.php<?php echo PMA_generate_common_url($this_url_params); ?>">
<?php echo __('Defragment table'); ?></a>
@@ -621,11 +627,13 @@ if ($is_myisam_or_aria || $is_innodb || $is_berkeleydb) {
<?php
}
if ($is_myisam_or_aria || $is_berkeleydb) {
- $this_url_params = array_merge($url_params,
+ $this_url_params = array_merge(
+ $url_params,
array(
'sql_query' => 'ANALYZE TABLE ' . PMA_backquote($GLOBALS['table']),
'table_maintenance' => 'Go',
- ));
+ )
+ );
?>
<li><a class='maintain_action' href="tbl_operations.php<?php echo PMA_generate_common_url($this_url_params); ?>">
<?php echo __('Analyze table'); ?></a>
@@ -634,11 +642,13 @@ if ($is_myisam_or_aria || $is_innodb || $is_berkeleydb) {
<?php
}
if ($is_myisam_or_aria && !PMA_DRIZZLE) {
- $this_url_params = array_merge($url_params,
+ $this_url_params = array_merge(
+ $url_params,
array(
'sql_query' => 'REPAIR TABLE ' . PMA_backquote($GLOBALS['table']),
'table_maintenance' => 'Go',
- ));
+ )
+ );
?>
<li><a class='maintain_action' href="tbl_operations.php<?php echo PMA_generate_common_url($this_url_params); ?>">
<?php echo __('Repair table'); ?></a>
@@ -647,11 +657,13 @@ if ($is_myisam_or_aria || $is_innodb || $is_berkeleydb) {
<?php
}
if (($is_myisam_or_aria || $is_innodb || $is_berkeleydb) && !PMA_DRIZZLE) {
- $this_url_params = array_merge($url_params,
+ $this_url_params = array_merge(
+ $url_params,
array(
'sql_query' => 'OPTIMIZE TABLE ' . PMA_backquote($GLOBALS['table']),
'table_maintenance' => 'Go',
- ));
+ )
+ );
?>
<li><a class='maintain_action' href="tbl_operations.php<?php echo PMA_generate_common_url($this_url_params); ?>">
<?php echo __('Optimize table'); ?></a>
@@ -660,13 +672,17 @@ if ($is_myisam_or_aria || $is_innodb || $is_berkeleydb) {
<?php
}
} // end MYISAM or BERKELEYDB case
-$this_url_params = array_merge($url_params,
+$this_url_params = array_merge(
+ $url_params,
array(
'sql_query' => 'FLUSH TABLE ' . PMA_backquote($GLOBALS['table']),
- 'message_to_show' => sprintf(__('Table %s has been flushed'),
- htmlspecialchars($GLOBALS['table'])),
+ 'message_to_show' => sprintf(
+ __('Table %s has been flushed'),
+ htmlspecialchars($GLOBALS['table'])
+ ),
'reload' => 1,
- ));
+ )
+);
?>
<li><a class='maintain_action' href="sql.php<?php echo PMA_generate_common_url($this_url_params); ?>">
<?php echo __('Flush the table (FLUSH)'); ?></a>
@@ -684,13 +700,15 @@ $this_url_params = array_merge($url_params,
<?php
if (! $tbl_is_view && ! (isset($db_is_information_schema) && $db_is_information_schema)) {
$this_sql_query = 'TRUNCATE TABLE ' . PMA_backquote($GLOBALS['table']);
- $this_url_params = array_merge($url_params,
+ $this_url_params = array_merge(
+ $url_params,
array(
'sql_query' => $this_sql_query,
'goto' => 'tbl_structure.php',
'reload' => '1',
'message_to_show' => sprintf(__('Table %s has been emptied'), htmlspecialchars($table)),
- ));
+ )
+ );
?>
<li><a href="sql.php<?php echo PMA_generate_common_url($this_url_params); ?>" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? 'id="truncate_tbl_anchor" class="ajax"' : ''); ?>>
<?php echo __('Empty the table (TRUNCATE)'); ?></a>
@@ -700,7 +718,8 @@ if (! $tbl_is_view && ! (isset($db_is_information_schema) && $db_is_information_
}
if (! (isset($db_is_information_schema) && $db_is_information_schema)) {
$this_sql_query = 'DROP TABLE ' . PMA_backquote($GLOBALS['table']);
- $this_url_params = array_merge($url_params,
+ $this_url_params = array_merge(
+ $url_params,
array(
'sql_query' => $this_sql_query,
'goto' => 'db_operations.php',
@@ -710,7 +729,8 @@ if (! (isset($db_is_information_schema) && $db_is_information_schema)) {
// table name is needed to avoid running
// PMA_relationsCleanupDatabase() on the whole db later
'table' => $GLOBALS['table'],
- ));
+ )
+ );
?>
<li><a href="sql.php<?php echo PMA_generate_common_url($this_url_params); ?>" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? 'id="drop_tbl_anchor"' : ''); ?>>
<?php echo __('Delete the table (DROP)'); ?></a>
@@ -756,10 +776,12 @@ if (! (isset($db_is_information_schema) && $db_is_information_schema)) {
echo PMA_showMySQLDocu('partitioning_maintenance', 'partitioning_maintenance');
// I'm not sure of the best way to display that; this link does
// not depend on the Go button
- $this_url_params = array_merge($url_params,
+ $this_url_params = array_merge(
+ $url_params,
array(
'sql_query' => 'ALTER TABLE ' . PMA_backquote($GLOBALS['table']) . ' REMOVE PARTITIONING'
- ));
+ )
+ );
?>
<br /><a href="sql.php<?php echo PMA_generate_common_url($this_url_params); ?>">
<?php echo __('Remove partitioning'); ?></a>
@@ -810,8 +832,10 @@ if ($cfgRelation['relwork'] && ! $is_innodb) {
. ' IS NULL AND '
. PMA_backquote($GLOBALS['table']) . '.' . PMA_backquote($master)
. ' IS NOT NULL';
- $this_url_params = array_merge($url_params,
- array('sql_query' => $join_query));
+ $this_url_params = array_merge(
+ $url_params,
+ array('sql_query' => $join_query)
+ );
echo ' <li>'
. '<a href="sql.php'
. PMA_generate_common_url($this_url_params)
hooks/post-receive
--
phpMyAdmin
More information about the Git
mailing list