Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
6ea1ce69d4
@ -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('</div><hr />');
|
||||
/* 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)) {
|
||||
|
||||
@ -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 .= '<input type="checkbox" name="switch_to_new" value="true"'
|
||||
. 'id="checkbox_switch"'
|
||||
. (isset($pma_switch_to_new) && $pma_switch_to_new == 'true')
|
||||
. ((isset($pma_switch_to_new) && $pma_switch_to_new == 'true')
|
||||
? ' checked="checked"'
|
||||
: '' . '/>';
|
||||
: '' . '/>');
|
||||
$html_output .= '<label for="checkbox_switch">'
|
||||
. __('Switch to copied table') . '</label>'
|
||||
. '</fieldset>';
|
||||
|
||||
@ -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 '<p>'
|
||||
. '<a href="db_printview.php?' . $url_query . '">'
|
||||
@ -373,7 +373,7 @@ function PMA_getTablePrintViewLink($url_query)
|
||||
*
|
||||
* @return string $html_output
|
||||
*/
|
||||
function PMA_getDataDictionaryLink($url_query)
|
||||
function PMA_getHtmlForDataDictionaryLink($url_query)
|
||||
{
|
||||
return '<a href="db_datadict.php?' . $url_query . '">'
|
||||
. 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 = '<div class="' . $class . '">';
|
||||
if (!empty ($isActionEnabled)) {
|
||||
if ($isActionEnabled) {
|
||||
$html_output .= '<a href="sql.php?' . $url_query
|
||||
. '&sql_query='
|
||||
. urlencode(
|
||||
'ALTER TABLE ' . $common_functions->backquote($GLOBALS['table'])
|
||||
. ($isPrimary ? ($primary ? ' DROP PRIMARY KEY,' : '') : '')
|
||||
. ' ' . $syntax . '('
|
||||
. $common_functions->backquote($row['Field']) . ');'
|
||||
)
|
||||
. '&message_to_show=' . urlencode(
|
||||
sprintf(
|
||||
$message,
|
||||
htmlspecialchars($row['Field'])
|
||||
)
|
||||
if ($isActionEnabled) {
|
||||
$html_output .= '<a href="sql.php?' . $url_query
|
||||
. '&sql_query='
|
||||
. urlencode(
|
||||
'ALTER TABLE ' . $common_functions->backquote($GLOBALS['table'])
|
||||
. ($isPrimary ? ($primary ? ' DROP PRIMARY KEY,' : '') : '')
|
||||
. ' ' . $syntax . '('
|
||||
. $common_functions->backquote($row['Field']) . ');'
|
||||
)
|
||||
. '&message_to_show=' . urlencode(
|
||||
sprintf(
|
||||
$message,
|
||||
htmlspecialchars($row['Field'])
|
||||
)
|
||||
. '">'
|
||||
. $hidden_titles
|
||||
. '</a>';
|
||||
} else {
|
||||
$html_output .= $hidden_titles_no;
|
||||
}
|
||||
)
|
||||
. '">'
|
||||
. $hidden_titles
|
||||
. '</a>';
|
||||
} else {
|
||||
$html_output .= $hidden_titles_no;
|
||||
}
|
||||
$html_output .= '</div>';
|
||||
|
||||
@ -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
|
||||
);
|
||||
|
||||
|
||||
@ -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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user