suggestion, results for suggestion will be shown. Can be disabled by setting
$wgSearchRunSuggestedQuery to false.
-==== External libraries ====
-* Update es5-shim from v4.0.0 to v4.1.5.
-* Update json2 from revision 2014-02-04 to 2015-05-03.
-* Update Sinon.JS from 1.10.3 to 1.15.4.
-* Upgrade jQuery Client from v1.0.0 to v2.0.0.
-* Added mediawiki/at-ease 1.0.0.
-* Update QUnit from v1.17.1 to v1.18.0.
-* Added wikimedia/cldr-plural-rule-parser 1.0.0
+== External libraries ==
+=== Upgraded external libraries ===
+* Updated es5-shim from v4.0.0 to v4.1.5.
+* Updated json2 from revision 2014-02-04 to 2015-05-03.
+* Updated Sinon.JS from 1.10.3 to 1.15.4.
+* Updated jQuery Client from v1.0.0 to v2.0.0.
+* Updated QUnit from v1.17.1 to v1.18.0.
+* Updated liuggio/statsd-php-client from v1.0.12 to v1.0.16
+* Updated oojs/oojs-ui from v0.9.8 to v0.12.9.
+* Updated wikimedia/utfnormal from v1.0.2 to v1.0.3
+* Updated wikimedia/composer-merge-plugin from v1.0.0 to v1.2.1.
+* Updated zordius/lightncandy from v0.18 to v0.21.
+
+=== New external libraries ===
+* Added composer/semver v0.1.0.
+* Added mediawiki/at-ease v1.1.0.
+* Added wikimedia/assert v0.2.2.
+* Added wikimedia/cldr-plural-rule-parser v1.0.0
+* Added wikimedia/ip-set v1.0.1.
+* Added wikimedia/wrappedstring v2.0.0.
+
+=== Removed and replaced external libraries ===
+* Replaced leafo/lessphp v0.5.0 with oyejorge/less.php: v1.7.0.8
=== Bug fixes in 1.26 ===
* (T53283) load.php sometimes sends 304 response without full headers
"cssjanus/cssjanus": "1.1.1",
"ext-iconv": "*",
"liuggio/statsd-php-client": "1.0.16",
- "oyejorge/less.php": "1.7.0.8",
"mediawiki/at-ease": "1.1.0",
"oojs/oojs-ui": "0.12.9",
+ "oyejorge/less.php": "1.7.0.8",
"php": ">=5.3.3",
"psr/log": "1.0.0",
"wikimedia/assert": "0.2.2",
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9",
"justinrainbow/json-schema": "~1.3",
- "phpunit/phpunit": "3.7.37",
- "mediawiki/mediawiki-codesniffer": "0.3.0",
- "wikimedia/avro": "1.7.7",
+ "mediawiki/mediawiki-codesniffer": "0.4.0",
+ "monolog/monolog": "1.14.0",
"nmred/kafka-php": "0.1.4",
- "monolog/monolog": "1.14.0"
+ "phpunit/phpunit": "3.7.37",
+ "wikimedia/avro": "1.7.7"
},
"suggest": {
+ "ext-apc": "Local data and opcode cache",
"ext-fileinfo": "Improved mime magic detection",
"ext-intl": "ICU integration",
"ext-mbstring": "Multibyte string support",
"ext-wikidiff2": "Diff accelerator",
- "ext-apc": "Local data and opcode cache",
"monolog/monolog": "Flexible debug logging system",
"nmred/kafka-php": "Send debug log events to kafka",
"pear/mail": "Mail sending support",
"scripts": {
"lint": "parallel-lint --exclude vendor",
"phpcs": "phpcs -p $PHPCS_ARGS",
+ "pre-install-cmd": "ComposerHookHandler::onPreInstall",
+ "pre-update-cmd": "ComposerHookHandler::onPreUpdate",
"test": [
"composer lint",
"composer phpcs"
- ],
- "pre-update-cmd": "ComposerHookHandler::onPreUpdate",
- "pre-install-cmd": "ComposerHookHandler::onPreInstall"
+ ]
},
"config": {
- "prepend-autoloader": false,
- "optimize-autoloader": true
+ "optimize-autoloader": true,
+ "prepend-autoloader": false
},
"extra": {
"merge-plugin": {
* [[media:...]] links for non-trusted formats.
*/
$wgTrustedMediaFormats = array(
- MEDIATYPE_BITMAP, //all bitmap formats
- MEDIATYPE_AUDIO, //all audio formats
- MEDIATYPE_VIDEO, //all plain video formats
- "image/svg+xml", //svg (only needed if inline rendering of svg is not supported)
- "application/pdf", //PDF files
- #"application/x-shockwave-flash", //flash/shockwave movie
+ MEDIATYPE_BITMAP, // all bitmap formats
+ MEDIATYPE_AUDIO, // all audio formats
+ MEDIATYPE_VIDEO, // all plain video formats
+ "image/svg+xml", // svg (only needed if inline rendering of svg is not supported)
+ "application/pdf", // PDF files
+ # "application/x-shockwave-flash", //flash/shockwave movie
);
/**
*/
$wgAntivirusSetup = array(
- #setup for clamav
+ # setup for clamav
'clamav' => array(
'command' => 'clamscan --no-summary ',
'codemap' => array(
*/
$wgParserConf = array(
'class' => 'Parser',
- #'preprocessorClass' => 'Preprocessor_Hash',
+ # 'preprocessorClass' => 'Preprocessor_Hash',
);
/**
$wgGroupPermissions['*']['viewmyprivateinfo'] = true;
$wgGroupPermissions['*']['editmyprivateinfo'] = true;
$wgGroupPermissions['*']['editmyoptions'] = true;
-#$wgGroupPermissions['*']['patrolmarks'] = false; // let anons see what was patrolled
+# $wgGroupPermissions['*']['patrolmarks'] = false; // let anons see what was patrolled
// Implicit group for all logged-in accounts
$wgGroupPermissions['user']['move'] = true;
$wgGroupPermissions['sysop']['movefile'] = true;
$wgGroupPermissions['sysop']['unblockself'] = true;
$wgGroupPermissions['sysop']['suppressredirect'] = true;
-#$wgGroupPermissions['sysop']['pagelang'] = true;
-#$wgGroupPermissions['sysop']['upload_by_url'] = true;
+# $wgGroupPermissions['sysop']['pagelang'] = true;
+# $wgGroupPermissions['sysop']['upload_by_url'] = true;
$wgGroupPermissions['sysop']['mergehistory'] = true;
$wgGroupPermissions['sysop']['managechangetags'] = true;
$wgGroupPermissions['bureaucrat']['userrights'] = true;
$wgGroupPermissions['bureaucrat']['noratelimit'] = true;
// Permission to change users' groups assignments across wikis
-#$wgGroupPermissions['bureaucrat']['userrights-interwiki'] = true;
+# $wgGroupPermissions['bureaucrat']['userrights-interwiki'] = true;
// Permission to export pages including linked pages regardless of $wgExportMaxLinkDepth
-#$wgGroupPermissions['bureaucrat']['override-export-depth'] = true;
+# $wgGroupPermissions['bureaucrat']['override-export-depth'] = true;
-#$wgGroupPermissions['sysop']['deletelogentry'] = true;
-#$wgGroupPermissions['sysop']['deleterevision'] = true;
+# $wgGroupPermissions['sysop']['deletelogentry'] = true;
+# $wgGroupPermissions['sysop']['deleterevision'] = true;
// To hide usernames from users and Sysops
-#$wgGroupPermissions['suppress']['hideuser'] = true;
+# $wgGroupPermissions['suppress']['hideuser'] = true;
// To hide revisions/log items from users and Sysops
-#$wgGroupPermissions['suppress']['suppressrevision'] = true;
+# $wgGroupPermissions['suppress']['suppressrevision'] = true;
// To view revisions/log items hidden from users and Sysops
-#$wgGroupPermissions['suppress']['viewsuppressed'] = true;
+# $wgGroupPermissions['suppress']['viewsuppressed'] = true;
// For private suppression log access
-#$wgGroupPermissions['suppress']['suppressionlog'] = true;
+# $wgGroupPermissions['suppress']['suppressionlog'] = true;
/**
* The developer group is deprecated, but can be activated if need be
define( 'DBO_TRX', 8 ); // automatically start transaction on first query
define( 'DBO_DEFAULT', 16 );
define( 'DBO_PERSISTENT', 32 );
-define( 'DBO_SYSDBA', 64 ); //for oracle maintenance
+define( 'DBO_SYSDBA', 64 ); // for oracle maintenance
define( 'DBO_DDLMODE', 128 ); // when using schema files: mostly for Oracle
define( 'DBO_SSL', 256 );
define( 'DBO_COMPRESS', 512 );
/**@{
* Antivirus result codes, for use in $wgAntivirusSetup.
*/
-define( 'AV_NO_VIRUS', 0 ); #scan ok, no virus found
-define( 'AV_VIRUS_FOUND', 1 ); #virus found!
-define( 'AV_SCAN_ABORTED', -1 ); #scan aborted, the file is probably immune
-define( 'AV_SCAN_FAILED', false ); #scan failed (scanner not found or error in scanner)
+define( 'AV_NO_VIRUS', 0 ); # scan ok, no virus found
+define( 'AV_VIRUS_FOUND', 1 ); # virus found!
+define( 'AV_SCAN_ABORTED', -1 ); # scan aborted, the file is probably immune
+define( 'AV_SCAN_FAILED', false ); # scan failed (scanner not found or error in scanner)
/**@}*/
/**@{
global $wgUser;
$this->edittime = $this->mArticle->getTimestamp();
- $content = $this->getContentObject( false ); #TODO: track content object?!
+ $content = $this->getContentObject( false ); # TODO: track content object?!
if ( $content === false ) {
return false;
}
$title = Title::newFromText( $preload );
# Check for existence to avoid getting MediaWiki:Noarticletext
if ( $title === null || !$title->exists() || !$title->userCan( 'read', $wgUser ) ) {
- //TODO: somehow show a warning to the user!
+ // TODO: somehow show a warning to the user!
return $handler->makeEmptyContent();
}
$title = $page->getRedirectTarget();
# Same as before
if ( $title === null || !$title->exists() || !$title->userCan( 'read', $wgUser ) ) {
- //TODO: somehow show a warning to the user!
+ // TODO: somehow show a warning to the user!
return $handler->makeEmptyContent();
}
$page = WikiPage::factory( $title );
$content = $page->getContent( Revision::RAW );
if ( !$content ) {
- //TODO: somehow show a warning to the user!
+ // TODO: somehow show a warning to the user!
return $handler->makeEmptyContent();
}
$converted = $content->convert( $handler->getModelID() );
if ( !$converted ) {
- //TODO: somehow show a warning to the user!
+ // TODO: somehow show a warning to the user!
wfDebug( "Attempt to preload incompatible content: " .
"can't convert " . $content->getModel() .
" to " . $handler->getModelID() );
# user preference is active, pass a hidden tag as wpIgnoreBlankSummary. This will stop the
# user being bounced back more than once in the event that a summary
# is not required.
- #####
+ # ####
# For a bit more sophisticated detection of blank summaries, hash the
# automatic one and pass that in the hidden field wpAutoSummary.
if ( $this->missingSummary || ( $this->section == 'new' && $this->nosummary ) ) {
if ( $this->section != '' && $this->section != 'new' ) {
if ( !$this->summary && !$this->preview && !$this->diff ) {
- $sectionTitle = self::extractSectionTitle( $this->textbox1 ); //FIXME: use Content object
+ $sectionTitle = self::extractSectionTitle( $this->textbox1 ); // FIXME: use Content object
if ( $sectionTitle !== false ) {
$this->summary = "/* $sectionTitle */ ";
}
$imagesAvailable = $wgEnableUploads || count( $wgForeignFileRepos );
$showSignature = true;
if ( $title ) {
- $showSignature = MWNamespace::wantSignatures( $title->getNamespace() );
+ $showSignature = MWNamespace::wantSignatures( $title->getNamespace() );
}
/**
if ( $oldid ) {
- #$diffText = $de->getDiff( wfMessage( 'revisionasof',
- # $wgLang->timeanddate( $timestamp ),
- # $wgLang->date( $timestamp ),
- # $wgLang->time( $timestamp ) )->text(),
- # wfMessage( 'currentrev' )->text() );
+ # $diffText = $de->getDiff( wfMessage( 'revisionasof',
+ # $wgLang->timeanddate( $timestamp ),
+ # $wgLang->date( $timestamp ),
+ # $wgLang->time( $timestamp ) )->text(),
+ # wfMessage( 'currentrev' )->text() );
$diffText = '';
// Don't bother generating the diff if we won't be able to show it
$html = nl2br( htmlspecialchars( $text ) );
}
} else {
- //XXX: we could get an HTML representation of the content via getParserOutput, but that may
+ // XXX: we could get an HTML representation of the content via getParserOutput, but that may
// contain JS magic and generally may not be suitable for inclusion in a feed.
// Perhaps Content should have a getDescriptiveHtml method and/or a getSourceText method.
- //Compare also ApiFeedContributions::feedItemDesc
+ // Compare also ApiFeedContributions::feedItemDesc
$html = null;
}
MediaWiki\restoreWarnings();
if ( !$ok ) {
- //directory may have been created on another request since we last checked
+ // directory may have been created on another request since we last checked
if ( is_dir( $dir ) ) {
return true;
}
* @return bool
*/
function wfIsBadImage( $name, $contextTitle = false, $blacklist = null ) {
- # Handle redirects
- $redirectTitle = RepoGroup::singleton()->checkRedirect( Title::makeTitle( NS_FILE, $name ) );
- if ( $redirectTitle ) {
- $name = $redirectTitle->getDBkey();
- }
+ # Handle redirects; callers almost always hit wfFindFile() anyway,
+ # so just use that method because it has a fast process cache.
+ $file = wfFindFile( $name ); // get the final name
+ $name = $file ? $file->getTitle()->getDBkey() : $name;
# Run the extension hook
$bad = false;
} elseif ( is_int( $nsId ) ) {
$nsName = $wgContLang->convertNamespace( $nsId );
}
- $optionsOut[ $nsId ] = $nsName;
+ $optionsOut[$nsId] = $nsName;
}
return $optionsOut;
public function getFinalUrl() {
$headers = $this->getResponseHeaders();
- //return full url (fix for incorrect but handled relative location)
+ // return full url (fix for incorrect but handled relative location)
if ( isset( $headers['location'] ) ) {
$locations = $headers['location'];
$domain = '';
if ( isset( $url['host'] ) ) {
$domain = $url['scheme'] . '://' . $url['host'];
- break; //found correct URI (with host)
+ break; // found correct URI (with host)
} else {
$foundRelativeURI = true;
}
// No rootpage
$this->setImportTitleFactory( new NaiveImportTitleFactory() );
} elseif ( $rootpage !== '' ) {
- $rootpage = rtrim( $rootpage, '/' ); //avoid double slashes
+ $rootpage = rtrim( $rootpage, '/' ); // avoid double slashes
$title = Title::newFromText( $rootpage );
if ( !$title || $title->isExternal() ) {
'page' => $pageId,
'content_model' => $this->getModel(),
'content_format' => $this->getFormat(),
- //XXX: just set 'content' => $this->getContent()?
+ // XXX: just set 'content' => $this->getContent()?
'text' => $this->getContent()->serialize( $this->getFormat() ),
'comment' => $this->getComment(),
'user' => $userId,
'log_namespace' => $this->getTitle()->getNamespace(),
'log_title' => $this->getTitle()->getDBkey(),
'log_comment' => $this->getComment(),
- #'log_user_text' => $this->user_text,
+ # 'log_user_text' => $this->user_text,
'log_params' => $this->params ),
__METHOD__
);
'log_action' => $this->action,
'log_timestamp' => $dbw->timestamp( $this->timestamp ),
'log_user' => User::idFromName( $this->user_text ),
- #'log_user_text' => $this->user_text,
+ # 'log_user_text' => $this->user_text,
'log_namespace' => $this->getTitle()->getNamespace(),
'log_title' => $this->getTitle()->getDBkey(),
'log_comment' => $this->getComment(),
*/
static function matchEntry( Content $content, $filterEntry ) {
if ( !( $content instanceof TextContent ) ) {
- //TODO: handle other types of content too.
+ // TODO: handle other types of content too.
// Maybe create ContentHandler::matchFilter( LinkFilter ).
// Think about a common base class for LinkFilter and MagicWord.
return 0;
$ts,
$da
) ) {
- #TS_ISO_8601_BASIC
+ # TS_ISO_8601_BASIC
} elseif ( preg_match(
'/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.*\d*[\+\- ](\d\d)$/',
$ts,
continue;
}
- #print "processing MIME INFO line $s<br>";
+ # print "processing MIME INFO line $s<br>";
$match = array();
if ( preg_match( '!\[\s*(\w+)\s*\]!', $s, $match ) ) {
if ( $m ) {
# normalize
- $m = preg_replace( '![;, ].*$!', '', $m ); #strip charset, etc
+ $m = preg_replace( '![;, ].*$!', '', $m ); # strip charset, etc
$m = trim( $m );
$m = strtolower( $m );
function getExternalHeadScripts() {
$links = array();
- // Startup - this provides the client with the module manifest and loads jquery and mediawiki base modules
+ // Startup - this provides the client with the module
+ // manifest and loads jquery and mediawiki base modules
$links[] = $this->makeResourceLoaderLink( 'startup', ResourceLoaderModule::TYPE_SCRIPTS );
return self::getHtmlFromLoaderLinks( $links );
// This needs to be TYPE_COMBINED so these modules are properly wrapped
// in mw.loader.implement() calls and deferred until mw.user is available
$embedScripts = array( 'user.options' );
- $links[] = $this->makeResourceLoaderLink( $embedScripts, ResourceLoaderModule::TYPE_COMBINED );
+ $links[] = $this->makeResourceLoaderLink(
+ $embedScripts,
+ ResourceLoaderModule::TYPE_COMBINED
+ );
// Separate user.tokens as otherwise caching will be allowed (T84960)
- $links[] = $this->makeResourceLoaderLink( 'user.tokens', ResourceLoaderModule::TYPE_COMBINED );
+ $links[] = $this->makeResourceLoaderLink(
+ 'user.tokens',
+ ResourceLoaderModule::TYPE_COMBINED
+ );
// Modules requests - let the client calculate dependencies and batch requests as it likes
// Only load modules that have marked themselves for loading at the top
// FIXME: If the user is previewing, say, ./vector.js, his ./common.js will be loaded
// asynchronously and may arrive *after* the inline script here. So the previewed code
// may execute before ./common.js runs. Normally, ./common.js runs before ./vector.js.
- // Similarly, when previewing ./common.js and the user module does arrive first, it will
- // arrive without common.js and the inline script runs after. Thus running common after
- // the excluded subpage.
+ // Similarly, when previewing ./common.js and the user module does arrive first,
+ // it will arrive without common.js and the inline script runs after.
+ // Thus running common after the excluded subpage.
} else {
// Include the user module normally, i.e., raw to avoid it being wrapped in a closure.
$links[] = $this->makeResourceLoaderLink( 'user', ResourceLoaderModule::TYPE_COMBINED );
}
// Group JS is only enabled if site JS is enabled.
- $links[] = $this->makeResourceLoaderLink( 'user.groups', ResourceLoaderModule::TYPE_COMBINED );
+ $links[] = $this->makeResourceLoaderLink(
+ 'user.groups',
+ ResourceLoaderModule::TYPE_COMBINED
+ );
return self::getHtmlFromLoaderLinks( $links );
}
if ( $config->get( 'UniversalEditButton' ) && $this->isArticleRelated() ) {
$user = $this->getUser();
if ( $this->getTitle()->quickUserCan( 'edit', $user )
- && ( $this->getTitle()->exists() || $this->getTitle()->quickUserCan( 'create', $user ) ) ) {
+ && ( $this->getTitle()->exists() ||
+ $this->getTitle()->quickUserCan( 'create', $user ) )
+ ) {
// Original UniversalEditButton
$msg = $this->msg( 'edit' )->text();
$tags['universal-edit-button'] = Html::element( 'link', array(
$tags['rsd'] = Html::element( 'link', array(
'rel' => 'EditURI',
'type' => 'application/rsd+xml',
- // Output a protocol-relative URL here if $wgServer is protocol-relative
- // Whether RSD accepts relative or protocol-relative URLs is completely undocumented, though
+ // Output a protocol-relative URL here if $wgServer is protocol-relative.
+ // Whether RSD accepts relative or protocol-relative URLs is completely
+ // undocumented, though.
'href' => wfExpandUrl( wfAppendQuery(
wfScript( 'api' ),
array( 'action' => 'rsd' ) ),
$tags["variant-$variant"] = Html::element( 'link', array(
'rel' => 'alternate',
'hreflang' => wfBCP47( $variant ),
- 'href' => $this->getTitle()->getLocalURL( array( 'variant' => $variant ) ) )
+ 'href' => $this->getTitle()->getLocalURL(
+ array( 'variant' => $variant ) )
+ )
);
}
# x-default link per https://support.google.com/webmasters/answer/189077?hl=en
$format,
$link,
# Used messages: 'page-rss-feed' and 'page-atom-feed' (for an easier grep)
- $this->msg( "page-{$format}-feed", $this->getTitle()->getPrefixedText() )->text()
+ $this->msg(
+ "page-{$format}-feed", $this->getTitle()->getPrefixedText()
+ )->text()
);
}
continue;
}
$group = $module->getGroup();
- // Modules in groups other than the ones needing special treatment (see $styles assignment)
+ // Modules in groups other than the ones needing special treatment
+ // (see $styles assignment)
// will be placed in the "other" style category.
$styles[isset( $styles[$group] ) ? $group : 'other'][] = $name;
}
// statically added styles from other modules. So the order has to be
// other, dynamic, site, private, user. Add statically added styles for
// other modules
- $links[] = $this->makeResourceLoaderLink( $styles['other'], ResourceLoaderModule::TYPE_STYLES );
+ $links[] = $this->makeResourceLoaderLink(
+ $styles['other'],
+ ResourceLoaderModule::TYPE_STYLES
+ );
// Add normal styles added through addStyle()/addInlineStyle() here
$links[] = implode( "\n", $this->buildCssLinksArray() ) . $this->mInlineStyles;
- // Add marker tag to mark the place where the client-side loader should inject dynamic styles
+ // Add marker tag to mark the place where the client-side
+ // loader should inject dynamic styles
// We use a <meta> tag with a made-up name for this because that's valid HTML
$links[] = Html::element(
'meta',
$url = $style;
} else {
$config = $this->getConfig();
- $url = $config->get( 'StylePath' ) . '/' . $style . '?' . $config->get( 'StyleVersion' );
+ $url = $config->get( 'StylePath' ) . '/' . $style . '?' .
+ $config->get( 'StyleVersion' );
}
$link = Html::linkedStyle( $url, $media );
$themes = ExtensionRegistry::getInstance()->getAttribute( 'SkinOOUIThemes' );
// Make keys (skin names) lowercase for case-insensitive matching.
$themes = array_change_key_case( $themes, CASE_LOWER );
- $theme = isset( $themes[ $skinName ] ) ? $themes[ $skinName ] : 'MediaWiki';
+ $theme = isset( $themes[$skinName] ) ? $themes[$skinName] : 'MediaWiki';
// For example, 'OOUI\MediaWikiTheme'.
$themeClass = "OOUI\\{$theme}Theme";
OOUI\Theme::setSingleton( new $themeClass() );
* @return array|null
*/
static function loadPreferenceValues( $user, $context, &$defaultPreferences ) {
- ## Remove preferences that wikis don't want to use
+ # # Remove preferences that wikis don't want to use
foreach ( $context->getConfig()->get( 'HiddenPrefs' ) as $pref ) {
if ( isset( $defaultPreferences[$pref] ) ) {
unset( $defaultPreferences[$pref] );
}
}
- ## Make sure that form fields have their parent set. See bug 41337.
+ # # Make sure that form fields have their parent set. See bug 41337.
$dummyForm = new HTMLForm( array(), $context );
$disable = !$user->isAllowed( 'editmyoptions' );
$defaultOptions = User::getDefaultOptions();
- ## Prod in defaults from the user
+ # # Prod in defaults from the user
foreach ( $defaultPreferences as $name => &$info ) {
$prefFromUser = self::getOptionFromUser( $name, $info, $user );
if ( $disable && !in_array( $name, self::$saveBlacklist ) ) {
// retrieving user name for GENDER and misc.
$userName = $user->getName();
- ## User info #####################################
+ # # User info #####################################
// Information panel
$defaultPreferences['username'] = array(
'type' => 'info',
'section' => 'personal/signature'
);
- ## Email stuff
+ # # Email stuff
if ( $config->get( 'EnableEmail' ) ) {
if ( $canViewPrivateInfo ) {
* @return void
*/
static function skinPreferences( $user, IContextSource $context, &$defaultPreferences ) {
- ## Skin #####################################
+ # # Skin #####################################
// Skin selector, if there is at least one valid skin
$skinOptions = self::generateSkinOptions( $user, $context );
* @param array $defaultPreferences
*/
static function filesPreferences( $user, IContextSource $context, &$defaultPreferences ) {
- ## Files #####################################
+ # # Files #####################################
$defaultPreferences['imagesize'] = array(
'type' => 'select',
'options' => self::getImageSizes( $context ),
* @return void
*/
static function datetimePreferences( $user, IContextSource $context, &$defaultPreferences ) {
- ## Date and time #####################################
+ # # Date and time #####################################
$dateOptions = self::getDateOptions( $context );
if ( $dateOptions ) {
$defaultPreferences['date'] = array(
* @param array $defaultPreferences
*/
static function renderingPreferences( $user, IContextSource $context, &$defaultPreferences ) {
- ## Diffs ####################################
+ # # Diffs ####################################
$defaultPreferences['diffonly'] = array(
'type' => 'toggle',
'section' => 'rendering/diffs',
'label-message' => 'tog-norollbackdiff',
);
- ## Page Rendering ##############################
+ # # Page Rendering ##############################
if ( $context->getConfig()->get( 'AllowUserCssPrefs' ) ) {
$defaultPreferences['underline'] = array(
'type' => 'select',
* @param array $defaultPreferences
*/
static function editingPreferences( $user, IContextSource $context, &$defaultPreferences ) {
- ## Editing #####################################
+ # # Editing #####################################
$defaultPreferences['editsectiononrightclick'] = array(
'type' => 'toggle',
'section' => 'editing/advancedediting',
static function rcPreferences( $user, IContextSource $context, &$defaultPreferences ) {
$config = $context->getConfig();
$rcMaxAge = $config->get( 'RCMaxAge' );
- ## RecentChanges #####################################
+ # # RecentChanges #####################################
$defaultPreferences['rcdays'] = array(
'type' => 'float',
'label-message' => 'recentchangesdays',
$config = $context->getConfig();
$watchlistdaysMax = ceil( $config->get( 'RCMaxAge' ) / ( 3600 * 24 ) );
- ## Watchlist #####################################
+ # # Watchlist #####################################
if ( $user->isAllowed( 'editmywatchlist' ) ) {
$editWatchlistLinks = array();
$editWatchlistModes = array(
if ( $this->mTitle !== null ) {
return $this->mTitle;
}
- //rev_id is defined as NOT NULL, but this revision may not yet have been inserted.
+ // rev_id is defined as NOT NULL, but this revision may not yet have been inserted.
if ( $this->mId !== null ) {
$dbr = wfGetDB( DB_SLAVE );
$row = $dbr->selectRow(
);
if ( $wgContentHandlerUseDB ) {
- //NOTE: Store null for the default model and format, to save space.
- //XXX: Makes the DB sensitive to changed defaults.
+ // NOTE: Store null for the default model and format, to save space.
+ // XXX: Makes the DB sensitive to changed defaults.
// Make this behavior optional? Only in miser mode?
$model = $this->getContentModel();
protected function checkContentModel() {
global $wgContentHandlerUseDB;
- $title = $this->getTitle(); //note: may return null for revisions that have not yet been inserted.
+ $title = $this->getTitle(); // note: may return null for revisions that have not yet been inserted.
$model = $this->getContentModel();
$format = $this->getContentFormat();
$badtag = true;
} elseif ( in_array( $t, $tagstack ) && !isset( $htmlnest[$t] ) ) {
$badtag = true;
- # Is it a self closed htmlpair ? (bug 5487)
+ # Is it a self closed htmlpair ? (bug 5487)
} elseif ( $brace == '/>' && isset( $htmlpairs[$t] ) ) {
$badtag = true;
} elseif ( isset( $htmlsingleonly[$t] ) ) {
$out = array();
foreach ( $attribs as $attribute => $value ) {
- #allow XML namespace declaration if RDFa is enabled
+ # allow XML namespace declaration if RDFa is enabled
if ( $wgAllowRdfaAttributes && preg_match( self::XMLNS_ATTRIBUTE_PATTERN, $attribute ) ) {
if ( !preg_match( self::EVIL_URI_PATTERN, $value ) ) {
$out[$attribute] = $value;
|| $attribute === 'itemref' || $attribute === 'itemscope'
|| $attribute === 'itemtype'
) {
- //Paranoia. Allow "simple" values but suppress javascript
+ // Paranoia. Allow "simple" values but suppress javascript
if ( preg_match( self::EVIL_URI_PATTERN, $value ) ) {
continue;
}
# validation code that can be used by tag hook handlers, etc
if ( $attribute === 'href' || $attribute === 'src' ) {
if ( !preg_match( $hrefExp, $value ) ) {
- continue; //drop any href or src attributes not using an allowed protocol.
+ continue; // drop any href or src attributes not using an allowed protocol.
// NOTE: this also drops all relative URLs
}
}
# rbc
'rb' => $common,
'rp' => $common,
- 'rt' => $common, #array_merge( $common, array( 'rbspan' ) ),
+ 'rt' => $common, # array_merge( $common, array( 'rbspan' ) ),
'rtc' => $common,
# MathML root element, where used for extensions
*/
protected function getTemplate( $templateName ) {
// If a renderer has already been defined for this template, reuse it
- if ( isset( $this->renderers[$templateName] ) && is_callable( $this->renderers[$templateName] ) ) {
+ if ( isset( $this->renderers[$templateName] ) &&
+ is_callable( $this->renderers[$templateName] )
+ ) {
return $this->renderers[$templateName];
}
* @return TitleFormatter
*/
private static function getTitleFormatter() {
- //NOTE: we know that getTitleParser() returns a MediaWikiTitleCodec,
+ // NOTE: we know that getTitleParser() returns a MediaWikiTitleCodec,
// which implements TitleFormatter.
return self::getTitleParser();
}
$this->mRestrictions['move'] = explode( ',', trim( $temp[0] ) );
} else {
$restriction = trim( $temp[1] );
- if ( $restriction != '' ) { //some old entries are empty
+ if ( $restriction != '' ) { // some old entries are empty
$this->mRestrictions[$temp[0]] = explode( ',', $restriction );
}
}
'editmyuserjs',
'editmywatchlist',
'editsemiprotected',
- 'editusercssjs', #deprecated
+ 'editusercssjs', # deprecated
'editusercss',
'edituserjs',
'hideuser',
protected static $mAllRights = false;
/** Cache variables */
- //@{
+ // @{
public $mId;
/** @var string */
public $mName;
protected $mOptionOverrides;
/** @var string */
protected $mPasswordExpires;
- //@}
+ // @}
/**
* Bool Whether the cache variables have been loaded.
*/
- //@{
+ // @{
public $mOptionsLoaded;
/**
* Array with already loaded items or true if all items have been loaded.
*/
protected $mLoadedItems = array();
- //@}
+ // @}
/**
* String Initialization data source if mLoadedItems!==true. May be one of:
}
/** @name newFrom*() static factory methods */
- //@{
+ // @{
/**
* Static factory method for creation from username.
return $user;
}
- //@}
+ // @}
/**
* Get the username corresponding to a given user ID
* @return bool
*/
public function isValidPassword( $password ) {
- //simple boolean wrapper for getPasswordValidity
+ // simple boolean wrapper for getPasswordValidity
return $this->getPasswordValidity( $password ) === true;
}
);
$status = Status::newGood();
- $result = false; //init $result to false for the internal checks
+ $result = false; // init $result to false for the internal checks
if ( !Hooks::run( 'isValidPassword', array( $password, &$result, $this ) ) ) {
$status->error( $result );
return $status;
} else {
$status->error( $result );
- return $status; //the isValidPassword hook set a string $result and returned true
+ return $status; // the isValidPassword hook set a string $result and returned true
}
}
# is b0rked anyway in some browsers, just return nothing. When it's
# re-enabled, fix this code to not output required for e-mail
# registration.
- #$ret = array( 'required' );
+ # $ret = array( 'required' );
$ret = array();
# We can't actually do this right now, because Opera 9.6 will print out
if ( $parsed ) {
return $parsed['host'];
} else {
- // Invalid server spec. There's no sane thing to do here, so just return the canonical server name in full
+ // Invalid server spec.
+ // There's no sane thing to do here, so just return the canonical server name in full.
return $this->mCanonicalServer;
}
}
*
* @todo FIXME: This may be generalized...
*
- * @param string $page Page name (must be normalised before calling this function! May contain a section part.)
+ * @param string $page Page name (must be normalised before calling this function!
+ * May contain a section part.)
* @param string|null $fragmentId
*
* @return string relative URL, without the server part.
xml_parser_set_option( $parser, XML_OPTION_CASE_FOLDING, false );
if ( !xml_parse( $parser, $text, true ) ) {
- //$err = xml_error_string( xml_get_error_code( $parser ) );
- //$position = xml_get_current_byte_index( $parser );
- //$fragment = $this->extractFragment( $html, $position );
- //$this->mXmlError = "$err at byte $position:\n$fragment";
+ // $err = xml_error_string( xml_get_error_code( $parser ) );
+ // $position = xml_get_current_byte_index( $parser );
+ // $fragment = $this->extractFragment( $html, $position );
+ // $this->mXmlError = "$err at byte $position:\n$fragment";
xml_parser_free( $parser );
return false;
}
$this->page->protect();
}
}
-
return;
}
- #NOTE: Permission errors already handled by Action::checkExecute.
+ # NOTE: Permission errors already handled by Action::checkExecute.
if ( $result == array( array( 'readonlytext' ) ) ) {
throw new ReadOnlyError;
}
- #XXX: Would be nice if ErrorPageError could take multiple errors, and/or a status object.
+ # XXX: Would be nice if ErrorPageError could take multiple errors, and/or a status object.
# Right now, we only show the first error
foreach ( $result as $error ) {
throw new ErrorPageError( 'rollbackfailed', $error[0], array_slice( $error, 1 ) );
* @param int $botMax Maximum value for sysops/bots
* @param bool $enforceLimits Whether to enforce (die) if value is outside limits
*/
- protected function validateLimit( $paramName, &$value, $min, $max, $botMax = null, $enforceLimits = false ) {
+ protected function validateLimit( $paramName, &$value, $min, $max, $botMax = null,
+ $enforceLimits = false
+ ) {
if ( !is_null( $min ) && $value < $min ) {
$msg = $this->encodeParamName( $paramName ) . " may not be less than $min (set to $value)";
$this->warnOrDie( $msg, $enforceLimits );
$desc = implode( $paramPrefix, $desc );
}
- //handle shorthand
+ // handle shorthand
if ( !is_array( $paramSettings ) ) {
$paramSettings = array(
self::PARAM_DFLT => $paramSettings,
);
}
- //handle missing type
+ // handle missing type
if ( !isset( $paramSettings[ApiBase::PARAM_TYPE] ) ) {
$dflt = isset( $paramSettings[ApiBase::PARAM_DFLT] )
? $paramSettings[ApiBase::PARAM_DFLT]
'createaccount-title',
'createaccount-text'
) );
- } elseif ( $this->getConfig()->get( 'EmailAuthentication' ) && Sanitizer::validateEmail( $user->getEmail() ) ) {
+ } elseif ( $this->getConfig()->get( 'EmailAuthentication' ) &&
+ Sanitizer::validateEmail( $user->getEmail() )
+ ) {
// Send out an email authentication message if needed
$status->merge( $user->sendConfirmationMail() );
}
}
$msg = wfMessage( 'Contributions' )->inContentLanguage()->text();
- $feedTitle = $config->get( 'Sitename' ) . ' - ' . $msg . ' [' . $config->get( 'LanguageCode' ) . ']';
+ $feedTitle = $config->get( 'Sitename' ) . ' - ' . $msg .
+ ' [' . $config->get( 'LanguageCode' ) . ']';
$feedUrl = SpecialPage::getTitleFor( 'Contributions', $params['user'] )->getFullURL();
$target = $params['user'] == 'newbies'
// only textual content has a "source view".
$html = nl2br( htmlspecialchars( $content->getNativeData() ) );
} else {
- //XXX: we could get an HTML representation of the content via getParserOutput, but that may
+ // XXX: we could get an HTML representation of the content via getParserOutput, but that may
// contain JS magic and generally may not be suitable for inclusion in a feed.
// Perhaps Content should have a getDescriptiveHtml method and/or a getSourceText method.
- //Compare also FeedUtils::formatDiffRow.
+ // Compare also FeedUtils::formatDiffRow.
$html = '';
}
$this->getMain()->getRequest()->response()->header( "Content-Type: $mime; charset=utf-8" );
- //Set X-Frame-Options API results (bug 39180)
+ // Set X-Frame-Options API results (bug 39180)
$apiFrameOptions = $this->getConfig()->get( 'ApiFrameOptions' );
if ( $apiFrameOptions ) {
$this->getMain()->getRequest()->response()->header( "X-Frame-Options: $apiFrameOptions" );
break;
default:
- $this->dieUsage( __METHOD__ . ': Unknown value for \'formatversion\'', 'unknownformatversion' );
+ $this->dieUsage( __METHOD__ .
+ ': Unknown value for \'formatversion\'', 'unknownformatversion' );
}
}
$data = $this->getResult()->getResultData( null, $transform );
$submodules[] = $manager->getModule( $name );
}
}
- $help['submodules'] .= self::getHelpInternal( $context, $submodules, $suboptions, $haveModules );
+ $help['submodules'] .= self::getHelpInternal(
+ $context,
+ $submodules,
+ $suboptions,
+ $haveModules
+ );
$numSubmodules = count( $submodules );
}
$response->header( "Access-Control-Allow-Origin: $originHeader" );
$response->header( 'Access-Control-Allow-Credentials: true' );
- $response->header( "Timing-Allow-Origin: $originHeader" ); # http://www.w3.org/TR/resource-timing/#timing-allow-origin
+ // http://www.w3.org/TR/resource-timing/#timing-allow-origin
+ $response->header( "Timing-Allow-Origin: $originHeader" );
if ( !$preflight ) {
- $response->header( 'Access-Control-Expose-Headers: MediaWiki-API-Error, Retry-After, X-Database-Lag' );
+ $response->header(
+ 'Access-Control-Expose-Headers: MediaWiki-API-Error, Retry-After, X-Database-Lag'
+ );
}
}
)
) {
$this->dieUsage(
- "The '{$module->encodeParamName( 'token' )}' parameter was found in the query string, but must be in the POST body",
+ "The '{$module->encodeParamName( 'token' )}' parameter was " .
+ 'found in the query string, but must be in the POST body',
'mustposttoken'
);
}
$this->reportUnusedParams();
if ( !$this->mInternalMode ) {
- //append Debug information
+ // append Debug information
MWDebug::appendDebugInfoToApiResult( $this->getContext(), $this->getResult() );
// Print result data
$instance = call_user_func( $factory, $this->mParent, $name );
if ( !$instance instanceof $class ) {
- throw new MWException( "The factory function for module $name did not return an instance of $class!" );
+ throw new MWException(
+ "The factory function for module $name did not return an instance of $class!"
+ );
}
} else {
// create instance from class name
'reason' => $params['reason']
);
- //NOTE: we assume that if the old title exists, it's because it was re-created as
+ // NOTE: we assume that if the old title exists, it's because it was re-created as
// a redirect to the new title. This is not safe, but what we did before was
// even worse: we just determined whether a redirect should have been created,
// and reported that it was created if it should have, without any checks.
private $mGoodTitles = array();
private $mMissingPages = array(); // [ns][dbkey] => fake page_id
private $mMissingTitles = array();
- private $mInvalidTitles = array(); // [fake_page_id] => array( 'title' => $title, 'invalidreason' => $reason )
+ /** @var array [fake_page_id] => array( 'title' => $title, 'invalidreason' => $reason ) */
+ private $mInvalidTitles = array();
private $mMissingPageIDs = array();
private $mRedirectTitles = array();
private $mSpecialTitles = array();
* @return Content
*/
private function getContent( WikiPage $page, $pageId = null ) {
- $content = $page->getContent( Revision::RAW ); //XXX: really raw?
+ $content = $page->getContent( Revision::RAW ); // XXX: really raw?
if ( $this->section !== false && $content !== null ) {
$content = $this->getSectionContent(
ApiBase::PARAM_DFLT => 'timestamp|url',
ApiBase::PARAM_ISMULTI => true,
ApiBase::PARAM_HELP_MSG => 'apihelp-query+imageinfo-param-prop',
- ApiBase::PARAM_HELP_MSG_PER_VALUE => ApiQueryImageInfo::getPropertyMessages( $this->propertyFilter ),
+ ApiBase::PARAM_HELP_MSG_PER_VALUE =>
+ ApiQueryImageInfo::getPropertyMessages( $this->propertyFilter ),
),
'prefix' => null,
'minsize' => array(
$this->addOption( 'LIMIT', $limit + 1 );
$res = $this->select( __METHOD__ );
- //Get gender information
+ // Get gender information
if ( MWNamespace::hasGenderDistinction( $params['namespace'] ) ) {
$users = array();
foreach ( $res as $row ) {
$users[] = $row->page_title;
}
GenderCache::singleton()->doQuery( $users, __METHOD__ );
- $res->rewind(); //reset
+ $res->rewind(); // reset
}
$count = 0;
$this->addFields( 'ipb_deleted' );
if ( $showBlockInfo ) {
- $this->addFields( array( 'ipb_id', 'ipb_by', 'ipb_by_text', 'ipb_reason', 'ipb_expiry', 'ipb_timestamp' ) );
+ $this->addFields( array(
+ 'ipb_id',
+ 'ipb_by',
+ 'ipb_by_text',
+ 'ipb_reason',
+ 'ipb_expiry',
+ 'ipb_timestamp'
+ ) );
}
// Don't show hidden names
// iterate over $images to handle continue param correct
foreach ( $images as $image => $pageId ) {
if ( !isset( $sha1s[$image] ) ) {
- continue; //file does not exist
+ continue; // file does not exist
}
$sha1 = $sha1s[$image];
$dupFiles = $filesBySha1s[$sha1];
foreach ( $dupFiles as $dupFile ) {
$dupName = $dupFile->getName();
if ( $image == $dupName && $dupFile->isLocal() ) {
- continue; //ignore the local file itself
+ continue; // ignore the local file itself
}
if ( $skipUntilThisDup !== false && $dupName < $skipUntilThisDup ) {
- continue; //skip to pos after the image from continue param
+ continue; // skip to pos after the image from continue param
}
$skipUntilThisDup = false;
if ( ++$count > $params['limit'] ) {
- $fit = false; //break outer loop
+ $fit = false; // break outer loop
// We're one over limit which shows that
// there are additional images to be had. Stop here...
$this->setContinueEnumParameter( 'continue', $image . '|' . $dupName );
// in the actual normalised version, only if we can actually normalise them,
// so we use the functions scope to throw away the normalisations.
if ( !$h->normaliseParams( $image, $finalParams ) ) {
- $this->dieUsage( "Could not normalise image parameters for " . $image->getName(), "urlparamnormal" );
+ $this->dieUsage( 'Could not normalise image parameters for ' .
+ $image->getName(), 'urlparamnormal' );
}
}
}
if ( !$canShowField( File::DELETED_FILE ) ) {
- //Early return, tidier than indenting all following things one level
+ // Early return, tidier than indenting all following things one level
return $vals;
}
);
}
- //FIXME: (follow-up) To allow extensions to add to the language links, we need
+ // FIXME: (follow-up) To allow extensions to add to the language links, we need
// to load them all, add the extra links, then apply paging.
// Should not be terrible, it's not going to be more than a few hundred links.
*/
private function getAllowedLogActions() {
$config = $this->getConfig();
- return array_keys( array_merge( $config->get( 'LogActions' ), $config->get( 'LogActionsHandlers' ) ) );
+ return array_keys( array_merge(
+ $config->get( 'LogActions' ),
+ $config->get( 'LogActionsHandlers' )
+ ) );
}
public function getCacheMode( $params ) {
$end = null;
}
- list( $left, $continue ) = $this->runQuery( $resultPageSet, $params['limit'], $start, $startId, $end );
+ list( $left, $continue ) =
+ $this->runQuery( $resultPageSet, $params['limit'], $start, $startId, $end );
if ( $end === null && $continue === null ) {
// Wrap around. We do this even if $left === 0 for continuation
// (saving a DB query in this rare case probably isn't worth the
$text = null;
if ( $this->expandTemplates && !$this->parseContent ) {
- #XXX: implement template expansion for all content types in ContentHandler?
+ # XXX: implement template expansion for all content types in ContentHandler?
if ( $content->getModel() === CONTENT_MODEL_WIKITEXT ) {
$text = $content->getNativeData();
$vals['ratelimits'] = $this->getRateLimits();
}
- if ( isset( $this->prop['realname'] ) && !in_array( 'realname', $this->getConfig()->get( 'HiddenPrefs' ) ) ) {
+ if ( isset( $this->prop['realname'] ) &&
+ !in_array( 'realname', $this->getConfig()->get( 'HiddenPrefs' ) )
+ ) {
$vals['realname'] = $user->getRealName();
}
$this->mParams = $this->extractRequestParams();
$request = $this->getMain()->getRequest();
// Check if async mode is actually supported (jobs done in cli mode)
- $this->mParams['async'] = ( $this->mParams['async'] && $this->getConfig()->get( 'EnableAsyncUploads' ) );
+ $this->mParams['async'] = ( $this->mParams['async'] &&
+ $this->getConfig()->get( 'EnableAsyncUploads' ) );
// Add the uploaded file to the params array
$this->mParams['file'] = $request->getFileName( 'file' );
$this->mParams['chunk'] = $request->getFileName( 'chunk' );
switch ( $exceptionType ) {
case 'UploadStashFileNotFoundException':
- $this->dieUsage( 'Could not find the file in the stash: ' . $e->getMessage(), 'stashedfilenotfound' );
+ $this->dieUsage(
+ 'Could not find the file in the stash: ' . $e->getMessage(),
+ 'stashedfilenotfound'
+ );
break;
case 'UploadStashBadPathException':
- $this->dieUsage( 'File key of improper format or otherwise invalid: ' . $e->getMessage(), 'stashpathinvalid' );
+ $this->dieUsage(
+ 'File key of improper format or otherwise invalid: ' . $e->getMessage(),
+ 'stashpathinvalid'
+ );
break;
case 'UploadStashFileException':
- $this->dieUsage( 'Could not store upload in the stash: ' . $e->getMessage(), 'stashfilestorage' );
+ $this->dieUsage(
+ 'Could not store upload in the stash: ' . $e->getMessage(),
+ 'stashfilestorage'
+ );
break;
case 'UploadStashZeroLengthFileException':
- $this->dieUsage( 'File is of zero length, and could not be stored in the stash: ' . $e->getMessage(), 'stashzerolength' );
+ $this->dieUsage(
+ 'File is of zero length, and could not be stored in the stash: ' .
+ $e->getMessage(),
+ 'stashzerolength'
+ );
break;
case 'UploadStashNotLoggedInException':
$this->dieUsage( 'Not logged in: ' . $e->getMessage(), 'stashnotloggedin' );
"apihelp-query+alldeletedrevisions-param-namespace": "Only list pages in this namespace.",
"apihelp-query+alldeletedrevisions-param-miser-user-namespace": "<strong>Note:</strong> Due to [[mw:Manual:$wgMiserMode|miser mode]], using <var>$1user</var> and <var>$1namespace</var> together may result in fewer than <var>$1limit</var> results returned before continuing; in extreme cases, zero results may be returned.",
"apihelp-query+alldeletedrevisions-param-generatetitles": "When being used as a generator, generate titles rather than revision IDs.",
- "apihelp-query+alldeletedrevisions-example-user": "List the last 50 deleted contributions by user <kbd>Example<kbd>.",
+ "apihelp-query+alldeletedrevisions-example-user": "List the last 50 deleted contributions by user <kbd>Example</kbd>.",
"apihelp-query+alldeletedrevisions-example-ns-main": "List the first 50 deleted revisions in the main namespace.",
"apihelp-query+allfileusages-description": "List all file usages, including non-existing.",
"apihelp-query+backlinks-param-filterredir": "How to filter for redirects. If set to <kbd>nonredirects</kbd> when <var>$1redirect</var> is enabled, this is only applied to the second level.",
"apihelp-query+backlinks-param-limit": "How many total pages to return. If <var>$1redirect</var> is enabled, the limit applies to each level separately (which means up to 2 * <var>$1limit</var> results may be returned).",
"apihelp-query+backlinks-param-redirect": "If linking page is a redirect, find all pages that link to that redirect as well. Maximum limit is halved.",
- "apihelp-query+backlinks-example-simple": "Show links to <kbd>Main page<kbd>.",
- "apihelp-query+backlinks-example-generator": "Get information about pages linking to <kbd>Main page<kbd>.",
+ "apihelp-query+backlinks-example-simple": "Show links to <kbd>Main page</kbd>.",
+ "apihelp-query+backlinks-example-generator": "Get information about pages linking to <kbd>Main page</kbd>.",
"apihelp-query+blocks-description": "List all blocked users and IP addresses.",
"apihelp-query+blocks-param-start": "The timestamp to start enumerating from.",
"apihelp-query+extlinks-param-protocol": "Protocol of the URL. If empty and <var>$1query</var> is set, the protocol is <kbd>http</kbd>. Leave both this and <var>$1query</var> empty to list all external links.",
"apihelp-query+extlinks-param-query": "Search string without protocol. Useful for checking whether a certain page contains a certain external url.",
"apihelp-query+extlinks-param-expandurl": "Expand protocol-relative URLs with the canonical protocol.",
- "apihelp-query+extlinks-example-simple": "Get a list of external links on <kbd>Main Page<kbd>.",
+ "apihelp-query+extlinks-example-simple": "Get a list of external links on <kbd>Main Page</kbd>.",
"apihelp-query+exturlusage-description": "Enumerate pages that contain a given URL.",
"apihelp-query+exturlusage-param-prop": "Which pieces of information to include:",
"apihelp-parse-param-pst": "Faire une transformation avant enregistrement de l’entrée avant de l’analyser. Valide uniquement quand utilisé avec du texte.",
"apihelp-parse-param-onlypst": "Faire une transformation avant enregistrement (PST) de l’entrée, mais ne pas l’analyser. Renvoie le même wikitexte, après que la PST a été appliquée. Valide uniquement quand utilisé avec <var>$1text</var>.",
"apihelp-parse-param-effectivelanglinks": "Inclut les liens de langue fournis par les extensions (à utiliser avec <kbd>$1prop=langlinks</kbd>).",
- "apihelp-parse-param-section": "Récupérer uniquement le contenu de ce numéro de section ou quand <kbd>nouveau</kbd> génère une nouvelle section.\n\nLa <kbd>nouvelle</kbd> section est mise à l’honneur uniquement quand <var>text</var> est spécifié.",
+ "apihelp-parse-param-section": "Traiter uniquement le contenu de la section ayant ce numéro.\n\nQuand la valeur est <kbd>new</kbd>, traite <var>$1text</var> et <var>$1sectiontitle</var> comme s’ils correspondaient à une nouvelle section de la page.\n\nLa valeur <kbd>new</kbd> n’est autorisée que si <var>text</var> est défini.",
"apihelp-parse-param-sectiontitle": "Nouveau titre de section quand <var>section</var> vaut <kbd>nouveau</kbd>.\n\nÀ la différence de la modification de page, cela ne revient pas à <var>summary</var> quand il est omis ou vide.",
"apihelp-parse-param-disablelimitreport": "Omettre le rapport de limite (« rapport de limite du nouveau PP ») de la sortie de l’analyseur.",
"apihelp-parse-param-disablepp": "Utiliser <var>$1disablelimitreport</var> à la place.",
"apihelp-query+querypage-param-limit": "返す結果の数。",
"apihelp-query+querypage-example-ancientpages": "[[Special:Ancientpages]] の結果を返す。",
"apihelp-query+random-param-namespace": "この名前空間にあるページのみを返します。",
+ "apihelp-query+random-param-filterredir": "どうやってリダイレクトのためのフィルターをするのか",
"apihelp-query+random-example-simple": "標準名前空間から2つのページを無作為に返す。",
"apihelp-query+random-example-generator": "標準名前空間から無作為に選ばれた2つのページのページ情報を返す。",
"apihelp-query+recentchanges-description": "最近の更新を一覧表示します。",
"Ysjbserver",
"Alex00728",
"Hwangjy9",
- "Kurousagi"
+ "Kurousagi",
+ "Revi"
]
},
"apihelp-main-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:API:Main_page|설명문서]]\n* [[mw:API:FAQ|FAQ]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api 메일링 리스트]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce API 공지 사항] * [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R 버그 및 요청] </div>\n<strong>상태:</strong> 이 페이지에 표시된 모든 기능은 정상 작동할 것이지만, API는 여전히 활발하게 개발되고 있으며, 언제든지 바뀔 수 있습니다. 업데이트 정보를 받아보려면 [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ the mediawiki-api-announce 메일링 리스트]를 구독하십시오.\n\n<strong>잘못된 요청:</strong> API에 잘못된 요청이 전송되면 HTTP 헤더에서 \"MediaWiki-API-Error\" 키를 보내고, 헤더 값과 오류 코드가 같게 설정됩니다. 자세한 정보에 대해서는 [[mw:API:Errors_and_warnings|API:오류 및 경고]]를 참조하십시오.",
"apihelp-main-param-format": "출력값의 형식.",
"apihelp-block-description": "사용자를 차단합니다.",
"apihelp-block-param-user": "차단하고자 하는 계정 이름, IP 주소 또는 대역",
- "apihelp-block-param-expiry": "기한. 상대값(예시: \"5 months\" 또는 \"2 weeks\") 또는 절대값(예시: \"2014-09-18T12:34:56Z\")이 될 수 있습니다. \"infinite\", \"indefinite\" 또는 \"never\"로 설정하면 무기한으로 설정됩니다.",
+ "apihelp-block-param-expiry": "기한. 상대값(예시: <kbd>5 months</kbd> 또는 </kbd>2 weeks</kbd>) 또는 절대값(예시: <kbd>2014-09-18T12:34:56Z</kbd>)이 될 수 있습니다. <kbd>infinite</kbd>, <kbd>indefinite</kbd> 또는 <kbd>never</kbd>로 설정하면 무기한으로 설정됩니다.",
"apihelp-block-param-reason": "차단 이유.",
"apihelp-block-param-anononly": "익명 사용자만 차단합니다. (즉, 이 IP의 익명 편집을 막음)",
"apihelp-block-param-nocreate": "계정 생성을 막습니다.",
"apihelp-block-param-watchuser": "해당 사용자 또는 IP 주소의 사용자 문서 및 토론 문서를 주시합니다.",
"apihelp-block-example-ip-simple": "IP <kbd>192.0.2.5</kbd>에 대해 <kbd>First strike</kbd>라는 이유로 3일간 차단하기",
"apihelp-block-example-user-complex": "사용자 <kbd>Vandal</kbd>을 <kbd>Vandalism</kbd>이라는 이유로 무기한 차단하며 계정 생성 및 이메일 발송을 막기",
+ "apihelp-checktoken-param-token": "테스트할 토큰",
"apihelp-createaccount-description": "새 사용자 계정을 만듭니다.",
"apihelp-createaccount-param-name": "사용자 이름",
"apihelp-createaccount-param-email": "사용자 이메일 주소 (선택).",
"apihelp-emailuser-param-target": "이메일을 받을 사용자.",
"apihelp-expandtemplates-param-title": "문서 제목",
"apihelp-expandtemplates-param-text": "변환할 위키텍스트.",
+ "apihelp-feedcontributions-param-deletedonly": "삭제된 기여만 봅니다.",
+ "apihelp-feedcontributions-param-toponly": "최신 판인 편집만 봅니다.",
"apihelp-feedrecentchanges-param-hideminor": "사소한 편집을 숨깁니다.",
"apihelp-feedrecentchanges-param-hidebots": "봇의 편집을 숨깁니다.",
"apihelp-feedrecentchanges-param-hideanons": "익명 사용자의 편집을 숨깁니다.",
"authors": [
"Fasouzafreitas",
"Dianakc",
- "Cainamarques"
+ "Cainamarques",
+ "Rhcastilhos"
]
},
"apihelp-main-param-action": "Qual ação executar.",
"apihelp-edit-param-sectiontitle": "O título para uma nova seção.",
"apihelp-edit-param-text": "Conteúdo da página",
"apihelp-edit-param-minor": "Edição menor.",
+ "apihelp-edit-param-notminor": "Edição não-menor.",
"apihelp-edit-param-bot": "Marcar esta edição como feita por bot.",
"apihelp-edit-param-createonly": "Não editar a página se já existir.",
"apihelp-edit-param-nocreate": "Mostra um erro se a página não existir.",
"apihelp-emailuser-param-subject": "Cabeçalho do assunto.",
"apihelp-emailuser-param-text": "Corpo do email.",
"apihelp-emailuser-param-ccme": "Envie uma cópia deste email para mim.",
+ "apihelp-emailuser-example-email": "Enviar um e-mail ao usuário <kbd>WikiSysop</kbd> com o texto <kbd>Content</kbd>.",
"apihelp-expandtemplates-description": "Expande todas a predefinições em wikitexto.",
"apihelp-expandtemplates-param-title": "Título da página.",
"apihelp-expandtemplates-param-text": "Wikitexto para converter.",
+ "apihelp-expandtemplates-paramvalue-prop-wikitext": "O wikitexto expandido.",
"apihelp-feedcontributions-description": "Retorna o feed de contribuições de um usuário.",
"apihelp-feedcontributions-param-feedformat": "O formato do feed.",
"apihelp-feedcontributions-param-namespace": "A partir de qual espaço nominal filtrar contribuições.",
"apihelp-move-param-noredirect": "Não cria um redirecionamento.",
"apihelp-move-param-watch": "Adiciona a página e o redirecionamento para a lista de vigiados do usuário atual.",
"apihelp-move-param-unwatch": "Remove a página e o redirecionamento para a lista de vigiados do usuário atual.",
+ "apihelp-move-param-ignorewarnings": "Ignorar quaisquer avisos.",
+ "apihelp-opensearch-param-search": "Pesquisar string.",
"apihelp-opensearch-param-limit": "O número máximo a se retornar.",
"apihelp-opensearch-param-namespace": "Espaço nominal para pesquisar.",
+ "apihelp-opensearch-param-format": "O formato da saída.",
"apihelp-opensearch-example-te": "Encontra páginas começando com <kbd>Te</kbd>.",
"apihelp-options-param-reset": "Redefinir preferências para os padrões do site.",
"apihelp-options-example-reset": "Resetar todas as preferências",
"apihelp-protect-example-unprotect2": "Desprotege uma página ao não definir restrições.",
"apihelp-purge-param-forcelinkupdate": "Atualiza as tabelas de links.",
"apihelp-purge-param-forcerecursivelinkupdate": "Atualiza a tabela de links, e atualiza as tabelas de links para qualquer página que usa essa página como um modelo.",
+ "apihelp-query-param-prop": "Quais propriedades obter para as páginas consultadas.",
"apihelp-query-param-list": "Quais listas obter.",
"apihelp-query-param-meta": "Quais metadados obter.",
"apihelp-query+allcategories-description": "Enumera todas as categorias.",
"apihelp-query+allcategories-param-min": "Retorna apenas as categorias com pelo menos esta quantidade de membros.",
"apihelp-query+allcategories-param-max": "Retorna apenas as categorias com no máximo esta quantidade de membros.",
"apihelp-query+allcategories-param-limit": "Quantas categorias retornar.",
+ "apihelp-query+allcategories-param-prop": "Que propriedades obter:",
"apihelp-query+allcategories-example-size": "Lista categorias com a informação sobre o número de páginas em cada uma.",
"apihelp-query+alldeletedrevisions-description": "Lista todas as revisões excluídas por um usuário ou em um espaço nominal.",
"apihelp-query+alldeletedrevisions-paraminfo-useronly": "Só pode ser usada com <var>$3user</var>.",
"apihelp-query+allfileusages-description": "Lista todas as utilizações de arquivo, incluindo os não-existentes.",
"apihelp-query+allfileusages-param-from": "O título do arquivo a partir do qual começar a enumerar.",
"apihelp-query+allfileusages-param-to": "O título do arquivo onde parar de enumerar.",
+ "apihelp-query+allfileusages-paramvalue-prop-title": "Adiciona o título do arquivo.",
"apihelp-query+allfileusages-param-limit": "Quantos itens retornar.",
"apihelp-query+allimages-param-user": "Retorna apenas os arquivos enviados por este usuário. Só pode ser usado com $1sort=timestamp. Não pode ser usado em conjunto com $1filterbots.",
"apihelp-query+allimages-param-filterbots": "Como filtrar arquivos enviados por bots. Só pode ser usado com $1sort=timestamp. Não pode ser usado em conjunto com $1user.",
"apihelp-expandtemplates-paramvalue-prop-parsetree": "Дерево разбора XML входных данных.",
"apihelp-feedcontributions-param-year": "От года (и ранее).",
"apihelp-feedcontributions-param-month": "От месяца (и ранее).",
+ "apihelp-feedcontributions-param-deletedonly": "Показать только удалённые правки.",
+ "apihelp-feedcontributions-param-toponly": "Показать только правки, являющиеся последними версиями.",
"apihelp-feedcontributions-param-newonly": "Показывать только правки, являющиеся созданием страниц.",
"apihelp-feedcontributions-param-showsizediff": "Показать размер различия между версиями.",
+ "apihelp-feedcontributions-example-simple": "Показать вклад участника <kbd>Example</kbd>.",
+ "apihelp-feedrecentchanges-param-invert": "Все пространства имён, кроме выбранного.",
"apihelp-feedrecentchanges-param-limit": "Максимальное число возвращаемых результатов.",
"apihelp-feedrecentchanges-param-from": "Показать изменения с тех пор.",
"apihelp-feedrecentchanges-param-hideminor": "Скрыть малые правки.",
"apihelp-feedrecentchanges-param-hidebots": "Скрыть правки ботов.",
"apihelp-feedrecentchanges-param-hideanons": "Скрыть изменения, внесённые анонимными участниками.",
+ "apihelp-feedrecentchanges-param-hideliu": "Скрыть правки зарегистрированных участников.",
"apihelp-feedrecentchanges-param-hidepatrolled": "Скрыть отпатруллированные правки.",
"apihelp-feedrecentchanges-param-hidemyself": "Скрыть изменения, сделанные текущим участником.",
"apihelp-feedrecentchanges-param-tagfilter": "Фильтр по тегам.",
+ "apihelp-feedrecentchanges-param-target": "Показать только правки на страницах, на которые ссылается данная.",
+ "apihelp-feedrecentchanges-param-showlinkedto": "Показать правки на страницах, ссылающихся на данную.",
"apihelp-feedrecentchanges-example-simple": "Список последних изменений.",
"apihelp-feedrecentchanges-example-30days": "Показать последние изменения в течение 30 дней.",
+ "apihelp-feedwatchlist-param-linktosections": "Ссылаться прямо на разделы с изменениями, если возможно.",
+ "apihelp-filerevert-param-filename": "Целевое имя файла без префикса File:.",
"apihelp-filerevert-param-comment": "Загрузить комментарий.",
"apihelp-help-example-main": "Помощь по главному модулю.",
"apihelp-help-example-recursive": "Вся справка в одном разделе.",
"apihelp-imagerotate-example-generator": "Повернуть все изображения в <kbd>Category:Flip</kbd> на <kbd>180</kbd> градусов.",
"apihelp-import-param-summary": "Импорт итога",
"apihelp-import-param-xml": "Загруженный XML-файл.",
+ "apihelp-import-example-import": "Импортировать [[meta:Help:ParserFunctions]] с полной историей в пространство имён 100.",
"apihelp-login-param-name": "Имя участника.",
"apihelp-login-param-password": "Пароль.",
"apihelp-login-param-domain": "Домен (необязательно).",
"apihelp-options-example-reset": "Сбросить все настройки.",
"apihelp-paraminfo-description": "Получить информацию о модулях API.",
"apihelp-paraminfo-param-helpformat": "Формат строк справки.",
+ "apihelp-parse-param-disabletoc": "Не включать в вывод таблицу содержания.",
"apihelp-parse-example-page": "анализ страницы",
"apihelp-parse-example-text": "Анализ wikitext.",
"apihelp-protect-description": "Изменить уровень защиты страницы.",
},
"apihelp-block-param-reason": "Arsyeja për bllokim.",
"apihelp-move-param-reason": "Arsyeja për riemërtim.",
+ "apihelp-query+siteinfo-paramvalue-prop-statistics": "Kthehet në faqen e statistikave.",
"apihelp-tag-param-reason": "Arsyeja për ndërrimin.",
"apihelp-unblock-description": "Zhblloko një përdorues.",
"apihelp-userrights-description": "Ndërro anëtarësinë e grupit të një përdoruesit."
"apihelp-parse-paramvalue-prop-parsetree": "修订内容的XML解析树(需要内容模型<code>$1</code>)",
"apihelp-parse-param-pst": "在解析输入前,对输入做一次保存前变换处理。仅当使用文本时有效。",
"apihelp-parse-param-effectivelanglinks": "包含由扩展提供的语言链接(用于与<kbd>$1prop=langlinks</kbd>一起使用)。",
- "apihelp-parse-param-section": "只检索此段数的内容,或只当<kbd>new</kbd>生成新的段落时检索。\n\n<kbd>new</kbd>段落只当指定<var>text</var>时受尊重。",
+ "apihelp-parse-param-section": "只解析此段数的内容。\n\n当<kbd>new</kbd>时,将<var>$1text</var>和<var>$1sectiontitle</var>解析为添加新段落至页面。\n\n<kbd>new</kbd>段落只当指定<var>text</var>时允许。",
"apihelp-parse-param-sectiontitle": "当<var>section</var>为<kbd>new</kbd>时新段落标题。\n\n不像页面编辑,当省略或为空时将不会备选为<var>summary</var>。",
"apihelp-parse-param-disablelimitreport": "从解析器输出中省略限制报告(“NewPP limit report”)。",
"apihelp-parse-param-disablepp": "请改用<var>$1disablelimitreport</var>。",
"apihelp-setnotificationtimestamp-example-pagetimestamp": "设置<kbd>Main page</kbd>的通知时间戳,这样所有从2012年1月1日起的编辑都会是未复核的。",
"apihelp-setnotificationtimestamp-example-allpages": "重置在<kbd>{{ns:user}}</kbd>名字空间中的页面的通知状态。",
"apihelp-stashedit-param-title": "已开始编辑的页面标题。",
+ "apihelp-stashedit-param-section": "段落数。<kbd>0</kbd>用于首段,<kbd>new</kbd>用于新的段落。",
+ "apihelp-stashedit-param-sectiontitle": "新段落的标题。",
"apihelp-stashedit-param-text": "页面内容。",
"apihelp-stashedit-param-contentmodel": "新内容的内容模型。",
"apihelp-tag-description": "从个别修订或日志记录中添加或移除更改标签。",
$saveSuccess = $this->saveToCaches( $cache, 'all', $code );
if ( !$saveSuccess ) {
- # Cache save has failed.
- # There are two main scenarios where this could be a problem:
- #
- # - The cache is more than the maximum size (typically
- # 1MB compressed).
- #
- # - Memcached has no space remaining in the relevant slab
- # class. This is unlikely with recent versions of
- # memcached.
- #
- # Either way, if there is a local cache, nothing bad will
- # happen. If there is no local cache, disabling the message
- # cache for all requests avoids incurring a loadFromDB()
- # overhead on every request, and thus saves the wiki from
- # complete downtime under moderate traffic conditions.
+ /**
+ * Cache save has failed.
+ *
+ * There are two main scenarios where this could be a problem:
+ * - The cache is more than the maximum size (typically 1MB compressed).
+ * - Memcached has no space remaining in the relevant slab class. This is
+ * unlikely with recent versions of memcached.
+ *
+ * Either way, if there is a local cache, nothing bad will happen. If there
+ * is no local cache, disabling the message cache for all requests avoids
+ * incurring a loadFromDB() overhead on every request, and thus saves the
+ * wiki from complete downtime under moderate traffic conditions.
+ */
if ( !$wgUseLocalMessageCache ) {
$this->mMemc->set( $statusKey, 'error', 60 * 5 );
$where[] = 'could not save cache, disabled globally for 5 minutes';
$this->mAttribs['rc_timestamp'] = $dbw->timestamp( $this->mAttribs['rc_timestamp'] );
$this->mAttribs['rc_id'] = $dbw->nextSequenceValue( 'recentchanges_rc_id_seq' );
- ## If we are using foreign keys, an entry of 0 for the page_id will fail, so use NULL
+ # # If we are using foreign keys, an entry of 0 for the page_id will fail, so use NULL
if ( $dbw->cascadingDeletes() && $this->mAttribs['rc_cur_id'] == 0 ) {
unset( $this->mAttribs['rc_cur_id'] );
}
$type, $action, $target, $logComment, $params, $newId = 0, $actionCommentIRC = '' ) {
global $wgRequest;
- ## Get pageStatus for email notification
+ # # Get pageStatus for email notification
switch ( $type . '-' . $action ) {
case 'delete-delete':
$pageStatus = 'deleted';
* @deprecated since 1.25, use UtfNormal\Constants instead
*/
define( 'UTF8_REPLACEMENT', "\xef\xbf\xbd" /*codepointToUtf8( UNICODE_REPLACEMENT )*/ );
-#define( 'UTF8_REPLACEMENT', '!' );
+# define( 'UTF8_REPLACEMENT', '!' );
/**
* @deprecated since 1.25, use UtfNormal\Constants instead
*/
public function convert( $toModel, $lossy = '' ) {
if ( $this->getModel() === $toModel ) {
- //nothing to do, shorten out.
+ // nothing to do, shorten out.
return $this;
}
* @return DifferenceEngine
*/
public function createDifferenceEngine( IContextSource $context, $old = 0, $new = 0,
- $rcid = 0, //FIXME: Deprecated, no longer used
+ $rcid = 0, // FIXME: Deprecated, no longer used
$refreshCache = false, $unhide = false ) {
// hook: get difference engine
* @return Message The message object.
*/
public function getNativeData() {
- //NOTE: Message objects are mutable. Cloning here makes MessageContent immutable.
+ // NOTE: Message objects are mutable. Cloning here makes MessageContent immutable.
return clone $this->mMessage;
}
}
$this->db->dropTable( $tbl, __METHOD__ );
wfDebug( __METHOD__ . " dropping {$newTableName}\n" );
- //Dropping the oldTable because the prefix was changed
+ // Dropping the oldTable because the prefix was changed
}
# Create new table
$preLimitTail .= $this->makeOrderBy( $options );
// if (isset($options['LIMIT'])) {
- // $tailOpts .= $this->limitResult('', $options['LIMIT'],
- // isset($options['OFFSET']) ? $options['OFFSET']
- // : false);
+ // $tailOpts .= $this->limitResult('', $options['LIMIT'],
+ // isset($options['OFFSET']) ? $options['OFFSET']
+ // : false);
// }
if ( isset( $noKeyOptions['FOR UPDATE'] ) ) {
if ( !$alias || (string)$alias === (string)$name ) {
return $name;
} else {
- return $name . ' AS ' . $alias; //PostgreSQL needs AS
+ return $name . ' AS ' . $alias; // PostgreSQL needs AS
}
}
$value = $this->mDefaultBigSelects;
}
} elseif ( $this->mDefaultBigSelects === null ) {
- $this->mDefaultBigSelects = (bool)$this->selectField( false, '@@sql_big_selects', '', __METHOD__ );
+ $this->mDefaultBigSelects =
+ (bool)$this->selectField( false, '@@sql_big_selects', '', __METHOD__ );
}
$encValue = $value ? '1' : '0';
$this->query( "SET sql_big_selects=$encValue", __METHOD__ );
MediaWiki\restoreWarnings();
if ( $this->mUser != $this->mDBname ) {
- //change current schema in session
+ // change current schema in session
$this->selectDB( $this->mDBname );
}
* @return string Version information from the database
*/
function getServerVersion() {
- //better version number, fallback on driver
+ // better version number, fallback on driver
$rset = $this->doQuery(
'SELECT version FROM product_component_version ' .
'WHERE UPPER(product) LIKE \'ORACLE DATABASE%\''
$preLimitTail .= $this->makeOrderBy( $options );
- //if ( isset( $options['LIMIT'] ) ) {
- // $tailOpts .= $this->limitResult( '', $options['LIMIT'],
- // isset( $options['OFFSET'] ) ? $options['OFFSET']
- // : false );
- //}
+ // if ( isset( $options['LIMIT'] ) ) {
+ // $tailOpts .= $this->limitResult( '', $options['LIMIT'],
+ // isset( $options['OFFSET'] ) ? $options['OFFSET']
+ // : false );
+ // }
if ( isset( $options['FOR UPDATE'] ) ) {
$postLimitTail .= ' FOR UPDATE OF ' .
return (int)$s;
} elseif ( strpos( $s, "\0" ) !== false ) {
// SQLite doesn't support \0 in strings, so use the hex representation as a workaround.
- // This is a known limitation of SQLite's mprintf function which PDO should work around,
- // but doesn't. I have reported this to php.net as bug #63419:
+ // This is a known limitation of SQLite's mprintf function which PDO
+ // should work around, but doesn't. I have reported this to php.net as bug #63419:
// https://bugs.php.net/bug.php?id=63419
// There was already a similar report for SQLite3::escapeString, bug #62361:
// https://bugs.php.net/bug.php?id=62361
// There is an additional bug regarding sorting this data after insert
// on older versions of sqlite shipped with ubuntu 12.04
// https://phabricator.wikimedia.org/T74367
- wfDebugLog( __CLASS__, __FUNCTION__ . ': Quoting value containing null byte. For consistency all binary data should have been first processed with self::encodeBlob()' );
+ wfDebugLog(
+ __CLASS__,
+ __FUNCTION__ .
+ ': Quoting value containing null byte. ' .
+ 'For consistency all binary data should have been ' .
+ 'first processed with self::encodeBlob()'
+ );
return "x'" . bin2hex( $s ) . "'";
} else {
return $this->mConn->quote( $s );
$indexInfo = $this->query( 'PRAGMA INDEX_INFO(' . $this->addQuotes( $index->name ) . ')' );
$fields = array();
foreach ( $indexInfo as $indexInfoRow ) {
- $fields[ $indexInfoRow->seqno ] = $indexInfoRow->name;
+ $fields[$indexInfoRow->seqno] = $indexInfoRow->name;
}
$sql .= '(' . implode( ',', $fields ) . ')';
return false;
}
- #wfDebugLog( 'connect', var_export( $loads, true ) );
+ # wfDebugLog( 'connect', var_export( $loads, true ) );
# Return a random representative of the remainder
return ArrayUtils::pickRandom( $loads );
"Connection error: {last_error} ({db_server})",
$context
);
- $conn->reportConnectionError( "{$this->mLastError} ({$context['db_server']})" ); // throws DBConnectionError
+
+ // throws DBConnectionError
+ $conn->reportConnectionError( "{$this->mLastError} ({$context['db_server']})" );
}
return false; /* not reached */
# (a) Check the local APC cache
$value = $this->srvCache->get( $key );
if ( $value && $value['timestamp'] > ( microtime( true ) - $ttl ) ) {
- wfDebugLog( 'replication', __FUNCTION__ . ": got lag times ($key) from local cache" );
+ wfDebugLog( 'replication', __FUNCTION__ . ": got lag times ($key) from local cache" );
return $value['lagTimes']; // cache hit
}
$staleValue = $value ?: false;
$value = $this->mainCache->get( $key );
if ( $value && $value['timestamp'] > ( microtime( true ) - $ttl ) ) {
$this->srvCache->set( $key, $value, $staleTTL );
- wfDebugLog( 'replication', __FUNCTION__ . ": got lag times ($key) from main cache" );
+ wfDebugLog( 'replication', __FUNCTION__ . ": got lag times ($key) from main cache" );
return $value['lagTimes']; // cache hit
}
$value = array( 'lagTimes' => $lagTimes, 'timestamp' => microtime( true ) );
$this->mainCache->set( $key, $value, $staleTTL );
$this->srvCache->set( $key, $value, $staleTTL );
- wfDebugLog( 'replication', __FUNCTION__ . ": re-calculated lag times ($key)" );
+ wfDebugLog( 'replication', __FUNCTION__ . ": re-calculated lag times ($key)" );
return $value['lagTimes'];
}
}
if ( is_scalar( $item ) ) {
- return (string) $item;
+ return (string)$item;
}
if ( is_array( $item ) ) {
if ( is_object( $item ) ) {
if ( method_exists( $item, '__toString' ) ) {
- return (string) $item;
+ return (string)$item;
}
return '[Object ' . get_class( $item ) . ']';
return parent::handle( $record );
}
}
-
* @param int $level The minimum logging level at which this handler will be triggered
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
*/
- public function __construct( Produce $produce, array $options, $level = Logger::DEBUG, $bubble = true ) {
+ public function __construct(
+ Produce $produce, array $options, $level = Logger::DEBUG, $bubble = true
+ ) {
parent::__construct( $level, $bubble );
$this->produce = $produce;
$this->options = array_merge( self::$defaultOptions, $options );
* @param bool $bubble Whether the messages that are handled can bubble the stack or not
* @return KafkaHandler
*/
- public static function factory( $kafkaServers, array $options = array(), $level = Logger::DEBUG, $bubble = true ) {
+ public static function factory(
+ $kafkaServers, array $options = array(), $level = Logger::DEBUG, $bubble = true
+ ) {
$metadata = new MetaDataFromKafka( $kafkaServers );
$produce = new Produce( $metadata );
if ( isset( $options['logExceptions'] ) && is_string( $options['logExceptions'] ) ) {
*/
abstract class DataUpdate implements DeferrableUpdate {
public function __construct() {
- //noop
+ // noop
}
/**
* This default implementation does nothing.
*/
public function beginTransaction() {
- //noop
+ // noop
}
/**
* This default implementation does nothing.
*/
public function commitTransaction() {
- //noop
+ // noop
}
/**
* This default implementation does nothing.
*/
public function rollbackTransaction() {
- //noop
+ // noop
}
/**
*/
public function enqueueUpdate();
}
-
# Strip all remaining non-search characters
$text = preg_replace( "/[^{$lc}]+/", " ", $text );
- # Handle 's, s'
- #
- # $text = preg_replace( "/([{$lc}]+)'s /", "\\1 \\1's ", $text );
- # $text = preg_replace( "/([{$lc}]+)s' /", "\\1s ", $text );
- #
- # These tail-anchored regexps are insanely slow. The worst case comes
- # when Japanese or Chinese text (ie, no word spacing) is written on
- # a wiki configured for Western UTF-8 mode. The Unicode characters are
- # expanded to hex codes and the "words" are very long paragraph-length
- # monstrosities. On a large page the above regexps may take over 20
- # seconds *each* on a 1GHz-level processor.
- #
- # Following are reversed versions which are consistently fast
- # (about 3 milliseconds on 1GHz-level processor).
- #
+ /**
+ * Handle 's, s'
+ *
+ * $text = preg_replace( "/([{$lc}]+)'s /", "\\1 \\1's ", $text );
+ * $text = preg_replace( "/([{$lc}]+)s' /", "\\1s ", $text );
+ *
+ * These tail-anchored regexps are insanely slow. The worst case comes
+ * when Japanese or Chinese text (ie, no word spacing) is written on
+ * a wiki configured for Western UTF-8 mode. The Unicode characters are
+ * expanded to hex codes and the "words" are very long paragraph-length
+ * monstrosities. On a large page the above regexps may take over 20
+ * seconds *each* on a 1GHz-level processor.
+ *
+ * Following are reversed versions which are consistently fast
+ * (about 3 milliseconds on 1GHz-level processor).
+ */
$text = strrev( preg_replace( "/ s'([{$lc}]+)/", " s'\\1 \\1", strrev( $text ) ) );
$text = strrev( preg_replace( "/ 's([{$lc}]+)/", " s\\1", strrev( $text ) ) );
* Abort the database transaction started via beginTransaction (if any).
*/
public function abortTransaction() {
- if ( $this->mHasTransaction ) { //XXX: actually... maybe always?
+ if ( $this->mHasTransaction ) { // XXX: actually... maybe always?
$this->mDb->rollback( get_class( $this ) . '::abortTransaction' );
$this->mHasTransaction = false;
}
}
if ( !is_null( $this->articleUrl ) ) {
# "http://example.com/wiki/$1"
- #
# We use "Image:" as the canonical namespace for
# compatibility across all MediaWiki versions.
return str_replace( '$1',
}
if ( !is_null( $this->scriptDirUrl ) ) {
# "http://example.com/w"
- #
# We use "Image:" as the canonical namespace for
# compatibility across all MediaWiki versions,
# and just sort of hope index.php is right. ;)
$dbr = $this->getSlaveDB();
$id = $dbr->selectField(
'page', // Table
- 'page_id', //Field
- array( //Conditions
+ 'page_id', // Field
+ array( // Conditions
'page_namespace' => $title->getNamespace(),
'page_title' => $title->getDBkey(),
),
- __METHOD__ //Function name
+ __METHOD__ // Function name
);
return $id;
*/
function findBySha1s( array $hashes ) {
if ( !count( $hashes ) ) {
- return array(); //empty parameter
+ return array(); // empty parameter
}
$dbr = $this->getSlaveDB();
foreach ( $this->foreignRepos as $repo ) {
$result = array_merge_recursive( $result, $repo->findBySha1s( $hashes ) );
}
- //sort the merged (and presorted) sublist of each hash
+ // sort the merged (and presorted) sublist of each hash
foreach ( $result as $hash => $files ) {
usort( $result[$hash], 'File::compare' );
}
wfDebug( __METHOD__ . ': supposed to render ' . $this->getName() .
' (' . $this->getMimeType() . "), but can't!\n" );
- return $this->getURL(); #hm... return NULL?
+ return $this->getURL(); # hm... return NULL?
}
} else {
return $this->getURL();
$type = $this->getMediaType();
$mime = $this->getMimeType();
- #wfDebug( "LocalFile::isSafeFile: type= $type, mime= $mime\n" );
+ # wfDebug( "LocalFile::isSafeFile: type= $type, mime= $mime\n" );
if ( !$type || $type === MEDIATYPE_UNKNOWN ) {
- return false; #unknown type, not trusted
+ return false; # unknown type, not trusted
}
if ( in_array( $type, $wgTrustedMediaFormats ) ) {
return true;
}
if ( $mime === "unknown/unknown" ) {
- return false; #unknown type, not trusted
+ return false; # unknown type, not trusted
}
if ( in_array( $mime, $wgTrustedMediaFormats ) ) {
return true;
* @return bool
*/
function isTrustedFile() {
- #this could be implemented to check a flag in the database,
- #look for signatures, etc
+ # this could be implemented to check a flag in the database,
+ # look for signatures, etc
return false;
}
// Lock the filearchive rows so that the files don't get deleted by a cleanup operation
// We acquire this lock by running the inserts now, before the file operations.
- //
// This potentially has poor lock contention characteristics -- an alternative
// scheme would be to insert stub filearchive entries with no fa_name and commit
// them in a separate transaction, then run the file ops, then update the fa_name fields.
public function __construct( $info ) {
$info['nodata'] = true;
- if ( isset( $info['flags'] ) )
+ if ( isset( $info['flags'] ) ) {
$this->mFlags = $info['flags'];
+ }
parent::__construct( $info );
}
) {
$prefix = 'mw-ui-';
// add mw-ui-button separately, so the descriptor doesn't need to set it
- $flags .= ' ' . $prefix.'button';
+ $flags .= ' ' . $prefix . 'button';
}
foreach ( $this->mFlags as $flag ) {
$flags .= ' ' . $prefix . $flag;
$attr['id'] = $this->mID;
$attr['name'] = $this->mName;
- $attr += $this->getAttributes( array( 'disabled', 'tabindex' ), array( 'tabindex' => 'tabIndex' ) );
+ $attr += $this->getAttributes(
+ array( 'disabled', 'tabindex' ),
+ array( 'tabindex' => 'tabIndex' )
+ );
if ( $this->mClass !== '' ) {
$attr['classes'] = array( $this->mClass );
$html = Xml::fieldset( $legend, $html );
}
- return Html::rawElement( 'form', $this->getFormAttributes() + array( 'class' => 'visualClear' ), $html );
+ return Html::rawElement(
+ 'form',
+ $this->getFormAttributes() + array( 'class' => 'visualClear' ),
+ $html
+ );
}
/**
* Returns the given attributes from the parameters
*
* @param array $list List of attributes to get
- * @param array $mappings Optional - Key/value map of attribute names to use instead of the ones passed in
+ * @param array $mappings Optional - Key/value map of attribute names to use
+ * instead of the ones passed in.
* @return array Attributes
*/
public function getAttributes( array $list, array $mappings = null ) {
}
$text = $title->getPrefixedText();
- if ( $this->mParams['namespace'] !== false && !$title->inNamespace( $this->mParams['namespace'] ) ) {
+ if ( $this->mParams['namespace'] !== false &&
+ !$title->inNamespace( $this->mParams['namespace'] )
+ ) {
return $this->msg( 'htmlform-title-badnamespace', $this->mParams['namespace'], $text )->parse();
}
*/
protected $displayFormat = 'ooui';
- public static function loadInputFromParameters( $fieldname, $descriptor, HTMLForm $parent = null ) {
+ public static function loadInputFromParameters( $fieldname, $descriptor,
+ HTMLForm $parent = null
+ ) {
$field = parent::loadInputFromParameters( $fieldname, $descriptor, $parent );
$field->setShowEmptyLabel( false );
return $field;
return true;
}
- public static function loadInputFromParameters( $fieldname, $descriptor, HTMLForm $parent = null ) {
+ public static function loadInputFromParameters( $fieldname, $descriptor,
+ HTMLForm $parent = null
+ ) {
$field = parent::loadInputFromParameters( $fieldname, $descriptor, $parent );
$field->setShowEmptyLabel( false );
return $field;
CACHE_DB => $emptyCache,
CACHE_ANYTHING => $emptyCache,
CACHE_MEMCACHED => $emptyCache,
+ // Set hash object cache (e.g. used in ResourceLoader LESS caching) - bug T113843
+ 'hash' => array( 'class' => 'HashBagOStuff' ),
);
// Load the installer's i18n.
User::newFromName( 'MediaWiki default' )
);
} catch ( Exception $e ) {
- //using raw, because $wgShowExceptionDetails can not be set yet
+ // using raw, because $wgShowExceptionDetails can not be set yet
$status->fatal( 'config-install-mainpage-failed', $e->getMessage() );
}
function submitConnectForm() {
// Get variables from the request
- $newValues = $this->setVarsFromRequest( array( 'wgDBserver', 'wgDBport', 'wgDBname', 'wgDBmwschema' ) );
+ $newValues = $this->setVarsFromRequest( array(
+ 'wgDBserver',
+ 'wgDBport',
+ 'wgDBname',
+ 'wgDBmwschema'
+ ) );
// Validate them
$status = Status::newGood();
array( 'addPgIndex', 'recentchanges', 'rc_timestamp_bot', '(rc_timestamp) WHERE rc_bot = 0' ),
array( 'addPgIndex', 'templatelinks', 'templatelinks_from', '(tl_from)' ),
array( 'addPgIndex', 'watchlist', 'wl_user', '(wl_user)' ),
- array( 'addPgIndex', 'watchlist', 'wl_user_notificationtimestamp', '(wl_user, wl_notificationtimestamp)' ),
+ array( 'addPgIndex', 'watchlist', 'wl_user_notificationtimestamp',
+ '(wl_user, wl_notificationtimestamp)' ),
array( 'addPgIndex', 'logging', 'logging_user_type_time',
'(log_user, log_type, log_timestamp)' ),
array( 'addPgIndex', 'logging', 'logging_page_id_time', '(log_page,log_timestamp)' ),
}
protected function changeFieldPurgeTable( $table, $field, $newtype, $default ) {
- ## For a cache table, empty it if the field needs to be changed, because the old contents
- ## may be corrupted. If the column is already the desired type, refrain from purging.
+ # # For a cache table, empty it if the field needs to be changed, because the old contents
+ # # may be corrupted. If the column is already the desired type, refrain from purging.
$fi = $this->db->fieldInfo( $table, $field );
if ( is_null( $fi ) ) {
$this->output( "...ERROR: expected column $table.$field to exist\n" );
$this->output( "...bug 66650 already fixed or not applicable.\n" );
return true;
};
- $this->applyPatch( 'patch-textsearch_bug66650.sql', false, "Rebuilding text search for bug 66650" );
+ $this->applyPatch( 'patch-textsearch_bug66650.sql', false,
+ 'Rebuilding text search for bug 66650' );
}
}
// 1.24
array( 'addField', 'page_props', 'pp_sortkey', 'patch-pp_sortkey.sql' ),
array( 'dropField', 'recentchanges', 'rc_cur_time', 'patch-drop-rc_cur_time.sql' ),
- array( 'addIndex', 'watchlist', 'wl_user_notificationtimestamp', 'patch-watchlist-user-notificationtimestamp-index.sql' ),
+ array( 'addIndex', 'watchlist', 'wl_user_notificationtimestamp',
+ 'patch-watchlist-user-notificationtimestamp-index.sql' ),
array( 'addField', 'page', 'page_lang', 'patch-page-page_lang.sql' ),
array( 'addField', 'pagelinks', 'pl_from_namespace', 'patch-pl_from_namespace.sql' ),
array( 'addField', 'templatelinks', 'tl_from_namespace', 'patch-tl_from_namespace.sql' ),
* var: The variable to be configured (required)
* label: The message name for the label (required)
* itemLabelPrefix: The message name prefix for the item labels (required)
- * itemLabels: List of message names to use for the item labels instead of itemLabelPrefix, keyed by values
+ * itemLabels: List of message names to use for the item labels instead
+ * of itemLabelPrefix, keyed by values
* values: List of allowed values (required)
* itemAttribs: Array of attribute arrays, outer key is the value name (optional)
* commonAttribs: Attribute array applied to all items
"config-information": "Informacija",
"config-localsettings-key": "Naujinimo raktas:",
"config-localsettings-badkey": "Raktas, kurį pateikėte, yra neteisingas.",
+ "config-session-error": "Klaida pradedant seansą: $1",
"config-your-language": "Jūsų kalba:",
"config-wiki-language": "Viki kalba:",
"config-back": "← Atgal",
"config-page-complete": "Baigta!",
"config-page-restart": "Iš naujo paleiskite diegimą",
"config-page-readme": "Skaityti daugiau",
+ "config-page-releasenotes": "Leidimo pastabos",
"config-page-copying": "Kopijuojama",
"config-page-upgradedoc": "Atnaujinama",
"config-page-existingwiki": "Esamas viki",
"config-email-watchlist": "Appiccia notifica 'osservati speciale",
"config-email-watchlist-help": "Premmettesse ll'utente 'e se piglià notifiche ncopp' 'e paggene cuntrullate lloro si tenessero appicciate chisto in'a le mpustaziune.",
"config-email-auth": "Appiccia autenticaziona via email",
+ "config-email-auth-help": "Si st'opzione è appicciata, ll'utente avesser'a cunfermà 'o cunto e-mail ausanno nu cullegamento ca se mannasse a chiste quanno facessero 'a mpustaziona o pure quanno facessero 'o cagnamiento.\nSurtanto 'e mail autenticate putesser piglià mail 'a ll'at'utente o cagnà email 'e notifica.\nMpustà st'opzione è <strong>raccumannato</strong p' 'e wiki pubbreche pecché se putesse ausà o se fà abbuso d' 'e funziune mail.",
"config-email-sender": "Innerizo email e ritorno:",
"config-upload-settings": "Immaggene e upload",
"config-upload-enable": "Premmette 'a carreca 'e file",
"@metadata": {
"authors": [
"Aalam",
- "Babanwalia"
+ "Babanwalia",
+ "ਪ੍ਰਚਾਰਕ"
]
},
+ "config-desc": "ਮੀਡੀਅਾਵਿਕੀ ਲੲੀ ਸਥਾਪਿਤਕਰਤਾ",
"config-information": "ਜਾਣਕਾਰੀ",
+ "config-localsettings-badkey": "ਤੁਹਾਡੇ ਦੁਅਾਰਾ ਦਿਤੀ ਗੲੀ ਚਾਬੀ ਗਲਤ ਹੈ",
"config-your-language": "ਤੁਹਾਡੀ ਭਾਸ਼ਾ:",
"config-your-language-help": "ਜੜਾਈ ਦੀ ਕਾਰਵਾਈ ਵੇਲੇ ਵਰਤਣ ਵਾਸਤੇ ਕੋਈ ਭਾਸ਼ਾ ਚੁਣੋ।",
"config-wiki-language": "ਵਿਕੀ ਦੀ ਭਾਸ਼ਾ:",
"config-page-upgradedoc": "ਮਿਆਰ-ਉਚਾਈ",
"config-page-existingwiki": "ਮੌਜੂਦਾ ਵਿਕੀ",
"config-restart": "ਹਾਂਜੀ, ਮੁੜ ਸ਼ੁਰੂ ਕਰੋ",
+ "config-env-good": "ਵਾਤਾਵਰਨ ਪਰਖਿਅਾ ਗਿਅਾ ਹੈ।\nਤੁਸੀਂ ਮੀਡੀਆਵਿਕੀ ਸਥਾਪਿਤ ਕਰ ਸਕਦੇ ਹੋ",
+ "config-env-bad": "ਵਾਤਾਵਰਨ ਪਰਖਿਅਾ ਗਿਅਾ ਹੈ।\nਤੁਸੀਂ ਮੀਡੀਆਵਿਕੀ ਸਥਾਪਿਤ ਨਹੀਂ ਕਰ ਸਕਦੇ ਹੋ",
"config-env-php": "PHP $1 ਜੜਿਆ ਗਿਆ।",
"config-env-hhvm": "HHVM $1 ਜੜਿਆ ਗਿਆ।",
"config-db-wiki-settings": "ਇਸ ਵਿਕੀ ਦੀ ਪਛਾਣ ਕਰਾਉ",
"config-license-pd": "Domeni publik",
"config-logo": "URL e logos:",
"config-install-tables": "Duke krijuar tabela",
+ "config-install-stats": "Nisja e statistikave",
"config-help": "ndihmë",
"mainpagetext": "'''MediaWiki software u instalua me sukses.'''",
"mainpagedocfooter": "Për më shumë informata rreth përdorimit të softwerit wiki , ju lutem shikoni [//meta.wikimedia.org/wiki/Help:Contents dokumentacionin përkatës].\n\n== Sa për fillim==\n* [//www.mediawiki.org/wiki/Help:Configuration_settings Parazgjedhjet e MediaWiki-t]\n* [//www.mediawiki.org/wiki/Help:FAQ Pyetjet e shpeshta rreth MediaWiki-t]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce Njoftime rreth MediaWiki-t]"
}
// Base backlink update jobs and per-title update jobs can be de-duplicated.
// If template A changes twice before any jobs run, a clean queue will have:
- // (A base, A base)
+ // (A base, A base)
// The second job is ignored by the queue on insertion.
// Suppose, many pages use template A, and that template itself uses template B.
// An edit to both will first create two base jobs. A clean FIFO queue will have:
- // (A base, B base)
+ // (A base, B base)
// When these jobs run, the queue will have per-title and remnant partition jobs:
- // (titleX,titleY,titleZ,...,A remnant,titleM,titleN,titleO,...,B remnant)
+ // (titleX,titleY,titleZ,...,A remnant,titleM,titleN,titleO,...,B remnant)
// Some these jobs will be the same, and will automatically be ignored by
// the queue upon insertion. Some title jobs will run before the duplicate is
// inserted, so the work will still be done twice in those cases. More titles
if ( $status === 200 || $status === 301 || $status === 302 || $status === 400 ) {
return true;
} elseif ( $status ) {
- $this->setLastError( __METHOD__ . ': incorrect HTTP status ' . $status . ' when hitting ' . $thumbUrl );
+ $this->setLastError( __METHOD__ . ': incorrect HTTP status ' .
+ $status . ' when hitting ' . $thumbUrl );
return false;
} else {
$this->setLastError( __METHOD__ . ': HTTP request failure' );
return false;
}
} else {
- $this->setLastError( __METHOD__ . ': unknown thumbnail render method ' . $wgUploadThumbnailRenderMethod );
+ $this->setLastError( __METHOD__ . ': unknown thumbnail render method ' .
+ $wgUploadThumbnailRenderMethod );
return false;
}
} else {
if ( $this->getReducePacket() ) {
$data = $this->reduceCount( $data );
}
- //failures in any of this should be silently ignored if ..
+ // failures in any of this should be silently ignored if ..
$written = 0;
try {
$fp = $this->getSender()->open();
return $this->table[$matches[$this->index]];
}
}
-
public static function formatBlockFlags( $flags, $lang ) {
$flags = trim( $flags );
if ( $flags === '' ) {
- return ''; //nothing to do
+ return ''; // nothing to do
}
$flags = explode( ',', $flags );
$flagsCount = count( $flags );
}
}
- # Using the (log_namespace, log_title, log_timestamp) index with a
- # range scan (LIKE) on the first two parts, instead of simple equality,
- # makes it unusable for sorting. Sorted retrieval using another index
- # would be possible, but then we might have to scan arbitrarily many
- # nodes of that index. Therefore, we need to avoid this if $wgMiserMode
- # is on.
- #
- # This is not a problem with simple title matches, because then we can
- # use the page_time index. That should have no more than a few hundred
- # log entries for even the busiest pages, so it can be safely scanned
- # in full to satisfy an impossible condition on user or similar.
+ /**
+ * Using the (log_namespace, log_title, log_timestamp) index with a
+ * range scan (LIKE) on the first two parts, instead of simple equality,
+ * makes it unusable for sorting. Sorted retrieval using another index
+ * would be possible, but then we might have to scan arbitrarily many
+ * nodes of that index. Therefore, we need to avoid this if $wgMiserMode
+ * is on.
+ *
+ * This is not a problem with simple title matches, because then we can
+ * use the page_time index. That should have no more than a few hundred
+ * log entries for even the busiest pages, so it can be safely scanned
+ * in full to satisfy an impossible condition on user or similar.
+ */
$this->mConds['log_namespace'] = $ns;
if ( $doUserRightsLogLike ) {
$params = array( $name . $wgUserrightsInterwikiDelimiter );
public function getPreloadTitles() {
$subtype = $this->entry->getSubtype();
if ( $subtype === 'create2' || $subtype === 'byemail' ) {
- //add the user talk to LinkBatch for the userLink
+ // add the user talk to LinkBatch for the userLink
return array( Title::makeTitle( NS_USER_TALK, $this->entry->getTarget()->getText() ) );
}
$watchers = self::updateWatchlistTimestamp( $editor, $title, $timestamp );
$sendEmail = true;
+ // $watchers deals with $wgEnotifWatchlist.
// If nobody is watching the page, and there are no users notified on all changes
// don't bother creating a job/trying to send emails, unless it's a
// talk page with an applicable notification.
- //
- // $watchers deals with $wgEnotifWatchlist
if ( !count( $watchers ) && !count( $wgUsersNotifiedOnAllChanges ) ) {
$sendEmail = false;
// Only send notification for non minor edits, unless $wgEnotifMinorEdits
return Status::newFatal( 'user-mail-no-addy' );
}
- // Forge email headers
- // -------------------
- //
- // WARNING
- //
- // DO NOT add To: or Subject: headers at this step. They need to be
- // handled differently depending upon the mailer we are going to use.
- //
- // To:
- // PHP mail() first argument is the mail receiver. The argument is
- // used as a recipient destination and as a To header.
- //
- // PEAR mailer has a recipient argument which is only used to
- // send the mail. If no To header is given, PEAR will set it to
- // to 'undisclosed-recipients:'.
- //
- // NOTE: To: is for presentation, the actual recipient is specified
- // by the mailer using the Rcpt-To: header.
- //
- // Subject:
- // PHP mail() second argument to pass the subject, passing a Subject
- // as an additional header will result in a duplicate header.
- //
- // PEAR mailer should be passed a Subject header.
- //
- // -- hashar 20120218
+ /**
+ * Forge email headers
+ * -------------------
+ *
+ * WARNING
+ *
+ * DO NOT add To: or Subject: headers at this step. They need to be
+ * handled differently depending upon the mailer we are going to use.
+ *
+ * To:
+ * PHP mail() first argument is the mail receiver. The argument is
+ * used as a recipient destination and as a To header.
+ *
+ * PEAR mailer has a recipient argument which is only used to
+ * send the mail. If no To header is given, PEAR will set it to
+ * to 'undisclosed-recipients:'.
+ *
+ * NOTE: To: is for presentation, the actual recipient is specified
+ * by the mailer using the Rcpt-To: header.
+ *
+ * Subject:
+ * PHP mail() second argument to pass the subject, passing a Subject
+ * as an additional header will result in a duplicate header.
+ *
+ * PEAR mailer should be passed a Subject header.
+ *
+ * -- hashar 20120218
+ */
$headers['From'] = $from->toString();
$returnPath = $from->address;
MediaWiki\restoreWarnings();
return Status::newGood();
} else {
- //
// PHP mail()
- //
if ( count( $to ) > 1 ) {
$headers['To'] = 'undisclosed-recipients:;';
}
*/
protected function transformGd( $image, $params ) {
# Use PHP's builtin GD library functions.
- #
# First find out what kind of file this is, and select the correct
# input routine for this.
$xml .= Xml::tags(
'OBJECT',
array(
- #'data' => '',
- #'type' => 'image/x.djvu',
+ # 'data' => '',
+ # 'type' => 'image/x.djvu',
'height' => $m[2],
'width' => $m[1],
- #'usemap' => '',
+ # 'usemap' => '',
),
"\n" .
Xml::element( 'PARAM', array( 'name' => 'DPI', 'value' => $m[3] ) ) . "\n" .
$this->charCodeString( 'GPSProcessingMethod' );
$this->charCodeString( 'GPSAreaInformation' );
- //ComponentsConfiguration should really be an array instead of a string...
- //This turns a string of binary numbers into an array of numbers.
+ // ComponentsConfiguration should really be an array instead of a string...
+ // This turns a string of binary numbers into an array of numbers.
if ( isset( $this->mFilteredExifData['ComponentsConfiguration'] ) ) {
$val = $this->mFilteredExifData['ComponentsConfiguration'];
for ( $i = 0; $i < $strLen; $i++ ) {
$ccVals[$i] = ord( substr( $val, $i, 1 ) );
}
- $ccVals['_type'] = 'ol'; //this is for formatting later.
+ $ccVals['_type'] = 'ol'; // this is for formatting later.
$this->mFilteredExifData['ComponentsConfiguration'] = $ccVals;
}
- //GPSVersion(ID) is treated as the wrong type by php exif support.
- //Go through each byte turning it into a version string.
- //For example: "\x02\x02\x00\x00" -> "2.2.0.0"
+ // GPSVersion(ID) is treated as the wrong type by php exif support.
+ // Go through each byte turning it into a version string.
+ // For example: "\x02\x02\x00\x00" -> "2.2.0.0"
- //Also change exif tag name from GPSVersion (what php exif thinks it is)
- //to GPSVersionID (what the exif standard thinks it is).
+ // Also change exif tag name from GPSVersion (what php exif thinks it is)
+ // to GPSVersionID (what the exif standard thinks it is).
if ( isset( $this->mFilteredExifData['GPSVersion'] ) ) {
$val = $this->mFilteredExifData['GPSVersion'];
if ( isset( $this->mFilteredExifData[$prop] ) ) {
if ( strlen( $this->mFilteredExifData[$prop] ) <= 8 ) {
- //invalid. Must be at least 9 bytes long.
+ // invalid. Must be at least 9 bytes long.
$this->debug( $this->mFilteredExifData[$prop], __FUNCTION__, false );
unset( $this->mFilteredExifData[$prop] );
switch ( $charCode ) {
case "\x4A\x49\x53\x00\x00\x00\x00\x00":
- //JIS
+ // JIS
$charset = "Shift-JIS";
break;
case "UNICODE\x00":
$charset = "UTF-16" . $this->byteOrder;
break;
- default: //ascii or undefined.
+ default: // ascii or undefined.
$charset = "";
break;
}
} else {
// if valid utf-8, assume that, otherwise assume windows-1252
$valCopy = $val;
- UtfNormal\Validator::quickIsNFCVerify( $valCopy ); //validates $valCopy.
+ UtfNormal\Validator::quickIsNFCVerify( $valCopy ); // validates $valCopy.
if ( $valCopy !== $val ) {
MediaWiki\suppressWarnings();
$val = iconv( 'Windows-1252', 'UTF-8//IGNORE', $val );
}
}
- //trim and check to make sure not only whitespace.
+ // trim and check to make sure not only whitespace.
$val = trim( $val );
if ( strlen( $val ) === 0 ) {
- //only whitespace.
+ // only whitespace.
$this->debug( $this->mFilteredExifData[$prop], __FUNCTION__, "$prop: Is only whitespace" );
unset( $this->mFilteredExifData[$prop] );
return;
}
- //all's good.
+ // all's good.
$this->mFilteredExifData[$prop] = $val;
}
}
if ( isset( $exif['MEDIAWIKI_EXIF_VERSION'] )
&& $exif['MEDIAWIKI_EXIF_VERSION'] == 1
) {
- //back-compatible but old
+ // back-compatible but old
wfDebug( __METHOD__ . ": back-compat version\n" );
return self::METADATA_COMPATIBLE;
$type = 'ul'; // default unordered list.
}
- //This is done differently as the tag is an array.
+ // This is done differently as the tag is an array.
if ( $tag == 'GPSTimeStamp' && count( $vals ) === 3 ) {
- //hour min sec array
+ // hour min sec array
$h = explode( '/', $vals[0] );
$m = explode( '/', $vals[1] );
'mode' => ( $val & bindec( '00011000' ) ) >> 3,
'function' => ( $val & bindec( '00100000' ) ) >> 5,
'redeye' => ( $val & bindec( '01000000' ) ) >> 6,
-// 'reserved' => ($val & bindec( '10000000' )) >> 7,
+// 'reserved' => ($val & bindec( '10000000' )) >> 7,
);
$flashMsgs = array();
# We do not need to handle unknown values since all are used.
}
break;
- //The GPS...Ref values are kept for compatibility, probably won't be reached.
+ // The GPS...Ref values are kept for compatibility, probably won't be reached.
case 'GPSLatitudeRef':
case 'GPSDestLatitudeRef':
switch ( $val ) {
case 'Software':
if ( is_array( $val ) ) {
- //if its a software, version array.
+ // if its a software, version array.
$val = $this->msg( 'exif-software-version-value', $val[0], $val[1] )->text();
} else {
$val = $this->exifMsg( $tag, '', $val );
$lowLang = strtolower( $lang );
$langName = Language::fetchLanguageName( $lowLang );
if ( $langName === '' ) {
- //try just the base language name. (aka en-US -> en ).
+ // try just the base language name. (aka en-US -> en ).
list( $langPrefix ) = explode( '-', $lowLang, 2 );
$langName = Language::fetchLanguageName( $langPrefix );
if ( $langName === '' ) {
// Found a frame
$frameCount++;
- ## Skip bounding box
+ # # Skip bounding box
fread( $fh, 8 );
- ## Read BPP
+ # # Read BPP
$buf = fread( $fh, 1 );
$bpp = self::decodeBPP( $buf );
- ## Read GCT
+ # # Read GCT
self::readGCT( $fh, $bpp );
fread( $fh, 1 );
self::skipBlock( $fh );
}
$c = '';
- //charset info contained in tag 1:90.
+ // charset info contained in tag 1:90.
if ( isset( $parsed['1#090'] ) && isset( $parsed['1#090'][0] ) ) {
$c = self::getCharset( $parsed['1#090'][0] );
if ( $c === false ) {
- //Unknown charset. refuse to parse.
- //note: There is a different between
- //unknown and no charset specified.
+ // Unknown charset. refuse to parse.
+ // note: There is a different between
+ // unknown and no charset specified.
return array();
}
unset( $parsed['1#090'] );
$software = self::convIPTC( $val, $c );
if ( count( $software ) !== 1 ) {
- //according to iim standard this cannot have multiple values
- //so if there is more than one, something weird is happening,
- //and we skip it.
+ // according to iim standard this cannot have multiple values
+ // so if there is more than one, something weird is happening,
+ // and we skip it.
wfDebugLog( 'iptc', 'IPTC: Wrong count on 2:65 Software field' );
break;
}
if ( isset( $parsed['2#070'] ) ) {
- //if a version is set for the software.
+ // if a version is set for the software.
$softwareVersion = self::convIPTC( $parsed['2#070'], $c );
unset( $parsed['2#070'] );
$data['Software'] = array( array( $software[0], $softwareVersion[0] ) );
// according to spec.
// Should potentially store timezone as well.
case '2#055':
- //Date created (not date digitized).
- //Maps to exif DateTimeOriginal
+ // Date created (not date digitized).
+ // Maps to exif DateTimeOriginal
if ( isset( $parsed['2#060'] ) ) {
$time = $parsed['2#060'];
} else {
break;
case '2#062':
- //Date converted to digital representation.
- //Maps to exif DateTimeDigitized
+ // Date converted to digital representation.
+ // Maps to exif DateTimeDigitized
if ( isset( $parsed['2#063'] ) ) {
$time = $parsed['2#063'];
} else {
break;
case '2#030':
- //Date released.
+ // Date released.
if ( isset( $parsed['2#035'] ) ) {
$time = $parsed['2#035'];
} else {
break;
case '2#037':
- //Date expires.
+ // Date expires.
if ( isset( $parsed['2#038'] ) ) {
$time = $parsed['2#038'];
} else {
case '2#000': /* iim version */
// unlike other tags, this is a 2-byte binary number.
- //technically this is required if there is iptc data
- //but in practise it isn't always there.
+ // technically this is required if there is iptc data
+ // but in practise it isn't always there.
if ( strlen( $val[0] ) == 2 ) {
- //if is just to be paranoid.
+ // if is just to be paranoid.
$versionValue = ord( substr( $val[0], 0, 1 ) ) * 256;
$versionValue += ord( substr( $val[0], 1, 1 ) );
$data['iimVersion'] = $versionValue;
case '2#085':
case '2#038':
case '2#035':
- //ignore. Handled elsewhere.
+ // ignore. Handled elsewhere.
break;
default:
*/
private static function timeHelper( $date, $time, $c ) {
if ( count( $date ) === 1 ) {
- //the standard says this should always be 1
- //just double checking.
+ // the standard says this should always be 1
+ // just double checking.
list( $date ) = self::convIPTC( $date, $c );
} else {
return null;
list( $time ) = self::convIPTC( $time, $c );
$dateOnly = false;
} else {
- $time = '000000+0000'; //placeholder
+ $time = '000000+0000'; // placeholder
$dateOnly = true;
}
&& substr( $date, 4, 2 ) !== '00'
&& substr( $date, 6, 2 ) !== '00'
) ) {
- //something wrong.
+ // something wrong.
// Note, this rejects some valid dates according to iptc spec
// for example: the date 00000400 means the photo was taken in
// April, but the year and day is unknown. We don't process these
return null;
}
if ( $dateOnly ) {
- //return the date only
+ // return the date only
return substr( $finalTimestamp, 0, 10 );
} else {
return $finalTimestamp;
wfDebugLog( 'iptc', __METHOD__ . " Error converting iptc data charset $charset to utf-8" );
}
} else {
- //treat as utf-8 if is valid utf-8. otherwise pretend its windows-1252
+ // treat as utf-8 if is valid utf-8. otherwise pretend its windows-1252
// most of the time if there is no 1:90 tag, it is either ascii, latin1, or utf-8
$oldData = $data;
- UtfNormal\Validator::quickIsNFCVerify( $data ); //make $data valid utf-8
+ UtfNormal\Validator::quickIsNFCVerify( $data ); // make $data valid utf-8
if ( $data === $oldData ) {
- return $data; //if validation didn't change $data
+ return $data; // if validation didn't change $data
} else {
return self::convIPTCHelper( $oldData, 'Windows-1252' );
}
*/
static function getCharset( $tag ) {
- //According to iim standard, charset is defined by the tag 1:90.
- //in which there are iso 2022 escape sequences to specify the character set.
- //the iim standard seems to encourage that all necessary escape sequences are
- //in the 1:90 tag, but says it doesn't have to be.
+ // According to iim standard, charset is defined by the tag 1:90.
+ // in which there are iso 2022 escape sequences to specify the character set.
+ // the iim standard seems to encourage that all necessary escape sequences are
+ // in the 1:90 tag, but says it doesn't have to be.
- //This is in need of more testing probably. This is definitely not complete.
- //however reading the docs of some other iptc software, it appears that most iptc software
- //only recognizes utf-8. If 1:90 tag is not present content is
+ // This is in need of more testing probably. This is definitely not complete.
+ // however reading the docs of some other iptc software, it appears that most iptc software
+ // only recognizes utf-8. If 1:90 tag is not present content is
// usually ascii or iso-8859-1 (and sometimes utf-8), but no guarantee.
- //This also won't work if there are more than one escape sequence in the 1:90 tag
- //or if something is put in the G2, or G3 charsets, etc. It will only reliably recognize utf-8.
+ // This also won't work if there are more than one escape sequence in the 1:90 tag
+ // or if something is put in the G2, or G3 charsets, etc. It will only reliably recognize utf-8.
// This is just going through the charsets mentioned in appendix C of the iim standard.
// \x1b = ESC.
switch ( $tag ) {
- case "\x1b%G": //utf-8
- //Also call things that are compatible with utf-8, utf-8 (e.g. ascii)
+ case "\x1b%G": // utf-8
+ // Also call things that are compatible with utf-8, utf-8 (e.g. ascii)
case "\x1b(B": // ascii
case "\x1b(@": // iso-646-IRV (ascii in latest version, $ different in older version)
$c = 'UTF-8';
break;
- case "\x1b(A": //like ascii, but british.
+ case "\x1b(A": // like ascii, but british.
$c = 'ISO646-GB';
break;
- case "\x1b(C": //some obscure sweedish/finland encoding
+ case "\x1b(C": // some obscure sweedish/finland encoding
$c = 'ISO-IR-8-1';
break;
case "\x1b(D":
$c = 'ISO-IR-8-2';
break;
- case "\x1b(E": //some obscure danish/norway encoding
+ case "\x1b(E": // some obscure danish/norway encoding
$c = 'ISO-IR-9-1';
break;
case "\x1b(F":
case "\x1b(K":
$c = "ISO646-DE";
break;
- case "\x1b(N": //crylic
+ case "\x1b(N": // crylic
$c = "ISO_5427";
break;
- case "\x1b(`": //iso646-NO
+ case "\x1b(`": // iso646-NO
$c = "NS_4551-1";
break;
- case "\x1b(f": //iso646-FR
+ case "\x1b(f": // iso646-FR
$c = "NF_Z_62-010";
break;
case "\x1b(g":
- $c = "PT2"; //iso646-PT2
+ $c = "PT2"; // iso646-PT2
break;
case "\x1b(h":
$c = "ES2";
break;
- case "\x1b(i": //iso646-HU
+ case "\x1b(i": // iso646-HU
$c = "MSZ_7795.3";
break;
case "\x1b(w":
break;
default:
wfDebugLog( 'iptc', __METHOD__ . 'Unknown charset in iptc 1:90: ' . bin2hex( $tag ) );
- //at this point just give up and refuse to parse iptc?
+ // at this point just give up and refuse to parse iptc?
$c = false;
}
return $c;
}
# Removed for ProofreadPage
- #$width = intval( $width );
+ # $width = intval( $width );
return "{$width}px";
}
function convertMetadataVersion( $metadata, $version = 1 ) {
if ( !is_array( $metadata ) ) {
- //unserialize to keep return parameter consistent.
+ // unserialize to keep return parameter consistent.
MediaWiki\suppressWarnings();
$ret = unserialize( $metadata );
MediaWiki\restoreWarnings();
if ( $info['fourCC'] != 'WEBP' ) {
wfDebugLog( 'WebP', __METHOD__ . ': FourCC was not WEBP: ' .
- bin2hex( $info['fourCC'] ) . " \n" );
+ bin2hex( $info['fourCC'] ) . " \n" );
return false;
}
// Bytes 4-7 are chunk stream size
// Byte 8 is 0x2F called the signature
if ( $header{8} != "\x2F" ) {
- wfDebugLog( 'WebP', __METHOD__ . ': Invalid signature: ' .
+ wfDebugLog( 'WebP', __METHOD__ . ': Invalid signature: ' .
bin2hex( $header{8} ) . "\n" );
return array();
}
$binaryHeader = fread( $f, 26 );
fclose( $f );
- # Master image structure:
- #
- # byte[9] "gimp xcf " File type magic
- # byte[4] version XCF version
- # "file" - version 0
- # "v001" - version 1
- # "v002" - version 2
- # byte 0 Zero-terminator for version tag
- # uint32 width With of canvas
- # uint32 height Height of canvas
- # uint32 base_type Color mode of the image; one of
- # 0: RGB color
- # 1: Grayscale
- # 2: Indexed color
- # (enum GimpImageBaseType in libgimpbase/gimpbaseenums.h)
+ /**
+ * Master image structure:
+ *
+ * byte[9] "gimp xcf " File type magic
+ * byte[4] version XCF version
+ * "file" - version 0
+ * "v001" - version 1
+ * "v002" - version 2
+ * byte 0 Zero-terminator for version tag
+ * uint32 width With of canvas
+ * uint32 height Height of canvas
+ * uint32 base_type Color mode of the image; one of
+ * 0: RGB color
+ * 1: Grayscale
+ * 2: Indexed color
+ * (enum GimpImageBaseType in libgimpbase/gimpbaseenums.h)
+ */
try {
$header = wfUnpack(
"A9magic" . # A: space padded
$this->charset = 'UTF-8';
break;
default:
- //this should be impossible to get to
+ // this should be impossible to get to
throw new RuntimeException( "Invalid BOM" );
}
} else {
}
}
if ( $this->charset !== 'UTF-8' ) {
- //don't convert if already utf-8
+ // don't convert if already utf-8
MediaWiki\suppressWarnings();
$content = iconv( $this->charset, 'UTF-8//IGNORE', $content );
MediaWiki\restoreWarnings();
// immediately following the StandardXMP. However, the JPEG standard
// does not require preservation of marker segment order. A robust JPEG
// reader should tolerate the marker segments in any order."
- //
- // otoh the probability that an image will have more than 128k of
- // metadata is rather low... so the probability that it will have
+ // On the other hand, the probability that an image will have more than
+ // 128k of metadata is rather low... so the probability that it will have
// > 128k, and be in the wrong order is very low...
if ( $len['offset'] !== $this->extendedXMPOffset ) {
// In practise I have yet to see a file that
// uses this element, however it is mentioned
// on page 25 of part 1 of the xmp standard.
- //
- // also it seems as if exiv2 and exiftool do not support
+ // Also it seems as if exiv2 and exiftool do not support
// this either (That or I misunderstand the standard)
$this->logger->info( __METHOD__ . ' Encountered <rdf:type> which isn\'t currently supported' );
}
),
'creator' => array(
'map_group' => 'general',
- 'map_name' => 'Artist', //map with exif Artist, iptc byline (2:80)
+ 'map_name' => 'Artist', // map with exif Artist, iptc byline (2:80)
'mode' => XMPReader::MODE_SEQ,
),
'date' => array(
'mode' => XMPReader::MODE_SIMPLE,
),
),
- //Note, this property affects how jpeg metadata is extracted.
+ // Note, this property affects how jpeg metadata is extracted.
'http://ns.adobe.com/xmp/note/' => array(
'HasExtendedXMP' => array(
'map_group' => 'special',
return;
}
- //check if its in a numeric range
+ // check if its in a numeric range
$inRange = false;
if ( isset( $info['rangeLow'] )
&& isset( $info['rangeHigh'] )
return;
}
if ( !preg_match( '/^[-A-Za-z0-9]{2,}$/D', $val ) ) {
- //this is a rather naive check.
+ // this is a rather naive check.
$this->logger->info( __METHOD__ . " Expected Lang code but got $val" );
$val = null;
}
return;
}
- if ( !isset( $res[4] ) ) { //hour
- //just have the year month day (if that)
+ if ( !isset( $res[4] ) ) { // hour
+ // just have the year month day (if that)
$val = $res[1];
if ( isset( $res[2] ) ) {
$val .= ':' . $res[2];
}
if ( !isset( $res[7] ) || $res[7] === 'Z' ) {
- //if hour is set, then minute must also be or regex above will fail.
+ // if hour is set, then minute must also be or regex above will fail.
$val = $res[1] . ':' . $res[2] . ':' . $res[3]
. ' ' . $res[4] . ':' . $res[5];
if ( isset( $res[6] ) && $res[6] !== '' ) {
# Pre-fill content with error message so that if something
# fails we'll have something telling us what we intended.
- //XXX: this isn't page content but a UI message. horrible.
+ // XXX: this isn't page content but a UI message. horrible.
$this->mContentObject = new MessageContent( 'missing-revision', array( $oldid ) );
if ( $oldid ) {
* @return ParserOutput|bool ParserOutput or false if the given revision ID is not found
*/
public function getParserOutput( $oldid = null, User $user = null ) {
- //XXX: bypasses mParserOptions and thus setParserOptions()
+ // XXX: bypasses mParserOptions and thus setParserOptions()
if ( $user === null ) {
$parserOptions = $this->getParserOptions();
*/
public function __get( $fname ) {
if ( property_exists( $this->mPage, $fname ) ) {
- #wfWarn( "Access to raw $fname field " . __CLASS__ );
+ # wfWarn( "Access to raw $fname field " . __CLASS__ );
return $this->mPage->$fname;
}
trigger_error( 'Inaccessible property via __get(): ' . $fname, E_USER_NOTICE );
*/
public function __set( $fname, $fvalue ) {
if ( property_exists( $this->mPage, $fname ) ) {
- #wfWarn( "Access to raw $fname field of " . __CLASS__ );
+ # wfWarn( "Access to raw $fname field of " . __CLASS__ );
$this->mPage->$fname = $fvalue;
// Note: extensions may want to toss on new fields
} elseif ( !in_array( $fname, array( 'mContext', 'mPage' ) ) ) {
*/
public function __call( $fname, $args ) {
if ( is_callable( array( $this->mPage, $fname ) ) ) {
- #wfWarn( "Call to " . __CLASS__ . "::$fname; please use WikiPage instead" );
+ # wfWarn( "Call to " . __CLASS__ . "::$fname; please use WikiPage instead" );
return call_user_func_array( array( $this->mPage, $fname ), $args );
}
trigger_error( 'Inaccessible function via __call(): ' . $fname, E_USER_ERROR );
if ( $rt->isExternal() ) {
if ( $rt->isLocal() ) {
// Offsite wikis need an HTTP redirect.
- //
// This can be hard to reverse and may produce loops,
// so they may be disabled in the site configuration.
$source = $this->mTitle->getFullURL( 'redirect=no' );
if ( $rt->isSpecialPage() ) {
// Gotta handle redirects to special pages differently:
- // Fill the HTTP response "Location" header and ignore
- // the rest of the page we're on.
- //
- // Some pages are not valid targets
+ // Fill the HTTP response "Location" header and ignore the rest of the page we're on.
+ // Some pages are not valid targets.
if ( $rt->isValidRedirectTarget() ) {
return $rt->getFullURL();
} else {
) {
ContentHandler::deprecated( __METHOD__, '1.21' );
- //NOTE: keep condition in sync with condition in replaceSectionContent!
+ // NOTE: keep condition in sync with condition in replaceSectionContent!
if ( strval( $sectionId ) === '' ) {
// Whole-page edit; let the whole text through
return $text;
}
$revisionId = $revision->insertOn( $dbw );
- // Update page
- //
+ // Update page.
// We check for conflicts by comparing $oldid with the current latest revision ID.
$ok = $this->updateRevisionOn( $dbw, $revision, $oldid, $oldIsRedirect );
}
$user = is_null( $user ) ? $wgUser : $user;
- //XXX: check $user->getId() here???
+ // XXX: check $user->getId() here???
// Use a sane default for $serialFormat, see bug 57026
if ( $serialFormat === null ) {
$bitfield = 'rev_deleted';
}
- // For now, shunt the revision data into the archive table.
- // Text is *not* removed from the text table; bulk storage
- // is left intact to avoid breaking block-compression or
- // immutable storage schemes.
- //
- // For backwards compatibility, note that some older archive
- // table entries will have ar_text and ar_flags fields still.
- //
- // In the future, we may keep revisions and mark them with
- // the rev_deleted field, which is reserved for this purpose.
+ /**
+ * For now, shunt the revision data into the archive table.
+ * Text is *not* removed from the text table; bulk storage
+ * is left intact to avoid breaking block-compression or
+ * immutable storage schemes.
+ *
+ * For backwards compatibility, note that some older archive
+ * table entries will have ar_text and ar_flags fields still.
+ *
+ * In the future, we may keep revisions and mark them with
+ * the rev_deleted field, which is reserved for this purpose.
+ */
$row = array(
'ar_namespace' => 'page_namespace',
// split the given option to its variable
if ( self::matchAgainstMagicword( 'rawsuffix', $arg1 ) ) {
- //{{pagesincategory:|raw[|type]}}
+ // {{pagesincategory:|raw[|type]}}
$raw = $arg1;
$type = $magicWords->matchStartToEnd( $arg2 );
} else {
- //{{pagesincategory:[|type[|raw]]}}
+ // {{pagesincategory:[|type[|raw]]}}
$type = $magicWords->matchStartToEnd( $arg1 );
$raw = $arg2;
}
- if ( !$type ) { //backward compatibility
+ if ( !$type ) { // backward compatibility
$type = 'pagesincategory_all';
}
# The redirect status and length is passed to getLinkColour via the LinkCache
# Use formal parameters instead
$colours[$pdbk] = Linker::getLinkColour( $title, $threshold );
- //add id to the extension todolist
+ // add id to the extension todolist
$linkcolour_ids[$s->page_id] = $pdbk;
}
unset( $res );
}
if ( count( $linkcolour_ids ) ) {
- //pass an array of page_ids to an extension
+ // pass an array of page_ids to an extension
Hooks::run( 'GetLinkColours', array( $linkcolour_ids, &$colours ) );
}
public static function tidy( $text ) {
$driver = self::singleton();
if ( !$driver ) {
- throw new MWException( __METHOD__.
+ throw new MWException( __METHOD__ .
': tidy is disabled, caller should have checked MWTidy::isEnabled()' );
}
return $driver->tidy( $text );
public static function checkErrors( $text, &$errorStr = null ) {
$driver = self::singleton();
if ( !$driver ) {
- throw new MWException( __METHOD__.
+ throw new MWException( __METHOD__ .
': tidy is disabled, caller should have checked MWTidy::isEnabled()' );
}
if ( $driver->supportsValidate() ) {
* @ingroup Parser
*/
class ParserOutput extends CacheTime {
- public $mText, # The output text
- $mLanguageLinks, # List of the full text of language links, in the order they appear
- $mCategories, # Map of category names to sort keys
- $mIndicators = array(), # Page status indicators, usually displayed in top-right corner
- $mTitleText, # title text of the chosen language variant
- $mLinks = array(), # 2-D map of NS/DBK to ID for the links in the document. ID=zero for broken.
- $mTemplates = array(), # 2-D map of NS/DBK to ID for the template references. ID=zero for broken.
- $mTemplateIds = array(), # 2-D map of NS/DBK to rev ID for the template references. ID=zero for broken.
- $mImages = array(), # DB keys of the images used, in the array key only
- $mFileSearchOptions = array(), # DB keys of the images used mapped to sha1 and MW timestamp
- $mExternalLinks = array(), # External link URLs, in the key only
- $mInterwikiLinks = array(), # 2-D map of prefix/DBK (in keys only) for the inline interwiki links in the document.
- $mNewSection = false, # Show a new section link?
- $mHideNewSection = false, # Hide the new section link?
- $mNoGallery = false, # No gallery on category page? (__NOGALLERY__)
- $mHeadItems = array(), # Items to put in the <head> section
- $mModules = array(), # Modules to be loaded by the resource loader
- $mModuleScripts = array(), # Modules of which only the JS will be loaded by the resource loader
- $mModuleStyles = array(), # Modules of which only the CSSS will be loaded by the resource loader
- $mJsConfigVars = array(), # JavaScript config variable for mw.config combined with this page
- $mOutputHooks = array(), # Hook tags as per $wgParserOutputHooks
- $mWarnings = array(), # Warning text to be returned to the user. Wikitext formatted, in the key only
- $mSections = array(), # Table of contents
- $mEditSectionTokens = false, # prefix/suffix markers if edit sections were output as tokens
- $mProperties = array(), # Name/value pairs to be cached in the DB
- $mTOCHTML = '', # HTML of the TOC
- $mTimestamp, # Timestamp of the revision
- $mTOCEnabled = true, # Whether TOC should be shown, can't override __NOTOC__
- $mEnableOOUI = false; # Whether OOUI should be enabled
- private $mIndexPolicy = ''; # 'index' or 'noindex'? Any other value will result in no change.
- private $mAccessedOptions = array(); # List of ParserOptions (stored in the keys)
- private $mExtensionData = array(); # extra data used by extensions
- private $mLimitReportData = array(); # Parser limit report data
- private $mParseStartTime = array(); # Timestamps for getTimeSinceStart()
- private $mPreventClickjacking = false; # Whether to emit X-Frame-Options: DENY
- private $mFlags = array(); # Generic flags
+ /**
+ * @var string $mText The output text
+ */
+ public $mText;
+
+ /**
+ * @var array $mLanguageLinks List of the full text of language links,
+ * in the order they appear.
+ */
+ public $mLanguageLinks;
+
+ /**
+ * @var array $mCategoriesMap of category names to sort keys
+ */
+ public $mCategories;
+
+ /**
+ * @var array $mIndicators Page status indicators, usually displayed in top-right corner.
+ */
+ public $mIndicators = array();
+
+ /**
+ * @var string $mTitleText Title text of the chosen language variant
+ */
+ public $mTitleText;
+
+ /**
+ * @var array $mLinks 2-D map of NS/DBK to ID for the links in the document.
+ * ID=zero for broken.
+ */
+ public $mLinks = array();
+
+ /**
+ * @var array $mTemplates 2-D map of NS/DBK to ID for the template references.
+ * ID=zero for broken.
+ */
+ public $mTemplates = array();
+
+ /**
+ * @var array $mTemplateIds 2-D map of NS/DBK to rev ID for the template references.
+ * ID=zero for broken.
+ */
+ public $mTemplateIds = array();
+
+ /**
+ * @var array $mImages DB keys of the images used, in the array key only
+ */
+ public $mImages = array();
+
+ /**
+ * @var array $mFileSearchOptions DB keys of the images used mapped to sha1 and MW timestamp.
+ */
+ public $mFileSearchOptions = array();
+
+ /**
+ * @var array $mExternalLinks External link URLs, in the key only.
+ */
+ public $mExternalLinks = array();
+
+ /**
+ * @var array $mInterwikiLinks 2-D map of prefix/DBK (in keys only)
+ * for the inline interwiki links in the document.
+ */
+ public $mInterwikiLinks = array();
+
+ /**
+ * @var bool $mNewSection Show a new section link?
+ */
+ public $mNewSection = false;
+
+ /**
+ * @var bool $mHideNewSection Hide the new section link?
+ */
+ public $mHideNewSection = false;
+
+ /**
+ * @var bool $mNoGallery No gallery on category page? (__NOGALLERY__).
+ */
+ public $mNoGallery = false;
+
+ /**
+ * @var array $mHeadItems Items to put in the <head> section
+ */
+ public $mHeadItems = array();
+
+ /**
+ * @var array $mModules Modules to be loaded by the resource loader
+ */
+ public $mModules = array();
+
+ /**
+ * @var array $mModuleScripts Modules of which only the JS will be loaded by
+ * the resource loader.
+ */
+ public $mModuleScripts = array();
+
+ /**
+ * @var array $mModuleStyles Modules of which only the CSSS will be loaded by
+ * the resource loader.
+ */
+ public $mModuleStyles = array();
+
+ /**
+ * @var array $mJsConfigVars JavaScript config variable for mw.config combined with this page.
+ */
+ public $mJsConfigVars = array();
+
+ /**
+ * @var array $mOutputHooks Hook tags as per $wgParserOutputHooks.
+ */
+ public $mOutputHooks = array();
+
+ /**
+ * @var array $mWarnings Warning text to be returned to the user.
+ * Wikitext formatted, in the key only.
+ */
+ public $mWarnings = array();
+
+ /**
+ * @var array $mSections Table of contents
+ */
+ public $mSections = array();
+
+ /**
+ * @var bool $mEditSectionTokens prefix/suffix markers if edit sections were output as tokens.
+ */
+ public $mEditSectionTokens = false;
+
+ /**
+ * @var array $mProperties Name/value pairs to be cached in the DB.
+ */
+ public $mProperties = array();
+
+ /**
+ * @var string $mTOCHTML HTML of the TOC.
+ */
+ public $mTOCHTML = '';
+
+ /**
+ * @var string $mTimestamp Timestamp of the revision.
+ */
+ public $mTimestamp;
+
+ /**
+ * @var bool $mTOCEnabled Whether TOC should be shown, can't override __NOTOC__.
+ */
+ public $mTOCEnabled = true;
+
+ /**
+ * @var bool $mEnableOOUI Whether OOUI should be enabled.
+ */
+ public $mEnableOOUI = false;
+
+ /**
+ * @var string $mIndexPolicy 'index' or 'noindex'? Any other value will result in no change.
+ */
+ private $mIndexPolicy = '';
+
+ /**
+ * @var array $mAccessedOptions List of ParserOptions (stored in the keys).
+ */
+ private $mAccessedOptions = array();
+
+ /**
+ * @var array $mExtensionData extra data used by extensions.
+ */
+ private $mExtensionData = array();
+
+ /**
+ * @var array $mLimitReportData Parser limit report data.
+ */
+ private $mLimitReportData = array();
+
+ /**
+ * @var array $mParseStartTime Timestamps for getTimeSinceStart().
+ */
+ private $mParseStartTime = array();
+
+ /**
+ * @var bool $mPreventClickjacking Whether to emit X-Frame-Options: DENY.
+ */
+ private $mPreventClickjacking = false;
+
+ /**
+ * @var array $mFlags Generic flags.
+ */
+ private $mFlags = array();
const EDITSECTION_REGEX =
'#<(?:mw:)?editsection page="(.*?)" section="(.*?)"(?:/>|>(.*?)(</(?:mw:)?editsection>))#';
*/
public function addSecondaryDataUpdate( DataUpdate $update ) {
wfDeprecated( __METHOD__, '1.25' );
- throw new MWException( 'ParserOutput::addSecondaryDataUpdate() is no longer supported. Override Content::getSecondaryDataUpdates() or use the SecondaryDataUpdates hook instead.' );
+ throw new MWException(
+ 'ParserOutput::addSecondaryDataUpdate() is no longer supported. ' .
+ 'Override Content::getSecondaryDataUpdates() ' .
+ 'or use the SecondaryDataUpdates hook instead.'
+ );
}
/**
* @throws MWException
*/
public function newPartNodeArray( $values ) {
- //NOTE: DOM manipulation is slower than building & parsing XML! (or so Tim sais)
+ // NOTE: DOM manipulation is slower than building & parsing XML! (or so Tim sais)
$xml = "<list>";
foreach ( $values as $k => $val ) {
$stack = new PPDStack;
- $searchBase = "[{<\n"; #}
+ $searchBase = "[{<\n"; # }
// For fast reverse searches
$revText = strrev( $text );
$lengthText = strlen( $text );
$fakeLineStart = true;
while ( true ) {
- //$this->memCheck();
+ // $this->memCheck();
if ( $findOnlyinclude ) {
// Ignore all input up to the next <onlyinclude>
$fakeLineStart = true;
while ( true ) {
- //$this->memCheck();
+ // $this->memCheck();
if ( $findOnlyinclude ) {
// Ignore all input up to the next <onlyinclude>
) {
$out .= $contextNode->firstChild->value;
} else {
- //$out .= '';
+ // $out .= '';
}
} elseif ( $contextNode->name == 'ext' ) {
# Extension tag
'wgRevokePermissions' => 'array_plus_2d',
'wgHooks' => 'array_merge_recursive',
// credits are handled in the ExtensionRegistry
- //'wgExtensionCredits' => 'array_merge_recursive',
+ // 'wgExtensionCredits' => 'array_merge_recursive',
'wgExtraGenderNamespaces' => 'array_plus',
'wgNamespacesWithSubpages' => 'array_plus',
'wgNamespaceContentModels' => 'array_plus',
) {
// Doesn't match, mark it as incompatible.
$incompatible[] = "{$info['name']} is not compatible with the current "
- . "MediaWiki core (version {$wgVersion}), it requires: ". $requires[self::MEDIAWIKI_CORE]
+ . "MediaWiki core (version {$wgVersion}), it requires: " . $requires[self::MEDIAWIKI_CORE]
. '.';
continue;
}
if ( !$options['cache'] ) {
$result = self::applyFilter( $filter, $data, $this->config );
} else {
- $key = wfGlobalCacheKey( 'resourceloader', 'filter', $filter, self::$filterCacheVersion, md5( $data ) );
+ $key = wfGlobalCacheKey(
+ 'resourceloader',
+ 'filter',
+ $filter,
+ self::$filterCacheVersion, md5( $data )
+ );
$cache = wfGetCache( wfIsHHVM() ? CACHE_ACCEL : CACHE_ANYTHING );
$cacheEntry = $cache->get( $key );
if ( is_string( $cacheEntry ) ) {
if ( $context->getImageObj() && $this->errors ) {
// We can't show both the error messages and the response when it's an image.
- $response = implode( "\n\n", $this->errors );
+ $response = implode( "\n\n", $this->errors );
} elseif ( $this->errors ) {
$errorText = implode( "\n\n", $this->errors );
$errorResponse = self::makeComment( $errorText );
* @return string
*/
public static function makeLoaderConditionalScript( $script ) {
- return "window.RLQ = window.RLQ || []; window.RLQ.push( function () {\n" . trim( $script ) . "\n} );";
+ return "window.RLQ = window.RLQ || []; window.RLQ.push( function () {\n" .
+ trim( $script ) . "\n} );";
}
/**
* @return string|bool PNG image data, or false on failure
*/
protected function rasterize( $svg ) {
- // This code should be factored out to a separate method on SvgHandler, or perhaps a separate
- // class, with a separate set of configuration settings.
- //
- // This is a distinct use case from regular SVG rasterization:
- // * We can skip many sanity and security checks (as the images come from a trusted source,
- // rather than from the user).
- // * We need to provide extra options to some converters to achieve acceptable quality for very
- // small images, which might cause performance issues in the general case.
- // * We want to directly pass image data to the converter, rather than a file path.
- //
- // See https://phabricator.wikimedia.org/T76473#801446 for examples of what happens with the
- // default settings.
- //
- // For now, we special-case rsvg (used in WMF production) and do a messy workaround for other
- // converters.
+ /**
+ * This code should be factored out to a separate method on SvgHandler, or perhaps a separate
+ * class, with a separate set of configuration settings.
+ *
+ * This is a distinct use case from regular SVG rasterization:
+ * * We can skip many sanity and security checks (as the images come from a trusted source,
+ * rather than from the user).
+ * * We need to provide extra options to some converters to achieve acceptable quality for very
+ * small images, which might cause performance issues in the general case.
+ * * We want to directly pass image data to the converter, rather than a file path.
+ *
+ * See https://phabricator.wikimedia.org/T76473#801446 for examples of what happens with the
+ * default settings.
+ *
+ * For now, we special-case rsvg (used in WMF production) and do a messy workaround for other
+ * converters.
+ */
global $wgSVGConverter, $wgSVGConverterPath;
'$VARS.configuration' => $this->getConfigSettings( $context ),
'$VARS.baseModulesUri' => self::getStartupModulesUrl( $context ),
) );
- $pairs['$CODE.registrations()'] = str_replace( "\n", "\n\t", trim( $this->getModuleRegistrations( $context ) ) );
+ $pairs['$CODE.registrations()'] = str_replace(
+ "\n",
+ "\n\t",
+ trim( $this->getModuleRegistrations( $context ) )
+ );
return strtr( $out, $pairs );
}
wfDebug( "parseQuery received: $term \n" );
- ## No backslashes allowed
+ # # No backslashes allowed
$term = preg_replace( '/\\\/', '', $term );
- ## Collapse parens into nearby words:
+ # # Collapse parens into nearby words:
$term = preg_replace( '/\s*\(\s*/', ' (', $term );
$term = preg_replace( '/\s*\)\s*/', ') ', $term );
- ## Treat colons as word separators:
+ # # Treat colons as word separators:
$term = preg_replace( '/:/', ' ', $term );
$searchstring = '';
}
}
- ## Strip out leading junk
+ # # Strip out leading junk
$searchstring = preg_replace( '/^[\s\&\|]+/', '', $searchstring );
- ## Remove any doubled-up operators
+ # # Remove any doubled-up operators
$searchstring = preg_replace( '/([\!\&\|]) +(?:[\&\|] +)+/', "$1 ", $searchstring );
- ## Remove any non-spaced operators (e.g. "Zounds!")
+ # # Remove any non-spaced operators (e.g. "Zounds!")
$searchstring = preg_replace( '/([^ ])[\!\&\|]/', "$1", $searchstring );
- ## Remove any trailing whitespace or operators
+ # # Remove any trailing whitespace or operators
$searchstring = preg_replace( '/[\s\!\&\|]+$/', '', $searchstring );
- ## Remove unnecessary quotes around everything
+ # # Remove unnecessary quotes around everything
$searchstring = preg_replace( '/^[\'"](.*)[\'"]$/', "$1", $searchstring );
- ## Quote the whole thing
+ # # Quote the whole thing
$searchstring = $this->db->addQuotes( $searchstring );
wfDebug( "parseQuery returned: $searchstring \n" );
# Get the SQL fragment for the given term
$searchstring = $this->parseQuery( $term );
- ## We need a separate query here so gin does not complain about empty searches
+ # # We need a separate query here so gin does not complain about empty searches
$sql = "SELECT to_tsquery($searchstring)";
$res = $this->db->query( $sql );
if ( !$res ) {
- ## TODO: Better output (example to catch: one 'two)
+ # # TODO: Better output (example to catch: one 'two)
die( "Sorry, that was not a valid search string. Please go back and try again" );
}
$top = $res->fetchRow();
$top = $top[0];
$this->searchTerms = array();
- if ( $top === "" ) { ## e.g. if only stopwords are used XXX return something better
+ if ( $top === "" ) { # # e.g. if only stopwords are used XXX return something better
$query = "SELECT page_id, page_namespace, page_title, 0 AS score " .
"FROM page p, revision r, pagecontent c WHERE p.page_latest = r.rev_id " .
"AND r.rev_text_id = c.old_id AND 1=0";
"AND r.rev_text_id = c.old_id AND $fulltext @@ to_tsquery($searchstring)";
}
- ## Namespaces - defaults to 0
+ # # Namespaces - defaults to 0
if ( !is_null( $this->namespaces ) ) { // null -> search all
if ( count( $this->namespaces ) < 1 ) {
$query .= ' AND page_namespace = 0';
return $query;
}
- ## Most of the work of these two functions are done automatically via triggers
+ # # Most of the work of these two functions are done automatically via triggers
function update( $pageid, $title, $text ) {
- ## We don't want to index older revisions
+ # # We don't want to index older revisions
$sql = "UPDATE pagecontent SET textvector = NULL WHERE textvector IS NOT NULL and old_id IN " .
"(SELECT DISTINCT rev_text_id FROM revision WHERE rev_page = " . intval( $pageid ) .
" ORDER BY rev_text_id DESC OFFSET 1)";
}
}
- //@todo: export <data>
- //@todo: export <config>
+ // @todo: export <data>
+ // @todo: export <config>
fwrite( $this->sink, "\t" . Xml::closeElement( 'site' ) . "\n" );
}
$site->addLocalId( $idType, $id );
}
- //@todo: import <data>
- //@todo: import <config>
+ // @todo: import <data>
+ // @todo: import <config>
return $site;
}
* @return array
*/
protected function getSerializationData() {
- //NOTE: When changing the structure, either implement unserialize() to handle the
+ // NOTE: When changing the structure, either implement unserialize() to handle the
// old structure too, or update SERIAL_VERSION_ID to kill any caches.
return array_merge(
parent::getSerializationData(),
// section link
if ( $showNewSection ) {
// Adds new section link
- //$content_navigation['actions']['addsection']
+ // $content_navigation['actions']['addsection']
$content_navigation['views']['addsection'] = array(
'class' => ( $isEditing && $section == 'new' ) ? 'selected' : false,
'text' => wfMessageFallback( "$skname-action-addsection", 'addsection' )
'closure_expansion' => false,
) );
} elseif ( $rec instanceof SpecialPage ) {
- $page = $rec; //XXX: we should deep clone here
+ $page = $rec; // XXX: we should deep clone here
} else {
$page = null;
}
$content = $rev->getContent();
if ( $content instanceof TextContent ) {
- //XXX: in the future, this could be stored as structured data, defining a list of book sources
+ // XXX: in the future, this could be stored as structured data, defining a list of book sources
$text = $content->getNativeData();
$this->getOutput()->addWikiText( str_replace( 'MAGICNUMBER', $this->isbn, $text ) );
}
function getIndexField() {
-# return array( 'abc' => 'cat_title', 'count' => 'cat_pages' );
+# return array( 'abc' => 'cat_title', 'count' => 'cat_pages' );
return 'cat_title';
}
return $this->mDefaultQuery;
}
-# protected function getOrderTypeMessages() {
-# return array( 'abc' => 'special-categories-sort-abc',
-# 'count' => 'special-categories-sort-count' );
-# }
+# protected function getOrderTypeMessages() {
+# return array( 'abc' => 'special-categories-sort-abc',
+# 'count' => 'special-categories-sort-count' );
+# }
protected function getDefaultDirections() {
-# return array( 'abc' => false, 'count' => true );
+# return array( 'abc' => false, 'count' => true );
return false;
}
throw new RuntimeException( "Form submission was not POSTed" );
}
- $this->title = Title::newFromText( $data['pagetitle' ] );
+ $this->title = Title::newFromText( $data['pagetitle'] );
$user = $this->getUser();
// Check permissions and make sure the user has permission to edit the specific page
$errors = $this->title->getUserPermissionsErrors( 'editcontentmodel', $user );
$this->outputHeader();
$this->outputSubtitle();
+ $out->addModuleStyles( 'mediawiki.special' );
# B/C: $mode used to be waaay down the parameter list, and the first parameter
# was $wgUser
*/
private function cleanupWatchlist() {
if ( !count( $this->badItems ) ) {
- return; //nothing to do
+ return; // nothing to do
}
$dbw = wfGetDB( DB_MASTER );
}
if ( $config->get( 'UserEmailUseReplyTo' ) ) {
- // Put the generic wiki autogenerated address in the From:
- // header and reserve the user for Reply-To.
- //
- // This is a bit ugly, but will serve to differentiate
- // wiki-borne mails from direct mails and protects against
- // SPF and bounce problems with some mailers (see below).
+ /**
+ * Put the generic wiki autogenerated address in the From:
+ * header and reserve the user for Reply-To.
+ *
+ * This is a bit ugly, but will serve to differentiate
+ * wiki-borne mails from direct mails and protects against
+ * SPF and bounce problems with some mailers (see below).
+ */
$mailFrom = new MailAddress( $config->get( 'PasswordSender' ),
wfMessage( 'emailsender' )->inContentLanguage()->text() );
$replyTo = $from;
} else {
- // Put the sending user's e-mail address in the From: header.
- //
- // This is clean-looking and convenient, but has issues.
- // One is that it doesn't as clearly differentiate the wiki mail
- // from "directly" sent mails.
- //
- // Another is that some mailers (like sSMTP) will use the From
- // address as the envelope sender as well. For open sites this
- // can cause mails to be flunked for SPF violations (since the
- // wiki server isn't an authorized sender for various users'
- // domains) as well as creating a privacy issue as bounces
- // containing the recipient's e-mail address may get sent to
- // the sending user.
+ /**
+ * Put the sending user's e-mail address in the From: header.
+ *
+ * This is clean-looking and convenient, but has issues.
+ * One is that it doesn't as clearly differentiate the wiki mail
+ * from "directly" sent mails.
+ *
+ * Another is that some mailers (like sSMTP) will use the From
+ * address as the envelope sender as well. For open sites this
+ * can cause mails to be flunked for SPF violations (since the
+ * wiki server isn't an authorized sender for various users'
+ * domains) as well as creating a privacy issue as bounces
+ * containing the recipient's e-mail address may get sent to
+ * the sending user.
+ */
$mailFrom = $from;
$replyTo = null;
}
$exporter->allPages();
} else {
foreach ( $pages as $page ) {
- #Bug 8824: Only export pages the user can read
+ # Bug 8824: Only export pages the user can read
$title = Title::newFromText( $page );
if ( is_null( $title ) ) {
// @todo Perhaps output an <error> tag or something.
private function formatPermissions( $permissions, $revoke, $add, $remove, $addSelf, $removeSelf ) {
$r = array();
foreach ( $permissions as $permission => $granted ) {
- //show as granted only if it isn't revoked to prevent duplicate display of permissions
+ // show as granted only if it isn't revoked to prevent duplicate display of permissions
if ( $granted && ( !isset( $revoke[$permission] ) || !$revoke[$permission] ) ) {
$r[] = $this->msg( 'listgrouprights-right-display',
User::getRightDescription( $permission ),
* @return string
*/
function formatRow( $row ) {
- if ( $row->user_id == 0 ) { #Bug 16487
+ if ( $row->user_id == 0 ) { # Bug 16487
return '';
}
$newText = $nt->getPrefixedText();
if ( $ot->exists() ) {
- //NOTE: we assume that if the old title exists, it's because it was re-created as
+ // NOTE: we assume that if the old title exists, it's because it was re-created as
// a redirect to the new title. This is not safe, but what we did before was
// even worse: we just determined whether a redirect should have been created,
// and reported that it was created if it should have, without any checks.
$this->moveSubpages = false;
}
- # Next make a list of id's. This might be marginally less efficient
- # than a more direct method, but this is not a highly performance-cri-
- # tical code path and readable code is more important here.
- #
- # Note: this query works nicely on MySQL 5, but the optimizer in MySQL
- # 4 might get confused. If so, consider rewriting as a UNION.
- #
- # If the target namespace doesn't allow subpages, moving with subpages
- # would mean that you couldn't move them back in one operation, which
- # is bad.
- # @todo FIXME: A specific error message should be given in this case.
+ /**
+ * Next make a list of id's. This might be marginally less efficient
+ * than a more direct method, but this is not a highly performance-cri-
+ * tical code path and readable code is more important here.
+ *
+ * Note: this query works nicely on MySQL 5, but the optimizer in MySQL
+ * 4 might get confused. If so, consider rewriting as a UNION.
+ *
+ * If the target namespace doesn't allow subpages, moving with subpages
+ * would mean that you couldn't move them back in one operation, which
+ * is bad.
+ * @todo FIXME: A specific error message should be given in this case.
+ */
// @todo FIXME: Use Title::moveSubpages() here
$dbr = wfGetDB( DB_MASTER );
protected function feedItemDesc( $row ) {
$revision = Revision::newFromId( $row->rev_id );
if ( $revision ) {
- //XXX: include content model/type in feed item?
+ // XXX: include content model/type in feed item?
return '<p>' . htmlspecialchars( $revision->getUserText() ) .
$this->msg( 'colon-separator' )->inContentLanguage()->escaped() .
htmlspecialchars( FeedItem::stripComment( $revision->getComment() ) ) .
list( $namespace, $prefixKey, $prefix ) = $prefixList;
list( /* $fromNS */, $fromKey, ) = $fromList;
- ### @todo FIXME: Should complain if $fromNs != $namespace
+ # ## @todo FIXME: Should complain if $fromNs != $namespace
$dbr = wfGetDB( DB_SLAVE );
)
);
- ### @todo FIXME: Side link to previous
+ # ## @todo FIXME: Side link to previous
$n = 0;
if ( $res->numRows() > 0 ) {
$titleSnippet
);
- //If page content is not readable, just return the title.
- //This is not quite safe, but better than showing excerpts from non-readable pages
- //Note that hiding the entry entirely would screw up paging.
+ // If page content is not readable, just return the title.
+ // This is not quite safe, but better than showing excerpts from non-readable pages
+ // Note that hiding the entry entirely would screw up paging.
if ( !$title->userCan( 'read', $this->getUser() ) ) {
return "<li>{$link}</li>\n";
}
$user = User::newFromName( $revision->getUserText( Revision::RAW ), false );
$content = $revision->getContent( Revision::RAW );
- //NOTE: article ID may not be known yet. prepareSave() should not modify the database.
+ // NOTE: article ID may not be known yet. prepareSave() should not modify the database.
$status = $content->prepareSave( $article, 0, -1, $user );
if ( !$status->isOK() ) {
// UploadStash
private $stash;
- // Since we are directly writing the file to STDOUT,
- // we should not be reading in really big files and serving them out.
- //
- // We also don't want people using this as a file drop, even if they
- // share credentials.
- //
- // This service is really for thumbnails and other such previews while
- // uploading.
+ /**
+ * Since we are directly writing the file to STDOUT,
+ * we should not be reading in really big files and serving them out.
+ *
+ * We also don't want people using this as a file drop, even if they
+ * share credentials.
+ *
+ * This service is really for thumbnails and other such previews while
+ * uploading.
+ */
const MAX_SERVE_BYTES = 1048576; // 1MB
public function __construct() {
}
$this->setHeaders();
- // In the case where the user is already logged in, and was redirected to the login form from a
- // page that requires login, do not show the login page. The use case scenario for this is when
- // a user opens a large number of tabs, is redirected to the login page on all of them, and then
- // logs in on one, expecting all the others to work properly.
- //
- // However, do show the form if it was visited intentionally (no 'returnto' is present). People
- // who often switch between several accounts have grown accustomed to this behavior.
+ /**
+ * In the case where the user is already logged in, and was redirected to
+ * the login form from a page that requires login, do not show the login
+ * page. The use case scenario for this is when a user opens a large number
+ * of tabs, is redirected to the login page on all of them, and then logs
+ * in on one, expecting all the others to work properly.
+ *
+ * However, do show the form if it was visited intentionally (no 'returnto'
+ * is present). People who often switch between several accounts have grown
+ * accustomed to this behavior.
+ */
if (
$this->mType !== 'signup' &&
!$this->mPosted &&
}
$status = $this->addNewAccountInternal();
- LoggerFactory::getInstance( 'authmanager' )->info( 'Account creation attempt with mailed password', array(
- 'event' => 'accountcreation',
- 'status' => $status,
- ) );
+ LoggerFactory::getInstance( 'authmanager' )->info(
+ 'Account creation attempt with mailed password',
+ array( 'event' => 'accountcreation', 'status' => $status )
+ );
if ( !$status->isGood() ) {
$error = $status->getMessage();
$this->mainLoginForm( $error->toString() );
global $wgBlockDisablesLogin;
if ( !$u->checkPassword( $this->mPassword ) ) {
if ( $u->checkTemporaryPassword( $this->mPassword ) ) {
- // The e-mailed temporary password should not be used for actu-
- // al logins; that's a very sloppy habit, and insecure if an
- // attacker has a few seconds to click "search" on someone's o-
- // pen mail reader.
- //
- // Allow it to be used only to reset the password a single time
- // to a new value, which won't be in the user's e-mail ar-
- // chives.
- //
- // For backwards compatibility, we'll still recognize it at the
- // login form to minimize surprises for people who have been
- // logging in with a temporary password for some time.
- //
- // As a side-effect, we can authenticate the user's e-mail ad-
- // dress if it's not already done, since the temporary password
- // was sent via e-mail.
+ /**
+ * The e-mailed temporary password should not be used for actu-
+ * al logins; that's a very sloppy habit, and insecure if an
+ * attacker has a few seconds to click "search" on someone's
+ * open mail reader.
+ *
+ * Allow it to be used only to reset the password a single time
+ * to a new value, which won't be in the user's e-mail ar-
+ * chives.
+ *
+ * For backwards compatibility, we'll still recognize it at the
+ * login form to minimize surprises for people who have been
+ * logging in with a temporary password for some time.
+ *
+ * As a side-effect, we can authenticate the user's e-mail ad-
+ * dress if it's not already done, since the temporary password
+ * was sent via e-mail.
+ */
if ( !$u->isEmailConfirmed() && !wfReadOnly() ) {
$u->confirmEmail();
$u->saveSettings();
$template->set( 'emailothers', $wgEnableUserEmail );
$template->set( 'canreset', $wgAuth->allowPasswordChange() );
$template->set( 'resetlink', $resetLink );
- $template->set( 'canremember', $wgExtendedLoginCookieExpiration === null ? ( $wgCookieExpiration > 0 ) : ( $wgExtendedLoginCookieExpiration > 0 ) );
+ $template->set( 'canremember', $wgExtendedLoginCookieExpiration === null ?
+ ( $wgCookieExpiration > 0 ) :
+ ( $wgExtendedLoginCookieExpiration > 0 ) );
$template->set( 'usereason', $user->isLoggedIn() );
$template->set( 'remember', $this->mRemember );
$template->set( 'cansecurelogin', ( $wgSecureLogin === true ) );
$parts = explode( '/', $par, 2 );
$this->limit = (int)$parts[0];
// @todo FIXME: nlinks is ignored
- //$nlinks = isset( $parts[1] ) && $parts[1] === 'nlinks';
+ // $nlinks = isset( $parts[1] ) && $parts[1] === 'nlinks';
$this->offset = 0;
} else {
- //$nlinks = true;
+ // $nlinks = true;
}
$this->setListoutput( $inc );
$this->shownavigation = !$inc;
"{$this->config['tidyBin']} -config {$this->config['tidyConfigFile']} " .
$this->config['tidyCommandLine'] . $opts, $descriptorspec, $pipes );
- //NOTE: At least on linux, the process will be created even if tidy is not installed.
+ // NOTE: At least on linux, the process will be created even if tidy is not installed.
// This means that missing tidy will be treated as a validation failure.
if ( is_resource( $process ) ) {
* @return string
*/
public function getPageUrl( TitleValue $page, $params = array() ) {
- //TODO: move the code from Linker::linkUrl here!
- //The below is just a rough estimation!
+ // TODO: move the code from Linker::linkUrl here!
+ // The below is just a rough estimation!
$name = $this->formatter->getPrefixedText( $page );
$name = str_replace( ' ', '_', $name );
MWNamespace::hasGenderDistinction( $namespace )
) {
- //NOTE: we are assuming here that the title text is a user name!
+ // NOTE: we are assuming here that the title text is a user name!
$gender = $this->genderCache->getGenderOf( $text, __METHOD__ );
$name = $this->language->getGenderNsText( $namespace, $gender );
} else {
# Disallow Talk:File:x type titles...
throw new MalformedTitleException( 'title-invalid-talk-namespace', $text );
} elseif ( Interwiki::isValidInterwiki( $x[1] ) ) {
- //TODO: get rid of global state!
+ // TODO: get rid of global state!
# Disallow Talk:Interwiki:x type titles...
throw new MalformedTitleException( 'title-invalid-talk-namespace', $text );
}
global $wgContLang;
- // Can we assume that the part of the page title before the colon is a
- // namespace name?
- //
- // XML export schema version 0.5 and earlier (MW 1.18 and earlier) does not
- // contain a <ns> tag, so we need to be able to handle that case.
- //
- // If we know the namespace ID, we assume a non-zero namespace ID means
- // the ':' sets off a valid namespace name. If we don't know the namespace
- // ID, we fall back to using the local wiki's namespace names to resolve
- // this -- better than nothing, and mimics the old crappy behavior
+ /**
+ * Can we assume that the part of the page title before the colon is a
+ * namespace name?
+ *
+ * XML export schema version 0.5 and earlier (MW 1.18 and earlier) does not
+ * contain a <ns> tag, so we need to be able to handle that case.
+ *
+ * If we know the namespace ID, we assume a non-zero namespace ID means
+ * the ':' sets off a valid namespace name. If we don't know the namespace
+ * ID, we fall back to using the local wiki's namespace names to resolve
+ * this -- better than nothing, and mimics the old crappy behavior
+ */
$isNamespacePartValid = is_null( $ns ) ?
( $wgContLang->getNsIndex( $pieces[0] ) !== false ) :
$ns != 0;
'<a href',
'<body',
'<head',
- '<html', #also in safari
+ '<html', # also in safari
'<img',
'<pre',
- '<script', #also in safari
+ '<script', # also in safari
'<table'
);
}
}
- return false; //No scripts detected
+ return false; // No scripts detected
}
/**
$output = trim( $output );
if ( !$output ) {
- $output = true; #if there's no output, return true
+ $output = true; # if there's no output, return true
} elseif ( $msgPattern ) {
$groups = array();
if ( preg_match( $msgPattern, $output, $groups ) ) {
// an instance of UploadStash
private $stash;
- //LocalFile repo
+ // LocalFile repo
private $repo;
/**
class UploadStashNoSuchKeyException extends UploadStashException {
}
-
}
$this->db = $db;
$this->table = $table;
- $this->primaryKey = (array) $primaryKey;
+ $this->primaryKey = (array)$primaryKey;
$this->fetchColumns = $this->primaryKey;
$this->orderBy = implode( ' ASC,', $this->primaryKey ) . ' ASC';
$this->batchSize = $batchSize;
* @return boolean True when the iterator is in a valid state
*/
public function valid() {
- return (bool) $this->current;
+ return (bool)$this->current;
}
/**
$instance = self::singleton();
if ( !is_array( $filePaths ) ) {
- $filePaths = (array) $filePaths;
+ $filePaths = (array)$filePaths;
}
if ( count( $filePaths ) === 1 ) {
*
* @param MWTimestamp $time
* @param MWTimestamp|null $relativeTo The base timestamp to compare to (defaults to now)
- * @param User|null $user User the timestamp is being generated for (or null to use main context's user)
+ * @param User|null $user User the timestamp is being generated for
+ * (or null to use main context's user)
* @return string Formatted timestamp
*/
- public function getHumanTimestamp( MWTimestamp $time, MWTimestamp $relativeTo = null, User $user = null ) {
+ public function getHumanTimestamp(
+ MWTimestamp $time, MWTimestamp $relativeTo = null, User $user = null
+ ) {
if ( $relativeTo === null ) {
$relativeTo = new MWTimestamp();
}
* @return string Human timestamp
* @since 1.26
*/
- private function getHumanTimestampInternal( MWTimestamp $ts, MWTimestamp $relativeTo, User $user ) {
+ private function getHumanTimestampInternal(
+ MWTimestamp $ts, MWTimestamp $relativeTo, User $user
+ ) {
$diff = $ts->diff( $relativeTo );
$diffDay = (bool)( (int)$ts->timestamp->format( 'w' ) -
(int)$relativeTo->timestamp->format( 'w' ) );
// text should be splited by ";" only if a valid variant
// name exist after the markup, for example:
// -{zh-hans:<span style="font-size:120%;">xxx</span>;zh-hant:\
- // <span style="font-size:120%;">yyy</span>;}-
+ // <span style="font-size:120%;">yyy</span>;}-
// we should split it as:
// array(
- // [0] => 'zh-hans:<span style="font-size:120%;">xxx</span>'
- // [1] => 'zh-hant:<span style="font-size:120%;">yyy</span>'
- // [2] => ''
- // )
+ // [0] => 'zh-hans:<span style="font-size:120%;">xxx</span>'
+ // [1] => 'zh-hant:<span style="font-size:120%;">yyy</span>'
+ // [2] => ''
+ // )
$pat = '/;\s*(?=';
foreach ( $this->mVariants as $variant ) {
// zh-hans:xxx;zh-hant:yyy
return $wgGrammarForms['fi'][$case][$word];
}
- # These rules are not perfect, but they are currently only used for site names so it doesn't
- # matter if they are wrong sometimes. Just add a special case for your site name if necessary.
+ # These rules don't cover the whole language.
+ # They are used only for site names.
# wovel harmony flag
$aou = preg_match( '/[aou][^äöy]*$/i', $word );
}
// Set up some constants...
- $allVowels = array( "е", "и", "э", "ө", "ү", "а", "ё", "о", "у", "ы",
- "ю", "я", "a", "e", "i", "o", "ö", "u", "ü", "y" );
- $frontVowels = array( "е", "и", "э", "ө", "ү", "e", "i", "ö", "ü" );
- $backVowels = array( "а", "ё", "о", "у", "ы", "ю", "я", "a", "o", "u", "y" );
- $unroundFrontVowels = array( "е", "и", "э", "e", "i" );
- $roundFrontVowels = array( "ө", "ү", "ö", "ü" );
- $unroundBackVowels = array( "а", "ы", "я", "a", "y" );
- $roundBackVowels = array( "ё", "о", "у", "ю", "o", "u" );
- //$voicedPhonemes = array( "д", "б", "з", "ж", "г", "d", "b", "z", "g" );
- $unvoicedPhonemes = array( "т", "п", "с", "ш", "к", "ч", "х", "t", "p", "s", "k", "x" );
- $directiveUnvoicedStems = array( "т", "п", "с", "ш", "к", "ч", "х", "л",
- "м", "н", "ң", "t", "p", "s", "k", "x", "l", "m", "n", "ŋ" );
- $directiveVoicedStems = array( "д", "б", "з", "ж", "г", "р", "й", "d", "b", "z", "g", "r", "j" );
+ $allVowels = array( "е", "и", "э", "ө", "ү", "а", "ё", "о", "у", "ы", "ю", "я" );
+ $frontVowels = array( "е", "и", "э", "ө", "ү" );
+ $backVowels = array( "а", "ё", "о", "у", "ы", "ю", "я" );
+ $unroundFrontVowels = array( "е", "и", "э" );
+ $roundFrontVowels = array( "ө", "ү" );
+ $unroundBackVowels = array( "а", "ы", "я" );
+ $roundBackVowels = array( "ё", "о", "у", "ю" );
+ $unvoicedPhonemes = array( "т", "п", "с", "ш", "к", "ч", "х" );
+ $directiveUnvoicedStems = array( "т", "п", "с", "ш", "к", "ч", "х", "л", "м", "н", "ң" );
+ $directiveVoicedStems = array( "д", "б", "з", "ж", "г", "р", "й" );
- //$allSonants = array("л", "м", "н", "ң", "р", "й");
- //$allNasals = array("м", "н", "ң");
-
- //Put the word in a form we can play with since we're using UTF-8
+ // Put the word in a form we can play with since we're using UTF-8
preg_match_all( '/./us', $word, $ar );
// Here's the last letter in the word
$wordEnding = $ar[0][count( $ar[0] ) - 1];
+
// Here's an array with the order of the letters in the word reversed so
// we can find a match quicker. *shrug*
$wordReversed = array_reverse( $ar[0] );
continue;
}
}
+
if ( $wordLastVowel !== null ) {
break;
} else {
$word = implode( "", $ar[0] ) . "тың";
} else {
}
- } elseif ( $wordEnding === "л" || $wordEnding === "l" ) {
+ } elseif ( $wordEnding === "л" ) {
if ( in_array( $wordLastVowel, $roundFrontVowels ) ) {
$word = implode( "", $ar[0] ) . "дүң";
} elseif ( in_array( $wordLastVowel, $unroundFrontVowels ) ) {
$word = implode( "", $ar[0] ) . "ты";
} else {
}
- } elseif ( $wordEnding === "л" || $wordEnding === "l" ) {
+ } elseif ( $wordEnding === "л" ) {
if ( in_array( $wordLastVowel, $roundFrontVowels ) ) {
$word = implode( "", $ar[0] ) . "дү";
} elseif ( in_array( $wordLastVowel, $unroundFrontVowels ) ) {
default:
break;
}
+
return $word;
}
}
return $wgGrammarForms['uk'][$case][$word];
}
- # These rules are not perfect, but they are currently only used for site names so it doesn't
- # matter if they are wrong sometimes. Just add a special case for your site name if necessary.
+ # These rules don't cover the whole language.
+ # They are used only for site names.
# join and array_slice instead mb_substr
$ar = array();
if ( !preg_match( "/[a-zA-Z_]/us", $word ) ) {
switch ( $case ) {
case 'genitive': # родовий відмінок
- if ( ( join( '', array_slice( $ar[0], -4 ) ) == 'вікі' )
- || ( join( '', array_slice( $ar[0], -4 ) ) == 'Вікі' )
- ) {
- } elseif ( join( '', array_slice( $ar[0], -1 ) ) == 'ь' ) {
- $word = join( '', array_slice( $ar[0], 0, -1 ) ) . 'я';
- } elseif ( join( '', array_slice( $ar[0], -2 ) ) == 'ія' ) {
+ if ( join( '', array_slice( $ar[0], -2 ) ) === 'ія' ) {
$word = join( '', array_slice( $ar[0], 0, -2 ) ) . 'ії';
- } elseif ( join( '', array_slice( $ar[0], -2 ) ) == 'ка' ) {
- $word = join( '', array_slice( $ar[0], 0, -2 ) ) . 'ки';
- } elseif ( join( '', array_slice( $ar[0], -2 ) ) == 'ти' ) {
- $word = join( '', array_slice( $ar[0], 0, -2 ) ) . 'тей';
- } elseif ( join( '', array_slice( $ar[0], -2 ) ) == 'ди' ) {
+ } elseif ( join( '', array_slice( $ar[0], -2 ) ) === 'ти' ) {
+ $word = join( '', array_slice( $ar[0], 0, -2 ) ) . 'т';
+ } elseif ( join( '', array_slice( $ar[0], -2 ) ) === 'ди' ) {
$word = join( '', array_slice( $ar[0], 0, -2 ) ) . 'дів';
- } elseif ( join( '', array_slice( $ar[0], -3 ) ) == 'ник' ) {
+ } elseif ( join( '', array_slice( $ar[0], -3 ) ) === 'ник' ) {
$word = join( '', array_slice( $ar[0], 0, -3 ) ) . 'ника';
}
break;
- case 'dative': # давальний відмінок
- # stub
- break;
case 'accusative': # знахідний відмінок
- if ( ( join( '', array_slice( $ar[0], -4 ) ) == 'вікі' )
- || ( join( '', array_slice( $ar[0], -4 ) ) == 'Вікі' )
- ) {
- } elseif ( join( '', array_slice( $ar[0], -2 ) ) == 'ія' ) {
+ if ( join( '', array_slice( $ar[0], -2 ) ) === 'ія' ) {
$word = join( '', array_slice( $ar[0], 0, -2 ) ) . 'ію';
}
break;
- case 'instrumental': # орудний відмінок
- # stub
- break;
- case 'prepositional': # місцевий відмінок
- # stub
- break;
}
}
return $word;
*/
function commafy( $_ ) {
if ( !preg_match( '/^\-?\d{1,4}(\.\d+)?$/', $_ ) ) {
- return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) );
+ return strrev( (string)preg_replace(
+ '/(\d{3})(?=\d)(?!\d*\.)/',
+ '$1,',
+ strrev( $_ )
+ ) );
} else {
return $_;
}
"createaccounterror": "Аккаунт ублэн лъэкIыгъэп: $1",
"noname": "НэбгырацIэ тэрэз итхагъэп.",
"loginsuccesstitle": "ШIоу ухэхьагъ",
+ "nosuchusershort": "\"$1\", афэдэ цIэ зиIэу нэбгырэ щыIэп.\nТхыкIэр уплъэкIужь.",
"nouserspecified": "НэбгырацIэр птхын фае.",
"login-userblocked": "Мы нэбгырэр блокыгъэ. Системэм хэхьашъущтэп.",
"wrongpassword": "ШъэфгущыIэр тэрэзэп.\nДжыри зэ еплъ.",
"wrongpasswordempty": "ШъэфгущыIэр нэкIы.\nДжыри зэ еплъ.",
"passwordtooshort": "ШъэфгущыIэр мыхъуми {{PLURAL:$1|1 символ |символ $1}} хъун фае.",
+ "passwordtoolong": "ШъэфгущыIэр мыщ нахь кIыхьэ хъун лъэкIыщтэп: {{PLURAL:$1 символ|$1 символ}}.",
"password-name-match": "Уи шъэфгущыIэр уи нэбгырацIэм фэдапэ хъущтэп.",
+ "password-login-forbidden": "Мы ныбгырацIэмрэ шъэфгущыIэмрэ бгъэфедэ хъужьыщтэп.",
"mailmypassword": "Зэтедз шъэфгущыIэр",
"noemailcreate": "Емэйл тэрэз птхын фае.",
"mailerror": "Емэйл егъэхьыныр къуанчэ: $1",
"unusedimages": "ملفات غير مستخدمة",
"wantedcategories": "تصنيفات مطلوبة",
"wantedpages": "صفحات مطلوبة",
+ "wantedpages-summary": "قائمة بالصفحات غير الموجودة التي لديها أكثر وصلات لها، باستثناء الصفحات التي تحويلات فقط تصل إليها. لقائمة بالصفحات غير الموجودة التي توجد تحويلات تصل إليها، انظر [[{{#special:BrokenRedirects}}|قائمة التحويلات المكسورة]].",
"wantedpages-badtitle": "عنوان غير صحيح في مجموعة النتائج: $1",
"wantedfiles": "ملفات مطلوبة",
"wantedfiletext-cat": "الملفات التالية مستعملة ولكن لا وجود لها. يمكن سرد ملفات من مستودعات خارجية بالرغم من وجودها. سيتم <del>محو</del> أي أيجابيات كاذبة. بالإضافة، أي صفحات تتضمن الملفات الغير موجودة تم سردها في [[:$1]].",
"version-entrypoints-header-url": "المسار",
"version-entrypoints-articlepath": "[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgArticlePath مسار المقالات]",
"version-entrypoints-scriptpath": "[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgScriptPath مسار السكريبت]",
- "version-libraries": "مكتبات مثبته",
+ "version-libraries": "مكتبات مثبتة",
"version-libraries-library": "المكتبة",
"version-libraries-version": "الإصدارة",
"version-libraries-license": "الترخيص",
"permissionserrorstext-withaction": "Вы ня маеце дазволу на $2 з {{PLURAL:$1|1=наступнай прычыны|наступных прычынаў}}:",
"recreate-moveddeleted-warn": "'''Увага: Вы ствараеце старонку, якая раней была выдаленая.'''\n\nУпэўніцеся, што стварэньне гэтай старонкі неабходнае.\nНіжэй пададзеныя журналы выдаленьняў і пераносаў гэтай старонкі:",
"moveddeleted-notice": "Гэта старонка была выдаленая. Журналы выдаленьняў і пераносаў для гэтай старонкі пададзеныя ніжэй.",
+ "moveddeleted-notice-recent": "Выбачайце, гэтая старонка была нядаўна выдаленая (цягам апошніх 24 гадзінаў).\nЖурналы выдаленьняў і пераносаў для гэтай старонкі пададзеныя ніжэй для даведкі.",
"log-fulllog": "Паказаць журнал цалкам",
"edit-hook-aborted": "Рэдагаваньне скасаванае працэдурай-перахопнікам.\nТлумачэньняў не было.",
"edit-gone-missing": "Немагчыма абнавіць старонку.\nПадобна, што яна была выдаленая.",
"welcomecreation-msg": "আপনার অ্যাকাউন্ট তৈরী হয়েছে।\nআপনার [[Special:Preferences|{{SITENAME}} পছন্দসমূহ]] পরিবর্তন করে নিতে ভুলবেন না।",
"yourname": "ব্যবহারকারী নাম:",
"userlogin-yourname": "ব্যবহারকারী নাম",
- "userlogin-yourname-ph": "আপনার ব্যবহাকারী নাম লিখুন",
- "createacct-another-username-ph": "আপনার ব্যবহাকারী নাম প্রবেশ করান",
+ "userlogin-yourname-ph": "à¦\86পনার বà§\8dযবহারà¦\95ারà§\80 নাম লিà¦\96à§\81ন",
+ "createacct-another-username-ph": "à¦\86পনার বà§\8dযবহারà¦\95ারà§\80 নাম পà§\8dরবà§\87শ à¦\95রান",
"yourpassword": "পাসওয়ার্ড:",
"userlogin-yourpassword": "পাসওয়ার্ড",
"userlogin-yourpassword-ph": "আপনার পাসওয়ার্ড লিখুন",
"noname": "আপনি সঠিক ব্যবহারকারী নাম নির্দিষ্ট করেননি।",
"loginsuccesstitle": "প্রবেশ সফল",
"loginsuccess": "'''আপনি এইমাত্র \"$1\" নামে {{SITENAME}}-তে প্রবেশ করেছেন।'''",
- "nosuchuser": "\"$1\" নামà§\87 à¦\95à§\8bন বà§\8dযবহারà¦\95ারà§\80 নà§\87à¦\87।\nবà§\8dযবহাà¦\95ারà§\80 নাম আকার সংবেদনশীল।\nআপনার বানান পরীক্ষা করে দেখুন, অথবা [[Special:UserLogin/signup|নতুন একটি অ্যাকাউন্ট খুলুন]]।",
+ "nosuchuser": "\"$1\" নামà§\87 à¦\95à§\8bন বà§\8dযবহারà¦\95ারà§\80 নà§\87à¦\87।\nবà§\8dযবহারà¦\95ারà§\80 নামà§\87র আকার সংবেদনশীল।\nআপনার বানান পরীক্ষা করে দেখুন, অথবা [[Special:UserLogin/signup|নতুন একটি অ্যাকাউন্ট খুলুন]]।",
"nosuchusershort": "\"$1\" নামের কোন ব্যবহারকারী নেই। নামের বানান পরীক্ষা করুন।",
"nouserspecified": "আপনাকে অবশ্যই ব্যবহারকারী নাম নির্দিষ্ট করতে হবে।",
"login-userblocked": "এই ব্যবহারকারীকে বাধা দেওয়া হয়েছে। লগ-ইন সম্ভব নয়।",
"ipb_already_blocked": "\"$1\" ইতিমধ্যে ব্লক",
"ipb-needreblock": "$1 পূর্বেই ব্লক রয়েছেন। আপনি কি সেটিংস পরিবর্তন করতে চান?",
"ipb-otherblocks-header": "অন্যান্য {{PLURAL:$1|বাধাঁ|বাধাঁসমূহ}}",
- "unblock-hideuser": "à¦\86পনি à¦\8fà¦\87 বà§\8dযবহারà¦\95ারà§\80à¦\95à§\87 à¦\86নবà§\8dলà¦\95 à¦\95রতà§\87 পারবà§\87ন না, à¦\95ারণ à¦\8fà¦\87 বà§\8dযবহারà¦\95ারà§\80দà§\87র বà§\8dযবহাকারী নাম লুকানো রয়েছে।",
+ "unblock-hideuser": "à¦\86পনি à¦\8fà¦\87 বà§\8dযবহারà¦\95ারà§\80à¦\95à§\87 বাধা মà§\81à¦\95à§\8dত à¦\95রতà§\87 পারবà§\87ন না, à¦\95ারণ à¦\8fà¦\87 বà§\8dযবহারà¦\95ারà§\80দà§\87র বà§\8dযবহারকারী নাম লুকানো রয়েছে।",
"ipb_cant_unblock": "ত্রুটি: $1 ব্লক আইডি খুঁজে পাওয়া যায়নি। হয়ত ইতিমধ্যেই এটির উপর থেকে বাধা তুলে নেওয়া হয়েছে।",
"ipb_blocked_as_range": "ত্রুটি: $1 আইপি ঠিকানাটিকে সরাসরি বাধা দেওয়া হয়নি এবং বাধা তুলে নেওয়া যাবে না। তবে ঠিকানাটি $2 সীমার অন্তর্ভুক্ত এবং সেটি থেকে বাধা তুলে নেওয়া সম্ভব।",
"ip_range_invalid": "অবৈধ আইপি শ্রেণী",
"special-characters-title-emdash": "em ড্যাশ",
"special-characters-title-minus": "বিয়োগ চিহ্ন",
"mw-widgets-dateinput-no-date": "কোন তারিখ নির্বাচন করা হয়নি",
+ "mw-widgets-dateinput-placeholder-day": "বববব-মম-দদ",
+ "mw-widgets-dateinput-placeholder-month": "বববব-মম",
"mw-widgets-titleinput-description-new-page": "পাতা এখনো বিদ্যমান নয়",
"mw-widgets-titleinput-description-redirect": "$1-এ পুনঃনির্দেশিত"
}
"deletepage": "Delete page",
"confirm": "Confirm",
"excontent": "content was: \"$1\"",
- "excontentauthor": "content was: \"$1\" (and the only contributor was \"[[Special:Contributions/$2|$2]]\")",
+ "excontentauthor": "content was: \"$1\", and the only contributor was \"[[Special:Contributions/$2|$2]]\" ([[User talk:$2|talk]])",
"exbeforeblank": "content before blanking was: \"$1\"",
"delete-confirm": "Delete \"$1\"",
"delete-legend": "Delete",
"filerevert-legend": "Reversión de archivos",
"filerevert-intro": "Estás por revertir <strong>[[Media:$1|$1]]</strong> a la [$4 versión del $2 a las $3].",
"filerevert-comment": "Motivo:",
- "filerevert-defaultcomment": "Revertido a la versión subida el $1 a las $2",
+ "filerevert-defaultcomment": "Revertido a la versión del $1 a las $2 ($3)",
"filerevert-submit": "Revertir",
"filerevert-success": "<strong>[[Media:$1|$1]]</strong> ha sido revertido a la [$4 versión del $2 a las $3].",
"filerevert-badversion": "No existe versión local previa de este archivo con esa marca de tiempo.",
"emailccsubject": "Copia de tu mensaje a $1: $2",
"emailsent": "Correo electrónico enviado",
"emailsenttext": "Se ha enviado tu mensaje de correo electrónico.",
- "emailuserfooter": "Este correo electrónico fue enviado por $1 a $2 a través de la función «Enviar un correo electrónico a este usuario» en {{SITENAME}}.",
+ "emailuserfooter": "Este correo electrónico fue {{GENDER:$1|enviado}} por $1 a {{GENDER:$2|$2}} a través de la función «{{int:emailuser}}» en {{SITENAME}}.",
"usermessage-summary": "Dejando un mensaje de sistema.",
"usermessage-editor": "Mensajero del sistema",
"watchlist": "Lista de seguimiento",
"nstab-template": "Mall",
"nstab-help": "Juhend",
"nstab-category": "Kategooria",
+ "mainpage-nstab": "Esileht",
"nosuchaction": "Sellist toimingut pole.",
"nosuchactiontext": "Viki ei tunne internetiaadressile vastavat tegevust.\nVõimalik, et sa sisestasid aadressi valesti või kasutasid vigast linki.\nSamuti ei ole välistatud, et tarkvaras, mida {{SITENAME}} kasutatab, on viga.",
"nosuchspecialpage": "Sellist erilehekülge pole.",
"createacct-captcha": "Turvakontroll",
"createacct-imgcaptcha-ph": "Sisesta ülalnähtav tekst",
"createacct-submit": "Loo konto",
- "createacct-another-submit": "Loo teine konto",
+ "createacct-another-submit": "Loo konto",
"createacct-benefit-heading": "{{SITENAME}} on sinusuguste inimeste tehtud.",
"createacct-benefit-body1": "{{PLURAL:$1|muudatus|muudatust}}",
"createacct-benefit-body2": "{{PLURAL:$1|lehekülg|lehekülge}}",
"changeemail-password": "Sinu parool {{GRAMMAR:inessive|{{SITENAME}}}}:",
"changeemail-submit": "Muuda e-posti aadress",
"changeemail-throttled": "Oled proovinud liiga palju kordi sisse logida.\nPalun oota $1, enne kui uuesti proovid.",
+ "changeemail-nochange": "Palun sisesta teistsugune uus e-posti aadress.",
"resettokens": "Lubade lähtestamine",
"resettokens-text": "Saad lähtestada load, mida on vaja siin sinu kontoga seotud kindlatele eraandmetele ligipääsuks.\n\nPeaksid load lähtestama, kui jagasid neid kogemata või kui su konto on kellegi teise võimusesse sattunud.",
"resettokens-no-tokens": "Lähtestatavad load puuduvad.",
"permissionserrorstext-withaction": "Sul pole lubatud {{lcfirst:$2}} {{PLURAL:$1|järgmisel põhjusel|järgmistel põhjustel}}:",
"recreate-moveddeleted-warn": "'''Hoiatus: Lood uuesti lehekülge, mis on varem kustutatud.'''\n\nKaalu, kas lehekülje uuesti loomine on kohane.\nLehekülje eelnevad kustutamised ja teisaldamised:",
"moveddeleted-notice": "See lehekülg on kustutatud.\nAllpool on esitatud lehekülje kustutamis- ja teisaldamislogi.",
+ "moveddeleted-notice-recent": "Kahjuks on see lehekülg hiljuti kustutatud (viimase 24 tunni jooksul).\nAllpool on ära toodud selle lehekülje sissekanded teisaldamis- ja kustutamislogis.",
"log-fulllog": "Vaata kogu logi",
"edit-hook-aborted": "Laiendusliides katkestas muutmise täpsemat selgitust andmata.",
"edit-gone-missing": "Polnud võimalik lehekülge uuendada.\nTundub, et see on kustutatud.",
"filerevert-legend": "Faili taastamine",
"filerevert-intro": "Sa taastad faili '''[[Media:$1|$1]]''' seisuga [$4 $3, $2] kasutusel olnud versiooni.",
"filerevert-comment": "Põhjus:",
- "filerevert-defaultcomment": "Ennistati versioon seisuga $1, kell $2",
+ "filerevert-defaultcomment": "Ennistati versioon seisuga $1, kell $2 ($3)",
"filerevert-submit": "Taasta",
"filerevert-success": "Faili '''[[Media:$1|$1]]''' seisuga [$4 $3, $2 kasutusel olnud versioon] on taastatud.",
"filerevert-badversion": "Ette antud ajatempliga kohalik versioon sellest failist puudub.",
"logentry-newusers-byemail": "$1 {{GENDER:$2|lõi}} kasutajakonto $3 ja parool saadeti e-kirjatsi",
"logentry-newusers-autocreate": "Konto $1 {{GENDER:$2|loodi}} automaatselt",
"logentry-protect-move_prot": "$1 {{GENDER:$2|teisaldas}} kaitsesätted leheküljelt $4 leheküljele $3",
+ "logentry-protect-unprotect": "$1 {{GENDER:$2|eemaldas}} lehekülje $3 kaitse",
+ "logentry-protect-protect": "$1 {{GENDER:$2|kaitses}} lehekülje $3 $4",
+ "logentry-protect-protect-cascade": "$1 {{GENDER:$2|kaitses}} lehekülje $3 $4 [kaskaadkaitse]",
+ "logentry-protect-modify": "$1 {{GENDER:$2|muutis}} lehekülje $3 kaitsetaset $4",
+ "logentry-protect-modify-cascade": "$1 {{GENDER:$2|muutis}} lehekülje $3 kaitsetaset $4 [kaskaadkaitse]",
"logentry-rights-rights": "$1 {{GENDER:$2|muutis}} kasutaja $3 rühmaliikmesust; enne oli $4, nüüd on $5",
"logentry-rights-rights-legacy": "$1 {{GENDER:$2|muutis}} kasutaja $3 rühmaliikmesust",
"logentry-rights-autopromote": "$1 {{GENDER:$2|viidi}} automaatselt üle teise rühma; enne oli $4, nüüd on $5",
"api-error-badaccess-groups": "Sul pole selles vikis üleslaadimisõigust.",
"api-error-badtoken": "Sisemine tõrge: Sobimatu nimi.",
"api-error-copyuploaddisabled": "URLi kaudu üleslaadimine on selles serveris keelatud.",
- "api-error-duplicate": "Siin on {{PLURAL:$1|[$2 teine samasisuline fail]|[$2 mõned teised samasisulised failid]}} juba olemas.",
+ "api-error-duplicate": "Siin on {{PLURAL:$1|teine samasisuline fail|mõned teised samasisulised failid}} juba olemas.",
"api-error-duplicate-archive": "Siin {{PLURAL:$1|on teine samasisuline fail|olid mõned teised samasisulised failid}} juba olemas, aga {{PLURAL:$1|see|need}} kustutati.",
"api-error-empty-file": "Üleslaaditav fail on tühi.",
"api-error-emptypage": "Uute tühjade lehekülgede loomine pole lubatud.",
"databaseerror-error": "שגיאה: $1",
"laggedslavemode": "'''אזהרה:''' הדף עשוי שלא להכיל עדכונים אחרונים.",
"readonly": "בסיס הנתונים נעול",
- "enterlockreason": "×\99ש ×\9c×\94×\96×\99×\9f סיבה לנעילה, כולל הערכה למועד שחרור הנעילה",
+ "enterlockreason": "×\99ש ×\9c×\94ק×\9c×\99×\93 סיבה לנעילה, כולל הערכה למועד שחרור הנעילה",
"readonlytext": "בסיס נתונים זה של האתר נעול ברגע זה לצורך הזנת נתונים ושינויים. ככל הנראה מדובר בתחזוקה שוטפת, שלאחריה יחזור האתר לפעולתו הרגילה.\n\nמנהל המערכת שנעל את בסיס הנתונים סיפק את ההסבר הבא: $1",
"missing-article": "בסיס הנתונים לא מצא את הטקסט של הדף שהוא היה אמור למצוא, בשם \"$1\" $2.\n\nהדבר נגרם בדרך כלל על־ידי קישור ישן להשוואת גרסאות של דף שנמחק או לגרסה של דף כזה.\n\nאם זה אינו המקרה, זהו כנראה באג בתוכנה.\nאנא דווחו על כך ל[[Special:ListUsers/sysop|מפעיל מערכת]], תוך שמירת פרטי כתובת ה־URL.",
"missingarticle-rev": "(מספר גרסה: $1)",
"emailnotauthenticated": "כתובת הדוא\"ל שלכם עדיין לא אומתה.\nלא יישלח אליכם דוא\"ל עבור אף אחת מהתכונות הבאות.",
"noemailprefs": "יש לציין כתובת דוא\"ל בהעדפות שלך כדי שתכונות אלה יעבדו.",
"emailconfirmlink": "אישור כתובת הדוא\"ל שלך",
- "invalidemailaddress": "×\9bת×\95×\91ת ×\94×\93×\95×\90\"×\9c ×\90×\99× ×\94 ×\9eתק×\91×\9cת ×\9b×\99×\95×\95×\9f ×©× ×¨×\90×\94 ש×\94×\99×\90 ×\91פ×\95ר×\9e×\98 ×\9c×\90 ×\97×\95ק×\99.\n×\99ש ×\9c×\94×\96×\99×\9f כתובת תקינה או להשאיר את השדה ריק.",
+ "invalidemailaddress": "×\9bת×\95×\91ת ×\94×\93×\95×\90\"×\9c ×\90×\99× ×\94 ×\9eתק×\91×\9cת ×\9b×\99×\95×\95×\9f ×©× ×¨×\90×\94 ש×\94×\99×\90 ×\91פ×\95ר×\9e×\98 ×\9c×\90 ×\97×\95ק×\99.\n×\99ש ×\9c×\94ק×\9c×\99×\93 כתובת תקינה או להשאיר את השדה ריק.",
"cannotchangeemail": "לא ניתן לשנות את כתובות הדוא\"ל של חשבונות באתר ויקי זה.",
"emaildisabled": "אתר זה לא יכול לשלוח דואר אלקטרוני.",
"accountcreated": "החשבון נוצר",
"changeemail-password": "סיסמה ב{{grammar:תחילית|{{SITENAME}}}}:",
"changeemail-submit": "שינוי כתובת הדוא\"ל",
"changeemail-throttled": "ביצעתם ניסיונות רבים מדי להיכנס לחשבון זה.\nאנא המתינו $1 לפני שתנסו שוב.",
- "changeemail-nochange": "× ×\90 ×\9c×\94×\96×\99×\9f ×\9bת×\95×\91ת ×\93×\95×\90\"×\9c שונה.",
+ "changeemail-nochange": "×\99ש ×\9c×\94ק×\9c×\99×\93 ×\9bת×\95×\91ת ×\93×\95×\90\"×\9c ×\97×\93ש×\94 שונה.",
"resettokens": "איפוס אסימונים",
"resettokens-text": "בעמוד זה ניתן לאפס אסימונים שמאפשרים גישה לנתונים פרטיים של החשבון שלך.\n\nרצוי לעשות זאת אם שיתפת אותם בטעות עם אחרים או אם חשבונך נפרץ.",
"resettokens-no-tokens": "אין אסימונים לאיפוס.",
"template-protected": "(מוגנת)",
"template-semiprotected": "(מוגנת חלקית)",
"hiddencategories": "דף זה כלול ב{{PLURAL:$1|קטגוריה מוסתרת אחת|־$1 קטגוריות מוסתרות}}:",
- "edittools": "<!-- הטקסט הנכתב כאן יוצג מתחת לטופסי עריכת דפים והעלאת קבצים, ולפיכך ניתן לכתוב להציג בו תווים קשים לכתיבה, קטעים מוכנים של טקסט ועוד. -->",
+ "edittools": "<!-- הטקסט הנכתב כאן יוצג מתחת לטופסי עריכת דפים והעלאת קבצים. -->",
"nocreatetext": "ב{{grammar:תחילית|{{SITENAME}}}} קיימת הגבלה על יצירת דפים חדשים.\nבאפשרותך לחזור אחורה ולערוך דף קיים, או [[Special:UserLogin|להיכנס לחשבון או ליצור חשבון]].",
"nocreate-loggedin": "אינך מורשה ליצור דפים חדשים.",
"sectioneditnotsupported-title": "עריכת פסקאות אינה נתמכת",
"permissionserrorstext-withaction": "אינך מורשה $2, מה{{PLURAL:$1|סיבה הבאה|סיבות הבאות}}:",
"recreate-moveddeleted-warn": "'''אזהרה: הנכם יוצרים דף חדש שנמחק בעבר.'''\n\nכדאי לשקול אם יהיה זה נכון להמשיך לערוך את הדף.\nיומני המחיקות וההעברות של הדף מוצגים להלן:",
"moveddeleted-notice": "דף זה נמחק.\nיומני המחיקות וההעברות של הדף מוצגים להלן.",
- "moveddeleted-notice-recent": "ס×\9c×\99×\97×\94, הדף הזה נמחק לאחרונה (ב־24 השעות האחרונות).\nיומני המחיקה וההעברה של הדף מוצגים להלן לעיון.",
+ "moveddeleted-notice-recent": "×\9eצ×\98ער×\99×\9d, הדף הזה נמחק לאחרונה (ב־24 השעות האחרונות).\nיומני המחיקה וההעברה של הדף מוצגים להלן לעיון.",
"log-fulllog": "הצגת היומן המלא",
"edit-hook-aborted": "העריכה בוטלה על־ידי Hook.\nלא ניתן הסבר לביטול.",
"edit-gone-missing": "לא ניתן לעדכן את הדף.\nנראה שהוא נמחק.",
"noemailtext": "משתמש זה לא הזין כתובת דואר אלקטרוני תקינה.",
"nowikiemailtext": "משתמש זה בחר שלא לקבל דואר אלקטרוני ממשתמשים אחרים.",
"emailnotarget": "שם המשתמש של הנמען לא קיים או בלתי תקין.",
- "emailtarget": "×\99ש ×\9c×\94×\96×\99×\9f את שם המשתמש של הנמען",
+ "emailtarget": "×\99ש ×\9c×\94ק×\9c×\99×\93 את שם המשתמש של הנמען",
"emailusername": "שם משתמש:",
"emailusernamesubmit": "שליחה",
"email-legend": "שליחת דואר אלקטרוני למשתמש אחר של {{SITENAME}}",
"pageinfo-protect-cascading-yes": "예",
"pageinfo-protect-cascading-from": "연쇄적 보호한 기점",
"pageinfo-category-info": "분류 정보",
+ "pageinfo-category-total": "사용자 수",
"pageinfo-category-pages": "문서 수",
"pageinfo-category-subcats": "하위 분류 수",
"pageinfo-category-files": "파일 수",
"tags-deactivate-reason": "이유:",
"tags-deactivate-not-allowed": "\"$1\" 태그를 비활성화할 수 없습니다.",
"tags-deactivate-submit": "비활성화",
+ "tags-update-add-not-allowed-one": "\"$1\" 태그를 수동으로 추가하는 것은 허용되지 않습니다.",
+ "tags-update-add-not-allowed-multi": "다음 {{PLURAL:$2|태그는}} 수동으로 추가하는 것이 허용되지 않습니다: $1",
"tags-update-remove-not-allowed-one": "\"$1\" 태그를 제거하는 것은 허용되지 않습니다.",
"tags-edit-title": "태그 편집",
"tags-edit-manage-link": "태그 관리",
"thu": "Ket",
"fri": "Pen",
"sat": "Šeš",
- "january": "sausio",
+ "january": "Sausis",
"february": "vasario",
"march": "kovo",
- "april": "balandžio",
- "may_long": "gegužės",
- "june": "birželio",
- "july": "liepos",
- "august": "rugpjūčio",
+ "april": "Balandis",
+ "may_long": "Gegužė",
+ "june": "Birželis",
+ "july": "Liepa",
+ "august": "Rugpjūtis",
"september": "rugsėjo",
- "october": "spalio",
- "november": "lapkričio",
+ "october": "Spalis",
+ "november": "Lapkritis",
"december": "gruodžio",
"january-gen": "Sausio",
"february-gen": "Vasario",
"feb": "Vas",
"mar": "Kov",
"apr": "Bal",
- "may": "gegužės",
- "jun": "Birželis",
+ "may": "Geg",
+ "jun": "Bir",
"jul": "Lie",
"aug": "Rgp",
"sep": "Rgs",
"qbpageoptions": "Šis puslapis",
"qbmyoptions": "Mano puslapiai",
"faq": "DUK",
- "faqpage": "Projektas:DUK",
+ "faqpage": "Project:DUK",
"actions": "Veiksmai",
"namespaces": "Vardų sritys",
"variants": "Variantai",
"viewcount": "Šis puslapis buvo atvertas $1 {{PLURAL:$1|kartą|kartus|kartų}}.",
"protectedpage": "Užrakintas puslapis",
"jumpto": "Peršokti į:",
- "jumptonavigation": "navigaciją",
+ "jumptonavigation": "navigacija",
"jumptosearch": "paiešką",
"view-pool-error": "Atsiprašome, šiuo metu serveriai yra perkrauti.\nPernelyg daug naudotojų skaito šį puslapį.\nPrašome palaukti ir bandyti į šį puslapį patekti dar kartą.\n\n$1",
"generic-pool-error": "Atsiprašome, šiuo metu serveriai yra perkrauti.\nPernelyg daug naudotojų skaito šį išteklį.\nPrašome palaukti ir bandyti prieiti prie šio išteklio dar kartą.",
"pool-servererror": "Saugyklos skaitiklio paslauga negalima ($1).",
"poolcounter-usage-error": "Naudojimo klaida: $1",
"aboutsite": "Apie {{SITENAME}}",
- "aboutpage": "Projektas:Apie",
+ "aboutpage": "Project:Apie",
"copyright": "Turinys pateikiamas pagal $1 jei nenurodyta kitaip.",
"copyrightpage": "{{ns:project}}:Autorinės teisės",
"currentevents": "Naujienos",
- "currentevents-url": "Project:Current events",
+ "currentevents-url": "Project:Dabartiniai įvykiai",
"disclaimers": "Atsakomybės apribojimas",
"disclaimerpage": "Project:General disclaimer",
"edithelp": "Kaip redaguoti",
"tooltip-whatlinkshere-invert": "Pažymėkite šį langelį jei norite slėpti nuorodas iš puslapių pasirinkto pavadinimo tarpe.",
"namespace_association": "Susijusi vardų sritis",
"tooltip-namespace_association": "Įjunkite šią parinktį, kad taip pat įtrauktumėte aptarimų arba temos sritį, susijusią su pasirinkta sritimi",
- "blanknamespace": "(Pagrindinė)",
+ "blanknamespace": "(Pagrindinis)",
"contributions": "{{GENDER:$1|Naudotojo}} indėlis",
"contributions-title": "{{GENDER:$1|Naudotojo|Naudotojos}} $1 indėlis",
"mycontris": "Įnašai",
"blocklink": "blokuoti",
"unblocklink": "atblokuoti",
"change-blocklink": "keisti blokavimo nustatymus",
- "contribslink": "įnašas",
+ "contribslink": "įnašai",
"emaillink": "siųsti el. laišką",
"autoblocker": "Jūs buvote automatiškai užblokuotas, nes jūsų IP adresą neseniai naudojo „[[User:$1|$1]]“. Nurodyta naudotojo $1 blokavimo priežastis: „$2“.",
"blocklogpage": "Blokavimų sąrašas",
"columns": "Kolommen:",
"searchresultshead": "Zoekresultaten",
"stub-threshold": "Drempel voor markering als <a href=\"#\" class=\"stub\">beginnetje</a>:",
+ "stub-threshold-sample-link": "voorbeeld",
"stub-threshold-disabled": "Uitgeschakeld",
"recentchangesdays": "Aantal dagen weer te geven in de recente wijzigingen:",
"recentchangesdays-max": "(maximaal $1 {{PLURAL:$1|dag|dagen}})",
"group-bot": "bots",
"group-sysop": "beheerders",
"group-bureaucrat": "bureaucraten",
- "group-suppress": "toezichthouders",
+ "group-suppress": "Toezichthouders",
"group-all": "(iedereen)",
"group-user-member": "{{GENDER:$1|gebruiker}}",
"group-autoconfirmed-member": "{{GENDER:$1|autobevestigde gebruiker}}",
"TheEduGobi",
"Araceletorres",
"L",
- "Walesson"
+ "Walesson",
+ "Rhcastilhos"
]
},
"tog-underline": "Sublinhar links:",
"nstab-template": "Predefinição",
"nstab-help": "Página de ajuda",
"nstab-category": "Categoria",
+ "mainpage-nstab": "Página principal",
"nosuchaction": "Ação inexistente",
"nosuchactiontext": "A ação especificada pela URL é inválida.\nVocê deve ter se enganado ao digitar a URL, ou acessou um link incorreto.\nIsso também pode indicar um erro no software usado no sítio {{SITENAME}}.",
"nosuchspecialpage": "Esta página especial não existe",
"createacct-captcha": "Verificação de segurança",
"createacct-imgcaptcha-ph": "Digite o texto acima",
"createacct-submit": "Crie sua conta",
- "createacct-another-submit": "Criar outra conta",
+ "createacct-another-submit": "Criar conta",
"createacct-benefit-heading": "{{SITENAME}} é feita por pessoas como você.",
"createacct-benefit-body1": "{{PLURAL:$1|edição|edições}}",
"createacct-benefit-body2": "{{PLURAL:$1|página|páginas}}",
"changeemail-password": "Sua senha para o wiki {{SITENAME}}:",
"changeemail-submit": "Alterar e-mail",
"changeemail-throttled": "Você realizou demasiadas tentativas de se registrar.\nPor favor, aguarde $1 antes de tentar novamente.",
+ "changeemail-nochange": "Por favor insira um novo endereço de e-mail.",
"resettokens": "Reiniciar os tokens",
"resettokens-text": "Você pode reiniciar os tokens, que permitem o acesso a certos dados privados associados à sua conta, aqui.\n\nVocê só deve reiniciá-los se compartilhou-os com alguém ou se a sua conta foi comprometida.",
"resettokens-no-tokens": "Não existem tokens para reiniciar.",
"upload-too-many-redirects": "A URL contém redirecionamentos demais",
"upload-http-error": "Ocorreu um erro HTTP: $1",
"upload-copy-upload-invalid-domain": "Não é possível realizar envios remotos neste domínio.",
+ "upload-dialog-title": "Enviar arquivo",
"upload-dialog-button-cancel": "Cancelar",
"upload-dialog-button-done": "Feito",
"upload-dialog-button-save": "Salvar",
"upload-dialog-button-upload": "Enviar",
+ "upload-process-error": "Ocorreu um erro",
+ "upload-process-warning": "Ocorreu um aviso",
"upload-form-label-select-file": "Selecionar arquivo",
"upload-form-label-infoform-title": "Detalhes",
"upload-form-label-infoform-name": "Nome",
"filerevert-legend": "Reverter arquivo",
"filerevert-intro": "<span class=\"plainlinks\">Você está revertendo '''[[Media:$1|$1]]''' para a [$4 versão de $2 - $3].</span>",
"filerevert-comment": "Motivo:",
- "filerevert-defaultcomment": "Revertido para a versão de $1 - $2",
+ "filerevert-defaultcomment": "Revertido para a versão de $2, $1 ($3)",
"filerevert-submit": "Reverter",
"filerevert-success": "<span class=\"plainlinks\">'''[[Media:$1|$1]]''' foi revertida para a [$4 versão de $2 - $3].</span>",
"filerevert-badversion": "Não há uma versão local anterior deste arquivo no período de tempo especificado.",
"nopagetext": "A página alvo especificada não existe.",
"pager-newer-n": "{{PLURAL:$1|posterior|$1 posteriores}}",
"pager-older-n": "{{PLURAL:$1|1 anterior|$1 anteriores}}",
- "suppress": "Supervisor",
+ "suppress": "Suprimir",
"querypage-disabled": "Esta página especial está desativada para não prejudicar o desempenho.",
"apihelp": "Ajuda de API",
"apihelp-no-such-module": "Modulo \"$1\" não foram achados.",
"changecontentmodel-legend": "Alterar o modelo de conteúdo",
"changecontentmodel-title-label": "Título da página",
"changecontentmodel-reason-label": "Motivo:",
+ "changecontentmodel-success-title": "O modelo de conteúdo foi alterado",
+ "changecontentmodel-success-text": "O tipo de conteúdo de [[:$1]] foi alterado.",
"logentry-contentmodel-change-revertlink": "reverter",
+ "logentry-contentmodel-change-revert": "reverter",
"protectlogpage": "Registro de proteção",
"protectlogtext": "Encontra-se abaixo o registro de proteção e desproteção de páginas.\nConsulte a [[Special:ProtectedPages|lista de páginas protegidas]] para ver as páginas que se encontram protegidas neste momento.",
"protectedarticle": "protegeu \"[[$1]]\"",
"pageinfo-robot-index": "Autorizado",
"pageinfo-robot-noindex": "Desautorizado",
"pageinfo-watchers": "Número de vigilantes da página",
+ "pageinfo-visiting-watchers": "Número de vigilantes que consultaram as edições recentes da página",
"pageinfo-few-watchers": "Menos de $1 {{PLURAL:$1|vigilante|vigilantes}}",
"pageinfo-redirects-name": "Número de redirecionamentos para esta página",
"pageinfo-subpages-name": "Subpáginas desta página",
"htmlform-cloner-create": "Adicionar mais",
"htmlform-cloner-delete": "Remover",
"htmlform-cloner-required": "Pelo menos um valor é requerido",
+ "htmlform-title-not-creatable": "\"$1\" não é um título que possa ser atribuído a uma página",
+ "htmlform-title-not-exists": "[[:$1]] não existe.",
+ "htmlform-user-not-exists": "<strong>$1</strong> não existe.",
+ "htmlform-user-not-valid": "<strong>$1</strong> não é um nome de usuário válido.",
"sqlite-has-fts": "$1 com suporte de pesquisa de texto completo",
"sqlite-no-fts": "$1 sem suporte de pesquisa de texto completo",
"logentry-delete-delete": "$1 apagou a página $3",
"logentry-newusers-create2": "A conta de usuário $3 foi criada por $1",
"logentry-newusers-byemail": "A conta de usuário $3 foi criada por $1, com a senha sendo enviada por e-mail",
"logentry-newusers-autocreate": "A conta de usuário $1 foi criada automaticamente",
+ "logentry-protect-unprotect": "$1 {{GENDER:$2|removed}} proteção de $3",
+ "logentry-protect-protect": "$1 {{GENDER:$2|protected}} $3 $4",
+ "logentry-protect-protect-cascade": "$1 {{GENDER:$2|protected}} $3 $4 [cascading]",
"logentry-rights-rights": "$1 alterou os grupos de usuário de $3 de $4 para $5",
"logentry-rights-rights-legacy": "$1 alterou os grupos de $3",
"logentry-rights-autopromote": "$1 foi promovido automaticamente de $4 para $5",
"special-characters-title-endash": "traço",
"special-characters-title-emdash": "travessão",
"special-characters-title-minus": "sinal de menos",
+ "mw-widgets-dateinput-no-date": "Nenhuma data selecionada",
"mw-widgets-dateinput-placeholder-day": "AAAA-MM-DD",
"mw-widgets-dateinput-placeholder-month": "AAAA-MM",
+ "mw-widgets-titleinput-description-new-page": "a página ainda não existe",
"mw-widgets-titleinput-description-redirect": "redirecionar para $1"
}
"permissionserrorstext-withaction": "Não possui permissão para $2, {{PLURAL:$1|pelo seguinte motivo|pelos seguintes motivos}}:",
"recreate-moveddeleted-warn": "'''Aviso: Está a recriar uma página anteriormente eliminada.'''\n\nVerifique se é apropriado continuar a editar esta página.\nPara sua conveniência, é apresentado de seguida o registo de eliminação e de movimento da página:",
"moveddeleted-notice": "Esta página foi eliminada.\nPara referência, é apresentado de seguida o registo de eliminações e de movimento da página.",
- "moveddeleted-notice-recent": "Desculpe, esta página foi eliminado recentemente (nas últimas 24 horas).\nA exclusão e log de movimentação para a página são fornecidos abaixo para referência.",
+ "moveddeleted-notice-recent": "Desculpe, esta página foi eliminada recentemente (nas últimas 24 horas).\nA exclusão e registo de movimentação para a página são fornecidos abaixo para referência.",
"log-fulllog": "Ver registo detalhado",
"edit-hook-aborted": "A edição foi abortada por um hook.\nNão foi dada nenhuma explicação.",
"edit-gone-missing": "Não foi possível atualizar a página.\nEla parece ter sido eliminada.",
"filerevert-legend": "Reverter ficheiro",
"filerevert-intro": "Está prestes a reverter o ficheiro '''[[Media:$1|$1]]''' para a [$4 versão de $2 às $3].",
"filerevert-comment": "Motivo:",
- "filerevert-defaultcomment": "Revertido para a versão de $1 - $2",
+ "filerevert-defaultcomment": "Revertido para a versão de $2, $1 ($3)",
"filerevert-submit": "Reverter",
"filerevert-success": "'''[[Media:$1|$1]]''' foi revertida para a [$4 versão das $3 de $2].",
"filerevert-badversion": "Não há uma versão local anterior deste ficheiro no período de tempo especificado.",
"emailccsubject": "Cópia da sua mensagem para $1: $2",
"emailsent": "Mensagem enviada",
"emailsenttext": "A sua mensagem foi enviada.",
- "emailuserfooter": "Esta mensagem foi enviada por $1 para $2 através da opção \"{{int:emailuser}}\" em {{SITENAME}}.",
+ "emailuserfooter": "Esta mensagem foi {{GENDER:$1|enviada}} por $1 para {{GENDER:$2|$2}} através da opção \"{{int:emailuser}}\" em {{SITENAME}}.",
"usermessage-summary": "Deixar mensagem de sistema.",
"usermessage-editor": "Editor de mensagens de sistema",
"watchlist": "Páginas vigiadas",
"createacct-captcha": "Verificare de securitate",
"createacct-imgcaptcha-ph": "Introduceți textul pe care îl vedeți deasupra",
"createacct-submit": "Creați-vă contul",
- "createacct-another-submit": "Creează un alt cont",
+ "createacct-another-submit": "Creează contul",
"createacct-benefit-heading": "{{SITENAME}} este un proiect clădit de oameni ca dumneavoastră.",
"createacct-benefit-body1": "{{PLURAL:$1|modificare|modificări|de modificări}}",
"createacct-benefit-body2": "{{PLURAL:$1|pagină|pagini|de pagini}}",
"emailccsubject": "O copie a mesajului la $1: $2",
"emailsent": "E-mail trimis",
"emailsenttext": "E-mailul dumneavoastră a fost trimis.",
- "emailuserfooter": "Acest mesaj a fost trimis de $1 către $2 prin intermediul funcției „{{int:emailuser}}” de la {{SITENAME}}.",
+ "emailuserfooter": "Acest mesaj a fost {{GENDER:$1|trimis}} de $1 către {{GENDER:$2|$2}} prin intermediul funcției „{{int:emailuser}}” de la {{SITENAME}}.",
"usermessage-summary": "a lăsat un mesaj de sistem",
"usermessage-editor": "Mesager de sistem",
"watchlist": "Pagini urmărite",
"logentry-newusers-byemail": "Contul de utilizator $3 a fost {{GENDER:$2|creat}} de către $1, iar parola a fost trimisă prin e-mail",
"logentry-newusers-autocreate": "Contul de utilizator $1 a fost {{GENDER:$2|creat}} în mod automat",
"logentry-protect-move_prot": "$1 {{GENDER:$2|a mutat}} setările de protecție de la $4 la $3",
+ "logentry-protect-unprotect": "$1 {{GENDER:$2|a eliminat}} protecția pentru $3",
+ "logentry-protect-protect": "$1 {{GENDER:$2|a protejat}} $3 $4",
+ "logentry-protect-protect-cascade": "$1 {{GENDER:$2|a protejat}} $3 $4 [protecție în cascadă]",
+ "logentry-protect-modify": "$1 {{GENDER:$2|a modificat}} nivelul protecției pentru $3 $4",
+ "logentry-protect-modify-cascade": "$1 {{GENDER:$2|a modificat}} nivelul protecției pentru $3 $4 [protecție în cascadă]",
"logentry-rights-rights": "$1 {{GENDER:$2|a schimbat}} apartenența la grup pentru $3 de la $4 la $5",
"logentry-rights-rights-legacy": "$1 {{GENDER:$2|a schimbat}} apartenența la grup pentru $3",
"logentry-rights-autopromote": "$1 {{GENDER:$2|a fost promovat|a fost promovată}} în mod automat de la $4 la $5",
"nstab-template": "Шаблон",
"nstab-help": "Справка",
"nstab-category": "Категория",
+ "mainpage-nstab": "Заглавная",
"nosuchaction": "Такого действия нет",
"nosuchactiontext": "Указанное в URL действие ошибочно.\nВозможно, вы допустили опечатку при наборе URL или перешли по ошибочной ссылке.\nЭто может также указывать на ошибку в проекте {{SITENAME}}.",
"nosuchspecialpage": "Нет такой служебной страницы",
"no-null-revision": "Не удалось создать новую нулевую правку для страницы «$1»",
"badtitle": "Недопустимое название",
"badtitletext": "Запрашиваемое название страницы неправильно, пусто, либо неверно указано межъязыковое или интервики название. Возможно, в названии используются недопустимые символы.",
- "title-invalid-empty": " Заголовок запрошенной страницы пуст или содержит только название пространства имён.",
+ "title-invalid-empty": "Заголовок запрошенной страницы пуст или содержит только название пространства имён.",
"title-invalid-utf8": "Запрашиваемое название страницы содержит некорректную последовательность символов UTF-8.",
"title-invalid-interwiki": "Запрашиваемое название страницы содержит интервики-ссылку, которая не может быть использована в названиях.",
"title-invalid-talk-namespace": "Запрашиваемое название страницы ссылается на страницу обсуждения, которая не может существовать.",
"createacct-captcha": "Проверка безопасности",
"createacct-imgcaptcha-ph": "Введите текст, который вы видите выше",
"createacct-submit": "Создать учётную запись",
- "createacct-another-submit": "Создать ещё одну запись",
+ "createacct-another-submit": "Создать учётную запись",
"createacct-benefit-heading": "{{SITENAME}} — совместный труд таких же людей, как вы.",
"createacct-benefit-body1": "{{PLURAL:$1|правка|правки|правок}}",
"createacct-benefit-body2": "{{PLURAL:$1|статья|статьи|статей}}",
"version-poweredby-others": "другие",
"version-poweredby-translators": "переводчики translatewiki.net",
"version-credits-summary": "Хотим поблагодарить следующих участников за их вклад в развитие [[Special:Version|MediaWiki]].",
- "version-license-info": "MediaWiki â\80\94 Ñ\81вободное пÑ\80огÑ\80аммное обеÑ\81пеÑ\87ение, коÑ\82оÑ\80ое вÑ\8b можеÑ\82е Ñ\80аÑ\81пÑ\80оÑ\81Ñ\82Ñ\80анÑ\8fÑ\82Ñ\8c и/или изменÑ\8fÑ\82Ñ\8c в Ñ\81ооÑ\82веÑ\82Ñ\81Ñ\82вии Ñ\81 Ñ\83Ñ\81ловиÑ\8fми лиÑ\86ензии GNU General Public License, опÑ\83бликованной Ñ\84ондом Ñ\81вободного пÑ\80огÑ\80аммного обеÑ\81пеÑ\87ениÑ\8f; вÑ\82оÑ\80ой веÑ\80Ñ\81ии, либо лÑ\8eбой более поздней веÑ\80Ñ\81ии.\n\nMediaWiki Ñ\80аÑ\81пÑ\80оÑ\81Ñ\82Ñ\80анÑ\8fеÑ\82Ñ\81Ñ\8f в надежде, Ñ\87Ñ\82о она бÑ\83деÑ\82 полезной, но Ð\91Ð\95Ð\97 Ð\9aÐ\90Ð\9aÐ\98Ð¥-Ð\9bÐ\98Ð\91Ð\9e Ð\93Ð\90Ð Ð\90Ð\9dТÐ\98Ð\99, даже без подÑ\80азÑ\83меваемÑ\8bÑ\85 гаÑ\80анÑ\82ий Ð\9aÐ\9eÐ\9cÐ\9cÐ\95РЧÐ\95СÐ\9aÐ\9eÐ\99 ЦÐ\95Ð\9dÐ\9dÐ\9eСТÐ\98 или Ð\9fÐ Ð\98Ð\93Ð\9eÐ\94Ð\9dÐ\9eСТÐ\98 Ð\94Ð\9bЯ Ð\9eÐ\9fÐ Ð\95Ð\94Ð\95Ð\9bÐ\95ННОЙ ЦЕЛИ. См. лицензию GNU General Public License для более подробной информации.\n\nВы должны были получить [{{SERVER}}{{SCRIPTPATH}}/COPYING копию GNU General Public License] вместе с этой программой, если нет, то напишите Free Software Foundation, Inc., по адресу: 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA или [//www.gnu.org/licenses/old-licenses/gpl-2.0.html прочтите её онлайн].",
+ "version-license-info": "MediaWiki â\80\94 Ñ\81вободное пÑ\80огÑ\80аммное обеÑ\81пеÑ\87ение, коÑ\82оÑ\80ое вÑ\8b можеÑ\82е Ñ\80аÑ\81пÑ\80оÑ\81Ñ\82Ñ\80анÑ\8fÑ\82Ñ\8c и/или изменÑ\8fÑ\82Ñ\8c в Ñ\81ооÑ\82веÑ\82Ñ\81Ñ\82вии Ñ\81 Ñ\83Ñ\81ловиÑ\8fми опÑ\83бликованной Фондом Ñ\81вободного пÑ\80огÑ\80аммного обеÑ\81пеÑ\87ениÑ\8f лиÑ\86ензии GNU General Public License вÑ\82оÑ\80ой или лÑ\8eбой более поздней веÑ\80Ñ\81ии (по ваÑ\88емÑ\83 вÑ\8bбоÑ\80Ñ\83).\n\nMediaWiki Ñ\80аÑ\81пÑ\80оÑ\81Ñ\82Ñ\80анÑ\8fеÑ\82Ñ\81Ñ\8f в надежде, Ñ\87Ñ\82о она бÑ\83деÑ\82 полезной, но Ð\91Ð\95Ð\97 Ð\9aÐ\90Ð\9aÐ\98Ð¥-Ð\9bÐ\98Ð\91Ð\9e Ð\93Ð\90Ð Ð\90Ð\9dТÐ\98Ð\99, даже без подÑ\80азÑ\83меваемÑ\8bÑ\85 гаÑ\80анÑ\82ий Ð\9aÐ\9eÐ\9cÐ\9cÐ\95РЧÐ\95СÐ\9aÐ\9eÐ\99 ЦÐ\95Ð\9dÐ\9dÐ\9eСТÐ\98 или Ð\9fÐ Ð\98Ð\93Ð\9eÐ\94Ð\9dÐ\9eСТÐ\98 Ð\94Ð\9bЯ Ð\9eÐ\9fÐ Ð\95Ð\94Ð\95Ð\9bÐ\81ННОЙ ЦЕЛИ. См. лицензию GNU General Public License для более подробной информации.\n\nВы должны были получить [{{SERVER}}{{SCRIPTPATH}}/COPYING копию GNU General Public License] вместе с этой программой, если нет, то напишите Free Software Foundation, Inc., по адресу: 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA или [//www.gnu.org/licenses/old-licenses/gpl-2.0.html прочтите её онлайн].",
"version-software": "Установленное программное обеспечение",
"version-software-product": "Продукт",
"version-software-version": "Версия",
"createacct-captcha": "Cuntrollu di sicurizza",
"createacct-imgcaptcha-ph": "Nzirìsci lu testu ca vidi ccassupra",
"createacct-submit": "Crea lu tò cuntu",
- "createacct-another-submit": "Crìa un cuntu",
+ "createacct-another-submit": "Crea un cuntu",
"createacct-benefit-heading": "{{SITENAME}} è fatta di pirsuni comu a tìa.",
"createacct-benefit-body1": "{{PLURAL:$1|cuntribbutu|cuntribbuti}}",
"createacct-benefit-body2": "{{PLURAL:$1|pàggina|pàggini}}",
"changeemail-password": "La tò password di {{SITENAME}}:",
"changeemail-submit": "Cancia nnirizzu",
"changeemail-throttled": "Facisti troppi tintativi di trasuta.\nPi favuri aspetta $1 prima di pruvari n'àutra vota.",
- "changeemail-nochange": "Pi’ favuri metti nu nnirizzu di posta elittrònica diffirenti di chiddu ca già cc’è.",
+ "changeemail-nochange": "Pi favuri metti nu nnirizzu di posta elittrònica diffirenti di chiddu ca già c'è.",
"resettokens": "Azziramentu dî token",
"resettokens-text": "Ccà poi azzirari li ''token'' chi dùnanu accessu a certi dati risirvati assuciati ô tò cuntu.\n\nSta cosa s'avissi a fari si pi sbagghiu li facisti sapiri a quarchidunu o si lu tò cuntu fu cumprumisu.",
"resettokens-no-tokens": "Nun ci sunnu token d'azzirari.",
"newarticle": "(Novu)",
"newarticletext": "Siguisti na lijami a na pàggina c'ancora nun esisti.\nPi criari sta pàggina, accumenza a scrìviri ccassutta (talìa la [$1 pàggina d'aiutu] p'aviri maiuri nfurmazzioni).\nSi agghicasti ccà pi sbagghiu, carca lu buttuni <strong>n arreri</strong> dû tò browser.",
"anontalkpagetext": "----''Chista è la pàggina di discussioni di n’utenti anònimu, ca nun criau ancora n’accessu o ca nun l’usa.\nP’idintificàrilu è pirciò nicissariu usari lu nùmmiru di lu sò nnirizzu IP.\nLi nnirizzi IP ponnu pirò èssiri spartuti di cchiù utenti.\nSiddu sî n’utenti anònimu e riteni ca li cummenti prisenti nta sta pàggina nun si rifirìscinu a tia, [[Special:UserLogin/signup|crea n’accessu novu]] o [[Special:UserLogin|trasi]] cu chiddu ca già hai p’evitari d’èssiri cunfusu cu àutri utenti anònimi ‘n futuru.''",
- "noarticletext": "Nta stu mumentu la pàggina addumannata è vacanti. È pussìbbili [[Special:Search/{{PAGENAME}}|circari stu tìtulu]] nta l'àutri pàggini dû situ oppuru <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|action=edit}} circari ntê riggistra culligati] oppuru [{{fullurl:{{FULLPAGENAME}}|action=edit}} canciari la pàggina ora]</span>.",
- "noarticletext-nopermission": "Nta stu mumentu la pàggina addumannata è vacanti. È pussibbili [[Special:Search/{{PAGENAME}}|circari stu titulu]] nti àutri pàggini dû situ o <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} circari ntê riggistra culligati]</span>, ma nun hai li pirmissa pi criari sta pàggina.",
+ "noarticletext": "Nta stu mumentu la pàggina addumannata è vacanti. È pussìbbili [[Special:Search/{{PAGENAME}}|circari stu tìtulu]] nta l'àutri pàggini dû situ oppuru <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|action=edit}} circari ntê riggistri culligati] oppuru [{{fullurl:{{FULLPAGENAME}}|action=edit}} canciari la pàggina ora]</span>.",
+ "noarticletext-nopermission": "Nta stu mumentu la pàggina addumannata è vacanti. È pussìbbili [[Special:Search/{{PAGENAME}}|circari stu tìtulu]] nti àutri pàggini dû situ o <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} circari ntê riggistri culligati]</span>, ma nun hai li pirmissi pi criari sta pàggina.",
"missing-revision": "La virsioni #$1 dâ paggina ntitulata \"{{FULLPAGENAME}}\" nun esisti.\n\nStu fattu di sòlitu succedi quannu si segui nu lijami di crunuluggìa versu na pàggina chi fu cancillata.\nSi ponnu vìdiri li dittagghî ntô [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} riggistru dî cancillazzioni].",
"userpage-userdoesnotexist": "L'account \"<nowiki>$1</nowiki>\" nun currispunni a n'utenti riggistratu. Virificari si si voli criari o canciari sta pàggina.",
"userpage-userdoesnotexist-view": "Lu cuntu utenti \"$1\" nun è riggistratu.",
"permissionserrorstext-withaction": "Nun hai lu pirmissu di $2, pi {{PLURAL:$1|stu mutivu|sti mutivi}}:",
"recreate-moveddeleted-warn": "'''Accura: stai pi criari na pàggina chi fu cancillata 'n passatu.'''\n\nAccuràtivi ch'è uppurtunu cuntinuari a canciari sta pàggina.\nL'alencu dî cancillazzioni e spustamenti rilativi veni ripurtatu ccà pi cummudità:",
"moveddeleted-notice": "Sta pàggina fu scancillata. La lista di li scancillazzioni e spustamenti veni ammustrata di sècutu pi nfurmazzioni.",
- "moveddeleted-notice-recent": "Nni dispiaci, ma sta pàggina ricintimenti fu scancillata (nta l’ùrtimi 24 uri).\nComu rifirimentu, ccassutta cci sunnu li riggistra dî scancillazzioni e dî spustamenti rilativi a’ sta pàggina.",
+ "moveddeleted-notice-recent": "Ni dispiaci, ma sta pàggina ricentimenti fu scancillata (nta l'ùrtimi 24 uri).\nComu rifirimentu, ccassutta ci sunnu li riggistri dî scancillazzioni e dî spustamenti rilativi a sta pàggina.",
"log-fulllog": "Talìa lu riggistru cumpletu",
"edit-hook-aborted": "Canciamentu annullatu di n'hook.\nNun desi nudda spigazzioni.",
"edit-gone-missing": "Nun si pò aggiurnari la pàggina.\nPari ca fu cancillata.",
"search-section": "(sizzioni $1)",
"search-category": "(catigurìa $1)",
"search-file-match": "(currispunnenza ntô cuntinutu dûn file)",
- "search-suggest": "Forsi circavutu: $1",
+ "search-suggest": "Forsi circàvitu: $1",
"search-rewritten": "Sunnu ammustrati li risurtati pi $1. Mmeci cerca $2.",
"search-interwiki-caption": "Pruggetti frati",
"search-interwiki-default": "Risurtati di $1:",
"sort-descending": "Radhit në zbritje",
"sort-ascending": "Radhit në ngjitje",
"nstab-main": "Artikulli",
- "nstab-user": "Faqja e përdoruesit",
+ "nstab-user": "{{GENDER:{{ROOTPAGENAME}}|Faqja e përdoruesit|Faqja e përdorueses}}",
"nstab-media": "Medie",
"nstab-special": "Faqe speciale",
"nstab-project": "Projekti",
"prefs-changeemail": "Ndrysho postën elektronike",
"prefs-setemail": "Vendos adresën e postës elektronike",
"prefs-email": "Opsionet e emailit",
- "prefs-rendering": "Dukja",
+ "prefs-rendering": "Pamja",
"saveprefs": "Ruaj parapëlqimet",
"restoreprefs": "Rikthe të gjitha të dhënat e mëparshme",
"prefs-editing": "Redaktimi",
"log-title-wildcard": "Kërko tituj që fillojnë me këtë tekst",
"showhideselectedlogentries": "Paraqit/fshih shënimet e përzgjedhura të regjistruara.",
"allpages": "Të gjitha faqet",
- "nextpage": "Faqja më pas ($1)",
- "prevpage": "Faqja më parë ($1)",
+ "nextpage": "Faqja tjetër ($1)",
+ "prevpage": "Faqja e mëparshme ($1)",
"allpagesfrom": "Trego faqet duke filluar nga:",
"allpagesto": "Shfaq faqet që mbarojnë në:",
"allarticles": "Të gjithë artikujt",
"imgmultigoto": "Shko tek faqja $1",
"ascending_abbrev": "ngritje",
"descending_abbrev": "zbritje",
- "table_pager_next": "Faqja më pas",
- "table_pager_prev": "Faqja më parë",
+ "table_pager_next": "Faqja tjetër",
+ "table_pager_prev": "Faqja e mëparshme",
"table_pager_first": "Faqja e parë",
"table_pager_last": "Faqja e fundit",
"table_pager_limit": "Trego $1 rreshta për faqe",
"tags-title": "Etiketat",
"tags-intro": "Kjo faqe liston etiketat që softueri mund t'i shënojë me një redaktim, dhe kuptimin e tyre.",
"tags-tag": "Emri i etiketës",
- "tags-display-header": "Dukja në listat e ndryshimeve",
+ "tags-display-header": "Pamja në listat e ndryshimeve",
"tags-description-header": "Përshkrimi i plotë i kuptimit",
"tags-hitcount-header": "Ndrzshimet e etikuara",
"tags-edit": "redakto",
"youhavenewmessagesfromusers": "Имате $1 од {{PLURAL:$3|другог корисника|$3 корисника|$3 корисника}} ($2).",
"youhavenewmessagesmanyusers": "Имате $1 од много корисника ($2).",
"newmessageslinkplural": "{{PLURAL:$1|нову поруку|999=нове поруке}}",
- "newmessagesdifflinkplural": "{{PLURAL:$1|последњу измену|999=последње измене}}",
+ "newmessagesdifflinkplural": "{{PLURAL:$1|последња измена|999=последње измене}}",
"youhavenewmessagesmulti": "Имате нових порука на $1",
"editsection": "уреди",
"editold": "уреди",
"noarticletext": "На овој страници тренутно нема садржаја.\nМожете [[Special:Search/{{PAGENAME}}|потражити овај наслов]] на другим страницама,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} претражити сродне извештаје] или [{{fullurl:{{FULLPAGENAME}}|action=edit}} уредити страницу]</span>.",
"noarticletext-nopermission": "На овој страници тренутно нема садржаја.\nМожете [[Special:Search/{{PAGENAME}}|потражити овај наслов]] на другим страницама или <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} претражити сродне дневнике]</span>, али немате дозволу да направите ову страницу.",
"missing-revision": "Не могу да пронађем измену бр. $1 на страници под називом „{{FULLPAGENAME}}“.\n\nОво се обично дешава када пратите застарелу везу до странице која је обрисана.\nВише информација можете пронаћи у [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} дневнику брисања].",
- "userpage-userdoesnotexist": "Кориснички налог „<nowiki>$1</nowiki>“ није отворен.\nРазмислите да ли заиста желите да направите или уредите ову страницу.",
+ "userpage-userdoesnotexist": "Кориснички налог „<nowiki>$1</nowiki>“ није отворен.\nРазмислите да ли заиста желите да направите/уредите ову страницу.",
"userpage-userdoesnotexist-view": "Кориснички налог „$1“ није отворен.",
"blocked-notice-logextract": "Овај корисник је тренутно блокиран.\nИзвештај о последњем блокирању можете погледати испод:",
"clearyourcache": "'''Напомена:''' након чувања, можда ћете морати да очистите кеш прегледача.\n*'''Фајерфокс и Сафари:''' држите ''Shift'' и кликните на ''Освежи'', или притисните ''Ctrl-F5'' или Ctrl-R (''⌘-R'' на Макинтошу)\n*'''Гугл кроум:''' притисните ''Ctrl-Shift-R'' (''⌘-Shift-R'' на Макинтошу)\n*'''Интернет експлорер: '''држите ''Ctrl'' и кликните на ''Освежи'', или притисните ''Ctrl-F5''\n*'''Опера:''' очистите привремену меморију преко менија ''Алатке → Поставке''.",
"listgrouprights-members": "(списак чланова)",
"listgrouprights-right-display": "<span class=\"listgrouprights-granted\">$1 <code>($2)</code></span>",
"listgrouprights-right-revoked": "<span class=\"listgrouprights-revoked\">$1 <code>($2)</code></span>",
- "listgrouprights-addgroup": "додаје {{PLURAL:$2|следећу групу|следеће групе}}: $1",
- "listgrouprights-removegroup": "брише {{PLURAL:$2|следећу групу|следеће групе}}: $1",
+ "listgrouprights-addgroup": "додавање {{PLURAL:$2|следећих група}}: $1",
+ "listgrouprights-removegroup": "уклањање {{PLURAL:$2|следећих група}}: $1",
"listgrouprights-addgroup-all": "додавање свих група",
"listgrouprights-removegroup-all": "брисање свих група",
"listgrouprights-addgroup-self": "додавање {{PLURAL:$2|групе|група}} на свој налог: $1",
"youhavenewmessagesfromusers": "Imate $1 od {{PLURAL:$3|drugog korisnika|$3 korisnika|$3 korisnika}} ($2).",
"youhavenewmessagesmanyusers": "Imate $1 od mnogo korisnika ($2).",
"newmessageslinkplural": "{{PLURAL:$1|novu poruku|999=nove poruke}}",
- "newmessagesdifflinkplural": "{{PLURAL:$1|poslednju izmenu|999=poslednje izmene}}",
+ "newmessagesdifflinkplural": "{{PLURAL:$1|poslednja izmena|999=poslednje izmene}}",
"youhavenewmessagesmulti": "Imate novih poruka na $1",
"editsection": "uredi",
"editold": "uredi",
"noarticletext": "Na ovoj stranici trenutno nema sadržaja.\nMožete [[Special:Search/{{PAGENAME}}|potražiti ovaj naslov]] na drugim stranicama,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} pretražiti srodne izveštaje] ili [{{fullurl:{{FULLPAGENAME}}|action=edit}} urediti stranicu]</span>.",
"noarticletext-nopermission": "Na ovoj stranici trenutno nema sadržaja.\nMožete [[Special:Search/{{PAGENAME}}|potražiti ovaj naslov]] na drugim stranicama ili <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} pretražiti srodne dnevnike]</span>, ali nemate dozvolu da napravite ovu stranicu.",
"missing-revision": "Ne mogu da pronađem izmenu br. $1 na stranici pod nazivom „{{FULLPAGENAME}}“.\n\nOvo se obično dešava kada pratite zastarelu vezu do stranice koja je obrisana.\nViše informacija možete pronaći u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} dnevniku brisanja].",
- "userpage-userdoesnotexist": "Korisnički nalog „<nowiki>$1</nowiki>“ nije otvoren.\nRazmislite da li zaista želite da napravite ili uredite ovu stranicu.",
+ "userpage-userdoesnotexist": "Korisnički nalog „<nowiki>$1</nowiki>“ nije otvoren.\nRazmislite da li zaista želite da napravite/uredite ovu stranicu.",
"userpage-userdoesnotexist-view": "Korisnički nalog „$1“ nije otvoren.",
"blocked-notice-logextract": "Ovaj korisnik je trenutno blokiran.\nIzveštaj o poslednjem blokiranju možete pogledati ispod:",
"clearyourcache": "'''Napomena:''' nakon čuvanja, možda ćete morati da očistite keš pregledača.\n*'''Fajerfoks i Safari:''' držite ''Shift'' i kliknite na ''Osveži'', ili pritisnite ''Ctrl-F5'' ili Ctrl-R (''⌘-R'' na Makintošu)\n*'''Gugl kroum:''' pritisnite ''Ctrl-Shift-R'' (''⌘-Shift-R'' na Makintošu)\n*'''Internet eksplorer: '''držite ''Ctrl'' i kliknite na ''Osveži'', ili pritisnite ''Ctrl-F5''\n*'''Opera:''' očistite privremenu memoriju preko menija ''Alatke → Postavke''.",
"listgrouprights-members": "(spisak članova)",
"listgrouprights-right-display": "<span class=\"listgrouprights-granted\">$1 <code>($2)</code></span>",
"listgrouprights-right-revoked": "<span class=\"listgrouprights-revoked\">$1 <code>($2)</code></span>",
- "listgrouprights-addgroup": "dodaje {{PLURAL:$2|sledeću grupu|sledeće grupe}}: $1",
- "listgrouprights-removegroup": "briše {{PLURAL:$2|sledeću grupu|sledeće grupe}}: $1",
+ "listgrouprights-addgroup": "dodavanje {{PLURAL:$2|sledećih grupa}}: $1",
+ "listgrouprights-removegroup": "uklanjanje {{PLURAL:$2|sledećih grupa}}: $1",
"listgrouprights-addgroup-all": "dodavanje svih grupa",
"listgrouprights-removegroup-all": "brisanje svih grupa",
"listgrouprights-addgroup-self": "dodavanje {{PLURAL:$2|grupe|grupa}} na svoj nalog: $1",
"Uğurkent",
"Kincki",
"McAang",
- "Captantrips"
+ "Captantrips",
+ "Diyapazon"
]
},
"tog-underline": "Bağlantıların altını çiz:",
"newarticletext": "Henüz varolmayan bir sayfaya konulmuş bir bağlantıya tıkladınız.\nSayfayı oluşturmak için aşağıdaki metin kutusunu kullanın. ([$1 yardım sayfasına] bakınız).\nBuraya yanlışlıkla geldiyseniz tarayıcınızın <strong>geri </strong> tuşuna tıklayın.",
"anontalkpagetext": "----''Bu sayfa henüz bir kullanıcı hesabı oluşturmamış veya hesabını kullanmayan bir anonim kullanıcının mesaj sayfasıdır. Bu nedenle bu kişiyi belirtmek için rakamsal IP adresini kullanmak zorundayız. Bu gibi IP adresleri birçok kullanıcı tarafından paylaşılabilir. Eğer siz de bir anonim kullanıcıysanız ve size sizin ilginiz olmayan iletiler geliyorsa, lütfen diğer anonim kullanıcılarla olabilecek olan karmaşayı önlemek için [[Special:UserLogin/signup|bir hesap edinin]] veya [[Special:UserLogin|oturum açın]].''",
"noarticletext": "Bu sayfa şu anda boştur.\nBu başlığı [[Special:Search/{{PAGENAME}}|diğer sayfalarda arayabilir]],\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} ilgili kayıtları arayabilir],\nya da bu sayfayı [{{fullurl:{{FULLPAGENAME}}|action=edit}} değiştirebilirsiniz]</span>.",
- "noarticletext-nopermission": "Bu sayfa şu anda boştur. \nBu başlığı [[Special:Search/{{PAGENAME}}|diğer sayfalarda arayabilir]] ya da <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} ilgili kayıtları tarayabilirsiniz]</span>, fakat sayfayı yaratma yetkiniz bulunmamaktadır.",
+ "noarticletext-nopermission": "Bu sayfa şu anda boştur. \nBu başlığı [[Special:Search/{{PAGENAME}}|diğer sayfalarda arayabilir]] ya da <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} ilgili kayıtları tarayabilirsiniz]</span>, fakat sayfayı oluşturma yetkiniz bulunmamaktadır.",
"missing-revision": "\"{{FULLPAGENAME}}\" sayfasının #$1 sürümü yok.\n\nBu duruma genellikle silinmiş bir sayfaya eski tarihli bir bağlantının takip edilmesi neden olur.\n\nDaha fazla detaylı bilgi [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} sayfasında bulunabilir].",
"userpage-userdoesnotexist": "\"<nowiki>$1</nowiki>\" kullanıcı hesabı kayıtlı değil. Bu sayfayı oluşturmak/değiştirmek istiyorsanız lütfen kontrol edin.",
"userpage-userdoesnotexist-view": "\"$1\" kullanıcı hesabı kayıtlı değil.",
'Espezial' => NS_SPECIAL,
);
-// Remove Spanish gender aliases (bug T39090)
-$namespaceGenderAliases = array();
+// T113890: Setting $namespaceGenderAliases for Aragonese (an)
+$namespaceGenderAliases = array(
+ NS_USER => array( 'male' => 'Usuario', 'female' => 'Usuaria' ),
+ NS_USER_TALK => array( 'male' => 'Descusión_usuario', 'female' => 'Descusión_usuaria' ),
+);
$magicWords = array(
'redirect' => array( '0', '#ENDRECERA', '#REENDRECERA', '#REDIRECCIÓN', '#REDIRECCION', '#REDIRECT' ),
'Imatge_Discussió' => NS_FILE_TALK,
);
+$namespaceGenderAliases = array(
+ NS_USER => array( 'male' => 'Usuari', 'female' => 'Usuària' ),
+ NS_USER_TALK => array( 'male' => 'Usuari_Discussió', 'female' => 'Usuària_Discussió' ),
+); // T113616
+
$specialPageAliases = array(
'Activeusers' => array( 'Usuaris_actius' ),
'Allmessages' => array( 'Missatges', 'MediaWiki' ),
$namespaceAliases = array(
'Imagen' => NS_FILE,
- 'Imagen_Discusión' => NS_FILE_TALK,
+ 'Imagen_discusión' => NS_FILE_TALK,
);
$namespaceGenderAliases = array(
NS_USER => array( 'male' => 'Usuario', 'female' => 'Usuaria' ),
- NS_USER_TALK => array( 'male' => 'Usuario_Discusión', 'female' => 'Usuaria_Discusión' ),
-);
+ NS_USER_TALK => array( 'male' => 'Usuario_discusión', 'female' => 'Usuaria_discusión' ),
+); // T113499
$specialPageAliases = array(
'Activeusers' => array( 'UsuariosActivos' ),
*
*/
+
+$fallback = 'es';
+
$namespaceNames = array(
NS_TEMPLATE => 'Prantilla',
);
+$namespaceGenderAliases = array();
}
# Save additional script dependant options to display
- # them separately in help
+ # them separately in help
$this->mDependantParameters = array_diff_key( $this->mParams, $this->mGenericParameters );
}
*/
private function lockSearchindex( $db ) {
$write = array( 'searchindex' );
- $read = array( 'page', 'revision', 'text', 'interwiki', 'l10n_cache', 'user', 'page_restrictions' );
+ $read = array(
+ 'page',
+ 'revision',
+ 'text',
+ 'interwiki',
+ 'l10n_cache',
+ 'user',
+ 'page_restrictions'
+ );
$db->lockTables( $read, $write, __CLASS__ . '::' . __METHOD__ );
}
while ( $this->reader->read() ) {
switch ( $this->reader->nodeType ) {
case XMLReader::TEXT:
- //case XMLReader::WHITESPACE:
+ // case XMLReader::WHITESPACE:
case XMLReader::SIGNIFICANT_WHITESPACE:
$buffer .= $this->reader->value;
break;
* is thrown.
*
* @param string $id The revision id to get the text for
- * @param string|bool|null $model The content model used to determine applicable export transformations.
- * If $model is null, it will be determined from the database.
+ * @param string|bool|null $model The content model used to determine
+ * applicable export transformations.
+ * If $model is null, it will be determined from the database.
* @param string|null $format The content format used when applying export transformations.
*
* @throws MWException
class CheckComposerLockUpToDate extends Maintenance {
public function __construct() {
parent::__construct();
- $this->mDescription = 'Checks whether your composer.lock file is up to date with the current composer.json';
+ $this->mDescription =
+ 'Checks whether your composer.lock file is up to date with the current composer.json';
}
public function execute() {
// Maybe they're using mediawiki/vendor?
$lockLocation = "$IP/vendor/composer.lock";
if ( !file_exists( $lockLocation ) ) {
- $this->error( 'Could not find composer.lock file. Have you run "composer install"?', 1 );
+ $this->error(
+ 'Could not find composer.lock file. Have you run "composer install"?',
+ 1
+ );
}
}
foreach ( $json->getRequiredDependencies() as $name => $version ) {
if ( isset( $installed[$name] ) ) {
if ( $installed[$name]['version'] !== $version ) {
- $this->output( "$name: {$installed[$name]['version']} installed, $version required.\n" );
+ $this->output(
+ "$name: {$installed[$name]['version']} installed, $version required.\n"
+ );
$found = true;
}
} else {
}
}
if ( $found ) {
- $this->error( 'Error: your composer.lock file is not up to date, run "composer update" to install newer dependencies', 1 );
+ $this->error(
+ 'Error: your composer.lock file is not up to date. ' .
+ 'Run "composer update" to install newer dependencies',
+ 1
+ );
} else {
- // The hash is the entire composer.json file, so it can be updated without any of the dependencies changing
+ // The hash is the entire composer.json file,
+ // so it can be updated without any of the dependencies changing
// We couldn't find any out-of-date dependencies, so assume everything is ok!
$this->output( "Your composer.lock file is up to date with current dependencies!\n" );
}
}
$dbw->freeResult( $res );
# $this->output( "rowOffset: $rowOffset\ttuplesAdded: "
- # . "$tuplesAdded\tnumBadLinks: $numBadLinks\n" );
+ # . "$tuplesAdded\tnumBadLinks: $numBadLinks\n" );
if ( $tuplesAdded != 0 ) {
if ( $reportLinksConvProgress ) {
$this->output( "Inserting $tuplesAdded tuples into $links_temp..." );
class FetchText extends Maintenance {
public function __construct() {
parent::__construct();
- $this->mDescription = "Fetch the raw revision blob from an old_id.";
- $this->mDescription .= "\nNOTE: Export transformations are NOT applied. This is left to backupTextPass.php";
+ $this->mDescription = "Fetch the raw revision blob from an old_id.\n" .
+ "NOTE: Export transformations are NOT applied. " .
+ "This is left to backupTextPass.php";
}
/**
$retval = array();
while ( true ) {
- $json = Http::get( wfAppendQuery( 'http://www.mediawiki.org/w/api.php', $params ), array(), __METHOD__ );
+ $json = Http::get(
+ wfAppendQuery( 'http://www.mediawiki.org/w/api.php', $params ),
+ array(),
+ __METHOD__
+ );
$data = FormatJson::decode( $json, true );
foreach ( $data['query']['categorymembers'] as $page ) {
if ( preg_match( '/Manual\:Hooks\/([a-zA-Z0-9- :]+)/', $page['title'], $m ) ) {
function getReport() {
$s = "Title: " . $this->title->getPrefixedDBkey() . "\n" .
-// "Output type: {$this->outputType}\n" .
+// "Output type: {$this->outputType}\n" .
"Entry point: {$this->entryPoint}\n" .
"User: " . ( $this->fancySig ? 'fancy' : 'no-fancy' ) .
' ' . var_export( $this->nickname, true ) . "\n" .
parent::__construct();
global $wgUpdateCompatibleMetadata;
- //make sure to update old, but compatible img_metadata fields.
+ // make sure to update old, but compatible img_metadata fields.
$wgUpdateCompatibleMetadata = true;
$this->mDescription = 'Script to update image metadata records';
if ( false !== strpos( $row->old_flags, 'gzip' )
|| false !== strpos( $row->old_flags, 'object' )
) {
- #print "Already compressed row {$row->old_id}\n";
+ # print "Already compressed row {$row->old_id}\n";
return false;
}
$dbw = wfGetDB( DB_MASTER );
# Don't work with current revisions
# Don't lock the page table for update either -- TS 2006-04-04
- #$tables[] = 'page';
- #$conds[] = 'page_id=rev_page AND rev_id != page_latest';
+ # $tables[] = 'page';
+ # $conds[] = 'page_id=rev_page AND rev_id != page_latest';
for ( $pageId = $startId; $pageId <= $maxPageId; $pageId++ ) {
wfWaitForSlaves();
if ( $text === false ) {
$this->error( "\nError, unable to get text in old_id $oldid" );
- #$dbw->delete( 'old', array( 'old_id' => $oldid ) );
+ # $dbw->delete( 'old', array( 'old_id' => $oldid ) );
}
if ( $extdb == "" && $j == 0 ) {
}
// Set up the help system
- $( '.mw-help-field-data' )
+ $( '.config-help-field-data' )
.hide()
- .closest( '.mw-help-field-container' )
- .find( '.mw-help-field-hint' )
+ .closest( '.config-help-field-container' )
+ .find( '.config-help-field-hint' )
.show()
.click( function () {
$( this )
- .closest( '.mw-help-field-container' )
- .find( '.mw-help-field-data' )
+ .closest( '.config-help-field-container' )
+ .find( '.config-help-field-data' )
.slideToggle( 'fast' );
} );
<exclude name="MediaWiki.NamingConventions.PrefixedGlobalFunctions.wfPrefix"/>
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps"/>
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed"/>
+ <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.EmptyComment"/>
+ </rule>
+ <rule ref="MediaWiki.NamingConventions.PrefixedGlobalFunctions">
+ <properties>
+ <property name="ignoreList" type="array" value="bfNormalizeTitleStrReplace,bfNormalizeTitleStrTr,cdbShowHelp,codepointToUtf8,compare_point,cssfilter,escapeSingleString,findAuxFile,findFiles,getEscapedProfileUrl,getFileCommentFromSourceWiki,getFileUserFromSourceWiki,hexSequenceToUtf8,mccGetHelp,mccShowUsage,mimeTypeMatch,moveToExternal,NothingFunction,NothingFunctionData,resolveStub,resolveStubs,showUsage,splitFilename,utf8ToCodepoint,utf8ToHexSequence" />
+ </properties>
+ </rule>
+ <rule ref="MediaWiki.NamingConventions.ValidGlobalName">
+ <properties>
+ <property name="ignoreList" type="array" value="$IP,$messageMemc,$parserMemc" />
+ </properties>
</rule>
<file>.</file>
<arg name="encoding" value="utf8"/>
$sort = $_REQUEST['sort'];
}
-$res = $dbr->select( 'profiling', '*', array(), 'profileinfo.php', array( 'ORDER BY' => 'pf_name ASC' ) );
+$res = $dbr->select(
+ 'profiling',
+ '*',
+ array(),
+ 'profileinfo.php',
+ array( 'ORDER BY' => 'pf_name ASC' )
+);
if ( isset( $_REQUEST['filter'] ) ) {
$filter = $_REQUEST['filter'];
<p>
<input type="text" name="filter" value="<?php echo htmlspecialchars( $filter ); ?>">
<input type="hidden" name="sort" value="<?php echo htmlspecialchars( $sort ); ?>">
- <input type="hidden" name="expand" value="<?php echo htmlspecialchars( implode( ",", array_keys( $expand ) ) ); ?>">
+ <input type="hidden" name="expand" value="<?php
+ echo htmlspecialchars( implode( ",", array_keys( $expand ) ) );
+ ?>">
<input type="submit" value="Filter">
</p>
</form>
<table class="mw-profileinfo-table table table-striped table-hover">
<thead>
<tr>
- <th><a href="<?php echo getEscapedProfileUrl( false, 'name' ); ?>">Name</a></th>
- <th><a href="<?php echo getEscapedProfileUrl( false, 'time' ); ?>">Time (%)</a></th>
- <th><a href="<?php echo getEscapedProfileUrl( false, 'memory' ); ?>">Memory (%)</a></th>
- <th><a href="<?php echo getEscapedProfileUrl( false, 'count' ); ?>">Count</a></th>
- <th><a href="<?php echo getEscapedProfileUrl( false, 'calls_per_req' ); ?>">Calls/req</a></th>
- <th><a href="<?php echo getEscapedProfileUrl( false, 'time_per_call' ); ?>">ms/call</a></th>
- <th><a href="<?php echo getEscapedProfileUrl( false, 'memory_per_call' ); ?>">kb/call</a></th>
- <th><a href="<?php echo getEscapedProfileUrl( false, 'time_per_req' ); ?>">ms/req</a></th>
- <th><a href="<?php echo getEscapedProfileUrl( false, 'memory_per_req' ); ?>">kb/req</a></th>
+ <th><a href="<?php
+ echo getEscapedProfileUrl( false, 'name' );
+ ?>">Name</a></th>
+ <th><a href="<?php
+ echo getEscapedProfileUrl( false, 'time' );
+ ?>">Time (%)</a></th>
+ <th><a href="<?php
+ echo getEscapedProfileUrl( false, 'memory' );
+ ?>">Memory (%)</a></th>
+ <th><a href="<?php
+ echo getEscapedProfileUrl( false, 'count' );
+ ?>">Count</a></th>
+ <th><a href="<?php
+ echo getEscapedProfileUrl( false, 'calls_per_req' );
+ ?>">Calls/req</a></th>
+ <th><a href="<?php
+ echo getEscapedProfileUrl( false, 'time_per_call' );
+ ?>">ms/call</a></th>
+ <th><a href="<?php
+ echo getEscapedProfileUrl( false, 'memory_per_call' );
+ ?>">kb/call</a></th>
+ <th><a href="<?php
+ echo getEscapedProfileUrl( false, 'time_per_req' );
+ ?>">ms/req</a></th>
+ <th><a href="<?php
+ echo getEscapedProfileUrl( false, 'memory_per_req' );
+ ?>">kb/req</a></th>
</tr>
</thead>
<tbody>
),
'mediawiki.action.view.filepage' => array(
'styles' => array(
- 'resources/src/mediawiki.action/mediawiki.action.view.filepage.print.css' => array( 'media' => 'print' ),
+ 'resources/src/mediawiki.action/mediawiki.action.view.filepage.print.css' =>
+ array( 'media' => 'print' ),
'resources/src/mediawiki.action/mediawiki.action.view.filepage.css',
),
'position' => 'top',
// @todo: Remove mediawiki.page.gallery when cache has cleared
'resources/src/mediawiki.page/mediawiki.page.gallery.print.css' => array( 'media' => 'print' ),
// @todo: Remove mediawiki.action.view.filepage.print.css when cache has cleared
- 'resources/src/mediawiki.action/mediawiki.action.view.filepage.print.css' => array( 'media' => 'print' ),
+ 'resources/src/mediawiki.action/mediawiki.action.view.filepage.print.css' =>
+ array( 'media' => 'print' ),
'resources/src/mediawiki.legacy/commonPrint.css' => array( 'media' => 'print' )
),
),
}
}
}
+
+.redirect-in-category {
+ font-style: italic;
+}
}
switch ( form ) {
case 'genitive': // родовий відмінок
- if ( word.slice( -4 ) !== 'вікі' && word.slice( -4 ) !== 'Вікі' ) {
- if ( word.slice( -1 ) === 'ь' ) {
- word = word.slice( 0, -1 ) + 'я';
- } else if ( word.slice( -2 ) === 'ія' ) {
- word = word.slice( 0, -2 ) + 'ії';
- } else if ( word.slice( -2 ) === 'ка' ) {
- word = word.slice( 0, -2 ) + 'ки';
- } else if ( word.slice( -2 ) === 'ти' ) {
- word = word.slice( 0, -2 ) + 'тей';
- } else if ( word.slice( -2 ) === 'ды' ) {
- word = word.slice( 0, -2 ) + 'дов';
- } else if ( word.slice( -3 ) === 'ник' ) {
- word = word.slice( 0, -3 ) + 'ника';
- }
+ if ( word.slice( -2 ) === 'ія' ) {
+ word = word.slice( 0, -2 ) + 'ії';
+ } else if ( word.slice( -2 ) === 'ти' ) {
+ word = word.slice( 0, -2 ) + 'т';
+ } else if ( word.slice( -2 ) === 'ди' ) {
+ word = word.slice( 0, -2 ) + 'дів';
+ } else if ( word.slice( -3 ) === 'ник' ) {
+ word = word.slice( 0, -3 ) + 'ника';
}
+
break;
case 'accusative': // знахідний відмінок
- if ( word.slice( -4 ) !== 'вікі' && word.slice( -4 ) !== 'Вікі' ) {
- if ( word.slice( -2 ) === 'ія' ) {
- word = word.slice( 0, -2 ) + 'ію';
- }
+ if ( word.slice( -2 ) === 'ія' ) {
+ word = word.slice( 0, -2 ) + 'ію';
}
+
break;
}
+
return word;
};
/**
* Links
*/
-a.stub,
-a.new {
- color: #ba0000;
- text-decoration: none;
-}
-
a {
- color: black !important;
background: none !important;
padding: 0 !important;
}
-a:link, a:visited {
- color: #520;
- background: transparent;
- text-decoration: underline;
-}
-
/* Expand URLs for printing */
.mw-body a.external.text:after,
.mw-body a.external.autonumber:after {
unicode-bidi: isolate;
}
-/**
- * Links to redirects appear italicized on [[Special:AllPages]], [[Special:PrefixIndex]],
- * [[Special:Watchlist/edit]] and in category listings.
- */
-.allpagesredirect,
-.redirect-in-category,
-.watchlistredir {
- font-style: italic;
-}
-
/* Comment portions of RC entries */
span.comment {
font-style: italic;
vertical-align: top;
width: 31%;
}
+.allpagesredirect {
+ font-style: italic;
+}
/* Special:BlockList */
table.mw-blocklist span.mw-usertoollinks,
font-weight: bold;
}
+/* Special:EditWatchlist */
+.watchlistredir {
+ font-style: italic;
+}
+
/* Special:EmailUser */
td#mw-emailuser-sender,
td#mw-emailuser-recipient {
#mw-editbutton-hr {
.background-image("images/@{button-hr}");
}
+
+// Awful workaround for T113868, while it awaits a better fix.
+#mw-t113868 {
+ background-image: url(images/ar/button_bold.png), url(images/ar/button_headline.png), url(images/ar/button_italic.png), url(images/ar/button_link.png), url(images/ar/button_nowiki.png), url(images/be-tarask/button_bold.png), url(images/be-tarask/button_italic.png), url(images/be-tarask/button_link.png), url(images/de/button_bold.png), url(images/de/button_italic.png), url(images/en/button_bold.png), url(images/en/button_extlink.png), url(images/en/button_headline.png), url(images/en/button_hr.png), url(images/en/button_image.png), url(images/en/button_italic.png), url(images/en/button_link.png), url(images/en/button_media.png), url(images/en/button_nowiki.png), url(images/en/button_sig.png), url(images/fa/button_bold.png), url(images/fa/button_headline.png), url(images/fa/button_italic.png), url(images/fa/button_link.png), url(images/fa/button_nowiki.png), url(images/ksh/button_italic.png), url(images/ru/button_bold.png), url(images/ru/button_italic.png), url(images/ru/button_link.png);
+}
'TestRecentChangesHelper' => "$testDir/phpunit/includes/changes/TestRecentChangesHelper.php",
# tests/phpunit/includes/content
- 'DummyContentHandlerForTesting' => "$testDir/phpunit/mocks/content/DummyContentHandlerForTesting.php",
+ 'DummyContentHandlerForTesting' =>
+ "$testDir/phpunit/mocks/content/DummyContentHandlerForTesting.php",
'DummyContentForTesting' => "$testDir/phpunit/mocks/content/DummyContentForTesting.php",
'DummyNonTextContentHandler' => "$testDir/phpunit/mocks/content/DummyNonTextContentHandler.php",
'DummyNonTextContent' => "$testDir/phpunit/mocks/content/DummyNonTextContent.php",
'PasswordTestCase' => "$testDir/phpunit/includes/password/PasswordTestCase.php",
# tests/phpunit/includes/resourceloader
- 'ResourceLoaderImageModuleTest' => "$testDir/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php",
- 'ResourceLoaderImageModuleTestable' => "$testDir/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php",
+ 'ResourceLoaderImageModuleTest' =>
+ "$testDir/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php",
+ 'ResourceLoaderImageModuleTestable' =>
+ "$testDir/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php",
# tests/phpunit/includes/specials
'SpecialPageTestBase' => "$testDir/phpunit/includes/specials/SpecialPageTestBase.php",
)*
\} # Close bracket
)
- (?<value>
+ (?<value>
(?:
(?&qstr) # Quoted val
|
}
static function getFakeTimestamp( &$parser, &$ts ) {
- $ts = 123; //parsed as '1970-01-01T00:02:03Z'
+ $ts = 123; // parsed as '1970-01-01T00:02:03Z'
return true;
}
}
<?php
-class MediaWikiPHPUnitTestListener extends PHPUnit_TextUI_ResultPrinter implements PHPUnit_Framework_TestListener {
+class MediaWikiPHPUnitTestListener
+ extends PHPUnit_TextUI_ResultPrinter implements PHPUnit_Framework_TestListener {
/**
* @var string
* @param bool $isHtml
*/
public static function assertTag( $matcher, $actual, $message = '', $isHtml = true ) {
- //trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED);
+ // trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED);
self::assertTrue( self::tagMatch( $matcher, $actual, $isHtml ), $message );
}
* @param bool $isHtml
*/
public static function assertNotTag( $matcher, $actual, $message = '', $isHtml = true ) {
- //trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED);
+ // trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED);
self::assertFalse( self::tagMatch( $matcher, $actual, $isHtml ), $message );
}
$page->doEditContent( $content, "base text for test" );
$this->forceRevisionDate( $page, '20120101000000' );
- //sanity check
+ // sanity check
$page->clear();
$currentText = ContentHandler::getContentText( $page->getContent() );
$textWithNewSectionAdded = "$text\n$newSection";
return array(
- array( #0
+ array( # 0
$text,
'',
'hello',
'hello'
),
- array( #1
+ array( # 1
$text,
'1',
$sectionOne,
$textWithNewSectionOne,
),
- array( #2
+ array( # 2
$text,
'new',
'hello',
public static function provideAutoMerge() {
$tests = array();
- $tests[] = array( #0: plain conflict
+ $tests[] = array( # 0: plain conflict
"Elmo", # base edit user
"one\n\ntwo\n\nthree\n",
- array( #adam's edit
+ array( # adam's edit
'wpStarttime' => 1,
'wpTextbox1' => "ONE\n\ntwo\n\nthree\n",
),
- array( #berta's edit
+ array( # berta's edit
'wpStarttime' => 2,
'wpTextbox1' => "(one)\n\ntwo\n\nthree\n",
),
'expected edit conflict', # message
);
- $tests[] = array( #1: successful merge
+ $tests[] = array( # 1: successful merge
"Elmo", # base edit user
"one\n\ntwo\n\nthree\n",
- array( #adam's edit
+ array( # adam's edit
'wpStarttime' => 1,
'wpTextbox1' => "ONE\n\ntwo\n\nthree\n",
),
- array( #berta's edit
+ array( # berta's edit
'wpStarttime' => 2,
'wpTextbox1' => "one\n\ntwo\n\nTHREE\n",
),
// generate expected text after merge
$expected = str_replace( 'one', 'ONE', str_replace( 'three', 'THREE', $text ) );
- $tests[] = array( #2: merge in section
+ $tests[] = array( # 2: merge in section
"Elmo", # base edit user
$text,
- array( #adam's edit
+ array( # adam's edit
'wpStarttime' => 1,
'wpTextbox1' => str_replace( 'one', 'ONE', $section ),
'wpSection' => '1'
),
- array( #berta's edit
+ array( # berta's edit
'wpStarttime' => 2,
'wpTextbox1' => str_replace( 'three', 'THREE', $section ),
'wpSection' => '1'
) {
$this->checkHasDiff3();
- //create page
+ // create page
$ns = $this->getDefaultWikitextNS();
$title = Title::newFromText( 'EditPageTest_testAutoMerge', $ns );
$page = WikiPage::factory( $title );
$sampleUTF = "Östergötland_coat_of_arms.png";
- //mb_substr
+ // mb_substr
$substr_params = array(
array( 0, 0 ),
array( 5, -4 ),
);
}
- //mb_strlen
+ // mb_strlen
$this->assertEquals(
mb_strlen( $sampleUTF ),
Fallback::mb_strlen( $sampleUTF ),
'Fallback mb_strlen'
);
- //mb_str(r?)pos
+ // mb_str(r?)pos
$strpos_params = array(
- //array( 'ter' ),
- //array( 'Ö' ),
- //array( 'Ö', 3 ),
- //array( 'oat_', 100 ),
- //array( 'c', -10 ),
- //Broken for now
+ // array( 'ter' ),
+ // array( 'Ö' ),
+ // array( 'Ö', 3 ),
+ // array( 'oat_', 100 ),
+ // array( 'c', -10 ),
+ // Broken for now
);
foreach ( $strpos_params as $param_set ) {
$this->setMwGlobals( array(
'wgDebugLogFile' => $debugLogFile,
- # @todo FIXME: $wgDebugTimestamps should be tested
+ # @todo FIXME: $wgDebugTimestamps should be tested
'wgDebugTimestamps' => false
) );
'gzip;q=1.0' => true,
'foozip' => false,
'foo*zip' => false,
- 'gzip;q=abcde' => true, //is this REALLY valid?
+ 'gzip;q=abcde' => true, // is this REALLY valid?
'gzip;q=12345678.9' => true,
' gzip' => true,
);
* @covers ::wfUrlencode
*/
class WfUrlencodeTest extends MediaWikiTestCase {
- #### TESTS ##############################################################
+ # ### TESTS ##############################################################
/**
* @dataProvider provideURLS
$this->verifyEncodingFor( 'Microsoft-IIS/7', $input, $expected );
}
- #### HELPERS #############################################################
+ # ### HELPERS #############################################################
/**
* Internal helper that actually run the test.
}
}
- #### PROVIDERS ###########################################################
+ # ### PROVIDERS ###########################################################
/**
* Format is either:
*/
public static function provideURLS() {
return array(
- ### RFC 1738 chars
+ # ## RFC 1738 chars
// + is not safe
array( '+', '%2B' ),
// & and = not safe in queries
';@$-_.!*',
),
- ### Other tests
+ # ## Other tests
// slash remain unchanged. %2F seems to break things
array( '/', '/' ),
// T105265
*/
public function testExpandAttributesSkipsNullAndFalse() {
- ### EMPTY ########
+ # ## EMPTY ########
$this->assertEmpty(
Html::expandAttributes( array( 'foo' => null ) ),
'skip keys with null value'
* @covers Html::expandAttributes
*/
public function testExpandAttributesVariousExpansions() {
- ### NOT EMPTY ####
+ # ## NOT EMPTY ####
$this->assertEquals(
' empty_string=""',
Html::expandAttributes( array( 'empty_string' => '' ) ),
* @covers Html::expandAttributes
*/
public function testExpandAttributesListValueAttributes() {
- ### STRING VALUES
+ # ## STRING VALUES
$this->assertEquals(
' class="redundant spaces here"',
Html::expandAttributes( array( 'class' => ' redundant spaces here ' ) ),
Html::expandAttributes( array( 'class' => 'foo bar foo bar bar' ) ),
'Normalization should remove duplicates in string-lists'
);
- ### "EMPTY" ARRAY VALUES
+ # ## "EMPTY" ARRAY VALUES
$this->assertEquals(
' class=""',
Html::expandAttributes( array( 'class' => array() ) ),
Html::expandAttributes( array( 'class' => array( null, '', ' ', ' ' ) ) ),
'Array with null, empty string and spaces'
);
- ### NON-EMPTY ARRAY VALUES
+ # ## NON-EMPTY ARRAY VALUES
$this->assertEquals(
' class="foo bar"',
Html::expandAttributes( array( 'class' => array(
# Will be mapped to Html::element()
$cases = array();
- ### Generic cases, match $attribDefault static array
+ # ## Generic cases, match $attribDefault static array
$cases[] = array( '<area>',
'area', array( 'shape' => 'rect' )
);
'textarea', array( 'wrap' => 'soft' )
);
- ### SPECIFIC CASES
+ # ## SPECIFIC CASES
# <link type="text/css">
$cases[] = array( '<link>',
# (\S+) - host part is made of anything not whitespaces
// commented these out in order to remove @group Broken
// @todo are these valid tests? if so, fix Http::isValidURI so it can handle them
- //array( false, 'http://!"èèè¿¿¿~~\'', 'hostname is made of any non whitespace' ),
- //array( false, 'http://exam:ple.org/', 'hostname can not use colons!' ),
+ // array( false, 'http://!"èèè¿¿¿~~\'', 'hostname is made of any non whitespace' ),
+ // array( false, 'http://exam:ple.org/', 'hostname can not use colons!' ),
# (:[0-9]+)? - port number
array( true, 'http://example.org:80/' ),
//
// array( null, 'http://*.test.com', 'http://www.test.com:80', false ),
// array( '', 'https://*.wikimedia.org/r/#/q/status:open,n,z',
- // 'https://gerrit.wikimedia.org/XXX/r/#/q/status:open,n,z', false ),
+ // 'https://gerrit.wikimedia.org/XXX/r/#/q/status:open,n,z', false ),
);
}
# - optional message
return array(
- ### ANONYMOUS USER ########################################
+ # ## ANONYMOUS USER ########################################
array(
'<a href="/wiki/Special:Contributions/JohnDoe" '
. 'title="Special:Contributions/JohnDoe" '
'Anonymous with IPv4 and an alternative username'
),
- ### Regular user ##########################################
+ # ## Regular user ##########################################
# TODO!
);
}
) );
}
-#### START OF TESTS #########################################################
+# ### START OF TESTS #########################################################
/**
* @todo Write more texts, handle $wgAllowImageMoving setting
$this->assertEquals( NS_MAIN, MWNamespace::getAssociated( NS_TALK ) );
}
- ### Exceptions with getAssociated()
- ### NS_MEDIA and NS_SPECIAL do not have talk pages. MediaWiki raises
- ### an exception for them.
+ # ## Exceptions with getAssociated()
+ # ## NS_MEDIA and NS_SPECIAL do not have talk pages. MediaWiki raises
+ # ## an exception for them.
/**
* @expectedException MWException
* @covers MWNamespace::getAssociated
$this->assertFalse( MWNamespace::isNonincludable( NS_TEMPLATE ) );
}
- ####### HELPERS ###########################################################
+ # ###### HELPERS ###########################################################
function __call( $method, $args ) {
// Call the real method if it exists
if ( method_exists( $this, $method ) ) {
$res = Revision::fetchRevision( $page->getTitle() );
- #note: order is unspecified
+ # note: order is unspecified
$rows = array();
while ( ( $row = $res->fetchObject() ) ) {
$rows[$row->rev_id] = $row;
$this->assertNull( $rev->getContent(),
"getContent() should return null if the revision's text blob could not be loaded." );
- //NOTE: check this twice, once for lazy initialization, and once with the cached value.
+ // NOTE: check this twice, once for lazy initialization, and once with the cached value.
$this->assertNull( $rev->getContent(),
"getContent() should return null if the revision's text blob could not be loaded." );
}
public static function provideUserWasLastToEdit() {
return array(
- array( #0
+ array( # 0
3, true, # actually the last edit
),
- array( #1
+ array( # 1
2, true, # not the current edit, but still by this user
),
- array( #2
+ array( # 2
1, false, # edit by another user
),
- array( #3
+ array( # 3
0, false, # first edit, by this user, but another user edited in the mean time
),
);
}
function dataGetContentModel() {
- //NOTE: we expect the help namespace to always contain wikitext
+ // NOTE: we expect the help namespace to always contain wikitext
return array(
array( 'hello world', 'Help:Hello', null, null, CONTENT_MODEL_WIKITEXT ),
array( 'hello world', 'User:hello/there.css', null, null, CONTENT_MODEL_CSS ),
}
function dataGetContentFormat() {
- //NOTE: we expect the help namespace to always contain wikitext
+ // NOTE: we expect the help namespace to always contain wikitext
return array(
array( 'hello world', 'Help:Hello', null, null, CONTENT_FORMAT_WIKITEXT ),
array( 'hello world', 'Help:Hello', CONTENT_MODEL_CSS, null, CONTENT_FORMAT_CSS ),
}
function dataGetContentHandler() {
- //NOTE: we expect the help namespace to always contain wikitext
+ // NOTE: we expect the help namespace to always contain wikitext
return array(
array( 'hello world', 'Help:Hello', null, null, 'WikitextContentHandler' ),
array( 'hello world', 'User:hello/there.css', null, null, 'CssContentHandler' ),
}
function dataGetContent() {
- //NOTE: we expect the help namespace to always contain wikitext
+ // NOTE: we expect the help namespace to always contain wikitext
return array(
array( 'hello world', 'Help:Hello', null, null, Revision::FOR_PUBLIC, 'hello world' ),
array(
}
function dataGetText() {
- //NOTE: we expect the help namespace to always contain wikitext
+ // NOTE: we expect the help namespace to always contain wikitext
return array(
array( 'hello world', 'Help:Hello', null, null, Revision::FOR_PUBLIC, 'hello world' ),
array( serialize( 'hello world' ), 'Hello', "testing", null, Revision::FOR_PUBLIC, null ),
// and the first call to the setUp method. Because of that you can't access any variables
// you create there from within a data provider."
// http://phpunit.de/manual/3.7/en/writing-tests-for-phpunit.html
-// $status = new Status();
-// $status->warning( 'fooBar!' );
-// $status->warning( 'fooBar2!' );
-// $testCases[ '2StringWarnings' ] = array(
-// $status,
-// array( new Message( 'fooBar!' ), new Message( 'fooBar2!' ) ),
-// "* \$1\n* \$2"
-// );
+// $status = new Status();
+// $status->warning( 'fooBar!' );
+// $status->warning( 'fooBar2!' );
+// $testCases[ '2StringWarnings' ] = array(
+// $status,
+// array( new Message( 'fooBar!' ), new Message( 'fooBar2!' ) ),
+// "* \$1\n* \$2"
+// );
$status = new Status();
$status->warning( new Message( 'fooBar!', array( 'foo', 'bar' ) ) );
$this->assertEquals( $expected, $object->valid() );
}
- //@todo unit test for key()
- //@todo unit test for next()
- //@todo unit test for rewind()
+ // @todo unit test for key()
+ // @todo unit test for next()
+ // @todo unit test for rewind()
}
);
if ( $this->isWikitextNS( NS_MAIN ) ) {
- //NOTE: some content models don't allow moving
+ // NOTE: some content models don't allow moving
// @todo find a Wikitext namespace for testing
$this->setTitle( NS_MAIN );
// XML/HTML character entity references
// Note: Commented out because they are not marked invalid by the PHP test as
// Title::newFromText runs Sanitizer::decodeCharReferencesAndNormalize first.
- //'A é B',
- //'A é B',
- //'A é B',
+ // 'A é B',
+ // 'A é B',
+ // 'A é B',
// Subject of NS_TALK does not roundtrip to NS_MAIN
array( 'Talk:File:Example.svg', 'title-invalid-talk-namespace' ),
// Directory navigation
$this->assertEquals( $expected, $object->valid() );
}
- //@todo unit test for key()
- //@todo unit test for next()
- //@todo unit test for rewind()
+ // @todo unit test for key()
+ // @todo unit test for next()
+ // @todo unit test for rewind()
}
$setcookieInvocations = $setcookieSpy->getInvocations();
$setcookieInvocation = end( $setcookieInvocations );
- $actualExpiry = $setcookieInvocation->parameters[ 2 ];
+ $actualExpiry = $setcookieInvocation->parameters[2];
// TODO: ± 300 seconds compensates for
// slow-running tests. However, the dependency on the time
*/
public static function provideEditAppend() {
return array(
- array( #0: append
+ array( # 0: append
'foo', 'append', 'bar', "foobar"
),
- array( #1: prepend
+ array( # 1: prepend
'foo', 'prepend', 'bar', "barfoo"
),
- array( #2: append to empty page
+ array( # 2: append to empty page
'', 'append', 'foo', "foo"
),
- array( #3: prepend to empty page
+ array( # 3: prepend to empty page
'', 'prepend', 'foo', "foo"
),
- array( #4: append to non-existing page
+ array( # 4: append to non-existing page
null, 'append', 'foo', "foo"
),
- array( #5: prepend to non-existing page
+ array( # 5: prepend to non-existing page
null, 'prepend', 'foo', "foo"
),
);
$this->getTokens();
if ( !Title::newFromText( 'Help:UTPage' )->exists() ) {
- $this->markTestSkipped( "The article [[Help:UTPage]] does not exist" ); //TODO: just create it?
+ $this->markTestSkipped( "The article [[Help:UTPage]] does not exist" ); // TODO: just create it?
}
$data = $this->doApiRequest( array(
return strcmp( $a, $b );
} );
$reqStr = http_build_query( $request );
- //$reqStr = str_replace( '&', ' & ', $reqStr );
+ // $reqStr = str_replace( '&', ' & ', $reqStr );
$this->assertLessThan( $expectedCount, $count, "$id more data: $reqStr" );
if ( $this->mVerbose ) {
print "$id (#$count): $reqStr\n";
class GenderCacheTest extends MediaWikiLangTestCase {
function addDBData() {
- //ensure the correct default gender
+ // ensure the correct default gender
$this->mergeMwGlobalArrayValue( 'wgDefaultUserOptions', array( 'gender' => 'unknown' ) );
$user = User::newFromName( 'UTMale' );
$user->addToDatabase();
$user->setPassword( 'UTMalePassword' );
}
- //ensure the right gender
+ // ensure the right gender
$user->setOption( 'gender', 'male' );
$user->saveSettings();
$user->addToDatabase();
$user->setPassword( 'UTFemalePassword' );
}
- //ensure the right gender
+ // ensure the right gender
$user->setOption( 'gender', 'female' );
$user->saveSettings();
$user->addToDatabase();
$user->setPassword( 'UTDefaultGenderPassword' );
}
- //ensure the default gender
+ // ensure the default gender
$user->setOption( 'gender', null );
$user->saveSettings();
}
array( 'UTFemale', 'female' ),
array( 'UTDefaultGender', 'unknown' ),
array( 'UTNotExist', 'unknown' ),
- //some not valid user
+ // some not valid user
array( '127.0.0.1', 'unknown' ),
array( 'user@test', 'unknown' ),
);
public static function dataPreSaveTransform() {
return array(
array(
- #0: no signature resolution
+ # 0: no signature resolution
'hello this is ~~~',
'hello this is ~~~',
),
array(
- #1: rtrim
+ # 1: rtrim
" Foo \n ",
' Foo',
),
$update = $updates[$class];
foreach ( $fieldValues as $field => $value ) {
- $v = $update->$field; #if the field doesn't exist, just crash and burn
+ $v = $update->$field; # if the field doesn't exist, just crash and burn
$this->assertEquals( $value, $v, "unexpected value for field $field in instance of $class" );
}
}
$update = $updates[$class];
foreach ( $fieldValues as $field => $value ) {
- $v = $update->$field; #if the field doesn't exist, just crash and burn
+ $v = $update->$field; # if the field doesn't exist, just crash and burn
$this->assertEquals( $value, $v, "unexpected value for field $field in instance of $class" );
}
}
// Versions tested
$versions = array(
- //'1.13', disabled for now, was totally screwed up
+ // '1.13', disabled for now, was totally screwed up
// SQLite wasn't included in 1.14
'1.15',
'1.16',
) {
$update = new LinksUpdate( $title, $parserOutput );
- //NOTE: make sure LinksUpdate does not generate warnings when called inside a transaction.
+ // NOTE: make sure LinksUpdate does not generate warnings when called inside a transaction.
$update->beginTransaction();
$update->doUpdate();
$update->commitTransaction();
array( "$base/unittest-cont1/e/a/z/some_file1.txt", true ),
array( "$base/unittest-cont2/a/z/some_file2.txt", true ),
# Specific to FS backend with no basePath field set
- #array( "$base/unittest-cont3/a/z/some_file3.txt", false ),
+ # array( "$base/unittest-cont3/a/z/some_file3.txt", false ),
);
}
$this->assertEquals( true, $status->isOK(),
"Locking of files succeeded with OK status ($backendName) ($i)." );
- ## Flip the acquire/release ordering around ##
+ # # Flip the acquire/release ordering around ##
$status = $this->backend->lockFiles( $paths, LockManager::LOCK_SH );
$this->assertEquals( print_r( array(), true ), print_r( $status->errors, true ),
array(
'content-length' => 345,
'content-type' => 'image+bitmap/jpeg',
- 'content-disposition' => 'filename='. str_repeat( 'o', 1024 ) . ';inline',
+ 'content-disposition' => 'filename=' . str_repeat( 'o', 1024 ) . ';inline',
'content-duration' => 35.6363,
'content-custom' => 'hello',
'x-content-custom' => 'hello'
);
}
}
-
}
}
- rmdir( $directory );
+ rmdir( $directory );
}
protected function tearDown() {
protected function setUp() {
parent::setUp();
- //cli tool setup
+ // cli tool setup
$djvuSupport = new DjVuSupport();
if ( !$djvuSupport->isEnabled() ) {
public function testGetMetadata( $filename, $expected ) {
$file = $this->dataFile( $filename, 'image/png' );
$actual = $this->handler->getMetadata( $file, "$this->filePath/$filename" );
-// $this->assertEquals( unserialize( $expected ), unserialize( $actual ) );
+// $this->assertEquals( unserialize( $expected ), unserialize( $actual ) );
$this->assertEquals( ( $expected ), ( $actual ) );
}
$this->hideDeprecated( "WikiPage::getText" );
$this->hideDeprecated( "Revision::getText" );
- //NOTE: assume help namespace will default to wikitext
+ // NOTE: assume help namespace will default to wikitext
$title = Title::newFromText( "Help:WikiPageTest_testDoEdit" );
$page = $this->newPage( $title );
$this->hideDeprecated( "WikiPage::doQuickEdit" );
- //NOTE: assume help namespace will default to wikitext
+ // NOTE: assume help namespace will default to wikitext
$page = $this->createPage( "Help:WikiPageTest_testDoQuickEdit", "original text" );
$text = "quick text";
";
public function dataReplaceSection() {
- //NOTE: assume the Help namespace to contain wikitext
+ // NOTE: assume the Help namespace to contain wikitext
return array(
array( 'Help:WikiPageTest_testReplaceSection',
CONTENT_MODEL_WIKITEXT,
$this->assertEquals( 'Admin', $rev1->getUserText() );
# now, try the actual rollback
- $admin->addGroup( "sysop" ); #XXX: make the test user a sysop...
+ $admin->addGroup( "sysop" ); # XXX: make the test user a sysop...
$token = $admin->getEditToken(
array( $page->getTitle()->getPrefixedText(), $user2->getName() ),
null
);
# now, try the rollback
- $admin->addGroup( "sysop" ); #XXX: make the test user a sysop...
+ $admin->addGroup( "sysop" ); # XXX: make the test user a sysop...
$token = $admin->getEditToken(
array( $page->getTitle()->getPrefixedText(), $user1->getName() ),
null
public function testDoRollbackFailureSameContent() {
$admin = new User();
$admin->setName( "Admin" );
- $admin->addGroup( "sysop" ); #XXX: make the test user a sysop...
+ $admin->addGroup( "sysop" ); # XXX: make the test user a sysop...
$text = "one";
$page = $this->newPage( "WikiPageTest_testDoRollback" );
$user1 = new User();
$user1->setName( "127.0.1.11" );
- $user1->addGroup( "sysop" ); #XXX: make the test user a sysop...
+ $user1->addGroup( "sysop" ); # XXX: make the test user a sysop...
$text .= "\n\ntwo";
$page = new WikiPage( $page->getTitle() );
$page->doEditContent(
public function testGetAutoDeleteReason( $edits, $expectedResult, $expectedHistory ) {
global $wgUser;
- //NOTE: assume Help namespace to contain wikitext
+ // NOTE: assume Help namespace to contain wikitext
$page = $this->newPage( "Help:WikiPageTest_testGetAutoDeleteReason" );
$c = 1;
$user = new User();
$user->setName( "127.0.0.1" );
- //NOTE: assume Help namespace to contain wikitext
+ // NOTE: assume Help namespace to contain wikitext
$page = $this->newPage( "Help:WikiPageTest_testPreloadTransform" );
$text = $page->preSaveTransform( $text, $user );
return self::createProviderUpTo( 31 );
}
- ############### TESTS #############################################
+ # ############## TESTS #############################################
# @todo FIXME:
# - those got copy pasted, we can probably make them cleaner
# - tests are lacking useful messages
$this->assertUnPadded( 'revisionmonth1', $month );
}
- ############### HELPERS ############################################
+ # ############## HELPERS ############################################
/** assertion helper expecting a magic output which is zero padded */
public function assertZeroPadded( $magic, $value ) {
);
# please keep the following commented line of code. It helps debugging.
- //print "\nDEBUG (value $value):" . sprintf( '2010%02d%02d123456', $value, $value ) . "\n";
+ // print "\nDEBUG (value $value):" . sprintf( '2010%02d%02d123456', $value, $value ) . "\n";
# format expectation and test it
$expected = sprintf( $format, $value );
public $functionHooks = array();
public $transparentHooks = array();
- //Fuzz test
+ // Fuzz test
public $maxFuzzTestLength = 300;
public $fuzzSeed = 0;
public $memoryLimit = 50;
parent::setUp();
- //Setup CLI arguments
+ // Setup CLI arguments
if ( $this->getCliArg( 'regex' ) ) {
$this->regex = $this->getCliArg( 'regex' );
} else {
function addDBData() {
$this->tablesUsed[] = 'site_stats';
# disabled for performance
- #$this->tablesUsed[] = 'image';
+ # $this->tablesUsed[] = 'image';
# Update certain things in site_stats
$this->db->insert( 'site_stats',
}
}
- //ParserTest setup/teardown functions
+ // ParserTest setup/teardown functions
/**
* Set up the global variables for a consistent environment for each test.
foreach ( $configLines as $line ) {
list( $var, $value ) = explode( '=', $line, 2 );
- $settings[$var] = eval( "return $value;" ); //???
+ $settings[$var] = eval( "return $value;" ); // ???
}
}
public function testParserTest( $desc, $input, $result, $opts, $config ) {
if ( $this->regex != '' && !preg_match( '/' . $this->regex . '/', $desc ) ) {
$this->assertTrue( true ); // XXX: don't flood output with "test made no assertions"
- //$this->markTestSkipped( 'Filtered out by the user' );
+ // $this->markTestSkipped( 'Filtered out by the user' );
return;
}
if ( $id % 100 == 0 ) {
$usage = intval( memory_get_usage( true ) / $this->memoryLimit / 1048576 * 100 );
- //echo "{$this->fuzzSeed}: $numSuccess/$numTotal (mem: $usage%)\n";
+ // echo "{$this->fuzzSeed}: $numSuccess/$numTotal (mem: $usage%)\n";
if ( $usage > 90 ) {
$ret = "Out of memory:\n";
$memStats = $this->getMemoryBreakdown();
}
}
- //Various getter functions
+ // Various getter functions
/**
* Get an input dictionary from a set of parser test files
return $parser;
}
- //Various action functions
+ // Various action functions
public function addArticle( $name, $text, $line ) {
self::$articles[$name] = array( $text, $line );
return isset( $wgParser->mTransparentTagHooks[$name] );
}
- //Various "cleanup" functions
+ // Various "cleanup" functions
/**
* Remove last character if it is a newline
}
}
- //Test options parser functions
+ // Test options parser functions
protected function parseOptions( $instring ) {
$opts = array();
public function provideMaxOfPolicies() {
return array(
array(
- array( 'MinimalPasswordLength' => 8 ), //p1
- array( 'MinimalPasswordLength' => 2 ), //p2
- array( 'MinimalPasswordLength' => 8 ), //max
+ array( 'MinimalPasswordLength' => 8 ), // p1
+ array( 'MinimalPasswordLength' => 2 ), // p2
+ array( 'MinimalPasswordLength' => 8 ), // max
'Basic max in p1'
),
array(
- array( 'MinimalPasswordLength' => 2 ), //p1
- array( 'MinimalPasswordLength' => 8 ), //p2
- array( 'MinimalPasswordLength' => 8 ), //max
+ array( 'MinimalPasswordLength' => 2 ), // p1
+ array( 'MinimalPasswordLength' => 8 ), // p2
+ array( 'MinimalPasswordLength' => 8 ), // max
'Basic max in p2'
),
array(
- array( 'MinimalPasswordLength' => 8 ), //p1
+ array( 'MinimalPasswordLength' => 8 ), // p1
array(
'MinimalPasswordLength' => 2,
'PasswordCannotMatchUsername' => 1,
- ), //p2
+ ), // p2
array(
'MinimalPasswordLength' => 8,
'PasswordCannotMatchUsername' => 1,
- ), //max
+ ), // max
'Missing items in p1'
),
array(
array(
'MinimalPasswordLength' => 8,
'PasswordCannotMatchUsername' => 1,
- ), //p1
+ ), // p1
array(
'MinimalPasswordLength' => 2,
- ), //p2
+ ), // p2
array(
'MinimalPasswordLength' => 8,
'PasswordCannotMatchUsername' => 1,
- ), //max
+ ), // max
'Missing items in p2'
),
);
array(
'class' => 'ResourceLoaderImageModule',
'selectorWithoutVariant' => '.mw-ui-icon-{name}:after, .mw-ui-icon-{name}:before',
- 'selectorWithVariant' => '.mw-ui-icon-{name}-{variant}:after, .mw-ui-icon-{name}-{variant}:before',
+ 'selectorWithVariant' =>
+ '.mw-ui-icon-{name}-{variant}:after, .mw-ui-icon-{name}-{variant}:before',
'variants' => self::$commonImageVariants,
'images' => self::$commonImageData,
),
* @covers ResourceLoaderImageModule::getStyles
*/
public function testGetStyles( $module, $expected ) {
- $module = new ResourceLoaderImageModuleTestable( $module, __DIR__ . '/../../data/resourceloader' );
+ $module = new ResourceLoaderImageModuleTestable(
+ $module,
+ __DIR__ . '/../../data/resourceloader'
+ );
$styles = $module->getStyles( $this->getResourceLoaderContext() );
$this->assertEquals( $expected, $styles['all'] );
}
protected function getTestImage( $name ) {
$options = ResourceLoaderImageModuleTest::$commonImageData[$name];
$fileDescriptor = is_string( $options ) ? $options : $options['file'];
- $allowedVariants = is_array( $options ) && isset( $options['variants'] ) ? $options['variants'] : array();
+ $allowedVariants = is_array( $options ) &&
+ isset( $options['variants'] ) ? $options['variants'] : array();
$variants = array_fill_keys( $allowedVariants, array( 'color' => 'red' ) );
- return new ResourceLoaderImageTestable( $name, 'test', $fileDescriptor, $this->imagesPath, $variants );
+ return new ResourceLoaderImageTestable(
+ $name,
+ 'test',
+ $fileDescriptor,
+ $this->imagesPath,
+ $variants
+ );
}
public static function provideGetPath() {
$data = file_get_contents( $this->imagesPath . '/remove.svg' );
$dataConstructive = file_get_contents( $this->imagesPath . '/remove_variantize.svg' );
$this->assertEquals( $image->getImageData( $context, null, 'original' ), $data );
- $this->assertEquals( $image->getImageData( $context, 'destructive', 'original' ), $dataConstructive );
+ $this->assertEquals(
+ $image->getImageData( $context, 'destructive', 'original' ),
+ $dataConstructive
+ );
// Stub, since we don't know if we even have a SVG handler, much less what exactly it'll output
$this->assertEquals( $image->getImageData( $context, null, 'rasterized' ), 'RASTERIZESTUB' );
) );
$this->assertEquals(
$module->getScript( $context ),
- 'mw.log.error("JavaScript parse error: Parse error: Unexpected token; token } expected in file \'input\' on line 3");',
+ 'mw.log.error(' .
+ '"JavaScript parse error: Parse error: Unexpected token; ' .
+ 'token } expected in file \'input\' on line 3"' .
+ ');',
'Replace invalid syntax with error logging'
);
array( $params, new HashConfig( array( 'UseSiteJs' => false ) + $settings ), array(
'MediaWiki:Common.css' => array( 'type' => 'style' ),
) ),
- array( $params, new HashConfig( array( 'UseSiteJs' => false, 'UseSiteCss' => false ) ), array() ),
+ array( $params,
+ new HashConfig(
+ array( 'UseSiteJs' => false, 'UseSiteCss' => false )
+ ),
+ array()
+ ),
);
}
$site = new MediaWikiSite();
$site->setGlobalId( 'enwiki' );
- //NOTE: this does not actually call out to the enwiki site to perform the normalization,
+ // NOTE: this does not actually call out to the enwiki site to perform the normalization,
// but uses a local Title object to do so. This is hardcoded on SiteLink::normalizePageTitle
// for the case that MW_PHPUNIT_TEST is set.
$this->assertEquals( 'Foo', $site->normalizePageName( ' foo ' ) );
}
public static function provideGetPageUrl() {
- //NOTE: the assumption that the URL is built by replacing $1
+ // NOTE: the assumption that the URL is built by replacing $1
// with the urlencoded version of $page
// is true for Site but not guaranteed for subclasses.
// Subclasses need to override this provider appropriately.
return array(
- array( #0
+ array( # 0
'http://acme.test/TestPath/$1',
'Foo',
'/TestPath/Foo',
),
- array( #1
+ array( # 1
'http://acme.test/TestScript?x=$1&y=bla',
'Foo',
'TestScript?x=Foo&y=bla',
),
- array( #2
+ array( # 2
'http://acme.test/TestPath/$1',
'foo & bar/xyzzy (quux-shmoox?)',
'/TestPath/foo%20%26%20bar%2Fxyzzy%20%28quux-shmoox%3F%29',
public function testGetPageUrl( $path, $page, $expected ) {
$site = new Site();
- //NOTE: the assumption that getPageUrl is based on getLinkPath
+ // NOTE: the assumption that getPageUrl is based on getLinkPath
// is true for Site but not guaranteed for subclasses.
// Subclasses need to override this test case appropriately.
$site->setLinkPath( $path );
$languageCodes = array(
'de',
'en',
- 'fa', //right-to-left
+ 'fa', // right-to-left
'nl',
'nn',
'no',
$this->rc->setContext( $context );
$formOptions = $this->rc->setup( null );
- # Filter out rc_timestamp conditions which depends on the test runtime
+ # Filter out rc_timestamp conditions which depends on the test runtime
# This condition is not needed as of march 2, 2011 -- hashar
# @todo FIXME: Find a way to generate the correct rc_timestamp
$queryConditions = array_filter(
'!<a .*href=".*?Foo_Bar.*?".*?>Foo Bar</a>!'
),
array(
- //NOTE: Linker doesn't include fragments in "broken" links
- //NOTE: once this no longer uses Linker, we will get "2" instead of "User" for the namespace.
+ // NOTE: Linker doesn't include fragments in "broken" links
+ // NOTE: once this no longer uses Linker, we will get "2" instead of "User" for the namespace.
new TitleValue( NS_USER, 'Hansi_Maier', 'stuff' ),
'Hansi Maier\'s Stuff',
'!<a .*href=".*?User:Hansi_Maier.*?>Hansi Maier\'s Stuff</a>!'
),
array(
- //NOTE: Linker doesn't include fragments in "broken" links
- //NOTE: once this no longer uses Linker, we will get "2" instead of "User" for the namespace.
+ // NOTE: Linker doesn't include fragments in "broken" links
+ // NOTE: once this no longer uses Linker, we will get "2" instead of "User" for the namespace.
new TitleValue( NS_USER, 'Hansi_Maier', 'stuff' ),
null,
'!<a .*href=".*?User:Hansi_Maier.*?>User:Hansi Maier#stuff</a>!'
}
public static function provideParseTitle() {
- //TODO: test capitalization and trimming
- //TODO: test unicode normalization
+ // TODO: test capitalization and trimming
+ // TODO: test unicode normalization
return array(
array( ' : Hansi_Maier _ ', NS_MAIN, 'en',
array( ' _ Foo __ Bar_ _', NS_MAIN, 'en',
new TitleValue( NS_MAIN, 'Foo_Bar' ) ),
- //NOTE: cases copied from TitleTest::testSecureAndSplit. Keep in sync.
+ // NOTE: cases copied from TitleTest::testSecureAndSplit. Keep in sync.
array( 'Sandbox', NS_MAIN, 'en', ),
array( 'A "B"', NS_MAIN, 'en', ),
array( 'A \'B\'', NS_MAIN, 'en', ),
}
public static function provideParseTitle_invalid() {
- //TODO: test unicode errors
+ // TODO: test unicode errors
return array(
array( '#' ),
array( '::1' ), // only valid in user namespace
array( 'User::x' ), // leading ":" in a user name is only valid of IPv6 addresses
- //NOTE: cases copied from TitleTest::testSecureAndSplit. Keep in sync.
+ // NOTE: cases copied from TitleTest::testSecureAndSplit. Keep in sync.
array( '' ),
array( ':' ),
array( '__ __' ),
// XML/HTML character entity references
// Note: Commented out because they are not marked invalid by the PHP test as
// Title::newFromText runs Sanitizer::decodeCharReferencesAndNormalize first.
- //array( 'A é B' ),
- //array( 'A é B' ),
- //array( 'A é B' ),
+ // array( 'A é B' ),
+ // array( 'A é B' ),
+ // array( 'A é B' ),
// Subject of NS_TALK does not roundtrip to NS_MAIN
array( 'Talk:File:Example.svg' ),
// Directory navigation
* @covers LanguageConverter::convertTo
*/
public function testConversionToCyrillic() {
- //A simple convertion of Latin to Cyrillic
+ // A simple convertion of Latin to Cyrillic
$this->assertEquals( 'абвг',
$this->convertToCyrillic( 'abvg' )
);
- //Same as above, but assert that -{}-s must be removed and not converted
+ // Same as above, but assert that -{}-s must be removed and not converted
$this->assertEquals( 'ljабnjвгdž',
$this->convertToCyrillic( '-{lj}-ab-{nj}-vg-{dž}-' )
);
- //A simple convertion of Cyrillic to Cyrillic
+ // A simple convertion of Cyrillic to Cyrillic
$this->assertEquals( 'абвг',
$this->convertToCyrillic( 'абвг' )
);
- //Same as above, but assert that -{}-s must be removed and not converted
+ // Same as above, but assert that -{}-s must be removed and not converted
$this->assertEquals( 'ljабnjвгdž',
$this->convertToCyrillic( '-{lj}-аб-{nj}-вг-{dž}-' )
);
- //This text has some Latin, but is recognized as Cyrillic, so it should not be converted
+ // This text has some Latin, but is recognized as Cyrillic, so it should not be converted
$this->assertEquals( 'abvgшђжчћ',
$this->convertToCyrillic( 'abvgшђжчћ' )
);
- //Same as above, but assert that -{}-s must be removed
+ // Same as above, but assert that -{}-s must be removed
$this->assertEquals( 'љabvgњшђжчћџ',
$this->convertToCyrillic( '-{љ}-abvg-{њ}-шђжчћ-{џ}-' )
);
- //This text has some Cyrillic, but is recognized as Latin, so it should be converted
+ // This text has some Cyrillic, but is recognized as Latin, so it should be converted
$this->assertEquals( 'абвгшђжчћ',
$this->convertToCyrillic( 'абвгšđžčć' )
);
- //Same as above, but assert that -{}-s must be removed and not converted
+ // Same as above, but assert that -{}-s must be removed and not converted
$this->assertEquals( 'ljабвгnjшђжчћdž',
$this->convertToCyrillic( '-{lj}-абвг-{nj}-šđžčć-{dž}-' )
);
* @covers LanguageConverter::convertTo
*/
public function testConversionToLatin() {
- //A simple convertion of Latin to Latin
+ // A simple convertion of Latin to Latin
$this->assertEquals( 'abcd',
$this->convertToLatin( 'abcd' )
);
- //A simple convertion of Cyrillic to Latin
+ // A simple convertion of Cyrillic to Latin
$this->assertEquals( 'abcd',
$this->convertToLatin( 'абцд' )
);
- //This text has some Latin, but is recognized as Cyrillic, so it should be converted
+ // This text has some Latin, but is recognized as Cyrillic, so it should be converted
$this->assertEquals( 'abcdšđžčć',
$this->convertToLatin( 'abcdшђжчћ' )
);
- //This text has some Cyrillic, but is recognized as Latin, so it should not be converted
+ // This text has some Cyrillic, but is recognized as Latin, so it should not be converted
$this->assertEquals( 'абцдšđžčć',
$this->convertToLatin( 'абцдšđžčć' )
);
);
}
- ##### HELPERS #####################################################
+ # #### HELPERS #####################################################
/**
*Wrapper to verify text stay the same after applying conversion
* @param string $text Text to convert
array( 'other', 121 ),
);
}
+
+ /**
+ * @dataProvider providerGrammar
+ * @covers Language::convertGrammar
+ */
+ public function testGrammar( $result, $word, $case ) {
+ $this->assertEquals( $result, $this->getLang()->convertGrammar( $word, $case ) );
+ }
+
+ public static function providerGrammar() {
+ return array(
+ array(
+ 'Вікіпедії',
+ 'Вікіпедія',
+ 'genitive',
+ ),
+ array(
+ 'Віківидів',
+ 'Віківиди',
+ 'genitive',
+ ),
+ array(
+ 'Вікіцитат',
+ 'Вікіцитати',
+ 'genitive',
+ ),
+ array(
+ 'Вікіпідручника',
+ 'Вікіпідручник',
+ 'genitive',
+ ),
+ array(
+ 'Вікіпедію',
+ 'Вікіпедія',
+ 'accusative',
+ ),
+ );
+ }
}
);
}
- ##### HELPERS #####################################################
+ # #### HELPERS #####################################################
/**
* Wrapper to verify text stay the same after applying conversion
* @param string $text Text to convert
// @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
$header = '<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.7/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.7/ http://www.mediawiki.org/xml/export-0.7.xsd" version="0.7" xml:lang="en">
<siteinfo>
- <sitename>wikisvn</sitename>
- <base>http://localhost/wiki-svn/index.php/Main_Page</base>
- <generator>MediaWiki 1.21alpha</generator>
- <case>first-letter</case>
- <namespaces>
- <namespace key="-2" case="first-letter">Media</namespace>
- <namespace key="-1" case="first-letter">Special</namespace>
- <namespace key="0" case="first-letter" />
- <namespace key="1" case="first-letter">Talk</namespace>
- <namespace key="2" case="first-letter">User</namespace>
- <namespace key="3" case="first-letter">User talk</namespace>
- <namespace key="4" case="first-letter">Wikisvn</namespace>
- <namespace key="5" case="first-letter">Wikisvn talk</namespace>
- <namespace key="6" case="first-letter">File</namespace>
- <namespace key="7" case="first-letter">File talk</namespace>
- <namespace key="8" case="first-letter">MediaWiki</namespace>
- <namespace key="9" case="first-letter">MediaWiki talk</namespace>
- <namespace key="10" case="first-letter">Template</namespace>
- <namespace key="11" case="first-letter">Template talk</namespace>
- <namespace key="12" case="first-letter">Help</namespace>
- <namespace key="13" case="first-letter">Help talk</namespace>
- <namespace key="14" case="first-letter">Category</namespace>
- <namespace key="15" case="first-letter">Category talk</namespace>
- </namespaces>
+ <sitename>wikisvn</sitename>
+ <base>http://localhost/wiki-svn/index.php/Main_Page</base>
+ <generator>MediaWiki 1.21alpha</generator>
+ <case>first-letter</case>
+ <namespaces>
+ <namespace key="-2" case="first-letter">Media</namespace>
+ <namespace key="-1" case="first-letter">Special</namespace>
+ <namespace key="0" case="first-letter" />
+ <namespace key="1" case="first-letter">Talk</namespace>
+ <namespace key="2" case="first-letter">User</namespace>
+ <namespace key="3" case="first-letter">User talk</namespace>
+ <namespace key="4" case="first-letter">Wikisvn</namespace>
+ <namespace key="5" case="first-letter">Wikisvn talk</namespace>
+ <namespace key="6" case="first-letter">File</namespace>
+ <namespace key="7" case="first-letter">File talk</namespace>
+ <namespace key="8" case="first-letter">MediaWiki</namespace>
+ <namespace key="9" case="first-letter">MediaWiki talk</namespace>
+ <namespace key="10" case="first-letter">Template</namespace>
+ <namespace key="11" case="first-letter">Template talk</namespace>
+ <namespace key="12" case="first-letter">Help</namespace>
+ <namespace key="13" case="first-letter">Help talk</namespace>
+ <namespace key="14" case="first-letter">Category</namespace>
+ <namespace key="15" case="first-letter">Category talk</namespace>
+ </namespaces>
</siteinfo>
';
// @codingStandardsIgnoreEnd
// Simple plain page
$available_pages[1] = ' <page>
- <title>BackupDumperTestP1</title>
- <ns>0</ns>
- <id>1</id>
- <revision>
- <id>1</id>
- <timestamp>2012-04-01T16:46:05Z</timestamp>
- <contributor>
- <ip>127.0.0.1</ip>
- </contributor>
- <comment>BackupDumperTestP1Summary1</comment>
- <sha1>0bolhl6ol7i6x0e7yq91gxgaan39j87</sha1>
- <text xml:space="preserve">BackupDumperTestP1Text1</text>
- <model name="wikitext">1</model>
- <format mime="text/x-wiki">1</format>
- </revision>
+ <title>BackupDumperTestP1</title>
+ <ns>0</ns>
+ <id>1</id>
+ <revision>
+ <id>1</id>
+ <timestamp>2012-04-01T16:46:05Z</timestamp>
+ <contributor>
+ <ip>127.0.0.1</ip>
+ </contributor>
+ <comment>BackupDumperTestP1Summary1</comment>
+ <sha1>0bolhl6ol7i6x0e7yq91gxgaan39j87</sha1>
+ <text xml:space="preserve">BackupDumperTestP1Text1</text>
+ <model name="wikitext">1</model>
+ <format mime="text/x-wiki">1</format>
+ </revision>
</page>
';
// Page with more than one revisions. Hole in rev ids.
$available_pages[2] = ' <page>
- <title>BackupDumperTestP2</title>
- <ns>0</ns>
- <id>2</id>
- <revision>
- <id>2</id>
- <timestamp>2012-04-01T16:46:05Z</timestamp>
- <contributor>
- <ip>127.0.0.1</ip>
- </contributor>
- <comment>BackupDumperTestP2Summary1</comment>
- <sha1>jprywrymfhysqllua29tj3sc7z39dl2</sha1>
- <text xml:space="preserve">BackupDumperTestP2Text1</text>
- <model name="wikitext">1</model>
- <format mime="text/x-wiki">1</format>
- </revision>
- <revision>
- <id>5</id>
- <parentid>2</parentid>
- <timestamp>2012-04-01T16:46:05Z</timestamp>
- <contributor>
- <ip>127.0.0.1</ip>
- </contributor>
- <comment>BackupDumperTestP2Summary4 extra</comment>
- <sha1>6o1ciaxa6pybnqprmungwofc4lv00wv</sha1>
- <text xml:space="preserve">BackupDumperTestP2Text4 some additional Text</text>
- <model name="wikitext">1</model>
- <format mime="text/x-wiki">1</format>
- </revision>
+ <title>BackupDumperTestP2</title>
+ <ns>0</ns>
+ <id>2</id>
+ <revision>
+ <id>2</id>
+ <timestamp>2012-04-01T16:46:05Z</timestamp>
+ <contributor>
+ <ip>127.0.0.1</ip>
+ </contributor>
+ <comment>BackupDumperTestP2Summary1</comment>
+ <sha1>jprywrymfhysqllua29tj3sc7z39dl2</sha1>
+ <text xml:space="preserve">BackupDumperTestP2Text1</text>
+ <model name="wikitext">1</model>
+ <format mime="text/x-wiki">1</format>
+ </revision>
+ <revision>
+ <id>5</id>
+ <parentid>2</parentid>
+ <timestamp>2012-04-01T16:46:05Z</timestamp>
+ <contributor>
+ <ip>127.0.0.1</ip>
+ </contributor>
+ <comment>BackupDumperTestP2Summary4 extra</comment>
+ <sha1>6o1ciaxa6pybnqprmungwofc4lv00wv</sha1>
+ <text xml:space="preserve">BackupDumperTestP2Text4 some additional Text</text>
+ <model name="wikitext">1</model>
+ <format mime="text/x-wiki">1</format>
+ </revision>
</page>
';
// Page with id higher than previous id + 1
$available_pages[4] = ' <page>
- <title>Talk:BackupDumperTestP1</title>
- <ns>1</ns>
- <id>4</id>
- <revision>
- <id>8</id>
- <timestamp>2012-04-01T16:46:05Z</timestamp>
- <contributor>
- <ip>127.0.0.1</ip>
- </contributor>
- <comment>Talk BackupDumperTestP1 Summary1</comment>
- <sha1>nktofwzd0tl192k3zfepmlzxoax1lpe</sha1>
- <model name="wikitext">1</model>
- <format mime="text/x-wiki">1</format>
- <text xml:space="preserve">Talk about BackupDumperTestP1 Text1</text>
- </revision>
+ <title>Talk:BackupDumperTestP1</title>
+ <ns>1</ns>
+ <id>4</id>
+ <revision>
+ <id>8</id>
+ <timestamp>2012-04-01T16:46:05Z</timestamp>
+ <contributor>
+ <ip>127.0.0.1</ip>
+ </contributor>
+ <comment>Talk BackupDumperTestP1 Summary1</comment>
+ <sha1>nktofwzd0tl192k3zfepmlzxoax1lpe</sha1>
+ <model name="wikitext">1</model>
+ <format mime="text/x-wiki">1</format>
+ <text xml:space="preserve">Talk about BackupDumperTestP1 Text1</text>
+ </revision>
</page>
';
. 'xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/ '
. 'http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10" xml:lang="en">
<siteinfo>
- <sitename>wikisvn</sitename>
- <base>http://localhost/wiki-svn/index.php/Main_Page</base>
- <generator>MediaWiki 1.21alpha</generator>
- <case>first-letter</case>
- <namespaces>
- <namespace key="-2" case="first-letter">Media</namespace>
- <namespace key="-1" case="first-letter">Special</namespace>
- <namespace key="0" case="first-letter" />
- <namespace key="1" case="first-letter">Talk</namespace>
- <namespace key="2" case="first-letter">User</namespace>
- <namespace key="3" case="first-letter">User talk</namespace>
- <namespace key="4" case="first-letter">Wikisvn</namespace>
- <namespace key="5" case="first-letter">Wikisvn talk</namespace>
- <namespace key="6" case="first-letter">File</namespace>
- <namespace key="7" case="first-letter">File talk</namespace>
- <namespace key="8" case="first-letter">MediaWiki</namespace>
- <namespace key="9" case="first-letter">MediaWiki talk</namespace>
- <namespace key="10" case="first-letter">Template</namespace>
- <namespace key="11" case="first-letter">Template talk</namespace>
- <namespace key="12" case="first-letter">Help</namespace>
- <namespace key="13" case="first-letter">Help talk</namespace>
- <namespace key="14" case="first-letter">Category</namespace>
- <namespace key="15" case="first-letter">Category talk</namespace>
- </namespaces>
+ <sitename>wikisvn</sitename>
+ <base>http://localhost/wiki-svn/index.php/Main_Page</base>
+ <generator>MediaWiki 1.21alpha</generator>
+ <case>first-letter</case>
+ <namespaces>
+ <namespace key="-2" case="first-letter">Media</namespace>
+ <namespace key="-1" case="first-letter">Special</namespace>
+ <namespace key="0" case="first-letter" />
+ <namespace key="1" case="first-letter">Talk</namespace>
+ <namespace key="2" case="first-letter">User</namespace>
+ <namespace key="3" case="first-letter">User talk</namespace>
+ <namespace key="4" case="first-letter">Wikisvn</namespace>
+ <namespace key="5" case="first-letter">Wikisvn talk</namespace>
+ <namespace key="6" case="first-letter">File</namespace>
+ <namespace key="7" case="first-letter">File talk</namespace>
+ <namespace key="8" case="first-letter">MediaWiki</namespace>
+ <namespace key="9" case="first-letter">MediaWiki talk</namespace>
+ <namespace key="10" case="first-letter">Template</namespace>
+ <namespace key="11" case="first-letter">Template talk</namespace>
+ <namespace key="12" case="first-letter">Help</namespace>
+ <namespace key="13" case="first-letter">Help talk</namespace>
+ <namespace key="14" case="first-letter">Category</namespace>
+ <namespace key="15" case="first-letter">Category talk</namespace>
+ </namespaces>
</siteinfo>
';
$tail = '</mediawiki>
for ( $i = 0; $i < $iterations; $i++ ) {
$page1 = ' <page>
- <title>BackupDumperTestP1</title>
- <ns>0</ns>
- <id>' . ( $this->pageId1 + $i * self::$numOfPages ) . '</id>
- <revision>
- <id>' . ( $this->revId1_1 + $i * self::$numOfRevs ) . '</id>
- <timestamp>2012-04-01T16:46:05Z</timestamp>
- <contributor>
- <ip>127.0.0.1</ip>
- </contributor>
- <comment>BackupDumperTestP1Summary1</comment>
- <model>wikitext</model>
- <format>text/x-wiki</format>
- <text id="' . $this->textId1_1 . '" bytes="23" />
- <sha1>0bolhl6ol7i6x0e7yq91gxgaan39j87</sha1>
- </revision>
+ <title>BackupDumperTestP1</title>
+ <ns>0</ns>
+ <id>' . ( $this->pageId1 + $i * self::$numOfPages ) . '</id>
+ <revision>
+ <id>' . ( $this->revId1_1 + $i * self::$numOfRevs ) . '</id>
+ <timestamp>2012-04-01T16:46:05Z</timestamp>
+ <contributor>
+ <ip>127.0.0.1</ip>
+ </contributor>
+ <comment>BackupDumperTestP1Summary1</comment>
+ <model>wikitext</model>
+ <format>text/x-wiki</format>
+ <text id="' . $this->textId1_1 . '" bytes="23" />
+ <sha1>0bolhl6ol7i6x0e7yq91gxgaan39j87</sha1>
+ </revision>
</page>
';
$page2 = ' <page>
- <title>BackupDumperTestP2</title>
- <ns>0</ns>
- <id>' . ( $this->pageId2 + $i * self::$numOfPages ) . '</id>
- <revision>
- <id>' . ( $this->revId2_1 + $i * self::$numOfRevs ) . '</id>
- <timestamp>2012-04-01T16:46:05Z</timestamp>
- <contributor>
- <ip>127.0.0.1</ip>
- </contributor>
- <comment>BackupDumperTestP2Summary1</comment>
- <model>wikitext</model>
- <format>text/x-wiki</format>
- <text id="' . $this->textId2_1 . '" bytes="23" />
- <sha1>jprywrymfhysqllua29tj3sc7z39dl2</sha1>
- </revision>
- <revision>
- <id>' . ( $this->revId2_2 + $i * self::$numOfRevs ) . '</id>
- <parentid>' . ( $this->revId2_1 + $i * self::$numOfRevs ) . '</parentid>
- <timestamp>2012-04-01T16:46:05Z</timestamp>
- <contributor>
- <ip>127.0.0.1</ip>
- </contributor>
- <comment>BackupDumperTestP2Summary2</comment>
- <model>wikitext</model>
- <format>text/x-wiki</format>
- <text id="' . $this->textId2_2 . '" bytes="23" />
- <sha1>b7vj5ks32po5m1z1t1br4o7scdwwy95</sha1>
- </revision>
- <revision>
- <id>' . ( $this->revId2_3 + $i * self::$numOfRevs ) . '</id>
- <parentid>' . ( $this->revId2_2 + $i * self::$numOfRevs ) . '</parentid>
- <timestamp>2012-04-01T16:46:05Z</timestamp>
- <contributor>
- <ip>127.0.0.1</ip>
- </contributor>
- <comment>BackupDumperTestP2Summary3</comment>
- <model>wikitext</model>
- <format>text/x-wiki</format>
- <text id="' . $this->textId2_3 . '" bytes="23" />
- <sha1>jfunqmh1ssfb8rs43r19w98k28gg56r</sha1>
- </revision>
- <revision>
- <id>' . ( $this->revId2_4 + $i * self::$numOfRevs ) . '</id>
- <parentid>' . ( $this->revId2_3 + $i * self::$numOfRevs ) . '</parentid>
- <timestamp>2012-04-01T16:46:05Z</timestamp>
- <contributor>
- <ip>127.0.0.1</ip>
- </contributor>
- <comment>BackupDumperTestP2Summary4 extra</comment>
- <model>wikitext</model>
- <format>text/x-wiki</format>
- <text id="' . $this->textId2_4 . '" bytes="44" />
- <sha1>6o1ciaxa6pybnqprmungwofc4lv00wv</sha1>
- </revision>
+ <title>BackupDumperTestP2</title>
+ <ns>0</ns>
+ <id>' . ( $this->pageId2 + $i * self::$numOfPages ) . '</id>
+ <revision>
+ <id>' . ( $this->revId2_1 + $i * self::$numOfRevs ) . '</id>
+ <timestamp>2012-04-01T16:46:05Z</timestamp>
+ <contributor>
+ <ip>127.0.0.1</ip>
+ </contributor>
+ <comment>BackupDumperTestP2Summary1</comment>
+ <model>wikitext</model>
+ <format>text/x-wiki</format>
+ <text id="' . $this->textId2_1 . '" bytes="23" />
+ <sha1>jprywrymfhysqllua29tj3sc7z39dl2</sha1>
+ </revision>
+ <revision>
+ <id>' . ( $this->revId2_2 + $i * self::$numOfRevs ) . '</id>
+ <parentid>' . ( $this->revId2_1 + $i * self::$numOfRevs ) . '</parentid>
+ <timestamp>2012-04-01T16:46:05Z</timestamp>
+ <contributor>
+ <ip>127.0.0.1</ip>
+ </contributor>
+ <comment>BackupDumperTestP2Summary2</comment>
+ <model>wikitext</model>
+ <format>text/x-wiki</format>
+ <text id="' . $this->textId2_2 . '" bytes="23" />
+ <sha1>b7vj5ks32po5m1z1t1br4o7scdwwy95</sha1>
+ </revision>
+ <revision>
+ <id>' . ( $this->revId2_3 + $i * self::$numOfRevs ) . '</id>
+ <parentid>' . ( $this->revId2_2 + $i * self::$numOfRevs ) . '</parentid>
+ <timestamp>2012-04-01T16:46:05Z</timestamp>
+ <contributor>
+ <ip>127.0.0.1</ip>
+ </contributor>
+ <comment>BackupDumperTestP2Summary3</comment>
+ <model>wikitext</model>
+ <format>text/x-wiki</format>
+ <text id="' . $this->textId2_3 . '" bytes="23" />
+ <sha1>jfunqmh1ssfb8rs43r19w98k28gg56r</sha1>
+ </revision>
+ <revision>
+ <id>' . ( $this->revId2_4 + $i * self::$numOfRevs ) . '</id>
+ <parentid>' . ( $this->revId2_3 + $i * self::$numOfRevs ) . '</parentid>
+ <timestamp>2012-04-01T16:46:05Z</timestamp>
+ <contributor>
+ <ip>127.0.0.1</ip>
+ </contributor>
+ <comment>BackupDumperTestP2Summary4 extra</comment>
+ <model>wikitext</model>
+ <format>text/x-wiki</format>
+ <text id="' . $this->textId2_4 . '" bytes="44" />
+ <sha1>6o1ciaxa6pybnqprmungwofc4lv00wv</sha1>
+ </revision>
</page>
';
// page 3 not in stub
$page4 = ' <page>
- <title>Talk:BackupDumperTestP1</title>
- <ns>1</ns>
- <id>' . ( $this->pageId4 + $i * self::$numOfPages ) . '</id>
- <revision>
- <id>' . ( $this->revId4_1 + $i * self::$numOfRevs ) . '</id>
- <timestamp>2012-04-01T16:46:05Z</timestamp>
- <contributor>
- <ip>127.0.0.1</ip>
- </contributor>
- <comment>Talk BackupDumperTestP1 Summary1</comment>
- <model>BackupTextPassTestModel</model>
- <format>text/plain</format>
- <text id="' . $this->textId4_1 . '" bytes="35" />
- <sha1>nktofwzd0tl192k3zfepmlzxoax1lpe</sha1>
- </revision>
+ <title>Talk:BackupDumperTestP1</title>
+ <ns>1</ns>
+ <id>' . ( $this->pageId4 + $i * self::$numOfPages ) . '</id>
+ <revision>
+ <id>' . ( $this->revId4_1 + $i * self::$numOfRevs ) . '</id>
+ <timestamp>2012-04-01T16:46:05Z</timestamp>
+ <contributor>
+ <ip>127.0.0.1</ip>
+ </contributor>
+ <comment>Talk BackupDumperTestP1 Summary1</comment>
+ <model>BackupTextPassTestModel</model>
+ <format>text/plain</format>
+ <text id="' . $this->textId4_1 . '" bytes="35" />
+ <sha1>nktofwzd0tl192k3zfepmlzxoax1lpe</sha1>
+ </revision>
</page>
';
$content .= $page1 . $page2 . $page4;
# Make sure we have --configuration or PHPUnit might complain
if ( !in_array( '--configuration', $_SERVER['argv'] ) ) {
- //Hack to eliminate the need to use the Makefile (which sucks ATM)
+ // Hack to eliminate the need to use the Makefile (which sucks ATM)
array_splice( $_SERVER['argv'], 1, 0,
array( '--configuration', $IP . '/tests/phpunit/suite.xml' ) );
}
word: 'Wikipedia',
grammarForm: 'תחילית',
expected: '־Wikipedia',
- description: 'GAdd a hyphen (maqaf) before non-Hebrew letters'
+ description: 'Add a hyphen (maqaf) before non-Hebrew letters'
},
{
word: '1995',
],
uk: [
- {
- word: 'тесть',
- grammarForm: 'genitive',
- expected: 'тестя',
- description: 'Grammar test for genitive case'
- },
{
word: 'Вікіпедія',
grammarForm: 'genitive',
description: 'Grammar test for genitive case'
},
{
- word: 'установка',
- grammarForm: 'genitive',
- expected: 'установки',
- description: 'Grammar test for genitive case'
- },
- {
- word: 'похоти',
+ word: 'Віківиди',
grammarForm: 'genitive',
- expected: 'поÑ\85оÑ\82ей',
+ expected: 'Ð\92Ñ\96кÑ\96видÑ\96в',
description: 'Grammar test for genitive case'
},
{
- word: 'доводÑ\8b',
+ word: 'Ð\92Ñ\96кÑ\96Ñ\86иÑ\82аÑ\82и',
grammarForm: 'genitive',
- expected: 'доводов',
+ expected: 'Ð\92Ñ\96кÑ\96Ñ\86иÑ\82аÑ\82',
description: 'Grammar test for genitive case'
},
{
- word: 'пеÑ\81Ñ\87аник',
+ word: 'Ð\92Ñ\96кÑ\96пÑ\96дÑ\80Ñ\83Ñ\87ник',
grammarForm: 'genitive',
- expected: 'пеÑ\81Ñ\87аника',
+ expected: 'Ð\92Ñ\96кÑ\96пÑ\96дÑ\80Ñ\83Ñ\87ника',
description: 'Grammar test for genitive case'
},
{
$this->sectionData['config'] = '';
}
- $isDisabled = preg_match( '/\\bdisabled\\b/i', $this->sectionData['options'] ) && !$this->parserTest->runDisabled;
- $isParsoidOnly = preg_match( '/\\bparsoid\\b/i', $this->sectionData['options'] ) && $result == 'html' && !$this->parserTest->runParsoid;
+ $isDisabled = preg_match( '/\\bdisabled\\b/i', $this->sectionData['options'] ) &&
+ !$this->parserTest->runDisabled;
+ $isParsoidOnly = preg_match( '/\\bparsoid\\b/i', $this->sectionData['options'] ) &&
+ $result == 'html' &&
+ !$this->parserTest->runParsoid;
$isFiltered = !preg_match( "/" . $this->parserTest->regex . "/i", $this->sectionData['test'] );
if ( $input == false || $result == false || $isDisabled || $isParsoidOnly || $isFiltered ) {
# disabled test
$mediawiki = new MediaWiki();
$mediawiki->doPostOutputShutdown( 'fast' );
-//--------------------------------------------------------------------------
+// --------------------------------------------------------------------------
/**
* Handle a thumbnail request via thumbnail file URL
try {
$thumbName = $img->thumbName( $params );
if ( !strlen( $thumbName ) ) { // invalid params?
- throw new MediaTransformInvalidParametersException( 'Empty return from File::thumbName' );
+ throw new MediaTransformInvalidParametersException(
+ 'Empty return from File::thumbName'
+ );
}
$thumbName2 = $img->thumbName( $params, File::THUMB_FULL_NAME ); // b/c; "long" style
} catch ( MediaTransformInvalidParametersException $e ) {
- wfThumbError( 400, 'The specified thumbnail parameters are not valid: ' . $e->getMessage() );
+ wfThumbError(
+ 400,
+ 'The specified thumbnail parameters are not valid: ' . $e->getMessage()
+ );
return;
} catch ( MWException $e ) {
wfThumbError( 500, $e->getHTML() );
$dispositionType = isset( $params['download'] ) ? 'attachment' : 'inline';
// Suggest a good name for users downloading this thumbnail
- $headers[] = "Content-Disposition: {$img->getThumbDisposition( $thumbName, $dispositionType )}";
+ $headers[] =
+ "Content-Disposition: {$img->getThumbDisposition( $thumbName, $dispositionType )}";
if ( count( $varyHeader ) ) {
$headers[] = 'Vary: ' . implode( ', ', $varyHeader );
$errorCode = 500;
if ( !$thumb ) {
$errorMsg = $errorMsg ?: $msg->rawParams( 'File::transform() returned false' )->escaped();
- if ( $errorMsg instanceof MessageSpecifier && $errorMsg->getKey() === 'thumbnail_image-failure-limit' ) {
+ if ( $errorMsg instanceof MessageSpecifier &&
+ $errorMsg->getKey() === 'thumbnail_image-failure-limit'
+ ) {
$errorCode = 429;
}
} elseif ( $thumb->isError() ) {
} elseif ( !$thumb->hasFile() ) {
$errorMsg = $msg->rawParams( 'No path supplied in thumbnail object' )->escaped();
} elseif ( $thumb->fileIsSource() ) {
- $errorMsg = $msg->
- rawParams( 'Image was not scaled, is the requested width bigger than the source?' )->escaped();
+ $errorMsg = $msg
+ ->rawParams( 'Image was not scaled, is the requested width bigger than the source?' )
+ ->escaped();
$errorCode = 400;
}
}
if ( $wgShowHostnames ) {
header( 'X-MW-Thumbnail-Renderer: ' . wfHostname() );
- $url = htmlspecialchars( isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : '' );
+ $url = htmlspecialchars(
+ isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : ''
+ );
$hostname = htmlspecialchars( wfHostname() );
$debug = "<!-- $url -->\n<!-- $hostname -->\n";
} else {