From: Vincent Vanwaelscappel Date: Fri, 10 Mar 2023 17:25:52 +0000 (+0100) Subject: wait #5799 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6f096c5ae5105e725446bbc421b829ec65eb12c7;p=fluidbook-toolbox.git wait #5799 @1 --- diff --git a/app/Jobs/FluidbookCompiler.php b/app/Jobs/FluidbookCompiler.php index e5ea82c0f..0c813fe16 100644 --- a/app/Jobs/FluidbookCompiler.php +++ b/app/Jobs/FluidbookCompiler.php @@ -2385,15 +2385,18 @@ height="0" width="0" style="display:none;visibility:hidden"> } $linksToAdd = [$link]; - if ($link->overlapDoublePage() && !$this->_fluidbook->isOnePage()) { + if ($link->overlapDoublePage() && !$this->isOnePage()) { $linksToAdd[] = $link->getRightClone(); } + foreach ($linksToAdd as $lta) { try { /** @var $lta Link */ // Keep this line because some properties of the link (like blend mode) are parsed with this function $c = $lta->getHTMLContainer(); + + $css[] = $lta->getCSSContainer(); if (!isset($pages[$lta->page])) { $pages[$lta->page] = ['normal' => []]; @@ -2422,6 +2425,8 @@ height="0" width="0" style="display:none;visibility:hidden"> $this->triggerLinkError($e, $lta); } } + + // Make old "aftersearch" link compatible with new "extra" menu option by extracting link URL if ($link->page == 'aftersearch') { $this->config->afterSearchLink = $link->to; @@ -2443,7 +2448,6 @@ height="0" width="0" style="display:none;visibility:hidden"> } } - $allpages = range(0, $this->getFluidbook()->getPagesNumber() + 1); if ($this->fluidbookSettings->themeEnableAfterSearch) { $allpages[] = 'aftersearch'; @@ -2469,6 +2473,14 @@ height="0" width="0" style="display:none;visibility:hidden"> return $css; } + /** + * @return bool + */ + public function isOnePage(): bool + { + return $this->_fluidbook->isOnePage(); + } + /** * @param $e \Exception * @param $link Link @@ -2767,6 +2779,11 @@ height="0" width="0" style="display:none;visibility:hidden"> $this->vdir->copyDirectory($this->assets . '/js/libs/polyfills', 'js/libs/polyfills'); } + public function getCacheDir($path): string + { + return Files::mkdir(protected_path('fluidbookpublication/cache/' . $path)); + } + public function writeTexts() { $cache = sha1($this->fluidbookSettings->highlightResults . '/--/' . $this->fluidbookSettings->searchWordSelectionAlgorithm . '///' . $this->fluidbookSettings->textExtraction . '|--|' . $this->fluidbookSettings->ignoreSearchSeparators . '|||' . $this->getFluidbook()->getCompositionUpdate() . '()()()' . FWSTK::lastUpdate()); @@ -3869,7 +3886,6 @@ height="0" width="0" style="display:none;visibility:hidden"> * @param $lead * @param $image * @return string|void - * @throws Zend_Filter_Exception */ protected function _articleToHTML($child, &$title, &$lead, &$image, $dir = null) {