Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo Michael <me@mynetx.net>2012-04-10 01:06:08 +0400
committerJo Michael <me@mynetx.net>2012-04-10 01:09:52 +0400
commit10baa48564fc29fbfc2b22ba5f3a6d48e4bda97c (patch)
tree9f8cd726b7bdfbcd265d9ba03891526a96721577 /db_structure.php
parentb0e67c419c8eb4cc8d9ae12c9cf76f5f7306bfaf (diff)
+ rfe #3516187 show tables last check time in db_structure
Diffstat (limited to 'db_structure.php')
-rw-r--r--db_structure.php37
1 files changed, 31 insertions, 6 deletions
diff --git a/db_structure.php b/db_structure.php
index fdf8f2ac84..9d505ff2c9 100644
--- a/db_structure.php
+++ b/db_structure.php
@@ -132,6 +132,7 @@ $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
@@ -266,8 +267,10 @@ foreach ($tables as $keyname => $each_table) {
}
} // end if
+ unset($showtable);
+
if ($GLOBALS['cfg']['ShowDbStructureCreation']) {
- $showtable = PMA_Table::sGetStatusInfo($db, $each_table['TABLE_NAME']);
+ $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
@@ -279,7 +282,7 @@ foreach ($tables as $keyname => $each_table) {
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']);
+ $showtable = PMA_Table::sGetStatusInfo($db, $each_table['TABLE_NAME'], null, true);
}
$update_time = isset($showtable['Update_time']) ? $showtable['Update_time'] : false;
@@ -289,6 +292,19 @@ foreach ($tables as $keyname => $each_table) {
}
}
+ 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(' ', '&nbsp;', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
: str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME']));
@@ -509,12 +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 ?>
- <?php if ($GLOBALS['cfg']['ShowDbStructureCreation']) { ?>
+ <?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 ?>
- <?php if ($GLOBALS['cfg']['ShowDbStructureLastUpdate']) { ?>
+ <?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>
@@ -595,6 +614,12 @@ if ($GLOBALS['cfg']['ShowDbStructureLastUpdate']) {
. ' </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>