From 03c20164242ff91be56137854d3904a06bbde4e3 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Mon, 21 Jan 2013 23:32:46 +0530 Subject: [PATCH 1/3] Avoid undefined variable notices --- server_status.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server_status.php b/server_status.php index 46386b3eda..2d4a33e32c 100644 --- a/server_status.php +++ b/server_status.php @@ -122,7 +122,7 @@ function getServerTrafficHtml($ServerStatusData) $retval .= __('Replication status'); $retval .= ''; foreach ($GLOBALS['replication_types'] as $type) { - if (${"server_{$type}_status"}) { + if (isset(${"server_{$type}_status"}) && ${"server_{$type}_status"}) { PMA_replication_print_status_table($type); } } From fe4d0c8f5d440530a687586bc3782ec438a485d6 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Mon, 21 Jan 2013 23:36:23 +0530 Subject: [PATCH 2/3] If the original query has a limit clause, an incorrect SQL was generated --- tbl_chart.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tbl_chart.php b/tbl_chart.php index d2201f0997..04505abe7b 100644 --- a/tbl_chart.php +++ b/tbl_chart.php @@ -29,11 +29,10 @@ if (isset($_REQUEST['ajax_request']) exit; } - $sql_limit_to_append = ' LIMIT ' . $_REQUEST['pos'] . ', ' - . $_REQUEST['session_max_rows'] . " "; - $sql_query .= $sql_limit_to_append; + $sql_with_limit = 'SELECT * FROM( ' . $sql_query . ' ) AS `temp_res` LIMIT ' + . $_REQUEST['pos'] . ', ' . $_REQUEST['session_max_rows']; $data = array(); - $result = PMA_DBI_try_query($sql_query); + $result = PMA_DBI_try_query($sql_with_limit); while ($row = PMA_DBI_fetch_assoc($result)) { $data[] = $row; } From 93c42669d1a8a47ec1910c5c1c833939ebbba97d Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Mon, 21 Jan 2013 23:52:37 +0530 Subject: [PATCH 3/3] Username and hostname are not set when exporting privileges for multiple users --- server_privileges.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server_privileges.php b/server_privileges.php index 5739d0064c..d5e2962a49 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -423,7 +423,10 @@ if (isset($_REQUEST['viewing_mode']) && $_REQUEST['viewing_mode'] == 'db') { if (isset($_REQUEST['export']) || (isset($_REQUEST['submit_mult']) && $_REQUEST['submit_mult'] == 'export') ) { - list($title, $export) = PMA_getHtmlForExportUserDefinition($username, $hostname); + list($title, $export) = PMA_getHtmlForExportUserDefinition( + isset($username) ? $username : null, + isset($hostname) ? $hostname : null + ); unset($username, $hostname, $grants, $one_grant);