[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-12147-gc326cfe
Piotr Przybylski
crackpl at users.sourceforge.net
Thu Jul 28 13:32:56 CEST 2011
The branch, master has been updated
via c326cfeec420ca94296b7708df52fd4cab0fc450 (commit)
from e58eea5deece01151db13083ad3b0b9e33455570 (commit)
- Log -----------------------------------------------------------------
commit c326cfeec420ca94296b7708df52fd4cab0fc450
Author: Piotr Przybylski <piotrprz at gmail.com>
Date: Thu Jul 28 13:32:38 2011 +0200
Comments
-----------------------------------------------------------------------
Summary of changes:
libraries/dbi/mysql.dbi.lib.php | 80 ++++++++++++++++++++++++++------------
libraries/dbi/mysqli.dbi.lib.php | 72 +++++++++++++++++----------------
2 files changed, 92 insertions(+), 60 deletions(-)
diff --git a/libraries/dbi/mysql.dbi.lib.php b/libraries/dbi/mysql.dbi.lib.php
index 64ab026..0d6c697 100644
--- a/libraries/dbi/mysql.dbi.lib.php
+++ b/libraries/dbi/mysql.dbi.lib.php
@@ -27,7 +27,7 @@ if (! defined('PMA_MYSQL_CLIENT_API')) {
* @param string $user
* @param string $password
* @param int $client_flags
- * @param boolean $persistent
+ * @param bool $persistent
* @return mixed false on error or a mysql connection resource on success
*/
function PMA_DBI_real_connect($server, $user, $password, $client_flags, $persistent = false)
@@ -56,9 +56,9 @@ function PMA_DBI_real_connect($server, $user, $password, $client_flags, $persist
*
* @param string $user mysql user name
* @param string $password mysql user password
- * @param boolean $is_controluser
+ * @param bool $is_controluser
* @param array $server host/port/socket/persistent
- * @param boolean $auxiliary_connection (when true, don't go back to login if connection fails)
+ * @param bool $auxiliary_connection (when true, don't go back to login if connection fails)
* @return mixed false on error or a mysqli object on success
*/
function PMA_DBI_connect($user, $password, $is_controluser = false, $server = null, $auxiliary_connection = false)
@@ -138,7 +138,7 @@ function PMA_DBI_connect($user, $password, $is_controluser = false, $server = nu
*
* @param string $dbname name of db to select
* @param resource $link mysql link resource
- * @return boolean
+ * @return bool
*/
function PMA_DBI_select_db($dbname, $link = null)
{
@@ -155,9 +155,9 @@ function PMA_DBI_select_db($dbname, $link = null)
/**
* runs a query and returns the result
*
- * @param string $query query to run
- * @param resource $link mysql link resource
- * @param integer $options
+ * @param string $query query to run
+ * @param resource $link mysql link resource
+ * @param int $options
* @return mixed
*/
function PMA_DBI_real_query($query, $link, $options)
@@ -203,12 +203,12 @@ function PMA_DBI_fetch_row($result)
return mysql_fetch_array($result, MYSQL_NUM);
}
-/*
+/**
* Adjusts the result pointer to an arbitrary row in the result
*
* @param $result
* @param $offset
- * @return boolean true on success, false on failure
+ * @return bool true on success, false on failure
*/
function PMA_DBI_data_seek($result, $offset)
{
@@ -230,7 +230,7 @@ function PMA_DBI_free_result($result)
/**
* Check if there are any more query results from a multi query
*
- * @return boolean false
+ * @return bool false
*/
function PMA_DBI_more_results() {
// N.B.: PHP's 'mysql' extension does not support
@@ -243,7 +243,7 @@ function PMA_DBI_more_results() {
/**
* Prepare next result from multi_query
*
- * @return boolean false
+ * @return boo false
*/
function PMA_DBI_next_result() {
// N.B.: PHP's 'mysql' extension does not support
@@ -255,7 +255,8 @@ function PMA_DBI_next_result() {
/**
* Returns a string representing the type of connection used
- * @param resource $link mysql link
+ *
+ * @param resource $link mysql link
* @return string type of connection used
*/
function PMA_DBI_get_host_info($link = null)
@@ -272,8 +273,9 @@ function PMA_DBI_get_host_info($link = null)
/**
* Returns the version of the MySQL protocol used
- * @param resource $link mysql link
- * @return integer version of the MySQL protocol used
+ *
+ * @param resource $link mysql link
+ * @return int version of the MySQL protocol used
*/
function PMA_DBI_get_proto_info($link = null)
{
@@ -289,6 +291,7 @@ function PMA_DBI_get_proto_info($link = null)
/**
* returns a string that represents the client library version
+ *
* @return string MySQL client library version
*/
function PMA_DBI_get_client_info()
@@ -299,8 +302,8 @@ function PMA_DBI_get_client_info()
/**
* returns last error message or false if no errors occured
*
- * @param resource $link mysql link
- * @return string|boolean $error or false
+ * @param resource $link mysql link
+ * @return string|bool $error or false
*/
function PMA_DBI_getError($link = null)
{
@@ -361,8 +364,8 @@ function PMA_DBI_getError($link = null)
/**
* returns the number of rows returned by last query
*
- * @param resource $result
- * @return string|ineteger
+ * @param resource $result
+ * @return string|int
*/
function PMA_DBI_num_rows($result)
{
@@ -376,8 +379,8 @@ function PMA_DBI_num_rows($result)
/**
* returns last inserted auto_increment id for given $link or $GLOBALS['userlink']
*
- * @param resource $link the mysql object
- * @return string|ineteger
+ * @param resource $link the mysql object
+ * @return string|int
*/
function PMA_DBI_insert_id($link = null)
{
@@ -399,9 +402,9 @@ function PMA_DBI_insert_id($link = null)
/**
* returns the number of rows affected by last query
*
- * @param resource $link the mysql object
- * @param boolean $get_from_cache
- * @return string|integer
+ * @param resource $link the mysql object
+ * @param bool $get_from_cache
+ * @return string|int
*/
function PMA_DBI_affected_rows($link = null, $get_from_cache = true)
{
@@ -423,8 +426,8 @@ function PMA_DBI_affected_rows($link = null, $get_from_cache = true)
/**
* returns metainfo for fields in $result
*
- * @todo add missing keys like in from mysqli_query (orgname, orgtable, flags, decimals)
- * @param resource $result
+ * @todo add missing keys like in mysqli_query (orgname, orgtable, flags, decimals)
+ * @param resource $result
* @return array meta info for fields in $result
*/
function PMA_DBI_get_fields_meta($result)
@@ -437,21 +440,48 @@ function PMA_DBI_get_fields_meta($result)
return $fields;
}
+/**
+ * return number of fields in given $result
+ *
+ * @param resource $result
+ * @return int field count
+ */
function PMA_DBI_num_fields($result)
{
return mysql_num_fields($result);
}
+/**
+ * returns the length of the given field $i in $result
+ *
+ * @param resource $result
+ * @param int $i field
+ * @return int length of field
+ */
function PMA_DBI_field_len($result, $i)
{
return mysql_field_len($result, $i);
}
+/**
+ * returns name of $i. field in $result
+ *
+ * @param resource $result
+ * @param int $i field
+ * @return string name of $i. field in $result
+ */
function PMA_DBI_field_name($result, $i)
{
return mysql_field_name($result, $i);
}
+/**
+ * returns concatenated string of human readable field flags
+ *
+ * @param resource $result
+ * @param int $i field
+ * @return string field flags
+ */
function PMA_DBI_field_flags($result, $i)
{
return mysql_field_flags($result, $i);
diff --git a/libraries/dbi/mysqli.dbi.lib.php b/libraries/dbi/mysqli.dbi.lib.php
index 535b825..e3f017b 100644
--- a/libraries/dbi/mysqli.dbi.lib.php
+++ b/libraries/dbi/mysqli.dbi.lib.php
@@ -54,8 +54,8 @@ if (! defined('MYSQLI_TYPE_BIT')) {
* @param int $server_port
* @param string $server_socket
* @param int $client_flags
- * @param boolean $persistent
- * @return boolean
+ * @param bool $persistent
+ * @return bool
*/
function PMA_DBI_real_connect($link, $host, $user, $password, $dbname, $server_port, $server_socket, $client_flags = null, $persistent = false)
{
@@ -76,9 +76,9 @@ function PMA_DBI_real_connect($link, $host, $user, $password, $dbname, $server_p
*
* @param string $user mysql user name
* @param string $password mysql user password
- * @param boolean $is_controluser
+ * @param bool $is_controluser
* @param array $server host/port/socket
- * @param boolean $auxiliary_connection (when true, don't go back to login if connection fails)
+ * @param bool $auxiliary_connection (when true, don't go back to login if connection fails)
* @return mixed false on error or a mysqli object on success
*/
function PMA_DBI_connect($user, $password, $is_controluser = false, $server = null, $auxiliary_connection = false)
@@ -175,10 +175,10 @@ function PMA_DBI_select_db($dbname, $link = null)
/**
* runs a query and returns the result
*
- * @param string $query query to execute
- * @param mysqli $link mysqli object
- * @param integer $options
- * @return mysqli_result|boolean
+ * @param string $query query to execute
+ * @param mysqli $link mysqli object
+ * @param int $options
+ * @return mysqli_result|bool
*/
function PMA_DBI_real_query($query, $link, $options)
{
@@ -226,12 +226,12 @@ function PMA_DBI_fetch_row($result)
return mysqli_fetch_array($result, MYSQLI_NUM);
}
-/*
+/**
* Adjusts the result pointer to an arbitrary row in the result
*
* @param $result
* @param $offset
- * @return boolean true on success, false on failure
+ * @return bool true on success, false on failure
*/
function PMA_DBI_data_seek($result, $offset)
{
@@ -253,8 +253,8 @@ function PMA_DBI_free_result($result)
/**
* Check if there are any more query results from a multi query
*
- * @param mysqli $link the mysqli object
- * @return boolean true or false
+ * @param mysqli $link the mysqli object
+ * @return bool true or false
*/
function PMA_DBI_more_results($link = null) {
if (empty($link)) {
@@ -270,8 +270,8 @@ function PMA_DBI_more_results($link = null) {
/**
* Prepare next result from multi_query
*
- * @param mysqli $link the mysqli object
- * @return boolean true or false
+ * @param mysqli $link the mysqli object
+ * @return bool true or false
*/
function PMA_DBI_next_result($link = null) {
if (empty($link)) {
@@ -286,7 +286,8 @@ function PMA_DBI_next_result($link = null) {
/**
* Returns a string representing the type of connection used
- * @param resource $link mysql link
+ *
+ * @param resource $link mysql link
* @return string type of connection used
*/
function PMA_DBI_get_host_info($link = null)
@@ -303,7 +304,8 @@ function PMA_DBI_get_host_info($link = null)
/**
* Returns the version of the MySQL protocol used
- * @param resource $link mysql link
+ *
+ * @param resource $link mysql link
* @return integer version of the MySQL protocol used
*/
function PMA_DBI_get_proto_info($link = null)
@@ -320,6 +322,7 @@ function PMA_DBI_get_proto_info($link = null)
/**
* returns a string that represents the client library version
+ *
* @return string MySQL client library version
*/
function PMA_DBI_get_client_info()
@@ -330,8 +333,8 @@ function PMA_DBI_get_client_info()
/**
* returns last error message or false if no errors occured
*
- * @param resource $link mysql link
- * @return string|boolean $error or false
+ * @param resource $link mysql link
+ * @return string|bool $error or false
*/
function PMA_DBI_getError($link = null)
{
@@ -381,8 +384,8 @@ function PMA_DBI_getError($link = null)
/**
* returns the number of rows returned by last query
*
- * @param mysqli_result $result
- * @return string|ineteger
+ * @param mysqli_result $result
+ * @return string|int
*/
function PMA_DBI_num_rows($result)
{
@@ -397,8 +400,8 @@ function PMA_DBI_num_rows($result)
/**
* returns last inserted auto_increment id for given $link or $GLOBALS['userlink']
*
- * @param mysqli $link the mysqli object
- * @return string|ineteger
+ * @param mysqli $link the mysqli object
+ * @return string|int
*/
function PMA_DBI_insert_id($link = null)
{
@@ -421,9 +424,9 @@ function PMA_DBI_insert_id($link = null)
/**
* returns the number of rows affected by last query
*
- * @param mysqli $link the mysqli object
+ * @param mysqli $link the mysqli object
* @param boolean $get_from_cache
- * @return string|integer
+ * @return string|int
*/
function PMA_DBI_affected_rows($link = null, $get_from_cache = true)
{
@@ -444,8 +447,7 @@ function PMA_DBI_affected_rows($link = null, $get_from_cache = true)
/**
* returns metainfo for fields in $result
*
- * @todo preserve orignal flags value
- * @param mysqli_result $result
+ * @param mysqli_result $result
* @return array meta info for fields in $result
*/
function PMA_DBI_get_fields_meta($result)
@@ -524,8 +526,8 @@ function PMA_DBI_get_fields_meta($result)
/**
* return number of fields in given $result
*
- * @param mysqli_result $result
- * @return integer field count
+ * @param mysqli_result $result
+ * @return int field count
*/
function PMA_DBI_num_fields($result)
{
@@ -535,9 +537,9 @@ function PMA_DBI_num_fields($result)
/**
* returns the length of the given field $i in $result
*
- * @param mysqli_result $result
- * @param integer $i field
- * @return integer length of field
+ * @param mysqli_result $result
+ * @param int $i field
+ * @return int length of field
*/
function PMA_DBI_field_len($result, $i)
{
@@ -547,8 +549,8 @@ function PMA_DBI_field_len($result, $i)
/**
* returns name of $i. field in $result
*
- * @param mysqli_result $result
- * @param integer $i field
+ * @param mysqli_result $result
+ * @param int $i field
* @return string name of $i. field in $result
*/
function PMA_DBI_field_name($result, $i)
@@ -559,8 +561,8 @@ function PMA_DBI_field_name($result, $i)
/**
* returns concatenated string of human readable field flags
*
- * @param mysqli_result $result
- * @param integer $i field
+ * @param mysqli_result $result
+ * @param int $i field
* @return string field flags
*/
function PMA_DBI_field_flags($result, $i)
hooks/post-receive
--
phpMyAdmin
More information about the Git
mailing list