The MediaWiki FAQ can be found at:
-https://www.mediawiki.org/wiki/Manual:FAQ
+https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ
\ No newline at end of file
* Added a new hook, "ContentAlterParserOutput", to allow extensions to modify the
parser output for a content object before links update.
* (T37785) Enhanced recent changes and extended watchlist are now default.
- Documentation: https://meta.wikimedia.org/wiki/Help:Enhanced_recent_changes
- and https://www.mediawiki.org/wiki/Manual:$wgDefaultUserOptions.
+ Documentation: https://meta.wikimedia.org/wiki/Special:MyLanguage/Help:Enhanced_recent_changes
+ and https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgDefaultUserOptions.
* (T69341) SVG images will no longer be base64-encoded when being embedded
in CSS. This results in slight size increase before gzip compression (due to
percent-encoding), but up to 20% decrease after it.
- Basic wikitext syntax: <indicator name="foo">[[File:Foo.svg|20px]]</indicator>
- Usage instructions: https://www.mediawiki.org/wiki/Help:Page_status_indicators
- Adjusting custom skins to support indicators:
- https://www.mediawiki.org/wiki/Manual:Skinning#Page_status_indicators
+ https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Skinning#Page_status_indicators
* Edit tokens may now be time-limited: passing a maximum age to
User::matchEditToken will reject any older tokens.
* The debug logging internals have been overhauled, and are now using the
This library provides the interfaces set by the PSR-3 standard (http://www.php-fig.org/psr/psr-3/)
which are used by MediaWiki internally via the
MediaWiki\Logger\LoggerFactory class.
- See the structured logging RfC (https://www.mediawiki.org/wiki/Requests_for_comment/Structured_logging)
+ See the structured logging RfC (https://www.mediawiki.org/wiki/Special:MyLanguage/Requests_for_comment/Structured_logging)
for more background information.
** cssjanus/cssjanus
This library was formerly bundled with MediaWiki core and has been removed.
** wikimedia/cdb
This library was formerly a part of MediaWiki core, and has been moved into a separate library.
It provides CDB functions which are used in the Interwiki and Localization caches.
- More information about the library can be found at https://www.mediawiki.org/wiki/CDB.
+ More information about the library can be found at https://www.mediawiki.org/wiki/Special:MyLanguage/CDB.
** liuggio/statsd-php-client
This library provides a StatsD client API for logging application metrics to a remote server.
experience problems, as this configuration is not well tested.
Support for rendering mathematical formulas requires installing the Math extension,
-see https://www.mediawiki.org/wiki/Extension:Math
+see https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:Math
Don't forget to check the RELEASE-NOTES file...
notes on particular operating systems and workarounds for difficult hosting
environments:
-https://www.mediawiki.org/wiki/Manual:Installation_guide
+https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Installation_guide
******************* WARNING *******************
RELEASE-NOTES, INSTALL, and UPGRADE.
* Ready to get started?
-** https://www.mediawiki.org/wiki/Download
+** https://www.mediawiki.org/wiki/Special:MyLanguage/Download
* Looking for the technical manual?
-** https://www.mediawiki.org/wiki/Manual:Contents
+** https://www.mediawiki.org/wiki/Special:MyLangyage/Manual:Contents
* Seeking help from a person?
-** https://www.mediawiki.org/wiki/Communication
+** https://www.mediawiki.org/wiki/Special:MyLanguage/Communication
* Looking to file a bug report or a feature request?
** https://bugs.mediawiki.org/
* Interested in helping out?
-** https://www.mediawiki.org/wiki/How_to_contribute
+** https://www.mediawiki.org/wiki/Special:MyLanguage/How_to_contribute
MediaWiki is the result of global collaboration and cooperation. The CREDITS
file lists technical contributors to the project. The COPYING file explains
The 'docs' directory contain various text files that should help you understand
the most important parts of the code of MediaWiki. More in-depth documentation
can be found at:
- https://www.mediawiki.org/wiki/Manual:Code
- https://www.mediawiki.org/wiki/Developer_hub
+ https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Code
+ https://www.mediawiki.org/wiki/Special:MyLanguage/Developer_hub
API documentation is automatically generated and updated daily at:
https://doc.wikimedia.org/mediawiki-core/master/php/html/
For end users, most of the documentation is located online at:
- https://www.mediawiki.org/wiki/Help:Contents
+ https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents
Documentation for MediaWiki site administrators is at:
- https://www.mediawiki.org/wiki/Manual:Contents
+ https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Contents
$parserOutput: ParserOutput object
$wikiPage: WikiPage object
-DifferenceEngineRenderRevisionShowFinalPatrolLink': An extension can hook into this hook
+'DifferenceEngineRenderRevisionShowFinalPatrolLink': An extension can hook into this hook
point and return false to not show the final "mark as patrolled" link on the bottom
of a page.
This hook has no arguments.
'id' => $name,
'cols' => $wgUser->getIntOption( 'cols' ),
'rows' => $wgUser->getIntOption( 'rows' ),
- // The following classes can be used here:
- // * mw-editfont-default
- // * mw-editfont-monospace
- // * mw-editfont-sans-serif
- // * mw-editfont-serif
- 'class' => 'mw-editfont-' . $wgUser->getOption( 'editfont' ),
// Avoid PHP notices when appending preferences
// (appending allows customAttribs['style'] to still work).
'style' => ''
];
+ // The following classes can be used here:
+ // * mw-editfont-default
+ // * mw-editfont-monospace
+ // * mw-editfont-sans-serif
+ // * mw-editfont-serif
+ $class = 'mw-editfont-' . $wgUser->getOption( 'editfont' );
+
+ if ( isset( $attribs['class'] ) ) {
+ if ( is_string( $attribs['class'] ) ) {
+ $attribs['class'] .= ' ' . $class;
+ } elseif ( is_array( $attribs['class'] ) ) {
+ $attribs['class'][] = $class;
+ }
+ } else {
+ $attribs['class'] = $class;
+ }
+
$pageLang = $this->mTitle->getPageLanguage();
$attribs['lang'] = $pageLang->getHtmlCode();
$attribs['dir'] = $pageLang->getDir();
}
/**
- * @return Database
+ * @return IDatabase
* @throws MWException
*/
private function getConnection() {
- return $this->loadBalancer->getConnection( DB_REPLICA, [ 'watchlist' ] );
- }
-
- /**
- * @param Database $connection
- * @throws MWException
- */
- private function reuseConnection( Database $connection ) {
- $this->loadBalancer->reuseConnection( $connection );
+ return $this->loadBalancer->getConnectionRef( DB_REPLICA, [ 'watchlist' ] );
}
/**
$joinConds
);
- $this->reuseConnection( $db );
-
$items = [];
foreach ( $res as $row ) {
$items[] = [
$dbOptions
);
- $this->reuseConnection( $db );
-
$watchedItems = [];
foreach ( $res as $row ) {
// todo these could all be cached at some point?
}
private function getWatchedItemsWithRCInfoQueryConds(
- Database $db,
+ IDatabase $db,
User $user,
array $options
) {
return $conds;
}
- private function getStartEndConds( Database $db, array $options ) {
+ private function getStartEndConds( IDatabase $db, array $options ) {
if ( !isset( $options['start'] ) && ! isset( $options['end'] ) ) {
return [];
}
return $conds;
}
- private function getUserRelatedConds( Database $db, User $user, array $options ) {
+ private function getUserRelatedConds( IDatabase $db, User $user, array $options ) {
if ( !array_key_exists( 'onlyByUser', $options ) && !array_key_exists( 'notByUser', $options ) ) {
return [];
}
return $conds;
}
- private function getExtraDeletedPageLogEntryRelatedCond( Database $db, User $user ) {
+ private function getExtraDeletedPageLogEntryRelatedCond( IDatabase $db, User $user ) {
// LogPage::DELETED_ACTION hides the affected page, too. So hide those
// entirely from the watchlist, or someone could guess the title.
$bitmask = 0;
return '';
}
- private function getStartFromConds( Database $db, array $options ) {
+ private function getStartFromConds( IDatabase $db, array $options ) {
$op = $options['dir'] === self::DIR_OLDER ? '<' : '>';
list( $rcTimestamp, $rcId ) = $options['startFrom'];
$rcTimestamp = $db->addQuotes( $db->timestamp( $rcTimestamp ) );
);
}
- private function getWatchedItemsForUserQueryConds( Database $db, User $user, array $options ) {
+ private function getWatchedItemsForUserQueryConds( IDatabase $db, User $user, array $options ) {
$conds = [ 'wl_user' => $user->getId() ];
if ( $options['namespaceIds'] ) {
$conds['wl_namespace'] = array_map( 'intval', $options['namespaceIds'] );
* Creates a query condition part for getting only items before or after the given link target
* (while ordering using $sort mode)
*
- * @param Database $db
+ * @param IDatabase $db
* @param LinkTarget $target
* @param string $op comparison operator to use in the conditions
* @return string
*/
- private function getFromUntilTargetConds( Database $db, LinkTarget $target, $op ) {
+ private function getFromUntilTargetConds( IDatabase $db, LinkTarget $target, $op ) {
return $db->makeList(
[
"wl_namespace $op " . $target->getNamespace(),
continue;
}
- $lagTimes[$i] = $conn->getLag();
- if ( $lagTimes[$i] === false ) {
- $host = $this->parent->getServerName( $i );
- $this->replLogger->error( __METHOD__ . ": host $host is not replicating?" );
+ if ( $conn->getLBInfo( 'is static' ) ) {
+ $lagTimes[$i] = 0;
+ } else {
+ $lagTimes[$i] = $conn->getLag();
+ if ( $lagTimes[$i] === false ) {
+ $host = $this->parent->getServerName( $i );
+ $this->replLogger->error( __METHOD__ . ": host $host is not replicating?" );
+ }
}
if ( $close ) {
* @return object
*/
public function prepareTextForEdit( $text, $revid = null, User $user = null ) {
- ContentHandler::deprecated( __METHOD__, '1.21' );
+ wfDeprecated( __METHOD__, '1.21' );
$content = ContentHandler::makeContent( $text, $this->getTitle() );
return $this->prepareContentForEdit( $content, $revid, $user );
}
"category-file-count-limited": "The following {{PLURAL:$1|file is|$1 files are}} in the current category.",
"listingcontinuesabbrev": "cont.",
"index-category": "Indexed pages",
- "noindex-category": "Non-indexed pages",
+ "noindex-category": "Noindexed pages",
"broken-file-category": "Pages with broken file links",
"categoryviewer-pagedlinks": "($1) ($2)",
"category-header-numerals": "$1–$2",
* which we can't allow, as that would open a new connection for mysql.
* Replace with a HashBag. They would not be going to persist anyway.
*/
- $hashCache = [ 'class' => 'HashBagOStuff' ];
+ $hashCache = [ 'class' => 'HashBagOStuff', 'reportDupes' => false ];
$objectCaches = [
CACHE_DB => $hashCache,
CACHE_ACCEL => $hashCache,
->disableOriginalConstructor()
->getMock();
$mock->expects( $this->any() )
- ->method( 'getConnection' )
+ ->method( 'getConnectionRef' )
->with( DB_SLAVE )
->will( $this->returnValue( $mockDb ) );
return $mock;