diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php index 2e15d52902..4d0da96332 100644 --- a/libraries/server_privileges.lib.php +++ b/libraries/server_privileges.lib.php @@ -3713,34 +3713,12 @@ function PMA_getHtmlForInitials($array_initials) uksort($array_initials, "strnatcasecmp"); - $html_output = '' - . ''; - foreach ($array_initials as $tmp_initial => $initial_was_found) { - if ($tmp_initial === null) { - continue; - } - - if (!$initial_was_found) { - $html_output .= ''; - continue; - } - - $html_output .= '' . "\n"; - } - $html_output .= '' . "\n"; - $html_output .= '
' . $tmp_initial . '' - . '' . $tmp_initial - . '' - . '' - . '' . __('Show all') . '
'; + $html_output = Template::get('privileges/initials_row') + ->render( + array( + 'array_initials' => $array_initials + ) + ); return $html_output; } diff --git a/templates/privileges/initials_row.phtml b/templates/privileges/initials_row.phtml new file mode 100644 index 0000000000..500375cda7 --- /dev/null +++ b/templates/privileges/initials_row.phtml @@ -0,0 +1,28 @@ + + + $initial_was_found) : ?> + + + + + + + + + + + + + +
+ + $tmp_initial)); ?> + + + + + +
diff --git a/test/libraries/PMA_server_privileges_test.php b/test/libraries/PMA_server_privileges_test.php index 83f67726fd..01a3872bea 100644 --- a/test/libraries/PMA_server_privileges_test.php +++ b/test/libraries/PMA_server_privileges_test.php @@ -2426,13 +2426,13 @@ class PMA_ServerPrivileges_Test extends PHPUnit_Framework_TestCase $this->assertContains('A', $actual); $this->assertContains('Z', $actual); $this->assertContains( - '-', + . 'collation_connection">-', $actual ); $this->assertContains( - '"', $actual