Add a new hook EditPageBeforeEditConflict to allow extensions like FCKeditor to modif...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Tue, 15 Apr 2008 14:47:04 +0000 (14:47 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Tue, 15 Apr 2008 14:47:04 +0000 (14:47 +0000)
RELEASE-NOTES
docs/hooks.txt
includes/EditPage.php

index c8f7751..8e91c1e 100644 (file)
@@ -73,6 +73,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 6934) Allow separated inclusions, links, redirects on whatlinkshere
 * Cache image redirects
 * (bug 10457) Reorganize Special:Specialpages
+* Add a new hook EditPageBeforeConflictDiff to allow extensions like FCKeditor
+  to modify the output for edit conflicts.
 
 === Bug fixes in 1.13 ===
 
index 42ee77f..41d0e34 100644 (file)
@@ -544,6 +544,14 @@ Alternatively, modifying $error and returning true will cause the contents of $e
 to be echoed at the top of the edit form as wikitext. Return true without altering
 $error to allow the edit to proceed.
 
+'EditPageBeforeConflictDiff': allows modifying the EditPage object and output
+when there's an edit conflict.  Return false to halt normal diff output; in
+this case you're responsible for computing and outputting the entire "conflict"
+part, i.e., the "difference between revisions" and "your text" headers and
+sections.
+&$editor: EditPage instance
+&$out: OutputPage instance
+
 'EditPageBeforeEditButtons':  allows modifying the edit buttons below the textarea in the edit form
 &$editpage: The current EditPage object
 &$buttons: Array of edit buttons "Save", "Preview", "Live", and "Diff"
index 3c0f2ae..a4218d5 100644 (file)
@@ -1391,7 +1391,7 @@ END
 </div>
 ");
 
-               if ( $this->isConflict ) {
+               if ( $this->isConflict && wfRunHooks( 'EditPageBeforeConflictDiff', array( &$this, &$wgOut ) ) ) {
                        $wgOut->wrapWikiMsg( '==$1==', "yourdiff" );
 
                        $de = new DifferenceEngine( $this->mTitle );