$this->jsonDatas['pages'][] = array($info['document_id'], $info['document_page']);
}
$docs = array_unique($docs);
- $this->jsonDatas['documents'] = array_unique($docs);
+ $this->jsonDatas['documents'] = $docs;
+ $this->jsonDatas['documents_path'] = [];
+ foreach ($docs as $document_id) {
+ $this->jsonDatas['documents_path'][$document_id] = str_replace(WS_FILES, '', wsDocument::getDir($document_id, true));
+ }
if (is_null($book->numerotation) || !$book->numerotation || $book->numerotation == 'null') {
$this->jsonDatas['numerotation'] = $defaultNum;
return self::$_docsDir[$id];
}
- $new = WS_DOCS . '/' . $id . '/';
+ $new = WS_FILES . '/docs/' . $id . '/';
$old = WS_FILES . '/docs1/' . $id . '/';
$veryold = WS_FILES . '/docs2/' . $id . '/';