http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89272
Revision: 89272
Author: reedy
Date: 2011-06-01 16:27:46 +0000 (Wed, 01 Jun 2011)
Log Message:
-----------
Remove some unused variables, add/improve some documentation
Modified Paths:
--------------
trunk/phase3/includes/diff/DifferenceEngine.php
trunk/phase3/maintenance/compareParsers.php
trunk/phase3/maintenance/importDump.php
Modified: trunk/phase3/includes/diff/DifferenceEngine.php
===================================================================
--- trunk/phase3/includes/diff/DifferenceEngine.php 2011-06-01 16:26:56 UTC
(rev 89271)
+++ trunk/phase3/includes/diff/DifferenceEngine.php 2011-06-01 16:27:46 UTC
(rev 89272)
@@ -57,10 +57,9 @@
/**
* Constructor
* @param $titleObj Title object that the diff is associated with
- * @param $old Integer: old ID we want to show and diff with.
- * @param $new String: either 'prev' or 'next'.
- * @todo FIXME: $rcid ???
- * @param $rcid Integer: ??? FIXME (default 0)
+ * @param $old Integer old ID we want to show and diff with.
+ * @param $new String either 'prev' or 'next'.
+ * @param $rcid Integer ??? FIXME (default 0)
* @param $refreshCache boolean If set, refreshes the diff cache
* @param $unhide boolean If set, allow viewing deleted revs
*/
@@ -100,22 +99,37 @@
$this->unhide = $unhide;
}
+ /**
+ * @param $value bool
+ */
function setReducedLineNumbers( $value = true ) {
$this->mReducedLineNumbers = $value;
}
+ /**
+ * @return Title
+ */
function getTitle() {
return $this->mTitle;
}
+ /**
+ * @return bool
+ */
function wasCacheHit() {
return $this->mCacheHit;
}
+ /**
+ * @return int
+ */
function getOldid() {
return $this->mOldid;
}
+ /**
+ * @return Bool|int
+ */
function getNewid() {
return $this->mNewid;
}
@@ -626,6 +640,8 @@
/**
* Get the diff text, send it to $wgOut
* Returns false if the diff could not be generated, otherwise returns
true
+ *
+ * @return bool
*/
function showDiff( $otitle, $ntitle, $notice = '' ) {
global $wgOut;
@@ -915,6 +931,8 @@
/**
* Add the header to a diff body
+ *
+ * @return string
*/
static function addHeader( $diff, $otitle, $ntitle, $multi = '',
$notice = '' ) {
$header = "<table class='diff'>";
@@ -965,6 +983,8 @@
* If oldid is false, leave the corresponding revision object set
* to false. This is impossible via ordinary user input, and is
provided for
* API convenience.
+ *
+ * @return bool
*/
function loadRevisionData() {
global $wgLang, $wgUser;
@@ -979,8 +999,9 @@
$this->mNewRev = $this->mNewid
? Revision::newFromId( $this->mNewid )
: Revision::newFromTitle( $this->mTitle );
- if ( !$this->mNewRev instanceof Revision )
+ if ( !$this->mNewRev instanceof Revision ) {
return false;
+ }
// Update the new revision ID in case it was 0 (makes life
easier doing UI stuff)
$this->mNewid = $this->mNewRev->getId();
@@ -1094,6 +1115,8 @@
/**
* Load the text of the revisions, as well as revision data.
+ *
+ * @return bool
*/
function loadText() {
if ( $this->mTextLoaded == 2 ) {
@@ -1123,6 +1146,8 @@
/**
* Load the text of the new revision, not the old one
+ *
+ * @return bool
*/
function loadNewText() {
if ( $this->mTextLoaded >= 1 ) {
Modified: trunk/phase3/maintenance/compareParsers.php
===================================================================
--- trunk/phase3/maintenance/compareParsers.php 2011-06-01 16:26:56 UTC (rev
89271)
+++ trunk/phase3/maintenance/compareParsers.php 2011-06-01 16:27:46 UTC (rev
89272)
@@ -32,7 +32,6 @@
class CompareParsers extends DumpIterator {
private $count = 0;
- private $startTime;
public function __construct() {
parent::__construct();
Modified: trunk/phase3/maintenance/importDump.php
===================================================================
--- trunk/phase3/maintenance/importDump.php 2011-06-01 16:26:56 UTC (rev
89271)
+++ trunk/phase3/maintenance/importDump.php 2011-06-01 16:27:46 UTC (rev
89272)
@@ -83,9 +83,9 @@
}
if( $this->hasArg() ) {
- $result = $this->importFromFile( $this->getArg() );
+ $this->importFromFile( $this->getArg() );
} else {
- $result = $this->importFromStdin();
+ $this->importFromStdin();
}
$this->output( "Done!\n" );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs