Go to the documentation of this file.
25 define(
'REPORTING_INTERVAL', 100 );
27 if ( !defined(
'MEDIAWIKI' ) ) {
30 require_once __DIR__ .
'/../commandLine.inc';
43 $maxID =
$dbr->selectField(
'text',
'MAX(old_id)',
false,
$fname );
45 $numBlocks = intval( $maxID / $blockSize ) + 1;
47 for ( $b = 0; $b < $numBlocks; $b++ ) {
50 printf(
"%5.2f%%\n", $b / $numBlocks * 100 );
51 $start = intval( $maxID / $numBlocks ) * $b + 1;
52 $end = intval( $maxID / $numBlocks ) * ( $b + 1 );
54 $res =
$dbr->select(
'text',
array(
'old_id',
'old_text',
'old_flags' ),
55 "old_id>=$start AND old_id<=$end " .
56 "AND old_flags LIKE '%object%' AND old_flags NOT LIKE '%external%' " .
57 'AND LOWER(CONVERT(LEFT(old_text,22) USING latin1)) = \'o:15:"historyblobstub"\'',
60 resolveStub( $row->old_id, $row->old_text, $row->old_flags );
72 $stub = unserialize( $stubText );
78 if ( strtolower( get_class( $stub ) ) !==
'historyblobstub' ) {
79 print
"Error found object of class " . get_class( $stub ) .
", expecting historyblobstub\n";
83 # Get the (maybe) external row
84 $externalRow =
$dbr->selectRow(
'text',
array(
'old_text' ),
85 array(
'old_id' => $stub->mOldId,
'old_flags' .
$dbr->buildLike(
$dbr->anyString(),
'external',
$dbr->anyString() ) ),
89 if ( !$externalRow ) {
90 # Object wasn't external
94 # Preserve the legacy encoding flag, but switch from object to external
95 if ( in_array(
'utf-8',
$flags ) ) {
96 $newFlags =
'external,utf-8';
98 $newFlags =
'external';
102 # print "oldid=$id\n";
103 $dbw->update(
'text',
105 'old_flags' => $newFlags,
106 'old_text' => $externalRow->old_text .
'/' . $stub->mHash
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
if(!defined( 'MEDIAWIKI')) resolveStubs()
Convert history stubs that point to an external row to direct external pointers.
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
if(!defined( 'MEDIAWIKI')) $fname
This file is not a valid entry point, perform no further processing unless MEDIAWIKI is defined.
it s the revision text itself In either if gzip is the revision text is gzipped $flags
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
wfWaitForSlaves( $maxLag=false, $wiki=false, $cluster=false)
Modern version of wfWaitForSlaves().
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
resolveStub( $id, $stubText, $flags)
Resolve a history stub.