rfe #1207 Export users associated with a specific schema/database
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
This commit is contained in:
parent
479b1bc81f
commit
ea0c0ba4ff
@ -58,6 +58,7 @@ phpMyAdmin - ChangeLog
|
||||
+ rfe #1595 make professional code editor suggestion
|
||||
+ rfe #1606 processlist filter
|
||||
+ rfe Change tracking activation status from db level tracking page
|
||||
+ rfe #1207 Export users associated with a specific schema/database
|
||||
|
||||
4.3.11.0 (not yet released)
|
||||
- bug #4774 SQL links are completely wrong
|
||||
|
||||
@ -1867,8 +1867,9 @@ function PMA_getHtmlForSpecificDbPrivileges($db)
|
||||
$html_output = '';
|
||||
if ($GLOBALS['is_superuser']) {
|
||||
// check the privileges for a particular database.
|
||||
$html_output = '<form id="usersForm" action="server_privileges.php">'
|
||||
. '<fieldset>' . "\n";
|
||||
$html_output = '<form id="usersForm" action="server_privileges.php">';
|
||||
$html_output .= PMA_URL_getHiddenInputs($db);
|
||||
$html_output .= '<fieldset>';
|
||||
$html_output .= '<legend>' . "\n"
|
||||
. PMA_Util::getIcon('b_usrcheck.png')
|
||||
. ' '
|
||||
@ -1886,9 +1887,19 @@ function PMA_getHtmlForSpecificDbPrivileges($db)
|
||||
$html_output .= PMA_getHtmlForPrivsTableHead();
|
||||
$privMap = PMA_getPrivMap($db);
|
||||
$html_output .= PMA_getHtmlTableBodyForSpecificDbOrTablePrivs($privMap, $db);
|
||||
$html_output .= '</table>'
|
||||
. '</fieldset>'
|
||||
. '</form>' . "\n";
|
||||
$html_output .= '</table>';
|
||||
|
||||
$html_output .= '<div style="float:left;">';
|
||||
$html_output .= PMA_Util::getWithSelected(
|
||||
$GLOBALS['pmaThemeImage'], $GLOBALS['text_dir'], "usersForm"
|
||||
);
|
||||
$html_output .= PMA_Util::getButtonOrImage(
|
||||
'submit_mult', 'mult_submit', 'submit_mult_export',
|
||||
__('Export'), 'b_tblexport.png', 'export'
|
||||
);
|
||||
|
||||
$html_output .= '</fieldset>';
|
||||
$html_output .= '</form>';
|
||||
} else {
|
||||
$html_output .= PMA_getHtmlForViewUsersError();
|
||||
}
|
||||
@ -1922,6 +1933,7 @@ function PMA_getHtmlForSpecificTablePrivileges($db, $table)
|
||||
if ($GLOBALS['is_superuser']) {
|
||||
// check the privileges for a particular table.
|
||||
$html_output = '<form id="usersForm" action="server_privileges.php">';
|
||||
$html_output .= PMA_URL_getHiddenInputs($db, $table);
|
||||
$html_output .= '<fieldset>';
|
||||
$html_output .= '<legend>'
|
||||
. PMA_Util::getIcon('b_usrcheck.png')
|
||||
@ -1953,6 +1965,16 @@ function PMA_getHtmlForSpecificTablePrivileges($db, $table)
|
||||
PMA_mergePrivMapFromResult($privMap, $res);
|
||||
$html_output .= PMA_getHtmlTableBodyForSpecificDbOrTablePrivs($privMap, $db);
|
||||
$html_output .= '</table>';
|
||||
|
||||
$html_output .= '<div style="float:left;">';
|
||||
$html_output .= PMA_Util::getWithSelected(
|
||||
$GLOBALS['pmaThemeImage'], $GLOBALS['text_dir'], "usersForm"
|
||||
);
|
||||
$html_output .= PMA_Util::getButtonOrImage(
|
||||
'submit_mult', 'mult_submit', 'submit_mult_export',
|
||||
__('Export'), 'b_tblexport.png', 'export'
|
||||
);
|
||||
|
||||
$html_output .= '</fieldset>';
|
||||
$html_output .= '</form>';
|
||||
} else {
|
||||
@ -2025,7 +2047,9 @@ function PMA_mergePrivMapFromResult(&$privMap, $result)
|
||||
function PMA_getHtmlForPrivsTableHead()
|
||||
{
|
||||
return '<thead>'
|
||||
. '<tr><th>' . __('User') . '</th>'
|
||||
. '<tr>'
|
||||
. '<th></th>'
|
||||
. '<th>' . __('User') . '</th>'
|
||||
. '<th>' . __('Host') . '</th>'
|
||||
. '<th>' . __('Type') . '</th>'
|
||||
. '<th>' . __('Privileges') . '</th>'
|
||||
@ -2059,6 +2083,7 @@ function PMA_getHtmlForViewUsersError()
|
||||
function PMA_getHtmlTableBodyForSpecificDbOrTablePrivs($privMap, $db)
|
||||
{
|
||||
$html_output = '<tbody>';
|
||||
$index_checkbox = 0;
|
||||
$odd_row = true;
|
||||
if (empty($privMap)) {
|
||||
$html_output .= '<tr class="odd">'
|
||||
@ -2076,6 +2101,12 @@ function PMA_getHtmlTableBodyForSpecificDbOrTablePrivs($privMap, $db)
|
||||
$html_output .= '<tr class="noclick '
|
||||
. ($odd_row ? 'odd' : 'even') . '">';
|
||||
|
||||
$value = htmlspecialchars($current_user . '&#27;' . $current_host);
|
||||
$html_output .= '<td>'
|
||||
. '<input type="checkbox" class="checkall" name="selected_usr[]" '
|
||||
. 'id="checkbox_sel_users_' . ($index_checkbox++) . '" '
|
||||
. 'value="' . $value . '" /></td>' . "\n";
|
||||
|
||||
// user
|
||||
$html_output .= '<td';
|
||||
if ($nbPrivileges > 1) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user