Fixup/add documentation

Remove some unused variables
This commit is contained in:
Sam Reed 2011-03-30 19:00:11 +00:00
parent 26e62d5089
commit b88afb0daa
12 changed files with 25 additions and 18 deletions

View file

@ -92,8 +92,12 @@ abstract class Maintenance {
// Have we already loaded our user input?
protected $mInputLoaded = false;
// Batch size. If a script supports this, they should set
// a default with setBatchSize()
/**
* Batch size. If a script supports this, they should set
* a default with setBatchSize()
*
* @var int
*/
protected $mBatchSize = null;
// Generic options added by addDefaultParams()
@ -1072,7 +1076,7 @@ abstract class Maintenance {
* Perform a search index update with locking
* @param $maxLockTime Integer: the maximum time to keep the search index locked.
* @param $callback callback String: the function that will update the function.
* @param $dbw Database object
* @param $dbw DatabaseBase object
* @param $results
*/
public function updateSearchIndex( $maxLockTime, $callback, $dbw, $results ) {

View file

@ -24,6 +24,10 @@
require( dirname( __FILE__ ) . '/../commandLine.inc' );
class UpdateLogging {
/**
* @var DatabaseBase
*/
var $dbw;
var $batchSize = 1000;
var $minTs = false;

View file

@ -75,7 +75,7 @@ class DeleteOrphanedRevisions extends Maintenance {
* Do this inside a transaction
*
* @param $id Array of revision id values
* @param $dbw Database class (needs to be a master)
* @param $dbw DatabaseBase class (needs to be a master)
*/
private function deleteRevs( $id, &$dbw ) {
if ( !is_array( $id ) )

View file

@ -62,7 +62,7 @@ class FetchText extends Maintenance {
/**
* May throw a database error if, say, the server dies during query.
* @param $db Database object
* @param $db DatabaseBase object
* @param $id int The old_id
* @return String
*/

View file

@ -377,7 +377,6 @@ EOT
}
function revisionCallback( $params ) {
$origTitle = $params['title'];
$title = $params['rctitle'];
$editTime = $params['timestamp'];

View file

@ -118,7 +118,7 @@ class CheckLanguageCLI {
/**
* Get the checks that can easily be treated by non-speakers of the language.
* @return A list of the easy checks.
* @return Array A list of the easy checks.
*/
protected function easyChecks() {
return array(

View file

@ -193,7 +193,7 @@ class GenerateCollationData extends Maintenance {
// portion equal to the first character, then remove the second
// character. This avoids having characters like U+A732 (double A)
// polluting the basic latin sort area.
$prevWeights = array();
foreach ( $this->groups as $weight => $group ) {
if ( preg_match( '/(\.[0-9A-F]*)\./', $weight, $m ) ) {
if ( isset( $this->groups[$m[1]] ) ) {

View file

@ -205,7 +205,7 @@ class languages {
*
* @param $code The language code.
*
* @return The messages in this language.
* @return string The messages in this language.
*/
public function getMessages( $code ) {
$this->loadMessages( $code );

View file

@ -29,11 +29,12 @@ require_once( 'writeMessagesArray.inc' );
/**
* Rewrite a messages array.
*
* @param $languages
* @param $code The language code.
* @param $write Write to the messages file?
* @param $listUnknown List the unknown messages?
* @param $removeUnknown Remove the unknown messages?
* @param $removeDupes Remove the duplicated messages?
* @param bool $write Write to the messages file?
* @param bool $listUnknown List the unknown messages?
* @param bool $removeUnknown Remove the unknown messages?
* @param bool $removeDupes Remove the duplicated messages?
* @param $dupeMsgSource The source file intended to remove from the array.
*/
function rebuildLanguage( $languages, $code, $write, $listUnknown, $removeUnknown, $removeDupes, $dupeMsgSource ) {
@ -50,7 +51,7 @@ function rebuildLanguage( $languages, $code, $write, $listUnknown, $removeUnknow
*
* @param $oldMsgArray The input message array.
* @param $dupeMsgSource The source file path for duplicates.
* @return $newMsgArray The output message array, with duplicates removed.
* @return Array $newMsgArray The output message array, with duplicates removed.
*/
function removeDupes( $oldMsgArray, $dupeMsgSource ) {
if ( file_exists( $dupeMsgSource ) ) {

View file

@ -50,7 +50,7 @@ class Orphans extends Maintenance {
/**
* Lock the appropriate tables for the script
* @param $db Database object
* @param $db DatabaseBase object
* @param $extraTable String The name of any extra tables to lock (eg: text)
*/
private function lockTables( &$db, $extraTable = null ) {

View file

@ -126,8 +126,8 @@ class ReassignEdits extends Maintenance {
* i.e. a user => id mapping, or a user_text => text mapping
*
* @param $user User for the condition
* @param $idfield Field name containing the identifier
* @param $utfield Field name containing the user text
* @param $idfield string Field name containing the identifier
* @param $utfield string Field name containing the user text
* @return array
*/
private function userConditions( &$user, $idfield, $utfield ) {

View file

@ -88,7 +88,6 @@ TEXT;
}
$count = 0;
$row = false;
$batchConds = array();
do {
$this->output( 'Processing next ' . self::BATCH_SIZE . ' rows... ');