* Add options to dumpBackup.php for making split/partial dumps by page id
* Fix language name for dv
* (bug 3503) Update LanguageSq.php from sq.wikipedia.org messages
+* Added EditFilter hook, and output callback on EditPage::showEditForm()
+ for a place to add in captcha-type extensions in the edit flow
=== Caveats ===
wfProfileOut( "$fname-checks" );
return false;
}
+ if ( !wfRunHooks( 'EditFilter', array( &$this, $this->textbox1, $this->section ) ) ) {
+ # Error messages or other handling should be performed by the filter function
+ wfProfileOut( $fname );
+ wfProfileOut( "$fname-checks" );
+ return false;
+ }
if ( $wgUser->isBlockedFrom( $this->mTitle, false ) ) {
# Check block state against master, thus 'false'.
$this->blockedIPpage();
/**
* Send the edit form and related headers to $wgOut
+ * @param $formCallback Optional callable that takes an OutputPage
+ * parameter; will be called during form output
+ * near the top, for captchas and the like.
*/
- function showEditForm() {
+ function showEditForm( $formCallback=null ) {
global $wgOut, $wgUser, $wgAllowAnonymousMinor, $wgLang, $wgContLang;
$fname = 'EditPage::showEditForm';
{$toolbar}
<form id="editform" name="editform" method="post" action="$action"
enctype="multipart/form-data">
+END
+);
+ if( is_callable( $formCallback ) ) {
+ call_user_func_array( $formCallback, array( &$wgOut ) );
+ }
+ $wgOut->addHTML( <<<END
$recreate
{$commentsubject}
<textarea tabindex='1' accesskey="," name="wpTextbox1" rows='{$rows}'