From 101ae61c8ffdae643e84949d82e70200b56309ff Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@biblibre.com>
Date: Fri, 6 Apr 2012 14:58:19 +0200
Subject: [PATCH 2/2] Bug 7802: Followup Remove CUR_DATE() and CURRENT_DATE()
 MySQLisms, replace by CAST(now() AS date).

---
 C4/Reserves.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/C4/Reserves.pm b/C4/Reserves.pm
index 3358601..07edcff 100644
--- a/C4/Reserves.pm
+++ b/C4/Reserves.pm
@@ -912,7 +912,7 @@ sub AutoUnsuspendReserves {
 
     my $dbh = C4::Context->dbh;
 
-    my $query = "UPDATE reserves SET suspend = 0, suspend_until = NULL WHERE DATE( suspend_until ) < DATE( CURDATE() )";
+    my $query = "UPDATE reserves SET suspend = 0, suspend_until = NULL WHERE DATE( suspend_until ) < CAST(now() AS date)";
     my $sth = $dbh->prepare( $query );
     $sth->execute();
 
-- 
1.7.7.3