]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6188
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 7 Sep 2023 14:19:04 +0000 (16:19 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 7 Sep 2023 14:19:04 +0000 (16:19 +0200)
app/Models/FluidbookDocument.php

index 75a309c8f60b36206c29609e38ffcfadc21ddfef..7ec5a3927a3ad68115565a47cb129f6d6deb9379 100644 (file)
@@ -380,7 +380,8 @@ class FluidbookDocument extends ToolboxModel
 
     public function _getHightlightFilePath($page, $mode = 'standard')
     {
-        return $this->path('texts/p' . $page . '.fby');
+        $dir = $mode !== 'standard' ? '/' . $mode : '';
+        return $this->path('texts' . $dir . '/p' . $page . '.fby');
     }
 
     public function _getTextPath($page, $type = self::TEXT_PLAIN, $mode = 'standard', $extractionMethod = 'fluidbook', $ignoreSeparators = '')
@@ -391,7 +392,8 @@ class FluidbookDocument extends ToolboxModel
         }
 
         $prefix = self::_getTextFilePrefix($extractionMethod);
-        return $this->path('texts/' . $sepFolder . $prefix . $type . $page . '.txt');
+        $dir = $mode !== 'standard' ? '/' . $mode : '';
+        return $this->path('texts/' . $dir . $sepFolder . $prefix . $type . $page . '.txt');
     }
 
     public function getPDFSource($type = 'crop'): string