From 6bc5310c4420b8ed5c5d789452642af4d2f27d25 Mon Sep 17 00:00:00 2001 From: David Cook Date: Fri, 31 Mar 2023 00:55:56 +0000 Subject: [PATCH] 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 Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 99f8273673b7e2189fff5846bdeacff70e0a48ed) Signed-off-by: Matt Blenkinsop (cherry picked from commit 30260ece2f567823da7189abf5ebd0a43caa526a) Signed-off-by: Lucas Gass (cherry picked from commit d7b5cbf075241f84d06edaa08f40b129229a80c5) Signed-off-by: Arthur Suzuki --- cataloguing/editor.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cataloguing/editor.pl b/cataloguing/editor.pl index c2864a31fd..8de9a48c3a 100755 --- a/cataloguing/editor.pl +++ b/cataloguing/editor.pl @@ -80,7 +80,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; -- 2.39.5