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); 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); } } 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; }