From 382ce6e7add4d92ce5809fe15f5bb659fadd33a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 29 Apr 2010 14:00:42 +0200 Subject: [PATCH 1/7] Remove phpdoc here. --- config.sample.inc.php | 1 - 1 file changed, 1 deletion(-) diff --git a/config.sample.inc.php b/config.sample.inc.php index 562ba5246..575e96562 100644 --- a/config.sample.inc.php +++ b/config.sample.inc.php @@ -132,7 +132,6 @@ $cfg['SaveDir'] = ''; /** * When using DB-based query history, how many entries should be kept? * - * @global integer $cfg['QueryHistoryMax'] * default = 25 */ //$cfg['QueryHistoryMax'] = 100; From d6fa1d8595b3a1f2d0a5f5ea933d6e6fd96ceb9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 29 Apr 2010 14:02:30 +0200 Subject: [PATCH 2/7] Add docblock, whitespace leanup. --- db_tracking.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/db_tracking.php b/db_tracking.php index c2dde64eb..46f2544d1 100644 --- a/db_tracking.php +++ b/db_tracking.php @@ -5,7 +5,9 @@ * @package phpMyAdmin */ -// Run common work +/** + * Run common work + */ require_once './libraries/common.inc.php'; require_once './libraries/Table.class.php'; @@ -95,7 +97,7 @@ if (PMA_DBI_num_rows($all_tables_result) > 0) { $table_query = ' SELECT * FROM ' . PMA_backquote($GLOBALS['cfg']['Server']['pmadb']) . '.' . PMA_backquote($GLOBALS['cfg']['Server']['tracking']) . - ' WHERE `db_name` = \'' . PMA_sqlAddslashes($_REQUEST['db']) . '\' AND `table_name` = \'' . PMA_sqlAddslashes($table_name) . '\' AND `version` = \'' . $version_number . '\''; + ' WHERE `db_name` = \'' . PMA_sqlAddslashes($_REQUEST['db']) . '\' AND `table_name` = \'' . PMA_sqlAddslashes($table_name) . '\' AND `version` = \'' . $version_number . '\''; $table_result = PMA_query_as_controluser($table_query); $version_data = PMA_DBI_fetch_array($table_result); @@ -122,7 +124,7 @@ if (PMA_DBI_num_rows($all_tables_result) > 0) { Date: Thu, 29 Apr 2010 14:08:03 +0200 Subject: [PATCH 3/7] Add missing docs. --- libraries/logging.lib.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/logging.lib.php b/libraries/logging.lib.php index a531ba3cc..a52098f16 100644 --- a/libraries/logging.lib.php +++ b/libraries/logging.lib.php @@ -9,6 +9,9 @@ * @package phpMyAdmin */ +/** + * Logs user information to webserver logs. + */ function PMA_log_user($user, $status = 'ok'){ if (function_exists('apache_note')) { apache_note('userID', $user); From e4a399fc6a61ce9641c80c8096bccd1271f506a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 29 Apr 2010 14:10:11 +0200 Subject: [PATCH 4/7] Add docs. --- libraries/import/upload/apc.php | 13 +++++++++---- libraries/import/upload/noplugin.php | 7 ++++++- libraries/import/upload/uploadprogress.php | 19 ++++++++++++------- 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/libraries/import/upload/apc.php b/libraries/import/upload/apc.php index d997e2c22..6b50aeb2a 100644 --- a/libraries/import/upload/apc.php +++ b/libraries/import/upload/apc.php @@ -12,10 +12,15 @@ if (! defined('PHPMYADMIN')) { $ID_KEY = 'APC_UPLOAD_PROGRESS'; +/** + * Returns upload status. + * + * This is implementation for APC extension. + */ function PMA_getUploadStatus($id) { global $SESSION_KEY; global $ID_KEY; - + if (trim($id) == "") { return; } @@ -30,7 +35,7 @@ function PMA_getUploadStatus($id) { ); } $ret = $_SESSION[$SESSION_KEY][$id]; - + if (! PMA_import_apcCheck() || $ret['finished']) { return $ret; } @@ -40,7 +45,7 @@ function PMA_getUploadStatus($id) { $ret['finished'] = (bool)$status['done']; $ret['total'] = $status['total']; $ret['complete'] = $status['current']; - + if ($ret['total'] > 0) { $ret['percent'] = $ret['complete'] / $ret['total'] * 100; } @@ -51,7 +56,7 @@ function PMA_getUploadStatus($id) { $_SESSION[$SESSION_KEY][$id] = $ret; } - + return $ret; } diff --git a/libraries/import/upload/noplugin.php b/libraries/import/upload/noplugin.php index af55d7681..b3baf70e1 100644 --- a/libraries/import/upload/noplugin.php +++ b/libraries/import/upload/noplugin.php @@ -12,10 +12,15 @@ if (! defined('PHPMYADMIN')) { $ID_KEY = 'noplugin'; +/** + * Returns upload status. + * + * This is implementation when no webserver support exists, so it returns just zeroes. + */ function PMA_getUploadStatus($id) { global $SESSION_KEY; global $ID_KEY; - + if (trim($id) == "") { return; } diff --git a/libraries/import/upload/uploadprogress.php b/libraries/import/upload/uploadprogress.php index b1530a90d..ce4c4769d 100644 --- a/libraries/import/upload/uploadprogress.php +++ b/libraries/import/upload/uploadprogress.php @@ -11,14 +11,19 @@ if (! defined('PHPMYADMIN')) { $ID_KEY = "UPLOAD_IDENTIFIER"; +/** + * Returns upload status. + * + * This is implementation for uploadprogress extension. + */ function PMA_getUploadStatus($id) { global $SESSION_KEY; global $ID_KEY; - + if (trim($id) == "") { return; } - + if (! array_key_exists($id, $_SESSION[$SESSION_KEY])) { $_SESSION[$SESSION_KEY][$id] = array( 'id' => $id, @@ -30,11 +35,11 @@ function PMA_getUploadStatus($id) { ); } $ret = $_SESSION[$SESSION_KEY][$id]; - + if (! PMA_import_uploadprogressCheck() || $ret['finished']) { return $ret; } - + $status = uploadprogress_get_info($id); if ($status) { @@ -45,7 +50,7 @@ function PMA_getUploadStatus($id) { } $ret['total'] = $status['bytes_total']; $ret['complete'] = $status['bytes_uploaded']; - + if ($ret['total'] > 0) { $ret['percent'] = $ret['complete'] / $ret['total'] * 100; } @@ -59,9 +64,9 @@ function PMA_getUploadStatus($id) { 'plugin' => $ID_KEY ); } - + $_SESSION[$SESSION_KEY][$id] = $ret; - + return $ret; } ?> From fc328be03071efe8b8712dd46e906d7e37cfdf40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 29 Apr 2010 14:11:06 +0200 Subject: [PATCH 5/7] Fix references. --- libraries/select_lang.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/select_lang.lib.php b/libraries/select_lang.lib.php index 25ba46495..a6efb2c3e 100644 --- a/libraries/select_lang.lib.php +++ b/libraries/select_lang.lib.php @@ -139,7 +139,7 @@ function PMA_langSet(&$lang) * * @return bool true on success, otherwise false * - * @global array $available_languages + * @uses $GLOBALS['available_languages'] to check $lang * * @access private */ From 4692e81e24adecc403135a86d62d3d900203bbdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 29 Apr 2010 14:35:42 +0200 Subject: [PATCH 6/7] Correct type. --- db_qbe.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_qbe.php b/db_qbe.php index 5b8c817fd..ace4ab1d0 100644 --- a/db_qbe.php +++ b/db_qbe.php @@ -141,7 +141,7 @@ $realwidth = $form_column_width . 'ex'; * Enter description here... * * @param array $columns - * @param numeric $column_number + * @param integer $column_number * @param string $selected */ function showColumnSelectCell($columns, $column_number, $selected = '') From a7a986b84c473cd7ef199e652404cd19207dbc57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 29 Apr 2010 14:36:54 +0200 Subject: [PATCH 7/7] Fix param names. --- pdf_schema.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pdf_schema.php b/pdf_schema.php index 80972aa0f..2306a15be 100644 --- a/pdf_schema.php +++ b/pdf_schema.php @@ -99,11 +99,11 @@ class PMA_PDF extends TCPDF { /** * Sets the scaling factor, defines minimum coordinates and margins * - * @param double $ The scaling factor - * @param double $ The minimum X coordinate - * @param double $ The minimum Y coordinate - * @param double $ The left margin - * @param double $ The top margin + * @param double scale The scaling factor + * @param double x_min The minimum X coordinate + * @param double y_min The minimum Y coordinate + * @param double l_marg The left margin + * @param double t_marg The top margin * @access public */ function PMA_PDF_setScale($scale = 1, $x_min = 0, $y_min = 0, $l_marg = -1, $t_marg = -1)