From fe9ec250a6558c8352a35b6537cdc30d6c9f5477 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Wed, 19 Nov 2008 15:07:58 +0100 Subject: FS#630: allow $conf['useheading'] to individually apply to content links and/or navigation links $conf['useheading'] values are now: - 0 : off, use page name in link text - 'content' : use first heading text for links in wiki page content - 'navigation' : use first heading text for links in non-page content, e.g. breadcrumps, backlinks, search results, etc. - 1 : use first heading text in all links (for backwards compatibility, any other values are mapped to 0 or 1 by empty() function.) $conf['useheading'] value should now be checked using the useHeading($linktype) function, where linktype can be "content" or "navigation" darcs-hash:20081119140758-f07c6-6e26456d50dcecc949fada31b0d4e72877fde1cc.gz --- inc/common.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inc/common.php') diff --git a/inc/common.php b/inc/common.php index faee93623..9f6920378 100644 --- a/inc/common.php +++ b/inc/common.php @@ -288,7 +288,7 @@ function breadcrumbs(){ // page names $name = noNSorNS($ID); - if ($conf['useheading']) { + if (useHeading('navigation')) { // get page title $title = p_get_first_heading($ID,true); if ($title) { @@ -1006,7 +1006,7 @@ function saveWikiText($id,$text,$summary,$minor=false){ io_saveFile($conf['cachedir'].'/purgefile',time()); // if useheading is enabled, purge the cache of all linking pages - if($conf['useheading']){ + if(useHeading('content')){ require_once(DOKU_INC.'inc/fulltext.php'); $pages = ft_backlinks($id); foreach ($pages as $page) { -- cgit v1.2.3