diff --git a/db_tracking.php b/db_tracking.php index 3f98da6ba..fabdab11a 100644 --- a/db_tracking.php +++ b/db_tracking.php @@ -24,12 +24,10 @@ require_once './libraries/relation.lib.php'; $data = PMA_Tracker::getTrackedData($_REQUEST['db'], '', '1'); // No tables present and no log exist -if ($num_tables == 0 and count($data['ddlog']) == 0) -{ +if ($num_tables == 0 && count($data['ddlog']) == 0) { echo '

' . $strNoTablesFound . '

' . "\n"; - if (empty($db_is_information_schema)) - { + if (empty($db_is_information_schema)) { require './libraries/display_create_table.lib.php'; } @@ -72,8 +70,7 @@ $maxversion = PMA_DBI_fetch_array($sql_result); $last_version = $maxversion['version']; // If a HEAD version exists -if($last_version > 0) -{ +if ($last_version > 0) { ?>

@@ -96,17 +93,19 @@ if($last_version > 0) $style = 'odd'; PMA_DBI_data_seek($sql_result, 0); - while($version = PMA_DBI_fetch_array($sql_result)) - { - if($version['tracking_active'] == 1) + while ($version = PMA_DBI_fetch_array($sql_result)) { + if ($version['tracking_active'] == 1) { $version_status = $strTrackingStatusActive; - else + } else { $version_status = $strTrackingStatusDeactive; + } - if(($version['version'] == $last_version) and ($version_status == $strTrackingStatusDeactive)) + if (($version['version'] == $last_version) && ($version_status == $strTrackingStatusDeactive)) { $tracking_active = false; - if(($version['version'] == $last_version) and ($version_status == $strTrackingStatusActive)) + } + if (($version['version'] == $last_version) && ($version_status == $strTrackingStatusActive)) { $tracking_active = true; + } ?> @@ -120,7 +119,11 @@ if($last_version > 0) | @@ -132,15 +135,14 @@ if($last_version > 0) $table_list = PMA_getTableList($GLOBALS['db']); // For each table try to get the tracking version -foreach($table_list as $key => $value) -{ - if(PMA_Tracker::getVersion($GLOBALS['db'], $value['Name']) == -1) +foreach ($table_list as $key => $value) { + if (PMA_Tracker::getVersion($GLOBALS['db'], $value['Name']) == -1) { $my_tables[] = $value['Name']; + } } // If untracked tables exist -if(isset($my_tables)) -{ +if (isset($my_tables)) { ?>

@@ -157,14 +159,11 @@ if(isset($my_tables)) $style = 'odd'; - foreach($my_tables as $key => $tablename) - { - if(PMA_Tracker::getVersion($GLOBALS['db'], $tablename) == -1) - { + foreach ($my_tables as $key => $tablename) { + if (PMA_Tracker::getVersion($GLOBALS['db'], $tablename) == -1) { $my_link = ''; - if ($cfg['PropertiesIconic']) - { + if ($cfg['PropertiesIconic']) { $my_link .= '' . $strTrackingTrackTable . ' '; } $my_link .= $strTrackingTrackTable . ''; @@ -174,7 +173,11 @@ if(isset($my_tables)) @@ -188,17 +191,14 @@ if(isset($my_tables)) 0) -{ +if (count($data['ddlog']) > 0) { $log = ''; - foreach ($data['ddlog'] as $entry) - { + foreach ($data['ddlog'] as $entry) { $log .= '# ' . $entry['date'] . ' ' . $entry['username'] . "\n" . $entry['statement'] . "\n"; } PMA_showMessage($strTrackingDatabaseLog, $log); } - /** * Display the footer */