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
- 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
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.