Uploaded image for project: 'DokuWiki tools'
  1. DokuWiki tools
  2. DOKUWIKI-39

Don't create PHP macros and don't depend on the PHP macro

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.0
    • 1.3.6
    • Syntax
    • None
    • Integration
    • Unknown
    • N/A

    Description

      This one is not clearly a bug, but imho, the DokuWiki parser shouldn't depend (also not optionally) on the PHP macro and also shouldn't generate a PHP macro when it encounters <php>. The reasons for this are as follows:

      1. The whole feature of embedding PHP code was never enabled by default in DokuWiki, it was always highly discouraged to enable it and in fact the most recent release removed the feature altogether (together with HTML support, but HTML is well-supported in XWiki so not that problematic). The feature including the original syntax can be re-added with a plugin, though.
      2. If the PHP macro was used in a DokuWiki installation, it seems highly unlikely that the used code will work in an XWiki installation. Instead, the script should probably rather be manually converted to Velocity.

      I suggest to instead do what DokuWiki used to do by default until the most recent version, which is to display the PHP code as if it was in a code block, so wrap it in a code macro with syntax PHP. This preserves the original code, displays it nicely and gives the user a chance to migrate it to a script language like Velocity.

      Attachments

        Activity

          People

            MichaelHamann Michael Hamann
            MichaelHamann Michael Hamann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: