|
From: Paul S. O. <ps...@us...> - 2001-11-03 21:56:20
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv21567/admin
Modified Files:
index.php
Log Message:
Hopefully killed bug #472269 dead, a touch of Domestos power
Index: index.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/index.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** index.php 2001/10/14 15:46:53 1.21
--- index.php 2001/11/03 21:56:17 1.22
***************
*** 196,206 ****
// in phpMyAdmin 2.2.0
//
! if(SQL_LAYER == 'mysql')
{
$sql = "SELECT VERSION() AS mysql_version";
if($result = $db->sql_query($sql))
{
! list($version) = $db->sql_fetchrow($result);
! if( ereg("^3\.23", $version) )
{
$sql = "SHOW TABLE STATUS
--- 196,208 ----
// in phpMyAdmin 2.2.0
//
! if( preg_match("/^mysql/", SQL_LAYER) )
{
$sql = "SELECT VERSION() AS mysql_version";
if($result = $db->sql_query($sql))
{
! $row = $db->sql_fetchrow($result);
! echo $version = $row['mysql_version'];
!
! if( preg_match("/^(3\.23|4\.)/", $version) )
{
$sql = "SHOW TABLE STATUS
***************
*** 215,229 ****
for($i = 0; $i < count($tabledata_ary); $i++)
{
! if($tabledata_ary[$i]['Type'] != "MRG_MyISAM" && strstr($tabledata_ary[$i]['Name'], $table_prefix) )
{
! $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length'];
}
}
! if($dbsize >= 1048576)
{
$dbsize = sprintf("%.2f MB", ( $dbsize / 1048576 ));
}
! else if($dbsize >= 1024)
{
$dbsize = sprintf("%.2f KB", ( $dbsize / 1024 ));
--- 217,241 ----
for($i = 0; $i < count($tabledata_ary); $i++)
{
! if( $tabledata_ary[$i]['Type'] != "MRG_MyISAM" )
{
! if( $table_prefix != "" )
! {
! if( strstr($tabledata_ary[$i]['Name'], $table_prefix) )
! {
! $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length'];
! }
! }
! else
! {
! $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length'];
! }
}
}
! if( $dbsize >= 1048576 )
{
$dbsize = sprintf("%.2f MB", ( $dbsize / 1048576 ));
}
! else if( $dbsize >= 1024 )
{
$dbsize = sprintf("%.2f KB", ( $dbsize / 1024 ));
|