From adb2fee18e3d64ab3915eaa498063882306a8535 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Fri, 15 Sep 2017 20:19:45 +0200 Subject: [PATCH] fixed unlink not always executed --- build/service/CalendarExtractor.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/build/service/CalendarExtractor.php b/build/service/CalendarExtractor.php index e92ca4f..aa995a0 100644 --- a/build/service/CalendarExtractor.php +++ b/build/service/CalendarExtractor.php @@ -296,6 +296,10 @@ } + /* Remove file */ + unlink($link); + + /* [2] Apply Tesseract =========================================================*/ { @@ -320,10 +324,7 @@ /* [3] End procedure =========================================================*/ - /* (1) Remove file */ - unlink($link); - - /* (2) Return read value */ + /* (1) Return read value */ return $read; } @@ -425,7 +426,7 @@ /* (1) If a name -> Search if there is a correction in the database */ - $sqlr = DatabaseDriver::getPDO()->prepare("SELECT e.id_event as ide, l.id_location as idl, l.id_location as idl e.name as ename, l.name as lname FROM event as e, location as l WHERE e.id_event = l.id_event AND l.id_location= :idl"); + $sqlr = DatabaseDriver::getPDO()->prepare("SELECT e.id_event as ide, l.id_location as idl, l.id_location as idl, e.name as ename, l.name as lname FROM event as e, location as l WHERE e.id_event = l.id_event AND l.id_location= :idl"); $sqlr->execute([ ':idl' => $data[1] ]); /* (2) Default values */