From 6e893a7ac8e37222a4c76112d485b74a4add97ca Mon Sep 17 00:00:00 2001
From: llaffont <llaffont@git-test.afi-sa.fr>
Date: Sat, 6 Apr 2013 15:30:48 +0000
Subject: [PATCH] =?UTF-8?q?Configuration=20kiosque:=20affichage=20de=20la?=
 =?UTF-8?q?=20s=C3=A9lection=20des=20paniers=20associ=C3=A9s=20aux=20domai?=
 =?UTF-8?q?nes?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 library/Class/PanierNotice.php | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/library/Class/PanierNotice.php b/library/Class/PanierNotice.php
index 673a5676842..6fe03c185c4 100644
--- a/library/Class/PanierNotice.php
+++ b/library/Class/PanierNotice.php
@@ -199,15 +199,16 @@ class Class_PanierNotice extends Storm_Model_Abstract {
 	// liste des paniers pour une combo
 	//-------------------------------------------------------------------------------
 	static function getPaniersForCombo() {
-		$liste = array('');
+		$user = Class_Users::getIdentity();
+
+		$paniers = array_merge($user->getPaniers(), 
+													 Class_PanierNotice::findAllWithCatalogue());
 
-		$user=Zend_Auth::getInstance()->getIdentity();
-		$paniers=fetchAll("select ID_PANIER,LIBELLE from notices_paniers where ID_USER=".$user->ID_USER);
+		$liste=[];
 
-		if(!$paniers) 
-			return $liste;
+		foreach($paniers as $panier) 
+			$liste[$panier->getId()] = $panier->getLibelleForAdmins();
 
-		foreach($paniers as $panier) $liste[$panier["ID_PANIER"]]=$panier["LIBELLE"];
 		return $liste;
 	}
 
-- 
GitLab