Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--libraries/tbl_tracking.lib.php53
-rw-r--r--tbl_tracking.php12
3 files changed, 42 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index 960783ca44..fe8518ab24 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@ phpMyAdmin - ChangeLog
4.2.13.0 (not yet released)
- bug #4604 Query history not being deleted
- bug #4057 db/table query string parameters no longer work
+- bug #4605 Unseen messages in tracking
4.2.12.0 (2014-11-20)
- bug #4574 Blank/white page when JavaScript disabled
diff --git a/libraries/tbl_tracking.lib.php b/libraries/tbl_tracking.lib.php
index 5195325bb2..35641e8196 100644
--- a/libraries/tbl_tracking.lib.php
+++ b/libraries/tbl_tracking.lib.php
@@ -956,19 +956,21 @@ function PMA_getHtmlForIndex($index, $style)
*
* @param array &$data tracked data
*
- * @return void
+ * @return string HTML for the message
*/
function PMA_deleteTrackingReportRows(&$data)
{
+ $html = '';
if (isset($_REQUEST['delete_ddlog'])) {
// Delete ddlog row data
- PMA_handleDeleteDataDefinitionsLog($data);
+ $html .= PMA_handleDeleteDataDefinitionsLog($data);
}
if (isset($_REQUEST['delete_dmlog'])) {
// Delete dmlog row data
- PMA_handleDeleteDataManipulationLog($data);
+ $html .= PMA_handleDeleteDataManipulationLog($data);
}
+ return $html;
}
/**
@@ -976,10 +978,11 @@ function PMA_deleteTrackingReportRows(&$data)
*
* @param array &$data tracked data
*
- * @return void
+ * @return string HTML for the message
*/
function PMA_handleDeleteDataDefinitionsLog(&$data)
{
+ $html = '';
$delete_id = $_REQUEST['delete_ddlog'];
// Only in case of valable id
@@ -997,8 +1000,9 @@ function PMA_handleDeleteDataDefinitionsLog(&$data)
} else {
$msg = PMA_Message::rawError(__('Query error'));
}
- $msg->display();
+ $html .= $msg->getDisplay();
}
+ return $html;
}
/**
@@ -1006,10 +1010,11 @@ function PMA_handleDeleteDataDefinitionsLog(&$data)
*
* @param array &$data tracked data
*
- * @return void
+ * @return string HTML for the message
*/
function PMA_handleDeleteDataManipulationLog(&$data)
{
+ $html = '';
$delete_id = $_REQUEST['delete_dmlog'];
// Only in case of valable id
@@ -1027,8 +1032,9 @@ function PMA_handleDeleteDataManipulationLog(&$data)
} else {
$msg = PMA_Message::rawError(__('Query error'));
}
- $msg->display();
+ $html .= $msg->getDisplay();
}
+ return $html;
}
/**
@@ -1036,10 +1042,11 @@ function PMA_handleDeleteDataManipulationLog(&$data)
*
* @param array $entries entries
*
- * @return void
+ * @return string HTML SQL query form
*/
function PMA_exportAsSQLDump($entries)
{
+ $html = '';
$new_query = "# "
. __(
'You can execute the dump by creating and using a temporary database. '
@@ -1058,18 +1065,19 @@ function PMA_exportAsSQLDump($entries)
$msg = PMA_Message::success(
__('SQL statements exported. Please copy the dump or execute it.')
);
- $msg->display();
-
+ $html .= $msg->getDisplay();
$db_temp = $GLOBALS['db'];
$table_temp = $GLOBALS['table'];
$GLOBALS['db'] = $GLOBALS['table'] = '';
include_once './libraries/sql_query_form.lib.php';
- PMA_getHtmlForSqlQueryForm($new_query, 'sql');
+ $html .= PMA_getHtmlForSqlQueryForm($new_query, 'sql');
$GLOBALS['db'] = $db_temp;
$GLOBALS['table'] = $table_temp;
+
+ return $html;
}
/**
@@ -1084,8 +1092,6 @@ function PMA_exportAsSQLExecution($entries)
foreach ($entries as $entry) {
$sql_result = $GLOBALS['dbi']->query("/*NOTRACK*/\n" . $entry['statement']);
}
- $msg = PMA_Message::success(__('SQL statements executed.'));
- $msg->display();
return $sql_result;
}
@@ -1120,10 +1126,11 @@ function PMA_exportAsFileDownload($entries)
/**
* Function to activate tracking
*
- * @return void
+ * @return string HTML for the success message
*/
function PMA_activateTracking()
{
+ $html = '';
$activated = PMA_Tracker::activateTracking(
$GLOBALS['db'], $GLOBALS['table'], $_REQUEST['version']
);
@@ -1135,17 +1142,20 @@ function PMA_activateTracking()
htmlspecialchars($_REQUEST['version'])
)
);
- $msg->display();
+ $html .= $msg->getDisplay();
}
+
+ return $html;
}
/**
* Function to deactivate tracking
*
- * @return void
+ * @return string HTML of the success message
*/
function PMA_deactivateTracking()
{
+ $html = '';
$deactivated = PMA_Tracker::deactivateTracking(
$GLOBALS['db'], $GLOBALS['table'], $_REQUEST['version']
);
@@ -1157,8 +1167,10 @@ function PMA_deactivateTracking()
htmlspecialchars($_REQUEST['version'])
)
);
- $msg->display();
+ $html .= $msg->getDisplay();
}
+
+ return $html;
}
/**
@@ -1208,10 +1220,11 @@ function PMA_getTrackingSet()
/**
* Function to create the tracking version
*
- * @return void
+ * @return string HTML of the success message
*/
function PMA_createTrackingVersion()
{
+ $html = '';
$tracking_set = PMA_getTrackingSet();
$versionCreated = PMA_Tracker::createVersion(
@@ -1229,8 +1242,10 @@ function PMA_createTrackingVersion()
htmlspecialchars($GLOBALS['db'] . '.' . $GLOBALS['table'])
)
);
- $msg->display();
+ $html .= $msg->getDisplay();
}
+
+ return $html;
}
/**
diff --git a/tbl_tracking.php b/tbl_tracking.php
index 2abd935c73..a550091086 100644
--- a/tbl_tracking.php
+++ b/tbl_tracking.php
@@ -71,27 +71,29 @@ $html = '<br />';
// Create tracking version
if (isset($_REQUEST['submit_create_version'])) {
- PMA_createTrackingVersion();
+ $html .= PMA_createTrackingVersion();
}
// Deactivate tracking
if (isset($_REQUEST['submit_deactivate_now'])) {
- PMA_deactivateTracking();
+ $html .= PMA_deactivateTracking();
}
// Activate tracking
if (isset($_REQUEST['submit_activate_now'])) {
- PMA_activateTracking();
+ $html .= PMA_activateTracking();
}
// Export as SQL execution
if (isset($_REQUEST['report_export']) && $_REQUEST['export_type'] == 'execution') {
$sql_result = PMA_exportAsSQLExecution($entries);
+ $msg = PMA_Message::success(__('SQL statements executed.'));
+ $html .= $msg->getDisplay();
}
// Export as SQL dump
if (isset($_REQUEST['report_export']) && $_REQUEST['export_type'] == 'sqldump') {
- PMA_exportAsSQLDump($entries);
+ $html .= PMA_exportAsSQLDump($entries);
}
/*
@@ -108,7 +110,7 @@ if (isset($_REQUEST['snapshot'])) {
if (isset($_REQUEST['report'])
&& (isset($_REQUEST['delete_ddlog']) || isset($_REQUEST['delete_dmlog']))
) {
- PMA_deleteTrackingReportRows($data);
+ $html .= PMA_deleteTrackingReportRows($data);
}
if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {