From aa83cc631a72f55d9887d6c3b2711a8379056069 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 17 Jan 2024 12:05:24 +0100 Subject: [PATCH] wait #6633 @1 --- app/Fluidbook/Compiler/Compiler.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/Fluidbook/Compiler/Compiler.php b/app/Fluidbook/Compiler/Compiler.php index 34909bc7f..a2361ed3b 100644 --- a/app/Fluidbook/Compiler/Compiler.php +++ b/app/Fluidbook/Compiler/Compiler.php @@ -1418,13 +1418,16 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError public function addBookmarkGroup($link) { - if ($link['left'] > $this->fluidbookSettings->width) { - //$link['page']++; + + if ($link['left'] > $this->getWidthForLinks()) { + $link['page']++; } - if ($link['page'] <= 0 || $link['page'] > $this->fluidbookSettings->pages) { + if ($link['page'] <= 0 || $link['page'] > $this->getPageNumber()) { return; } - $this->config->push('bookmarkGroups', ['page' => ($link['page']), 'nb' => $link['to'], 'name' => $link['extra']]); + $data = ['page' => ($link['page']), 'nb' => $link['to'], 'name' => $link['extra']]; + $this->config->push('bookmarkGroups', $data); + } -- 2.39.5