Revert "Fix for $conf['breadcrumbs'] < 0, FS#2107", new fix
This reverts commit 4871414204
.
Additionally there is a new fix for FS#2107 that doesn't introduce a lot
of checks but instead ensures that the configuration option can't be set
to negative values when the configuration manager is used.
This commit is contained in:
parent
38dc5fa6df
commit
359fab8b2f
2
doku.php
2
doku.php
|
@ -69,7 +69,7 @@ if(!$INFO['exists'] &&
|
|||
}
|
||||
|
||||
//prepare breadcrumbs (initialize a static var)
|
||||
if ($conf['breadcrumbs'] > 0) breadcrumbs();
|
||||
if ($conf['breadcrumbs']) breadcrumbs();
|
||||
|
||||
// check upstream
|
||||
checkUpdateMessages();
|
||||
|
|
|
@ -268,9 +268,6 @@ 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
|
||||
|
|
|
@ -690,7 +690,7 @@ function tpl_breadcrumbs($sep='»'){
|
|||
global $conf;
|
||||
|
||||
//check if enabled
|
||||
if(!is_numeric($conf['breadcrumbs']) || $conf['breadcrumbs'] <= 0) return false;
|
||||
if(!$conf['breadcrumbs']) return false;
|
||||
|
||||
$crumbs = breadcrumbs(); //setup crumb trace
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ $meta['allowdebug'] = array('onoff');
|
|||
|
||||
$meta['_display'] = array('fieldset');
|
||||
$meta['recent'] = array('numeric');
|
||||
$meta['breadcrumbs'] = array('numeric');
|
||||
$meta['breadcrumbs'] = array('numeric','_min' => 0);
|
||||
$meta['youarehere'] = array('onoff');
|
||||
$meta['fullpath'] = array('onoff');
|
||||
$meta['typography'] = array('multichoice','_choices' => array(0,1,2));
|
||||
|
|
|
@ -68,7 +68,7 @@ if (!defined('DOKU_INC')) die();
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
|
||||
<?php if($conf['breadcrumbs'] > 0){?>
|
||||
<?php if($conf['breadcrumbs']){?>
|
||||
<div class="breadcrumbs">
|
||||
<?php tpl_breadcrumbs()?>
|
||||
<?php //tpl_youarehere() //(some people prefer this)?>
|
||||
|
|
Loading…
Reference in New Issue