diff --git a/db_structure.php b/db_structure.php
index e0d7f74b75..c425e8af19 100644
--- a/db_structure.php
+++ b/db_structure.php
@@ -140,7 +140,7 @@ $overhead_check = '';
$create_time_all = '';
$update_time_all = '';
$check_time_all = '';
-$checked = !empty($checkall) ? ' checked="checked"' : '';
+$checked = (!empty($checkall) ? ' checked="checked"' : '');
$num_columns = $cfg['PropertiesNumColumns'] > 1
? ceil($num_tables / $cfg['PropertiesNumColumns']) + 1
: 0;
@@ -319,8 +319,8 @@ $response->addHTML('
');
/* DATABASE WORK */
/* Printable view of a table */
$response->addHTML(
- PMA_getTablePrintViewLink($url_query)
- . PMA_getDataDictionaryLink($url_query)
+ PMA_getHtmlForTablePrintViewLink($url_query)
+ . PMA_getHtmlForDataDictionaryLink($url_query)
);
if (empty($db_is_information_schema)) {
diff --git a/libraries/operations.lib.php b/libraries/operations.lib.php
index eedaf5437d..de42fde436 100644
--- a/libraries/operations.lib.php
+++ b/libraries/operations.lib.php
@@ -467,7 +467,7 @@ function PMA_getSqlQueryForCopyTable($tables_full, $sql_query, $move, $db)
if (! PMA_Table::moveCopy(
$db, $each_table, $_REQUEST['newname'], $each_table,
- isset($this_what) ? $this_what : 'data',
+ (isset($this_what) ? $this_what : 'data'),
$move, 'db_copy'
)) {
$error = true;
@@ -1033,9 +1033,9 @@ function PMA_getHtmlForCopytable()
$html_output .= '';
+ : '' . '/>');
$html_output .= ''
. '';
diff --git a/libraries/structure.lib.php b/libraries/structure.lib.php
index 712f988366..837ec0e532 100644
--- a/libraries/structure.lib.php
+++ b/libraries/structure.lib.php
@@ -128,9 +128,9 @@ function PMA_getTableDropQueryAndMessage($table_is_view, $current_table)
$current_table['TABLE_NAME']
);
$drop_message = sprintf(
- ($table_is_view || $current_table['ENGINE'] == null)
+ (($table_is_view || $current_table['ENGINE'] == null)
? __('View %s has been dropped')
- : __('Table %s has been dropped'),
+ : __('Table %s has been dropped')),
str_replace(
' ',
' ',
@@ -355,7 +355,7 @@ function PMA_getHtmlForCheckTablesHavingOverheadlink($overhead_check) {
*
* @return string $html_output
*/
-function PMA_getTablePrintViewLink($url_query)
+function PMA_getHtmlForTablePrintViewLink($url_query)
{
return ''
. ''
@@ -373,7 +373,7 @@ function PMA_getTablePrintViewLink($url_query)
*
* @return string $html_output
*/
-function PMA_getDataDictionaryLink($url_query)
+function PMA_getHtmlForDataDictionaryLink($url_query)
{
return ''
. PMA_CommonFunctions::getInstance()->getIcon(
@@ -1122,7 +1122,7 @@ function PMA_getValuesForAriaTable($db_is_information_schema, $current_table,
list($formatted_overhead, $overhead_unit)
= $common_functions->formatByteDown(
$current_table['Data_free'], 3,
- ($current_table['Data_free'] > 0) ? 1 : 0
+ (($current_table['Data_free'] > 0) ? 1 : 0)
);
$overhead_size += $current_table['Data_free'];
}
@@ -1163,7 +1163,7 @@ function PMA_getValuesForPbmsTable($current_table, $is_show_stats, $sum_size)
$tblsize = $current_table['Data_length'] + $current_table['Index_length'];
$sum_size += $tblsize;
list($formatted_size, $unit) = $common_functions->formatByteDown(
- $tblsize, 3, ($tblsize > 0) ? 1 : 0
+ $tblsize, 3, (($tblsize > 0) ? 1 : 0)
);
}
@@ -1836,28 +1836,26 @@ function PMA_getHtmlDivsForStructureActionsDropdown($class, $isActionEnabled,
$common_functions = PMA_CommonFunctions::getInstance();
$html_output = '';
@@ -1917,17 +1915,17 @@ function PMA_getHtmlForMoreOptionInTableStructure($rownum, $primary_enabled,
if (!PMA_DRIZZLE) {
$html_output .= PMA_getHtmlDivsForStructureActionsDropdown(
'action_spatial replace_in_more',
- $fulltext_enabled, $url_query, $row,
+ $spatial_enabled, $url_query, $row,
$hidden_titles['Spatial'],
- $hidden_titles['NoSpatial'], false, 'ADD FULLTEXT',
+ $hidden_titles['NoSpatial'], false, 'ADD SPATIAL',
__('An index has been added on %s'), false
);
$html_output .= PMA_getHtmlDivsForStructureActionsDropdown(
'action_fulltext replace_in_more',
- $spatial_enabled, $url_query, $row,
+ $fulltext_enabled, $url_query, $row,
$hidden_titles['IdxFulltext'],
- $hidden_titles['NoIdxFulltext'], false, 'ADD SPATIAL',
+ $hidden_titles['NoIdxFulltext'], false, 'ADD FULLTEXT',
__('An index has been added on %s'), false
);
diff --git a/server_privileges.php b/server_privileges.php
index 26114a00f2..c7298b2099 100644
--- a/server_privileges.php
+++ b/server_privileges.php
@@ -215,7 +215,9 @@ if (isset($_REQUEST['adduser_submit']) || isset($_REQUEST['change_copy'])) {
$_add_user_error = true;
} else {
list($create_user_real, $create_user_show, $real_sql_query, $sql_query)
- = PMA_getSqlQueriesForDisplayAndAddUser($username, $hostname, $password);
+ = PMA_getSqlQueriesForDisplayAndAddUser(
+ $username, $hostname, (isset ($password) ? $password : '')
+ );
if (empty($_REQUEST['change_copy'])) {
$_error = false;
@@ -479,7 +481,7 @@ if (empty($_REQUEST['adduser'])
} elseif (isset($_REQUEST['adduser'])) {
// Add user
$response->addHTML(
- PMA_getHtmlForAddUser($random_n, $dbname)
+ PMA_getHtmlForAddUser($random_n, (isset($dbname) ? $dbname : ''))
);
} else {
// check the privileges for a particular database.