summaryrefslogtreecommitdiff
path: root/inc/parserutils.php
diff options
context:
space:
mode:
authorChris Smith <chris@jalakai.co.uk>2007-08-21 04:10:08 +0200
committerChris Smith <chris@jalakai.co.uk>2007-08-21 04:10:08 +0200
commit0770c0e55568f450990e768f7147fa8a25de8bcb (patch)
tree92b4d0e42cdb1068c0d22076d83d43f828864dcc /inc/parserutils.php
parentee1dcd2c4fe69572ca679e6bf6e14b4e8d272131 (diff)
downloadrpg-0770c0e55568f450990e768f7147fa8a25de8bcb.tar.gz
rpg-0770c0e55568f450990e768f7147fa8a25de8bcb.tar.bz2
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
Diffstat (limited to 'inc/parserutils.php')
-rw-r--r--inc/parserutils.php12
1 files changed, 6 insertions, 6 deletions
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 <andi@splitbrain.org>
*/
-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;
}