http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72846
Revision: 72846
Author: aaron
Date: 2010-09-12 10:02:19 +0000 (Sun, 12 Sep 2010)
Log Message:
-----------
Made getUndoText() not use unreliable getContent() function (weird wgRequest
dependency)
Modified Paths:
--------------
trunk/phase3/includes/Article.php
Modified: trunk/phase3/includes/Article.php
===================================================================
--- trunk/phase3/includes/Article.php 2010-09-12 09:40:47 UTC (rev 72845)
+++ trunk/phase3/includes/Article.php 2010-09-12 10:02:19 UTC (rev 72846)
@@ -321,9 +321,13 @@
* @return mixed string on success, false on failure
*/
public function getUndoText( Revision $undo, Revision $undoafter = null
) {
+ $currentRev = Revision::newFromTitle( $this->mTitle );
+ if ( !$currentRev ) {
+ return false; // no page
+ }
$undo_text = $undo->getText();
$undoafter_text = $undoafter->getText();
- $cur_text = $this->getContent();
+ $cur_text = $currentRev->getText();
if ( $cur_text == $undo_text ) {
# No use doing a merge if it's just a straight revert.
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs