diff options
-rw-r--r-- | doku.php | 2 | ||||
-rw-r--r-- | inc/common.php | 3 | ||||
-rw-r--r-- | inc/template.php | 2 | ||||
-rw-r--r-- | lib/tpl/default/main.php | 2 |
4 files changed, 6 insertions, 3 deletions
@@ -69,7 +69,7 @@ if(!$INFO['exists'] && } //prepare breadcrumbs (initialize a static var) -if ($conf['breadcrumbs']) breadcrumbs(); +if ($conf['breadcrumbs'] > 0) breadcrumbs(); // check upstream checkUpdateMessages(); diff --git a/inc/common.php b/inc/common.php index 18f782788..667846804 100644 --- a/inc/common.php +++ b/inc/common.php @@ -268,6 +268,9 @@ function breadcrumbs(){ global $ACT; global $conf; + // Prevent infinite loop later in this function + if (!is_numeric($conf['breadcrumbs']) || $conf['breadcrumbs'] <= 0) return array(); + //first visit? $crumbs = isset($_SESSION[DOKU_COOKIE]['bc']) ? $_SESSION[DOKU_COOKIE]['bc'] : array(); //we only save on show and existing wiki documents diff --git a/inc/template.php b/inc/template.php index e2ea6e386..b89f7abbc 100644 --- a/inc/template.php +++ b/inc/template.php @@ -690,7 +690,7 @@ function tpl_breadcrumbs($sep='»'){ global $conf; //check if enabled - if(!$conf['breadcrumbs']) return false; + if(!is_numeric($conf['breadcrumbs']) || $conf['breadcrumbs'] <= 0) return false; $crumbs = breadcrumbs(); //setup crumb trace diff --git a/lib/tpl/default/main.php b/lib/tpl/default/main.php index 754a6e482..c1b62f12e 100644 --- a/lib/tpl/default/main.php +++ b/lib/tpl/default/main.php @@ -68,7 +68,7 @@ if (!defined('DOKU_INC')) die(); <div class="clearer"></div> </div> - <?php if($conf['breadcrumbs']){?> + <?php if($conf['breadcrumbs'] > 0){?> <div class="breadcrumbs"> <?php tpl_breadcrumbs()?> <?php //tpl_youarehere() //(some people prefer this)?> |