]> _ Git - cubeextranet.git/commitdiff
fix #2107 @0.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 20 Jun 2018 13:41:57 +0000 (13:41 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 20 Jun 2018 13:41:57 +0000 (13:41 +0000)
inc/ws/Controlleur/class.ws.flash.php
inc/ws/Metier/class.ws.document.php

index 3ee1599c49ae39e21ae324f359665932bcc219d4..4796c9a3baf970c6b40cf57d95b9ce99424d6c48 100644 (file)
@@ -383,7 +383,11 @@ class wsFlash extends cubeFlashGateway
                        $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;
index 317020356968febe9c663fe1ce602a5b9ceb4b6f..1e6798826a411d3835f50e8799ce2adffb36c1bf 100644 (file)
@@ -1046,7 +1046,7 @@ class wsDocument extends cubeMetier
                        return self::$_docsDir[$id];
                }
 
-               $new = WS_DOCS . '/' . $id . '/';
+               $new = WS_FILES . '/docs/' . $id . '/';
                $old = WS_FILES . '/docs1/' . $id . '/';
                $veryold = WS_FILES . '/docs2/' . $id . '/';