From c98845b48a0b8aa6c13e4b4c0a4049e1d19fbf31 Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 23 Jul 2019 17:45:23 -0700 Subject: [PATCH] Fixes #3894 - Chapter breadcrumb displaying when no chapter in use. --- e107_core/shortcodes/batch/page_shortcodes.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/e107_core/shortcodes/batch/page_shortcodes.php b/e107_core/shortcodes/batch/page_shortcodes.php index 75180f0a6..0fbd9ca9f 100644 --- a/e107_core/shortcodes/batch/page_shortcodes.php +++ b/e107_core/shortcodes/batch/page_shortcodes.php @@ -602,6 +602,7 @@ class cpage_shortcodes extends e_shortcode if(empty($brow['chapter_sef'])) { + //e107::getDebug()->log($this); return null; } @@ -618,8 +619,14 @@ class cpage_shortcodes extends e_shortcode function sc_chapter_breadcrumb() { + + $row = $this->getChapter(); + $brow = $this->getBook($row['chapter_parent']); - // $this->breadcrumb(); + if(empty($brow['chapter_sef'])) + { + return null; + } $breadcrumb = e107::breadcrumb();