From c69e6faa983fa87412927f6f0a640d5eb07d0f93 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 10 Jan 2017 15:52:57 +0100 Subject: [PATCH] Bug 17778: Simplify fetch date Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- Koha/OAI/Server/Identify.pm | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Koha/OAI/Server/Identify.pm b/Koha/OAI/Server/Identify.pm index bddfc29e9c..79f6b80e1f 100644 --- a/Koha/OAI/Server/Identify.pm +++ b/Koha/OAI/Server/Identify.pm @@ -52,15 +52,9 @@ sub new { # Find the earliest timestamp in the biblio table. If this table is empty, undef # will be returned and we will report the fallback 0001-01-01. sub _get_earliest_datestamp { - my $dbh = C4::Context->dbh; - - my $order_sth = $dbh->prepare( "SELECT DATE(MIN(timestamp)) AS earliest FROM biblio" ); - $order_sth->execute(); - my $res = $order_sth->fetchrow_hashref(); - - return $res->{'earliest'}; - + my ( $earliest ) = $dbh->selectrow_array("SELECT DATE(MIN(timestamp)) AS earliest FROM biblio" ); + return $earliest } 1; -- 2.11.4.GIT