From 3412621f5b05810bc51bec4f842e2c19fd027f8d Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Thu, 20 Nov 2003 21:50:37 +0000 Subject: [PATCH] Removed some php 3 / MySQL 3.21 compatibility code. --- ChangeLog | 4 ++++ server_databases.php | 10 +++++----- server_processlist.php | 2 +- server_status.php | 4 ++-- server_variables.php | 4 ++-- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed922997e..1aa2ce01b 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-11-20 Alexander M. Turek + * server_databases.php, server_processlist.php, server_status.php, + server_variables.php: Removed some php 3 / MySQL 3.21 compatibility code. + 2003-11-20 Michal Cihar * read_dump.php: Show message about failing upload in all cases, removed some PHP compatibility code. diff --git a/server_databases.php b/server_databases.php index 5847a8512..a643fd399 100644 --- a/server_databases.php +++ b/server_databases.php @@ -100,7 +100,7 @@ echo '

' . "\n" /** * Checks if the user is allowed to do what he tries to... */ -if (!empty($dbstats) && (!$is_superuser || PMA_MYSQL_INT_VERSION < 32303)) { +if (!empty($dbstats) && !$is_superuser) { echo $strNoPrivileges . "\n"; include('./footer.inc.php'); exit; @@ -221,15 +221,15 @@ if (count($statistics) > 0) { 'idx_sz' => 0, 'tot_sz' => 0 ); - while (list(, $current) = each($statistics)) { + foreach ($statistics as $current) { list($data_size, $data_unit) = PMA_formatByteDown($current['data_sz'], 3, 1); list($idx_size, $idx_unit) = PMA_formatByteDown($current['idx_sz'], 3, 1); list($tot_size, $tot_unit) = PMA_formatByteDown($current['tot_sz'], 3, 1); $total_calc['db_cnt']++; $total_calc['tbl_cnt'] += $current['tbl_cnt']; $total_calc['data_sz'] += $current['data_sz']; - $total_calc['idx_sz'] += $current['idx_sz']; - $total_calc['tot_sz'] += $current['tot_sz']; + $total_calc['idx_sz'] += $current['idx_sz']; + $total_calc['tot_sz'] += $current['tot_sz']; echo ' ' . "\n"; if ($is_superuser || $cfg['AllowUserDropDatabase']) { echo ' ' . "\n" @@ -336,7 +336,7 @@ if (count($statistics) > 0) { if ($is_superuser || $cfg['AllowUserDropDatabase']) { echo '