http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90721
Revision: 90721
Author: ialex
Date: 2011-06-24 17:15:27 +0000 (Fri, 24 Jun 2011)
Log Message:
-----------
Simplify a bit by using getRawText() instead of creating a Revision object
Modified Paths:
--------------
trunk/phase3/includes/Article.php
Modified: trunk/phase3/includes/Article.php
===================================================================
--- trunk/phase3/includes/Article.php 2011-06-24 17:14:58 UTC (rev 90720)
+++ trunk/phase3/includes/Article.php 2011-06-24 17:15:27 UTC (rev 90721)
@@ -363,13 +363,12 @@
* @return mixed string on success, false on failure
*/
public function getUndoText( Revision $undo, Revision $undoafter = null
) {
- $currentRev = Revision::newFromTitle( $this->mTitle );
- if ( !$currentRev ) {
+ $cur_text = $this->getRawText();
+ if ( $cur_text === false ) {
return false; // no page
}
$undo_text = $undo->getText();
$undoafter_text = $undoafter->getText();
- $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