From 0770c0e55568f450990e768f7147fa8a25de8bcb Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Tue, 21 Aug 2007 04:10:08 +0200 Subject: alter p_get_first_heading() default $render value to true Calls to p_get_first_heading() are most likely to expect to get the first heading even if it needs to be generated, that is a $render value of true. Only the metadata renderer itself needs a value of false in order to prevent mutual dependency probelms. This fix should finally complete FS#1010 & problems breadcrumbs have with use_first_headings when metadata doesn't exist. Also see, http://www.freelists.org/archives/dokuwiki/08-2007/msg00018.html & http://www.freelists.org/archives/dokuwiki/08-2007/msg00132.html darcs-hash:20070821021008-d26fc-e08a23b4eb40f075de043687b57eb1223b0201b9.gz --- inc/parserutils.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'inc/parserutils.php') diff --git a/inc/parserutils.php b/inc/parserutils.php index e4e51c5a5..77ad21646 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -563,15 +563,15 @@ function p_render($mode,$instructions,& $info){ * * @param string $id dokuwiki page id * @param bool $render rerender if first heading not known - * default: false -- this protects against loops where $id requires a - * first heading further pages which eventually result - * in a request for a first heading from a page already - * in the chain (FS#1010) - * + * default: true -- must be set to false for calls from the metadata renderer to + * protects against loops and excessive resource usage when pages + * for which only a first heading is required will attempt to + * render metadata for all the pages for which they require first + * headings ... and so on. * * @author Andreas Gohr */ -function p_get_first_heading($id, $render=false){ +function p_get_first_heading($id, $render=true){ global $conf; return $conf['useheading'] ? p_get_metadata($id,'title',$render) : null; } -- cgit v1.2.3