PMA_DBI_free_result() now accepts more than one resource to be freed
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$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>
|
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()
|
* libraries/common.lib.php: unneeded parameter in PMA_safe_db_list()
|
||||||
|
@@ -144,11 +144,17 @@ function PMA_DBI_fetch_row($result) {
|
|||||||
return PMA_mysql_fetch_array($result, MYSQL_NUM);
|
return PMA_mysql_fetch_array($result, MYSQL_NUM);
|
||||||
}
|
}
|
||||||
|
|
||||||
function PMA_DBI_free_result($result) {
|
/**
|
||||||
if (!is_bool($result)) {
|
* Frees the memory associated with the results
|
||||||
return mysql_free_result($result);
|
*
|
||||||
} else {
|
* @param result $result,... one or more mysql result resources
|
||||||
return 0;
|
*/
|
||||||
|
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);
|
return PMA_mysqli_fetch_array($result, MYSQLI_NUM);
|
||||||
}
|
}
|
||||||
|
|
||||||
function PMA_DBI_free_result($result) {
|
/**
|
||||||
if (!is_bool($result)) {
|
* Frees the memory associated with the results
|
||||||
return mysqli_free_result($result);
|
*
|
||||||
} else {
|
* @param result $result,... one or more mysql result resources
|
||||||
return 0;
|
*/
|
||||||
|
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