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:
Michael Hamann 2010-11-30 18:34:10 +01:00
parent 38dc5fa6df
commit 359fab8b2f
5 changed files with 4 additions and 7 deletions

View File

@ -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();

View File

@ -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

View File

@ -690,7 +690,7 @@ function tpl_breadcrumbs($sep='&raquo;'){
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

View File

@ -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));

View File

@ -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)?>