Bug 33375: Quote reserved keyword 'rank' in advanced editor

This change quotes the 'rank' keyword in the advanced editor,
so that it doesn't cause fatal crashes when using MySQL 8

Test plan:
0. Apply patch and koha-plack --restart kohadev
1. Enable advanced editor
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=EnableAdvancedCatalogingEditor
2. Go to http://localhost:8081/cgi-bin/koha/cataloguing/editor.pl#new/
3. Click on "Advanced" on the left nav
4. Note that "LIBRARY OF CONGRESS" is ordered before "NATIONAL LIBRARY OF FRANCE"
5. Rejoice!

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
David Cook 2023-03-31 00:55:56 +00:00 committed by Tomas Cohen Arazi
parent 668252503d
commit 99f8273673
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -78,7 +78,7 @@ my $dbh = C4::Context->dbh;
$template->{VARS}->{z3950_servers} = $dbh->selectall_arrayref( q{
SELECT * FROM z3950servers
WHERE recordtype != 'authority' AND servertype = 'zed'
ORDER BY rank,servername
ORDER BY `rank`,servername
}, { Slice => {} } );
output_html_with_http_headers $input, $cookie, $template->output;