Go to the documentation of this file.
13 parent::__construct(
$name, $data, $dataName );
15 $this->tablesUsed = array_merge( $this->tablesUsed,
38 'iw_prefix' =>
'linksupdatetest',
39 'iw_url' =>
'http://testing.com/wiki/$1',
40 'iw_api' =>
'http://testing.com/w/api.php',
43 'iw_wikiid' =>
'linksupdatetest',
46 $this->
setMwGlobals(
'wgRCWatchCategoryMembership',
true );
51 self::$testingPageId =
$res[
'id'];
53 $this->
insertPage(
'Template:TestingTemplate' );
58 $t->mArticleID = $id; # XXX:
this is fugly
61 $po->setTitleText(
$t->getPrefixedText() );
85 'pl_from = ' . self::$testingPageId,
90 ], $update->getAddedLinks() );
93 $po->setTitleText(
$t->getPrefixedText() );
104 'pl_from = ' . self::$testingPageId,
113 ], $update->getAddedLinks() );
116 ], $update->getRemovedLinks() );
126 $po->addExternalLink(
"http://testing.com/wiki/Foo" );
133 'el_from = ' . self::$testingPageId,
135 [
'http://testing.com/wiki/Foo',
'http://com.testing./wiki/Foo' ],
145 $this->
setMwGlobals(
'wgCategoryCollation',
'uppercase' );
149 $po->addCategory(
"Foo",
"FOO" );
156 'cl_from = ' . self::$testingPageId,
157 [ [
'Foo',
"FOO\nTESTING" ] ]
162 $this->
setMwGlobals(
'wgCategoryCollation',
'uppercase' );
166 $wikiPage->doEditContent(
new WikitextContent(
'[[Category:Foo]]' ),
'added category' );
173 [ [
'Foo',
'[[:Testing]] added to category' ] ]
176 $wikiPage->doEditContent(
new WikitextContent(
'[[Category:Bar]]' ),
'replaced category' );
184 [
'Foo',
'[[:Testing]] added to category' ],
185 [
'Foo',
'[[:Testing]] removed from category' ],
194 [
'Bar',
'[[:Testing]] added to category' ],
200 $this->
setMwGlobals(
'wgCategoryCollation',
'uppercase' );
203 $templatePage =
new WikiPage( $templateTitle );
206 $wikiPage->doEditContent(
new WikitextContent(
'{{TestingTemplate}}' ),
'added template' );
210 $otherWikiPage->doEditContent(
new WikitextContent(
'{{TestingTemplate}}' ),
'added template' );
220 $templatePage->doEditContent(
new WikitextContent(
'[[Category:Baz]]' ),
'added category' );
229 '[[:Template:TestingTemplate]] added to category, ' .
230 '[[Special:WhatLinksHere/Template:TestingTemplate|this page is included within other pages]]'
243 $po->addInterwikiLink( $target );
249 'iwl_prefix, iwl_title',
250 'iwl_from = ' . self::$testingPageId,
251 [ [
'linksupdatetest',
'Foo' ] ]
270 'tl_from = ' . self::$testingPageId,
282 $po->addImage(
"Foo.png" );
289 'il_from = ' . self::$testingPageId,
299 'wgCapitalLinks' =>
true,
312 'll_from = ' . self::$testingPageId,
326 $fields = [
'pp_propname',
'pp_value' ];
329 $po->setProperty(
"bool",
true );
330 $expected[] = [
"bool",
true ];
332 $po->setProperty(
"float", 4.0 + 1.0 / 4.0 );
333 $expected[] = [
"float", 4.0 + 1.0 / 4.0 ];
335 $po->setProperty(
"int", -7 );
336 $expected[] = [
"int", -7 ];
338 $po->setProperty(
"string",
"33 bar" );
339 $expected[] = [
"string",
"33 bar" ];
343 $fields[] =
'pp_sortkey';
345 foreach ( $expected
as &$row ) {
349 $row[] = floatval(
$value );
357 $t, $po,
'page_props', $fields,
'pp_page = ' . self::$testingPageId, $expected );
369 $table, $fields, $condition,
array $expectedRows
375 $this->
assertSelect( $table, $fields, $condition, $expectedRows );
387 'rc_title, rc_comment',
391 'rc_title' => $categoryTitle->
getDBkey()
398 [
'recentchanges',
'comment' ],
399 'rc_title, comment_text',
403 'rc_title' => $categoryTitle->
getDBkey(),
404 'comment_id = rc_comment_id',
413 while (
$job = $queueGroup->pop(
'refreshLinksPrioritized' ) ) {
415 $queueGroup->ack(
$job );
417 while (
$job = $queueGroup->pop(
'categoryMembershipChange' ) ) {
419 $queueGroup->ack(
$job );
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
testUpdate_templatelinks()
ParserOutput::addTemplate.
int $wgCommentTableSchemaMigrationStage
Comment table schema migration stage.
testUpdate_iwlinks()
ParserOutput::addInterwikiLink.
Class representing a MediaWiki article and history.
testUpdate_pagelinks()
ParserOutput::addLink.
Class the manages updates of *_link tables as well as similar extension-managed tables.
const MIGRATION_WRITE_BOTH
testUpdate_externallinks()
ParserOutput::addExternalLink.
This document provides an overview of the usage of PageUpdater and that is
testOnAddingAndRemovingCategory_recentChangesRowIsAdded()
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
testUpdate_page_props()
ParserOutput::setProperty.
testUpdate_page_props_without_sortkey()
getDBkey()
Get the main part with underscores.
namespace and then decline to actually register it file or subcat img or subcat $title
assertRecentChangeByCategorization(Title $pageTitle, ParserOutput $parserOutput, Title $categoryTitle, $expectedRows)
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
static makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
testUpdate_langlinks()
ParserOutput::addLanguageLink.
Content object for wiki text pages.
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
Allows to change the fields on the form that will be generated $name
makeTitleAndParserOutput( $name, $id)
static makeTitleSafe( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
static newCanonical( $context=null, $userLang=null)
Creates a "canonical" ParserOptions object.
assertLinksUpdate(Title $title, ParserOutput $parserOutput, $table, $fields, $condition, array $expectedRows)
testUpdate_categorylinks()
ParserOutput::addCategory.
__construct( $name=null, array $data=[], $dataName='')
testOnAddingAndRemovingCategoryToTemplates_embeddingPagesAreIgnored()
Represents a title within MediaWiki.
static singleton( $domain=false)
LinksUpdate LinksUpdate Database ^— make sure temporary tables are used.
if(count( $args)< 1) $job
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
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return true
$wgPagePropsHaveSortkey
Whether the page_props table has a pp_sortkey column.
testUpdate_imagelinks()
ParserOutput::addImage.