From aaa0b5c484d5031861b8809d20415fed7cc735b3 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 5 Sep 2023 10:16:32 +0200 Subject: [PATCH] wait #6241 @0.5 --- .idea/fluidbook_tools.iml | 13 +++++++++++++ .idea/php.xml | 15 ++++++++++++++- src/Links/Link.php | 20 ++++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) diff --git a/.idea/fluidbook_tools.iml b/.idea/fluidbook_tools.iml index bbef8b4..b3a424c 100644 --- a/.idea/fluidbook_tools.iml +++ b/.idea/fluidbook_tools.iml @@ -84,6 +84,19 @@ + + + + + + + + + + + + + diff --git a/.idea/php.xml b/.idea/php.xml index a70e4c5..3945e1b 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -88,9 +88,22 @@ + + + + + + + + + + + + + - + \ No newline at end of file diff --git a/src/Links/Link.php b/src/Links/Link.php index ef9b44e..079ee36 100644 --- a/src/Links/Link.php +++ b/src/Links/Link.php @@ -751,9 +751,29 @@ class Link public function ignore() { + if (!$this->pageExists()) { + return true; + } return false; } + public function pageExists() + { + if (is_numeric($this->page)) { + if ($this->compiler->isSinglePage()) { + if ($this->page < 1 || $this->page > $this->compiler->getPageNumber()) { + return false; + } + } else { + if ($this->page < 0 || $this->page > $this->compiler->getPageNumber() + 1) { + return false; + } + } + } + return true; + + } + public function getConfigZIP($d) { return $this->compiler->getConfigZIP($d); -- 2.39.5