From 2eba839c338e3513d3dc61496700e6fdbcf94a50 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 27 Dec 2009 23:05:45 +0000 Subject: [PATCH] new sub-feature: possibility of removing all tracking data for a table (useful for older tables that have been deleted from this database) --- db_tracking.php | 17 +++++++++++++++++ lang/afrikaans-utf-8.inc.php | 1 + lang/albanian-utf-8.inc.php | 1 + lang/arabic-utf-8.inc.php | 1 + lang/azerbaijani-utf-8.inc.php | 1 + lang/bangla-utf-8.inc.php | 1 + lang/basque-utf-8.inc.php | 1 + lang/belarusian_cyrillic-utf-8.inc.php | 1 + lang/belarusian_latin-utf-8.inc.php | 1 + lang/bosnian-utf-8.inc.php | 1 + lang/brazilian_portuguese-utf-8.inc.php | 1 + lang/bulgarian-utf-8.inc.php | 1 + lang/catalan-utf-8.inc.php | 1 + lang/chinese_simplified-utf-8.inc.php | 1 + lang/chinese_traditional-utf-8.inc.php | 1 + lang/croatian-utf-8.inc.php | 1 + lang/czech-utf-8.inc.php | 1 + lang/danish-utf-8.inc.php | 1 + lang/dutch-utf-8.inc.php | 1 + lang/english-utf-8.inc.php | 1 + lang/estonian-utf-8.inc.php | 1 + lang/finnish-utf-8.inc.php | 1 + lang/french-utf-8.inc.php | 3 ++- lang/galician-utf-8.inc.php | 1 + lang/georgian-utf-8.inc.php | 1 + lang/german-utf-8.inc.php | 1 + lang/greek-utf-8.inc.php | 1 + lang/hebrew-utf-8.inc.php | 1 + lang/hindi-utf-8.inc.php | 1 + lang/hungarian-utf-8.inc.php | 1 + lang/indonesian-utf-8.inc.php | 1 + lang/italian-utf-8.inc.php | 1 + lang/japanese-utf-8.inc.php | 1 + lang/korean-utf-8.inc.php | 1 + lang/latvian-utf-8.inc.php | 1 + lang/lithuanian-utf-8.inc.php | 1 + lang/macedonian_cyrillic-utf-8.inc.php | 1 + lang/malay-utf-8.inc.php | 1 + lang/mongolian-utf-8.inc.php | 1 + lang/norwegian-utf-8.inc.php | 1 + lang/persian-utf-8.inc.php | 1 + lang/polish-utf-8.inc.php | 1 + lang/portuguese-utf-8.inc.php | 1 + lang/romanian-utf-8.inc.php | 1 + lang/russian-utf-8.inc.php | 1 + lang/serbian_cyrillic-utf-8.inc.php | 1 + lang/serbian_latin-utf-8.inc.php | 1 + lang/sinhala-utf-8.inc.php | 1 + lang/slovak-utf-8.inc.php | 1 + lang/slovenian-utf-8.inc.php | 1 + lang/spanish-utf-8.inc.php | 1 + lang/swedish-utf-8.inc.php | 1 + lang/tatarish-utf-8.inc.php | 1 + lang/thai-utf-8.inc.php | 1 + lang/turkish-utf-8.inc.php | 1 + lang/ukrainian-utf-8.inc.php | 1 + lang/uzbek_cyrillic-utf-8.inc.php | 1 + lang/uzbek_latin-utf-8.inc.php | 1 + libraries/Tracker.class.php | 20 ++++++++++++++++++++ 59 files changed, 95 insertions(+), 1 deletion(-) diff --git a/db_tracking.php b/db_tracking.php index 0ae8cbf52..799e96b1f 100644 --- a/db_tracking.php +++ b/db_tracking.php @@ -20,6 +20,12 @@ require './libraries/db_info.inc.php'; // Get relation settings require_once './libraries/relation.lib.php'; +// Work to do? +// (here, do not use $_REQUEST['db] as it can be crafted) +if (isset($_REQUEST['delete_tracking']) && isset($_REQUEST['table'])) { + PMA_Tracker::deleteTracking($GLOBALS['db'], $_REQUEST['table']); +} + // Get tracked data about the database $data = PMA_Tracker::getTrackedData($_REQUEST['db'], '', '1'); @@ -67,6 +73,7 @@ if (PMA_DBI_num_rows($all_tables_result) > 0) { + @@ -75,6 +82,14 @@ if (PMA_DBI_num_rows($all_tables_result) > 0) { // Print out information about versions + $drop_image_or_text = ''; + if (true == $GLOBALS['cfg']['PropertiesIconic']) { + $drop_image_or_text .= '' . $strDeleteTrackingData . ''; + } + if ('both' === $GLOBALS['cfg']['PropertiesIconic'] || false === $GLOBALS['cfg']['PropertiesIconic']) { + $drop_image_or_text .= $strDrop; + } + $style = 'odd'; while ($one_result = PMA_DBI_fetch_array($all_tables_result)) { list($table_name, $version_number) = $one_result; @@ -92,6 +107,7 @@ if (PMA_DBI_num_rows($all_tables_result) > 0) { $version_status = $strTrackingStatusNotActive; } $tmp_link = 'tbl_tracking.php?' . $url_query . '&table=' . htmlspecialchars($version_data['table_name']); + $delete_link = 'db_tracking.php?' . $url_query . '&table=' . htmlspecialchars($version_data['table_name']) . '&delete_tracking=true&'; ?> @@ -100,6 +116,7 @@ if (PMA_DBI_num_rows($all_tables_result) > 0) { + | | diff --git a/lang/afrikaans-utf-8.inc.php b/lang/afrikaans-utf-8.inc.php index 595c9e6ef..ae73d3b44 100644 --- a/lang/afrikaans-utf-8.inc.php +++ b/lang/afrikaans-utf-8.inc.php @@ -1638,4 +1638,5 @@ $strZeroRemovesTheLimit = 'Note: Setting these options to 0 (zero) removes the l $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/albanian-utf-8.inc.php b/lang/albanian-utf-8.inc.php index 83a809d4b..a16a88bc9 100644 --- a/lang/albanian-utf-8.inc.php +++ b/lang/albanian-utf-8.inc.php @@ -1636,4 +1636,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/arabic-utf-8.inc.php b/lang/arabic-utf-8.inc.php index a9f65f26a..62d2c92d0 100644 --- a/lang/arabic-utf-8.inc.php +++ b/lang/arabic-utf-8.inc.php @@ -1640,4 +1640,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/azerbaijani-utf-8.inc.php b/lang/azerbaijani-utf-8.inc.php index f2b18275b..fdf1bac4c 100644 --- a/lang/azerbaijani-utf-8.inc.php +++ b/lang/azerbaijani-utf-8.inc.php @@ -1635,4 +1635,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/bangla-utf-8.inc.php b/lang/bangla-utf-8.inc.php index 34a0f975d..9c684824a 100644 --- a/lang/bangla-utf-8.inc.php +++ b/lang/bangla-utf-8.inc.php @@ -1637,4 +1637,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/basque-utf-8.inc.php b/lang/basque-utf-8.inc.php index 269fca3d7..424af2934 100644 --- a/lang/basque-utf-8.inc.php +++ b/lang/basque-utf-8.inc.php @@ -1632,4 +1632,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/belarusian_cyrillic-utf-8.inc.php b/lang/belarusian_cyrillic-utf-8.inc.php index faf693d31..cfadd37d1 100644 --- a/lang/belarusian_cyrillic-utf-8.inc.php +++ b/lang/belarusian_cyrillic-utf-8.inc.php @@ -1632,4 +1632,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/belarusian_latin-utf-8.inc.php b/lang/belarusian_latin-utf-8.inc.php index f111d8ebe..5723a3fa1 100644 --- a/lang/belarusian_latin-utf-8.inc.php +++ b/lang/belarusian_latin-utf-8.inc.php @@ -1644,4 +1644,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/bosnian-utf-8.inc.php b/lang/bosnian-utf-8.inc.php index 46faa1f7c..dd42ccd86 100644 --- a/lang/bosnian-utf-8.inc.php +++ b/lang/bosnian-utf-8.inc.php @@ -1638,4 +1638,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/brazilian_portuguese-utf-8.inc.php b/lang/brazilian_portuguese-utf-8.inc.php index 1b624b23e..ccfe3ef16 100644 --- a/lang/brazilian_portuguese-utf-8.inc.php +++ b/lang/brazilian_portuguese-utf-8.inc.php @@ -1632,4 +1632,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/bulgarian-utf-8.inc.php b/lang/bulgarian-utf-8.inc.php index bce3141fb..e200880c6 100644 --- a/lang/bulgarian-utf-8.inc.php +++ b/lang/bulgarian-utf-8.inc.php @@ -1638,4 +1638,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/catalan-utf-8.inc.php b/lang/catalan-utf-8.inc.php index 40447f95a..fe12724f1 100644 --- a/lang/catalan-utf-8.inc.php +++ b/lang/catalan-utf-8.inc.php @@ -1624,4 +1624,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/chinese_simplified-utf-8.inc.php b/lang/chinese_simplified-utf-8.inc.php index b5c9d2e09..82704c638 100644 --- a/lang/chinese_simplified-utf-8.inc.php +++ b/lang/chinese_simplified-utf-8.inc.php @@ -1637,4 +1637,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/chinese_traditional-utf-8.inc.php b/lang/chinese_traditional-utf-8.inc.php index 7ceb8ab78..1fa2df833 100644 --- a/lang/chinese_traditional-utf-8.inc.php +++ b/lang/chinese_traditional-utf-8.inc.php @@ -1639,4 +1639,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/croatian-utf-8.inc.php b/lang/croatian-utf-8.inc.php index 191b77ebd..6f691bf78 100644 --- a/lang/croatian-utf-8.inc.php +++ b/lang/croatian-utf-8.inc.php @@ -1632,4 +1632,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/czech-utf-8.inc.php b/lang/czech-utf-8.inc.php index 069c903d3..b44b78cfe 100644 --- a/lang/czech-utf-8.inc.php +++ b/lang/czech-utf-8.inc.php @@ -1626,4 +1626,5 @@ $strTargetDatabaseHasBeenSynchronized = 'Target database has been synchronized w $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/danish-utf-8.inc.php b/lang/danish-utf-8.inc.php index 85f3a7b5c..e39dd11cc 100644 --- a/lang/danish-utf-8.inc.php +++ b/lang/danish-utf-8.inc.php @@ -1635,4 +1635,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/dutch-utf-8.inc.php b/lang/dutch-utf-8.inc.php index 2788b465b..1feb72f3d 100644 --- a/lang/dutch-utf-8.inc.php +++ b/lang/dutch-utf-8.inc.php @@ -1631,4 +1631,5 @@ $strTrackingStatusNotActive = 'not active'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/english-utf-8.inc.php b/lang/english-utf-8.inc.php index fd6e84d5e..d53482485 100644 --- a/lang/english-utf-8.inc.php +++ b/lang/english-utf-8.inc.php @@ -247,6 +247,7 @@ $strDelete = 'Delete'; $strDeleted = 'The row has been deleted'; $strDeleteNoUsersSelected = 'No users selected for deleting!'; $strDeleteRelation = 'Delete relation'; +$strDeleteTrackingData = 'Delete tracking data for this table'; $strDeleting = 'Deleting %s'; $strDelimiter = 'Delimiter'; $strDelOld = 'The current page has references to tables that no longer exist. Would you like to delete those references?'; diff --git a/lang/estonian-utf-8.inc.php b/lang/estonian-utf-8.inc.php index 840e08388..c38da331d 100644 --- a/lang/estonian-utf-8.inc.php +++ b/lang/estonian-utf-8.inc.php @@ -1637,4 +1637,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/finnish-utf-8.inc.php b/lang/finnish-utf-8.inc.php index 642538e6a..832d96ca7 100644 --- a/lang/finnish-utf-8.inc.php +++ b/lang/finnish-utf-8.inc.php @@ -1630,4 +1630,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/french-utf-8.inc.php b/lang/french-utf-8.inc.php index 3d5a55865..e05558358 100644 --- a/lang/french-utf-8.inc.php +++ b/lang/french-utf-8.inc.php @@ -244,6 +244,7 @@ $strDeleted = 'L\'enregistrement a été effacé'; $strDelete = 'Effacer'; $strDeleteNoUsersSelected = 'Aucun utilisateur n\'a été choisi en vue de le détruire!'; $strDeleteRelation = 'Effacer la relation'; +$strDeleteTrackingData = 'Supprimer les données de suivi de cette table'; $strDeleting = 'Destruction de %s'; $strDelimiter = 'Délimiteur'; $strDelOld = 'Cette page fait référence à des tables qui n\'existent plus. Voulez-vous effacer ces références?'; @@ -1492,7 +1493,7 @@ $strTrackingSQLExported = 'Énoncés SQL exportés. Vous pouvez copier le fichie $strTrackingStatements = 'Suivi des énoncés'; $strTrackingStatusActive = 'actif'; $strTrackingStatusNotActive = 'non activé'; -$strTrackingStructureSnapshot = 'Instantané de la structure'; +$strTrackingStructureSnapshot = 'Instantané'; $strTracking = 'Suivi'; $strTrackingThCreated = 'Créé'; $strTrackingThLastVersion = 'Dernière version'; diff --git a/lang/galician-utf-8.inc.php b/lang/galician-utf-8.inc.php index a392b0341..34906c22c 100644 --- a/lang/galician-utf-8.inc.php +++ b/lang/galician-utf-8.inc.php @@ -1618,4 +1618,5 @@ $strTargetDatabaseHasBeenSynchronized = 'Target database has been synchronized w $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/georgian-utf-8.inc.php b/lang/georgian-utf-8.inc.php index b0144916c..7e35b352d 100644 --- a/lang/georgian-utf-8.inc.php +++ b/lang/georgian-utf-8.inc.php @@ -1635,4 +1635,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/german-utf-8.inc.php b/lang/german-utf-8.inc.php index 1920092fc..258a65f76 100644 --- a/lang/german-utf-8.inc.php +++ b/lang/german-utf-8.inc.php @@ -1635,4 +1635,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/greek-utf-8.inc.php b/lang/greek-utf-8.inc.php index c38edfe16..540268e43 100644 --- a/lang/greek-utf-8.inc.php +++ b/lang/greek-utf-8.inc.php @@ -1637,4 +1637,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/hebrew-utf-8.inc.php b/lang/hebrew-utf-8.inc.php index 516e3fc63..ef6e59734 100644 --- a/lang/hebrew-utf-8.inc.php +++ b/lang/hebrew-utf-8.inc.php @@ -1633,4 +1633,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/hindi-utf-8.inc.php b/lang/hindi-utf-8.inc.php index 42ee2a139..ff6369575 100644 --- a/lang/hindi-utf-8.inc.php +++ b/lang/hindi-utf-8.inc.php @@ -1639,4 +1639,5 @@ $strZip = '"zipped"' ; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/hungarian-utf-8.inc.php b/lang/hungarian-utf-8.inc.php index 858d3279b..2a41fb58c 100644 --- a/lang/hungarian-utf-8.inc.php +++ b/lang/hungarian-utf-8.inc.php @@ -1632,4 +1632,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/indonesian-utf-8.inc.php b/lang/indonesian-utf-8.inc.php index d98d19813..a6d896e5c 100644 --- a/lang/indonesian-utf-8.inc.php +++ b/lang/indonesian-utf-8.inc.php @@ -1632,4 +1632,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/italian-utf-8.inc.php b/lang/italian-utf-8.inc.php index 197c96477..57b32c8a9 100644 --- a/lang/italian-utf-8.inc.php +++ b/lang/italian-utf-8.inc.php @@ -1632,4 +1632,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/japanese-utf-8.inc.php b/lang/japanese-utf-8.inc.php index 6ab378163..40f8886e6 100644 --- a/lang/japanese-utf-8.inc.php +++ b/lang/japanese-utf-8.inc.php @@ -1637,4 +1637,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/korean-utf-8.inc.php b/lang/korean-utf-8.inc.php index 12adb0a12..898267abc 100644 --- a/lang/korean-utf-8.inc.php +++ b/lang/korean-utf-8.inc.php @@ -1634,4 +1634,5 @@ $strXML = 'XML';//to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/latvian-utf-8.inc.php b/lang/latvian-utf-8.inc.php index 103043a61..4f8a1e63c 100644 --- a/lang/latvian-utf-8.inc.php +++ b/lang/latvian-utf-8.inc.php @@ -1637,4 +1637,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/lithuanian-utf-8.inc.php b/lang/lithuanian-utf-8.inc.php index 983d03b60..41a1845f5 100644 --- a/lang/lithuanian-utf-8.inc.php +++ b/lang/lithuanian-utf-8.inc.php @@ -1631,4 +1631,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/macedonian_cyrillic-utf-8.inc.php b/lang/macedonian_cyrillic-utf-8.inc.php index 437483ce9..f6f7492bd 100644 --- a/lang/macedonian_cyrillic-utf-8.inc.php +++ b/lang/macedonian_cyrillic-utf-8.inc.php @@ -1638,4 +1638,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/malay-utf-8.inc.php b/lang/malay-utf-8.inc.php index 0ac31e274..e9ff2a4ab 100644 --- a/lang/malay-utf-8.inc.php +++ b/lang/malay-utf-8.inc.php @@ -1651,4 +1651,5 @@ $strZeroRemovesTheLimit = 'Note: Setting these options to 0 (zero) removes the l $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/mongolian-utf-8.inc.php b/lang/mongolian-utf-8.inc.php index cb9d3580a..217885d20 100644 --- a/lang/mongolian-utf-8.inc.php +++ b/lang/mongolian-utf-8.inc.php @@ -1637,4 +1637,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/norwegian-utf-8.inc.php b/lang/norwegian-utf-8.inc.php index 7091afa3b..4e8997c8a 100644 --- a/lang/norwegian-utf-8.inc.php +++ b/lang/norwegian-utf-8.inc.php @@ -1627,4 +1627,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/persian-utf-8.inc.php b/lang/persian-utf-8.inc.php index 6e9ecac35..8cdb22e1e 100644 --- a/lang/persian-utf-8.inc.php +++ b/lang/persian-utf-8.inc.php @@ -1640,4 +1640,5 @@ $strZeroRemovesTheLimit = 'Note: Setting these options to 0 (zero) removes the l $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/polish-utf-8.inc.php b/lang/polish-utf-8.inc.php index 43935db1d..d01750ccb 100644 --- a/lang/polish-utf-8.inc.php +++ b/lang/polish-utf-8.inc.php @@ -1623,4 +1623,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/portuguese-utf-8.inc.php b/lang/portuguese-utf-8.inc.php index ddb6a102d..93503f040 100644 --- a/lang/portuguese-utf-8.inc.php +++ b/lang/portuguese-utf-8.inc.php @@ -1641,4 +1641,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/romanian-utf-8.inc.php b/lang/romanian-utf-8.inc.php index 00a1a599c..95c74f4a3 100644 --- a/lang/romanian-utf-8.inc.php +++ b/lang/romanian-utf-8.inc.php @@ -1631,4 +1631,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/russian-utf-8.inc.php b/lang/russian-utf-8.inc.php index 3a5a0ebfd..09f873856 100644 --- a/lang/russian-utf-8.inc.php +++ b/lang/russian-utf-8.inc.php @@ -1632,4 +1632,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/serbian_cyrillic-utf-8.inc.php b/lang/serbian_cyrillic-utf-8.inc.php index 1a29983a7..0a98864aa 100644 --- a/lang/serbian_cyrillic-utf-8.inc.php +++ b/lang/serbian_cyrillic-utf-8.inc.php @@ -1635,4 +1635,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/serbian_latin-utf-8.inc.php b/lang/serbian_latin-utf-8.inc.php index a1889107d..4320a3b1c 100644 --- a/lang/serbian_latin-utf-8.inc.php +++ b/lang/serbian_latin-utf-8.inc.php @@ -1635,4 +1635,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/sinhala-utf-8.inc.php b/lang/sinhala-utf-8.inc.php index 5f6dcabee..0a4452b80 100644 --- a/lang/sinhala-utf-8.inc.php +++ b/lang/sinhala-utf-8.inc.php @@ -1639,4 +1639,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/slovak-utf-8.inc.php b/lang/slovak-utf-8.inc.php index 59492ff7e..60154f030 100644 --- a/lang/slovak-utf-8.inc.php +++ b/lang/slovak-utf-8.inc.php @@ -1631,4 +1631,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/slovenian-utf-8.inc.php b/lang/slovenian-utf-8.inc.php index d2d052f1a..4f68530b3 100644 --- a/lang/slovenian-utf-8.inc.php +++ b/lang/slovenian-utf-8.inc.php @@ -1634,4 +1634,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/spanish-utf-8.inc.php b/lang/spanish-utf-8.inc.php index 71feb8f30..41edc315b 100644 --- a/lang/spanish-utf-8.inc.php +++ b/lang/spanish-utf-8.inc.php @@ -1626,4 +1626,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/swedish-utf-8.inc.php b/lang/swedish-utf-8.inc.php index f3469c5bc..fb4749114 100644 --- a/lang/swedish-utf-8.inc.php +++ b/lang/swedish-utf-8.inc.php @@ -1627,4 +1627,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/tatarish-utf-8.inc.php b/lang/tatarish-utf-8.inc.php index 57b0a3eaa..6db861a46 100644 --- a/lang/tatarish-utf-8.inc.php +++ b/lang/tatarish-utf-8.inc.php @@ -1631,4 +1631,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/thai-utf-8.inc.php b/lang/thai-utf-8.inc.php index 7e9f62030..0b9bcf93b 100644 --- a/lang/thai-utf-8.inc.php +++ b/lang/thai-utf-8.inc.php @@ -1636,4 +1636,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/turkish-utf-8.inc.php b/lang/turkish-utf-8.inc.php index ad3db601b..0b503d7e7 100644 --- a/lang/turkish-utf-8.inc.php +++ b/lang/turkish-utf-8.inc.php @@ -1626,4 +1626,5 @@ $strTargetDatabaseHasBeenSynchronized = 'Target database has been synchronized w $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/ukrainian-utf-8.inc.php b/lang/ukrainian-utf-8.inc.php index 6f549fe45..b93cda9e0 100644 --- a/lang/ukrainian-utf-8.inc.php +++ b/lang/ukrainian-utf-8.inc.php @@ -1634,4 +1634,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/uzbek_cyrillic-utf-8.inc.php b/lang/uzbek_cyrillic-utf-8.inc.php index bfe18c028..2f6176241 100644 --- a/lang/uzbek_cyrillic-utf-8.inc.php +++ b/lang/uzbek_cyrillic-utf-8.inc.php @@ -1631,4 +1631,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/lang/uzbek_latin-utf-8.inc.php b/lang/uzbek_latin-utf-8.inc.php index 47849d506..324846859 100644 --- a/lang/uzbek_latin-utf-8.inc.php +++ b/lang/uzbek_latin-utf-8.inc.php @@ -1631,4 +1631,5 @@ $strXMLExportViews = 'Export views'; //to translate $strTrackingYouCanExecute = 'You can execute the dump by creating and using a temporary database. Please ensure that you have the privileges to do so.'; //to translate $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate +$strDeleteTrackingData = 'Delete tracking data for this table'; //to translate ?> diff --git a/libraries/Tracker.class.php b/libraries/Tracker.class.php index 20c50aaef..f03018ab2 100644 --- a/libraries/Tracker.class.php +++ b/libraries/Tracker.class.php @@ -360,6 +360,26 @@ class PMA_Tracker } + /** + * Removes all tracking data for a table + * + * @static + * + * @param string $dbname name of database + * @param string $tablename name of table + * + * @return int result of version insertion + */ + static public function deleteTracking($dbname, $tablename) + { + $sql_query = + "/*NOTRACK*/\n" . + "DELETE FROM " . self::$pma_table . " WHERE `db_name` = '" . PMA_sqlAddslashes($dbname) . "' AND `table_name` = '" . PMA_sqlAddslashes($tablename) . "'"; + $result = PMA_query_as_controluser($sql_query); + + return $result; + } + /** * Creates tracking version of a database * (in other words: create a job to track future changes on the database).