Weekly phpMyAdmin contributions 2017-W46

Last week I refactored several methods that contained HTML code to use the template system and fixed a few minor bugs.

Issues: