diff options
author | Marc Delisle <marc@infomarc.info> | 2015-08-16 15:44:41 +0300 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2015-08-16 15:44:41 +0300 |
commit | 0a9af638a243d57cc7ed3a51cd54b64042afb4e3 (patch) | |
tree | df8b4130521230a046c197d894fb95eecd14c49f /db_tracking.php | |
parent | 293d343027d514f97f7e717817790346ba244b0d (diff) |
Continue refactoring db tracking
Signed-off-by: Marc Delisle <marc@infomarc.info>
Diffstat (limited to 'db_tracking.php')
-rw-r--r-- | db_tracking.php | 39 |
1 files changed, 3 insertions, 36 deletions
diff --git a/db_tracking.php b/db_tracking.php index b559d3c245..873258370a 100644 --- a/db_tracking.php +++ b/db_tracking.php @@ -238,45 +238,12 @@ if ($GLOBALS['dbi']->numRows($all_tables_result) > 0) { <?php } -$sep = $GLOBALS['cfg']['NavigationTreeTableSeparator']; - -// Get list of tables -$table_list = PMA_Util::getTableList($GLOBALS['db']); - -$my_tables = array(); - -// For each table try to get the tracking version -foreach ($table_list as $key => $value) { - // If $value is a table group. - if (array_key_exists(('is' . $sep . 'group'), $value) - && $value['is' . $sep . 'group'] - ) { - foreach ($value as $temp_table) { - // If $temp_table is a table with the value for 'Name' is set, - // rather than a property of the table group. - if (is_array($temp_table) - && array_key_exists('Name', $temp_table) - ) { - $tracking_version = PMA_Tracker::getVersion( - $GLOBALS['db'], - $temp_table['Name'] - ); - if ($tracking_version == -1) { - $my_tables[] = $temp_table['Name']; - } - } - } - } else { // If $value is a table. - if (PMA_Tracker::getVersion($GLOBALS['db'], $value['Name']) == -1) { - $my_tables[] = $value['Name']; - } - } -} +$untracked_tables = PMA_getUntrackedTables($GLOBALS['db']); // If untracked tables exist -if (count($my_tables) > 0) { +if (count($untracked_tables) > 0) { PMA_displayUntrackedTables( - $GLOBALS['db'], $my_tables, $url_query, $pmaThemeImage, $text_dir + $GLOBALS['db'], $untracked_tables, $url_query, $pmaThemeImage, $text_dir ); } // If available print out database log |