00984: pagelist directive incompatible with PublishPDF library

Summary: pagelist directive incompatible with PublishPDF library
Created: 2007-10-01 17:04
Status: Closed, added in for 2.2.0 stable
Category: Feature
From: jr
Priority: 4
Version: 2.1 and 2.2
OS: any

Description: The function FPLTemplate in scripts/pagelist.php calls MarkupToHTML to process the markup instruction for how to format the results of a search. This is incompatible with the Cookbook.PublishPDF library, which teaches pmwiki to generate a different kind of xml output. The fix is to make the following change to scripts/pagelist.php in function FPLTemplate:

  function FPLTemplate(...
    global $FPLMarkupFunction;
    SDV($FPLMarkupFunction, 'MarkupToHTML');
  return ... $FPLMarkupFunction($pagename, $out, ...

instead of

  function FPLTemplate(...
  return ... MarkupToHTML($pagename, $out, ...

This does not seem to produce any adverse side-effects and allows the PublishPDF library to redefine the MarkupToHTML function when processing a request to produce a pdf.