PMA_DBI_free_result() now accepts more than one resource to be freed
This commit is contained in:
@@ -5,8 +5,12 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2005-12-09 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||
* libraries/dbi:
|
||||
PMA_DBI_free_result() now accepts more than one resource to be freed
|
||||
|
||||
2005-12-08 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* scripts/setup.php: Typos
|
||||
* scripts/setup.php: Typos
|
||||
* libraries/common.lib.php: unneeded parameter in PMA_safe_db_list()
|
||||
|
||||
2005-12-08 Michal Čihař <michal@cihar.com>
|
||||
@@ -25,7 +29,7 @@ $Source$
|
||||
writable permissions, refuse to work with existing config dir.
|
||||
* lang/*, libraries/auth/config.auth.lib.php: Suggest to run setup script
|
||||
if auth with default values fails.
|
||||
* libraries/grab_globals.lib.php: Do not choke on arrays in $_SERVER
|
||||
* libraries/grab_globals.lib.php: Do not choke on arrays in $_SERVER
|
||||
array (bug #1370414).
|
||||
* libraries/sql_query_form.lib.php: Require bookmark code when we use it.
|
||||
* libraries/export/sql.php: Backquote database name (RFE#1376336).
|
||||
|
@@ -144,11 +144,17 @@ function PMA_DBI_fetch_row($result) {
|
||||
return PMA_mysql_fetch_array($result, MYSQL_NUM);
|
||||
}
|
||||
|
||||
function PMA_DBI_free_result($result) {
|
||||
if (!is_bool($result)) {
|
||||
return mysql_free_result($result);
|
||||
} else {
|
||||
return 0;
|
||||
/**
|
||||
* Frees the memory associated with the results
|
||||
*
|
||||
* @param result $result,... one or more mysql result resources
|
||||
*/
|
||||
function PMA_DBI_free_result() {
|
||||
foreach ( func_get_args() as $result ) {
|
||||
if ( is_resource($result)
|
||||
&& get_resource_type($result) === 'mysql result' ) {
|
||||
mysqli_free_result($result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -179,11 +179,17 @@ function PMA_DBI_fetch_row($result) {
|
||||
return PMA_mysqli_fetch_array($result, MYSQLI_NUM);
|
||||
}
|
||||
|
||||
function PMA_DBI_free_result($result) {
|
||||
if (!is_bool($result)) {
|
||||
return mysqli_free_result($result);
|
||||
} else {
|
||||
return 0;
|
||||
/**
|
||||
* Frees the memory associated with the results
|
||||
*
|
||||
* @param result $result,... one or more mysql result resources
|
||||
*/
|
||||
function PMA_DBI_free_result() {
|
||||
foreach ( func_get_args() as $result ) {
|
||||
if ( is_object($result)
|
||||
&& is_a($result, 'mysqli_result') ) {
|
||||
mysqli_free_result($result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user