rename a function borrowed from Moodle to avoid double definition when PMA is called by Moodle

This commit is contained in:
Marc Delisle
2006-09-15 11:43:05 +00:00
parent 611f58ae54
commit c78c200692
3 changed files with 12 additions and 4 deletions

View File

@@ -5,6 +5,11 @@ phpMyAdmin - ChangeLog
$Id$ $Id$
$Source$ $Source$
2006-09-15 Marc Delisle <lem9@users.sourceforge.net>
* libraries/common.lib.php libraries/Config.class.php:
rename a function borrowed from Moodle to avoid double definition
when PMA is called by Moodle
2006-09-14 Michal Čihař <michal@cihar.com> 2006-09-14 Michal Čihař <michal@cihar.com>
* db_details_structure.php: Fix table footer when MySQL does not support * db_details_structure.php: Fix table footer when MySQL does not support
collations (bug #1554885, patch #1557269, thanks to Isaac Bennetch - collations (bug #1554885, patch #1557269, thanks to Isaac Bennetch -

View File

@@ -731,9 +731,9 @@ class PMA_Config
if ($postsize = ini_get('post_max_size')) { if ($postsize = ini_get('post_max_size')) {
$this->set('max_upload_size', $this->set('max_upload_size',
min(get_real_size($filesize), get_real_size($postsize))); min(PMA_get_real_size($filesize), PMA_get_real_size($postsize)));
} else { } else {
$this->set('max_upload_size', get_real_size($filesize)); $this->set('max_upload_size', PMA_get_real_size($filesize));
} }
} }

View File

@@ -357,11 +357,14 @@ function PMA_safe_db_list($only_db_check, $controllink, $dblist_cnt, $userlink,
/** /**
* Converts numbers like 10M into bytes * Converts numbers like 10M into bytes
* Used with permission from Moodle (http://moodle.org) by Martin Dougiamas
* (renamed with PMA prefix to avoid double definition when embedded
* in Moodle)
* *
* @param string $size * @param string $size
* @return integer $size * @return integer $size
*/ */
function get_real_size($size = 0) function PMA_get_real_size($size = 0)
{ {
if (!$size) { if (!$size) {
return 0; return 0;
@@ -383,7 +386,7 @@ function get_real_size($size = 0)
} }
} }
return $size; return $size;
} // end function get_real_size() } // end function PMA_get_real_size()
/** /**
* loads php module * loads php module