diff --git a/libraries/common.lib.php b/libraries/common.lib.php
index 6c34c84839..2e74489303 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -76,7 +76,8 @@ function PMA_pow($base, $exp, $use_function = false)
* @param string $icon name of icon file
* @param string $alternate alternate text
* @param boolean $force_text whether to force alternate text to be displayed
- * @param boolean $noSprite If true, the image source will be not replaced with a CSS Sprite
+ * @param boolean $noSprite If true, the image source will be not replaced
+ * with a CSS Sprite
*
* @return html img tag
*/
@@ -153,13 +154,13 @@ function PMA_generateHiddenMaxFileSize($max_size)
* Add slashes before "'" and "\" characters so a value containing them can
* be used in a sql comparison.
*
- * @param string $a_string the string to slash
- * @param bool $is_like whether the string will be used in a 'LIKE' clause
- * (it then requires two more escaped sequences) or not
- * @param bool $crlf whether to treat cr/lfs as escape-worthy entities
- * (converts \n to \\n, \r to \\r)
- * @param bool $php_code whether this function is used as part of the
- * "Create PHP code" dialog
+ * @param string $a_string the string to slash
+ * @param bool $is_like whether the string will be used in a 'LIKE' clause
+ * (it then requires two more escaped sequences) or not
+ * @param bool $crlf whether to treat cr/lfs as escape-worthy entities
+ * (converts \n to \\n, \r to \\r)
+ * @param bool $php_code whether this function is used as part of the
+ * "Create PHP code" dialog
*
* @return string the slashed string
*
@@ -210,7 +211,7 @@ function PMA_escape_mysql_wildcards($name)
* removes slashes before "_" and "%" characters
* Note: This function does not unescape backslashes!
*
- * @param string $name the string to escape
+ * @param string $name the string to escape
*
* @return string the escaped string
*
@@ -262,7 +263,6 @@ function PMA_unQuote($quoted_string, $quote = null)
/**
* format sql strings
*
- * @todo move into PMA_Sql
* @param mixed $parsed_sql pre-parsed SQL structure
* @param string $unparsed_sql raw SQL string
*
@@ -272,7 +272,7 @@ function PMA_unQuote($quoted_string, $quote = null)
* @global boolean whether the current statement is a multiple one or not
*
* @access public
- *
+ * @todo move into PMA_Sql
*/
function PMA_formatSql($parsed_sql, $unparsed_sql = '')
{
@@ -419,7 +419,7 @@ function PMA_showMySQLDocu($chapter, $link, $big_icon = false, $anchor = '', $ju
/**
* Displays a link to the phpMyAdmin documentation
*
- * @param string $anchor anchor in documentation
+ * @param string $anchor anchor in documentation
*
* @return string the html link
*
@@ -437,7 +437,7 @@ function PMA_showDocu($anchor)
/**
* Displays a link to the PHP documentation
*
- * @param string $target anchor in documentation
+ * @param string $target anchor in documentation
*
* @return string the html link
*
@@ -457,9 +457,9 @@ function PMA_showPHPDocu($target)
/**
* returns HTML for a footnote marker and add the messsage to the footnotes
*
- * @param string $message the error message
- * @param bool $bbcode
- * @param string $type
+ * @param string $message the error message
+ * @param bool $bbcode
+ * @param string $type message types
*
* @return string html code for a footnote marker
*
@@ -500,11 +500,11 @@ function PMA_showHint($message, $bbcode = false, $type = 'notice')
/**
* Displays a MySQL error message in the right frame.
*
- * @param string $error_message the error message
- * @param string $the_query the sql query that failed
- * @param bool $is_modify_link whether to show a "modify" link or not
- * @param string $back_url the "back" link url (full path is not required)
- * @param bool $exit EXIT the page?
+ * @param string $error_message the error message
+ * @param string $the_query the sql query that failed
+ * @param bool $is_modify_link whether to show a "modify" link or not
+ * @param string $back_url the "back" link url (full path is not required)
+ * @param bool $exit EXIT the page?
*
* @global string the curent table
* @global string the current db
@@ -650,10 +650,10 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
/**
* returns array with tables of given db with extended information and grouped
*
- * @param string $db name of db
- * @param string $tables name of tables
- * @param integer $limit_offset list offset
- * @param int|bool $limit_count max tables to return
+ * @param string $db name of db
+ * @param string $tables name of tables
+ * @param integer $limit_offset list offset
+ * @param int|bool $limit_count max tables to return
*
* @return array (recursive) grouped table list
*/
@@ -782,10 +782,10 @@ function PMA_getTableList($db, $tables = null, $limit_offset = 0, $limit_count =
*
*
*
- * @param mixed $a_name the database, table or field name to "backquote"
- * or array of it
- * @param boolean $do_it a flag to bypass this function (used by dump
- * functions)
+ * @param mixed $a_name the database, table or field name to "backquote"
+ * or array of it
+ * @param boolean $do_it a flag to bypass this function (used by dump
+ * functions)
*
* @return mixed the "backquoted" database, table or field name
*
@@ -880,10 +880,10 @@ if (typeof(window.parent) != 'undefined'
* displays the message and the query
* usually the message is the result of the query executed
*
- * @param string $message the message to display
- * @param string $sql_query the query to display
- * @param string $type the type (level) of the message
- * @param boolean $is_view is this a message after a VIEW operation?
+ * @param string $message the message to display
+ * @param string $sql_query the query to display
+ * @param string $type the type (level) of the message
+ * @param boolean $is_view is this a message after a VIEW operation?
*
* @return string
*
@@ -1271,7 +1271,8 @@ function PMA_profilingSupported()
/**
* Displays a form with the Profiling checkbox
*
- * @param string $sql_query
+ * @param string $sql_query sql query
+ *
* @access public
*/
function PMA_profilingCheckbox($sql_query)
@@ -1290,9 +1291,9 @@ function PMA_profilingCheckbox($sql_query)
/**
* Formats $value to byte view
*
- * @param double $value the value to format
- * @param int $limes the sensitiveness
- * @param int $comma the number of decimals to retain
+ * @param double $value the value to format
+ * @param int $limes the sensitiveness
+ * @param int $comma the number of decimals to retain
*
* @return array the formatted value and its unit
*
@@ -1346,7 +1347,7 @@ function PMA_formatByteDown($value, $limes = 6, $comma = 0)
/**
* Changes thousands and decimal separators to locale specific values.
*
- * @param $value
+ * @param string $value the value
*
* @return string
*/
@@ -1376,13 +1377,13 @@ function PMA_localizeNumber($value)
* echo PMA_formatNumber(0.003, 3, 3); // 0.003
* echo PMA_formatNumber(0.00003, 3, 2); // 0.03 m
* echo PMA_formatNumber(0, 6); // 0
- *
*
- * @param double $value the value to format
- * @param integer $digits_left number of digits left of the comma
- * @param integer $digits_right number of digits right of the comma
- * @param boolean $only_down do not reformat numbers below 1
- * @param boolean $noTrailingZero removes trailing zeros right of the comma (default: true)
+ *
+ * @param double $value the value to format
+ * @param integer $digits_left number of digits left of the comma
+ * @param integer $digits_right number of digits right of the comma
+ * @param boolean $only_down do not reformat numbers below 1
+ * @param boolean $noTrailingZero removes trailing zeros right of the comma (default: true)
*
* @return string the formatted value and its unit
*
@@ -1474,7 +1475,7 @@ function PMA_formatNumber($value, $digits_left = 3, $digits_right = 0, $only_dow
/**
* Returns the number of bytes when a formatted size is given
*
- * @param string $formatted_size the size expression (for example 8MB)
+ * @param string $formatted_size the size expression (for example 8MB)
*
* @return integer The numerical part of the expression (for example 8)
*/
@@ -1495,8 +1496,8 @@ function PMA_extractValueFromFormattedSize($formatted_size)
/**
* Writes localised date
*
- * @param string $timestamp the current timestamp
- * @param string $format format
+ * @param string $timestamp the current timestamp
+ * @param string $format format
*
* @return string the formatted date
*
@@ -1565,8 +1566,8 @@ function PMA_localisedDate($timestamp = -1, $format = '')
* returns a tab for tabbed navigation.
* If the variables $link and $args ar left empty, an inactive tab is created
*
- * @param array $tab array with all options
- * @param array $url_params
+ * @param array $tab array with all options
+ * @param array $url_params
*
* @return string html code for one tab, a link if valid otherwise a span
*
@@ -1666,8 +1667,8 @@ function PMA_generate_html_tab($tab, $url_params = array(), $base_dir='')
/**
* returns html-code for a tab navigation
*
- * @param array $tabs one element per tab
- * @param string $url_params
+ * @param array $tabs one element per tab
+ * @param string $url_params
*
* @return string html-code for tab-navigation
*/
@@ -1695,14 +1696,14 @@ function PMA_generate_html_tabs($tabs, $url_params, $base_dir='')
* Displays a link, or a button if the link's URL is too large, to
* accommodate some browsers' limitations
*
- * @param string $url the URL
- * @param string $message the link message
- * @param mixed $tag_params string: js confirmation
- * array: additional tag params (f.e. style="")
- * @param boolean $new_form we set this to false when we are already in
- * a form, to avoid generating nested forms
- * @param boolean $strip_img
- * @param string $target
+ * @param string $url the URL
+ * @param string $message the link message
+ * @param mixed $tag_params string: js confirmation
+ * array: additional tag params (f.e. style="")
+ * @param boolean $new_form we set this to false when we are already in
+ * a form, to avoid generating nested forms
+ * @param boolean $strip_img whether to strip the image
+ * @param string $target target
*
* @return string the results to be echoed or saved in an array
*/
@@ -1822,7 +1823,8 @@ function PMA_linkOrButton($url, $message, $tag_params = array(),
/**
* Splits a URL string by parameter
*
- * @param string $url the URL
+ * @param string $url the URL
+ *
* @return array the parameter/value pairs, for example [0] db=sakila
*/
function PMA_splitURLQuery($url) {
@@ -1844,7 +1846,7 @@ function PMA_splitURLQuery($url) {
/**
* Returns a given timespan value in a readable format.
*
- * @param int $seconds the timespan
+ * @param int $seconds the timespan
*
* @return string the formatted value
*/
@@ -1872,11 +1874,11 @@ function PMA_timespanFormat($seconds)
* Fulfills todo-item
* http://sf.net/tracker/?func=detail&aid=544361&group_id=23067&atid=377411
*
- * @todo add a multibyte safe function PMA_STR_split()
- * @param string $string The string
- * @param string $Separator The Separator (defaults to "
\n")
+ * @param string $string The string
+ * @param string $Separator The Separator (defaults to "
\n")
*
* @access public
+ * @todo add a multibyte safe function PMA_STR_split()
*
* @return string The flipped string
*/
@@ -1920,16 +1922,17 @@ function PMA_flipstring($string, $Separator = "
\n")
* Not sure we could use a strMissingParameter message here,
* would have to check if the error message file is always available
*
- * @todo use PMA_fatalError() if $die === true?
- * @param array $params The names of the parameters needed by the calling script.
- * @param bool $die Stop the execution?
- * (Set this manually to false in the calling script
- * until you know all needed parameters to check).
- * @param bool $request Whether to include this list in checking for special params.
+ * @param array $params The names of the parameters needed by the calling script.
+ * @param bool $die Stop the execution?
+ * (Set this manually to false in the calling script
+ * until you know all needed parameters to check).
+ * @param bool $request Whether to include this list in checking for special params.
+ *
* @global string path to current script
* @global boolean flag whether any special variable was required
*
* @access public
+ * @todo use PMA_fatalError() if $die === true?
*/
function PMA_checkParameters($params, $die = true, $request = true)
{
@@ -1972,11 +1975,11 @@ function PMA_checkParameters($params, $die = true, $request = true)
/**
* Function to generate unique condition for specified row.
*
- * @param resource $handle current query result
- * @param integer $fields_cnt number of fields
- * @param array $fields_meta meta information about fields
- * @param array $row current row
- * @param boolean $force_unique generate condition only on pk or unique
+ * @param resource $handle current query result
+ * @param integer $fields_cnt number of fields
+ * @param array $fields_meta meta information about fields
+ * @param array $row current row
+ * @param boolean $force_unique generate condition only on pk or unique
*
* @access public
*
@@ -2123,12 +2126,12 @@ function PMA_getUniqueCondition($handle, $fields_cnt, $fields_meta, $row, $force
/**
* Generate a button or image tag
*
- * @param string $button_name name of button element
- * @param string $button_class class of button element
- * @param string $image_name name of image element
- * @param string $text text to display
- * @param string $image image to display
- * @param string $value
+ * @param string $button_name name of button element
+ * @param string $button_class class of button element
+ * @param string $image_name name of image element
+ * @param string $text text to display
+ * @param string $image image to display
+ * @param string $value value
*
* @access public
*/
@@ -2167,17 +2170,18 @@ function PMA_buttonOrImage($button_name, $button_class, $image_name, $text,
/**
* Generate a pagination selector for browsing resultsets
*
- * @param int $rows Number of rows in the pagination set
- * @param int $pageNow current page number
- * @param int $nbTotalPage number of total pages
- * @param int $showAll If the number of pages is lower than this
- * variable, no pages will be omitted in pagination
- * @param int $sliceStart How many rows at the beginning should always be shown?
- * @param int $sliceEnd How many rows at the end should always be shown?
- * @param int $percent Percentage of calculation page offsets to hop to a next page
- * @param int $range Near the current page, how many pages should
- * be considered "nearby" and displayed as well?
- * @param string $prompt The prompt to display (sometimes empty)
+ * @param int $rows Number of rows in the pagination set
+ * @param int $pageNow current page number
+ * @param int $nbTotalPage number of total pages
+ * @param int $showAll If the number of pages is lower than this
+ * variable, no pages will be omitted in pagination
+ * @param int $sliceStart How many rows at the beginning should always be shown?
+ * @param int $sliceEnd How many rows at the end should always be shown?
+ * @param int $percent Percentage of calculation page offsets to hop to a
+ * next page
+ * @param int $range Near the current page, how many pages should
+ * be considered "nearby" and displayed as well?
+ * @param string $prompt The prompt to display (sometimes empty)
*
* @return string
*
@@ -2267,15 +2271,16 @@ function PMA_pageselector($rows, $pageNow = 1, $nbTotalPage = 1,
/**
* Generate navigation for a list
*
- * @todo use $pos from $_url_params
- * @param int $count number of elements in the list
- * @param int $pos current position in the list
- * @param array $_url_params url parameters
- * @param string $script script name for form target
- * @param string $frame target frame
- * @param int $max_count maximum number of elements to display from the list
+ * @param int $count number of elements in the list
+ * @param int $pos current position in the list
+ * @param array $_url_params url parameters
+ * @param string $script script name for form target
+ * @param string $frame target frame
+ * @param int $max_count maximum number of elements to display from the list
*
* @access public
+ *
+ * @todo use $pos from $_url_params
*/
function PMA_listNavigator($count, $pos, $_url_params, $script, $frame, $max_count)
{
@@ -2357,7 +2362,7 @@ function PMA_listNavigator($count, $pos, $_url_params, $script, $frame, $max_cou
*
*
*
- * @param string $dir with wildcard for user
+ * @param string $dir with wildcard for user
*
* @return string per user directory
*/
@@ -2374,7 +2379,7 @@ function PMA_userDir($dir)
/**
* returns html code for db link to default db page
*
- * @param string $database
+ * @param string $database database
*
* @return string html link to default db page
*/
@@ -2398,10 +2403,10 @@ function PMA_getDbLink($database = null)
* Displays a lightbulb hint explaining a known external bug
* that affects a functionality
*
- * @param string $functionality localized message explaining the func.
- * @param string $component 'mysql' (eventually, 'php')
- * @param string $minimum_version of this component
- * @param string $bugref bug reference for this component
+ * @param string $functionality localized message explaining the func.
+ * @param string $component 'mysql' (eventually, 'php')
+ * @param string $minimum_version of this component
+ * @param string $bugref bug reference for this component
*/
function PMA_externalBug($functionality, $component, $minimum_version, $bugref)
{
@@ -2417,6 +2422,8 @@ function PMA_externalBug($functionality, $component, $minimum_version, $bugref)
* @param string $label label for checkbox
* @param boolean $checked is it initially checked?
* @param boolean $onclick should it submit the form on click?
+ *
+ * @return the HTML for the checkbox
*/
function PMA_display_html_checkbox($html_field_name, $label, $checked, $onclick)
{
@@ -2433,6 +2440,8 @@ function PMA_display_html_checkbox($html_field_name, $label, $checked, $onclick)
* @param boolean $line_break whether to add an HTML line break after a choice
* @param boolean $escape_label whether to use htmlspecialchars() on label
* @param string $class enclose each choice with a div of this class
+ *
+ * @return the HTML for the tadio buttons
*/
function PMA_display_html_radio($html_field_name, $choices, $checked_choice = '', $line_break = true, $escape_label = true, $class='')
{
@@ -2460,11 +2469,12 @@ function PMA_display_html_radio($html_field_name, $choices, $checked_choice = ''
/**
* Generates and returns an HTML dropdown
*
- * @param string $select_name
- * @param array $choices choices values
- * @param string $active_choice the choice to select by default
- * @param string $id id of the select element; can be different in case
- * the dropdown is present more than once on the page
+ * @param string $select_name name for the select element
+ * @param array $choices choices values
+ * @param string $active_choice the choice to select by default
+ * @param string $id id of the select element; can be different in case
+ * the dropdown is present more than once on the page
+ *
* @return string
*
* @todo support titles
@@ -2489,8 +2499,8 @@ function PMA_generate_html_dropdown($select_name, $choices, $active_choice, $id)
* controlling the slider; you have to generate the yourself
* after the sliding section.
*
- * @param string $id the id of the