Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
a1c4d46dfd
@ -22,6 +22,7 @@ phpMyAdmin - ChangeLog
|
||||
+ Patch #3507111 Display distinct results, linked to corresponding data rows
|
||||
+ Update to jQuery 1.7.2
|
||||
- bug #3507917 [export] JSON has unescaped values for allegedly numeric columns
|
||||
+ rfe #3516187 show tables creation, last update, last check timestamps in db_structure
|
||||
|
||||
3.5.1.0 (not yet released)
|
||||
- bug #3510784 [edit] Limit clause ignored when sort order is remembered
|
||||
|
||||
@ -1654,6 +1654,18 @@ CREATE DATABASE,ALTER DATABASE,DROP DATABASE</pre>
|
||||
<dd>Defines whether to suggest a database name on the
|
||||
"Create Database" form or to keep the textfield empty.</dd>
|
||||
|
||||
<dt id="cfg_ShowDbStructureCreation">$cfg['ShowDbStructureCreation'] boolean</dt>
|
||||
<dd>Defines whether the database structure page (tables list) has a
|
||||
"Creation" column that displays when each table was created.</dd>
|
||||
|
||||
<dt id="cfg_ShowDbStructureLastUpdate">$cfg['ShowDbStructureLastUpdate'] boolean</dt>
|
||||
<dd>Defines whether the database structure page (tables list) has a
|
||||
"Last update" column that displays when each table was last updated.</dd>
|
||||
|
||||
<dt id="cfg_ShowDbStructureLastCheck">$cfg['cfg_ShowDbStructureLastCheck'] boolean</dt>
|
||||
<dd>Defines whether the database structure page (tables list) has a
|
||||
"Last check" column that displays when each table was last checked.</dd>
|
||||
|
||||
<dt id="cfg_NavigationBarIconic">$cfg['NavigationBarIconic'] string</dt>
|
||||
<dd>Defines whether navigation bar buttons and the right panel top menu
|
||||
contain text or symbols only. A value of TRUE displays icons, FALSE
|
||||
|
||||
@ -130,6 +130,9 @@ $i = $sum_entries = 0;
|
||||
$sum_size = (double) 0;
|
||||
$overhead_size = (double) 0;
|
||||
$overhead_check = '';
|
||||
$create_time_all = '';
|
||||
$update_time_all = '';
|
||||
$check_time_all = '';
|
||||
$checked = !empty($checkall) ? ' checked="checked"' : '';
|
||||
$num_columns = $cfg['PropertiesNumColumns'] > 1
|
||||
? ceil($num_tables / $cfg['PropertiesNumColumns']) + 1
|
||||
@ -264,6 +267,44 @@ foreach ($tables as $keyname => $each_table) {
|
||||
}
|
||||
} // end if
|
||||
|
||||
unset($showtable);
|
||||
|
||||
if ($GLOBALS['cfg']['ShowDbStructureCreation']) {
|
||||
$showtable = PMA_Table::sGetStatusInfo($db, $each_table['TABLE_NAME'], null, true);
|
||||
$create_time = isset($showtable['Create_time']) ? $showtable['Create_time'] : false;
|
||||
|
||||
// show oldest creation date in summary row
|
||||
if ($create_time && (!$create_time_all || $create_time < $create_time_all)) {
|
||||
$create_time_all = $create_time;
|
||||
}
|
||||
}
|
||||
|
||||
if ($GLOBALS['cfg']['ShowDbStructureLastUpdate']) {
|
||||
// $showtable might already be set from ShowDbStructureCreation, see above
|
||||
if (!isset($showtable)) {
|
||||
$showtable = PMA_Table::sGetStatusInfo($db, $each_table['TABLE_NAME'], null, true);
|
||||
}
|
||||
$update_time = isset($showtable['Update_time']) ? $showtable['Update_time'] : false;
|
||||
|
||||
// show newest update date in summary row
|
||||
if ($update_time && $update_time > $update_time_all) {
|
||||
$update_time_all = $update_time;
|
||||
}
|
||||
}
|
||||
|
||||
if ($GLOBALS['cfg']['ShowDbStructureLastCheck']) {
|
||||
// $showtable might already be set from ShowDbStructureCreation, see above
|
||||
if (!isset($showtable)) {
|
||||
$showtable = PMA_Table::sGetStatusInfo($db, $each_table['TABLE_NAME'], null, true);
|
||||
}
|
||||
$check_time = isset($showtable['Check_time']) ? $showtable['Check_time'] : false;
|
||||
|
||||
// show newest check date in summary row
|
||||
if ($check_time && $check_time > $check_time_all) {
|
||||
$check_time_all = $check_time;
|
||||
}
|
||||
}
|
||||
|
||||
$alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$each_table['TABLE_NAME']]))
|
||||
? str_replace(' ', ' ', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
|
||||
: str_replace(' ', ' ', htmlspecialchars($each_table['TABLE_NAME']));
|
||||
@ -484,6 +525,15 @@ foreach ($tables as $keyname => $each_table) {
|
||||
href="tbl_structure.php?<?php echo $tbl_url_query; ?>#showusage"
|
||||
><?php echo '<span>' . $formatted_size . '</span> <span class="unit">' . $unit . '</span>'; ?></a></td>
|
||||
<td class="value tbl_overhead"><?php echo $overhead; ?></td>
|
||||
<?php } // end if
|
||||
if ($GLOBALS['cfg']['ShowDbStructureCreation']) { ?>
|
||||
<td class="value tbl_creation"><?php echo $create_time ? PMA_localisedDate(strtotime($create_time)) : '-'; ?></td>
|
||||
<?php } // end if
|
||||
if ($GLOBALS['cfg']['ShowDbStructureLastUpdate']) { ?>
|
||||
<td class="value tbl_last_update"><?php echo $update_time ? PMA_localisedDate(strtotime($update_time)) : '-'; ?></td>
|
||||
<?php } // end if
|
||||
if ($GLOBALS['cfg']['ShowDbStructureLastCheck']) { ?>
|
||||
<td class="value tbl_last_check"><?php echo $check_time ? PMA_localisedDate(strtotime($check_time)) : '-'; ?></td>
|
||||
<?php } // end if ?>
|
||||
<?php } elseif ($table_is_view) { ?>
|
||||
<td class="value">-</td>
|
||||
@ -551,6 +601,25 @@ if ($is_show_stats) {
|
||||
<th class="value tbl_overhead"><?php echo $overhead_formatted . ' ' . $overhead_unit; ?></th>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($GLOBALS['cfg']['ShowDbStructureCreation']) {
|
||||
echo ' <th class="value tbl_creation">' . "\n"
|
||||
. ' ' . ($create_time_all ? PMA_localisedDate(strtotime($create_time_all)) : '-')
|
||||
. ' </th>';
|
||||
}
|
||||
|
||||
if ($GLOBALS['cfg']['ShowDbStructureLastUpdate']) {
|
||||
echo ' <th class="value tbl_last_update">' . "\n"
|
||||
. ' ' . ($update_time_all ? PMA_localisedDate(strtotime($update_time_all)) : '-')
|
||||
. ' </th>';
|
||||
}
|
||||
|
||||
if ($GLOBALS['cfg']['ShowDbStructureLastCheck']) {
|
||||
echo ' <th class="value tbl_last_check">' . "\n"
|
||||
. ' ' . ($check_time_all ? PMA_localisedDate(strtotime($check_time_all)) : '-')
|
||||
. ' </th>';
|
||||
}
|
||||
|
||||
?>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@ -951,6 +951,32 @@ $cfg['ShowCreateDb'] = true;
|
||||
$cfg['SuggestDBName'] = true;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Database structure
|
||||
*/
|
||||
|
||||
/**
|
||||
* show creation timestamp column in database structure (true|false)?
|
||||
*
|
||||
* @global boolean $cfg['ShowDbStructureCreation']
|
||||
*/
|
||||
$cfg['ShowDbStructureCreation'] = false;
|
||||
|
||||
/**
|
||||
* show last update timestamp column in database structure (true|false)?
|
||||
*
|
||||
* @global boolean $cfg['ShowDbStructureLastUpdate']
|
||||
*/
|
||||
$cfg['ShowDbStructureLastUpdate'] = false;
|
||||
|
||||
/**
|
||||
* show last check timestamp column in database structure (true|false)?
|
||||
*
|
||||
* @global boolean $cfg['ShowDbStructureLastCheck']
|
||||
*/
|
||||
$cfg['ShowDbStructureLastCheck'] = false;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* In browse mode...
|
||||
*/
|
||||
|
||||
@ -223,6 +223,8 @@ $strConfigForm_Sql_validator = __('SQL Validator');
|
||||
$strConfigForm_Sql_validator_desc = __('If you wish to use the SQL Validator service, you should be aware that [strong]all SQL statements are stored anonymously for statistical purposes[/strong].[br][em][a@http://sqlvalidator.mimer.com/]Mimer SQL Validator[/a], Copyright 2002 Upright Database Technology. All rights reserved.[/em]');
|
||||
$strConfigForm_Startup = __('Startup');
|
||||
$strConfigForm_Startup_desc = __('Customize startup page');
|
||||
$strConfigForm_DbStructure = __('Database structure');
|
||||
$strConfigForm_DbStructure_desc = __('Choose which details to show in the database structure (list of tables)');
|
||||
$strConfigForm_Tabs = __('Tabs');
|
||||
$strConfigForm_Tabs_desc = __('Choose how you want tabs to work');
|
||||
$strConfigForm_Text_fields = __('Text fields');
|
||||
@ -457,6 +459,12 @@ $strConfigShowAll_name = __('Allow to display all the rows');
|
||||
$strConfigShowChgPassword_desc = __('Please note that enabling this has no effect with [kbd]config[/kbd] authentication mode because the password is hard coded in the configuration file; this does not limit the ability to execute the same command directly');
|
||||
$strConfigShowChgPassword_name = __('Show password change form');
|
||||
$strConfigShowCreateDb_name = __('Show create database form');
|
||||
$strConfigShowDbStructureCreation_desc = __('Show or hide a column displaying the Creation timestamp for all tables');
|
||||
$strConfigShowDbStructureCreation_name = __('Show Creation timestamp');
|
||||
$strConfigShowDbStructureLastUpdate_desc = __('Show or hide a column displaying the Last update timestamp for all tables');
|
||||
$strConfigShowDbStructureLastUpdate_name = __('Show Last update timestamp');
|
||||
$strConfigShowDbStructureLastCheck_desc = __('Show or hide a column displaying the Last check timestamp for all tables');
|
||||
$strConfigShowDbStructureLastCheck_name = __('Show Last check timestamp');
|
||||
$strConfigShowDisplayDirection_desc = __('Defines whether or not type display direction option is shown when browsing a table');
|
||||
$strConfigShowDisplayDirection_name = __('Show display direction');
|
||||
$strConfigShowFieldTypesInDataEditView_desc = __('Defines whether or not type fields should be initially displayed in edit/insert mode');
|
||||
|
||||
@ -195,6 +195,10 @@ $forms['Main_frame']['Startup'] = array(
|
||||
'ShowServerInfo',
|
||||
'ShowPhpInfo',
|
||||
'ShowChgPassword');
|
||||
$forms['Main_frame']['DbStructure'] = array(
|
||||
'ShowDbStructureCreation',
|
||||
'ShowDbStructureLastUpdate',
|
||||
'ShowDbStructureLastCheck');
|
||||
$forms['Main_frame']['Browse'] = array(
|
||||
'NavigationBarIconic',
|
||||
'ShowAll',
|
||||
|
||||
@ -103,6 +103,10 @@ $forms['Main_frame']['Startup'] = array(
|
||||
':group:end',
|
||||
'ShowStats',
|
||||
'ShowServerInfo');
|
||||
$forms['Main_frame']['DbStructure'] = array(
|
||||
'ShowDbStructureCreation',
|
||||
'ShowDbStructureLastUpdate',
|
||||
'ShowDbStructureLastCheck');
|
||||
$forms['Main_frame']['Browse'] = array(
|
||||
'NavigationBarIconic',
|
||||
'PropertiesIconic',
|
||||
|
||||
@ -196,12 +196,15 @@ if (! isset($sot_ready)) {
|
||||
|
||||
if (isset($_REQUEST['sort'])) {
|
||||
$sortable_name_mappings = array(
|
||||
'table' => 'Name',
|
||||
'records' => 'Rows',
|
||||
'type' => 'Engine',
|
||||
'collation' => 'Collation',
|
||||
'size' => 'Data_length',
|
||||
'overhead' => 'Data_free'
|
||||
'table' => 'Name',
|
||||
'records' => 'Rows',
|
||||
'type' => 'Engine',
|
||||
'collation' => 'Collation',
|
||||
'size' => 'Data_length',
|
||||
'overhead' => 'Data_free',
|
||||
'creation' => 'Create_time',
|
||||
'last_update' => 'Update_time',
|
||||
'last_check' => 'Check_time'
|
||||
);
|
||||
|
||||
// Make sure the sort type is implemented
|
||||
|
||||
@ -55,6 +55,21 @@ function PMA_TableHeader($db_is_information_schema = false, $replication = false
|
||||
. ' <th>' . PMA_SortableTableHeader(__('Overhead'), 'overhead', 'DESC') . '</th>' . "\n";
|
||||
$cnt += 2;
|
||||
}
|
||||
if ($GLOBALS['cfg']['ShowDbStructureCreation']) {
|
||||
// larger values are more interesting so default sort order is DESC
|
||||
echo ' <th>' . PMA_SortableTableHeader(__('Creation'), 'creation', 'DESC') . '</th>' . "\n";
|
||||
$cnt += 2;
|
||||
}
|
||||
if ($GLOBALS['cfg']['ShowDbStructureLastUpdate']) {
|
||||
// larger values are more interesting so default sort order is DESC
|
||||
echo ' <th>' . PMA_SortableTableHeader(__('Last update'), 'last_update', 'DESC') . '</th>' . "\n";
|
||||
$cnt += 2;
|
||||
}
|
||||
if ($GLOBALS['cfg']['ShowDbStructureLastCheck']) {
|
||||
// larger values are more interesting so default sort order is DESC
|
||||
echo ' <th>' . PMA_SortableTableHeader(__('Last check'), 'last_check', 'DESC') . '</th>' . "\n";
|
||||
$cnt += 2;
|
||||
}
|
||||
echo '</tr>' . "\n";
|
||||
echo '</thead>' . "\n";
|
||||
echo '<tbody>' . "\n";
|
||||
|
||||
@ -1118,7 +1118,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
|
||||
// (unless coming from Browse mode print view)
|
||||
elseif (($GLOBALS['cfg']['RowActionLinks'] == 'left' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
|
||||
&& ($is_display['edit_lnk'] == 'nn' && $is_display['del_lnk'] == 'nn')
|
||||
&& (! $GLOBALS['is_header_sent'])
|
||||
&& (! isset($GLOBALS['is_header_sent']) || ! $GLOBALS['is_header_sent'])
|
||||
) {
|
||||
$vertical_display['emptyafter'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 4 : 1;
|
||||
if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
|
||||
|
||||
6
sql.php
6
sql.php
@ -848,8 +848,10 @@ if ((0 == $num_rows && 0 == $unlim_num_rows) || $is_affected) {
|
||||
$disp_mode = 'nnnn110111';
|
||||
}
|
||||
|
||||
$message = PMA_Message::success($message);
|
||||
echo PMA_showMessage($message, $GLOBALS['sql_query'], 'success');
|
||||
if (isset($message)) {
|
||||
$message = PMA_Message::success($message);
|
||||
echo PMA_showMessage($message, $GLOBALS['sql_query'], 'success');
|
||||
}
|
||||
PMA_displayTable($result, $disp_mode, $analyzed_sql);
|
||||
exit();
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@ if (isset($_REQUEST['do_save_data'])) {
|
||||
* $selected comes from multi_submits.inc.php
|
||||
*/
|
||||
if ($abort == false) {
|
||||
if ($_REQUEST['ajax_request'] != true) {
|
||||
if (!isset($_REQUEST['ajax_request']) || $_REQUEST['ajax_request'] != true) {
|
||||
include_once 'libraries/tbl_links.inc.php';
|
||||
}
|
||||
|
||||
|
||||
@ -225,7 +225,7 @@ if (isset($result) && empty($message_to_show)) {
|
||||
$_message = $result ? $message = PMA_Message::success(__('Your SQL query has been executed successfully')) : PMA_Message::error(__('Error'));
|
||||
// $result should exist, regardless of $_message
|
||||
$_type = $result ? 'success' : 'error';
|
||||
if ( $_REQUEST['ajax_request'] == true) {
|
||||
if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) {
|
||||
$extra_data['sql_query'] = PMA_showMessage(null, $sql_query);
|
||||
PMA_ajaxResponse($_message, $_message->isSuccess(), $extra_data);
|
||||
}
|
||||
@ -244,7 +244,7 @@ if (isset($result) && empty($message_to_show)) {
|
||||
unset($_message, $_type);
|
||||
}
|
||||
|
||||
$url_params['goto'] = 'tbl_operations.php';
|
||||
$url_params['goto'] =
|
||||
$url_params['back'] = 'tbl_operations.php';
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user