'EditFilter': Perform checks on an edit
$editor: Edit form (see includes/EditPage.php)
$text: Contents of the edit box
-§ion: Section being edited
-$error: Error message to return
+$section: Section being edited
+&$error: Error message to return
Return false to halt editing; you'll need to handle error messages, etc. yourself.
Alternatively, modifying $error and returning true will cause the contents of $error
wfProfileOut( "$fname-checks" );
return false;
}
- if ( !wfRunHooks( 'EditFilter', array( &$this, $this->textbox1, $this->section, $this->hookError ) ) ) {
+ if ( !wfRunHooks( 'EditFilter', array( $this, $this->textbox1, $this->section, &$this->hookError ) ) ) {
# Error messages etc. could be handled within the hook...
wfProfileOut( $fname );
wfProfileOut( "$fname-checks" );
$wgOut->addWikiText( wfMsg( 'missingsummary' ) );
}
- if( !$this->hookError = '' ) {
+ if( !$this->hookError == '' ) {
$wgOut->addWikiText( $this->hookError );
}