'
. '
\n";
diff --git a/libraries/rte/rte_routines.lib.php b/libraries/rte/rte_routines.lib.php
index e2b68dd22c..577f094aa1 100644
--- a/libraries/rte/rte_routines.lib.php
+++ b/libraries/rte/rte_routines.lib.php
@@ -910,9 +910,9 @@ function PMA_RTN_getEditorForm($mode, $operation, $routine)
unset($routine['item_param_opts_text'][$routine['item_num_params']-1]);
$routine['item_num_params']--;
}
- $disable_remove_parameter = '';
+ $disableRemoveParam = '';
if (! $routine['item_num_params']) {
- $disable_remove_parameter = " color: gray;' disabled='disabled";
+ $disableRemoveParam = " color: gray;' disabled='disabled";
}
$original_routine = '';
if ($mode == 'edit') {
@@ -988,46 +988,45 @@ function PMA_RTN_getEditorForm($mode, $operation, $routine)
for ($i=0; $i<$routine['item_num_params']; $i++) { // each parameter
$retval .= PMA_RTN_getParameterRow($routine, $i, $isprocedure_class);
}
- $retval .= " \n";
- $retval .= " \n";
- $retval .= "\n";
- $retval .= "
\n";
- $retval .= " | | \n";
- $retval .= " \n";
- $retval .= " \n";
- $retval .= " \n";
- $retval .= " | \n";
- $retval .= "
\n";
+ $retval .= " ";
+ $retval .= " ";
+ $retval .= "";
+ $retval .= "
";
+ $retval .= " | | ";
+ $retval .= " ";
+ $retval .= " ";
+ $retval .= " ";
+ $retval .= " | ";
+ $retval .= "
";
// parameter handling end
- $retval .= "
\n";
- $retval .= " | " . __('Return type') . " | \n";
- $retval .= " | \n";
- $retval .= "
\n";
- $retval .= "
\n";
- $retval .= " | " . __('Return length/values') . " | \n";
- $retval .= " \n";
- $retval .= " | \n";
+ $retval .= " ";
+ $retval .= " | " . __('Return type') . " | ";
+ $retval .= " | ";
+ $retval .= " ";
+ $retval .= " ";
+ $retval .= " | " . __('Return length/values') . " | ";
+ $retval .= " | ";
+ $retval .= " --- | ";
+ $retval .= " ";
+ $retval .= " ";
+ $retval .= " | " . __('Return options') . " | ";
+ $retval .= " ";
$retval .= PMA_generateCharsetDropdownBox(
PMA_CSDROPDOWN_CHARSET,
"item_returnopts_text",
null,
$routine['item_returnopts_text']
);
- $retval .= "\n \n";
- $retval .= " ";
+ $retval .= " \n";
- $retval .= " --- \n";
- $retval .= " | \n";
- $retval .= " \n";
- $retval .= " \n";
- $retval .= " | " . __('Definition') . " | \n";
+ $retval .= " ";
+ $retval .= " --- ";
+ $retval .= "";
+ $retval .= " ";
+ $retval .= " ";
+ $retval .= " | " . __('Definition') . " | ";
$retval .= " | \n";
- $retval .= " \n";
- $retval .= " \n";
- $retval .= " | " . __('Is deterministic') . " | \n";
+ $retval .= "";
+ $retval .= " ";
+ $retval .= " ";
+ $retval .= " | " . __('Is deterministic') . " | ";
$retval .= " | \n";
- $retval .= " \n";
- $retval .= " \n";
- $retval .= " | " . __('Definer') . " | \n";
- $retval .= " \n";
- $retval .= " | | ";
+ $retval .= " ";
+ $retval .= " ";
+ $retval .= " | " . __('Definer') . " | ";
+ $retval .= " | ";
+ $retval .= " ";
+ $retval .= " ";
+ $retval .= " | " . __('Security type') . " | ";
+ $retval .= " | \n";
- $retval .= " \n";
- $retval .= " \n";
- $retval .= " | " . __('SQL data access') . " | \n";
- $retval .= " | ";
+ $retval .= " ";
+ $retval .= " ";
+ $retval .= " | " . __('SQL data access') . " | ";
+ $retval .= " | \n";
- $retval .= " \n";
- $retval .= " \n";
- $retval .= " | " . __('Comment') . " | \n";
- $retval .= " ";
+ $retval .= " | | ";
+ $retval .= " ";
+ $retval .= "";
+ $retval .= "";
if ($GLOBALS['is_ajax_request']) {
- $retval .= " \n";
- $retval .= "\n";
+ $retval .= "";
}
- $retval .= "\n\n";
- $retval .= "\n\n";
+ $retval .= "";
+ $retval .= "";
return $retval;
} // end PMA_RTN_getEditorForm()
@@ -1412,7 +1411,7 @@ function PMA_RTN_handleExecute()
);
$output .= "";
- $num_of_rusults_set_to_display = 0;
+ $nbResultsetToDisplay = 0;
do {
@@ -1448,7 +1447,7 @@ function PMA_RTN_handleExecute()
}
$output .= "";
- $num_of_rusults_set_to_display++;
+ $nbResultsetToDisplay++;
$affected = $num_rows;
}
@@ -1483,7 +1482,7 @@ function PMA_RTN_handleExecute()
}
$message = PMA_message::success($message);
- if ($num_of_rusults_set_to_display == 0) {
+ if ($nbResultsetToDisplay == 0) {
$notice = __(
'MySQL returned an empty result set (i.e. zero rows).'
);
diff --git a/libraries/server_collations.lib.php b/libraries/server_collations.lib.php
index 39855c8205..2c6a12af60 100644
--- a/libraries/server_collations.lib.php
+++ b/libraries/server_collations.lib.php
@@ -15,17 +15,17 @@ if (! defined('PHPMYADMIN')) {
/**
* Returns the html for server Character Sets and Collations.
*
- * @param Array $mysql_charsets Mysql Charsets list
- * @param Array $mysql_collations Mysql Collations list
- * @param Array $mysql_charsets_descriptions Charsets descriptions
- * @param Array $mysql_default_collations Default Collations list
- * @param Array $mysql_collations_available Available Collations list
+ * @param Array $mysqlCharsets Mysql Charsets list
+ * @param Array $mysqlCollations Mysql Collations list
+ * @param Array $mysqlCharsetsDesc Charsets descriptions
+ * @param Array $mysqlDftCollations Default Collations list
+ * @param Array $mysqlCollAvailable Available Collations list
*
* @return string
*/
-function PMA_getHtmlForCharsets($mysql_charsets, $mysql_collations,
- $mysql_charsets_descriptions, $mysql_default_collations,
- $mysql_collations_available
+function PMA_getHtmlForCharsets($mysqlCharsets, $mysqlCollations,
+ $mysqlCharsetsDesc, $mysqlDftCollations,
+ $mysqlCollAvailable
) {
/**
* Outputs the result
@@ -36,27 +36,27 @@ function PMA_getHtmlForCharsets($mysql_charsets, $mysql_collations,
. ' ' . __('Description') . ' | ' . "\n"
. ' |
' . "\n";
- $table_row_count = count($mysql_charsets) + count($mysql_collations);
+ $table_row_count = count($mysqlCharsets) + count($mysqlCollations);
+
+ foreach ($mysqlCharsets as $current_charset) {
- foreach ($mysql_charsets as $current_charset) {
-
$html .= '
| ' . "\n"
. ' ' . htmlspecialchars($current_charset) . "\n"
- . (empty($mysql_charsets_descriptions[$current_charset])
+ . (empty($mysqlCharsetsDesc[$current_charset])
? ''
: ' (' . htmlspecialchars(
- $mysql_charsets_descriptions[$current_charset]
+ $mysqlCharsetsDesc[$current_charset]
) . ')' . "\n")
. ' | ' . "\n"
. '
|---|
' . "\n";
$html .= PMA_getHtmlForCollationCurrentCharset(
$current_charset,
- $mysql_collations,
- $mysql_default_collations,
- $mysql_collations_available
+ $mysqlCollations,
+ $mysqlDftCollations,
+ $mysqlCollAvailable
);
-
+
}
unset($table_row_count);
$html .= '' . "\n"
@@ -68,27 +68,27 @@ function PMA_getHtmlForCharsets($mysql_charsets, $mysql_collations,
/**
* Returns the html for Collations of Current Charset.
*
- * @param String $current_charset Current Charset
- * @param Array $mysql_collations Collations list
- * @param Array $mysql_default_collations Default Collations list
- * @param Array $mysql_collations_available Available Collations list
+ * @param String $currCharset Current Charset
+ * @param Array $mysqlColl Collations list
+ * @param Array $mysqlDefaultColl Default Collations list
+ * @param Array $mysqlCollAvailable Available Collations list
*
* @return string
*/
function PMA_getHtmlForCollationCurrentCharset(
- $current_charset, $mysql_collations,
- $mysql_default_collations, $mysql_collations_available
+ $currCharset, $mysqlColl,
+ $mysqlDefaultColl, $mysqlCollAvailable
) {
$odd_row = true;
$html = '';
- foreach ($mysql_collations[$current_charset] as $current_collation) {
-
+ foreach ($mysqlColl[$currCharset] as $current_collation) {
+
$html .= '
' . "\n"
. ' | ' . htmlspecialchars($current_collation) . ' | ' . "\n"
. ' ' . PMA_getCollationDescr($current_collation) . ' | ' . "\n"
diff --git a/libraries/server_databases.lib.php b/libraries/server_databases.lib.php
index 15d439df3b..7a125c1b0c 100644
--- a/libraries/server_databases.lib.php
+++ b/libraries/server_databases.lib.php
@@ -109,10 +109,7 @@ function PMA_getHtmlForDatabase(
$html .= PMA_getHtmlForTableFooterButtons(
$cfg['AllowUserDropDatabase'],
- $is_superuser,
- $sort_by,
- $sort_order,
- $dbstats
+ $is_superuser
);
if (empty($dbstats)) {
@@ -128,56 +125,53 @@ function PMA_getHtmlForDatabase(
/**
* Returns the html for Table footer buttons
*
- * @param bool $is_allowUserDropDatabase Allow user drop database
- * @param bool $is_superuser User status
- * @param string $sort_by sort by string
- * @param string $sort_order sort order string
- * @param Array $dbstats database status
+ * @param bool $is_allowUserDropDb Allow user drop database
+ * @param bool $is_superuser User status
*
* @return string
*/
-function PMA_getHtmlForTableFooterButtons(
- $is_allowUserDropDatabase, $is_superuser,
- $sort_by, $sort_order, $dbstats
-) {
- $html = "";
- if ($is_superuser || $is_allowUserDropDatabase) {
- $html .= '
' . "\n"
- . ' '
- . ' '
- . '' . __('With selected:') . '' . "\n";
- $html .= PMA_Util::getButtonOrImage(
- '',
- 'mult_submit' . ' ajax',
- 'drop_selected_dbs',
- __('Drop'), 'b_deltbl.png'
- );
+function PMA_getHtmlForTableFooterButtons($is_allowUserDropDb, $is_superuser)
+{
+ if (!$is_superuser && !$is_allowUserDropDb) {
+ return '';
}
+
+ $html = '
' . "\n"
+ . ' '
+ . ' '
+ . '' . __('With selected:') . '' . "\n";
+ $html .= PMA_Util::getButtonOrImage(
+ '',
+ 'mult_submit' . ' ajax',
+ 'drop_selected_dbs',
+ __('Drop'), 'b_deltbl.png'
+ );
+
return $html;
}
/**
* Returns the html for Table footer
*
- * @param bool $is_allowUserDropDatabase Allow user drop database
- * @param bool $is_superuser User status
- * @param Array $databases_count Database count
- * @param string $column_order column order
- * @param array $replication_types replication types
- * @param string $first_database First database
+ * @param bool $is_allowUserDropDb Allow user drop database
+ * @param bool $is_superuser User status
+ * @param Array $databases_count Database count
+ * @param string $column_order column order
+ * @param array $replication_types replication types
+ * @param string $first_database First database
*
* @return string
*/
function PMA_getHtmlForTableFooter(
- $is_allowUserDropDatabase, $is_superuser,
+ $is_allowUserDropDb, $is_superuser,
$databases_count, $column_order,
$replication_types, $first_database
) {
$html = '
' . "\n";
- if ($is_superuser || $is_allowUserDropDatabase) {
+ if ($is_superuser || $is_allowUserDropDb) {
$html .= ' | ' . "\n";
}
$html .= ' ' . __('Total') . ': '
@@ -288,22 +282,22 @@ function PMA_getHtmlForColumnOrder($column_order, $first_database)
/**
* Returns the html for Column Order with Sort
*
- * @param bool $is_superuser User status
- * @param bool $is_allowUserDropDatabase Allow user drop database
- * @param Array $_url_params Url params
- * @param string $sort_by sort colume name
- * @param string $sort_order order
- * @param array $column_order column order
- * @param array $first_database database to show
+ * @param bool $is_superuser User status
+ * @param bool $is_allowUserDropDb Allow user drop database
+ * @param Array $_url_params Url params
+ * @param string $sort_by sort colume name
+ * @param string $sort_order order
+ * @param array $column_order column order
+ * @param array $first_database database to show
*
* @return string
*/
function PMA_getHtmlForColumnOrderWithSort(
- $is_superuser, $is_allowUserDropDatabase,
+ $is_superuser, $is_allowUserDropDb,
$_url_params, $sort_by, $sort_order,
$column_order, $first_database
) {
- $html = ($is_superuser || $is_allowUserDropDatabase
+ $html = ($is_superuser || $is_allowUserDropDb
? ' | | ' . "\n"
: '')
. ' $stat) {
- if (array_key_exists($stat_name, $first_database)) {
- if ($stat['format'] === 'byte') {
- $table_columns += 2;
- $colspan = ' colspan="2"';
- } else {
- $table_columns++;
- $colspan = '';
- }
- $_url_params['sort_by'] = $stat_name;
- $_url_params['sort_order']
- = ($sort_by == $stat_name && $sort_order == 'desc') ? 'asc' : 'desc';
- $html .= ' | '
- . '' . "\n"
- . ' ' . $stat['disp_name'] . "\n"
- . ($sort_by == $stat_name
- ? ' ' . PMA_Util::getImage(
- 's_' . $sort_order . '.png',
- ($sort_order == 'asc' ? __('Ascending') : __('Descending'))
- ) . "\n"
- : ''
- )
- . ' | ' . "\n";
+ if (!array_key_exists($stat_name, $first_database)) {
+ continue;
}
+
+ if ($stat['format'] === 'byte') {
+ $table_columns += 2;
+ $colspan = ' colspan="2"';
+ } else {
+ $table_columns++;
+ $colspan = '';
+ }
+ $_url_params['sort_by'] = $stat_name;
+ $_url_params['sort_order']
+ = ($sort_by == $stat_name && $sort_order == 'desc') ? 'asc' : 'desc';
+ $html .= ' '
+ . '' . "\n"
+ . ' ' . $stat['disp_name'] . "\n"
+ . ($sort_by == $stat_name
+ ? ' ' . PMA_Util::getImage(
+ 's_' . $sort_order . '.png',
+ ($sort_order == 'asc' ? __('Ascending') : __('Descending'))
+ ) . "\n"
+ : ''
+ )
+ . ' | ' . "\n";
}
return $html;
}
diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php
index fdfb23a357..7e1650ab4c 100644
--- a/libraries/server_privileges.lib.php
+++ b/libraries/server_privileges.lib.php
@@ -422,16 +422,16 @@ function PMA_getHtmlForColumnPrivileges($columns, $row, $name_for_select,
. '' . "\n"
@@ -1134,7 +1134,7 @@ function PMA_getStructurePrivilegeTable($table, $row)
*/
function PMA_getAdministrationPrivilegeTable($db)
{
- $administration_privTable = array(
+ $adminPrivTable = array(
array('Grant',
'GRANT',
__(
@@ -1144,7 +1144,7 @@ function PMA_getAdministrationPrivilegeTable($db)
),
);
if ($db == '*') {
- $administration_privTable[] = array('Super',
+ $adminPrivTable[] = array('Super',
'SUPER',
__(
'Allows connecting, even if maximum number '
@@ -1153,46 +1153,46 @@ function PMA_getAdministrationPrivilegeTable($db)
. 'setting global variables or killing threads of other users.'
)
);
- $administration_privTable[] = array('Process',
+ $adminPrivTable[] = array('Process',
'PROCESS',
__('Allows viewing processes of all users')
);
- $administration_privTable[] = array('Reload',
+ $adminPrivTable[] = array('Reload',
'RELOAD',
__('Allows reloading server settings and flushing the server\'s caches.')
);
- $administration_privTable[] = array('Shutdown',
+ $adminPrivTable[] = array('Shutdown',
'SHUTDOWN',
__('Allows shutting down the server.')
);
- $administration_privTable[] = array('Show_db',
+ $adminPrivTable[] = array('Show_db',
'SHOW DATABASES',
__('Gives access to the complete list of databases.')
);
}
- $administration_privTable[] = array('Lock_tables',
+ $adminPrivTable[] = array('Lock_tables',
'LOCK TABLES',
__('Allows locking tables for the current thread.')
);
- $administration_privTable[] = array('References',
+ $adminPrivTable[] = array('References',
'REFERENCES',
__('Has no effect in this MySQL version.')
);
if ($db == '*') {
- $administration_privTable[] = array('Repl_client',
+ $adminPrivTable[] = array('Repl_client',
'REPLICATION CLIENT',
__('Allows the user to ask where the slaves / masters are.')
);
- $administration_privTable[] = array('Repl_slave',
+ $adminPrivTable[] = array('Repl_slave',
'REPLICATION SLAVE',
__('Needed for the replication slaves.')
);
- $administration_privTable[] = array('Create_user',
+ $adminPrivTable[] = array('Create_user',
'CREATE USER',
__('Allows creating, dropping and renaming user accounts.')
);
}
- return $administration_privTable;
+ return $adminPrivTable;
}
/**
@@ -1755,7 +1755,7 @@ function PMA_getListOfPrivilegesAndComparedPrivileges()
. '`Alter_routine_priv`, '
. '`Execute_priv`';
- $list_of_compared_privileges
+ $listOfComparedPrivs
= '`Select_priv` = \'N\''
. ' AND `Insert_priv` = \'N\''
. ' AND `Update_priv` = \'N\''
@@ -1776,11 +1776,11 @@ function PMA_getListOfPrivilegesAndComparedPrivileges()
$list_of_privileges .=
', `Event_priv`, '
. '`Trigger_priv`';
- $list_of_compared_privileges .=
+ $listOfComparedPrivs .=
' AND `Event_priv` = \'N\''
. ' AND `Trigger_priv` = \'N\'';
}
- return array($list_of_privileges, $list_of_compared_privileges);
+ return array($list_of_privileges, $listOfComparedPrivs);
}
/**
@@ -1819,19 +1819,19 @@ function PMA_getHtmlForSpecificDbPrivileges($db)
. '
' . "\n"
. '' . "\n";
// now, we build the table...
- list($list_of_privileges, $list_of_compared_privileges)
+ list($listOfPrivs, $listOfComparedPrivs)
= PMA_getListOfPrivilegesAndComparedPrivileges();
- $sql_query = '(SELECT ' . $list_of_privileges . ', `Db`, \'d\' AS `Type`'
+ $sql_query = '(SELECT ' . $listOfPrivs . ', `Db`, \'d\' AS `Type`'
.' FROM `mysql`.`db`'
.' WHERE \'' . PMA_Util::sqlAddSlashes($db)
. "'"
.' LIKE `Db`'
- .' AND NOT (' . $list_of_compared_privileges. ')) '
+ .' AND NOT (' . $listOfComparedPrivs. ')) '
.'UNION '
- .'(SELECT ' . $list_of_privileges . ', \'*\' AS `Db`, \'g\' AS `Type`'
+ .'(SELECT ' . $listOfPrivs . ', \'*\' AS `Db`, \'g\' AS `Type`'
.' FROM `mysql`.`user` '
- .' WHERE NOT (' . $list_of_compared_privileges . ')) '
+ .' WHERE NOT (' . $listOfComparedPrivs . ')) '
.' ORDER BY `User` ASC,'
.' `Host` ASC,'
.' `Db` ASC;';
@@ -1926,20 +1926,20 @@ function PMA_getHtmlForSpecificTablePrivileges($db, $table)
. ''
. '';
- list($list_of_privileges, $list_of_compared_privileges)
+ list($listOfPrivs, $listOfComparedPrivs)
= PMA_getListOfPrivilegesAndComparedPrivileges();
$sql_query
= "("
- . " SELECT " . $list_of_privileges . ", '*' AS `Db`, 'g' AS `Type`"
+ . " SELECT " . $listOfPrivs . ", '*' AS `Db`, 'g' AS `Type`"
. " FROM `mysql`.`user`"
- . " WHERE NOT (" . $list_of_compared_privileges . ")"
+ . " WHERE NOT (" . $listOfComparedPrivs . ")"
. ")"
. " UNION "
. "("
- . " SELECT " . $list_of_privileges . ", `Db`, 'd' AS `Type`"
+ . " SELECT " . $listOfPrivs . ", `Db`, 'd' AS `Type`"
. " FROM `mysql`.`db`"
. " WHERE '" . PMA_Util::sqlAddSlashes($db) . "' LIKE `Db`"
- . " AND NOT (" . $list_of_compared_privileges. ")"
+ . " AND NOT (" . $listOfComparedPrivs. ")"
. ")"
. " ORDER BY `User` ASC, `Host` ASC, `Db` ASC;";
$res = $GLOBALS['dbi']->query($sql_query);
@@ -1978,9 +1978,7 @@ function PMA_getHtmlForSpecificTablePrivileges($db, $table)
$privMap[$user][$host][] = $row;
}
- $html_output .= PMA_getHtmlTableBodyForSpecificDbOrTablePrivs(
- $privMap, $db, $table
- );
+ $html_output .= PMA_getHtmlTableBodyForSpecificDbOrTablePrivs($privMap, $db);
$html_output .= '';
$html_output .= '';
$html_output .= '';
@@ -2011,11 +2009,10 @@ function PMA_getHtmlForSpecificTablePrivileges($db, $table)
*
* @param array $privMap priviledge map
* @param boolean $db database
- * @param boolean $table table
*
* @return string $html_output
*/
-function PMA_getHtmlTableBodyForSpecificDbOrTablePrivs($privMap, $db, $table = null)
+function PMA_getHtmlTableBodyForSpecificDbOrTablePrivs($privMap, $db)
{
$html_output = '';
$odd_row = true;
@@ -2402,11 +2399,11 @@ function PMA_getExtraDataForAjaxBehavior(
* pagination
*/
$new_user_initial = strtoupper(substr($username, 0, 1));
- $new_user_initial_string = ' $new_user_initial)) .'">'
. $new_user_initial . '';
$extra_data['new_user_initial'] = $new_user_initial;
- $extra_data['new_user_initial_string'] = $new_user_initial_string;
+ $extra_data['new_user_initial_string'] = $newUserInitialString;
}
if (isset($_POST['update_privs'])) {
@@ -3207,12 +3204,12 @@ function PMA_getDbRightsForUserOverview()
// we also want users not in table `user` but in other table
$tables = $GLOBALS['dbi']->fetchResult('SHOW TABLES FROM `mysql`;');
- $tables_to_search_for_users = array(
+ $tablesSearchForUsers = array(
'user', 'db', 'tables_priv', 'columns_priv', 'procs_priv',
);
$db_rights_sqls = array();
- foreach ($tables_to_search_for_users as $table_search_in) {
+ foreach ($tablesSearchForUsers as $table_search_in) {
if (in_array($table_search_in, $tables)) {
$db_rights_sqls[] = 'SELECT DISTINCT `User`, `Host` FROM `mysql`.`'
. $table_search_in . '` '
diff --git a/libraries/server_status.lib.php b/libraries/server_status.lib.php
index a602e2494c..f3eef5958a 100644
--- a/libraries/server_status.lib.php
+++ b/libraries/server_status.lib.php
@@ -312,11 +312,9 @@ function PMA_getHtmlForServerStateConnections($ServerStatusData)
/**
* Prints Server Process list
*
- * @param PMA_ServerStatusData $ServerStatusData Server status data
- *
* @return string
*/
-function PMA_getHtmlForServerProcesslist($ServerStatusData)
+function PMA_getHtmlForServerProcesslist()
{
$url_params = array();
@@ -368,7 +366,7 @@ function PMA_getHtmlForServerProcesslist($ServerStatusData)
'order_by_field' => 'Info'
)
);
- $sortable_columns_count = count($sortable_columns);
+ $sortableColCount = count($sortable_columns);
if (PMA_DRIZZLE) {
$left_str = 'left(p.info, '
@@ -455,7 +453,7 @@ function PMA_getHtmlForServerProcesslist($ServerStatusData)
$retval .= '';
- if (! PMA_DRIZZLE && (0 === --$sortable_columns_count)) {
+ if (! PMA_DRIZZLE && (0 === --$sortableColCount)) {
$retval .= '';
if ($show_full_sql) {
$retval .= PMA_Util::getImage(
diff --git a/libraries/server_status_monitor.lib.php b/libraries/server_status_monitor.lib.php
index 842745935e..c655211fba 100644
--- a/libraries/server_status_monitor.lib.php
+++ b/libraries/server_status_monitor.lib.php
@@ -552,20 +552,19 @@ function PMA_getJsonForChartingData()
*/
function PMA_getJsonForLogDataTypeSlow($start, $end)
{
- $q = 'SELECT start_time, user_host, ';
- $q .= 'Sec_to_Time(Sum(Time_to_Sec(query_time))) as query_time, ';
- $q .= 'Sec_to_Time(Sum(Time_to_Sec(lock_time))) as lock_time, ';
- $q .= 'SUM(rows_sent) AS rows_sent, ';
- $q .= 'SUM(rows_examined) AS rows_examined, db, sql_text, ';
- $q .= 'COUNT(sql_text) AS \'#\' ';
- $q .= 'FROM `mysql`.`slow_log` ';
- $q .= 'WHERE start_time > FROM_UNIXTIME(' . $start . ') ';
- $q .= 'AND start_time < FROM_UNIXTIME(' . $end . ') GROUP BY sql_text';
+ $query = 'SELECT start_time, user_host, ';
+ $query .= 'Sec_to_Time(Sum(Time_to_Sec(query_time))) as query_time, ';
+ $query .= 'Sec_to_Time(Sum(Time_to_Sec(lock_time))) as lock_time, ';
+ $query .= 'SUM(rows_sent) AS rows_sent, ';
+ $query .= 'SUM(rows_examined) AS rows_examined, db, sql_text, ';
+ $query .= 'COUNT(sql_text) AS \'#\' ';
+ $query .= 'FROM `mysql`.`slow_log` ';
+ $query .= 'WHERE start_time > FROM_UNIXTIME(' . $start . ') ';
+ $query .= 'AND start_time < FROM_UNIXTIME(' . $end . ') GROUP BY sql_text';
- $result = $GLOBALS['dbi']->tryQuery($q);
+ $result = $GLOBALS['dbi']->tryQuery($query);
$return = array('rows' => array(), 'sum' => array());
- $type = '';
while ($row = $GLOBALS['dbi']->fetchAssoc($result)) {
$type = strtolower(
@@ -621,18 +620,17 @@ function PMA_getJsonForLogDataTypeGeneral($start, $end)
= 'AND argument REGEXP \'^(INSERT|SELECT|UPDATE|DELETE)\' ';
}
- $q = 'SELECT TIME(event_time) as event_time, user_host, thread_id, ';
- $q .= 'server_id, argument, count(argument) as \'#\' ';
- $q .= 'FROM `mysql`.`general_log` ';
- $q .= 'WHERE command_type=\'Query\' ';
- $q .= 'AND event_time > FROM_UNIXTIME(' . $start . ') ';
- $q .= 'AND event_time < FROM_UNIXTIME(' . $end . ') ';
- $q .= $limitTypes . 'GROUP by argument'; // HAVING count > 1';
+ $query = 'SELECT TIME(event_time) as event_time, user_host, thread_id, ';
+ $query .= 'server_id, argument, count(argument) as \'#\' ';
+ $query .= 'FROM `mysql`.`general_log` ';
+ $query .= 'WHERE command_type=\'Query\' ';
+ $query .= 'AND event_time > FROM_UNIXTIME(' . $start . ') ';
+ $query .= 'AND event_time < FROM_UNIXTIME(' . $end . ') ';
+ $query .= $limitTypes . 'GROUP by argument'; // HAVING count > 1';
- $result = $GLOBALS['dbi']->tryQuery($q);
+ $result = $GLOBALS['dbi']->tryQuery($query);
$return = array('rows' => array(), 'sum' => array());
- $type = '';
$insertTables = array();
$insertTablesFirst = -1;
$i = 0;
diff --git a/libraries/transformations.lib.php b/libraries/transformations.lib.php
index ddf1c60aac..661d611908 100644
--- a/libraries/transformations.lib.php
+++ b/libraries/transformations.lib.php
@@ -232,21 +232,21 @@ function PMA_getMIME($db, $table, $strict = false)
/**
* Set a single mimetype to a certain value.
*
- * @param string $db the name of the db
- * @param string $table the name of the table
- * @param string $key the name of the column
- * @param string $mimetype the mimetype of the column
- * @param string $transformation the transformation of the column
- * @param string $transformation_options the transformation options of the column
- * @param boolean $forcedelete force delete, will erase any existing
- * comments for this column
+ * @param string $db the name of the db
+ * @param string $table the name of the table
+ * @param string $key the name of the column
+ * @param string $mimetype the mimetype of the column
+ * @param string $transformation the transformation of the column
+ * @param string $transformationOpt the transformation options of the column
+ * @param boolean $forcedelete force delete, will erase any existing
+ * comments for this column
*
* @access public
*
* @return boolean true, if comment-query was made.
*/
function PMA_setMIME($db, $table, $key, $mimetype, $transformation,
- $transformation_options, $forcedelete = false
+ $transformationOpt, $forcedelete = false
) {
$cfgRelation = PMA_getRelationsParam();
@@ -287,7 +287,7 @@ function PMA_setMIME($db, $table, $key, $mimetype, $transformation,
if (! $forcedelete
&& (strlen($mimetype) || strlen($transformation)
- || strlen($transformation_options) || strlen($row['comment']))
+ || strlen($transformationOpt) || strlen($row['comment']))
) {
$upd_query = 'UPDATE ' . PMA_Util::backquote($cfgRelation['db']) . '.'
. PMA_Util::backquote($cfgRelation['column_info'])
@@ -297,7 +297,7 @@ function PMA_setMIME($db, $table, $key, $mimetype, $transformation,
. '`transformation` = \''
. PMA_Util::sqlAddSlashes($transformation) . '\', '
. '`transformation_options` = \''
- . PMA_Util::sqlAddSlashes($transformation_options) . '\'';
+ . PMA_Util::sqlAddSlashes($transformationOpt) . '\'';
} else {
$upd_query = 'DELETE FROM ' . PMA_Util::backquote($cfgRelation['db'])
. '.' . PMA_Util::backquote($cfgRelation['column_info']);
@@ -308,7 +308,7 @@ function PMA_setMIME($db, $table, $key, $mimetype, $transformation,
AND `column_name` = \'' . PMA_Util::sqlAddSlashes($key) . '\'';
} elseif (strlen($mimetype)
|| strlen($transformation)
- || strlen($transformation_options)
+ || strlen($transformationOpt)
) {
$upd_query = 'INSERT INTO ' . PMA_Util::backquote($cfgRelation['db'])
@@ -321,7 +321,7 @@ function PMA_setMIME($db, $table, $key, $mimetype, $transformation,
. '\'' . PMA_Util::sqlAddSlashes($key) . '\','
. '\'' . PMA_Util::sqlAddSlashes($mimetype) . '\','
. '\'' . PMA_Util::sqlAddSlashes($transformation) . '\','
- . '\'' . PMA_Util::sqlAddSlashes($transformation_options) . '\')';
+ . '\'' . PMA_Util::sqlAddSlashes($transformationOpt) . '\')';
}
if (isset($upd_query)) {
diff --git a/setup/lib/form_processing.lib.php b/setup/lib/form_processing.lib.php
index a35a3b87d0..e32a2bdd1b 100644
--- a/setup/lib/form_processing.lib.php
+++ b/setup/lib/form_processing.lib.php
@@ -38,17 +38,17 @@ function PMA_process_formset(FormDisplay $form_display)
$page = filter_input(INPUT_GET, 'page');
$formset = filter_input(INPUT_GET, 'formset');
$formset = $formset ? "{$separator}formset=$formset" : '';
- $id = filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT);
- if ($id === null && $page == 'servers') {
+ $formId = filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT);
+ if ($formId === null && $page == 'servers') {
// we've just added a new server, get its id
- $id = $form_display->getConfigFile()->getServerCount();
+ $formId = $form_display->getConfigFile()->getServerCount();
}
- $id = $id ? "{$separator}id=$id" : '';
+ $formId = $formId ? "{$separator}id=$formId" : '';
?>
-
+
@@ -56,7 +56,7 @@ function PMA_process_formset(FormDisplay $form_display)
displayErrors() ?>
-
$fresh,
'active' => true,
'title' => $title,
diff --git a/test/libraries/PMA_server_privileges_test.php b/test/libraries/PMA_server_privileges_test.php
index f16590cb67..2d14684b45 100644
--- a/test/libraries/PMA_server_privileges_test.php
+++ b/test/libraries/PMA_server_privileges_test.php
@@ -1411,10 +1411,9 @@ class PMA_ServerPrivileges_Test extends PHPUnit_Framework_TestCase
{
$privMap = null;
$db = "pma_dbname";
- $table = "pma_table";
//$privMap = null
- $html = PMA_getHtmlTableBodyForSpecificDbOrTablePrivs($privMap, $db, $table);
+ $html = PMA_getHtmlTableBodyForSpecificDbOrTablePrivs($privMap, $db);
$this->assertContains(
__('No user found.'),
$html
@@ -1431,7 +1430,7 @@ class PMA_ServerPrivileges_Test extends PHPUnit_Framework_TestCase
)
);
- $html = PMA_getHtmlTableBodyForSpecificDbOrTablePrivs($privMap, $db, $table);
+ $html = PMA_getHtmlTableBodyForSpecificDbOrTablePrivs($privMap, $db);
//validate 1: $current_privileges
$current_privileges = $privMap["user1"]["hostname1"];