book code is padded to 5 digits by checkfile
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user