From fbb5b68cabbfee14656c3d26636ef3db4dacac06 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 --- cataloguing/editor.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cataloguing/editor.pl b/cataloguing/editor.pl index 53152c01dd..3e09b3b09d 100755 --- a/cataloguing/editor.pl +++ b/cataloguing/editor.pl @@ -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; -- 2.30.2