diff --git a/mobile.netbiblio.php b/mobile.netbiblio.php index 80b1186..ebfe333 100644 --- a/mobile.netbiblio.php +++ b/mobile.netbiblio.php @@ -323,9 +323,10 @@ class NetBiblio extends WebService if(count($files) > 0) { foreach($booksWithoutFiles as $k => $b) { - if(isset($files[$b['code']])) { - $books[$k]['files'] = $files[$b['code']]; - $files[$b['code']]['id'] = $b['id']; + $fileCode = sprintf("%05u", $b['code']); + if(isset($files[$fileCode])) { + $books[$k]['files'] = $files[$fileCode]; + $files[$fileCode]['id'] = $b['id']; } else { // we need to have an empty array for mobile apps compatibility. $books[$k]['files'] = array();