Navigation Menu

Skip to content

Commit

Permalink
Replace static methods with instance methods
Browse files Browse the repository at this point in the history
Replaces PhpMyAdmin\Tracking static methods with instance methods.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
  • Loading branch information
MauricioFauth committed Mar 31, 2018
1 parent b6767f4 commit 5f0a790
Show file tree
Hide file tree
Showing 4 changed files with 140 additions and 130 deletions.
12 changes: 7 additions & 5 deletions db_tracking.php
Expand Up @@ -25,6 +25,8 @@
$scripts->addFile('vendor/jquery/jquery.tablesorter.js');
$scripts->addFile('db_tracking.js');

$tracking = new Tracking();

/**
* If we are not in an Ajax request, then do the common work and show the links etc.
*/
Expand Down Expand Up @@ -57,7 +59,7 @@

} elseif (isset($_REQUEST['submit_create_version'])) {

Tracking::createTrackingForMultipleTables($_REQUEST['selected']);
$tracking->createTrackingForMultipleTables($_REQUEST['selected']);
Message::success(
sprintf(
__(
Expand All @@ -82,7 +84,7 @@

} elseif ($_REQUEST['submit_mult'] == 'track') {

echo Tracking::getHtmlForDataDefinitionAndManipulationStatements(
echo $tracking->getHtmlForDataDefinitionAndManipulationStatements(
'db_tracking.php' . $url_query,
0,
$GLOBALS['db'],
Expand Down Expand Up @@ -129,17 +131,17 @@
if (is_object($all_tables_result)
&& $GLOBALS['dbi']->numRows($all_tables_result) > 0
) {
echo Tracking::getHtmlForTrackedTables(
echo $tracking->getHtmlForTrackedTables(
$GLOBALS['db'], $all_tables_result, $url_query, $pmaThemeImage,
$text_dir, $cfgRelation
);
}

$untracked_tables = Tracking::getUntrackedTables($GLOBALS['db']);
$untracked_tables = $tracking->getUntrackedTables($GLOBALS['db']);

// If untracked tables exist
if (count($untracked_tables) > 0) {
echo Tracking::getHtmlForUntrackedTables(
echo $tracking->getHtmlForUntrackedTables(
$GLOBALS['db'], $untracked_tables, $url_query, $pmaThemeImage, $text_dir
);
}
Expand Down

0 comments on commit 5f0a790

Please sign in to comment.