"jakub-onderka/php-parallel-lint": "0.9.2",
"jetbrains/phpstorm-stubs": "dev-master#1b9906084d6635456fcf3f3a01f0d7d5b99a578a",
"justinrainbow/json-schema": "~5.2",
- "mediawiki/mediawiki-codesniffer": "0.8.1",
+ "mediawiki/mediawiki-codesniffer": "0.10.1",
"monolog/monolog": "~1.22.1",
"nikic/php-parser": "2.1.0",
"nmred/kafka-php": "0.1.5",
# Periodic purge via commit hooks
if ( mt_rand( 0, 9 ) == 0 ) {
- Block::purgeExpired();
+ self::purgeExpired();
}
$row = $this->getDatabaseArray();
# It's okay to autoblock. Go ahead and insert/update the block...
# Do not add a *new* block if the IP is already blocked.
- $ipblock = Block::newFromTarget( $autoblockIP );
+ $ipblock = self::newFromTarget( $autoblockIP );
if ( $ipblock ) {
# Check if the block is an autoblock and would exceed the user block
# if renewed. If so, do nothing, otherwise prolong the block time...
if ( $ipblock->mAuto && // @todo Why not compare $ipblock->mExpiry?
- $this->mExpiry > Block::getAutoblockExpiry( $ipblock->mTimestamp )
+ $this->mExpiry > self::getAutoblockExpiry( $ipblock->mTimestamp )
) {
# Reset block timestamp to now and its expiry to
# $wgAutoblockExpiry in the future
if ( $this->mExpiry == 'infinity' ) {
# Original block was indefinite, start an autoblock now
- $autoblock->mExpiry = Block::getAutoblockExpiry( $timestamp );
+ $autoblock->mExpiry = self::getAutoblockExpiry( $timestamp );
} else {
# If the user is already blocked with an expiry date, we don't
# want to pile on top of that.
- $autoblock->mExpiry = min( $this->mExpiry, Block::getAutoblockExpiry( $timestamp ) );
+ $autoblock->mExpiry = min( $this->mExpiry, self::getAutoblockExpiry( $timestamp ) );
}
# Insert the block...
public function updateTimestamp() {
if ( $this->mAuto ) {
$this->mTimestamp = wfTimestamp();
- $this->mExpiry = Block::getAutoblockExpiry( $this->mTimestamp );
+ $this->mExpiry = self::getAutoblockExpiry( $this->mTimestamp );
$dbw = wfGetDB( DB_MASTER );
$dbw->update( 'ipblocks',
*/
public static function newFromTarget( $specificTarget, $vagueTarget = null, $fromMaster = false ) {
list( $target, $type ) = self::parseTarget( $specificTarget );
- if ( $type == Block::TYPE_ID || $type == Block::TYPE_AUTO ) {
- return Block::newFromID( $target );
+ if ( $type == self::TYPE_ID || $type == self::TYPE_AUTO ) {
+ return self::newFromID( $target );
} elseif ( $target === null && $vagueTarget == '' ) {
# We're not going to find anything useful here
} elseif ( in_array(
$type,
- [ Block::TYPE_USER, Block::TYPE_IP, Block::TYPE_RANGE, null ] )
+ [ self::TYPE_USER, self::TYPE_IP, self::TYPE_RANGE, null ] )
) {
$block = new Block();
$block->fromMaster( $fromMaster );
}
$selectFields = array_merge(
[ 'ipb_range_start', 'ipb_range_end' ],
- Block::selectFields()
+ self::selectFields()
);
$rows = $db->select( 'ipblocks',
$selectFields,
# off validation checking (which would exclude IP addresses)
return [
User::newFromName( IP::sanitizeIP( $target ), false ),
- Block::TYPE_IP
+ self::TYPE_IP
];
} elseif ( IP::isValidBlock( $target ) ) {
# Can't create a User from an IP range
- return [ IP::sanitizeRange( $target ), Block::TYPE_RANGE ];
+ return [ IP::sanitizeRange( $target ), self::TYPE_RANGE ];
}
# Consider the possibility that this is not a username at all
# Note that since numbers are valid usernames, a $target of "12345" will be
# considered a User. If you want to pass a block ID, prepend a hash "#12345",
# since hash characters are not valid in usernames or titles generally.
- return [ $userObj, Block::TYPE_USER ];
+ return [ $userObj, self::TYPE_USER ];
} elseif ( preg_match( '/^#\d+$/', $target ) ) {
# Autoblock reference in the form "#12345"
- return [ substr( $target, 1 ), Block::TYPE_AUTO ];
+ return [ substr( $target, 1 ), self::TYPE_AUTO ];
} else {
# WTF?
$wgOut->addHTML( $this->editFormTextBeforeContent );
if ( !$this->isCssJsSubpage && $showToolbar && $wgUser->getOption( 'showtoolbar' ) ) {
- $wgOut->addHTML( EditPage::getEditToolbar( $this->mTitle ) );
+ $wgOut->addHTML( self::getEditToolbar( $this->mTitle ) );
}
if ( $this->blankArticle ) {
$text = $content->getNativeData();
- $regex = LinkFilter::makeRegex( $filterEntry );
+ $regex = self::makeRegex( $filterEntry );
return preg_match( $regex, $text );
}
Title $title, $text, $wikiId = null, $options = []
) {
if ( $wikiId !== null && !$title->isExternal() ) {
- $link = Linker::makeExternalLink(
+ $link = self::makeExternalLink(
WikiMap::getForeignURL(
$wikiId,
$title->getNamespace() === 0
/* escape = */ false // Already escaped
);
} else {
- $link = Linker::link( $title, $text, [], [], $options );
+ $link = self::link( $title, $text, [], [], $options );
}
return $link;
}
if ( !$rev->userCan( Revision::DELETED_RESTRICTED, $user ) ) {
- return Linker::revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops
+ return self::revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops
} else {
if ( $rev->getId() ) {
// RevDelete links using revision ID are stable across
'ids' => $rev->getTimestamp()
];
}
- return Linker::revDeleteLink( $query,
+ return self::revDeleteLink( $query,
$rev->isDeleted( Revision::DELETED_RESTRICTED ), $canHide );
}
}
*/
public static function getSubjectNamespaces() {
return array_filter(
- MWNamespace::getValidNamespaces(),
+ self::getValidNamespaces(),
'MWNamespace::isSubject'
);
}
*/
public static function getTalkNamespaces() {
return array_filter(
- MWNamespace::getValidNamespaces(),
+ self::getValidNamespaces(),
'MWNamespace::isTalk'
);
}
$search = [];
$replace = [];
foreach ( $magicarr as $id => $replacement ) {
- $mw = MagicWord::get( $id );
+ $mw = self::get( $id );
$search[] = $mw->getRegex();
$replace[] = $replacement;
}
$lbFactory->hasOrMadeRecentMasterChanges( INF )
) ? self::getUrlDomainDistance( $output->getRedirect(), $context ) : false;
+ $allowHeaders = !( $output->isDisabled() || headers_sent() );
if ( $urlDomainDistance === 'local' || $urlDomainDistance === 'remote' ) {
// OutputPage::output() will be fast; $postCommitWork will not be useful for
// masking the latency of syncing DB positions accross all datacenters synchronously.
$flags = $lbFactory::SHUTDOWN_CHRONPROT_ASYNC;
$cpPosTime = microtime( true );
// Client's next request should see 1+ positions with this DBMasterPos::asOf() time
- if ( $urlDomainDistance === 'local' ) {
+ if ( $urlDomainDistance === 'local' && $allowHeaders ) {
// Client will stay on this domain, so set an unobtrusive cookie
$expires = time() + ChronologyProtector::POSITION_TTL;
$options = [ 'prefix' => '' ];
// OutputPage::output() is fairly slow; run it in $postCommitWork to mask
// the latency of syncing DB positions accross all datacenters synchronously
$flags = $lbFactory::SHUTDOWN_CHRONPROT_SYNC;
- if ( $lbFactory->hasOrMadeRecentMasterChanges( INF ) ) {
+ if ( $lbFactory->hasOrMadeRecentMasterChanges( INF ) && $allowHeaders ) {
$cpPosTime = microtime( true );
// Set a cookie in case the DB position store cannot sync accross datacenters.
// This will at least cover the common case of the user staying on the domain.
$instance = MediaWikiServices::getInstance()->getMimeAnalyzer();
Assert::postcondition(
$instance instanceof MimeMagic,
- __METHOD__ . ' should return an instance of ' . MimeMagic::class
+ __METHOD__ . ' should return an instance of ' . self::class
);
return $instance;
}
$formClass = 'PreferencesForm',
array $remove = []
) {
- $formDescriptor = Preferences::getPreferences( $user, $context );
+ $formDescriptor = self::getPreferences( $user, $context );
if ( count( $remove ) ) {
$removeKeys = array_flip( $remove );
$formDescriptor = array_diff_key( $formDescriptor, $removeKeys );
return RecentChange::newFromConds(
[
- 'rc_user_text' => $this->getUserText( Revision::RAW ),
+ 'rc_user_text' => $this->getUserText( self::RAW ),
'rc_timestamp' => $dbr->timestamp( $this->getTimestamp() ),
'rc_this_oldid' => $this->getId()
],
? $this->getPreviousRevisionId( $dbw )
: $this->mParentId,
'rev_sha1' => $this->mSha1 === null
- ? Revision::base36Sha1( $this->mText )
+ ? self::base36Sha1( $this->mText )
: $this->mSha1,
];
}
}
- $content = $this->getContent( Revision::RAW );
+ $content = $this->getContent( self::RAW );
$prefixedDBkey = $title->getPrefixedDBkey();
$revId = $this->mId;
extract( self::getRecognizedTagData( $extratags, $removetags ) );
# Remove HTML comments
- $text = Sanitizer::removeHTMLcomments( $text );
+ $text = self::removeHTMLcomments( $text );
$bits = explode( '<', $text );
$text = str_replace( '>', '>', array_shift( $bits ) );
if ( !MWTidy::isEnabled() ) {
call_user_func_array( $processCallback, [ &$params, $args ] );
}
- if ( !Sanitizer::validateTag( $params, $t ) ) {
+ if ( !self::validateTag( $params, $t ) ) {
$badtag = true;
}
# Strip non-approved attributes from the tag
- $newparams = Sanitizer::fixTagAttributes( $params, $t );
+ $newparams = self::fixTagAttributes( $params, $t );
}
if ( !$badtag ) {
$rest = str_replace( '>', '>', $rest );
call_user_func_array( $warnCallback, [ 'deprecated-self-close-category' ] );
}
}
- if ( !Sanitizer::validateTag( $params, $t ) ) {
+ if ( !self::validateTag( $params, $t ) ) {
$badtag = true;
}
- $newparams = Sanitizer::fixTagAttributes( $params, $t );
+ $newparams = self::fixTagAttributes( $params, $t );
if ( !$badtag ) {
if ( $brace === '/>' && !isset( $htmlsingleonly[$t] ) ) {
# Interpret self-closing tags as empty tags even when
* @return bool
*/
static function validateTag( $params, $element ) {
- $params = Sanitizer::decodeTagAttributes( $params );
+ $params = self::decodeTagAttributes( $params );
if ( $element == 'meta' || $element == 'link' ) {
if ( !isset( $params['itemprop'] ) ) {
* @todo Check for unique id attribute :P
*/
static function validateTagAttributes( $attribs, $element ) {
- return Sanitizer::validateAttributes( $attribs,
- Sanitizer::attributeWhitelist( $element ) );
+ return self::validateAttributes( $attribs,
+ self::attributeWhitelist( $element ) );
}
/**
# Strip javascript "expression" from stylesheets.
# https://msdn.microsoft.com/en-us/library/ms537634.aspx
if ( $attribute == 'style' ) {
- $value = Sanitizer::checkCss( $value );
+ $value = self::checkCss( $value );
}
# Escape HTML id attributes
if ( $attribute === 'id' ) {
- $value = Sanitizer::escapeId( $value, 'noninitial' );
+ $value = self::escapeId( $value, 'noninitial' );
}
# Escape HTML id reference lists
|| $attribute === 'aria-labelledby'
|| $attribute === 'aria-owns'
) {
- $value = Sanitizer::escapeIdReferenceList( $value, 'noninitial' );
+ $value = self::escapeIdReferenceList( $value, 'noninitial' );
}
// RDFa and microdata properties allow URLs, URIs and/or CURIs.
*/
public static function normalizeCss( $value ) {
// Decode character references like {
- $value = Sanitizer::decodeCharReferences( $value );
+ $value = self::decodeCharReferences( $value );
// Decode escape sequences and line continuation
// See the grammar in the CSS 2 spec, appendix D.
return '';
}
- $decoded = Sanitizer::decodeTagAttributes( $text );
- $stripped = Sanitizer::validateTagAttributes( $decoded, $element );
+ $decoded = self::decodeTagAttributes( $text );
+ $stripped = self::validateTagAttributes( $decoded, $element );
if ( $sorted ) {
ksort( $stripped );
}
- return Sanitizer::safeEncodeTagAttributes( $stripped );
+ return self::safeEncodeTagAttributes( $stripped );
}
/**
* @return string HTML-encoded text fragment
*/
static function safeEncodeAttribute( $text ) {
- $encValue = Sanitizer::encodeAttribute( $text );
+ $encValue = self::encodeAttribute( $text );
# Templates and links may be expanded in later parsing,
# creating invalid or dangerous output. Suppress this.
global $wgExperimentalHtmlIds;
$options = (array)$options;
- $id = Sanitizer::decodeCharReferences( $id );
+ $id = self::decodeCharReferences( $id );
if ( $wgExperimentalHtmlIds && !in_array( 'legacy', $options ) ) {
$id = preg_replace( '/[ \t\n\r\f_\'"&#%]+/', '_', $id );
# Escape each token as an id
foreach ( $references as &$ref ) {
- $ref = Sanitizer::escapeId( $ref, $options );
+ $ref = self::escapeId( $ref, $options );
}
# Merge the array back to a space delimited list string
* @return string Escaped input
*/
static function escapeHtmlAllowEntities( $html ) {
- $html = Sanitizer::decodeCharReferences( $html );
+ $html = self::decodeCharReferences( $html );
# It seems wise to escape ' as well as ", as a matter of course. Can't
# hurt. Use ENT_SUBSTITUTE so that incorrectly truncated multibyte characters
# don't cause the entire string to disappear.
foreach ( $pairs as $set ) {
$attribute = strtolower( $set[1] );
- $value = Sanitizer::getTagAttributeCallback( $set );
+ $value = self::getTagAttributeCallback( $set );
// Normalize whitespace
$value = preg_replace( '/[\t\r\n ]+/', ' ', $value );
$value = trim( $value );
// Decode character references
- $attribs[$attribute] = Sanitizer::decodeCharReferences( $value );
+ $attribs[$attribute] = self::decodeCharReferences( $value );
}
return $attribs;
}
$attribs = [];
foreach ( $assoc_array as $attribute => $value ) {
$encAttribute = htmlspecialchars( $attribute );
- $encValue = Sanitizer::safeEncodeAttribute( $value );
+ $encValue = self::safeEncodeAttribute( $value );
$attribs[] = "$encAttribute=\"$encValue\"";
}
static function normalizeCharReferencesCallback( $matches ) {
$ret = null;
if ( $matches[1] != '' ) {
- $ret = Sanitizer::normalizeEntity( $matches[1] );
+ $ret = self::normalizeEntity( $matches[1] );
} elseif ( $matches[2] != '' ) {
- $ret = Sanitizer::decCharReference( $matches[2] );
+ $ret = self::decCharReference( $matches[2] );
} elseif ( $matches[3] != '' ) {
- $ret = Sanitizer::hexCharReference( $matches[3] );
+ $ret = self::hexCharReference( $matches[3] );
}
if ( is_null( $ret ) ) {
return htmlspecialchars( $matches[0] );
*/
static function decCharReference( $codepoint ) {
$point = intval( $codepoint );
- if ( Sanitizer::validateCodepoint( $point ) ) {
+ if ( self::validateCodepoint( $point ) ) {
return sprintf( '&#%d;', $point );
} else {
return null;
*/
static function hexCharReference( $codepoint ) {
$point = hexdec( $codepoint );
- if ( Sanitizer::validateCodepoint( $point ) ) {
+ if ( self::validateCodepoint( $point ) ) {
return sprintf( '&#x%x;', $point );
} else {
return null;
*/
static function decodeCharReferencesCallback( $matches ) {
if ( $matches[1] != '' ) {
- return Sanitizer::decodeEntity( $matches[1] );
+ return self::decodeEntity( $matches[1] );
} elseif ( $matches[2] != '' ) {
- return Sanitizer::decodeChar( intval( $matches[2] ) );
+ return self::decodeChar( intval( $matches[2] ) );
} elseif ( $matches[3] != '' ) {
- return Sanitizer::decodeChar( hexdec( $matches[3] ) );
+ return self::decodeChar( hexdec( $matches[3] ) );
}
# Last case should be an ampersand by itself
return $matches[0];
* @private
*/
static function decodeChar( $codepoint ) {
- if ( Sanitizer::validateCodepoint( $codepoint ) ) {
+ if ( self::validateCodepoint( $codepoint ) ) {
return UtfNormal\Utils::codepointToUtf8( $codepoint );
} else {
return UtfNormal\Constants::UTF8_REPLACEMENT;
* @return array
*/
static function attributeWhitelist( $element ) {
- $list = Sanitizer::setupAttributeWhitelist();
+ $list = self::setupAttributeWhitelist();
return isset( $list[$element] )
? $list[$element]
: [];
static function cleanUrl( $url ) {
# Normalize any HTML entities in input. They will be
# re-escaped by makeExternalLink().
- $url = Sanitizer::decodeCharReferences( $url );
+ $url = self::decodeCharReferences( $url );
# Escape any control characters introduced by the above step
$url = preg_replace_callback( '/[\][<>"\\x00-\\x20\\x7F\|]/',
return ObjectFactory::constructClassInstance( $conf['class'], [ $conf ] );
},
- 'ParserCache' => function( MediaWikiServices $services ) {
+ 'ParserCache' => function ( MediaWikiServices $services ) {
$config = $services->getMainConfig();
$cache = ObjectCache::getInstance( $config->get( 'ParserCacheType' ) );
wfDebugLog( 'caches', 'parser: ' . get_class( $cache ) );
);
},
- 'LinkCache' => function( MediaWikiServices $services ) {
+ 'LinkCache' => function ( MediaWikiServices $services ) {
return new LinkCache(
$services->getTitleFormatter(),
$services->getMainWANObjectCache()
/**
* @deprecated since 1.30
*/
-$parserMemc = new DeprecatedGlobal( 'parserMemc', function() {
+$parserMemc = new DeprecatedGlobal( 'parserMemc', function () {
return MediaWikiServices::getInstance()->getParserCache()->getCacheStorage();
}, '1.30' );
}
try {
- return Title::newFromTextThrow( strval( $text ), $defaultNamespace );
+ return self::newFromTextThrow( strval( $text ), $defaultNamespace );
} catch ( MalformedTitleException $ex ) {
return null;
}
__METHOD__
);
if ( $row !== false ) {
- $title = Title::newFromRow( $row );
+ $title = self::newFromRow( $row );
} else {
$title = null;
}
$titles = [];
foreach ( $res as $row ) {
- $titles[] = Title::newFromRow( $row );
+ $titles[] = self::newFromRow( $row );
}
return $titles;
}
}
$t = new Title();
- $t->mDbkeyform = Title::makeName( $ns, $title, $fragment, $interwiki, true );
+ $t->mDbkeyform = self::makeName( $ns, $title, $fragment, $interwiki, true );
try {
$t->secureAndSplit();
* @return Title The new object
*/
public static function newMainPage() {
- $title = Title::newFromText( wfMessage( 'mainpage' )->inContentLanguage()->text() );
+ $title = self::newFromText( wfMessage( 'mainpage' )->inContentLanguage()->text() );
// Don't give fatal errors if the message is broken
if ( !$title ) {
- $title = Title::newFromText( 'Main Page' );
+ $title = self::newFromText( 'Main Page' );
}
return $title;
}
*/
public function getContentModel( $flags = 0 ) {
if ( !$this->mForcedContentModel
- && ( !$this->mContentModel || $flags === Title::GAID_FOR_UPDATE )
+ && ( !$this->mContentModel || $flags === self::GAID_FOR_UPDATE )
&& $this->getArticleID( $flags )
) {
$linkCache = LinkCache::singleton();
if ( $canonicalName ) {
$localName = SpecialPageFactory::getLocalNameFor( $canonicalName, $par );
if ( $localName != $this->mDbkeyform ) {
- return Title::makeTitle( NS_SPECIAL, $localName );
+ return self::makeTitle( NS_SPECIAL, $localName );
}
}
}
* @return bool
*/
public function isMainPage() {
- return $this->equals( Title::newMainPage() );
+ return $this->equals( self::newMainPage() );
}
/**
* @return Title The object for the talk page
*/
public function getTalkPage() {
- return Title::makeTitle( MWNamespace::getTalk( $this->getNamespace() ), $this->getDBkey() );
+ return self::makeTitle( MWNamespace::getTalk( $this->getNamespace() ), $this->getDBkey() );
}
/**
if ( $this->getNamespace() == $subjectNS ) {
return $this;
}
- return Title::makeTitle( $subjectNS, $this->getDBkey() );
+ return self::makeTitle( $subjectNS, $this->getDBkey() );
}
/**
if ( !$this->hasFragment() ) {
return '';
} else {
- return '#' . Title::escapeFragmentForURL( $this->getFragment() );
+ return '#' . self::escapeFragmentForURL( $this->getFragment() );
}
}
* @since 1.20
*/
public function getRootTitle() {
- return Title::makeTitle( $this->getNamespace(), $this->getRootText() );
+ return self::makeTitle( $this->getNamespace(), $this->getRootText() );
}
/**
* @since 1.20
*/
public function getBaseTitle() {
- return Title::makeTitle( $this->getNamespace(), $this->getBaseText() );
+ return self::makeTitle( $this->getNamespace(), $this->getBaseText() );
}
/**
* @since 1.20
*/
public function getSubpage( $text ) {
- return Title::makeTitleSafe( $this->getNamespace(), $this->getText() . '/' . $text );
+ return self::makeTitleSafe( $this->getNamespace(), $this->getText() . '/' . $text );
}
/**
$page_id = $row->pr_page;
$page_ns = $row->page_namespace;
$page_title = $row->page_title;
- $sources[$page_id] = Title::makeTitle( $page_ns, $page_title );
+ $sources[$page_id] = self::makeTitle( $page_ns, $page_title );
# Add groups needed for each restriction type if its not already there
# Make sure this restriction type still exists
* @return int Int or 0 if the page doesn't exist
*/
public function getLatestRevID( $flags = 0 ) {
- if ( !( $flags & Title::GAID_FOR_UPDATE ) && $this->mLatestID !== false ) {
+ if ( !( $flags & self::GAID_FOR_UPDATE ) && $this->mLatestID !== false ) {
return intval( $this->mLatestID );
}
if ( !$this->getArticleID( $flags ) ) {
if ( $res->numRows() ) {
$linkCache = LinkCache::singleton();
foreach ( $res as $row ) {
- $titleObj = Title::makeTitle( $row->page_namespace, $row->page_title );
+ $titleObj = self::makeTitle( $row->page_namespace, $row->page_title );
if ( $titleObj ) {
$linkCache->addGoodLinkObjFromRow( $titleObj, $row );
$retVal[] = $titleObj;
$linkCache = LinkCache::singleton();
foreach ( $res as $row ) {
if ( $row->page_id ) {
- $titleObj = Title::newFromRow( $row );
+ $titleObj = self::newFromRow( $row );
} else {
- $titleObj = Title::makeTitle( $row->$blNamespace, $row->$blTitle );
+ $titleObj = self::makeTitle( $row->$blNamespace, $row->$blTitle );
$linkCache->addBadLinkObj( $titleObj );
}
$retVal[] = $titleObj;
$retVal = [];
foreach ( $res as $row ) {
- $retVal[] = Title::makeTitle( $row->pl_namespace, $row->pl_title );
+ $retVal[] = self::makeTitle( $row->pl_namespace, $row->pl_title );
}
return $retVal;
}
}
# T16385: we need makeTitleSafe because the new page names may
# be longer than 255 characters.
- $newSubpage = Title::makeTitleSafe( $newNs, $newPageName );
+ $newSubpage = self::makeTitleSafe( $newNs, $newPageName );
$success = $oldSubpage->moveTo( $newSubpage, $auth, $reason, $createRedirect, $changeTags );
if ( $success === true ) {
# Circular reference
$stack[$parent] = [];
} else {
- $nt = Title::newFromText( $parent );
+ $nt = self::newFromText( $parent );
if ( $nt ) {
$stack[$parent] = $nt->getParentCategoryTree( $children + [ $parent => 1 ] );
}
* @return string|int Wiki's name or $wiki_id if the wiki was not found
*/
public static function getWikiName( $wikiID ) {
- $wiki = WikiMap::getWiki( $wikiID );
+ $wiki = self::getWiki( $wikiID );
if ( $wiki ) {
return $wiki->getDisplayName();
* @return string|bool URL or false if the wiki was not found
*/
public static function getForeignURL( $wikiID, $page, $fragmentId = null ) {
- $wiki = WikiMap::getWiki( $wikiID );
+ $wiki = self::getWiki( $wikiID );
if ( $wiki ) {
return $wiki->getFullUrl( $page, $fragmentId );
$selected = isset( $languages[$selected] ) ? $selected : $wgLanguageCode;
$options = "\n";
foreach ( $languages as $code => $name ) {
- $options .= Xml::option( "$code - $name", $code, $code == $selected ) . "\n";
+ $options .= self::option( "$code - $name", $code, $code == $selected ) . "\n";
}
$attrs = [ 'id' => 'wpUserLanguage', 'name' => 'wpUserLanguage' ];
$msg = wfMessage( 'yourlanguage' );
}
return [
- Xml::label( $msg->text(), $attrs['id'] ),
- Xml::tags( 'select', $attrs, $options )
+ self::label( $msg->text(), $attrs['id'] ),
+ self::tags( 'select', $attrs, $options )
];
}
$value = false, $attribs = []
) {
return [
- Xml::label( $label, $id, $attribs ),
+ self::label( $label, $id, $attribs ),
self::input( $name, $size, $value, [ 'id' => $id ] + $attribs )
];
}
$attribs['tabindex'] = $tabindex;
}
- return Xml::openElement( 'select', $attribs )
+ return self::openElement( 'select', $attribs )
. "\n"
. $options
. "\n"
- . Xml::closeElement( 'select' );
+ . self::closeElement( 'select' );
}
/**
* @return string
*/
public static function fieldset( $legend = false, $content = false, $attribs = [] ) {
- $s = Xml::openElement( 'fieldset', $attribs ) . "\n";
+ $s = self::openElement( 'fieldset', $attribs ) . "\n";
if ( $legend ) {
- $s .= Xml::element( 'legend', null, $legend ) . "\n";
+ $s .= self::element( 'legend', null, $legend ) . "\n";
}
if ( $content !== false ) {
$s .= $content . "\n";
- $s .= Xml::closeElement( 'fieldset' ) . "\n";
+ $s .= self::closeElement( 'fieldset' ) . "\n";
}
return $s;
*/
public static function encodeJsCall( $name, $args, $pretty = false ) {
foreach ( $args as &$arg ) {
- $arg = Xml::encodeJsVar( $arg, $pretty );
+ $arg = self::encodeJsVar( $arg, $pretty );
if ( $arg === false ) {
return false;
}
$text .
'</html>';
- return Xml::isWellFormed( $html );
+ return self::isWellFormed( $html );
}
/**
foreach ( $fields as $labelmsg => $input ) {
$id = "mw-$labelmsg";
- $form .= Xml::openElement( 'tr', [ 'id' => $id ] );
+ $form .= self::openElement( 'tr', [ 'id' => $id ] );
// TODO use a <label> here for accessibility purposes - will need
// to either not use a table to build the form, or find the ID of
// the input somehow.
- $form .= Xml::tags( 'td', [ 'class' => 'mw-label' ], wfMessage( $labelmsg )->parse() );
- $form .= Xml::openElement( 'td', [ 'class' => 'mw-input' ] )
- . $input . Xml::closeElement( 'td' );
- $form .= Xml::closeElement( 'tr' );
+ $form .= self::tags( 'td', [ 'class' => 'mw-label' ], wfMessage( $labelmsg )->parse() );
+ $form .= self::openElement( 'td', [ 'class' => 'mw-input' ] )
+ . $input . self::closeElement( 'td' );
+ $form .= self::closeElement( 'tr' );
}
if ( $submitLabel ) {
- $form .= Xml::openElement( 'tr' );
- $form .= Xml::tags( 'td', [], '' );
- $form .= Xml::openElement( 'td', [ 'class' => 'mw-submit' ] )
- . Xml::submitButton( wfMessage( $submitLabel )->text(), $submitAttribs )
- . Xml::closeElement( 'td' );
- $form .= Xml::closeElement( 'tr' );
+ $form .= self::openElement( 'tr' );
+ $form .= self::tags( 'td', [], '' );
+ $form .= self::openElement( 'td', [ 'class' => 'mw-submit' ] )
+ . self::submitButton( wfMessage( $submitLabel )->text(), $submitAttribs )
+ . self::closeElement( 'td' );
+ $form .= self::closeElement( 'tr' );
}
$form .= "</tbody></table>";
* @return string
*/
public static function buildTable( $rows, $attribs = [], $headers = null ) {
- $s = Xml::openElement( 'table', $attribs );
+ $s = self::openElement( 'table', $attribs );
if ( is_array( $headers ) ) {
- $s .= Xml::openElement( 'thead', $attribs );
+ $s .= self::openElement( 'thead', $attribs );
foreach ( $headers as $id => $header ) {
$attribs = [];
$attribs['id'] = $id;
}
- $s .= Xml::element( 'th', $attribs, $header );
+ $s .= self::element( 'th', $attribs, $header );
}
- $s .= Xml::closeElement( 'thead' );
+ $s .= self::closeElement( 'thead' );
}
foreach ( $rows as $id => $row ) {
$attribs['id'] = $id;
}
- $s .= Xml::buildTableRow( $attribs, $row );
+ $s .= self::buildTableRow( $attribs, $row );
}
- $s .= Xml::closeElement( 'table' );
+ $s .= self::closeElement( 'table' );
return $s;
}
* @return string
*/
public static function buildTableRow( $attribs, $cells ) {
- $s = Xml::openElement( 'tr', $attribs );
+ $s = self::openElement( 'tr', $attribs );
foreach ( $cells as $id => $cell ) {
$attribs = [];
$attribs['id'] = $id;
}
- $s .= Xml::element( 'td', $attribs, $cell );
+ $s .= self::element( 'td', $attribs, $cell );
}
- $s .= Xml::closeElement( 'tr' );
+ $s .= self::closeElement( 'tr' );
return $s;
}
return 'view';
}
- $action = Action::factory( $actionName, $context->getWikiPage(), $context );
+ $action = self::factory( $actionName, $context->getWikiPage(), $context );
if ( $action instanceof Action ) {
return $action->getName();
}
public function addHelpLink( $to, $overrideBaseUrl = false ) {
global $wgContLang;
$msg = wfMessage( $wgContLang->lc(
- Action::getActionName( $this->getContext() )
+ self::getActionName( $this->getContext() )
) . '-helppage' );
if ( !$msg->isDisabled() ) {
// Main module has this method overridden
// Safety - avoid infinite loop:
if ( $this->isMain() ) {
- ApiBase::dieDebug( __METHOD__, 'base method was called on main module.' );
+ self::dieDebug( __METHOD__, 'base method was called on main module.' );
}
return $this->getMain()->lacksSameOriginSecurity();
// Main module has getResult() method overridden
// Safety - avoid infinite loop:
if ( $this->isMain() ) {
- ApiBase::dieDebug( __METHOD__, 'base method was called on main module. ' );
+ self::dieDebug( __METHOD__, 'base method was called on main module. ' );
}
return $this->getMain()->getResult();
// Main module has getErrorFormatter() method overridden
// Safety - avoid infinite loop:
if ( $this->isMain() ) {
- ApiBase::dieDebug( __METHOD__, 'base method was called on main module. ' );
+ self::dieDebug( __METHOD__, 'base method was called on main module. ' );
}
return $this->getMain()->getErrorFormatter();
// Main module has getContinuationManager() method overridden
// Safety - avoid infinite loop:
if ( $this->isMain() ) {
- ApiBase::dieDebug( __METHOD__, 'base method was called on main module. ' );
+ self::dieDebug( __METHOD__, 'base method was called on main module. ' );
}
return $this->getMain()->getContinuationManager();
// Main module has setContinuationManager() method overridden
// Safety - avoid infinite loop:
if ( $this->isMain() ) {
- ApiBase::dieDebug( __METHOD__, 'base method was called on main module. ' );
+ self::dieDebug( __METHOD__, 'base method was called on main module. ' );
}
$this->getMain()->setContinuationManager( $manager );
if ( $type == 'boolean' ) {
if ( isset( $default ) && $default !== false ) {
// Having a default value of anything other than 'false' is not allowed
- ApiBase::dieDebug(
+ self::dieDebug(
__METHOD__,
"Boolean param $encParamName's default is set to '$default'. " .
'Boolean parameters must default to false.'
} elseif ( $type == 'upload' ) {
if ( isset( $default ) ) {
// Having a default value is not allowed
- ApiBase::dieDebug(
+ self::dieDebug(
__METHOD__,
"File upload param $encParamName's default is set to " .
"'$default'. File upload parameters may not have a default." );
}
if ( $multi ) {
- ApiBase::dieDebug( __METHOD__, "Multi-values not supported for $encParamName" );
+ self::dieDebug( __METHOD__, "Multi-values not supported for $encParamName" );
}
$value = $this->getMain()->getUpload( $encParamName );
if ( !$value->exists() ) {
$allSpecifier = ( is_string( $allowAll ) ? $allowAll : self::ALL_DEFAULT_STRING );
if ( $allowAll && $multi && is_array( $type ) && in_array( $allSpecifier, $type, true ) ) {
- ApiBase::dieDebug(
+ self::dieDebug(
__METHOD__,
"For param $encParamName, PARAM_ALL collides with a possible value" );
}
if ( !isset( $paramSettings[self::PARAM_MAX] )
|| !isset( $paramSettings[self::PARAM_MAX2] )
) {
- ApiBase::dieDebug(
+ self::dieDebug(
__METHOD__,
"MAX1 or MAX2 are not defined for the limit $encParamName"
);
}
if ( $multi ) {
- ApiBase::dieDebug( __METHOD__, "Multi-values not supported for $encParamName" );
+ self::dieDebug( __METHOD__, "Multi-values not supported for $encParamName" );
}
$min = isset( $paramSettings[self::PARAM_MIN] ) ? $paramSettings[self::PARAM_MIN] : 0;
if ( $value == 'max' ) {
break;
case 'boolean':
if ( $multi ) {
- ApiBase::dieDebug( __METHOD__, "Multi-values not supported for $encParamName" );
+ self::dieDebug( __METHOD__, "Multi-values not supported for $encParamName" );
}
break;
case 'timestamp':
}
break;
default:
- ApiBase::dieDebug( __METHOD__, "Param $encParamName's type is unknown - $type" );
+ self::dieDebug( __METHOD__, "Param $encParamName's type is unknown - $type" );
}
}
* @return Message
*/
public function getFinalSummary() {
- $msg = ApiBase::makeMessage( $this->getSummaryMessage(), $this->getContext(), [
+ $msg = self::makeMessage( $this->getSummaryMessage(), $this->getContext(), [
$this->getModulePrefix(),
$this->getModuleName(),
$this->getModulePath(),
] );
if ( !$msg->exists() ) {
wfDeprecated( 'API help "description" messages', '1.30' );
- $msg = ApiBase::makeMessage( $this->getDescriptionMessage(), $this->getContext(), [
+ $msg = self::makeMessage( $this->getDescriptionMessage(), $this->getContext(), [
$this->getModulePrefix(),
$this->getModuleName(),
$this->getModulePath(),
] );
- $msg = ApiBase::makeMessage( 'rawmessage', $this->getContext(), [
+ $msg = self::makeMessage( 'rawmessage', $this->getContext(), [
preg_replace( '/\n.*/s', '', $msg->text() )
] );
}
$desc = (string)$desc;
}
- $summary = ApiBase::makeMessage( $this->getSummaryMessage(), $this->getContext(), [
+ $summary = self::makeMessage( $this->getSummaryMessage(), $this->getContext(), [
$this->getModulePrefix(),
$this->getModuleName(),
$this->getModulePath(),
] );
- $extendedDescription = ApiBase::makeMessage(
+ $extendedDescription = self::makeMessage(
$this->getExtendedDescription(), $this->getContext(), [
$this->getModulePrefix(),
$this->getModuleName(),
$msgs = [ $summary, $extendedDescription ];
} else {
wfDeprecated( 'API help "description" messages', '1.30' );
- $description = ApiBase::makeMessage( $this->getDescriptionMessage(), $this->getContext(), [
+ $description = self::makeMessage( $this->getDescriptionMessage(), $this->getContext(), [
$this->getModulePrefix(),
$this->getModuleName(),
$this->getModulePath(),
if ( $this->needsToken() ) {
$params['token'] = [
- ApiBase::PARAM_TYPE => 'string',
- ApiBase::PARAM_REQUIRED => true,
- ApiBase::PARAM_SENSITIVE => true,
- ApiBase::PARAM_HELP_MSG => [
+ self::PARAM_TYPE => 'string',
+ self::PARAM_REQUIRED => true,
+ self::PARAM_SENSITIVE => true,
+ self::PARAM_HELP_MSG => [
'api-help-param-token',
$this->needsToken(),
],
}
$desc = self::escapeWikiText( $desc );
- $params = $this->getFinalParams( ApiBase::GET_VALUES_FOR_HELP );
+ $params = $this->getFinalParams( self::GET_VALUES_FOR_HELP );
$msgs = [];
foreach ( $params as $param => $settings ) {
if ( !is_array( $settings ) ) {
$d = implode( ' ', $d );
}
- if ( isset( $settings[ApiBase::PARAM_HELP_MSG] ) ) {
- $msg = $settings[ApiBase::PARAM_HELP_MSG];
+ if ( isset( $settings[self::PARAM_HELP_MSG] ) ) {
+ $msg = $settings[self::PARAM_HELP_MSG];
} else {
$msg = $this->msg( "apihelp-{$path}-param-{$param}" );
if ( !$msg->exists() ) {
$msg = $this->msg( 'api-help-fallback-parameter', $d );
}
}
- $msg = ApiBase::makeMessage( $msg, $this->getContext(),
+ $msg = self::makeMessage( $msg, $this->getContext(),
[ $prefix, $param, $name, $path ] );
if ( !$msg ) {
self::dieDebug( __METHOD__,
}
$msgs[$param] = [ $msg ];
- if ( isset( $settings[ApiBase::PARAM_TYPE] ) &&
- $settings[ApiBase::PARAM_TYPE] === 'submodule'
+ if ( isset( $settings[self::PARAM_TYPE] ) &&
+ $settings[self::PARAM_TYPE] === 'submodule'
) {
- if ( isset( $settings[ApiBase::PARAM_SUBMODULE_MAP] ) ) {
- $map = $settings[ApiBase::PARAM_SUBMODULE_MAP];
+ if ( isset( $settings[self::PARAM_SUBMODULE_MAP] ) ) {
+ $map = $settings[self::PARAM_SUBMODULE_MAP];
} else {
$prefix = $this->isMain() ? '' : ( $this->getModulePath() . '+' );
$map = [];
$arr[] = $m->setContext( $this->getContext() );
}
$msgs[$param] = array_merge( $msgs[$param], $submodules, $deprecatedSubmodules );
- } elseif ( isset( $settings[ApiBase::PARAM_HELP_MSG_PER_VALUE] ) ) {
- if ( !is_array( $settings[ApiBase::PARAM_HELP_MSG_PER_VALUE] ) ) {
+ } elseif ( isset( $settings[self::PARAM_HELP_MSG_PER_VALUE] ) ) {
+ if ( !is_array( $settings[self::PARAM_HELP_MSG_PER_VALUE] ) ) {
self::dieDebug( __METHOD__,
'ApiBase::PARAM_HELP_MSG_PER_VALUE is not valid' );
}
- if ( !is_array( $settings[ApiBase::PARAM_TYPE] ) ) {
+ if ( !is_array( $settings[self::PARAM_TYPE] ) ) {
self::dieDebug( __METHOD__,
'ApiBase::PARAM_HELP_MSG_PER_VALUE may only be used when ' .
'ApiBase::PARAM_TYPE is an array' );
}
- $valueMsgs = $settings[ApiBase::PARAM_HELP_MSG_PER_VALUE];
- $deprecatedValues = isset( $settings[ApiBase::PARAM_DEPRECATED_VALUES] )
- ? $settings[ApiBase::PARAM_DEPRECATED_VALUES]
+ $valueMsgs = $settings[self::PARAM_HELP_MSG_PER_VALUE];
+ $deprecatedValues = isset( $settings[self::PARAM_DEPRECATED_VALUES] )
+ ? $settings[self::PARAM_DEPRECATED_VALUES]
: [];
- foreach ( $settings[ApiBase::PARAM_TYPE] as $value ) {
+ foreach ( $settings[self::PARAM_TYPE] as $value ) {
if ( isset( $valueMsgs[$value] ) ) {
$msg = $valueMsgs[$value];
} else {
$msg = "apihelp-{$path}-paramvalue-{$param}-{$value}";
}
- $m = ApiBase::makeMessage( $msg, $this->getContext(),
+ $m = self::makeMessage( $msg, $this->getContext(),
[ $prefix, $param, $name, $path, $value ] );
if ( $m ) {
$m = new ApiHelpParamValueMessage(
}
}
- if ( isset( $settings[ApiBase::PARAM_HELP_MSG_APPEND] ) ) {
- if ( !is_array( $settings[ApiBase::PARAM_HELP_MSG_APPEND] ) ) {
+ if ( isset( $settings[self::PARAM_HELP_MSG_APPEND] ) ) {
+ if ( !is_array( $settings[self::PARAM_HELP_MSG_APPEND] ) ) {
self::dieDebug( __METHOD__,
'Value for ApiBase::PARAM_HELP_MSG_APPEND is not an array' );
}
- foreach ( $settings[ApiBase::PARAM_HELP_MSG_APPEND] as $m ) {
- $m = ApiBase::makeMessage( $m, $this->getContext(),
+ foreach ( $settings[self::PARAM_HELP_MSG_APPEND] as $m ) {
+ $m = self::makeMessage( $m, $this->getContext(),
[ $prefix, $param, $name, $path ] );
if ( $m ) {
$msgs[$param][] = $m;
ApiBase::PARAM_TYPE => 'submodule',
],
'format' => [
- ApiBase::PARAM_DFLT => ApiMain::API_DEFAULT_FORMAT,
+ ApiBase::PARAM_DFLT => self::API_DEFAULT_FORMAT,
ApiBase::PARAM_TYPE => 'submodule',
],
'maxlag' => [
public function __construct( ApiBase $dbSource, $flags = 0, $defaultNamespace = NS_MAIN ) {
parent::__construct( $dbSource->getMain(), $dbSource->getModuleName() );
$this->mDbSource = $dbSource;
- $this->mAllowGenerator = ( $flags & ApiPageSet::DISABLE_GENERATORS ) == 0;
+ $this->mAllowGenerator = ( $flags & self::DISABLE_GENERATORS ) == 0;
$this->mDefaultNamespace = $defaultNamespace;
$this->mParams = $this->extractRequestParams();
}
// Create a temporary pageset to store generator's output,
// add any additional fields generator may need, and execute pageset to populate titles/pageids
- $tmpPageSet = new ApiPageSet( $dbSource, ApiPageSet::DISABLE_GENERATORS );
+ $tmpPageSet = new ApiPageSet( $dbSource, self::DISABLE_GENERATORS );
$generator->setGeneratorMode( $tmpPageSet );
$this->mCacheMode = $generator->getCacheMode( $generator->extractRequestParams() );
ApiBase::PARAM_DFLT => -1,
ApiBase::PARAM_HELP_MSG => [
'apihelp-query+imageinfo-param-urlwidth',
- ApiQueryImageInfo::TRANSFORM_LIMIT,
+ self::TRANSFORM_LIMIT,
],
],
'urlheight' => [
* @deprecated since 1.24
*/
public static function resetTokenCache() {
- ApiQueryInfo::$cachedTokens = [];
+ self::$cachedTokens = [];
}
/**
}
// The token is always the same, let's exploit that
- if ( !isset( ApiQueryInfo::$cachedTokens['edit'] ) ) {
- ApiQueryInfo::$cachedTokens['edit'] = $wgUser->getEditToken();
+ if ( !isset( self::$cachedTokens['edit'] ) ) {
+ self::$cachedTokens['edit'] = $wgUser->getEditToken();
}
- return ApiQueryInfo::$cachedTokens['edit'];
+ return self::$cachedTokens['edit'];
}
/**
}
// The token is always the same, let's exploit that
- if ( !isset( ApiQueryInfo::$cachedTokens['delete'] ) ) {
- ApiQueryInfo::$cachedTokens['delete'] = $wgUser->getEditToken();
+ if ( !isset( self::$cachedTokens['delete'] ) ) {
+ self::$cachedTokens['delete'] = $wgUser->getEditToken();
}
- return ApiQueryInfo::$cachedTokens['delete'];
+ return self::$cachedTokens['delete'];
}
/**
}
// The token is always the same, let's exploit that
- if ( !isset( ApiQueryInfo::$cachedTokens['protect'] ) ) {
- ApiQueryInfo::$cachedTokens['protect'] = $wgUser->getEditToken();
+ if ( !isset( self::$cachedTokens['protect'] ) ) {
+ self::$cachedTokens['protect'] = $wgUser->getEditToken();
}
- return ApiQueryInfo::$cachedTokens['protect'];
+ return self::$cachedTokens['protect'];
}
/**
}
// The token is always the same, let's exploit that
- if ( !isset( ApiQueryInfo::$cachedTokens['move'] ) ) {
- ApiQueryInfo::$cachedTokens['move'] = $wgUser->getEditToken();
+ if ( !isset( self::$cachedTokens['move'] ) ) {
+ self::$cachedTokens['move'] = $wgUser->getEditToken();
}
- return ApiQueryInfo::$cachedTokens['move'];
+ return self::$cachedTokens['move'];
}
/**
}
// The token is always the same, let's exploit that
- if ( !isset( ApiQueryInfo::$cachedTokens['block'] ) ) {
- ApiQueryInfo::$cachedTokens['block'] = $wgUser->getEditToken();
+ if ( !isset( self::$cachedTokens['block'] ) ) {
+ self::$cachedTokens['block'] = $wgUser->getEditToken();
}
- return ApiQueryInfo::$cachedTokens['block'];
+ return self::$cachedTokens['block'];
}
/**
}
// The token is always the same, let's exploit that
- if ( !isset( ApiQueryInfo::$cachedTokens['email'] ) ) {
- ApiQueryInfo::$cachedTokens['email'] = $wgUser->getEditToken();
+ if ( !isset( self::$cachedTokens['email'] ) ) {
+ self::$cachedTokens['email'] = $wgUser->getEditToken();
}
- return ApiQueryInfo::$cachedTokens['email'];
+ return self::$cachedTokens['email'];
}
/**
}
// The token is always the same, let's exploit that
- if ( !isset( ApiQueryInfo::$cachedTokens['import'] ) ) {
- ApiQueryInfo::$cachedTokens['import'] = $wgUser->getEditToken();
+ if ( !isset( self::$cachedTokens['import'] ) ) {
+ self::$cachedTokens['import'] = $wgUser->getEditToken();
}
- return ApiQueryInfo::$cachedTokens['import'];
+ return self::$cachedTokens['import'];
}
/**
}
// The token is always the same, let's exploit that
- if ( !isset( ApiQueryInfo::$cachedTokens['watch'] ) ) {
- ApiQueryInfo::$cachedTokens['watch'] = $wgUser->getEditToken( 'watch' );
+ if ( !isset( self::$cachedTokens['watch'] ) ) {
+ self::$cachedTokens['watch'] = $wgUser->getEditToken( 'watch' );
}
- return ApiQueryInfo::$cachedTokens['watch'];
+ return self::$cachedTokens['watch'];
}
/**
}
// The token is always the same, let's exploit that
- if ( !isset( ApiQueryInfo::$cachedTokens['options'] ) ) {
- ApiQueryInfo::$cachedTokens['options'] = $wgUser->getEditToken();
+ if ( !isset( self::$cachedTokens['options'] ) ) {
+ self::$cachedTokens['options'] = $wgUser->getEditToken();
}
- return ApiQueryInfo::$cachedTokens['options'];
+ return self::$cachedTokens['options'];
}
public function execute() {
* @param int $flags Zero or more OR-ed flags like OVERRIDE | ADD_ON_TOP.
*/
public static function setValue( array &$arr, $name, $value, $flags = 0 ) {
- if ( ( $flags & ApiResult::NO_VALIDATE ) !== ApiResult::NO_VALIDATE ) {
+ if ( ( $flags & self::NO_VALIDATE ) !== self::NO_VALIDATE ) {
$value = self::validateValue( $value );
}
if ( $name === null ) {
- if ( $flags & ApiResult::ADD_ON_TOP ) {
+ if ( $flags & self::ADD_ON_TOP ) {
array_unshift( $arr, $value );
} else {
array_push( $arr, $value );
}
$exists = isset( $arr[$name] );
- if ( !$exists || ( $flags & ApiResult::OVERRIDE ) ) {
- if ( !$exists && ( $flags & ApiResult::ADD_ON_TOP ) ) {
+ if ( !$exists || ( $flags & self::OVERRIDE ) ) {
+ if ( !$exists && ( $flags & self::ADD_ON_TOP ) ) {
$arr = [ $name => $value ] + $arr;
} else {
$arr[$name] = $value;
* @since 1.21 int $flags replaced boolean $override
*/
public function addValue( $path, $name, $value, $flags = 0 ) {
- $arr = &$this->path( $path, ( $flags & ApiResult::ADD_ON_TOP ) ? 'prepend' : 'append' );
+ $arr = &$this->path( $path, ( $flags & self::ADD_ON_TOP ) ? 'prepend' : 'append' );
- if ( $this->checkingSize && !( $flags & ApiResult::NO_SIZE_CHECK ) ) {
+ if ( $this->checkingSize && !( $flags & self::NO_SIZE_CHECK ) ) {
// self::size needs the validated value. Then flag
// to not re-validate later.
$value = self::validateValue( $value );
- $flags |= ApiResult::NO_VALIDATE;
+ $flags |= self::NO_VALIDATE;
$newsize = $this->size + self::size( $value );
if ( $this->maxSize !== false && $newsize > $this->maxSize ) {
$name = array_pop( $path );
}
$ret = self::unsetValue( $this->path( $path, 'dummy' ), $name );
- if ( $this->checkingSize && !( $flags & ApiResult::NO_SIZE_CHECK ) ) {
+ if ( $this->checkingSize && !( $flags & self::NO_SIZE_CHECK ) ) {
$newsize = $this->size - self::size( $ret );
$this->size = max( $newsize, 0 );
}
public function addParsedLimit( $moduleName, $limit ) {
// Add value, allowing overwriting
$this->addValue( 'limits', $moduleName, $limit,
- ApiResult::OVERRIDE | ApiResult::NO_SIZE_CHECK );
+ self::OVERRIDE | self::NO_SIZE_CHECK );
}
/**@}*/
* @param int $flags Zero or more OR-ed flags like OVERRIDE | ADD_ON_TOP.
*/
public function addContentField( $path, $name, $flags = 0 ) {
- $arr = &$this->path( $path, ( $flags & ApiResult::ADD_ON_TOP ) ? 'prepend' : 'append' );
+ $arr = &$this->path( $path, ( $flags & self::ADD_ON_TOP ) ? 'prepend' : 'append' );
self::setContentField( $arr, $name, $flags );
}
$bools = [];
foreach ( $vars as $k => $v ) {
if ( is_array( $v ) || is_object( $v ) ) {
- $vars[$k] = ApiResult::addMetadataToResultVars( (array)$v, is_object( $v ) );
+ $vars[$k] = self::addMetadataToResultVars( (array)$v, is_object( $v ) );
} elseif ( is_bool( $v ) ) {
// Better here to use real bools even in BC formats
$bools[] = $k;
// Get the list of keys we actually care about. Unfortunately, we can't support
// certain keys that conflict with ApiResult metadata.
$keys = array_diff( array_keys( $vars ), [
- ApiResult::META_TYPE, ApiResult::META_PRESERVE_KEYS, ApiResult::META_KVP_KEY_NAME,
- ApiResult::META_INDEXED_TAG_NAME, ApiResult::META_BC_BOOLS
+ self::META_TYPE, self::META_PRESERVE_KEYS, self::META_KVP_KEY_NAME,
+ self::META_INDEXED_TAG_NAME, self::META_BC_BOOLS
] );
return [
- ApiResult::META_TYPE => 'kvp',
- ApiResult::META_KVP_KEY_NAME => 'key',
- ApiResult::META_PRESERVE_KEYS => $keys,
- ApiResult::META_BC_BOOLS => $bools,
- ApiResult::META_INDEXED_TAG_NAME => 'var',
+ self::META_TYPE => 'kvp',
+ self::META_KVP_KEY_NAME => 'key',
+ self::META_PRESERVE_KEYS => $keys,
+ self::META_BC_BOOLS => $bools,
+ self::META_INDEXED_TAG_NAME => 'var',
] + $vars;
} else {
return [
- ApiResult::META_TYPE => 'array',
- ApiResult::META_BC_BOOLS => $bools,
- ApiResult::META_INDEXED_TAG_NAME => 'value',
+ self::META_TYPE => 'array',
+ self::META_BC_BOOLS => $bools,
+ self::META_INDEXED_TAG_NAME => 'value',
] + $vars;
}
}
"Winstonyin",
"Arthur2e5",
"烈羽",
- "Corainn"
+ "Corainn",
+ "A2093064"
]
},
"apihelp-main-extended-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:API:Main_page|說明文件]]\n* [[mw:API:FAQ|常見問題]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api 郵寄清單]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce API公告]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R 報告錯誤及請求功能]\n</div>\n<strong>狀態資訊:</strong>本頁所展示的所有功能都應正常工作,但是API仍在開發當中,將會隨時變化。請訂閱[https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ mediawiki-api-announce 郵件清單]以便得到更新通知。\n\n<strong>錯誤的請求:</strong>當API收到錯誤的請求時,會發出以「MediaWiki-API-Error」為鍵的HTTP頭欄位,隨後頭欄位的值與錯誤碼將會被設為相同的值。詳細資訊請參閱[[mw:API:Errors_and_warnings|API: 錯誤與警告]]。\n\n<strong>測試:</strong>要簡化API請求的測試過程,請見[[Special:ApiSandbox]]。",
"apihelp-createaccount-summary": "建立新使用者帳號。",
"apihelp-createaccount-param-name": "使用者名稱。",
"apihelp-createaccount-param-password": "密碼 (若有設定 <var>$1mailpassword</var> 則可略過)。",
- "apihelp-createaccount-param-domain": "å¤\96é\83¨èª\8d証使用的網域 (選填)。",
+ "apihelp-createaccount-param-domain": "å¤\96é\83¨èª\8dè\89使用的網域 (選填)。",
"apihelp-createaccount-param-token": "在第一次請求時已取得的帳號建立金鑰。",
"apihelp-createaccount-param-email": "使用者的電子郵件地址 (選填) 。",
"apihelp-createaccount-param-realname": "使用者的真實姓名 (選填)。",
*/
public static function newPass( $username = null ) {
$ret = new AuthenticationResponse;
- $ret->status = AuthenticationResponse::PASS;
+ $ret->status = self::PASS;
$ret->username = $username;
return $ret;
}
*/
public static function newFail( Message $msg ) {
$ret = new AuthenticationResponse;
- $ret->status = AuthenticationResponse::FAIL;
+ $ret->status = self::FAIL;
$ret->message = $msg;
$ret->messageType = 'error';
return $ret;
*/
public static function newRestart( Message $msg ) {
$ret = new AuthenticationResponse;
- $ret->status = AuthenticationResponse::RESTART;
+ $ret->status = self::RESTART;
$ret->message = $msg;
return $ret;
}
*/
public static function newAbstain() {
$ret = new AuthenticationResponse;
- $ret->status = AuthenticationResponse::ABSTAIN;
+ $ret->status = self::ABSTAIN;
return $ret;
}
}
$ret = new AuthenticationResponse;
- $ret->status = AuthenticationResponse::UI;
+ $ret->status = self::UI;
$ret->neededRequests = $reqs;
$ret->message = $msg;
$ret->messageType = $msgtype;
}
$ret = new AuthenticationResponse;
- $ret->status = AuthenticationResponse::REDIRECT;
+ $ret->status = self::REDIRECT;
$ret->neededRequests = $reqs;
$ret->redirectTarget = $redirectTarget;
$ret->redirectApiData = $redirectApiData;
}
// Normalise title-case input (with some inlining)
- $lckey = MessageCache::normalizeKey( $key );
+ $lckey = self::normalizeKey( $key );
Hooks::run( 'MessageCache::get', [ &$lckey ] );
if ( is_array( $type ) ) {
$retval = [];
foreach ( $type as $t ) {
- $retval[] = RecentChange::parseToRCType( $t );
+ $retval[] = self::parseToRCType( $t );
}
return $retval;
$change = $change instanceof RecentChange
? $change
- : RecentChange::newFromId( $change );
+ : self::newFromId( $change );
if ( !$change instanceof RecentChange ) {
return null;
* @return string|bool
*/
static function getUnicodeVersionForICU() {
- $icuVersion = IcuCollation::getICUVersion();
+ $icuVersion = self::getICUVersion();
if ( !$icuVersion ) {
return false;
}
$modelId = $title->getContentModel();
}
- $handler = ContentHandler::getForModelID( $modelId );
+ $handler = self::getForModelID( $modelId );
return $handler->unserializeContent( $text, $format );
}
public static function getForTitle( Title $title ) {
$modelId = $title->getContentModel();
- return ContentHandler::getForModelID( $modelId );
+ return self::getForModelID( $modelId );
}
/**
public static function getForContent( Content $content ) {
$modelId = $content->getModel();
- return ContentHandler::getForModelID( $modelId );
+ return self::getForModelID( $modelId );
}
/**
public static function getForModelID( $modelId ) {
global $wgContentHandlers;
- if ( isset( ContentHandler::$handlers[$modelId] ) ) {
- return ContentHandler::$handlers[$modelId];
+ if ( isset( self::$handlers[$modelId] ) ) {
+ return self::$handlers[$modelId];
}
if ( empty( $wgContentHandlers[$modelId] ) ) {
wfDebugLog( 'ContentHandler', 'Created handler for ' . $modelId
. ': ' . get_class( $handler ) );
- ContentHandler::$handlers[$modelId] = $handler;
+ self::$handlers[$modelId] = $handler;
- return ContentHandler::$handlers[$modelId];
+ return self::$handlers[$modelId];
}
/**
$formats = [];
foreach ( $wgContentHandlers as $model => $class ) {
- $handler = ContentHandler::getForModelID( $model );
+ $handler = self::getForModelID( $model );
$formats = array_merge( $formats, $handler->getSupportedFormats() );
}
$html = '';
if ( self::$enabled ) {
- MWDebug::log( 'MWDebug output complete' );
+ self::log( 'MWDebug output complete' );
$debugInfo = self::getDebugInfo( $context );
// Cannot use OutputPage::addJsConfigVars because those are already outputted
}
}
- MWDebug::log( 'MWDebug output complete' );
+ self::log( 'MWDebug output complete' );
$debugInfo = self::getDebugInfo( $context );
ApiResult::setIndexedTagName( $debugInfo, 'debuginfo' );
* @param int $buffer One of WikiExporter::BUFFER or WikiExporter::STREAM
* @param int $text One of WikiExporter::TEXT or WikiExporter::STUB
*/
- function __construct( $db, $history = WikiExporter::CURRENT,
- $buffer = WikiExporter::BUFFER, $text = WikiExporter::TEXT ) {
+ function __construct( $db, $history = self::CURRENT,
+ $buffer = self::BUFFER, $text = self::TEXT ) {
$this->db = $db;
$this->history = $history;
$this->buffer = $buffer;
# Get logging table name for logging.* clause
$logging = $this->db->tableName( 'logging' );
- if ( $this->buffer == WikiExporter::STREAM ) {
+ if ( $this->buffer == self::STREAM ) {
$prev = $this->db->bufferResults( false );
}
$result = null; // Assuring $result is not undefined, if exception occurs early
[ 'ORDER BY' => 'log_id', 'USE INDEX' => [ 'logging' => 'PRIMARY' ] ]
);
$this->outputLogStream( $result );
- if ( $this->buffer == WikiExporter::STREAM ) {
+ if ( $this->buffer == self::STREAM ) {
$this->db->bufferResults( $prev );
}
} catch ( Exception $e ) {
// Putting database back in previous buffer mode
try {
- if ( $this->buffer == WikiExporter::STREAM ) {
+ if ( $this->buffer == self::STREAM ) {
$this->db->bufferResults( $prev );
}
} catch ( Exception $e2 ) {
if ( !empty( $this->history['limit'] ) ) {
$opts['LIMIT'] = intval( $this->history['limit'] );
}
- } elseif ( $this->history & WikiExporter::FULL ) {
+ } elseif ( $this->history & self::FULL ) {
# Full history dumps...
# query optimization for history stub dumps
- if ( $this->text == WikiExporter::STUB && $orderRevs ) {
+ if ( $this->text == self::STUB && $orderRevs ) {
$tables = [ 'revision', 'page' ];
$opts[] = 'STRAIGHT_JOIN';
$opts['ORDER BY'] = [ 'rev_page ASC', 'rev_id ASC' ];
} else {
$join['revision'] = [ 'INNER JOIN', 'page_id=rev_page' ];
}
- } elseif ( $this->history & WikiExporter::CURRENT ) {
+ } elseif ( $this->history & self::CURRENT ) {
# Latest revision dumps...
if ( $this->list_authors && $cond != '' ) { // List authors, if so desired
$this->do_list_authors( $cond );
}
$join['revision'] = [ 'INNER JOIN', 'page_id=rev_page AND page_latest=rev_id' ];
- } elseif ( $this->history & WikiExporter::STABLE ) {
+ } elseif ( $this->history & self::STABLE ) {
# "Stable" revision dumps...
# Default JOIN, to be overridden...
$join['revision'] = [ 'INNER JOIN', 'page_id=rev_page AND page_latest=rev_id' ];
if ( Hooks::run( 'WikiExporter::dumpStableQuery', [ &$tables, &$opts, &$join ] ) ) {
throw new MWException( __METHOD__ . " given invalid history dump type." );
}
- } elseif ( $this->history & WikiExporter::RANGE ) {
+ } elseif ( $this->history & self::RANGE ) {
# Dump of revisions within a specified range
$join['revision'] = [ 'INNER JOIN', 'page_id=rev_page' ];
$opts['ORDER BY'] = [ 'rev_page ASC', 'rev_id ASC' ];
$opts['USE INDEX']['page'] = 'PRIMARY';
}
# Build text join options
- if ( $this->text != WikiExporter::STUB ) { // 1-pass
+ if ( $this->text != self::STUB ) { // 1-pass
$tables[] = 'text';
$join['text'] = [ 'INNER JOIN', 'rev_text_id=old_id' ];
}
- if ( $this->buffer == WikiExporter::STREAM ) {
+ if ( $this->buffer == self::STREAM ) {
$prev = $this->db->bufferResults( false );
}
$result = null; // Assuring $result is not undefined, if exception occurs early
# Output dump results
$this->outputPageStream( $result );
- if ( $this->buffer == WikiExporter::STREAM ) {
+ if ( $this->buffer == self::STREAM ) {
$this->db->bufferResults( $prev );
}
} catch ( Exception $e ) {
// Putting database back in previous buffer mode
try {
- if ( $this->buffer == WikiExporter::STREAM ) {
+ if ( $this->buffer == self::STREAM ) {
$this->db->bufferResults( $prev );
}
} catch ( Exception $e2 ) {
}
$req = MWHttpRequest::factory( $url, $options, __METHOD__ );
- $req->setUserAgent( ForeignAPIRepo::getUserAgent() );
+ $req->setUserAgent( self::getUserAgent() );
$status = $req->execute();
if ( $status->isOK() ) {
return ObjectFactory::constructClassInstance( OOUIHTMLForm::class, $arguments );
default:
/** @var HTMLForm $form */
- $form = ObjectFactory::constructClassInstance( HTMLForm::class, $arguments );
+ $form = ObjectFactory::constructClassInstance( self::class, $arguments );
$form->setDisplayFormat( $displayFormat );
return $form;
}
$options['timeout'] = $args[1];
$caller = __METHOD__;
}
- return Http::request( 'GET', $url, $options, $caller );
+ return self::request( 'GET', $url, $options, $caller );
}
/**
* @return string|bool false on error
*/
public static function post( $url, $options = [], $caller = __METHOD__ ) {
- return Http::request( 'POST', $url, $options, $caller );
+ return self::request( 'POST', $url, $options, $caller );
}
/**
}
$fname = $upload['tmp_name'];
if ( is_uploaded_file( $fname ) ) {
- return ImportStreamSource::newFromFile( $fname );
+ return self::newFromFile( $fname );
} else {
return Status::newFatal( 'importnofile' );
}
$url = wfAppendQuery( $link, $params );
# For interwikis, use POST to avoid redirects.
- return ImportStreamSource::newFromURL( $url, "POST" );
+ return self::newFromURL( $url, "POST" );
}
}
// Flag this job as an old duplicate based on its "root" job...
try {
if ( $job && $this->isRootJobOldDuplicate( $job ) ) {
- JobQueue::incrStats( 'dupe_pops', $this->type );
+ self::incrStats( 'dupe_pops', $this->type );
$job = DuplicateJob::newFromJob( $job ); // convert to a no-op
}
} catch ( Exception $e ) {
// quotation marks (e.g. "foo /* bar").
$comments = [];
- $pattern = '/(?!' . CSSMin::EMBED_REGEX . ')(' . CSSMin::COMMENT_REGEX . ')/s';
+ $pattern = '/(?!' . self::EMBED_REGEX . ')(' . self::COMMENT_REGEX . ')/s';
$source = preg_replace_callback(
$pattern,
}, $source );
// Re-insert comments
- $pattern = '/' . CSSMin::PLACEHOLDER . '(\d+)x/';
+ $pattern = '/' . self::PLACEHOLDER . '(\d+)x/';
$source = preg_replace_callback( $pattern, function ( $match ) use ( &$comments ) {
return $comments[ $match[1] ];
}, $source );
*/
private static function parseCIDR6( $range ) {
# Explode into <expanded IP,range>
- $parts = explode( '/', IP::sanitizeIP( $range ), 2 );
+ $parts = explode( '/', self::sanitizeIP( $range ), 2 );
if ( count( $parts ) != 2 ) {
return [ false, false ];
}
*/
private static function parseRange6( $range ) {
# Expand any IPv6 IP
- $range = IP::sanitizeIP( $range );
+ $range = self::sanitizeIP( $range );
// CIDR notation...
if ( strpos( $range, '/' ) !== false ) {
list( $network, $bits ) = self::parseCIDR6( $range );
public static function getSubnet( $ip ) {
$matches = [];
$subnet = false;
- if ( IP::isIPv6( $ip ) ) {
- $parts = IP::parseRange( "$ip/64" );
+ if ( self::isIPv6( $ip ) ) {
+ $parts = self::parseRange( "$ip/64" );
$subnet = $parts[0];
} elseif ( preg_match( '/^(\d+\.\d+\.\d+)\.\d+$/', $ip, $matches ) ) {
// IPv4
// Replace instances of the separator inside HTML-like tags with the placeholder
$replacer = new DoubleReplacer( $separator, $placeholder );
- $cleaned = StringUtils::delimiterReplaceCallback( '<', '>', $replacer->cb(), $text );
+ $cleaned = self::delimiterReplaceCallback( '<', '>', $replacer->cb(), $text );
// Explode, then put the replaced separators back in
$items = explode( $separator, $cleaned );
// Replace instances of the separator inside HTML-like tags with the placeholder
$replacer = new DoubleReplacer( $search, $placeholder );
- $cleaned = StringUtils::delimiterReplaceCallback( '<', '>', $replacer->cb(), $text );
+ $cleaned = self::delimiterReplaceCallback( '<', '>', $replacer->cb(), $text );
// Explode, then put the replaced separators back in
$cleaned = str_replace( $search, $replace, $cleaned );
* @return bool
*/
public static function isLogType( $type ) {
- return in_array( $type, LogPage::validTypes() );
+ return in_array( $type, self::validTypes() );
}
/**
$this->action = $action;
$this->target = $target;
$this->comment = $comment;
- $this->params = LogPage::makeParamBlob( $params );
+ $this->params = self::makeParamBlob( $params );
if ( $doer === null ) {
global $wgUser;
// first send to non-split address list, then to split addresses one by one
$status = Status::newGood();
if ( $to ) {
- $status->merge( UserMailer::sendInternal(
+ $status->merge( self::sendInternal(
$to, $from, $subject, $body, $options ) );
}
foreach ( $splitTo as $newTo ) {
- $status->merge( UserMailer::sendInternal(
+ $status->merge( self::sendInternal(
[ $newTo ], $from, $subject, $body, $options ) );
}
return $status;
}
}
- return UserMailer::sendInternal( $to, $from, $subject, $body, $options );
+ return self::sendInternal( $to, $from, $subject, $body, $options );
}
/**
# TIFF Rev. 6.0 Attribute Information (p22)
'IFD0' => [
# Tags relating to image structure
- 'ImageWidth' => Exif::SHORT_OR_LONG, # Image width
- 'ImageLength' => Exif::SHORT_OR_LONG, # Image height
- 'BitsPerSample' => [ Exif::SHORT, 3 ], # Number of bits per component
+ 'ImageWidth' => self::SHORT_OR_LONG, # Image width
+ 'ImageLength' => self::SHORT_OR_LONG, # Image height
+ 'BitsPerSample' => [ self::SHORT, 3 ], # Number of bits per component
# "When a primary image is JPEG compressed, this designation is not"
# "necessary and is omitted." (p23)
- 'Compression' => Exif::SHORT, # Compression scheme #p23
- 'PhotometricInterpretation' => Exif::SHORT, # Pixel composition #p23
- 'Orientation' => Exif::SHORT, # Orientation of image #p24
- 'SamplesPerPixel' => Exif::SHORT, # Number of components
- 'PlanarConfiguration' => Exif::SHORT, # Image data arrangement #p24
- 'YCbCrSubSampling' => [ Exif::SHORT, 2 ], # Subsampling ratio of Y to C #p24
- 'YCbCrPositioning' => Exif::SHORT, # Y and C positioning #p24-25
- 'XResolution' => Exif::RATIONAL, # Image resolution in width direction
- 'YResolution' => Exif::RATIONAL, # Image resolution in height direction
- 'ResolutionUnit' => Exif::SHORT, # Unit of X and Y resolution #(p26)
+ 'Compression' => self::SHORT, # Compression scheme #p23
+ 'PhotometricInterpretation' => self::SHORT, # Pixel composition #p23
+ 'Orientation' => self::SHORT, # Orientation of image #p24
+ 'SamplesPerPixel' => self::SHORT, # Number of components
+ 'PlanarConfiguration' => self::SHORT, # Image data arrangement #p24
+ 'YCbCrSubSampling' => [ self::SHORT, 2 ], # Subsampling ratio of Y to C #p24
+ 'YCbCrPositioning' => self::SHORT, # Y and C positioning #p24-25
+ 'XResolution' => self::RATIONAL, # Image resolution in width direction
+ 'YResolution' => self::RATIONAL, # Image resolution in height direction
+ 'ResolutionUnit' => self::SHORT, # Unit of X and Y resolution #(p26)
# Tags relating to recording offset
- 'StripOffsets' => Exif::SHORT_OR_LONG, # Image data location
- 'RowsPerStrip' => Exif::SHORT_OR_LONG, # Number of rows per strip
- 'StripByteCounts' => Exif::SHORT_OR_LONG, # Bytes per compressed strip
- 'JPEGInterchangeFormat' => Exif::SHORT_OR_LONG, # Offset to JPEG SOI
- 'JPEGInterchangeFormatLength' => Exif::SHORT_OR_LONG, # Bytes of JPEG data
+ 'StripOffsets' => self::SHORT_OR_LONG, # Image data location
+ 'RowsPerStrip' => self::SHORT_OR_LONG, # Number of rows per strip
+ 'StripByteCounts' => self::SHORT_OR_LONG, # Bytes per compressed strip
+ 'JPEGInterchangeFormat' => self::SHORT_OR_LONG, # Offset to JPEG SOI
+ 'JPEGInterchangeFormatLength' => self::SHORT_OR_LONG, # Bytes of JPEG data
# Tags relating to image data characteristics
- 'TransferFunction' => Exif::IGNORE, # Transfer function
- 'WhitePoint' => [ Exif::RATIONAL, 2 ], # White point chromaticity
- 'PrimaryChromaticities' => [ Exif::RATIONAL, 6 ], # Chromaticities of primarities
+ 'TransferFunction' => self::IGNORE, # Transfer function
+ 'WhitePoint' => [ self::RATIONAL, 2 ], # White point chromaticity
+ 'PrimaryChromaticities' => [ self::RATIONAL, 6 ], # Chromaticities of primarities
# Color space transformation matrix coefficients #p27
- 'YCbCrCoefficients' => [ Exif::RATIONAL, 3 ],
- 'ReferenceBlackWhite' => [ Exif::RATIONAL, 6 ], # Pair of black and white reference values
+ 'YCbCrCoefficients' => [ self::RATIONAL, 3 ],
+ 'ReferenceBlackWhite' => [ self::RATIONAL, 6 ], # Pair of black and white reference values
# Other tags
- 'DateTime' => Exif::ASCII, # File change date and time
- 'ImageDescription' => Exif::ASCII, # Image title
- 'Make' => Exif::ASCII, # Image input equipment manufacturer
- 'Model' => Exif::ASCII, # Image input equipment model
- 'Software' => Exif::ASCII, # Software used
- 'Artist' => Exif::ASCII, # Person who created the image
- 'Copyright' => Exif::ASCII, # Copyright holder
+ 'DateTime' => self::ASCII, # File change date and time
+ 'ImageDescription' => self::ASCII, # Image title
+ 'Make' => self::ASCII, # Image input equipment manufacturer
+ 'Model' => self::ASCII, # Image input equipment model
+ 'Software' => self::ASCII, # Software used
+ 'Artist' => self::ASCII, # Person who created the image
+ 'Copyright' => self::ASCII, # Copyright holder
],
# Exif IFD Attribute Information (p30-31)
'EXIF' => [
# @todo NOTE: Nonexistence of this field is taken to mean nonconformance
# to the Exif 2.1 AND 2.2 standards
- 'ExifVersion' => Exif::UNDEFINED, # Exif version
- 'FlashPixVersion' => Exif::UNDEFINED, # Supported Flashpix version #p32
+ 'ExifVersion' => self::UNDEFINED, # Exif version
+ 'FlashPixVersion' => self::UNDEFINED, # Supported Flashpix version #p32
# Tags relating to Image Data Characteristics
- 'ColorSpace' => Exif::SHORT, # Color space information #p32
+ 'ColorSpace' => self::SHORT, # Color space information #p32
# Tags relating to image configuration
- 'ComponentsConfiguration' => Exif::UNDEFINED, # Meaning of each component #p33
- 'CompressedBitsPerPixel' => Exif::RATIONAL, # Image compression mode
- 'PixelYDimension' => Exif::SHORT_OR_LONG, # Valid image height
- 'PixelXDimension' => Exif::SHORT_OR_LONG, # Valid image width
+ 'ComponentsConfiguration' => self::UNDEFINED, # Meaning of each component #p33
+ 'CompressedBitsPerPixel' => self::RATIONAL, # Image compression mode
+ 'PixelYDimension' => self::SHORT_OR_LONG, # Valid image height
+ 'PixelXDimension' => self::SHORT_OR_LONG, # Valid image width
# Tags relating to related user information
- 'MakerNote' => Exif::IGNORE, # Manufacturer notes
- 'UserComment' => Exif::UNDEFINED, # User comments #p34
+ 'MakerNote' => self::IGNORE, # Manufacturer notes
+ 'UserComment' => self::UNDEFINED, # User comments #p34
# Tags relating to related file information
- 'RelatedSoundFile' => Exif::ASCII, # Related audio file
+ 'RelatedSoundFile' => self::ASCII, # Related audio file
# Tags relating to date and time
- 'DateTimeOriginal' => Exif::ASCII, # Date and time of original data generation #p36
- 'DateTimeDigitized' => Exif::ASCII, # Date and time of original data generation
- 'SubSecTime' => Exif::ASCII, # DateTime subseconds
- 'SubSecTimeOriginal' => Exif::ASCII, # DateTimeOriginal subseconds
- 'SubSecTimeDigitized' => Exif::ASCII, # DateTimeDigitized subseconds
+ 'DateTimeOriginal' => self::ASCII, # Date and time of original data generation #p36
+ 'DateTimeDigitized' => self::ASCII, # Date and time of original data generation
+ 'SubSecTime' => self::ASCII, # DateTime subseconds
+ 'SubSecTimeOriginal' => self::ASCII, # DateTimeOriginal subseconds
+ 'SubSecTimeDigitized' => self::ASCII, # DateTimeDigitized subseconds
# Tags relating to picture-taking conditions (p31)
- 'ExposureTime' => Exif::RATIONAL, # Exposure time
- 'FNumber' => Exif::RATIONAL, # F Number
- 'ExposureProgram' => Exif::SHORT, # Exposure Program #p38
- 'SpectralSensitivity' => Exif::ASCII, # Spectral sensitivity
- 'ISOSpeedRatings' => Exif::SHORT, # ISO speed rating
- 'OECF' => Exif::IGNORE,
+ 'ExposureTime' => self::RATIONAL, # Exposure time
+ 'FNumber' => self::RATIONAL, # F Number
+ 'ExposureProgram' => self::SHORT, # Exposure Program #p38
+ 'SpectralSensitivity' => self::ASCII, # Spectral sensitivity
+ 'ISOSpeedRatings' => self::SHORT, # ISO speed rating
+ 'OECF' => self::IGNORE,
# Optoelectronic conversion factor. Note: We don't have support for this atm.
- 'ShutterSpeedValue' => Exif::SRATIONAL, # Shutter speed
- 'ApertureValue' => Exif::RATIONAL, # Aperture
- 'BrightnessValue' => Exif::SRATIONAL, # Brightness
- 'ExposureBiasValue' => Exif::SRATIONAL, # Exposure bias
- 'MaxApertureValue' => Exif::RATIONAL, # Maximum land aperture
- 'SubjectDistance' => Exif::RATIONAL, # Subject distance
- 'MeteringMode' => Exif::SHORT, # Metering mode #p40
- 'LightSource' => Exif::SHORT, # Light source #p40-41
- 'Flash' => Exif::SHORT, # Flash #p41-42
- 'FocalLength' => Exif::RATIONAL, # Lens focal length
- 'SubjectArea' => [ Exif::SHORT, 4 ], # Subject area
- 'FlashEnergy' => Exif::RATIONAL, # Flash energy
- 'SpatialFrequencyResponse' => Exif::IGNORE, # Spatial frequency response. Not supported atm.
- 'FocalPlaneXResolution' => Exif::RATIONAL, # Focal plane X resolution
- 'FocalPlaneYResolution' => Exif::RATIONAL, # Focal plane Y resolution
- 'FocalPlaneResolutionUnit' => Exif::SHORT, # Focal plane resolution unit #p46
- 'SubjectLocation' => [ Exif::SHORT, 2 ], # Subject location
- 'ExposureIndex' => Exif::RATIONAL, # Exposure index
- 'SensingMethod' => Exif::SHORT, # Sensing method #p46
- 'FileSource' => Exif::UNDEFINED, # File source #p47
- 'SceneType' => Exif::UNDEFINED, # Scene type #p47
- 'CFAPattern' => Exif::IGNORE, # CFA pattern. not supported atm.
- 'CustomRendered' => Exif::SHORT, # Custom image processing #p48
- 'ExposureMode' => Exif::SHORT, # Exposure mode #p48
- 'WhiteBalance' => Exif::SHORT, # White Balance #p49
- 'DigitalZoomRatio' => Exif::RATIONAL, # Digital zoom ration
- 'FocalLengthIn35mmFilm' => Exif::SHORT, # Focal length in 35 mm film
- 'SceneCaptureType' => Exif::SHORT, # Scene capture type #p49
- 'GainControl' => Exif::SHORT, # Scene control #p49-50
- 'Contrast' => Exif::SHORT, # Contrast #p50
- 'Saturation' => Exif::SHORT, # Saturation #p50
- 'Sharpness' => Exif::SHORT, # Sharpness #p50
- 'DeviceSettingDescription' => Exif::IGNORE,
+ 'ShutterSpeedValue' => self::SRATIONAL, # Shutter speed
+ 'ApertureValue' => self::RATIONAL, # Aperture
+ 'BrightnessValue' => self::SRATIONAL, # Brightness
+ 'ExposureBiasValue' => self::SRATIONAL, # Exposure bias
+ 'MaxApertureValue' => self::RATIONAL, # Maximum land aperture
+ 'SubjectDistance' => self::RATIONAL, # Subject distance
+ 'MeteringMode' => self::SHORT, # Metering mode #p40
+ 'LightSource' => self::SHORT, # Light source #p40-41
+ 'Flash' => self::SHORT, # Flash #p41-42
+ 'FocalLength' => self::RATIONAL, # Lens focal length
+ 'SubjectArea' => [ self::SHORT, 4 ], # Subject area
+ 'FlashEnergy' => self::RATIONAL, # Flash energy
+ 'SpatialFrequencyResponse' => self::IGNORE, # Spatial frequency response. Not supported atm.
+ 'FocalPlaneXResolution' => self::RATIONAL, # Focal plane X resolution
+ 'FocalPlaneYResolution' => self::RATIONAL, # Focal plane Y resolution
+ 'FocalPlaneResolutionUnit' => self::SHORT, # Focal plane resolution unit #p46
+ 'SubjectLocation' => [ self::SHORT, 2 ], # Subject location
+ 'ExposureIndex' => self::RATIONAL, # Exposure index
+ 'SensingMethod' => self::SHORT, # Sensing method #p46
+ 'FileSource' => self::UNDEFINED, # File source #p47
+ 'SceneType' => self::UNDEFINED, # Scene type #p47
+ 'CFAPattern' => self::IGNORE, # CFA pattern. not supported atm.
+ 'CustomRendered' => self::SHORT, # Custom image processing #p48
+ 'ExposureMode' => self::SHORT, # Exposure mode #p48
+ 'WhiteBalance' => self::SHORT, # White Balance #p49
+ 'DigitalZoomRatio' => self::RATIONAL, # Digital zoom ration
+ 'FocalLengthIn35mmFilm' => self::SHORT, # Focal length in 35 mm film
+ 'SceneCaptureType' => self::SHORT, # Scene capture type #p49
+ 'GainControl' => self::SHORT, # Scene control #p49-50
+ 'Contrast' => self::SHORT, # Contrast #p50
+ 'Saturation' => self::SHORT, # Saturation #p50
+ 'Sharpness' => self::SHORT, # Sharpness #p50
+ 'DeviceSettingDescription' => self::IGNORE,
# Device settings description. This could maybe be supported. Need to find an
# example file that uses this to see if it has stuff of interest in it.
- 'SubjectDistanceRange' => Exif::SHORT, # Subject distance range #p51
+ 'SubjectDistanceRange' => self::SHORT, # Subject distance range #p51
- 'ImageUniqueID' => Exif::ASCII, # Unique image ID
+ 'ImageUniqueID' => self::ASCII, # Unique image ID
],
# GPS Attribute Information (p52)
'GPS' => [
- 'GPSVersion' => Exif::UNDEFINED,
+ 'GPSVersion' => self::UNDEFINED,
# Should be an array of 4 Exif::BYTE's. However php treats it as an undefined
# Note exif standard calls this GPSVersionID, but php doesn't like the id suffix
- 'GPSLatitudeRef' => Exif::ASCII, # North or South Latitude #p52-53
- 'GPSLatitude' => [ Exif::RATIONAL, 3 ], # Latitude
- 'GPSLongitudeRef' => Exif::ASCII, # East or West Longitude #p53
- 'GPSLongitude' => [ Exif::RATIONAL, 3 ], # Longitude
- 'GPSAltitudeRef' => Exif::UNDEFINED,
+ 'GPSLatitudeRef' => self::ASCII, # North or South Latitude #p52-53
+ 'GPSLatitude' => [ self::RATIONAL, 3 ], # Latitude
+ 'GPSLongitudeRef' => self::ASCII, # East or West Longitude #p53
+ 'GPSLongitude' => [ self::RATIONAL, 3 ], # Longitude
+ 'GPSAltitudeRef' => self::UNDEFINED,
# Altitude reference. Note, the exif standard says this should be an EXIF::Byte,
# but php seems to disagree.
- 'GPSAltitude' => Exif::RATIONAL, # Altitude
- 'GPSTimeStamp' => [ Exif::RATIONAL, 3 ], # GPS time (atomic clock)
- 'GPSSatellites' => Exif::ASCII, # Satellites used for measurement
- 'GPSStatus' => Exif::ASCII, # Receiver status #p54
- 'GPSMeasureMode' => Exif::ASCII, # Measurement mode #p54-55
- 'GPSDOP' => Exif::RATIONAL, # Measurement precision
- 'GPSSpeedRef' => Exif::ASCII, # Speed unit #p55
- 'GPSSpeed' => Exif::RATIONAL, # Speed of GPS receiver
- 'GPSTrackRef' => Exif::ASCII, # Reference for direction of movement #p55
- 'GPSTrack' => Exif::RATIONAL, # Direction of movement
- 'GPSImgDirectionRef' => Exif::ASCII, # Reference for direction of image #p56
- 'GPSImgDirection' => Exif::RATIONAL, # Direction of image
- 'GPSMapDatum' => Exif::ASCII, # Geodetic survey data used
- 'GPSDestLatitudeRef' => Exif::ASCII, # Reference for latitude of destination #p56
- 'GPSDestLatitude' => [ Exif::RATIONAL, 3 ], # Latitude destination
- 'GPSDestLongitudeRef' => Exif::ASCII, # Reference for longitude of destination #p57
- 'GPSDestLongitude' => [ Exif::RATIONAL, 3 ], # Longitude of destination
- 'GPSDestBearingRef' => Exif::ASCII, # Reference for bearing of destination #p57
- 'GPSDestBearing' => Exif::RATIONAL, # Bearing of destination
- 'GPSDestDistanceRef' => Exif::ASCII, # Reference for distance to destination #p57-58
- 'GPSDestDistance' => Exif::RATIONAL, # Distance to destination
- 'GPSProcessingMethod' => Exif::UNDEFINED, # Name of GPS processing method
- 'GPSAreaInformation' => Exif::UNDEFINED, # Name of GPS area
- 'GPSDateStamp' => Exif::ASCII, # GPS date
- 'GPSDifferential' => Exif::SHORT, # GPS differential correction
+ 'GPSAltitude' => self::RATIONAL, # Altitude
+ 'GPSTimeStamp' => [ self::RATIONAL, 3 ], # GPS time (atomic clock)
+ 'GPSSatellites' => self::ASCII, # Satellites used for measurement
+ 'GPSStatus' => self::ASCII, # Receiver status #p54
+ 'GPSMeasureMode' => self::ASCII, # Measurement mode #p54-55
+ 'GPSDOP' => self::RATIONAL, # Measurement precision
+ 'GPSSpeedRef' => self::ASCII, # Speed unit #p55
+ 'GPSSpeed' => self::RATIONAL, # Speed of GPS receiver
+ 'GPSTrackRef' => self::ASCII, # Reference for direction of movement #p55
+ 'GPSTrack' => self::RATIONAL, # Direction of movement
+ 'GPSImgDirectionRef' => self::ASCII, # Reference for direction of image #p56
+ 'GPSImgDirection' => self::RATIONAL, # Direction of image
+ 'GPSMapDatum' => self::ASCII, # Geodetic survey data used
+ 'GPSDestLatitudeRef' => self::ASCII, # Reference for latitude of destination #p56
+ 'GPSDestLatitude' => [ self::RATIONAL, 3 ], # Latitude destination
+ 'GPSDestLongitudeRef' => self::ASCII, # Reference for longitude of destination #p57
+ 'GPSDestLongitude' => [ self::RATIONAL, 3 ], # Longitude of destination
+ 'GPSDestBearingRef' => self::ASCII, # Reference for bearing of destination #p57
+ 'GPSDestBearing' => self::RATIONAL, # Bearing of destination
+ 'GPSDestDistanceRef' => self::ASCII, # Reference for distance to destination #p57-58
+ 'GPSDestDistance' => self::RATIONAL, # Distance to destination
+ 'GPSProcessingMethod' => self::UNDEFINED, # Name of GPS processing method
+ 'GPSAreaInformation' => self::UNDEFINED, # Name of GPS area
+ 'GPSDateStamp' => self::ASCII, # GPS date
+ 'GPSDifferential' => self::SHORT, # GPS differential correction
],
];
}
// Does not work if not typecast
switch ( (string)$etype ) {
- case (string)Exif::BYTE:
+ case (string)self::BYTE:
$this->debug( $val, __FUNCTION__, $debug );
return $this->isByte( $val );
- case (string)Exif::ASCII:
+ case (string)self::ASCII:
$this->debug( $val, __FUNCTION__, $debug );
return $this->isASCII( $val );
- case (string)Exif::SHORT:
+ case (string)self::SHORT:
$this->debug( $val, __FUNCTION__, $debug );
return $this->isShort( $val );
- case (string)Exif::LONG:
+ case (string)self::LONG:
$this->debug( $val, __FUNCTION__, $debug );
return $this->isLong( $val );
- case (string)Exif::RATIONAL:
+ case (string)self::RATIONAL:
$this->debug( $val, __FUNCTION__, $debug );
return $this->isRational( $val );
- case (string)Exif::SHORT_OR_LONG:
+ case (string)self::SHORT_OR_LONG:
$this->debug( $val, __FUNCTION__, $debug );
return $this->isShort( $val ) || $this->isLong( $val );
- case (string)Exif::UNDEFINED:
+ case (string)self::UNDEFINED:
$this->debug( $val, __FUNCTION__, $debug );
return $this->isUndefined( $val );
- case (string)Exif::SLONG:
+ case (string)self::SLONG:
$this->debug( $val, __FUNCTION__, $debug );
return $this->isSlong( $val );
- case (string)Exif::SRATIONAL:
+ case (string)self::SRATIONAL:
$this->debug( $val, __FUNCTION__, $debug );
return $this->isSrational( $val );
- case (string)Exif::IGNORE:
+ case (string)self::IGNORE:
$this->debug( $val, __FUNCTION__, $debug );
return false;
}
// Clear caches
- WikiPage::onArticleDelete( $this->mTitle );
+ self::onArticleDelete( $this->mTitle );
ResourceLoaderWikiModule::invalidateModuleCache(
$this->mTitle, $revision, null, wfWikiID()
);
* @return bool
*/
protected function getDefaultDirections() {
- return IndexPager::DIR_ASCENDING;
+ return self::DIR_ASCENDING;
}
}
* @var string Deprecated accessor for the strip marker prefix.
* @deprecated since 1.26; use Parser::MARKER_PREFIX instead.
*/
- public $mUniqPrefix = Parser::MARKER_PREFIX;
+ public $mUniqPrefix = self::MARKER_PREFIX;
/**
* @var array Array with the language name of each language link (i.e. the
if ( !$frame->depth ) {
$flag = 0;
} else {
- $flag = Parser::PTD_FOR_INCLUSION;
+ $flag = self::PTD_FOR_INCLUSION;
}
$dom = $this->preprocessToDom( $text, $flag );
$text = $frame->expand( $dom );
$text = $this->mText;
if ( $this->mEditSectionTokens ) {
$text = preg_replace_callback(
- ParserOutput::EDITSECTION_REGEX,
+ self::EDITSECTION_REGEX,
function ( $m ) {
global $wgOut, $wgLang;
$editsectionPage = Title::newFromText( htmlspecialchars_decode( $m[1] ) );
$text
);
} else {
- $text = preg_replace( ParserOutput::EDITSECTION_REGEX, '', $text );
+ $text = preg_replace( self::EDITSECTION_REGEX, '', $text );
}
// If you have an old cached version of this class - sorry, you can't disable the TOC
* @return string Filtered data, or a comment containing an error message
*/
public static function filter( $filter, $data, array $options = [] ) {
- if ( strpos( $data, ResourceLoader::FILTER_NOMIN ) !== false ) {
+ if ( strpos( $data, self::FILTER_NOMIN ) !== false ) {
return $data;
}
// mw.loader.implement will use globalEval if scripts is a string.
// Minify manually here, because general response minification is
// not effective due it being a string literal, not a function.
- if ( !ResourceLoader::inDebugMode() ) {
+ if ( !self::inDebugMode() ) {
$scripts = self::filter( 'minify-js', $scripts ); // T107377
}
} else {
} else {
if ( count( $states ) ) {
$this->errors[] = 'Problematic modules: ' .
- FormatJson::encode( $states, ResourceLoader::inDebugMode() );
+ FormatJson::encode( $states, self::inDebugMode() );
}
}
];
self::trimArray( $module );
- return Xml::encodeJsCall( 'mw.loader.implement', $module, ResourceLoader::inDebugMode() );
+ return Xml::encodeJsCall( 'mw.loader.implement', $module, self::inDebugMode() );
}
/**
return Xml::encodeJsCall(
'mw.messages.set',
[ (object)$messages ],
- ResourceLoader::inDebugMode()
+ self::inDebugMode()
);
}
return Xml::encodeJsCall(
'mw.loader.state',
[ $name ],
- ResourceLoader::inDebugMode()
+ self::inDebugMode()
);
} else {
return Xml::encodeJsCall(
'mw.loader.state',
[ $name, $state ],
- ResourceLoader::inDebugMode()
+ self::inDebugMode()
);
}
}
return Xml::encodeJsCall(
"( function ( name, version, dependencies, group, source ) {\n\t$script\n} )",
[ $name, $version, $dependencies, $group, $source ],
- ResourceLoader::inDebugMode()
+ self::inDebugMode()
);
}
return Xml::encodeJsCall(
'mw.loader.register',
[ $name ],
- ResourceLoader::inDebugMode()
+ self::inDebugMode()
);
} else {
$registration = [ $name, $version, $dependencies, $group, $source, $skip ];
return Xml::encodeJsCall(
'mw.loader.register',
$registration,
- ResourceLoader::inDebugMode()
+ self::inDebugMode()
);
}
}
return Xml::encodeJsCall(
'mw.loader.addSource',
[ $id ],
- ResourceLoader::inDebugMode()
+ self::inDebugMode()
);
} else {
return Xml::encodeJsCall(
'mw.loader.addSource',
[ $id, $loadUrl ],
- ResourceLoader::inDebugMode()
+ self::inDebugMode()
);
}
}
return Xml::encodeJsCall(
'mw.config.set',
[ $configuration ],
- ResourceLoader::inDebugMode()
+ self::inDebugMode()
);
}
static function normalizeKey( $key ) {
global $wgDefaultSkin, $wgFallbackSkin;
- $skinNames = Skin::getSkinNames();
+ $skinNames = self::getSkinNames();
// Make keys lowercase for case-insensitive matching.
$skinNames = array_change_key_case( $skinNames, CASE_LOWER );
return true;
} elseif ( $securityStatus === AuthManager::SEC_REAUTH ) {
$request = $this->getRequest();
- $title = SpecialPage::getTitleFor( 'Userlogin' );
+ $title = self::getTitleFor( 'Userlogin' );
$query = [
'returnto' => $this->getFullTitle()->getPrefixedDBkey(),
'returntoquery' => wfArrayToCgi( array_diff_key( $request->getQueryValues(),
if (
$this->allowComments &&
!( $this->inRCDATA || $this->inRAWTEXT ) &&
- preg_match( Balancer::VALID_COMMENT_REGEX, $x, $regs, PREG_OFFSET_CAPTURE ) &&
+ preg_match( self::VALID_COMMENT_REGEX, $x, $regs, PREG_OFFSET_CAPTURE ) &&
// verify EOF condition where necessary
( $regs[4][1] < 0 || !$this->bitsIterator->valid() )
) {
* @return array|false
*/
public static function canonicalizeLoginData( $username, $password ) {
- $sep = BotPassword::getSeparator();
+ $sep = self::getSeparator();
// the strlen check helps minimize the password information obtainable from timing
if ( strlen( $password ) >= 32 && strpos( $username, $sep ) !== false ) {
// the separator is not valid in new usernames but might appear in legacy ones
]
);
- return $id ? User::newFromId( $id ) : null;
+ return $id ? self::newFromId( $id ) : null;
}
/**
global $wgContLang, $wgMaxNameChars;
if ( $name == ''
- || User::isIP( $name )
+ || self::isIP( $name )
|| strpos( $name, '/' ) !== false
|| strlen( $name ) > $wgMaxNameChars
|| $name != $wgContLang->ucfirst( $name )
case false:
break;
case 'valid':
- if ( !User::isValidUserName( $name ) ) {
+ if ( !self::isValidUserName( $name ) ) {
$name = false;
}
break;
case 'usable':
- if ( !User::isUsableName( $name ) ) {
+ if ( !self::isUsableName( $name ) ) {
$name = false;
}
break;
case 'creatable':
- if ( !User::isCreatableName( $name ) ) {
+ if ( !self::isCreatableName( $name ) ) {
$name = false;
}
break;
// since extensions may change the set of searchable namespaces depending
// on user groups/permissions.
foreach ( $wgNamespacesToBeSearchedDefault as $nsnum => $val ) {
- $defOpt['searchNs' . $nsnum] = (boolean)$val;
+ $defOpt['searchNs' . $nsnum] = (bool)$val;
}
$defOpt['skin'] = Skin::normalizeKey( $wgDefaultSkin );
* @return int The user's ID; 0 if the user is anonymous or nonexistent
*/
public function getId() {
- if ( $this->mId === null && $this->mName !== null && User::isIP( $this->mName ) ) {
+ if ( $this->mId === null && $this->mName !== null && self::isIP( $this->mName ) ) {
// Special case, we know the user is anonymous
return 0;
} elseif ( !$this->isItemLoaded( 'id' ) ) {
}
$dbw->insert( 'user', $fields, __METHOD__, [ 'IGNORE' ] );
if ( $dbw->affectedRows() ) {
- $newUser = User::newFromId( $dbw->insertId() );
+ $newUser = self::newFromId( $dbw->insertId() );
} else {
$newUser = null;
}
// Do nothing
} elseif ( $wgGroupsAddToSelf[$group] === true ) {
// No idea WHY this would be used, but it's there
- $groups['add-self'] = User::getAllGroups();
+ $groups['add-self'] = self::getAllGroups();
} elseif ( is_array( $wgGroupsAddToSelf[$group] ) ) {
$groups['add-self'] = $wgGroupsAddToSelf[$group];
}
if ( empty( $wgGroupsRemoveFromSelf[$group] ) ) {
// Do nothing
} elseif ( $wgGroupsRemoveFromSelf[$group] === true ) {
- $groups['remove-self'] = User::getAllGroups();
+ $groups['remove-self'] = self::getAllGroups();
} elseif ( is_array( $wgGroupsRemoveFromSelf[$group] ) ) {
$groups['remove-self'] = $wgGroupsRemoveFromSelf[$group];
}
// compatibility with old "userrights lets you change
// everything")
// Using array_merge to make the groups reindexed
- $all = array_merge( User::getAllGroups() );
+ $all = array_merge( self::getAllGroups() );
return [
'add' => $all,
'remove' => $all,
global $wgLang;
$groups = [];
- foreach ( User::getGroupsWithPermission( $permission ) as $group ) {
+ foreach ( self::getGroupsWithPermission( $permission ) as $group ) {
$groups[] = UserGroupMembership::getLink( $group, RequestContext::getMain(), 'wiki' );
}
* @return Language
*/
protected static function newFromCode( $code, $fallback = false ) {
- if ( !Language::isValidCode( $code ) ) {
+ if ( !self::isValidCode( $code ) ) {
throw new MWException( "Invalid language code \"$code\"" );
}
- if ( !Language::isValidBuiltInCode( $code ) ) {
+ if ( !self::isValidBuiltInCode( $code ) ) {
// It's not possible to customise this code with class files, so
// just return a Language object. This is to support uselang= hacks.
$lang = new Language;
}
// Keep trying the fallback list until we find an existing class
- $fallbacks = Language::getFallbacksFor( $code );
+ $fallbacks = self::getFallbacksFor( $code );
foreach ( $fallbacks as $fallbackCode ) {
- if ( !Language::isValidBuiltInCode( $fallbackCode ) ) {
+ if ( !self::isValidBuiltInCode( $fallbackCode ) ) {
throw new MWException( "Invalid fallback '$fallbackCode' in fallback sequence for '$code'" );
}
global $wgExtraLanguageNames, $wgUsePigLatinVariant;
// If passed an invalid language code to use, fallback to en
- if ( $inLanguage !== null && !Language::isValidCode( $inLanguage ) ) {
+ if ( $inLanguage !== null && !self::isValidCode( $inLanguage ) ) {
$inLanguage = 'en';
}
case 'D':
$usedDay = true;
$s .= $this->getWeekdayAbbreviation(
- Language::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 'w' ) + 1
+ self::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 'w' ) + 1
);
break;
case 'j':
case 'l':
$usedDay = true;
$s .= $this->getWeekdayName(
- Language::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 'w' ) + 1
+ self::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 'w' ) + 1
);
break;
case 'F':
case 'O':
case 'P':
case 'T':
- $s .= Language::dateTimeObjFormat( $dateTimeObj, $ts, $zone, $code );
+ $s .= self::dateTimeObjFormat( $dateTimeObj, $ts, $zone, $code );
break;
case 'w':
case 'N':
case 'z':
$usedDay = true;
- $num = Language::dateTimeObjFormat( $dateTimeObj, $ts, $zone, $code );
+ $num = self::dateTimeObjFormat( $dateTimeObj, $ts, $zone, $code );
break;
case 'W':
$usedWeek = true;
- $num = Language::dateTimeObjFormat( $dateTimeObj, $ts, $zone, $code );
+ $num = self::dateTimeObjFormat( $dateTimeObj, $ts, $zone, $code );
break;
case 't':
$usedMonth = true;
- $num = Language::dateTimeObjFormat( $dateTimeObj, $ts, $zone, $code );
+ $num = self::dateTimeObjFormat( $dateTimeObj, $ts, $zone, $code );
break;
case 'L':
$usedIsLeapYear = true;
- $num = Language::dateTimeObjFormat( $dateTimeObj, $ts, $zone, $code );
+ $num = self::dateTimeObjFormat( $dateTimeObj, $ts, $zone, $code );
break;
case 'o':
$usedISOYear = true;
- $num = Language::dateTimeObjFormat( $dateTimeObj, $ts, $zone, $code );
+ $num = self::dateTimeObjFormat( $dateTimeObj, $ts, $zone, $code );
break;
case 'U':
$usedSecond = true;
// fall through
case 'I':
case 'Z':
- $num = Language::dateTimeObjFormat( $dateTimeObj, $ts, $zone, $code );
+ $num = self::dateTimeObjFormat( $dateTimeObj, $ts, $zone, $code );
break;
case '\\':
# Backslash escaping
$s .= $num;
$raw = false;
} elseif ( $roman ) {
- $s .= Language::romanNumeral( $num );
+ $s .= self::romanNumeral( $num );
$roman = false;
} elseif ( $hebrewNum ) {
$s .= self::hebrewNumeral( $num );
substr( $ts, 10, 2 ) * 60 - substr( $ts, 12, 2 );
if ( $usedWeek ) {
$possibleTtls[] =
- ( 7 - Language::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 'N' ) ) * 86400 +
+ ( 7 - self::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 'N' ) ) * 86400 +
$timeRemainingInDay;
} elseif ( $usedISOYear ) {
// December 28th falls on the last ISO week of the year, every year.
substr( $ts, 0, 4 ) . '1228',
$zone ?: new DateTimeZone( 'UTC' )
)->format( 'W' );
- $currentISOWeek = Language::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 'W' );
+ $currentISOWeek = self::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 'W' );
$weeksRemaining = $lastWeekOfISOYear - $currentISOWeek;
$timeRemainingInWeek =
- ( 7 - Language::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 'N' ) ) * 86400
+ ( 7 - self::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 'N' ) ) * 86400
+ $timeRemainingInDay;
$possibleTtls[] = $weeksRemaining * 604800 + $timeRemainingInWeek;
}
if ( $usedMonth ) {
$possibleTtls[] =
- ( Language::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 't' ) -
+ ( self::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 't' ) -
substr( $ts, 6, 2 ) ) * 86400
+ $timeRemainingInDay;
} elseif ( $usedYear ) {
$possibleTtls[] =
- ( Language::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 'L' ) + 364 -
- Language::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 'z' ) ) * 86400
+ ( self::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 'L' ) + 364 -
+ self::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 'z' ) ) * 86400
+ $timeRemainingInDay;
} elseif ( $usedIsLeapYear ) {
$year = substr( $ts, 0, 4 );
$timeRemainingInYear =
- ( Language::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 'L' ) + 364 -
- Language::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 'z' ) ) * 86400
+ ( self::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 'L' ) + 364 -
+ self::dateTimeObjFormat( $dateTimeObj, $ts, $zone, 'z' ) ) * 86400
+ $timeRemainingInDay;
$mod = $year % 4;
if ( $mod || ( !( $year % 100 ) && $year % 400 ) ) {
* @return string Text, wrapped in LRE...PDF or RLE...PDF or nothing
*/
public function embedBidi( $text = '' ) {
- $dir = Language::strongDirFromContent( $text );
+ $dir = self::strongDirFromContent( $text );
if ( $dir === 'ltr' ) {
// Wrap in LEFT-TO-RIGHT EMBEDDING ... POP DIRECTIONAL FORMATTING
return self::$lre . $text . self::$pdf;
$this->mParentLanguage = null;
return null;
}
- $lang = Language::factory( $code );
+ $lang = self::factory( $code );
if ( !$lang->hasVariant( $this->getCode() ) ) {
$this->mParentLanguage = null;
return null;
* @return array Non-empty array, ending in "en"
*/
public static function getFallbacksFor( $code ) {
- if ( $code === 'en' || !Language::isValidBuiltInCode( $code ) ) {
+ if ( $code === 'en' || !self::isValidBuiltInCode( $code ) ) {
return [];
}
// For unknown languages, fallbackSequence returns an empty array,
*/
public function getCompiledPluralRules() {
$pluralRules = self::$dataCache->getItem( strtolower( $this->mCode ), 'compiledPluralRules' );
- $fallbacks = Language::getFallbacksFor( $this->mCode );
+ $fallbacks = self::getFallbacksFor( $this->mCode );
if ( !$pluralRules ) {
foreach ( $fallbacks as $fallbackCode ) {
$pluralRules = self::$dataCache->getItem( strtolower( $fallbackCode ), 'compiledPluralRules' );
*/
public function getPluralRules() {
$pluralRules = self::$dataCache->getItem( strtolower( $this->mCode ), 'pluralRules' );
- $fallbacks = Language::getFallbacksFor( $this->mCode );
+ $fallbacks = self::getFallbacksFor( $this->mCode );
if ( !$pluralRules ) {
foreach ( $fallbacks as $fallbackCode ) {
$pluralRules = self::$dataCache->getItem( strtolower( $fallbackCode ), 'pluralRules' );
*/
public function getPluralRuleTypes() {
$pluralRuleTypes = self::$dataCache->getItem( strtolower( $this->mCode ), 'pluralRuleTypes' );
- $fallbacks = Language::getFallbacksFor( $this->mCode );
+ $fallbacks = self::getFallbacksFor( $this->mCode );
if ( !$pluralRuleTypes ) {
foreach ( $fallbacks as $fallbackCode ) {
$pluralRuleTypes = self::$dataCache->getItem( strtolower( $fallbackCode ), 'pluralRuleTypes' );
"Liashko",
"Mechanizatar",
"Artsiom91",
- "Andrus"
+ "Andrus",
+ "Da voli"
]
},
"tog-underline": "Падкрэсліваць спасылкі:",
"rcfilters-filter-unpatrolled-label": "Недагледжаны",
"rcfilters-filtergroup-lastRevision": "Цяперашняя версія",
"rcfilters-filter-lastrevision-label": "Актуальная версія",
+ "rcfilters-exclude-button-on": "За выключэннем выбранага",
"rcnotefrom": "Ніжэй {{PLURAL:$5|паказана змяненне|паказаны змены}} з <strong>$3, $4</strong> (не больш за <strong>$1</strong>).",
"rclistfrom": "Паказаць змены з $3 $2",
"rcshowhideminor": "$1 дробныя праўкі",
"recentchanges-submit": "Prikaži",
"rcfilters-activefilters": "Aktivni filteri",
"rcfilters-advancedfilters": "Napredni filteri",
- "rcfilters-quickfilters": "Sačuvane postavke filtera",
+ "rcfilters-quickfilters": "Sačuvani filteri",
"rcfilters-quickfilters-placeholder-title": "Zasad nema sačuvanih linkova",
"rcfilters-quickfilters-placeholder-description": "Da sačuvate postavke filtera da biste ih kasnije ponovo upotrijebili, kliknite na ikonu markera pod \"Aktivni filterima\" ispod.",
"rcfilters-savedqueries-defaultlabel": "Sačuvani filteri",
"headline_sample": "Tekst nadgłówka",
"headline_tip": "Nadgłówk 2 lédżi",
"nowiki_sample": "Wstawi tuwò niesfòrmatowóny tekst",
- "nowiki_tip": "Ignorëjë wiki-fòrmatowanié",
+ "nowiki_tip": "Jignorëjë wiki-fòrmatowanié",
"image_sample": "Przëmiôr.jpg",
"image_tip": "Òbsôdzony lopk (n.p. òbrôzk)",
"media_sample": "Przëmiôr.ogg",
"template-protected": "(zazychrowónô)",
"template-semiprotected": "(dzélowò zazychrowóné)",
"hiddencategories": "Na starna przënôleżi do w {{PLURAL:$1|1 zatacony kategòrëji|$1 zataconych kategòrëjów}}:",
- "permissionserrors": "Fela przistspù",
+ "permissionserrors": "Fela przistãpù",
"permissionserrorstext-withaction": "Ni môsz przëstãpù do $2, z {{PLURAL:$1|nôslédny przëczënë|nôslédnych przëczënów}}:",
"recreate-moveddeleted-warn": "<strong>Bôczënk! Chcesz usadzëc starnã, chtërna wczasni òsta rëmniãtô.</strong>\n\nÙgwësni sã, czë pònowné ùsôdzenié ti starnë je kònieczné. \nNiżi je widzec register rëmaniów i zmian pòzwë ti starnë:",
"moveddeleted-notice": "Na starna òsta rëmniãtô.\nSpisënk rëmaniô ë zjinaków miona ti starnë je niżi.",
"sp-contributions-deleted": "rëmniãtô robòta {{GENDER:$1|brëkòwnika|brëkòwniczczi}}",
"sp-contributions-uploads": "Wësłóné lopczi",
"sp-contributions-logs": "Rejestr logòwaniô",
- "sp-contributions-talk": "diskùsjô",
+ "sp-contributions-talk": "diskùsëjô",
"sp-contributions-blocked-notice-anon": "Ta adresa IP je w tim sztërkù zablokòwónô.\nSlédny wpisënk z registru blokòwaniów je widzec niżi:",
"sp-contributions-search": "Szëkba za edicëjama",
"sp-contributions-username": "Adresa IP abò miono brëkòwnika:",
"allmessagesnotsupportedDB": "'''{{ns:special}}:Allmessages''' nie mòże bëc brëkòwónô, temù że '''$wgUseDatabaseMessages''' je wëłączony.",
"thumbnail-more": "Zwikszi",
"import": "Impòrtëjë starnë",
- "importlogpage": "Log impòrtu",
+ "importlogpage": "Log jimpòrtu",
"tooltip-pt-userpage": "{{GENDER:|Twòja}} starna brëkòwnika",
"tooltip-pt-mytalk": "{{GENDER:|Mòjô}} starna diskùsëji",
"tooltip-pt-anontalk": "Diskùsjô brëkòwnika dlô ti adresë IP",
"pageinfo-robot-policy": "Jindeksowanié przez robòtë",
"pageinfo-robot-index": "Zezwòloné",
"pageinfo-robot-noindex": "Niedozwóloné",
- "pageinfo-watchers": "Wielëna ùżérających",
+ "pageinfo-watchers": "Wielëna ùzérających",
"pageinfo-few-watchers": "Mni jak $1 {{PLURAL:$1|ùzyrający|ùzyrających}}",
"pageinfo-redirects-name": "Wielëna przeczérowaniów do ti starnë",
"pageinfo-subpages-name": "Wielëna pòdstarnów ti starnë",
"signature": "[[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|diskùsëjô]])",
"version": "Wersëjô",
"redirect": "Przeczérëjë z jidentyfikatora lopka, brëkòwnika, starnë, wersëji abò wpisënka loga",
- "redirect-summary": "Na szpecjalnô starna przczerowùje do: lopka(ò pòdónym mionie), do sstarny (ò pòdónym numrze wersëji abò jidentyfikatorze starë), do starnë brëkòwnika (ò pòdónym numerowim jidentyfikatorze) abò do rejestru (ò pòdónym numrze akcëji). Òrt ùżëcô: [[{{#Special:Redirect}}/file/Example.jpg]], [[{{#Special:Redirect}}/revision/328429]], [[{{#Special:Redirect}}/user/101]] abò [[{{#Special:Redirect}}/logid/186]].",
+ "redirect-summary": "Na specjalnô starna przczerowùje do: lopka(ò pòdónym mionie), do starny (ò pòdónym numrze wersëji abò jidentyfikatorze starë), do starnë brëkòwnika (ò pòdónym numerowim jidentyfikatorze) abò do rejestru (ò pòdónym numrze akcëji). Òrt ùżëcô: [[{{#Special:Redirect}}/file/Example.jpg]], [[{{#Special:Redirect}}/revision/328429]], [[{{#Special:Redirect}}/user/101]] abò [[{{#Special:Redirect}}/logid/186]].",
"redirect-submit": "Biéj",
"redirect-lookup": "Szëkôj:",
"redirect-value": "Wôrtnota:",
"Jhertel",
"IBDJ",
"SimmeD",
- "BoBrandt"
+ "BoBrandt",
+ "R12ntech"
]
},
"tog-underline": "Understreg henvisninger:",
"rcfilters-highlightmenu-help": "Vælg en farve for at fremhæve denne egenskab",
"rcfilters-filterlist-noresults": "Ingen filtre fundet",
"rcfilters-noresults-conflict": "Ingen resultater fundet fordi søgekriterierne er i konflikt",
- "rcfilters-filtergroup-registration": "Brugerregistrering",
- "rcfilters-filter-registered-label": "Registrerede",
- "rcfilters-filter-registered-description": "Indloggede brugere",
- "rcfilters-filter-unregistered-label": "Uregistrerede",
- "rcfilters-filter-unregistered-description": "Redaktører, der ikke er logget ind.",
"rcfilters-filtergroup-authorship": "Bidragets forfatter",
"rcfilters-filter-editsbyself-label": "Ændringer af dig",
"rcfilters-filter-editsbyself-description": "Dine egne bidrag.",
"rcfilters-filter-editsbyother-label": "Ændringer af andre",
"rcfilters-filter-editsbyother-description": "Alle ændringer undtagen din egen.",
"rcfilters-filtergroup-userExpLevel": "Erfaringsniveau (kun for registrerede brugere)",
- "rcfilters-filtergroup-user-experience-level-conflicts-unregistered": "Erfaringsfiltre finder kun registrerede brugere, så dette filter er i konflikt med filtret \"Uregistrerede\".",
+ "rcfilters-filter-user-experience-level-registered-label": "Registrerede",
+ "rcfilters-filter-user-experience-level-registered-description": "Indloggede brugere",
+ "rcfilters-filter-user-experience-level-unregistered-label": "Uregistrerede",
+ "rcfilters-filter-user-experience-level-unregistered-description": "Redaktører, der ikke er logget ind.",
"rcfilters-filter-user-experience-level-newcomer-label": "Nybegyndere",
"rcfilters-filter-user-experience-level-newcomer-description": "Færre end 10 redigeringer og 4 dages aktivitet",
"rcfilters-filter-user-experience-level-learner-label": "Let øvede",
"version-libraries-license": "Licens",
"version-libraries-description": "Beskrivelse",
"version-libraries-authors": "Forfattere",
- "redirect": "Omdirigering pga. fil, bruger-, side- eller udgave-ID",
- "redirect-summary": "Denne specialside omdirigerer til en fil (hvis filnavnet er angivet), en side (hvis udgave ID'et eller side ID'et er angivet) eller en brugerside (hvis et numerisk brugernummer er angivet). Eksempler på brug: [[{{#Special:Redirect}}/file/Example.jpg]], [[{{#Special:Redirect}}/page/64308]],[[{{#Special:Redirect}}/revision/328429]] eller [[{{#Special:Redirect}}/user/101]].",
+ "redirect": "Omdiriger via filnavn, bruge-, side-, revision- eller log-ID.",
+ "redirect-summary": "Denne spesialsiden omdirigerer til en fil (hvis et filnavn angis), en lave (om revisions- eller side-ID angis), en brugerside (om bruge-ID angis), eller en loggoppføring (om log-ID angis). Bruk: [[{{#Special:Redirect}}/file/Eksempel.jpg]], [[{{#Special:Redirect}}/page/#64308]], [[{{#Special:Redirect}}/revision/#328429]], [[{{#Special:Redirect}}/user/#101]] eller [[{{#Special:Redirect}}/logid/#186]].",
"redirect-submit": "Vis",
"redirect-lookup": "Slå op:",
"redirect-value": "Værdi:",
"htmlform-title-not-exists": "$1 findes ikke.",
"logentry-delete-delete": "$1 {{GENDER:$2|slettede}} siden $3",
"logentry-delete-delete_redir": "$1 {{GENDER:$2|slettede}} omdirigering $3 ved overskrivning",
- "logentry-delete-restore": "$1 {{GENDER:$2|gendannede}} siden $3",
+ "logentry-delete-restore": "$1 {{GENDER:$2|gendannede}} siden $3 ($4)",
"logentry-delete-event": "$1 {{GENDER:$2|ændrede}} synligheden af {{PLURAL:$5|en loghændelse|$5 loghændelser}} for siden $3: $4",
"logentry-delete-revision": "$1 {{GENDER:$2|ændrede}} synligheden af {{PLURAL:$5|en version|$5 versioner}} af siden $3: $4",
"logentry-delete-event-legacy": "$1 {{GENDER:$2|ændrede}} synligheden af loghændelser for siden $3",
"watchlist": "Abërtït",
"mywatchlist": "Abërtït",
"watch": "Ɣoi",
+ "watchthispage": "Watch this page",
"watchlist-hide": "Thaan",
"watchlist-submit": "Nyooth",
"historyaction-submit": "Nyooth",
"rcfilters-legend-heading": "<strong>Lista de abreviaturas:</strong>",
"rcfilters-activefilters": "Filtros activos",
"rcfilters-advancedfilters": "Filtros avanzados",
+ "rcfilters-limit-title": "Cambios para mostrar",
+ "rcfilters-limit-shownum": "Mostrar los últimos $1 cambios",
+ "rcfilters-days-title": "Días recientes",
+ "rcfilters-hours-title": "Horas recientes",
+ "rcfilters-days-show-days": "$1 {{PLURAL:$1|día|días}}",
+ "rcfilters-days-show-hours": "$1 {{PLURAL:$1|hora|horas}}",
"rcfilters-quickfilters": "Filtros guardados",
"rcfilters-quickfilters-placeholder-title": "Ningún enlace guardado aún",
"rcfilters-quickfilters-placeholder-description": "Para guardar tus ajustes de filtro y reutilizarlos más tarde, pulsa en el icono del marcador en el área de Filtro activo que se encuentra a continuación.",
"rcfilters-invalid-filter": "Filtro no válido",
"rcfilters-empty-filter": "No hay filtros activos. Se muestran todas las contribuciones.",
"rcfilters-filterlist-title": "Filtros",
- "rcfilters-filterlist-whatsthis": "¿Qué es esto?",
+ "rcfilters-filterlist-whatsthis": "¿Cómo funcionan?",
"rcfilters-filterlist-feedbacklink": "Comparte tus comentarios sobre los filtros (beta) nuevos",
"rcfilters-highlightbutton-title": "Resaltar los resultados",
"rcfilters-highlightmenu-title": "Selecciona un color",
"rcfilters-hideminor-conflicts-typeofchange-global": "El filtro \"Ediciones menores\" está en conflicto con uno o más Tipos de filtros de Cambio, ya que ciertos tipos de cambio no pueden ser designados como \"menores\". Los filtros en conflicto están marcados en el área Filtros activos, anterior.",
"rcfilters-hideminor-conflicts-typeofchange": "Ciertos tipos de cambio no pueden ser designados como \"menores\", por lo que este filtro entra en conflicto con los siguientes Tipos de filtros de Cambio: $1",
"rcfilters-typeofchange-conflicts-hideminor": "Este filtro «Tipo de cambio» entra en conflicto con el filtro «Ediciones menores». Hay ciertos tipos de cambios que no pueden denominarse «menores».",
- "rcfilters-filtergroup-lastRevision": "Revisión actual",
- "rcfilters-filter-lastrevision-label": "Revisión actual",
- "rcfilters-filter-lastrevision-description": "El cambio más reciente a una página.",
- "rcfilters-filter-previousrevision-label": "Revisiones anteriores",
- "rcfilters-filter-previousrevision-description": "Todos los cambios que no son los más recientes cambian a una página.",
+ "rcfilters-filtergroup-lastRevision": "Últimas revisiones",
+ "rcfilters-filter-lastrevision-label": "Última revisión",
+ "rcfilters-filter-lastrevision-description": "Solo el cambio más reciente a una página.",
+ "rcfilters-filter-previousrevision-label": "No la última revisión",
+ "rcfilters-filter-previousrevision-description": "Todos los cambios que no son la \"última revisión\".",
"rcfilters-filter-excluded": "Excluido",
"rcfilters-tag-prefix-namespace-inverted": "<strong>Estado:</strong> $1",
+ "rcfilters-exclude-button-off": "Excluir los seleccionados",
+ "rcfilters-exclude-button-on": "Excluyendo los seleccionados",
"rcfilters-view-tags": "Ediciones etiquetadas",
"rcfilters-view-namespaces-tooltip": "Filtrar resultados por espacio de nombres",
"rcfilters-view-tags-tooltip": "filtrado de resultados usando etiquetas de edición",
"rcfilters-filtergroup-lastRevision": "Dernières révisions",
"rcfilters-filter-lastrevision-label": "Dernière révision",
"rcfilters-filter-lastrevision-description": "Uniquement la dernière modification apportée à une page.",
- "rcfilters-filter-previousrevision-label": "Pas la dernière révision",
- "rcfilters-filter-previousrevision-description": "Toutes les modifications apportées à une page et qui ne sont pas la « dernière révision ».",
+ "rcfilters-filter-previousrevision-label": "Pas la dernière version",
+ "rcfilters-filter-previousrevision-description": "Toutes les modifications apportées à une page et qui ne concernent pas la « dernière version ».",
"rcfilters-filter-excluded": "Exclu",
"rcfilters-tag-prefix-namespace-inverted": "<strong>:not</strong> $1",
"rcfilters-exclude-button-off": "Exclure les sélectionnés",
"newarticletext": "Yi'o lodudu'a wumbuta ode halaman diya'a. \nWonu mohutu halaman botiye, ketik tuwango halaman to kotak to tibawa botiye (bilohi [$1 halaman wubodu] ode habari wumbutiyo). \nWonu Yi'o ja sangaja tilumuwota ode halaman botiye, kutiya tombol <strong>mohuwalingo</strong>.",
"noarticletext": "Sa'ati botiye diya'a teks to halaman botiye.\nYi'o mowali [[Special:Search/{{PAGENAME}}|mololohu judul halaman botiye]] to halaman-halaman uweewo, <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} mololohu log a'ayita], meyalo [{{fullurl:{{FULLPAGENAME}}|action=edit}} mohutu halaman botiye]</span>.",
"noarticletext-nopermission": "!Sa'ati botiye diya'a teks to halaman boptiye.\nYi'o mowali [[Special:Search/{{PAGENAME}}|mololohu judul halaman botiye]] to halaman-halaman uweewo, meyalo <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} mololohu log a'ayita]</span>, dabo Yi'o ja o ijin mohutu halaman botiye.",
+ "userpage-userdoesnotexist-view": "Ta ohu'uwo \"$1\" diyaalu to daputari.",
"editing": "Momoli'o $1",
"creating": "Mohutu $1",
"editingsection": "Momoli'o $1 (tayadu)",
"moveddeleted-notice": "Halaman botiye ma yiluluto.\nSebagai referensi, botiya log piloluluta wawu piloheyiya halaman botiye.",
"postedit-confirmation-saved": "Biloli'umu ma tilahu.",
"edit-already-exists": "Ja mowali mohutu halaman bohu. Ma woluwo.",
+ "content-model-wikitext": "tuladu wiki",
"viewpagelogs": "Bilohi log lo halaman botiye",
"currentrev-asof": "Biloli'o pulitiyo to $1",
"revisionasof": "Biloli'o to $1",
"history-fieldset-title": "Lolohe u biloli'o",
"histfirst": "mohihewo da'a",
"histlast": "bohu da'a",
+ "history-feed-title": "Riwayati lo'u biloli'o",
+ "history-feed-description": "Riwayati bilolio to halaman wiki botiye",
+ "history-feed-item-nocomment": "$1 to $2",
"rev-delundel": "popobilohe/wanto'a",
"history-title": "Riwayati lo'u loboli'a lonto \"$1\"",
"difference-title": "$1 hihede revisi",
"lineno": "Baarisi $1:",
+ "compareselectedversions": "Popotadenga u tilulawoto",
"editundo": "pohuwalinga",
"diff-multi-sameuser": "({{PLURAL:$1|$1 revisi wolota}} pilohutu lo tawu ngota ja pilopobilohu)",
"searchresults": "U yilotapu",
"search-result-size": "$1 ({{PLURAL:$2|1 tahe|$2 tahe}})",
"search-redirect": "(pilobale lonto $1)",
"search-section": "(tayadu) $1",
+ "search-file-match": "(sama lo tuwango berkas)",
"search-suggest": "Patujumu yito:$1",
"searchall": "nga'amila",
"search-showingresults": "{{PLURAL:$4|hASIL <strong>$1</strong> of <strong>$3</strong>|Hasil <strong>$1 - $2</strong> lonto <strong>$3</strong>}}",
"search-nonefound": "Diya'a hasili mohumayawa lo kriteria",
"powersearch-toggleall": "Nga'amila",
"powersearch-togglenone": "Diya'a",
- "powersearch-remember": "Eelayi u tilulawoto wonu mololohe pe'eentamayi",
+ "powersearch-remember": "Toloma u tilulawoto wonu mololohe pe'eenta mayi",
"mypreferences": "Preperensi",
"prefs-skin": "Alipo",
"searchresultshead": "Lolohe",
"prefs-searchoptions": "Lolohe",
"prefs-namespaces": "Huwali lo tanggulo",
- "default": "Kakali",
+ "default": "kakali",
"yourrealname": "Tanggula banari",
"yourlanguage": "Bahasa",
"grouppage-bot": "{{ns:project}}:Bot",
"recentchangeslinked-page": "Tanggulo halaman:",
"recentchangeslinked-to": "Poppobilohe loboli'a to halaman wayitiyo wolo halaman hepoposadiyalo",
"upload": "Detohe berkas",
+ "uploadlogpage": "Detohu log",
"filedesc": "Limbu'o",
+ "license": "Lisensi",
"license-header": "Tayadu lisensi",
"imgfile": "berkas",
"file-anchor-link": "Berkas",
"nmembers": "$1 {{PLURAL:$1|tuwango}}",
"listusers": "Daputari ta ohu'uwo",
"newpages": "Halaman bohu",
+ "move": "Heyiya",
"pager-newer-n": "{{PLURAL:$1|bohu da'a|$1bohu da'a}}",
"pager-older-n": "{{PLURAL:$1|$1 mohihewo}}",
"booksources": "Bungo buku",
"booksources-search-legend": "Lolohe to bungo lo buku",
"booksources-search": "Lolohe",
"log": "Log",
+ "all-logs-page": "Nga'amila log publik",
+ "allpages": "Nga'amila halaman",
"allarticles": "Nga'amila halaman",
"allpagessubmit": "Ntali",
"categories": "Kategori",
+ "usermessage-editor": "Sistem lo tahuli",
+ "watchlist": "U he'awasiyalo",
"mywatchlist": "Daputari he'awasiyalo",
"watch": "Dahayi",
+ "unwatch": "Batali mongawasi",
"wlshowlast": "Popobilohe $1 jam $2 dulahe pulitiyo",
"dellogpage": "Log loluluto",
"rollbacklink": "wuwalinga",
"protectlogpage": "Log mopo'aamani",
"protectedarticle": "modaha \"[[$1]]\"",
"protect-default": "Poluliya nga'amila ta ohu'uwo",
+ "restriction-edit": "Boli'a",
+ "restriction-move": "Heyiya",
"namespace": "Huwali lo tanggulo",
"invert": "Pohuwalinga tilulawoto",
"tooltip-invert": "Centang kotak botiye u mopowanto'o halaman yiloboli'a to delomo huwali lo tanggulo tilulawoto (wawu huwali lo tanggulo a'ayita wanu dicentang)",
"contributions": "Kontribusi {{GENDER:$1|Ta ohu'uwo}}",
"mycontris": "Kontribusi",
"anoncontribs": "Kontribusi",
+ "contribsub2": "Ode {{GENDER:$3|$1}} ($2)",
"uctop": "(masatiya)",
"month": "Lonto hulalo (wawu to'udiipo)",
"year": "Lonto taawunu (wawu to'udiipo)",
+ "sp-contributions-newbies": "Popobilohe bo lonto ta ohu'uwo bohu",
+ "sp-contributions-blocklog": "bubuli log",
+ "sp-contributions-uploads": "u diletohu",
"sp-contributions-logs": "log",
"sp-contributions-talk": "lo'iya",
"sp-contributions-search": "Lolohe kontribusi",
+ "sp-contributions-username": "Alamat IP meyalo tanggulo ta ohu'uwo",
+ "sp-contributions-toponly": "Popobiloho bo biloli'a to yitaato",
+ "sp-contributions-newonly": "Popobilohe biloli'o bo u lohutu halaman",
"sp-contributions-submit": "Lolohe",
"whatlinkshere": "Wumbuta",
"whatlinkshere-title": "Halaman botiye o wumbuta ode \"$1\"",
"whatlinkshere-hidelinks": "$1 wumbuta",
"whatlinkshere-hideimages": "$1 berkas wumbuta",
"whatlinkshere-filters": "U'ayahu",
+ "ipboptions": "2 jam:2 hours,1 huyi:1 day,3 huyi:3 days,1 diminggu:1 week,2 diminggu:2 weeks,1 hula:1 month,3 hula:3 months,6 hula:6 months,1 taawunu:1 year,layito:infinite",
"blocklink": "tangguwalo",
"contribslink": "kontrib",
+ "blocklogpage": "Bubuli log",
+ "blocklogentry": "momubulo [[$1]] wolo pulito wakutu $2 $3",
+ "proxyblocker": "Bubulo proxi",
"movelogpage": "Log piloheyiya",
"export": "Ekspor halaman",
"thumbnail-more": "Po'odamanga",
"tooltip-ca-nstab-special": "Utiye halaman istimewa, wawu ja mowali boli'olo",
"tooltip-ca-nstab-project": "Bilohi halaman poroyek",
"tooltip-ca-nstab-image": "Bilohi berkas lo halaman",
+ "tooltip-ca-nstab-mediawiki": "Bilohi tahuli lo sistem",
"tooltip-ca-nstab-template": "Bilohi template",
"tooltip-ca-nstab-category": "Bilohi kategori halaman",
"tooltip-save": "Tahuwa u biloli'umu",
"tooltip-preview": "Bilohipo u biloli'umu. Popopasiya utiye to'u diipo molahu.",
"tooltip-diff": "Bilohi u loboli'o pilohutumu",
"tooltip-compareselectedversions": "Bilohi hihede lohalaman duluwo u tilulawoto.",
+ "tooltip-watch": "Poduhengama'o halaman botiye to daputari he'awasiyalo",
"tooltip-rollback": "\"Wuwalingo\" lopobatali u pilo'opiyohu to halaman botiye ode kontributor pulitiyo pe'enta lo klik.",
"tooltip-undo": "\"wuwalingo\" lopobatali u biloli'a botiye wawu lomu'o kotak momoli'o wolo mode pratayang. Alasani mowali duhengalo to kotak limbu-limbu'o.",
"tooltip-summary": "Tuwota tulade limbu-limbu'o",
"simpleantispam-label": "Momarakisa anti-spam.\n<strong>kekeya</strong> tuwangalo!",
+ "pageinfo-title": "Informasi untuk \"$1\"",
+ "pageinfo-header-basic": "Bungo lo habari",
+ "pageinfo-header-restrictions": "Dudaha halaman",
+ "pageinfo-display-title": "Judul bibilohu",
+ "pageinfo-length": "Haya'o halaman (to delomo bita)",
+ "pageinfo-article-id": "ID Halaman",
+ "pageinfo-language": "Bahasa tuwango halaman",
+ "pageinfo-robot-policy": "Pengindeksan monto robot",
+ "pageinfo-watchers": "Jumula lo ta hemongawasi halaman",
+ "pageinfo-redirects-name": "Jumula u pilobale ode halaman botiya",
+ "pageinfo-firsttime": "Tanggal pilohutuwa halaman",
+ "pageinfo-recent-edits": "Jumula boheli biloli'a mola (to delomo $1 pulitiyo)",
"pageinfo-toolboxlink": "Halaman habari",
+ "pageinfo-contentpage-yes": "Jo",
"previousdiff": "← Biloli'o to'udiipo",
"nextdiff": "Biloli'o lapatiyoma'o →",
"file-info-size": "$1 x $2 piksel, tu'udu berkas:$3, MIME tipe: $4",
"tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Tag}}]]: $2)",
"tags-active-yes": "Jo",
"logentry-delete-delete": "$1 {{GENDER:$2|moluluto}}halaman $3",
+ "revdelete-content-hid": "tuwango yilanto'o",
"logentry-move-move": "$1 {{GENDER:$2|moheyi}} halaman $3 ode $4",
+ "logentry-move-move-noredirect": "$1 {{GENDER:$2|loheyi}} halaman $3 ode $4 ja lohutu pengalihan",
+ "logentry-move-move_redir": "$1 {{GENDER:$2|loheyi}} halaman $3 ode $4 lodeehu pengalihan",
"logentry-newusers-create": "Ta ohu'uwo akun $1 {{GENDER:$2|mohutu}}",
+ "logentry-newusers-autocreate": "Akun $1 {{GENDER:$2|pilohutu}} otomatis",
"logentry-upload-upload": "$1 {{GENDER:$2|mengunggah}} $3",
- "searchsuggest-search": "Lolohe {{SITENAME}}"
+ "searchsuggest-search": "Lolohe {{SITENAME}}",
+ "duration-days": "$1 {{PLURAL:$1|huyi}}",
+ "randomrootpage": "Halaman totonulalo"
}
"recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} ([[Special:NewPages|नए पन्नों की सूची]] को भी देखें)",
"recentchanges-submit": "दिखाएँ",
"rcfilters-activefilters": "सक्रिय फिल्टर",
+ "rcfilters-limit-shownum": "पिछले $1 बदलाव दिखायें",
+ "rcfilters-days-title": "कुछ दिनों के",
+ "rcfilters-hours-title": "कुछ घंटों के",
+ "rcfilters-days-show-days": "$1 {{PLURAL:$1|दिन}}",
+ "rcfilters-days-show-hours": "$1 {{PLURAL:$1|घंटा|घंटे}}",
"rcfilters-quickfilters": "सुरक्षित फ़िल्टर",
"rcfilters-quickfilters-placeholder-title": "कोई कड़ी अभी तक सहेजा नहीं गया",
"rcfilters-quickfilters-placeholder-description": "अपने फ़िल्टर सेटिंग को सहेजने और बाद में उपयोग करने के लिए नीचे दिये बूकमार्क छवि पर क्लिक करें।",
"rcfilters-savedqueries-unsetdefault": "मूल के रूप से हटाएँ",
"rcfilters-savedqueries-remove": "निकालें",
"rcfilters-savedqueries-new-name-label": "नाम",
- "rcfilters-savedqueries-apply-label": "सेटिंग संजोयें",
+ "rcfilters-savedqueries-new-name-placeholder": "फ़िल्टर का उद्देश्य समझाएँ",
+ "rcfilters-savedqueries-apply-label": "फ़िल्टर बनायें",
"rcfilters-savedqueries-cancel-label": "रद्द करें",
"rcfilters-savedqueries-add-new-title": "वर्तमान फ़िल्टर सेटिंग को सहेजें",
"rcfilters-restore-default-filters": "मूलभूत फिल्टर पुनर्स्थापित करे",
"rcfilters-invalid-filter": "अमान्य फ़िल्टर",
"rcfilters-empty-filter": "कोई सक्रिय फिल्टर नहीं। सभी योगदान दिखाए गए है।",
"rcfilters-filterlist-title": "फिल्टर",
- "rcfilters-filterlist-whatsthis": "यह à¤\95à¥\8dया है?",
+ "rcfilters-filterlist-whatsthis": "यह à¤\95à¥\88सà¥\87 à¤\95ारà¥\8dय à¤\95रता है?",
"rcfilters-filterlist-feedbacklink": "नए (बीटा) फिल्टर पर प्रतिक्रिया दें",
"rcfilters-highlightbutton-title": "Highlight results",
"rcfilters-highlightmenu-title": "रंग चुनें",
"rcfilters-filter-editsbyother-label": "दूसरों के द्वारा बदलाव",
"rcfilters-filter-editsbyother-description": "आपके बदलावों को छोड़ कर सभी के बदलाव।",
"rcfilters-filtergroup-userExpLevel": "अनुभव स्तर (केवल पंजीकृत सदस्यों के लिए)",
- "rcfilters-filter-user-experience-level-registered-label": "पंजीकृत:",
+ "rcfilters-filter-user-experience-level-registered-label": "पंजीकृत",
"rcfilters-filter-user-experience-level-registered-description": "लॉग-इन संपादक।",
"rcfilters-filter-user-experience-level-unregistered-label": "अपंजीकृत",
"rcfilters-filter-user-experience-level-unregistered-description": "संपादक जो लॉग इन नहीं हैं।",
"rcfilters-hideminor-conflicts-typeofchange-global": "\"लघु संपादन\" फ़िल्टर एक या एक से अधिक प्रकार के परिवर्तन फ़िल्टर के साथ संघर्ष करता है, क्योंकि कुछ प्रकार के परिवर्तन को \"लघु\" के रूप में निर्दिष्ट नहीं किया जा सकता है। परस्पर विरोधी फिल्टर ऊपर सक्रिय फिल्टर क्षेत्र में चिह्नित हैं।",
"rcfilters-hideminor-conflicts-typeofchange": "कुछ प्रकार के परिवर्तन को \"लघु\" के रूप में निर्दिष्ट नहीं किया जा सकता है\", इसलिए यह फ़िल्टर निम्न प्रकार के परिवर्तन फिल्टर के साथ संघर्ष करता है: $1",
"rcfilters-typeofchange-conflicts-hideminor": "इस प्रकार का परिवर्तन फ़िल्टर \"लघु संपादन\" फ़िल्टर के साथ संघर्ष करता है। कुछ प्रकार के परिवर्तन को \"लघु\" के रूप में निर्दिष्ट नहीं किया जा सकता है।",
- "rcfilters-filtergroup-lastRevision": "सदà¥\8dय अवतरण",
- "rcfilters-filter-lastrevision-label": "à¤\85à¤\82तिम अवतरण",
+ "rcfilters-filtergroup-lastRevision": "नया अवतरण",
+ "rcfilters-filter-lastrevision-label": "नया अवतरण",
"rcfilters-filter-lastrevision-description": "पृष्ठ का सबसे हाल में हुआ बदलाव",
"rcfilters-filter-previousrevision-label": "पहले के अवतरण",
"rcfilters-filter-previousrevision-description": "सभी परिवर्तन जो एक पृष्ठ में सबसे हाल के परिवर्तन नहीं हैं।",
"rcfilters-filter-excluded": "अपवर्जित",
"rcfilters-tag-prefix-namespace-inverted": " $1 <strong>:नहीं</strong>",
- "rcfilters-view-tags": "à¤\9aिपà¥\8dपियाà¤\81",
+ "rcfilters-view-tags": "à¤\9fà¥\88à¤\97 वालà¥\87 समà¥\8dपादन",
"rcnotefrom": "नीचे <strong>$2</strong> के बाद से (<strong>$1</strong> तक) {{PLURAL:$5|हुआ बदलाव दर्शाया गया है|हुए बदलाव दर्शाए गये हैं}}।",
"rclistfromreset": "चुने दिनांक पहले जैसा करें",
"rclistfrom": "$3 $2 से नये बदलाव दिखाएँ",
"rcfilters-filter-editsbyself-description": "Är eegen Ännerungen.",
"rcfilters-filter-editsbyother-label": "Ännerunge vun Aneren",
"rcfilters-filter-editsbyother-description": "All Ännerunge ausser Ären eegenen.",
- "rcfilters-filtergroup-userExpLevel": "Niveau vun der Erfahrung (just fir registréiert Benotzer)",
+ "rcfilters-filtergroup-userExpLevel": "Umeldung an Erfarung vu Benotzer",
"rcfilters-filter-user-experience-level-registered-label": "Ugemellt",
"rcfilters-filter-user-experience-level-unregistered-label": "Net-ugemellt",
"rcfilters-filter-user-experience-level-unregistered-description": "Auteuren déi net ageloggt sinn.",
"rcfilters-filter-logactions-label": "Protokolléiert Aktiounen",
"rcfilters-filter-logactions-description": "Administrativ Aktiounen, Uleeë vu Benotzerkonten, Läsche vu Säiten, Eropgeluede Fichieren, ...",
"rcfilters-hideminor-conflicts-typeofchange": "Verschidden Type vu Ännerunge kënnen net als \"kleng\" markéiert ginn, dofir ass dëse Filter a Konflikt mat dësem Typ vun Ännerungsfilteren: $1",
- "rcfilters-filtergroup-lastRevision": "Lescht Versioun",
+ "rcfilters-filtergroup-lastRevision": "Lescht Versiounen",
"rcfilters-filter-lastrevision-label": "Lescht Versioun",
"rcfilters-filter-lastrevision-description": "Nëmmen déi lescht Ännerung op enger Säit.",
"rcfilters-filter-previousrevision-label": "Net déi lescht Versioun",
"post-expand-template-inclusion-category": "Sider som inneheld for store malar",
"post-expand-template-argument-warning": "Åtvaring: Sida inneheld ein eller fleire malparameterar som vert for lange når dei utvidast.\nDesse parameterane har vorte utelatne.",
"post-expand-template-argument-category": "Sider med utelatne malparameterar",
- "parser-template-loop-warning": "Malløkka oppdaga: [[$1]]",
+ "parser-template-loop-warning": "Mallykkje oppdaga: [[$1]]",
"parser-template-recursion-depth-warning": "Malen er inkludert for mange gonger ($1)",
"language-converter-depth-warning": "Språkomformaren si djubdegrense vart overstege ($1)",
"node-count-exceeded-category": "Sider der talet på knutepunkt er overskride",
"nosuchspecialpage": "اینجھا کوئی خاص ورقہ کائنی",
"badtitle": "بھیڑا عنوان",
"viewsource": "ماخذ ݙیکھو",
+ "viewsource-title": "$1 دا مسودہ ݙیکھو",
"userlogin-yourname": "صارف ناں",
"userlogin-yourname-ph": "آپݨا ورتݨ ناں صارف درج کرو",
"userlogin-yourpassword": "پاس ورڈ",
"history-title": "\"$1\" دا ریکارڈ",
"difference-title": "\"$1\" دے نسخیاں دے درمیان فرق",
"lineno": "سطر $1:",
+ "compareselectedversions": "منتخب متـن دا موازنہ",
"editundo": "واپس",
"diff-empty": "(کوئی فرق کائنی)",
"searchresults": "کھوج دا نتارا",
"search-result-size": "$1 ({{PLURAL:$2|1 لفظ|$2 الفاظ}})",
"search-redirect": "($1 کنوں ولدا رجوع )",
"search-section": "(قطعہ $1)",
+ "search-file-match": "فائل مواد نال ملدا ہے",
"search-suggest": "بھلا تہاݙا مطلب ہائی: $1",
"searchall": "یکے",
"search-nonefound": "سوال دے نال رلدے ملدے نتارے کائنی۔",
"upload": "فائل چڑھاؤ",
"uploadlogpage": "اپلوڈ لاگ",
"filedesc": "خلاصہ",
+ "license": "اجازت نامہ:",
"license-header": "اجازہ کاری",
"imgfile": "فائل",
"listfiles": "فائل لسٹ",
"rollbacklink": "واپس",
"protectlogpage": "بچت لاگ",
"protectedarticle": "\"[[$1]]\" بچایا گیا اے",
+ "modifiedarticleprotection": "«[[$1]]» دا درجہ حفاظت تبدیل کیتا",
"protect-default": "تمام صارفین کوں اجازت ہے",
"restriction-edit": "لکھو",
"restriction-move": "ٹرو",
"tooltip-ca-nstab-mediawiki": "نظامی سنیہہ ݙیکھو",
"tooltip-ca-nstab-template": "سانچہ ݙیکھو",
"tooltip-ca-nstab-category": "کیٹاگری آلا ورقہ ݙیکھو",
+ "tooltip-minoredit": "ایں کوں نکی ترممیم وچ ڳݨو",
"tooltip-save": "تبدیلیاں محفوظ کرو",
"tooltip-preview": "محفوظ کرݨ کنے پہلے تبدیلیاں ݙیکھو، مہربانی ہوسی۔",
"tooltip-diff": "ایں لکھت وچ کیتیاں ڳیاں تبدیلیاں ݙیکھاؤ",
+ "tooltip-watch": "ایں ورقے کوں آپݨی دید آلے ورقیاں وچ رکھو",
"tooltip-rollback": "رول بیک\" ہک کلک وچ ورقے کوں پچھلی حالت وچ گھن ویسی\"",
"tooltip-undo": "واپس تے کلک کرݨ نال پچھلی ترمیم تے پُڄ ویسو، نمائشی انداز وچ ترمیم دا خانہ کھلسی۔ تساں مختصر سسب وی بیان کر سڳدے ہو۔",
"tooltip-summary": "مختصر خلاصہ درج کرو",
"mw-widgets-usersmultiselect-placeholder": "加入更多...",
"date-range-from": "開始日期:",
"date-range-to": "結束日期:",
- "sessionmanager-tie": "ç\84¡æ³\95å\90\88ä½µå¤\9aå\80\8bè«\8bæ±\82èª\8d証類型:$1。",
+ "sessionmanager-tie": "ç\84¡æ³\95å\90\88ä½µå¤\9aå\80\8bè«\8bæ±\82èª\8dè\89類型:$1。",
"sessionprovider-generic": "$1 連線階段",
"sessionprovider-mediawiki-session-cookiesessionprovider": "以 cookie 為基礎的連線階段",
"sessionprovider-nocookies": "Cookie 功能可能已被關閉,請確認您改開啟 Cookie 功能並重新啟動。",
"log-action-filter-suppress-reblock": "由重新封鎖禁止顯示使用者",
"log-action-filter-upload-upload": "新上傳",
"log-action-filter-upload-overwrite": "重新上傳",
- "authmanager-authn-not-in-progress": "èª\8d証尚未進行或連線階段資料已遺失,請重頭再開始。",
+ "authmanager-authn-not-in-progress": "èª\8dè\89尚未進行或連線階段資料已遺失,請重頭再開始。",
"authmanager-authn-no-primary": "提供的憑證無法用來認証。",
"authmanager-authn-no-local-user": "提供的憑證沒有與任何在此 wiki 上的使用者相關聯。",
"authmanager-authn-no-local-user-link": "提供的憑證有效但沒有與任何在此 wiki 上的使用者相關聯。請採用其他方式登入,或建立新使用者,您將會有選項可以連結您先前的憑證到新帳號。",
"authprovider-confirmlink-ok-help": "顯示連結失敗訊息後繼續。",
"authprovider-resetpass-skip-label": "略過",
"authprovider-resetpass-skip-help": "略過重設密碼。",
- "authform-nosession-login": "å·²æ\88\90å\8a\9fèª\8d証,但您的瀏覽器無法 \"記住\" 登入資訊。\n\n$1",
+ "authform-nosession-login": "å·²æ\88\90å\8a\9fèª\8dè\89,但您的瀏覽器無法 \"記住\" 登入資訊。\n\n$1",
"authform-nosession-signup": "已建立帳號,但您的瀏覽器無法 \"記住\" 登入資訊。\n\n$1",
"authform-newtoken": "缺少密鑰。$1",
"authform-notoken": "缺少密鑰",
"linkaccounts-submit": "連結帳號",
"unlinkaccounts": "取消連結帳號",
"unlinkaccounts-success": "已取消連結帳號。",
- "authenticationdatachange-ignored": "èª\8d証資料變更未被處理,可能未設定提供者?",
+ "authenticationdatachange-ignored": "èª\8dè\89資料變更未被處理,可能未設定提供者?",
"userjsispublic": "請注意:JavaScript 子頁面可被其他使用者檢視,不應包含機密資料。",
"usercssispublic": "請注意:CSS 子頁面可被其他使用者檢視,不應包含機密資料。",
"restrictionsfield-badip": "無效的 IP 位址或範圍:$1",
* @return mixed
*/
protected function getStdin( $len = null ) {
- if ( $len == Maintenance::STDIN_ALL ) {
+ if ( $len == self::STDIN_ALL ) {
return file_get_contents( 'php://stdin' );
}
$f = fopen( 'php://stdin', 'rt' );
* @return int
*/
public function getDbType() {
- return Maintenance::DB_STD;
+ return self::DB_STD;
}
/**
* @return bool True if no error or error string in case of errors
*/
public static function checkSqlSyntax( $files ) {
- if ( !Sqlite::isPresent() ) {
+ if ( !self::isPresent() ) {
throw new MWException( "Can't check SQL syntax: SQLite not found" );
}
if ( !is_array( $files ) ) {
*/
function __construct( $opts, $args ) {
if ( !$this->checkOpts( $opts, $args ) ) {
- UserOptions::showUsageAndExit();
+ self::showUsageAndExit();
} else {
$this->mReady = $this->initializeOpts( $opts, $args );
}
<arg name="bootstrap" value="vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php"/>
<arg name="encoding" value="UTF-8"/>
<arg name="extensions" value="php,php5,inc,sample"/>
- <exclude-pattern>node_modules/</exclude-pattern>
- <exclude-pattern>vendor/</exclude-pattern>
<exclude-pattern type="relative">^extensions/</exclude-pattern>
<exclude-pattern type="relative">^skins/</exclude-pattern>
- <exclude-pattern>.git</exclude-pattern>
- <exclude-pattern>AdminSettings.php</exclude-pattern>
- <exclude-pattern>LocalSettings.php</exclude-pattern>
- <exclude-pattern>StartProfiler.php</exclude-pattern>
+ <exclude-pattern>AdminSettings\.php</exclude-pattern>
+ <exclude-pattern>LocalSettings\.php</exclude-pattern>
+ <exclude-pattern>StartProfiler\.php</exclude-pattern>
</ruleset>
'targets' => [ 'desktop', 'mobile' ],
],
'mediawiki.hlist' => [
+ 'styles' => [
+ 'resources/src/mediawiki/mediawiki.hlist-allskins.less',
+ ],
'skinStyles' => [
'default' => 'resources/src/mediawiki/mediawiki.hlist.css',
],
--- /dev/null
+.hlist {
+ dl,
+ ol,
+ ul {
+ margin: 0;
+ padding: 0;
+
+ dl,
+ ol,
+ ul {
+ display: inline;
+ }
+ }
+
+ dd,
+ dt,
+ li {
+ margin: 0;
+ display: inline;
+ }
+}
* Stylesheet for mediawiki.hlist module
* @author [[User:Edokter]]
*/
-.hlist dl,
-.hlist ol,
-.hlist ul {
- margin: 0;
- padding: 0;
-}
-/* Display list items inline */
-.hlist dd,
-.hlist dt,
-.hlist li {
- margin: 0;
- display: inline;
-}
-/* Display nested lists inline */
-.hlist dl dl,
-.hlist dl ol,
-.hlist dl ul,
-.hlist ol dl,
-.hlist ol ol,
-.hlist ol ul,
-.hlist ul dl,
-.hlist ul ol,
-.hlist ul ul {
- display: inline;
-}
/* Generate interpuncts */
.hlist dt:after {
content: ':';
global $wgParserTestFiles;
// Add core test files
- $files = array_map( function( $item ) {
+ $files = array_map( function ( $item ) {
return __DIR__ . "/$item";
}, self::$coreTestFiles );
global $wgDummyLazy;
$called = false;
- $factory = function() use ( &$called ) {
+ $factory = function () use ( &$called ) {
$called = true;
return new HashBagOStuff();
};
public function testValidJsonData() {
global $IP;
- $this->assertValidGitInfo( new GitInfo( "$IP/testValidJsonData") );
+ $this->assertValidGitInfo( new GitInfo( "$IP/testValidJsonData" ) );
$this->assertValidGitInfo( new GitInfo( __DIR__ . "/../data/gitinfo/extension" ) );
}
->method( 'getConfig' )
->willReturn( $configMock );
- $this->setTemporaryHook( 'PreferencesFormPreSave', function(
+ $this->setTemporaryHook( 'PreferencesFormPreSave', function (
$formData, $form, $user, &$result, $oldUserOptions )
use ( $newOptions, $oldOptions, $userMock ) {
-
$this->assertSame( $userMock, $user );
foreach ( $newOptions as $option => $value ) {
$this->assertSame( $value, $formData[ $option ] );
}
/**
- * @covers ConfigFactory::register
+ * @covers ConfigFactory::salvage
*/
public function testSalvage() {
$oldFactory = new ConfigFactory();
}
/**
- * @covers ConfigFactory::register
+ * @covers ConfigFactory::getConfigNames
*/
public function testGetConfigNames() {
$factory = new ConfigFactory();
/**
* @covers ConfigFactory::makeConfig
*/
- public function testMakeConfig() {
+ public function testMakeConfigWithCallback() {
$factory = new ConfigFactory();
$factory->register( 'unittest', 'GlobalVarConfig::newInstance' );
$this->assertSame( $conf, $factory->makeConfig( 'unittest' ) );
}
+ /**
+ * @covers ConfigFactory::makeConfig
+ */
+ public function testMakeConfigWithObject() {
+ $factory = new ConfigFactory();
+ $conf = new HashConfig();
+ $factory->register( 'test', $conf );
+ $this->assertSame( $conf, $factory->makeConfig( 'test' ) );
+ }
+
/**
* @covers ConfigFactory::makeConfig
*/
public static function dataGetSection() {
return [
- [ WikitextContentTest::$sections,
+ [ self::$sections,
"0",
"Intro"
],
- [ WikitextContentTest::$sections,
+ [ self::$sections,
"2",
"== test ==
just a test"
],
- [ WikitextContentTest::$sections,
+ [ self::$sections,
"8",
false
],
public static function dataReplaceSection() {
return [
- [ WikitextContentTest::$sections,
+ [ self::$sections,
"0",
"No more",
null,
- trim( preg_replace( '/^Intro/sm', 'No more', WikitextContentTest::$sections ) )
+ trim( preg_replace( '/^Intro/sm', 'No more', self::$sections ) )
],
- [ WikitextContentTest::$sections,
+ [ self::$sections,
"",
"No more",
null,
"No more"
],
- [ WikitextContentTest::$sections,
+ [ self::$sections,
"2",
"== TEST ==\nmore fun",
null,
trim( preg_replace(
'/^== test ==.*== foo ==/sm', "== TEST ==\nmore fun\n\n== foo ==",
- WikitextContentTest::$sections
+ self::$sections
) )
],
- [ WikitextContentTest::$sections,
+ [ self::$sections,
"8",
"No more",
null,
- WikitextContentTest::$sections
+ self::$sections
],
- [ WikitextContentTest::$sections,
+ [ self::$sections,
"new",
"No more",
"New",
- trim( WikitextContentTest::$sections ) . "\n\n\n== New ==\n\nNo more"
+ trim( self::$sections ) . "\n\n\n== New ==\n\nNo more"
],
];
}
return [
[ 'Help:WikiPageTest_testReplaceSection',
CONTENT_MODEL_WIKITEXT,
- WikiPageTest::$sections,
+ self::$sections,
"0",
"No more",
null,
- trim( preg_replace( '/^Intro/sm', 'No more', WikiPageTest::$sections ) )
+ trim( preg_replace( '/^Intro/sm', 'No more', self::$sections ) )
],
[ 'Help:WikiPageTest_testReplaceSection',
CONTENT_MODEL_WIKITEXT,
- WikiPageTest::$sections,
+ self::$sections,
"",
"No more",
null,
],
[ 'Help:WikiPageTest_testReplaceSection',
CONTENT_MODEL_WIKITEXT,
- WikiPageTest::$sections,
+ self::$sections,
"2",
"== TEST ==\nmore fun",
null,
trim( preg_replace( '/^== test ==.*== foo ==/sm',
"== TEST ==\nmore fun\n\n== foo ==",
- WikiPageTest::$sections ) )
+ self::$sections ) )
],
[ 'Help:WikiPageTest_testReplaceSection',
CONTENT_MODEL_WIKITEXT,
- WikiPageTest::$sections,
+ self::$sections,
"8",
"No more",
null,
- trim( WikiPageTest::$sections )
+ trim( self::$sections )
],
[ 'Help:WikiPageTest_testReplaceSection',
CONTENT_MODEL_WIKITEXT,
- WikiPageTest::$sections,
+ self::$sections,
"new",
"No more",
"New",
- trim( WikiPageTest::$sections ) . "\n\n== New ==\n\nNo more"
+ trim( self::$sections ) . "\n\n== New ==\n\nNo more"
],
];
}
public static function insertIntoDb() {
$sitesTable = \MediaWiki\MediaWikiServices::getInstance()->getSiteStore();
$sitesTable->clear();
- $sitesTable->saveSites( TestSites::getSites() );
+ $sitesTable->saveSites( self::getSites() );
}
}
<directory suffix=".php">../../includes</directory>
<directory suffix=".php">../../languages</directory>
<directory suffix=".php">../../maintenance</directory>
- <directory suffix=".php">../../skins</directory>
</whitelist>
</filter>
</phpunit>