From 33e7364304b277e9642f3f324dd9e8297874139d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joonas=20Kylm=C3=A4l=C3=A4?= Date: Wed, 2 Jun 2021 17:12:16 +0000 Subject: [PATCH] Bug 28490: Revert "Bug 26995: Fix SQL syntax error on the about page" This reverts commit 1131bb687f14fef7b4cb5f3b194711e85f9227af. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall Signed-off-by: Petro Vashchuk Signed-off-by: Emmi Takkinen Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart --- about.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/about.pl b/about.pl index 9b59a6aa65..de53ac02f5 100755 --- a/about.pl +++ b/about.pl @@ -496,13 +496,17 @@ $template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs; { my $dbh = C4::Context->dbh; my ($bad_relationships_count) = $dbh->selectall_arrayref(q{ - SELECT COUNT(*) FROM borrower_relationships WHERE relationship='_bad_data' + SELECT COUNT(*) + FROM ( + SELECT relationship FROM borrower_relationships WHERE relationship='_bad_data' }); $bad_relationships_count = $bad_relationships_count->[0]->[0]; my $existing_relationships = $dbh->selectall_arrayref(q{ - SELECT DISTINCT(relationship) FROM borrower_relationships WHERE relationship IS NOT NULL + SELECT DISTINCT(relationship) + FROM ( + SELECT relationship FROM borrower_relationships WHERE relationship IS NOT NULL }); my %valid_relationships = map { $_ => 1 } split( /,|\|/, C4::Context->preference('borrowerRelationship') ); -- 2.39.5