]> _ Git - fluidbook_tools.git/commitdiff
wait #5897 @0:20
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 28 Apr 2023 09:50:46 +0000 (11:50 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 28 Apr 2023 09:50:46 +0000 (11:50 +0200)
src/Links/Link.php

index b315f8550934408ccfffe933d241d818f9d43174..60edcdf432451f83894fc8b811d48ab983f419cc 100644 (file)
@@ -427,9 +427,13 @@ class Link {
         }
     }
 
-    public function overlapDoublePage() {
+    public function isOnNormalPage() {
         // $this->page is normally an integer but it can also be a string (eg. background / aftersearch)
-        if (!is_int($this->page)) {
+        return is_int($this->page) || preg_match('/^\d+$/', $this->page, $matches);
+    }
+
+    public function overlapDoublePage() {
+        if (!$this->isOnNormalPage()) {
             return false;
         }
         return ($this->page % 2 == 0 && ($this->left + $this->width) > $this->compiler->getWidthForLinks());