Searched hist:b24d91954b3e643fa93997b290b41c48da574647 (Results 1 – 1 of 1) sorted by relevance
| /dokuwiki/inc/ |
| H A D | common.php | b24d91954b3e643fa93997b290b41c48da574647 Thu Feb 18 11:19:07 UTC 2016 Andreas Gohr <gohr@cosmocode.de> refactor page saving and introduce COMMON_WIKIPAGE_SAVE
This makes the saveWikiText() function a little easier to read and moves external edit handling to its own function. Behavior stays the same (tests are unchanged).
In addition a new event COMMON_WIKIPAGE_SAVE is introduced that makes intercepting and acting on page saves much easier than possible before.
Developers can:
* prevent saves by either preventing the default action or overwriting the contentChanged field in a BEFORE hook * enforce saves even when no content changed by overwriting the contentChanged field in a BEFORE hook * Adjust the saved content by modifying the newContent field in a BEFORE hook * Adjust the stored change log information (summary, type, extras) in an AFTER hook * Easily know if a page was deleted, created or edited by inspecting the changeType field * what ever they want before or after a wiki page is saved
|