From 611df90d30381d1b5d7990c6141e4080893850b8 Mon Sep 17 00:00:00 2001 From: Gilles Crettenand Date: Fri, 12 Jun 2015 15:32:58 +0200 Subject: [PATCH] - Treat 'Jeunesse' more like a normal 'Genre' for the outside world - Activate 'Jeunesse' as a Genre for the Android app --- NetBiblio.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/NetBiblio.php b/NetBiblio.php index 3bd5407..4abd415 100644 --- a/NetBiblio.php +++ b/NetBiblio.php @@ -10,7 +10,6 @@ use BSR\Lib\Exception\AuthenticationException; use BSR\Lib\Exception\WebException; use BSR\Lib\Search\BookSearch; use BSR\Lib\WebService; - class NetBiblio extends WebService { private $login = ''; @@ -640,6 +639,11 @@ class NetBiblio extends WebService } if(isset($queryArray['genre']) && is_array($queryArray['genre'])) { + if(($key = array_search('J', $queryArray['genre'])) !== false) { + unset($queryArray['genre']['J']); + $queryArray['jeunesse'] = array('filtrer' => 'filtrer'); + } + $selectedGenres = array_filter($queryArray['genre'], function ($c) { return $c != '0'; }); @@ -733,7 +737,7 @@ class NetBiblio extends WebService */ public function ListOfCategories() { - return DBHelper::ListOfGenres(); + return DBHelper::ListOfGenres(true); } /**