It's better when it's simple

User Tools

Site Tools


Translations of this page?:

Learn about DokuWiki

Advanced Use

Corporate Use

Our Community

Follow us on Facebook, Twitter and other social networks.

Our Privacy Policy


Code Refactoring

Certain parts of DokuWiki's code are grown over several years and should be completely overhauled. This page gives a rough overview on these issues.


  • clean up and consolidate duplicate code
  • make certain function more flexible to use (do away with hardcoded IDs)
  • get rid of eval where possible


  • The whole system needs to be analyzed and redesigned
  • Maybe use a different format than serialized PHP

Page Saving

  • savewikitext() is one ugly lump of code
  • we should get proper return codes (or exceptions?) to see when and what went wrong


  • Some of the generated HTML code contains workarounds for very old browsers which we can start to ignore
  • Some code just doesn't make sense

Media Functions

Most of the functions in inc/media.php directly work with $_FILES, which makes it impossible to reuse them in other parts like XMLRPC or WebDAV. These functions are best to be changed to work with file handles instead.

devel/refactoring.txt · Last modified: 2015-05-23 15:51 by andi