From a749577ad5758227dda3e8f9d8d094ec12f52876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 30 Jul 2013 13:57:57 +0200 Subject: [PATCH 1/8] Missing params --- libraries/config/FormDisplay.class.php | 8 ++++---- libraries/tbl_gis_visualization.lib.php | 1 + test/libraries/PMA_zip_test.php | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/libraries/config/FormDisplay.class.php b/libraries/config/FormDisplay.class.php index 3b155ff4e8..c552440040 100644 --- a/libraries/config/FormDisplay.class.php +++ b/libraries/config/FormDisplay.class.php @@ -459,8 +459,8 @@ class FormDisplay /** * Validates select field and casts $value to correct type * - * @param string $value - * @param array $allowed + * @param string &$value Current value + * @param array $allowed List of allowed values * * @return bool */ @@ -743,8 +743,8 @@ class FormDisplay /** * Sets field comments and warnings based on current environment * - * @param string $system_path - * @param array $opts + * @param string $system_path Path to settings + * @param array &$opts Chosen options * * @return void */ diff --git a/libraries/tbl_gis_visualization.lib.php b/libraries/tbl_gis_visualization.lib.php index 1992325a94..de4d3b062b 100644 --- a/libraries/tbl_gis_visualization.lib.php +++ b/libraries/tbl_gis_visualization.lib.php @@ -215,6 +215,7 @@ function PMA_getHtmlForOptionsList($options, $select) * or "spatialColumn" * @param array $columnCandidates the list of select options * @param array $visualizationSettings visualization settings + * * @return String $html */ function PMA_getHtmlForColumn($column, $columnCandidates, $visualizationSettings) diff --git a/test/libraries/PMA_zip_test.php b/test/libraries/PMA_zip_test.php index 22c6fd56fa..28cff24272 100644 --- a/test/libraries/PMA_zip_test.php +++ b/test/libraries/PMA_zip_test.php @@ -55,7 +55,7 @@ class PMA_Zip_Test extends PHPUnit_Framework_TestCase /** * Test for unix2DosTime * - * @param int $unixtime UNIX timestamp + * @param int $unixTime UNIX timestamp * @param int $output DOS timestamp * * @dataProvider providerForTestUnix2DosTime From e0fce588d2789d21e248db73ae99a9a673d12c6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 30 Jul 2013 13:59:26 +0200 Subject: [PATCH 2/8] Allow to choose mbstring as recoding engine --- libraries/config.values.php | 2 +- libraries/config/FormDisplay.class.php | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libraries/config.values.php b/libraries/config.values.php index 80640109d6..272883e1b9 100644 --- a/libraries/config.values.php +++ b/libraries/config.values.php @@ -32,7 +32,7 @@ $cfg_db['Servers'] = array( 'only_db' => 'array' ) ); -$cfg_db['RecodingEngine'] = array('auto', 'iconv', 'recode', 'none'); +$cfg_db['RecodingEngine'] = array('auto', 'iconv', 'recode', 'mb', 'none'); $cfg_db['OBGzip'] = array('auto', true, false); $cfg_db['MemoryLimit'] = 'short_string'; $cfg_db['NavigationLogoLinkWindow'] = array('main', 'new'); diff --git a/libraries/config/FormDisplay.class.php b/libraries/config/FormDisplay.class.php index c552440040..f7bd81ae7e 100644 --- a/libraries/config/FormDisplay.class.php +++ b/libraries/config/FormDisplay.class.php @@ -766,6 +766,13 @@ class FormDisplay 'recode', 'recode' ); } + if (!function_exists('mb_convert_encoding')) { + $opts['values']['mb'] .= ' (' . __('unavailable') . ')'; + $comment .= ($comment ? ", " : '') . sprintf( + __('"%s" requires %s extension'), + 'mb', 'mbstring' + ); + } $opts['comment'] = $comment; $opts['comment_warning'] = true; } From 8defb7669d4a35d65f8f1edc45669315522a23ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 30 Jul 2013 14:01:14 +0200 Subject: [PATCH 3/8] Missing param doc --- libraries/create_addfield.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/create_addfield.lib.php b/libraries/create_addfield.lib.php index 63a3b69f1c..3fdd68797a 100644 --- a/libraries/create_addfield.lib.php +++ b/libraries/create_addfield.lib.php @@ -50,6 +50,7 @@ function PMA_getIndexedColumns() * add columns to a existing table * * @param int $field_cnt number of columns + * @param int $field_primary primary index field * @param boolean $is_create_tbl true if requirement is to get the statement * for table creation * From 31b036767be3bc8c37f7d09610b6c343ee9dc476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 30 Jul 2013 14:01:44 +0200 Subject: [PATCH 4/8] Missing params doc --- test/libraries/PMA_mime_test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/libraries/PMA_mime_test.php b/test/libraries/PMA_mime_test.php index 751cdd42d6..144cde20fc 100644 --- a/test/libraries/PMA_mime_test.php +++ b/test/libraries/PMA_mime_test.php @@ -17,8 +17,8 @@ class PMA_MIME_Test extends PHPUnit_Framework_TestCase /** * Test for PMA_detectMIME * - * @param string $test - * @param $output + * @param string $test MIME to test + * @param string $output Expected output * * @return void * @dataProvider providerForTestDetectMIME From 72785eafe52fcd115ba2099d82c9ceb329bbefce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 30 Jul 2013 14:02:55 +0200 Subject: [PATCH 5/8] Remove double spacing --- libraries/DisplayResults.class.php | 6 +++--- libraries/tbl_gis_visualization.lib.php | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index 2e4fb54311..fabb04fabd 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -881,9 +881,9 @@ class PMA_DisplayResults * Prepare fields for table navigation * Number of rows * - * @param string $html_sql_query the sql encoded by html special - * characters - * @param string $id_for_direction_dropdown the id for the direction dropdown + * @param string $html_sql_query the sql encoded by html special + * characters + * @param string $id_for_direction_dropdown the id for the direction dropdown * * @return string $additional_fields_html html content * diff --git a/libraries/tbl_gis_visualization.lib.php b/libraries/tbl_gis_visualization.lib.php index de4d3b062b..b2d07318c2 100644 --- a/libraries/tbl_gis_visualization.lib.php +++ b/libraries/tbl_gis_visualization.lib.php @@ -189,10 +189,10 @@ function PMA_GIS_saveToFile($data, $visualizationSettings, $format, $fileName) /** * Function to get html for the options lists * - * @param array $options array of options - * @param String $select the item that shoul be selected by default + * @param array $options array of options + * @param string $select the item that shoul be selected by default * - * @return string $html the html for the options lists + * @return string $html the html for the options lists */ function PMA_getHtmlForOptionsList($options, $select) { @@ -211,12 +211,12 @@ function PMA_getHtmlForOptionsList($options, $select) /** * Function to get html for the lebel column and spatial column * - * @param String $column the column type. i.e either "labelColumn" - * or "spatialColumn" - * @param array $columnCandidates the list of select options - * @param array $visualizationSettings visualization settings + * @param string $column the column type. i.e either "labelColumn" + * or "spatialColumn" + * @param array $columnCandidates the list of select options + * @param array $visualizationSettings visualization settings * - * @return String $html + * @return string $html */ function PMA_getHtmlForColumn($column, $columnCandidates, $visualizationSettings) { @@ -244,7 +244,7 @@ function PMA_getHtmlForColumn($column, $columnCandidates, $visualizationSettings /** * Function to get html for the option of using oprn street maps * - * @param boolean $isSelected the default value + * @param boolean $isSelected the default value * * @return string $html */ From c01c91237c4c4f052e723037cf49c154697fbd55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 30 Jul 2013 14:05:36 +0200 Subject: [PATCH 6/8] Mising params docs --- libraries/File.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/File.class.php b/libraries/File.class.php index e26ef30f28..c0d1dfb56a 100644 --- a/libraries/File.class.php +++ b/libraries/File.class.php @@ -247,7 +247,7 @@ class PMA_File * Loads uploaded file from table change request. * * @param string $key the md5 hash of the column name - * @param string $rownumber + * @param string $rownumber number of row to process * * @return boolean success * @access public @@ -320,8 +320,8 @@ class PMA_File * * * @param array $file the array - * @param string $rownumber - * @param string $key + * @param string $rownumber number of row to process + * @param string $key key to process * * @return array * @access public @@ -345,7 +345,7 @@ class PMA_File * sets the name if the file to the one selected in the tbl_change form * * @param string $key the md5 hash of the column name - * @param string $rownumber + * @param string $rownumber number of row to process * * @return boolean success * @access public @@ -391,7 +391,7 @@ class PMA_File * and uses the submitted/selected file * * @param string $key the md5 hash of the column name - * @param string $rownumber + * @param string $rownumber number of row to process * * @return boolean success * @access public From 91d3ca01f612150c74973bdec5f714143b1ed64b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 30 Jul 2013 14:05:51 +0200 Subject: [PATCH 7/8] Remove double spacing --- libraries/TableSearch.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/TableSearch.class.php b/libraries/TableSearch.class.php index d3c367fd6b..6c4b723f27 100644 --- a/libraries/TableSearch.class.php +++ b/libraries/TableSearch.class.php @@ -1378,10 +1378,10 @@ EOT; /** * Replaces a given string in a column with a give replacement * - * @param int $columnIndex index of the column - * @param string $find string to find in the column - * @param string $replaceWith string to replace with - * @param string $charSet character set of the connection + * @param int $columnIndex index of the column + * @param string $find string to find in the column + * @param string $replaceWith string to replace with + * @param string $charSet character set of the connection * * @return void */ From 23a63e3994680d3fb24e0ab8cbf8635186067288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 30 Jul 2013 14:07:07 +0200 Subject: [PATCH 8/8] Missing docs --- libraries/config/Form.class.php | 4 ++-- libraries/config/config_functions.lib.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/config/Form.class.php b/libraries/config/Form.class.php index b06be3f043..efc7076377 100644 --- a/libraries/config/Form.class.php +++ b/libraries/config/Form.class.php @@ -47,8 +47,8 @@ class Form /** * Constructor, reads default config values * - * @param string $form_name - * @param array $form + * @param string $form_name Form name + * @param array $form Form data * @param int $index arbitrary index, stored in Form::$index */ public function __construct($form_name, array $form, $index = null) diff --git a/libraries/config/config_functions.lib.php b/libraries/config/config_functions.lib.php index c9029c83fa..571aa97362 100644 --- a/libraries/config/config_functions.lib.php +++ b/libraries/config/config_functions.lib.php @@ -35,9 +35,9 @@ function PMA_lang($lang_key, $args = null) /** * Returns translated field name/description or comment * - * @param string $canonical_path + * @param string $canonical_path path to handle * @param string $type 'name', 'desc' or 'cmt' - * @param mixed $default + * @param mixed $default default value * * @return string */