From 0bdbde8c90aa4fba8fa492dcddfac443dc74aaf4 Mon Sep 17 00:00:00 2001 From: Isaac Bennetch Date: Wed, 7 Sep 2011 07:36:00 -0400 Subject: [PATCH] Patch #3404173 InnoDB comment display with tooltips/aliases --- libraries/db_info.inc.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libraries/db_info.inc.php b/libraries/db_info.inc.php index d8610f29a..44dc3a811 100644 --- a/libraries/db_info.inc.php +++ b/libraries/db_info.inc.php @@ -66,6 +66,15 @@ $pos = $_SESSION['tmp_user_values']['table_limit_offset']; */ function PMA_fillTooltip(&$tooltip_truename, &$tooltip_aliasname, $table) { + if (strstr($table['Comment'], '; InnoDB free') === false) { + if (!strstr($table['Comment'], 'InnoDB free') === false) { + // here we have just InnoDB generated part + $table['Comment'] = ''; + } + } else { + // remove InnoDB comment from end, just the minimal part (*? is non greedy) + $table['Comment'] = preg_replace('@; InnoDB free:.*?$@', '', $table['Comment']); + } if (empty($table['Comment'])) { $table['Comment'] = $table['Name']; } else {