MediaWiki  1.33.0
WikiExporter.php
Go to the documentation of this file.
1 <?php
32 
36 class WikiExporter {
38  public $list_authors = false;
39 
41  public $dumpUploads = false;
42 
44  public $dumpUploadFileContents = false;
45 
47  public $author_list = "";
48 
49  const FULL = 1;
50  const CURRENT = 2;
51  const STABLE = 4; // extension defined
52  const LOGS = 8;
53  const RANGE = 16;
54 
55  const TEXT = 0;
56  const STUB = 1;
57 
58  const BATCH_SIZE = 50000;
59 
61  public $text;
62 
64  public $sink;
65 
67  private $writer;
68 
73  public static function schemaVersion() {
76  }
77 
87  function __construct( $db, $history = self::CURRENT, $text = self::TEXT ) {
88  $this->db = $db;
89  $this->history = $history;
90  $this->writer = new XmlDumpWriter( $text, self::schemaVersion() );
91  $this->sink = new DumpOutput();
92  $this->text = $text;
93  }
94 
100  public function setSchemaVersion( $schemaVersion ) {
101  $this->writer = new XmlDumpWriter( $this->text, $schemaVersion );
102  }
103 
111  public function setOutputSink( &$sink ) {
112  $this->sink =& $sink;
113  }
114 
115  public function openStream() {
116  $output = $this->writer->openStream();
117  $this->sink->writeOpenStream( $output );
118  }
119 
120  public function closeStream() {
121  $output = $this->writer->closeStream();
122  $this->sink->writeCloseStream( $output );
123  }
124 
130  public function allPages() {
131  $this->dumpFrom( '' );
132  }
133 
142  public function pagesByRange( $start, $end, $orderRevs ) {
143  if ( $orderRevs ) {
144  $condition = 'rev_page >= ' . intval( $start );
145  if ( $end ) {
146  $condition .= ' AND rev_page < ' . intval( $end );
147  }
148  } else {
149  $condition = 'page_id >= ' . intval( $start );
150  if ( $end ) {
151  $condition .= ' AND page_id < ' . intval( $end );
152  }
153  }
154  $this->dumpFrom( $condition, $orderRevs );
155  }
156 
164  public function revsByRange( $start, $end ) {
165  $condition = 'rev_id >= ' . intval( $start );
166  if ( $end ) {
167  $condition .= ' AND rev_id < ' . intval( $end );
168  }
169  $this->dumpFrom( $condition );
170  }
171 
175  public function pageByTitle( $title ) {
176  $this->dumpFrom(
177  'page_namespace=' . $title->getNamespace() .
178  ' AND page_title=' . $this->db->addQuotes( $title->getDBkey() ) );
179  }
180 
185  public function pageByName( $name ) {
187  if ( is_null( $title ) ) {
188  throw new MWException( "Can't export invalid title" );
189  } else {
190  $this->pageByTitle( $title );
191  }
192  }
193 
197  public function pagesByName( $names ) {
198  foreach ( $names as $name ) {
199  $this->pageByName( $name );
200  }
201  }
202 
203  public function allLogs() {
204  $this->dumpFrom( '' );
205  }
206 
211  public function logsByRange( $start, $end ) {
212  $condition = 'log_id >= ' . intval( $start );
213  if ( $end ) {
214  $condition .= ' AND log_id < ' . intval( $end );
215  }
216  $this->dumpFrom( $condition );
217  }
218 
226  protected function do_list_authors( $cond ) {
227  $this->author_list = "<contributors>";
228  // rev_deleted
229 
230  $revQuery = Revision::getQueryInfo( [ 'page' ] );
231  $res = $this->db->select(
232  $revQuery['tables'],
233  [
234  'rev_user_text' => $revQuery['fields']['rev_user_text'],
235  'rev_user' => $revQuery['fields']['rev_user'],
236  ],
237  [
238  $this->db->bitAnd( 'rev_deleted', Revision::DELETED_USER ) . ' = 0',
239  $cond,
240  ],
241  __METHOD__,
242  [ 'DISTINCT' ],
243  $revQuery['joins']
244  );
245 
246  foreach ( $res as $row ) {
247  $this->author_list .= "<contributor>" .
248  "<username>" .
249  htmlspecialchars( $row->rev_user_text ) .
250  "</username>" .
251  "<id>" .
252  ( (int)$row->rev_user ) .
253  "</id>" .
254  "</contributor>";
255  }
256  $this->author_list .= "</contributors>";
257  }
258 
265  protected function dumpFrom( $cond = '', $orderRevs = false ) {
266  if ( $this->history & self::LOGS ) {
267  $this->dumpLogs( $cond );
268  } else {
269  $this->dumpPages( $cond, $orderRevs );
270  }
271  }
272 
277  protected function dumpLogs( $cond ) {
278  $where = [];
279  # Hide private logs
280  $hideLogs = LogEventsList::getExcludeClause( $this->db );
281  if ( $hideLogs ) {
282  $where[] = $hideLogs;
283  }
284  # Add on any caller specified conditions
285  if ( $cond ) {
286  $where[] = $cond;
287  }
288  # Get logging table name for logging.* clause
289  $logging = $this->db->tableName( 'logging' );
290 
291  $result = null; // Assuring $result is not undefined, if exception occurs early
292 
293  $commentQuery = CommentStore::getStore()->getJoin( 'log_comment' );
294  $actorQuery = ActorMigration::newMigration()->getJoin( 'log_user' );
295 
296  $lastLogId = 0;
297  while ( true ) {
298  $result = $this->db->select(
299  array_merge( [ 'logging' ], $commentQuery['tables'], $actorQuery['tables'], [ 'user' ] ),
300  [ "{$logging}.*", 'user_name' ] + $commentQuery['fields'] + $actorQuery['fields'],
301  array_merge( $where, [ 'log_id > ' . intval( $lastLogId ) ] ),
302  __METHOD__,
303  [
304  'ORDER BY' => 'log_id',
305  'USE INDEX' => [ 'logging' => 'PRIMARY' ],
306  'LIMIT' => self::BATCH_SIZE,
307  ],
308  [
309  'user' => [ 'JOIN', 'user_id = ' . $actorQuery['fields']['log_user'] ]
310  ] + $commentQuery['joins'] + $actorQuery['joins']
311  );
312 
313  if ( !$result->numRows() ) {
314  break;
315  }
316 
317  $lastLogId = $this->outputLogStream( $result );
318  };
319  }
320 
327  protected function dumpPages( $cond, $orderRevs ) {
330  // TODO: Make XmlDumpWriter use a RevisionStore! (see T198706 and T174031)
331  throw new MWException(
332  'Cannot use WikiExporter with SCHEMA_COMPAT_WRITE_OLD mode disabled!'
333  . ' Support for dumping from the new schema is not implemented yet!'
334  );
335  }
336 
337  $revOpts = [ 'page' ];
338 
339  $revQuery = Revision::getQueryInfo( $revOpts );
340 
341  // We want page primary rather than revision
342  $tables = array_merge( [ 'page' ], array_diff( $revQuery['tables'], [ 'page' ] ) );
343  $join = $revQuery['joins'] + [
344  'revision' => $revQuery['joins']['page']
345  ];
346  unset( $join['page'] );
347 
348  $fields = $revQuery['fields'];
349  $fields[] = 'page_restrictions';
350 
351  if ( $this->text != self::STUB ) {
352  $fields['_load_content'] = '1';
353  }
354 
355  $conds = [];
356  if ( $cond !== '' ) {
357  $conds[] = $cond;
358  }
359  $opts = [ 'ORDER BY' => [ 'rev_page ASC', 'rev_id ASC' ] ];
360  $opts['USE INDEX'] = [];
361 
362  $op = '>';
363  if ( is_array( $this->history ) ) {
364  # Time offset/limit for all pages/history...
365  # Set time order
366  if ( $this->history['dir'] == 'asc' ) {
367  $opts['ORDER BY'] = 'rev_timestamp ASC';
368  } else {
369  $op = '<';
370  $opts['ORDER BY'] = 'rev_timestamp DESC';
371  }
372  # Set offset
373  if ( !empty( $this->history['offset'] ) ) {
374  $conds[] = "rev_timestamp $op " .
375  $this->db->addQuotes( $this->db->timestamp( $this->history['offset'] ) );
376  }
377  # Set query limit
378  if ( !empty( $this->history['limit'] ) ) {
379  $maxRowCount = intval( $this->history['limit'] );
380  }
381  } elseif ( $this->history & self::FULL ) {
382  # Full history dumps...
383  # query optimization for history stub dumps
384  if ( $this->text == self::STUB ) {
385  $tables = $revQuery['tables'];
386  $opts[] = 'STRAIGHT_JOIN';
387  $opts['USE INDEX']['revision'] = 'rev_page_id';
388  unset( $join['revision'] );
389  $join['page'] = [ 'JOIN', 'rev_page=page_id' ];
390  }
391  } elseif ( $this->history & self::CURRENT ) {
392  # Latest revision dumps...
393  if ( $this->list_authors && $cond != '' ) { // List authors, if so desired
394  $this->do_list_authors( $cond );
395  }
396  $join['revision'] = [ 'JOIN', 'page_id=rev_page AND page_latest=rev_id' ];
397  } elseif ( $this->history & self::STABLE ) {
398  # "Stable" revision dumps...
399  # Default JOIN, to be overridden...
400  $join['revision'] = [ 'JOIN', 'page_id=rev_page AND page_latest=rev_id' ];
401  # One, and only one hook should set this, and return false
402  if ( Hooks::run( 'WikiExporter::dumpStableQuery', [ &$tables, &$opts, &$join ] ) ) {
403  throw new MWException( __METHOD__ . " given invalid history dump type." );
404  }
405  } elseif ( $this->history & self::RANGE ) {
406  # Dump of revisions within a specified range. Condition already set in revsByRange().
407  } else {
408  # Unknown history specification parameter?
409  throw new MWException( __METHOD__ . " given invalid history dump type." );
410  }
411 
412  $result = null; // Assuring $result is not undefined, if exception occurs early
413  $done = false;
414  $lastRow = null;
415  $revPage = 0;
416  $revId = 0;
417  $rowCount = 0;
418 
419  $opts['LIMIT'] = self::BATCH_SIZE;
420 
421  Hooks::run( 'ModifyExportQuery',
422  [ $this->db, &$tables, &$cond, &$opts, &$join ] );
423 
424  while ( !$done ) {
425  // If necessary, impose the overall maximum and stop looping after this iteration.
426  if ( !empty( $maxRowCount ) && $rowCount + self::BATCH_SIZE > $maxRowCount ) {
427  $opts['LIMIT'] = $maxRowCount - $rowCount;
428  $done = true;
429  }
430 
431  $queryConds = $conds;
432  $queryConds[] = 'rev_page>' . intval( $revPage ) . ' OR (rev_page=' .
433  intval( $revPage ) . ' AND rev_id' . $op . intval( $revId ) . ')';
434 
435  # Do the query and process any results, remembering max ids for the next iteration.
436  $result = $this->db->select(
437  $tables,
438  $fields,
439  $queryConds,
440  __METHOD__,
441  $opts,
442  $join
443  );
444  if ( $result->numRows() > 0 ) {
445  $lastRow = $this->outputPageStreamBatch( $result, $lastRow );
446  $rowCount += $result->numRows();
447  $revPage = $lastRow->rev_page;
448  $revId = $lastRow->rev_id;
449  } else {
450  $done = true;
451  }
452 
453  // If we are finished, close off final page element (if any).
454  if ( $done && $lastRow ) {
455  $this->finishPageStreamOutput( $lastRow );
456  }
457  }
458  }
459 
469  protected function outputPageStreamBatch( $results, $lastRow ) {
470  foreach ( $results as $row ) {
471  if ( $lastRow === null ||
472  $lastRow->page_namespace !== $row->page_namespace ||
473  $lastRow->page_title !== $row->page_title ) {
474  if ( $lastRow !== null ) {
475  $output = '';
476  if ( $this->dumpUploads ) {
477  $output .= $this->writer->writeUploads( $lastRow, $this->dumpUploadFileContents );
478  }
479  $output .= $this->writer->closePage();
480  $this->sink->writeClosePage( $output );
481  }
482  $output = $this->writer->openPage( $row );
483  $this->sink->writeOpenPage( $row, $output );
484  }
485  $output = $this->writer->writeRevision( $row );
486  $this->sink->writeRevision( $row, $output );
487  $lastRow = $row;
488  }
489 
490  return $lastRow;
491  }
492 
498  protected function finishPageStreamOutput( $lastRow ) {
499  $output = '';
500  if ( $this->dumpUploads ) {
501  $output .= $this->writer->writeUploads( $lastRow, $this->dumpUploadFileContents );
502  }
504  $output .= $this->writer->closePage();
505  $this->sink->writeClosePage( $output );
506  }
507 
512  protected function outputLogStream( $resultset ) {
513  foreach ( $resultset as $row ) {
514  $output = $this->writer->writeLogItem( $row );
515  $this->sink->writeLogItem( $row, $output );
516  }
517  return isset( $row ) ? $row->log_id : null;
518  }
519 }
Revision\DELETED_USER
const DELETED_USER
Definition: Revision.php:48
WikiExporter\schemaVersion
static schemaVersion()
Returns the default export schema version, as defined by $wgXmlDumpSchemaVersion.
Definition: WikiExporter.php:73
Title\newFromText
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
Definition: Title.php:306
WikiExporter\__construct
__construct( $db, $history=self::CURRENT, $text=self::TEXT)
Definition: WikiExporter.php:87
WikiExporter\revsByRange
revsByRange( $start, $end)
Dumps a series of page and revision records for those pages in the database with revisions falling wi...
Definition: WikiExporter.php:164
WikiExporter\CURRENT
const CURRENT
Definition: WikiExporter.php:50
WikiExporter\finishPageStreamOutput
finishPageStreamOutput( $lastRow)
Final page stream output, after all batches are complete.
Definition: WikiExporter.php:498
$result
The index of the header message $result[1]=The index of the body text message $result[2 through n]=Parameters passed to body text message. Please note the header message cannot receive/use parameters. 'ImportHandleLogItemXMLTag':When parsing a XML tag in a log item. Return false to stop further processing of the tag $reader:XMLReader object $logInfo:Array of information 'ImportHandlePageXMLTag':When parsing a XML tag in a page. Return false to stop further processing of the tag $reader:XMLReader object & $pageInfo:Array of information 'ImportHandleRevisionXMLTag':When parsing a XML tag in a page revision. Return false to stop further processing of the tag $reader:XMLReader object $pageInfo:Array of page information $revisionInfo:Array of revision information 'ImportHandleToplevelXMLTag':When parsing a top level XML tag. Return false to stop further processing of the tag $reader:XMLReader object 'ImportHandleUnknownUser':When a user doesn 't exist locally, this hook is called to give extensions an opportunity to auto-create it. If the auto-creation is successful, return false. $name:User name 'ImportHandleUploadXMLTag':When parsing a XML tag in a file upload. Return false to stop further processing of the tag $reader:XMLReader object $revisionInfo:Array of information 'ImportLogInterwikiLink':Hook to change the interwiki link used in log entries and edit summaries for transwiki imports. & $fullInterwikiPrefix:Interwiki prefix, may contain colons. & $pageTitle:String that contains page title. 'ImportSources':Called when reading from the $wgImportSources configuration variable. Can be used to lazy-load the import sources list. & $importSources:The value of $wgImportSources. Modify as necessary. See the comment in DefaultSettings.php for the detail of how to structure this array. 'InfoAction':When building information to display on the action=info page. $context:IContextSource object & $pageInfo:Array of information 'InitializeArticleMaybeRedirect':MediaWiki check to see if title is a redirect. & $title:Title object for the current page & $request:WebRequest & $ignoreRedirect:boolean to skip redirect check & $target:Title/string of redirect target & $article:Article object 'InternalParseBeforeLinks':during Parser 's internalParse method before links but after nowiki/noinclude/includeonly/onlyinclude and other processings. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InternalParseBeforeSanitize':during Parser 's internalParse method just before the parser removes unwanted/dangerous HTML tags and after nowiki/noinclude/includeonly/onlyinclude and other processings. Ideal for syntax-extensions after template/parser function execution which respect nowiki and HTML-comments. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InterwikiLoadPrefix':When resolving if a given prefix is an interwiki or not. Return true without providing an interwiki to continue interwiki search. $prefix:interwiki prefix we are looking for. & $iwData:output array describing the interwiki with keys iw_url, iw_local, iw_trans and optionally iw_api and iw_wikiid. 'InvalidateEmailComplete':Called after a user 's email has been invalidated successfully. $user:user(object) whose email is being invalidated 'IRCLineURL':When constructing the URL to use in an IRC notification. Callee may modify $url and $query, URL will be constructed as $url . $query & $url:URL to index.php & $query:Query string $rc:RecentChange object that triggered url generation 'IsFileCacheable':Override the result of Article::isFileCacheable()(if true) & $article:article(object) being checked 'IsTrustedProxy':Override the result of IP::isTrustedProxy() & $ip:IP being check & $result:Change this value to override the result of IP::isTrustedProxy() 'IsUploadAllowedFromUrl':Override the result of UploadFromUrl::isAllowedUrl() $url:URL used to upload from & $allowed:Boolean indicating if uploading is allowed for given URL 'isValidEmailAddr':Override the result of Sanitizer::validateEmail(), for instance to return false if the domain name doesn 't match your organization. $addr:The e-mail address entered by the user & $result:Set this and return false to override the internal checks 'isValidPassword':Override the result of User::isValidPassword() $password:The password entered by the user & $result:Set this and return false to override the internal checks $user:User the password is being validated for 'Language::getMessagesFileName':$code:The language code or the language we 're looking for a messages file for & $file:The messages file path, you can override this to change the location. 'LanguageGetNamespaces':Provide custom ordering for namespaces or remove namespaces. Do not use this hook to add namespaces. Use CanonicalNamespaces for that. & $namespaces:Array of namespaces indexed by their numbers 'LanguageGetTranslatedLanguageNames':Provide translated language names. & $names:array of language code=> language name $code:language of the preferred translations 'LanguageLinks':Manipulate a page 's language links. This is called in various places to allow extensions to define the effective language links for a page. $title:The page 's Title. & $links:Array with elements of the form "language:title" in the order that they will be output. & $linkFlags:Associative array mapping prefixed links to arrays of flags. Currently unused, but planned to provide support for marking individual language links in the UI, e.g. for featured articles. 'LanguageSelector':Hook to change the language selector available on a page. $out:The output page. $cssClassName:CSS class name of the language selector. 'LinkBegin':DEPRECATED since 1.28! Use HtmlPageLinkRendererBegin instead. Used when generating internal and interwiki links in Linker::link(), before processing starts. Return false to skip default processing and return $ret. See documentation for Linker::link() for details on the expected meanings of parameters. $skin:the Skin object $target:the Title that the link is pointing to & $html:the contents that the< a > tag should have(raw HTML) $result
Definition: hooks.txt:1983
$tables
this hook is for auditing only RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist & $tables
Definition: hooks.txt:979
$wgMultiContentRevisionSchemaMigrationStage
int $wgMultiContentRevisionSchemaMigrationStage
RevisionStore table schema migration stage (content, slots, content_models & slot_roles tables).
Definition: DefaultSettings.php:8955
WikiExporter\$dumpUploadFileContents
bool $dumpUploadFileContents
Definition: WikiExporter.php:44
$res
$res
Definition: database.txt:21
Wikimedia\Rdbms\ResultWrapper
Result wrapper for grabbing data queried from an IDatabase object.
Definition: ResultWrapper.php:24
WikiExporter\allLogs
allLogs()
Definition: WikiExporter.php:203
$revQuery
$revQuery
Definition: testCompression.php:51
WikiExporter\dumpFrom
dumpFrom( $cond='', $orderRevs=false)
Definition: WikiExporter.php:265
ActorMigration\newMigration
static newMigration()
Static constructor.
Definition: ActorMigration.php:111
php
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition: injection.txt:35
WikiExporter\openStream
openStream()
Definition: WikiExporter.php:115
Wikimedia\Rdbms\IDatabase
Basic database interface for live and lazy-loaded relation database handles.
Definition: IDatabase.php:38
WikiExporter\STUB
const STUB
Definition: WikiExporter.php:56
WikiExporter\$text
int $text
Definition: WikiExporter.php:61
WikiExporter\$list_authors
bool $list_authors
Return distinct author list (when not returning full history)
Definition: WikiExporter.php:38
Revision\getQueryInfo
static getQueryInfo( $options=[])
Return the tables, fields, and join conditions to be selected to create a new revision object.
Definition: Revision.php:511
MWException
MediaWiki exception.
Definition: MWException.php:26
$title
namespace and then decline to actually register it file or subcat img or subcat $title
Definition: hooks.txt:925
WikiExporter\pagesByName
pagesByName( $names)
Definition: WikiExporter.php:197
$wgXmlDumpSchemaVersion
$wgXmlDumpSchemaVersion
The schema to use per default when generating XML dumps.
Definition: DefaultSettings.php:8961
WikiExporter\TEXT
const TEXT
Definition: WikiExporter.php:55
WikiExporter\outputLogStream
outputLogStream( $resultset)
Definition: WikiExporter.php:512
use
as see the revision history and available at free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
Definition: MIT-LICENSE.txt:10
WikiExporter\closeStream
closeStream()
Definition: WikiExporter.php:120
WikiExporter\allPages
allPages()
Dumps a series of page and revision records for all pages in the database, either including complete ...
Definition: WikiExporter.php:130
WikiExporter\$dumpUploads
bool $dumpUploads
Definition: WikiExporter.php:41
WikiExporter\STABLE
const STABLE
Definition: WikiExporter.php:51
WikiExporter\setSchemaVersion
setSchemaVersion( $schemaVersion)
Definition: WikiExporter.php:100
$output
$output
Definition: SyntaxHighlight.php:334
DumpOutput
Definition: DumpOutput.php:29
WikiExporter
Definition: WikiExporter.php:36
WikiExporter\$author_list
string $author_list
Definition: WikiExporter.php:47
WikiExporter\dumpPages
dumpPages( $cond, $orderRevs)
Definition: WikiExporter.php:327
WikiExporter\pagesByRange
pagesByRange( $start, $end, $orderRevs)
Dumps a series of page and revision records for those pages in the database falling within the page_i...
Definition: WikiExporter.php:142
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:271
SCHEMA_COMPAT_WRITE_OLD
const SCHEMA_COMPAT_WRITE_OLD
Definition: Defines.php:284
LogEventsList\getExcludeClause
static getExcludeClause( $db, $audience='public', User $user=null)
SQL clause to skip forbidden log types for this user.
Definition: LogEventsList.php:785
WikiExporter\do_list_authors
do_list_authors( $cond)
Generates the distinct list of authors of an article Not called by default (depends on $this->list_au...
Definition: WikiExporter.php:226
WikiExporter\FULL
const FULL
Definition: WikiExporter.php:49
WikiExporter\$writer
XmlDumpWriter $writer
Definition: WikiExporter.php:67
WikiExporter\RANGE
const RANGE
Definition: WikiExporter.php:53
text
This list may contain false positives That usually means there is additional text with links below the first Each row contains links to the first and second as well as the first line of the second redirect text
Definition: All_system_messages.txt:1267
WikiExporter\setOutputSink
setOutputSink(&$sink)
Set the DumpOutput or DumpFilter object which will receive various row objects and XML output for fil...
Definition: WikiExporter.php:111
WikiExporter\LOGS
const LOGS
Definition: WikiExporter.php:52
history
presenting them properly to the user as errors is done by the caller return true use this to change the list i e etc next in line in page history
Definition: hooks.txt:1769
WikiExporter\BATCH_SIZE
const BATCH_SIZE
Definition: WikiExporter.php:58
XmlDumpWriter
Definition: XmlDumpWriter.php:32
WikiExporter\logsByRange
logsByRange( $start, $end)
Definition: WikiExporter.php:211
as
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
Definition: distributors.txt:9
WikiExporter\pageByTitle
pageByTitle( $title)
Definition: WikiExporter.php:175
WikiExporter\outputPageStreamBatch
outputPageStreamBatch( $results, $lastRow)
Runs through a query result set dumping page and revision records.
Definition: WikiExporter.php:469
writer
An extension writer
Definition: hooks.txt:51
WikiExporter\dumpLogs
dumpLogs( $cond)
Definition: WikiExporter.php:277
WikiExporter\pageByName
pageByName( $name)
Definition: WikiExporter.php:185
WikiExporter\$sink
DumpOutput $sink
Definition: WikiExporter.php:64
CommentStore\getStore
static getStore()
Definition: CommentStore.php:130
Hooks\run
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
Definition: Hooks.php:200