diff options
author | Michal Čihař <mcihar@suse.cz> | 2012-03-20 18:18:45 +0400 |
---|---|---|
committer | Michal Čihař <mcihar@suse.cz> | 2012-03-20 18:18:45 +0400 |
commit | bc2091f3bd89b436f646a3b9e4f3d1982c48d384 (patch) | |
tree | 70eee6223db5e6e46d7c993d1cb3dd77be93532f | |
parent | 343c92a6ae3898ba203a0e7d13f60c1ba710dcad (diff) |
Use format string rather than concatenation
-rw-r--r-- | server_privileges.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/server_privileges.php b/server_privileges.php index 4d6240601e..ed69d06567 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -1650,9 +1650,10 @@ if (isset($_REQUEST['export']) || (isset($_REQUEST['submit_mult']) && $_REQUEST[ foreach ($_REQUEST['selected_usr'] as $export_user) { $export_username = substr($export_user, 0, strpos($export_user, '&')); $export_hostname = substr($export_user, strrpos($export_user, ';') + 1); - $response .= '# ' . __('Privileges for ') . '`' . - htmlspecialchars($export_username) . '`@`' . - htmlspecialchars($export_hostname) . "`\n\n"; + $response .= '# ' . + sprintf(__('Privileges for %s'), + '`' . htmlspecialchars($export_username) . '`@`' . htmlspecialchars($export_hostname) . '`') + . "\n\n"; $response .= PMA_getGrants($export_username, $export_hostname) . "\n"; } } @@ -1663,7 +1664,7 @@ if (isset($_REQUEST['export']) || (isset($_REQUEST['submit_mult']) && $_REQUEST[ } // remove trailing whitespace $response = trim($response); - + $response .= '</textarea>'; unset($username, $hostname, $grants, $one_grant); if ($GLOBALS['is_ajax_request']) { |