diff --git a/NetBiblio.php b/NetBiblio.php index e1b9ad6..e8c70dc 100644 --- a/NetBiblio.php +++ b/NetBiblio.php @@ -136,7 +136,8 @@ class NetBiblio extends WebService // add fields for mobile apps compatibility $b['date'] = date('Y.m.d', strtotime($b['availabilityDate'])); - $b['readBy'] = isset($b['reader']) ? $b['reader'] : null; + $b['readBy'] = isset($b['reader']) ? $b['reader'] : 'Lecteur inconnu'; + $b['category'] = $b['genre']; $b['code3'] = $b['producerCode']; $b['code3Long'] = $b['producer']; $b['typeMedia1'] = $b['mediaType']; @@ -529,7 +530,7 @@ class NetBiblio extends WebService $data = array(); foreach($books as $b) { - $data[$b['genre']][] = $b; + $data[$type][] = $b; } return $data; }