From 9082f13d1523ab76307c999fe98592d025e7aecc Mon Sep 17 00:00:00 2001
From: efalcy <stl@gresille.org>
Date: Tue, 21 Jan 2014 16:30:20 +0100
Subject: [PATCH] Correction moissonage bib num : erreur sur le deleteBy

---
 library/Class/WebService/BibNumerique/ArteVOD.php       | 4 ++--
 library/Class/WebService/BibNumerique/Numilog.php       | 4 ++--
 library/Class/WebService/BibNumerique/ToutApprendre.php | 4 ++--
 library/Class/WebService/BibNumerique/Vodeclic.php      | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/library/Class/WebService/BibNumerique/ArteVOD.php b/library/Class/WebService/BibNumerique/ArteVOD.php
index 6bb4d3fed5e..ce1bfbf555f 100644
--- a/library/Class/WebService/BibNumerique/ArteVOD.php
+++ b/library/Class/WebService/BibNumerique/ArteVOD.php
@@ -139,8 +139,8 @@ class Class_WebService_BibNumerique_ArteVOD extends Class_WebService_BibNumeriqu
 	protected function _deleteNonHarvested() {
 		if (0 < count($this->getHarvestedIds()))
 			Class_Album::getLoader()
-				->deleteBy(array('url_origine = \'' . self::BASE_URL . '\'',
-						             'id_origine not in (\'' . implode("', '", $this->getHarvestedIds()) . '\')'));
+				->deleteBy(['url_origine' => self::BASE_URL,
+										'where' => 'id_origine not in (\'' . implode("', '", $this->getHarvestedIds()) . '\')']);
 	}
 		
 
diff --git a/library/Class/WebService/BibNumerique/Numilog.php b/library/Class/WebService/BibNumerique/Numilog.php
index 7961c3cfd2d..d44650e06dd 100644
--- a/library/Class/WebService/BibNumerique/Numilog.php
+++ b/library/Class/WebService/BibNumerique/Numilog.php
@@ -56,8 +56,8 @@ class Class_WebService_BibNumerique_Numilog extends Class_WebService_BibNumeriqu
 	protected function _deleteNonHarvested() {
 		if (0 < count($this->getHarvestedIds()))
 			Class_Album::getLoader()
-				->deleteBy(array('url_origine = \'' . self::BASE_URL . '\'',
-						             'id_origine not in (\'' . implode("', '", $this->getHarvestedIds()) . '\')'));
+				->deleteBy(['url_origine' => self::BASE_URL,
+										'id_origine not in (\'' . implode("', '", $this->getHarvestedIds()) . '\')'));
 	}
 		
 
diff --git a/library/Class/WebService/BibNumerique/ToutApprendre.php b/library/Class/WebService/BibNumerique/ToutApprendre.php
index 322dc131c50..fedaec5dd9a 100644
--- a/library/Class/WebService/BibNumerique/ToutApprendre.php
+++ b/library/Class/WebService/BibNumerique/ToutApprendre.php
@@ -60,8 +60,8 @@ class Class_WebService_BibNumerique_ToutApprendre extends Class_WebService_BibNu
 		foreach($this->_albums as $album)
 			$ids []= $album->getIdOrigine();
 
-		Class_Album::deleteBy(['url_origine = \'' . self::BASE_URL . '\'',
-													 'id_origine not in (\'' . implode("', '", $ids) . '\')']);
+		Class_Album::deleteBy(['url_origine' => self::BASE_URL,
+													 'where' => 'id_origine not in (\'' . implode("', '", $ids) . '\')']);
 	}
 
 
diff --git a/library/Class/WebService/BibNumerique/Vodeclic.php b/library/Class/WebService/BibNumerique/Vodeclic.php
index f2f5b7bb55f..78a4452431d 100644
--- a/library/Class/WebService/BibNumerique/Vodeclic.php
+++ b/library/Class/WebService/BibNumerique/Vodeclic.php
@@ -62,8 +62,8 @@ class Class_WebService_BibNumerique_Vodeclic extends Class_WebService_BibNumeriq
 		foreach($this->_albums as $album)
 			$ids []= $album->getIdOrigine();
 
-		Class_Album::deleteBy(['url_origine = \'' . self::BASE_URL . '\'',
-													 'id_origine not in (\'' . implode("', '", $ids) . '\')']);
+		Class_Album::deleteBy(['url_origine' => self::BASE_URL,
+													 'where' => 'id_origine not in (\'' . implode("', '", $ids) . '\')']);
 	}
 
 
-- 
GitLab