MediaWiki REL1_35
CheckStorage Class Reference

Maintenance script to do various checks on external storage. More...

Collaboration diagram for CheckStorage:

Public Member Functions

 check ( $fix=false, $xml='')
 
 importRevision ( $revision)
 

Public Attributes

ExternalStoreDB $dbStore = null
 
 $errorDescriptions
 
 $errors
 
 $oldIdMap
 

Private Member Functions

 addError ( $type, $msg, $ids)
 
 checkExternalConcatBlobs ( $externalConcatBlobs)
 
 restoreText ( $revIds, $xml)
 

Private Attributes

const CONCAT_HEADER = 'O:27:"concatenatedgziphistoryblob"'
 

Detailed Description

Maintenance script to do various checks on external storage.

@fixme this should extend the base Maintenance class

Definition at line 45 of file checkStorage.php.

Member Function Documentation

◆ addError()

CheckStorage::addError (   $type,
  $msg,
  $ids 
)
private

Definition at line 388 of file checkStorage.php.

References $type, and print.

Referenced by check(), and checkExternalConcatBlobs().

◆ check()

CheckStorage::check (   $fix = false,
  $xml = '' 
)

◆ checkExternalConcatBlobs()

CheckStorage::checkExternalConcatBlobs (   $externalConcatBlobs)
private

Definition at line 411 of file checkStorage.php.

References $res, and addError().

Referenced by check().

◆ importRevision()

CheckStorage::importRevision (   $revision)

Definition at line 514 of file checkStorage.php.

References $content, $dbr, $res, DB_MASTER, DB_REPLICA, and wfGetDB().

◆ restoreText()

CheckStorage::restoreText (   $revIds,
  $xml 
)
private

Definition at line 453 of file checkStorage.php.

References $dbr, $file, $source, $wgDBname, DB_MASTER, DB_REPLICA, print, wfGetDB(), wfMessage(), and wfTempDir().

Referenced by check().

Member Data Documentation

◆ $dbStore

ExternalStoreDB CheckStorage::$dbStore = null

Definition at line 49 of file checkStorage.php.

◆ $errorDescriptions

CheckStorage::$errorDescriptions
Initial value:
= [
'restore text' => 'Damaged text, need to be restored from a backup',
'restore revision' => 'Damaged revision row, need to be restored from a backup',
'unfixable' => 'Unexpected errors with no automated fixing method',
'fixed' => 'Errors already fixed',
'fixable' => 'Errors which would already be fixed if --fix was specified',
]

Definition at line 51 of file checkStorage.php.

◆ $errors

CheckStorage::$errors

Definition at line 47 of file checkStorage.php.

Referenced by check().

◆ $oldIdMap

CheckStorage::$oldIdMap

Definition at line 47 of file checkStorage.php.

Referenced by check().

◆ CONCAT_HEADER

const CheckStorage::CONCAT_HEADER = 'O:27:"concatenatedgziphistoryblob"'
private

Definition at line 46 of file checkStorage.php.


The documentation for this class was generated from the following file: