From 4d8d2ccb0bfe4c16b199f1678b4610a703ab1755 Mon Sep 17 00:00:00 2001
From: Martin Persson <xarragon@gmail.com>
Date: Fri, 18 Dec 2015 11:16:08 +0100
Subject: [PATCH] Bug 14272: Show single news item (backend)

Sponsored-by: Halland County Library
---
 C4/NewsChannels.pm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/C4/NewsChannels.pm b/C4/NewsChannels.pm
index 4dfde13..1338bb5 100644
--- a/C4/NewsChannels.pm
+++ b/C4/NewsChannels.pm
@@ -126,9 +126,14 @@ sub get_opac_new {
     my ($idnew) = @_;
     my $dbh = C4::Context->dbh;
     my $query = q{
-                  SELECT opac_news.*,branches.branchname
+                  SELECT opac_news.*,branches.branchname,
+                         timestamp AS newdate,
+                         borrowers.title AS author_title,
+                         borrowers.firstname AS author_firstname,
+                         borrowers.surname AS author_surname
                   FROM opac_news LEFT JOIN branches
                       ON opac_news.branchcode=branches.branchcode
+                  LEFT JOIN borrowers on borrowers.borrowernumber = opac_news.borrowernumber
                   WHERE opac_news.idnew = ?;
                 };
     my $sth = $dbh->prepare($query);
-- 
2.1.4