[dokuwiki] Re: Fixing p_get_first_heading()

  • From: "Chris Smith" <chris@xxxxxxxxxxxxx>
  • To: <dokuwiki@xxxxxxxxxxxxx>
  • Date: Tue, 13 Sep 2005 16:26:35 +0100

The fix is simple.  Within the p_get_first_heading() function, change the
true in the call to p_cached_instructions() to false. I haven't tested so I
can't promise the change won't have side-effects.

Chris

> -----Original Message-----
> From: dokuwiki-bounce@xxxxxxxxxxxxx
> [mailto:dokuwiki-bounce@xxxxxxxxxxxxx]On Behalf Of Joe Lapp
> Sent: 13 September 2005 14:22
> To: dokuwiki@xxxxxxxxxxxxx
> Subject: [dokuwiki] Fixing p_get_first_heading()
>
>
> 'Ello,
>
> I guess this got lost in my clutter of emails, but I
> discovered a bug in p_get_first_heading() and need advice on
> fixing it.
>
> This function pulls the heading from cached instructions.  If
> the instructions have not yet been cached, you get no
> heading.  I can see two effects.  If you're using
> $conf['useheading'], then the first load of a page will still
> use the page ID as the title.  Likewise, in my new RSS
> addition, the RSS entries still use the page ID as the title,
> since the addition is calling p_get_first_heading().
>
> I think we can solve the problem by having
> p_get_first_heading() verify that the instructions have been
> cached, and if not, then generate and cache the instructions
> WITHOUT also concatenating the page (since that would be a
> waste of clock cycles -- the rendering would just get thrown away).
>
> How do I do this?  Thanks!
> ~joe
> --
> DokuWiki mailing list - more info at
> http://wiki.splitbrain.org/wiki:mailinglist
>

-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: