Commit initial portion of EditPage refactoring.
authorDaniel Friesen <dantman@users.mediawiki.org>
Tue, 26 Aug 2008 14:07:31 +0000 (14:07 +0000)
committerDaniel Friesen <dantman@users.mediawiki.org>
Tue, 26 Aug 2008 14:07:31 +0000 (14:07 +0000)
commit4f1e3a69de99055c903d8d8203c7a93c7e28e998
tree7636c7157de851331f0013d69bd931d72c53cd51
parent289353d6af749aade21ffc1be916c76644d12d02
Commit initial portion of EditPage refactoring.
This isn't complete, but nothing is broken.
The goal here is to make it possible for extensions to subclass the editpage and override certain areas of it while allowing the rest to keep it's presence without needing to copy code from core which may change.
* Use $this->action instead of hardcoded 'submit's so this may be overridden for subclasses that use a different action=...
* Move all the header setting into a new setHeaders() function. This way subclasses can tweak the title, this was previously impossible because of how scattered setPageTitle calls were.
* Move the previewarea stuff that was being duplicated in 2 places into it's own function.
* Move some inputs into a beforetext function
* Move wpTextbox1 into a special function. And create a textbox function to unify textarea creation. wpTextbox1 and wpTextbox2 now have a unified style due to this. (Though the metadata textarea could use this applied to it as well)
* Move edittools into a function.
* In getPreviewText;
** Don't use $wgOut
** Move template and other parseroutput related code outside of the function and simply set a $this->parserOutput variable while we're in here. (We should probably also move the $wgOut->addParserOutputNoText call somewhere else, and move most of the preview parsing into one of the initialization functions.
includes/EditPage.php