Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
639a7285c3
@ -1071,6 +1071,12 @@ $cfg['ShowCreateDb'] = true;
|
||||
* Database structure
|
||||
*/
|
||||
|
||||
/** show charset column in database structure (true|false)?
|
||||
*
|
||||
* @global boolean $cfg['ShowDbStructureCharset']
|
||||
*/
|
||||
$cfg['ShowDbStructureCharset'] = false;
|
||||
|
||||
/**
|
||||
* show comment column in database structure (true|false)?
|
||||
*
|
||||
|
||||
@ -856,6 +856,10 @@ $strConfigShowDbStructureLastCheck_desc = __(
|
||||
'Show or hide a column displaying the Last check timestamp for all tables.'
|
||||
);
|
||||
$strConfigShowDbStructureLastCheck_name = __('Show last check timestamp');
|
||||
$strConfigShowDbStructureCharset_desc = __(
|
||||
'Show or hide a column displaying the charset for all tables.'
|
||||
);
|
||||
$strConfigShowDbStructureCharset_name = __('Show table charset');
|
||||
$strConfigShowFieldTypesInDataEditView_desc = __(
|
||||
'Defines whether or not type fields should be initially displayed in ' .
|
||||
'edit/insert mode.'
|
||||
|
||||
@ -207,6 +207,7 @@ $forms['Main_panel']['Startup'] = array(
|
||||
'ShowPhpInfo',
|
||||
'ShowChgPassword');
|
||||
$forms['Main_panel']['DbStructure'] = array(
|
||||
'ShowDbStructureCharset',
|
||||
'ShowDbStructureComment',
|
||||
'ShowDbStructureCreation',
|
||||
'ShowDbStructureLastUpdate',
|
||||
|
||||
@ -114,6 +114,7 @@ $forms['Main_panel']['Startup'] = array(
|
||||
'ShowStats',
|
||||
'ShowServerInfo');
|
||||
$forms['Main_panel']['DbStructure'] = array(
|
||||
'ShowDbStructureCharset',
|
||||
'ShowDbStructureComment',
|
||||
'ShowDbStructureCreation',
|
||||
'ShowDbStructureLastUpdate',
|
||||
|
||||
@ -435,6 +435,14 @@ class DatabaseStructureController extends DatabaseController
|
||||
}
|
||||
} // end if
|
||||
|
||||
if ($GLOBALS['cfg']['ShowDbStructureCharset']) {
|
||||
if (isset($current_table['Collation'])) {
|
||||
$charset = mb_substr($collation, 0, mb_strpos($collation, "_"));
|
||||
} else {
|
||||
$charset = '';
|
||||
}
|
||||
}
|
||||
|
||||
if ($GLOBALS['cfg']['ShowDbStructureCreation']) {
|
||||
$create_time = isset($current_table['Create_time'])
|
||||
? $current_table['Create_time'] : '';
|
||||
@ -631,6 +639,8 @@ class DatabaseStructureController extends DatabaseController
|
||||
? $update_time : '',
|
||||
'check_time' => isset($check_time)
|
||||
? $check_time : '',
|
||||
'charset' => isset($charset)
|
||||
? $charset : '',
|
||||
'is_show_stats' => $this->_is_show_stats,
|
||||
'ignored' => $ignored,
|
||||
'do' => $do,
|
||||
@ -651,6 +661,7 @@ class DatabaseStructureController extends DatabaseController
|
||||
$this->response->addHTML('</tbody>');
|
||||
|
||||
$db_collation = $this->dbi->getDbCollation($this->db);
|
||||
$db_charset = mb_substr($db_collation, 0, mb_strpos($db_collation, "_"));
|
||||
|
||||
// Show Summary
|
||||
$this->response->addHTML(
|
||||
@ -662,6 +673,7 @@ class DatabaseStructureController extends DatabaseController
|
||||
'sum_entries' => $sum_entries,
|
||||
'db_collation' => $db_collation,
|
||||
'is_show_stats' => $this->_is_show_stats,
|
||||
'db_charset' => $db_charset,
|
||||
'sum_size' => $sum_size,
|
||||
'overhead_size' => $overhead_size,
|
||||
'create_time_all' => $create_time_all,
|
||||
|
||||
@ -58,6 +58,7 @@ $cell_text = ($approx_rows)
|
||||
<?php endif; ?>
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($is_show_stats): ?>
|
||||
<?php
|
||||
list($sum_formatted, $unit) = PMA\libraries\Util::formatByteDown(
|
||||
@ -69,6 +70,12 @@ $cell_text = ($approx_rows)
|
||||
<th class="value tbl_size"><?= $sum_formatted , ' ' , $unit; ?></th>
|
||||
<th class="value tbl_overhead"><?= $overhead_formatted , ' ' , $overhead_unit; ?></th>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureCharset']): ?>
|
||||
<th>
|
||||
<?= $db_charset; ?>
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureComment']): ?>
|
||||
<th></th>
|
||||
<?php endif; ?>
|
||||
|
||||
@ -116,6 +116,14 @@
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!($GLOBALS['cfg']['ShowDbStructureCharset'] > 1)): ?>
|
||||
<?php if (strlen($charset)): ?>
|
||||
<td class="nowrap">
|
||||
<?= $charset; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureComment']): ?>
|
||||
<?php $comment = $current_table['Comment']; ?>
|
||||
<td>
|
||||
@ -163,6 +171,9 @@
|
||||
<td class="value tbl_size">-</td>
|
||||
<td class="value tbl_overhead">-</td>
|
||||
<?php endif; ?>
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureCharset']): ?>
|
||||
<td></td>
|
||||
<?php endif; ?>
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureComment']): ?>
|
||||
<td></td>
|
||||
<?php endif; ?>
|
||||
|
||||
@ -78,6 +78,16 @@ if ($GLOBALS['cfg']['NumFavoriteTables'] > 0) {
|
||||
); $cnt++; ?></th>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureCharset']): ?>
|
||||
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
|
||||
array(
|
||||
'title' => __('Charset'),
|
||||
'sort' => 'charset',
|
||||
'initial_sort_order' => 'ASC'
|
||||
)
|
||||
); $cnt++; ?></th>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureComment']): ?>
|
||||
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
|
||||
array(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user