From bb6e4aac57a50e4a14887fb61a5b3297d714765f Mon Sep 17 00:00:00 2001
From: Ghislain Loas <ghislo@sandbox.pergame.net>
Date: Wed, 24 Aug 2016 09:30:34 +0200
Subject: [PATCH] hotline #47094 remove call to column notices_paniers
 id_panier

---
 VERSIONS_HOTLINE/47094       | 2 +-
 scripts/majNoticesPanier.php | 4 ++--
 scripts/majPaniers.php       | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/VERSIONS_HOTLINE/47094 b/VERSIONS_HOTLINE/47094
index 23a246b12a1..5af168766fb 100644
--- a/VERSIONS_HOTLINE/47094
+++ b/VERSIONS_HOTLINE/47094
@@ -1 +1 @@
- - ticket #47094 : Probleme d'affichage  des articles au format diaporama et Probleme d'acces à l'espace jeunesse.
\ No newline at end of file
+ - ticket #47094 : Correction de l'affichage des catalogues pointant sur des paniers.
\ No newline at end of file
diff --git a/scripts/majNoticesPanier.php b/scripts/majNoticesPanier.php
index d241701b583..a7b0e17ccf8 100644
--- a/scripts/majNoticesPanier.php
+++ b/scripts/majNoticesPanier.php
@@ -32,7 +32,7 @@ require_once "startup.php";
 setupOpac();
 $mysql_file = tempnam("/tmp", "paniersupdate");
 $handle=fopen($mysql_file,'w');
-$paniers = Class_PanierNotice::findAllBy(['where' => 'id_panier<234']);
+$paniers = Class_PanierNotice::findAllBy(['where' => 'id<234']);
 foreach($paniers as $panier) {
 	$cles = [];
 	$ids_origine=$panier->getIdsOrigine();
@@ -52,7 +52,7 @@ foreach($paniers as $panier) {
 		$cles[]=$notice->getClefAlpha();
 
 	}
-	fwrite($handle,'update notices_paniers set notices="'.$panier->getNotices().'" where id_panier='.$panier->getId().";"."\n");
+	fwrite($handle,'update notices_paniers set notices="'.$panier->getNotices().'" where id = '.$panier->getId().";"."\n");
 
 	if ($cles && sizeof($cles)>0) {
 		$panier->setNotices(implode(';',$cles));
diff --git a/scripts/majPaniers.php b/scripts/majPaniers.php
index 8e3be7025b7..526d5a22b9a 100644
--- a/scripts/majPaniers.php
+++ b/scripts/majPaniers.php
@@ -45,7 +45,7 @@ foreach($paniers as $panier) {
 
 	$panier->setIdsOrigine(implode(';',$ids_origine));
 
-	fwrite($handle,'update notices_paniers set ids_origine="'.implode(';',$ids_origine).'" where id_panier='.$panier->getId().";"."\n");
+	fwrite($handle,'update notices_paniers set ids_origine="'.implode(';',$ids_origine).'" where id ='.$panier->getId().";"."\n");
 	$panier->save();
 }
 fclose($handle);
-- 
GitLab