* $wgBug34832TransitionalRollback has been removed.
* (bug 29472) $wgUseDynamicDates has been removed and its functionality
disabled.
-* $wgVectorUseIconWatch is now enabled by default.
=== New features in 1.21 ===
* (bug 38110) Schema changes (adding or dropping tables, indices and
* (bug 45526) Add QUnit assertion helper "QUnit.assert.htmlEqual" for asserting
structual equality of HTML (ignoring insignificant differences like
quotmarks, order and whitespace in the attribute list).
-* (bug 23393) HTML <hN> headings containing line breaks are now handled
- correctly.
-* (bug 45803) Whitespace within == Headline == syntax and within <hN> headings
- is now non-significant and not preserved in the HTML output.
-* (bug 23343) Implemented ability to apply IP blocks to the contents of X-Forwarded-For headers
- by adding a new configuration variable $wgApplyIpBlocksToXff (disabled by default).
=== Bug fixes in 1.21 ===
+* (bug 42649) PHP Fatal error: Call to a member function isLocal() on a
+ non-object in Title.php
+* (bug 46493) Special:ProtectedPages results in whitepage when a bad title is protected
* (bug 40617) Installer can now customize the logo in LocalSettings.php
* (bug 40353) SpecialDoubleRedirect should support interwiki redirects.
* (bug 40352) fixDoubleRedirects.php should support interwiki redirects.
* (bug 33304) list=allpages will now find really old indefinite protections.
* (bug 45937) meta=allmessages will report a syntactically invalid lang as a
proper error instead of as an uncaught exception.
-* (bug 25325) added support for wlshow filtering (bots/anon/minor/patrolled)
- to action=feedwatchlist
-* WDDX formatted output will actually be formatted (and normal output will no
- longer be), and will no longer choke on booleans.
* The JSON output formatter now leaves forward slashes unescaped to improve human
readability of URLs and similar strings. Also, a "utf8" option is now provided
to use UTF-8 encoding instead of hex escape codes for most non-ASCII characters.
-* action=opensearch no longer silently ignores the format parameter.
-* action=opensearch now supports format=jsonfm.
=== API internal changes in 1.21 ===
* For debugging only, a new global $wgDebugAPI removes many API restrictions when true.
- ShowStats -> ShowSiteStats.
* BREAKING CHANGE: (bug 38244) Removed the mediawiki.api.titleblacklist module
and moved it to the TitleBlacklist extension.
-* The Special:ActiveUsers special page was removed.
* BREAKING CHANGE: Implementation of MediaWiki's JS and JSON value encoding
has changed:
** MediaWiki no longer supports PHP installations in which the native JSON
function, which is now deprecated).
* BREAKING CHANGE: The Services_JSON class has been removed. If necessary,
be sure to upgrade affected extensions at the same time (e.g. Collection).
-* Calling Linker methods using a skin will now output deprecation warnings.
-* Pages with a returnto (such as the page when you login or logout), no
- longer have a rel="next" link tag.
== Compatibility ==
* $wgRedirectScript was removed. It was unused.
* Removed $wgLocalMessageCacheSerialized, it is now always true.
* When $wgUseVFormUserLogin is true, the redesign of Special:UserLogin is
- activated.
+ activated; when $wgUseVFormCreateAccount is true, the redesign of
+ Special:UserLogin/signup is activated.
+* $wgVectorUseIconWatch is now enabled by default.
=== New features in 1.22 ===
* (bug 44525) mediawiki.jqueryMsg can now parse (whitelisted) HTML elements and attributes.
preference). This feature was moved from the Vector extension, and is now part
of core for all skins. Take care when upgrading that you don't use an older
version of the Vector extension as this feature may conflict.
-* New version of Special:UserLogin form. It is opt-in for now, controlled by
- the $wgUseVFormUserLogin setting or a 'useNew' URL parameter trigger.
+* New 'mediawiki.ui' CSS module providing mw-ui-* styles for buttons and a
+ compact vertical form layout.
+* New versions of login (Special:UserLogin) and create account
+ (Special:UserLogin/signup) forms. They are opt-in for now, controlled by
+ the $wgUseVFormUserLogin and $wgUseVFormCreateAccount settings or a 'useNew'
+ URL parameter trigger.
+* (bug 23343) Implemented ability to apply IP blocks to the contents of X-Forwarded-For headers
+ by adding a new configuration variable $wgApplyIpBlocksToXff (disabled by default).
+* The new hook 'APIGetPossibleErrors' to modify the list of possible errors was
+ added.
+* (bug 25592) LogEventsList::showLogExtract() will now ignore various
+ Pager-related WebRequest parameters by default, as this is overwhelmingly
+ likely to be what was intended by users of the method. If any caller wishes
+ to use these parameters, the new param 'useRequestParams' may be set to true.
+* mw.util.addPortletLink: Tooltip is no longer required to be plain (without
+ an accesskey in it already). As such it now rountrips. Creating a link with a
+ message as tooltip, grabbing the title attribute and using it to create
+ another portlet will work as expected.
+* (bug 6747) {{ROOTPAGENAME}} introduced, contains the name of the topmost
+ page without namespace.
=== Bug fixes in 1.22 ===
* Disable Special:PasswordReset when $wgEnableEmail. Previously one could still
navigate to the page by entering the URL directly.
* (bug 47138) Fixed a fatal error when a blocked user tries to automatically
create an account on login due external authentication in some circumstances.
+* (bug 23393) HTML <hN> headings containing line breaks are now handled
+ correctly.
+* (bug 45803) Whitespace within == Headline == syntax and within <hN> headings
+ is now non-significant and not preserved in the HTML output.
+* (bug 47218) Special:BlockList now handles correctly user names with spaces
+ when passed as subpage.
+* Pager's properly validate which fields are allowed to be sorted on.
+* mw.util.tooltipAccessKeyRegexp: The regex now matches "option-" as well.
+ Support for Mac "option" was added in 1.16, but the regex was never updated.
+* (bug 46768) Usernames of blocking users now display correctly, even if numeric.
=== API changes in 1.22 ===
* (bug 46626) xmldoublequote parameter was removed. Because of a bug, the
parameter has had no effect since MediaWiki 1.16, and so its removal is
unlikely to impact existing clients.
+* (bug 25325) Added support for wlshow filtering (bots/anon/minor/patrolled)
+ to action=feedwatchlist.
+* WDDX formatted output will actually be formatted (and normal output will no
+ longer be), and will no longer choke on booleans.
+* action=opensearch no longer silently ignores the format parameter.
+* action=opensearch now supports format=jsonfm.
+* list=usercontribs&ucprop=ids will now include the parent revision id.
=== Languages updated in 1.22===
throughout the code base have been removed.
* Externaledit/externaldiff preference was removed. Very few users used this
feature, and improper configuration can actually prevent a user from editing
+* Calling Linker methods using a skin will now output deprecation warnings.
+* (bug 46680) "Return to" links are no longer tagged with rel="next".
+* The Special:ActiveUsers special page was removed.
+* BREAKING CHANGE: mw.util.tooltipAccessKeyRegexp: The match group for the
+ accesskey character is now $6 instead of $5.
== Compatibility ==
&$module: ApiBase Module object
&$properties: Array of properties
+'APIGetPossibleErrors': Use this hook to modify the module's list of possible
+errors.
+$module: ApiBase Module object
+&$possibleErrors: Array of possible errors
+
'APIQueryAfterExecute': After calling the execute() method of an
action=query submodule. Use this to extend core API modules.
&$module: Module object
'ArticleEditUpdateNewTalk': Before updating user_newtalk when a user talk page
was changed.
-$wikiPage: WikiPage (object) of the user talk page
+&$wikiPage: WikiPage (object) of the user talk page
+$recipient: User (object) who's talk page was edited
'ArticleEditUpdates': When edit updates (mainly link tracking) are made when an
article has been changed.
$url: string value as output (out parameter, can modify)
$query: query options passed to Title::getFullURL()
+'GetHumanTimestamp': Pre-emptively override the human-readable timestamp generated
+by MWTimestamp::getHumanTimestamp(). Return false in this hook to use the custom
+output.
+&$output: string for the output timestamp
+$timestamp: MWTimestamp object of the current (user-adjusted) timestamp
+$relativeTo: MWTimestamp object of the relative (user-adjusted) timestamp
+$user: User whose preferences are being used to make timestamp
+$lang: Language that will be used to render the timestamp
+
'GetInternalURL': Modify fully-qualified URLs used for squid cache purging.
$title: Title object of page
$url: string value as output (out parameter, can modify)
wfDebug( __METHOD__ . ": showing CSS/JS source\n" );
$this->showCssOrJsPage();
$outputDone = true;
- } elseif( !wfRunHooks( 'ArticleContentViewCustom',
+ } elseif ( !wfRunHooks( 'ArticleContentViewCustom',
array( $this->fetchContentObject(), $this->getTitle(), $outputPage ) ) ) {
# Allow extensions do their own custom view for certain pages
$outputDone = true;
- } elseif( !ContentHandler::runLegacyHooks( 'ArticleViewCustom',
+ } elseif ( !ContentHandler::runLegacyHooks( 'ArticleViewCustom',
array( $this->fetchContentObject(), $this->getTitle(), $outputPage ) ) ) {
# Allow extensions do their own custom view for certain pages
}
if ( Block::newFromTarget( $specificTarget, $vagueTarget ) instanceof Block ) {
return array(
- 'index' => 'noindex',
+ 'index' => 'noindex',
'follow' => 'nofollow'
);
}
if ( $this->mPage->getID() === 0 || $this->getOldID() ) {
# Non-articles (special pages etc), and old revisions
return array(
- 'index' => 'noindex',
+ 'index' => 'noindex',
'follow' => 'nofollow'
);
} elseif ( $this->getContext()->getOutput()->isPrintable() ) {
# Discourage indexing of printable versions, but encourage following
return array(
- 'index' => 'noindex',
+ 'index' => 'noindex',
'follow' => 'follow'
);
} elseif ( $this->getContext()->getRequest()->getInt( 'curid' ) ) {
# For ?curid=x urls, disallow indexing
return array(
- 'index' => 'noindex',
+ 'index' => 'noindex',
'follow' => 'follow'
);
}
'ConfEditorToken' => 'includes/ConfEditor.php',
'Cookie' => 'includes/Cookie.php',
'CookieJar' => 'includes/Cookie.php',
- 'MWCryptRand' => 'includes/CryptRand.php',
'CurlHttpRequest' => 'includes/HttpFunctions.php',
'DeferrableUpdate' => 'includes/DeferredUpdates.php',
'DeferredUpdates' => 'includes/DeferredUpdates.php',
'EnhancedChangesList' => 'includes/ChangesList.php',
'ErrorPageError' => 'includes/Exception.php',
'ExplodeIterator' => 'includes/StringUtils.php',
- 'ExternalStore' => 'includes/externalstore/ExternalStore.php',
- 'ExternalStoreDB' => 'includes/externalstore/ExternalStoreDB.php',
- 'ExternalStoreHttp' => 'includes/externalstore/ExternalStoreHttp.php',
- 'ExternalStoreMedium' => 'includes/externalstore/ExternalStoreMedium.php',
- 'ExternalStoreMwstore' => 'includes/externalstore/ExternalStoreMwstore.php',
'FakeTitle' => 'includes/FakeTitle.php',
'Fallback' => 'includes/Fallback.php',
'FatalError' => 'includes/Exception.php',
'FormOptions' => 'includes/FormOptions.php',
'FormSpecialPage' => 'includes/SpecialPage.php',
'GitInfo' => 'includes/GitInfo.php',
+ 'HashRing' => 'includes/HashRing.php',
'HashtableReplacer' => 'includes/StringUtils.php',
'HistoryBlob' => 'includes/HistoryBlob.php',
'HistoryBlobCurStub' => 'includes/HistoryBlob.php',
'Hooks' => 'includes/Hooks.php',
'Html' => 'includes/Html.php',
'HTMLApiField' => 'includes/HTMLForm.php',
+ 'HTMLButtonField' => 'includes/HTMLForm.php',
'HTMLCheckField' => 'includes/HTMLForm.php',
'HTMLCheckMatrix' => 'includes/HTMLForm.php',
'HTMLEditTools' => 'includes/HTMLForm.php',
'Message' => 'includes/Message.php',
'MessageBlobStore' => 'includes/MessageBlobStore.php',
'MimeMagic' => 'includes/MimeMagic.php',
+ 'MWCryptRand' => 'includes/MWCryptRand.php',
'MWException' => 'includes/Exception.php',
'MWExceptionHandler' => 'includes/Exception.php',
'MWFunction' => 'includes/MWFunction.php',
'WikiDiff3' => 'includes/diff/WikiDiff3.php',
'WordLevelDiff' => 'includes/diff/DairikiDiff.php',
+ # includes/externalstore
+ 'ExternalStore' => 'includes/externalstore/ExternalStore.php',
+ 'ExternalStoreDB' => 'includes/externalstore/ExternalStoreDB.php',
+ 'ExternalStoreHttp' => 'includes/externalstore/ExternalStoreHttp.php',
+ 'ExternalStoreMedium' => 'includes/externalstore/ExternalStoreMedium.php',
+ 'ExternalStoreMwstore' => 'includes/externalstore/ExternalStoreMwstore.php',
+
# includes/filebackend
'FileBackendGroup' => 'includes/filebackend/FileBackendGroup.php',
'FileBackend' => 'includes/filebackend/FileBackend.php',
'QuorumLockManager' => 'includes/filebackend/lockmanager/QuorumLockManager.php',
'MySqlLockManager' => 'includes/filebackend/lockmanager/DBLockManager.php',
'PostgreSqlLockManager' => 'includes/filebackend/lockmanager/DBLockManager.php',
+ 'RedisLockManager' => 'includes/filebackend/lockmanager/RedisLockManager.php',
'NullLockManager' => 'includes/filebackend/lockmanager/LockManager.php',
'FileOp' => 'includes/filebackend/FileOp.php',
'FileOpBatch' => 'includes/filebackend/FileOpBatch.php',
'JobQueueAggregatorRedis' => 'includes/job/JobQueueAggregatorRedis.php',
'JobQueueDB' => 'includes/job/JobQueueDB.php',
'JobQueueGroup' => 'includes/job/JobQueueGroup.php',
+ 'JobQueueFederated' => 'includes/job/JobQueueFederated.php',
'JobQueueRedis' => 'includes/job/JobQueueRedis.php',
# includes/job/jobs
'UserloginTemplate' => 'includes/templates/Userlogin.php',
'UserloginTemplateVForm' => 'includes/templates/UserloginVForm.php',
'UsercreateTemplate' => 'includes/templates/Usercreate.php',
+ 'UsercreateTemplateVForm' => 'includes/templates/UsercreateVForm.php',
# includes/upload
'UploadBase' => 'includes/upload/UploadBase.php',
$timestamp = 0, $auto = 0, $expiry = '', $anonOnly = 0, $createAccount = 0, $enableAutoblock = 0,
$hideName = 0, $blockEmail = 0, $allowUsertalk = 0, $byText = '' )
{
- if( $timestamp === 0 ) {
+ if ( $timestamp === 0 ) {
$timestamp = wfTimestampNow();
}
- if( count( func_get_args() ) > 0 ) {
+ if ( count( func_get_args() ) > 0 ) {
# Soon... :D
# wfDeprecated( __METHOD__ . " with arguments" );
}
*/
public function load( $address = '', $user = 0 ) {
wfDeprecated( __METHOD__, '1.18' );
- if( $user ) {
+ if ( $user ) {
$username = User::whoIs( $user );
$block = self::newFromTarget( $username, $address );
} else {
$block = self::newFromTarget( null, $address );
}
- if( $block instanceof Block ) {
+ if ( $block instanceof Block ) {
# This is mildly evil, but hey, it's B/C :D
- foreach( $block as $variable => $value ) {
+ foreach ( $block as $variable => $value ) {
$this->$variable = $value;
}
return true;
protected function newLoad( $vagueTarget = null ) {
$db = wfGetDB( $this->mFromMaster ? DB_MASTER : DB_SLAVE );
- if( $this->type !== null ) {
+ if ( $this->type !== null ) {
$conds = array(
'ipb_address' => array( (string)$this->target ),
);
# Be aware that the != '' check is explicit, since empty values will be
# passed by some callers (bug 29116)
- if( $vagueTarget != '' ) {
+ if ( $vagueTarget != '' ) {
list( $target, $type ) = self::parseTarget( $vagueTarget );
switch( $type ) {
case self::TYPE_USER:
# This is begging for $this = $bestBlock, but that's not allowed in PHP :(
$bestBlockPreventsEdit = null;
- foreach( $res as $row ) {
+ foreach ( $res as $row ) {
$block = self::newFromRow( $row );
# Don't use expired blocks
- if( $block->deleteIfExpired() ) {
+ if ( $block->deleteIfExpired() ) {
continue;
}
# Don't use anon only blocks on users
- if( $this->type == self::TYPE_USER && !$block->isHardblock() ) {
+ if ( $this->type == self::TYPE_USER && !$block->isHardblock() ) {
continue;
}
- if( $block->getType() == self::TYPE_RANGE ) {
+ if ( $block->getType() == self::TYPE_RANGE ) {
# This is the number of bits that are allowed to vary in the block, give
# or take some floating point errors
$end = wfBaseconvert( $block->getRangeEnd(), 16, 10 );
$score = $block->getType();
}
- if( $score < $bestBlockScore ) {
+ if ( $score < $bestBlockScore ) {
$bestBlockScore = $score;
$bestRow = $row;
$bestBlockPreventsEdit = $block->prevents( 'edit' );
}
}
- if( $bestRow !== null ) {
+ if ( $bestRow !== null ) {
$this->initFromRow( $bestRow );
$this->prevents( 'edit', $bestBlockPreventsEdit );
return true;
global $wgPutIPinRC;
// No IPs are in recentchanges table, so nothing to select
- if( !$wgPutIPinRC ) {
+ if ( !$wgPutIPinRC ) {
return;
}
foreach ( $res as $row ) {
if ( $row->rc_ip ) {
$id = $block->doAutoblock( $row->rc_ip );
- if ( $id ) $blockIds[] = $id;
+ if ( $id ) {
+ $blockIds[] = $id;
+ }
}
}
}
* Purge expired blocks from the ipblocks table
*/
public static function purgeExpired() {
- if ( !wfReadOnly() ) {
- $dbw = wfGetDB( DB_MASTER );
- $dbw->delete( 'ipblocks',
- array( 'ipb_expiry < ' . $dbw->addQuotes( $dbw->timestamp() ) ), __METHOD__ );
+ if ( wfReadOnly() ) {
+ return;
}
+
+ $method = __METHOD__;
+ $dbw = wfGetDB( DB_MASTER );
+ $dbw->onTransactionIdle( function() use ( $dbw, $method ) {
+ $dbw->delete( 'ipblocks',
+ array( 'ipb_expiry < ' . $dbw->addQuotes( $dbw->timestamp() ) ), $method );
+ } );
}
/**
public static function newFromTarget( $specificTarget, $vagueTarget = null, $fromMaster = false ) {
list( $target, $type ) = self::parseTarget( $specificTarget );
- if( $type == Block::TYPE_ID || $type == Block::TYPE_AUTO ) {
+ if ( $type == Block::TYPE_ID || $type == Block::TYPE_AUTO ) {
return Block::newFromID( $target );
- } elseif( $target === null && $vagueTarget == '' ) {
+ } elseif ( $target === null && $vagueTarget == '' ) {
# We're not going to find anything useful here
# Be aware that the == '' check is explicit, since empty values will be
# passed by some callers (bug 29116)
return null;
- } elseif( in_array( $type, array( Block::TYPE_USER, Block::TYPE_IP, Block::TYPE_RANGE, null ) ) ) {
+ } elseif ( in_array( $type, array( Block::TYPE_USER, Block::TYPE_IP, Block::TYPE_RANGE, null ) ) ) {
$block = new Block();
$block->fromMaster( $fromMaster );
- if( $type !== null ) {
+ if ( $type !== null ) {
$block->setTarget( $target );
}
- if( $block->newLoad( $vagueTarget ) ) {
+ if ( $block->newLoad( $vagueTarget ) ) {
return $block;
}
}
*/
public static function parseTarget( $target ) {
# We may have been through this before
- if( $target instanceof User ) {
- if( IP::isValid( $target->getName() ) ) {
+ if ( $target instanceof User ) {
+ if ( IP::isValid( $target->getName() ) ) {
return array( $target, self::TYPE_IP );
} else {
return array( $target, self::TYPE_USER );
}
- } elseif( $target === null ) {
+ } elseif ( $target === null ) {
return array( null, null );
}
# Consider the possibility that this is not a username at all
# but actually an old subpage (bug #29797)
- if( strpos( $target, '/' ) !== false ) {
+ if ( strpos( $target, '/' ) !== false ) {
# An old subpage, drill down to the user behind it
$parts = explode( '/', $target );
$target = $parts[0];
public function setBlocker( $user ) {
$this->blocker = $user;
}
+
+ /**
+ * Get the key and parameters for the corresponding error message.
+ *
+ * @since 1.22
+ * @param IContextSource $context
+ * @return array
+ */
+ public function getPermissionsError( IContextSource $context ) {
+ $blocker = $this->getBlocker();
+ if ( $blocker instanceof User ) { // local user
+ $blockerUserpage = $blocker->getUserPage();
+ $link = "[[{$blockerUserpage->getPrefixedText()}|{$blockerUserpage->getText()}]]";
+ } else { // foreign user
+ $link = $blocker;
+ }
+
+ $reason = $this->mReason;
+ if ( $reason == '' ) {
+ $reason = $context->msg( 'blockednoreason' )->text();
+ }
+
+ /* $ip returns who *is* being blocked, $intended contains who was meant to be blocked.
+ * This could be a username, an IP range, or a single IP. */
+ $intended = $this->getTarget();
+
+ $lang = $context->getLanguage();
+ return array(
+ $this->mAuto ? 'autoblockedtext' : 'blockedtext',
+ $link,
+ $reason,
+ $context->getRequest()->getIP(),
+ $this->getByName(),
+ $this->getId(),
+ $lang->formatExpiry( $this->mExpiry ),
+ (string)$intended,
+ $lang->timeanddate( wfTimestamp( TS_MW, $this->mTimestamp ), true ),
+ );
+ }
}
}
function close() {
- if( isset( $this->handle ) ) {
+ if ( isset( $this->handle ) ) {
dba_close( $this->handle );
}
unset( $this->handle );
}
function close() {
- if( isset( $this->handle ) ) {
+ if ( isset( $this->handle ) ) {
dba_close( $this->handle );
}
if ( wfIsWindows() ) {
}
function close() {
- if( isset( $this->handle ) ) {
+ if ( isset( $this->handle ) ) {
fclose( $this->handle );
}
unset( $this->handle );
*/
public function close() {
$this->finish();
- if( isset( $this->handle ) ) {
+ if ( isset( $this->handle ) ) {
fclose( $this->handle );
}
if ( wfIsWindows() && file_exists( $this->realFileName ) ) {
$hp = $packedTables[$starts[$i] + $u];
$where = CdbFunctions::unsignedMod(
CdbFunctions::unsignedShiftRight( $hp['h'], 8 ), $len );
- while ( $hashtable[$where]['p'] )
- if ( ++$where == $len )
+ while ( $hashtable[$where]['p'] ) {
+ if ( ++$where == $len ) {
$where = 0;
+ }
+ }
$hashtable[$where] = $hp;
}
static function formatSummaryRow( $tags, $page ) {
global $wgLang;
- if( !$tags )
+ if ( !$tags ) {
return array( '', array() );
+ }
$classes = array();
$tags = explode( ',', $tags );
$displayTags = array();
- foreach( $tags as $tag ) {
+ foreach ( $tags as $tag ) {
$displayTags[] = Xml::tags(
'span',
array( 'class' => 'mw-tag-marker ' .
$tags = array_filter( $tags ); // Make sure we're submitting all tags...
- if( !$rc_id && !$rev_id && !$log_id ) {
+ if ( !$rc_id && !$rev_id && !$log_id ) {
throw new MWException( "At least one of: RCID, revision ID, and log ID MUST be specified when adding a tag to a change!" );
}
$dbr = wfGetDB( DB_SLAVE );
// Might as well look for rcids and so on.
- if( !$rc_id ) {
+ if ( !$rc_id ) {
$dbr = wfGetDB( DB_MASTER ); // Info might be out of date, somewhat fractionally, on slave.
- if( $log_id ) {
+ if ( $log_id ) {
$rc_id = $dbr->selectField( 'recentchanges', 'rc_id', array( 'rc_logid' => $log_id ), __METHOD__ );
- } elseif( $rev_id ) {
+ } elseif ( $rev_id ) {
$rc_id = $dbr->selectField( 'recentchanges', 'rc_id', array( 'rc_this_oldid' => $rev_id ), __METHOD__ );
}
- } elseif( !$log_id && !$rev_id ) {
+ } elseif ( !$log_id && !$rev_id ) {
$dbr = wfGetDB( DB_MASTER ); // Info might be out of date, somewhat fractionally, on slave.
$log_id = $dbr->selectField( 'recentchanges', 'rc_logid', array( 'rc_id' => $rc_id ), __METHOD__ );
$rev_id = $dbr->selectField( 'recentchanges', 'rc_this_oldid', array( 'rc_id' => $rc_id ), __METHOD__ );
// Insert the tags rows.
$tagsRows = array();
- foreach( $tags as $tag ) { // Filter so we don't insert NULLs as zero accidentally.
+ foreach ( $tags as $tag ) { // Filter so we don't insert NULLs as zero accidentally.
$tagsRows[] = array_filter(
array(
'ct_tag' => $tag,
&$join_conds, &$options, $filter_tag = false ) {
global $wgRequest, $wgUseTagFilter;
- if( $filter_tag === false ) {
+ if ( $filter_tag === false ) {
$filter_tag = $wgRequest->getVal( 'tagfilter' );
}
// Figure out which conditions can be done.
if ( in_array( 'recentchanges', $tables ) ) {
$join_cond = 'rc_id';
- } elseif( in_array( 'logging', $tables ) ) {
+ } elseif ( in_array( 'logging', $tables ) ) {
$join_cond = 'log_id';
} elseif ( in_array( 'revision', $tables ) ) {
$join_cond = 'rev_id';
$join_conds['tag_summary'] = array( 'LEFT JOIN', "ts_$join_cond=$join_cond" );
$fields[] = 'ts_tags';
- if( $wgUseTagFilter && $filter_tag ) {
+ if ( $wgUseTagFilter && $filter_tag ) {
// Somebody wants to filter on a tag.
// Add an INNER JOIN on change_tag
return false;
}
- if( !array_key_exists( $this->format, $wgFeedClasses ) ) {
+ if ( !array_key_exists( $this->format, $wgFeedClasses ) ) {
// falling back to atom
$this->format = 'atom';
}
* gets it quick too.
*/
$cachedFeed = $this->loadFromCache( $lastmod, $timekey, $key );
- if( is_string( $cachedFeed ) ) {
+ if ( is_string( $cachedFeed ) ) {
wfDebug( "RC: Outputting cached feed\n" );
$feed->httpHeaders();
echo $cachedFeed;
$feedLastmod = $messageMemc->get( $timekey );
- if( ( $wgFeedCacheTimeout > 0 ) && $feedLastmod ) {
+ if ( ( $wgFeedCacheTimeout > 0 ) && $feedLastmod ) {
/**
* If the cached feed was rendered very recently, we may
* go ahead and use it even if there have been edits made
$feedLastmodUnix = wfTimestamp( TS_UNIX, $feedLastmod );
$lastmodUnix = wfTimestamp( TS_UNIX, $lastmod );
- if( $feedAge < $wgFeedCacheTimeout || $feedLastmodUnix > $lastmodUnix ) {
+ if ( $feedAge < $wgFeedCacheTimeout || $feedLastmodUnix > $lastmodUnix ) {
wfDebug( "RC: loading feed from cache ($key; $feedLastmod; $lastmod)...\n" );
if ( $feedLastmodUnix < $lastmodUnix ) {
$wgOut->setLastModified( $feedLastmod ); // bug 21916
# Merge adjacent edits by one user
$sorted = array();
$n = 0;
- foreach( $rows as $obj ) {
- if( $n > 0 &&
+ foreach ( $rows as $obj ) {
+ if ( $n > 0 &&
$obj->rc_type == RC_EDIT &&
$obj->rc_namespace >= 0 &&
$obj->rc_cur_id == $sorted[$n - 1]->rc_cur_id &&
}
}
- foreach( $sorted as $obj ) {
+ foreach ( $sorted as $obj ) {
$title = Title::makeTitle( $obj->rc_namespace, $obj->rc_title );
$talkpage = MWNamespace::canTalk( $obj->rc_namespace ) ? $title->getTalkPage()->getFullURL() : '';
// Skip items with deleted content (avoids partially complete/inconsistent output)
- if( $obj->rc_deleted ) continue;
+ if ( $obj->rc_deleted ) {
+ continue;
+ }
if ( $obj->rc_this_oldid ) {
$url = $title->getFullURL(
$user = $context->getUser();
$sk = $context->getSkin();
$list = null;
- if( wfRunHooks( 'FetchChangesList', array( $user, &$sk, &$list ) ) ) {
+ if ( wfRunHooks( 'FetchChangesList', array( $user, &$sk, &$list ) ) ) {
$new = $context->getRequest()->getBool( 'enhanced', $user->getOption( 'usenewrc' ) );
return $new ? new EnhancedChangesList( $context ) : new OldChangesList( $context );
} else {
* they are called often, we call them once and save them in $this->message
*/
private function preCacheMessages() {
- if( !isset( $this->message ) ) {
- foreach ( explode( ' ', 'cur diff hist last blocklink history ' .
- 'semicolon-separator pipe-separator' ) as $msg ) {
+ if ( !isset( $this->message ) ) {
+ foreach ( array(
+ 'cur', 'diff', 'hist', 'last', 'blocklink', 'history',
+ 'semicolon-separator', 'pipe-separator' ) as $msg
+ ) {
$this->message[$msg] = $this->msg( $msg )->escaped();
}
}
*/
protected function recentChangesFlags( $flags, $nothing = ' ' ) {
$f = '';
- foreach( array( 'newpage', 'minor', 'bot', 'unpatrolled' ) as $flag ) {
+ foreach ( array( 'newpage', 'minor', 'bot', 'unpatrolled' ) as $flag ) {
$f .= isset( $flags[$flag] ) && $flags[$flag]
? self::flag( $flag )
: $nothing;
'botedit' => array( 'boteditletter', 'recentchanges-label-bot' ),
'unpatrolled' => array( 'unpatrolledletter', 'recentchanges-label-unpatrolled' ),
);
- foreach( $messages as &$value ) {
+ foreach ( $messages as &$value ) {
$value[0] = wfMessage( $value[0] )->escaped();
$value[1] = wfMessage( $value[1] )->escaped();
}
$formattedSize = $context->msg( 'rc-change-size', $formattedSize )->text();
}
- if( abs( $szdiff ) > abs( $wgRCChangedSizeThreshold ) ) {
+ if ( abs( $szdiff ) > abs( $wgRCChangedSizeThreshold ) ) {
$tag = 'strong';
} else {
$tag = 'span';
$newlen = $old->mAttribs['rc_new_len'];
}
- if( $oldlen === null || $newlen === null ) {
+ if ( $oldlen === null || $newlen === null ) {
return '';
}
* @return String
*/
public function endRecentChangesList() {
- if( $this->rclistOpen ) {
+ if ( $this->rclistOpen ) {
return "</ul>\n";
} else {
return '';
public function insertDateHeader( &$s, $rc_timestamp ) {
# Make date header if necessary
$date = $this->getLanguage()->userDate( $rc_timestamp, $this->getUser() );
- if( $date != $this->lastdate ) {
- if( $this->lastdate != '' ) {
+ if ( $date != $this->lastdate ) {
+ if ( $this->lastdate != '' ) {
$s .= "</ul>\n";
}
$s .= Xml::element( 'h4', null, $date ) . "\n<ul class=\"special\">";
*/
public function insertDiffHist( &$s, &$rc, $unpatrolled ) {
# Diff link
- if( $rc->mAttribs['rc_type'] == RC_NEW || $rc->mAttribs['rc_type'] == RC_LOG ) {
+ if ( $rc->mAttribs['rc_type'] == RC_NEW || $rc->mAttribs['rc_type'] == RC_LOG ) {
$diffLink = $this->message['diff'];
} elseif ( !self::userCan( $rc, Revision::DELETED_TEXT, $this->getUser() ) ) {
$diffLink = $this->message['diff'];
'oldid' => $rc->mAttribs['rc_last_oldid']
);
- if( $unpatrolled ) {
+ if ( $unpatrolled ) {
$query['rcid'] = $rc->mAttribs['rc_id'];
};
array( 'class' => 'mw-changeslist-title' ),
$params
);
- if( $this->isDeleted( $rc, Revision::DELETED_TEXT ) ) {
+ if ( $this->isDeleted( $rc, Revision::DELETED_TEXT ) ) {
$articlelink = '<span class="history-deleted">' . $articlelink . '</span>';
}
# To allow for boldening pages watched by this user
* @param &$rc RecentChange
*/
public function insertUserRelatedLinks( &$s, &$rc ) {
- if( $this->isDeleted( $rc, Revision::DELETED_USER ) ) {
+ if ( $this->isDeleted( $rc, Revision::DELETED_USER ) ) {
$s .= ' <span class="history-deleted">' . $this->msg( 'rev-deleted-user' )->escaped() . '</span>';
} else {
$s .= $this->getLanguage()->getDirMark() . Linker::userLink( $rc->mAttribs['rc_user'],
* @return string
*/
public function insertComment( $rc ) {
- if( $rc->mAttribs['rc_type'] != RC_MOVE && $rc->mAttribs['rc_type'] != RC_MOVE_OVER_REDIRECT ) {
- if( $this->isDeleted( $rc, Revision::DELETED_COMMENT ) ) {
+ if ( $rc->mAttribs['rc_type'] != RC_MOVE && $rc->mAttribs['rc_type'] != RC_MOVE_OVER_REDIRECT ) {
+ if ( $this->isDeleted( $rc, Revision::DELETED_COMMENT ) ) {
return ' <span class="history-deleted">' . $this->msg( 'rev-deleted-comment' )->escaped() . '</span>';
} else {
return Linker::commentBlock( $rc->mAttribs['rc_comment'], $rc->getTitle() );
*/
protected function numberofWatchingusers( $count ) {
static $cache = array();
- if( $count > 0 ) {
- if( !isset( $cache[$count] ) ) {
+ if ( $count > 0 ) {
+ if ( !isset( $cache[$count] ) ) {
$cache[$count] = $this->msg( 'number_of_watching_users_RCview' )->numParams( $count )->escaped();
}
return $cache[$count];
* @return Boolean
*/
public static function userCan( $rc, $field, User $user = null ) {
- if( $rc->mAttribs['rc_type'] == RC_LOG ) {
+ if ( $rc->mAttribs['rc_type'] == RC_LOG ) {
return LogEventsList::userCanBitfield( $rc->mAttribs['rc_deleted'], $field, $user );
} else {
return Revision::userCanBitfield( $rc->mAttribs['rc_deleted'], $field, $user );
* @return string
*/
protected function maybeWatchedLink( $link, $watched = false ) {
- if( $watched ) {
+ if ( $watched ) {
return '<strong class="mw-watched">' . $link . '</strong>';
} else {
return '<span class="mw-rc-unwatched">' . $link . '</span>';
* @param $rc RecentChange
*/
public function insertRollback( &$s, &$rc ) {
- if( $rc->mAttribs['rc_type'] != RC_NEW && $rc->mAttribs['rc_this_oldid'] && $rc->mAttribs['rc_cur_id'] ) {
+ if ( $rc->mAttribs['rc_type'] != RC_NEW && $rc->mAttribs['rc_this_oldid'] && $rc->mAttribs['rc_cur_id'] ) {
$page = $rc->getTitle();
/** Check for rollback and edit permissions, disallow special pages, and only
* show a link on the top-most revision */
* @param $classes
*/
public function insertTags( &$s, &$rc, &$classes ) {
- if ( empty( $rc->mAttribs['ts_tags'] ) )
+ if ( empty( $rc->mAttribs['ts_tags'] ) ) {
return;
+ }
list( $tagSummary, $newClasses ) = ChangeTags::formatSummaryRow( $rc->mAttribs['ts_tags'], 'changeslist' );
$classes = array_merge( $classes, $newClasses );
$s = '';
$classes = array();
// use mw-line-even/mw-line-odd class only if linenumber is given (feature from bug 14468)
- if( $linenumber ) {
- if( $linenumber & 1 ) {
+ if ( $linenumber ) {
+ if ( $linenumber & 1 ) {
$classes[] = 'mw-line-odd';
- }
- else {
+ } else {
$classes[] = 'mw-line-even';
}
}
$classes[] = $watched ? 'mw-changeslist-line-watched' : 'mw-changeslist-line-not-watched';
// Moved pages (very very old, not supported anymore)
- if( $rc->mAttribs['rc_type'] == RC_MOVE || $rc->mAttribs['rc_type'] == RC_MOVE_OVER_REDIRECT ) {
+ if ( $rc->mAttribs['rc_type'] == RC_MOVE || $rc->mAttribs['rc_type'] == RC_MOVE_OVER_REDIRECT ) {
// Log entries
- } elseif( $rc->mAttribs['rc_log_type'] ) {
+ } elseif ( $rc->mAttribs['rc_log_type'] ) {
$logtitle = SpecialPage::getTitleFor( 'Log', $rc->mAttribs['rc_log_type'] );
$this->insertLog( $s, $logtitle, $rc->mAttribs['rc_log_type'] );
// Log entries (old format) or log targets, and special pages
- } elseif( $rc->mAttribs['rc_namespace'] == NS_SPECIAL ) {
+ } elseif ( $rc->mAttribs['rc_namespace'] == NS_SPECIAL ) {
list( $name, $subpage ) = SpecialPageFactory::resolveAlias( $rc->mAttribs['rc_title'] );
- if( $name == 'Log' ) {
+ if ( $name == 'Log' ) {
$this->insertLog( $s, $rc->getTitle(), $subpage );
}
// Regular entries
$this->insertExtra( $s, $rc, $classes );
# How many users watch this page
- if( $rc->numberofWatchingusers > 0 ) {
+ if ( $rc->numberofWatchingusers > 0 ) {
$s .= ' ' . $this->numberofWatchingusers( $rc->numberofWatchingusers );
}
- if( $this->watchlist ) {
+ if ( $this->watchlist ) {
$classes[] = Sanitizer::escapeClass( 'watchlist-' . $rc->mAttribs['rc_namespace'] . '-' . $rc->mAttribs['rc_title'] );
}
# If it's a new day, add the headline and flush the cache
$date = $this->getLanguage()->userDate( $rc->mAttribs['rc_timestamp'], $this->getUser() );
$ret = '';
- if( $date != $this->lastdate ) {
+ if ( $date != $this->lastdate ) {
# Process current cache
$ret = $this->recentChangesBlock();
$this->rc_cache = array();
$type = $rc->mAttribs['rc_type'];
$logType = $rc->mAttribs['rc_log_type'];
// Page moves, very old style, not supported anymore
- if( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) {
+ if ( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) {
// New unpatrolled pages
- } elseif( $rc->unpatrolled && $type == RC_NEW ) {
+ } elseif ( $rc->unpatrolled && $type == RC_NEW ) {
$clink = Linker::linkKnown( $rc->getTitle(), null, array(),
array( 'rcid' => $rc->mAttribs['rc_id'] ) );
// Log entries
- } elseif( $type == RC_LOG ) {
- if( $logType ) {
+ } elseif ( $type == RC_LOG ) {
+ if ( $logType ) {
$logtitle = SpecialPage::getTitleFor( 'Log', $logType );
$logpage = new LogPage( $logType );
$logname = $logpage->getName()->escaped();
}
$watched = false;
// Log entries (old format) and special pages
- } elseif( $rc->mAttribs['rc_namespace'] == NS_SPECIAL ) {
+ } elseif ( $rc->mAttribs['rc_namespace'] == NS_SPECIAL ) {
wfDebug( "Unexpected special page in recentchanges\n" );
$clink = '';
// Edits
# called too many times (50% of CPU time on RecentChanges!).
$thisOldid = $rc->mAttribs['rc_this_oldid'];
$lastOldid = $rc->mAttribs['rc_last_oldid'];
- if( $rc->unpatrolled ) {
+ if ( $rc->unpatrolled ) {
$rcIdQuery = array( 'rcid' => $rc->mAttribs['rc_id'] );
} else {
$rcIdQuery = array();
$querydiff = $curIdEq + array( 'diff' => $thisOldid, 'oldid' =>
$lastOldid ) + $rcIdQuery;
- if( !$showdifflinks ) {
+ if ( !$showdifflinks ) {
$curLink = $this->message['cur'];
$diffLink = $this->message['diff'];
- } elseif( in_array( $type, array( RC_NEW, RC_LOG, RC_MOVE, RC_MOVE_OVER_REDIRECT ) ) ) {
+ } elseif ( in_array( $type, array( RC_NEW, RC_LOG, RC_MOVE, RC_MOVE_OVER_REDIRECT ) ) ) {
if ( $type != RC_NEW ) {
$curLink = $this->message['cur'];
} else {
}
# Make "last" link
- if( !$showdifflinks || !$lastOldid ) {
+ if ( !$showdifflinks || !$lastOldid ) {
$lastLink = $this->message['last'];
- } elseif( in_array( $type, array( RC_LOG, RC_MOVE, RC_MOVE_OVER_REDIRECT ) ) ) {
+ } elseif ( in_array( $type, array( RC_LOG, RC_MOVE, RC_MOVE_OVER_REDIRECT ) ) ) {
$lastLink = $this->message['last'];
} else {
$lastLink = Linker::linkKnown( $rc->getTitle(), $this->message['last'],
}
# Make user links
- if( $this->isDeleted( $rc, Revision::DELETED_USER ) ) {
+ if ( $this->isDeleted( $rc, Revision::DELETED_USER ) ) {
$rc->userlink = ' <span class="history-deleted">' . $this->msg( 'rev-deleted-user' )->escaped() . '</span>';
} else {
$rc->userlink = Linker::userLink( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] );
# Page moves go on their own line
$title = $rc->getTitle();
$secureName = $title->getPrefixedDBkey();
- if( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) {
+ if ( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) {
# Use an @ character to prevent collision with page names
$this->rc_cache['@@' . ($this->rcMoveIndex++)] = array( $rc );
} else {
# Logs are grouped by type
- if( $type == RC_LOG ) {
+ if ( $type == RC_LOG ) {
$secureName = SpecialPage::getTitleFor( 'Log', $logType )->getPrefixedDBkey();
}
- if( !isset( $this->rc_cache[$secureName] ) ) {
+ if ( !isset( $this->rc_cache[$secureName] ) ) {
$this->rc_cache[$secureName] = array();
}
# Some catalyst variables...
$namehidden = true;
$allLogs = true;
- foreach( $block as $rcObj ) {
+ foreach ( $block as $rcObj ) {
$oldid = $rcObj->mAttribs['rc_last_oldid'];
- if( $rcObj->mAttribs['rc_type'] == RC_NEW ) {
+ if ( $rcObj->mAttribs['rc_type'] == RC_NEW ) {
$isnew = true;
}
// If all log actions to this page were hidden, then don't
// give the name of the affected page for this block!
- if( !$this->isDeleted( $rcObj, LogPage::DELETED_ACTION ) ) {
+ if ( !$this->isDeleted( $rcObj, LogPage::DELETED_ACTION ) ) {
$namehidden = false;
}
$u = $rcObj->userlink;
- if( !isset( $userlinks[$u] ) ) {
+ if ( !isset( $userlinks[$u] ) ) {
$userlinks[$u] = 0;
}
- if( $rcObj->unpatrolled ) {
+ if ( $rcObj->unpatrolled ) {
$unpatrolled = true;
}
- if( $rcObj->mAttribs['rc_type'] != RC_LOG ) {
+ if ( $rcObj->mAttribs['rc_type'] != RC_LOG ) {
$allLogs = false;
}
# Get the latest entry with a page_id and oldid
# since logs may not have these.
- if( !$curId && $rcObj->mAttribs['rc_cur_id'] ) {
+ if ( !$curId && $rcObj->mAttribs['rc_cur_id'] ) {
$curId = $rcObj->mAttribs['rc_cur_id'];
}
- if( !$currentRevision && $rcObj->mAttribs['rc_this_oldid'] ) {
+ if ( !$currentRevision && $rcObj->mAttribs['rc_this_oldid'] ) {
$currentRevision = $rcObj->mAttribs['rc_this_oldid'];
}
- if( !$rcObj->mAttribs['rc_bot'] ) {
+ if ( !$rcObj->mAttribs['rc_bot'] ) {
$allBots = false;
}
- if( !$rcObj->mAttribs['rc_minor'] ) {
+ if ( !$rcObj->mAttribs['rc_minor'] ) {
$allMinors = false;
}
krsort( $userlinks );
asort( $userlinks );
$users = array();
- foreach( $userlinks as $userlink => $count ) {
+ foreach ( $userlinks as $userlink => $count ) {
$text = $userlink;
$text .= $this->getLanguage()->getDirMark();
- if( $count > 1 ) {
+ if ( $count > 1 ) {
$text .= ' ' . $this->msg( 'parentheses' )->rawParams( $this->getLanguage()->formatNum( $count ) . '×' )->escaped();
}
array_push( $users, $text );
$r .= ' ' . $block[0]->timestamp . ' </td><td>';
# Article link
- if( $namehidden ) {
+ if ( $namehidden ) {
$r .= ' <span class="history-deleted">' . $this->msg( 'rev-deleted-event' )->escaped() . '</span>';
- } elseif( $allLogs ) {
+ } elseif ( $allLogs ) {
$r .= $this->maybeWatchedLink( $block[0]->link, $block[0]->watched );
} else {
$this->insertArticleLink( $r, $block[0], $block[0]->unpatrolled, $block[0]->watched );
# Total change link
$r .= ' ';
$logtext = '';
- if( !$allLogs ) {
- if( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this->getUser() ) ) {
+ if ( !$allLogs ) {
+ if ( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this->getUser() ) ) {
$logtext .= $nchanges[$n];
- } elseif( $isnew ) {
+ } elseif ( $isnew ) {
$logtext .= $nchanges[$n];
} else {
$params = $queryParams;
}
# History
- if( $allLogs ) {
+ if ( $allLogs ) {
// don't show history link for logs
- } elseif( $namehidden || !$block[0]->getTitle()->exists() ) {
+ } elseif ( $namehidden || !$block[0]->getTitle()->exists() ) {
$logtext .= $this->message['pipe-separator'] . $this->message['hist'];
} else {
$params = $queryParams;
);
}
- if( $logtext !== '' ) {
+ if ( $logtext !== '' ) {
$r .= $this->msg( 'parentheses' )->rawParams( $logtext )->escaped();
}
$r .= ' <span class="mw-changeslist-separator">. .</span> ';
# Character difference (does not apply if only log items)
- if( $wgRCShowChangedSize && !$allLogs ) {
+ if ( $wgRCShowChangedSize && !$allLogs ) {
$last = 0;
$first = count( $block ) - 1;
# Some events (like logs) have an "empty" size, so we need to skip those...
- while( $last < $first && $block[$last]->mAttribs['rc_new_len'] === null ) {
+ while ( $last < $first && $block[$last]->mAttribs['rc_new_len'] === null ) {
$last++;
}
- while( $first > $last && $block[$first]->mAttribs['rc_old_len'] === null ) {
+ while ( $first > $last && $block[$first]->mAttribs['rc_old_len'] === null ) {
$first--;
}
# Get net change
$chardiff = $this->formatCharacterDifference( $block[$first], $block[$last] );
- if( $chardiff == '' ) {
+ if ( $chardiff == '' ) {
$r .= ' ';
} else {
$r .= ' ' . $chardiff . ' <span class="mw-changeslist-separator">. .</span> ';
$r .= $this->numberofWatchingusers( $block[0]->numberofWatchingusers );
# Sub-entries
- foreach( $block as $rcObj ) {
+ foreach ( $block as $rcObj ) {
# Classes to apply -- TODO implement
$classes = array();
$type = $rcObj->mAttribs['rc_type'];
$params = $queryParams;
- if( $rcObj->mAttribs['rc_this_oldid'] != 0 ) {
+ if ( $rcObj->mAttribs['rc_this_oldid'] != 0 ) {
$params['oldid'] = $rcObj->mAttribs['rc_this_oldid'];
}
# Log timestamp
- if( $type == RC_LOG ) {
+ if ( $type == RC_LOG ) {
$link = $rcObj->timestamp;
# Revision link
- } elseif( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this->getUser() ) ) {
+ } elseif ( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this->getUser() ) ) {
$link = '<span class="history-deleted">' . $rcObj->timestamp . '</span> ';
} else {
if ( $rcObj->unpatrolled && $type == RC_NEW) {
array(),
$params
);
- if( $this->isDeleted( $rcObj, Revision::DELETED_TEXT ) ) {
+ if ( $this->isDeleted( $rcObj, Revision::DELETED_TEXT ) ) {
$link = '<span class="history-deleted">' . $link . '</span> ';
}
}
$type = $rcObj->mAttribs['rc_type'];
$logType = $rcObj->mAttribs['rc_log_type'];
$classes = array( 'mw-enhanced-rc' );
- if( $logType ) {
+ if ( $logType ) {
# Log entry
$classes[] = Sanitizer::escapeClass( 'mw-changeslist-log-'
. $logType . '-' . $rcObj->mAttribs['rc_title'] );
$r .= '<td class="mw-enhanced-rc"><span class="mw-enhancedchanges-arrow-space"></span>';
# Flag and Timestamp
- if( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) {
+ if ( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) {
$r .= '    '; // 4 flags -> 4 spaces
} else {
$r .= $this->recentChangesFlags( array(
}
$r .= ' ' . $rcObj->timestamp . ' </td><td>';
# Article or log link
- if( $logType ) {
+ if ( $logType ) {
$logPage = new LogPage( $logType );
$logTitle = SpecialPage::getTitleFor( 'Log', $logType );
$logName = $logPage->getName()->escaped();
* @return string
*/
protected function recentChangesBlock() {
- if( count ( $this->rc_cache ) == 0 ) {
+ if ( count ( $this->rc_cache ) == 0 ) {
return '';
}
wfProfileIn( __METHOD__ );
$blockOut = '';
- foreach( $this->rc_cache as $block ) {
- if( count( $block ) < 2 ) {
+ foreach ( $this->rc_cache as $block ) {
+ if ( count( $block ) < 2 ) {
$blockOut .= $this->recentChangesBlockLine( array_shift( $block ) );
} else {
$blockOut .= $this->recentChangesBlockGroup( $block );
$prev = false;
$duplicatePrefixes = array();
- foreach( $letterMap as $key => $value ) {
+ foreach ( $letterMap as $key => $value ) {
// Remove terminator byte. Otherwise the prefix
// comparison will get hung up on that.
$trimmedKey = rtrim( $key, "\0" );
}
$prev = $trimmedKey;
}
- foreach( $duplicatePrefixes as $badKey ) {
+ foreach ( $duplicatePrefixes as $badKey ) {
wfDebug( "Removing '{$letterMap[$badKey]}' from first letters." );
unset( $letterMap[$badKey] );
// This code assumes that unsetting does not change sort order.
function getVars() {
$vars = array();
$this->parse();
- foreach( $this->pathInfo as $path => $data ) {
- if ( $path[0] != '$' )
+ foreach ( $this->pathInfo as $path => $data ) {
+ if ( $path[0] != '$' ) {
continue;
+ }
$trimmedPath = substr( $path, 1 );
$name = $data['name'];
- if ( $name[0] == '@' )
+ if ( $name[0] == '@' ) {
continue;
- if ( $name[0] == '$' )
+ }
+ if ( $name[0] == '$' ) {
$name = substr( $name, 1 );
+ }
$parentPath = substr( $trimmedPath, 0,
strlen( $trimmedPath ) - strlen( $name ) );
- if( substr( $parentPath, -1 ) == '/' )
+ if ( substr( $parentPath, -1 ) == '/' ) {
$parentPath = substr( $parentPath, 0, -1 );
+ }
$value = substr( $this->text, $data['valueStartByte'],
$data['valueEndByte'] - $data['valueStartByte']
$target =& $array;
if ( $path !== '' ) {
foreach ( $pathArr as $p ) {
- if( !isset( $target[$p] ) )
+ if ( !isset( $target[$p] ) ) {
$target[$p] = array();
+ }
$target =& $target[$p];
}
}
- if ( !isset( $target[$key] ) )
+ if ( !isset( $target[$key] ) ) {
$target[$key] = $value;
+ }
}
/**
* @return mixed Parsed value
*/
function parseScalar( $str ) {
- if ( $str !== '' && $str[0] == '\'' )
+ if ( $str !== '' && $str[0] == '\'' ) {
// Single-quoted string
// @todo FIXME: trim() call is due to mystery bug where whitespace gets
// appended to the token; without it we ended up reading in the
// extra quote on the end!
return strtr( substr( trim( $str ), 1, -1 ),
array( '\\\'' => '\'', '\\\\' => '\\' ) );
- if ( $str !== '' && $str[0] == '"' )
+ }
+ if ( $str !== '' && $str[0] == '"' ) {
// Double-quoted string
// @todo FIXME: trim() call is due to mystery bug where whitespace gets
// appended to the token; without it we ended up reading in the
// extra quote on the end!
return stripcslashes( substr( trim( $str ), 1, -1 ) );
- if ( substr( $str, 0, 4 ) == 'true' )
+ }
+ if ( substr( $str, 0, 4 ) == 'true' ) {
return true;
- if ( substr( $str, 0, 5 ) == 'false' )
+ }
+ if ( substr( $str, 0, 5 ) == 'false' ) {
return false;
- if ( substr( $str, 0, 4 ) == 'null' )
+ }
+ if ( substr( $str, 0, 4 ) == 'null' ) {
return null;
+ }
// Must be some kind of numeric value, so let PHP's weak typing
// be useful for a change
return $str;
$this->expect( '=' );
$this->skipSpace();
$this->startPathValue();
- if ( $arrayAssign )
+ if ( $arrayAssign ) {
$this->pushState( 'expression', 'array assign end' );
- else
+ } else {
$this->pushState( 'expression', 'statement end' );
+ }
break;
case 'array assign end':
case 'statement end':
$this->endPathValue();
- if ( $state == 'array assign end' )
+ if ( $state == 'array assign end' ) {
$this->popPath();
+ }
$this->skipSpace();
$this->expect( ';' );
$this->nextPath( '@extra-' . ($this->serial++) );
+++ /dev/null
-<?php
-/**
- * A cryptographic random generator class used for generating secret keys
- *
- * This is based in part on Drupal code as well as what we used in our own code
- * prior to introduction of this class.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @author Daniel Friesen
- * @file
- */
-
-class MWCryptRand {
-
- /**
- * Minimum number of iterations we want to make in our drift calculations.
- */
- const MIN_ITERATIONS = 1000;
-
- /**
- * Number of milliseconds we want to spend generating each separate byte
- * of the final generated bytes.
- * This is used in combination with the hash length to determine the duration
- * we should spend doing drift calculations.
- */
- const MSEC_PER_BYTE = 0.5;
-
- /**
- * Singleton instance for public use
- */
- protected static $singleton = null;
-
- /**
- * The hash algorithm being used
- */
- protected $algo = null;
-
- /**
- * The number of bytes outputted by the hash algorithm
- */
- protected $hashLength = null;
-
- /**
- * A boolean indicating whether the previous random generation was done using
- * cryptographically strong random number generator or not.
- */
- protected $strong = null;
-
- /**
- * Initialize an initial random state based off of whatever we can find
- */
- protected function initialRandomState() {
- // $_SERVER contains a variety of unstable user and system specific information
- // It'll vary a little with each page, and vary even more with separate users
- // It'll also vary slightly across different machines
- $state = serialize( $_SERVER );
-
- // To try vary the system information of the state a bit more
- // by including the system's hostname into the state
- $state .= wfHostname();
-
- // Try to gather a little entropy from the different php rand sources
- $state .= rand() . uniqid( mt_rand(), true );
-
- // Include some information about the filesystem's current state in the random state
- $files = array();
-
- // We know this file is here so grab some info about ourselves
- $files[] = __FILE__;
-
- // We must also have a parent folder, and with the usual file structure, a grandparent
- $files[] = __DIR__;
- $files[] = dirname( __DIR__ );
-
- // The config file is likely the most often edited file we know should be around
- // so include its stat info into the state.
- // The constant with its location will almost always be defined, as WebStart.php defines
- // MW_CONFIG_FILE to $IP/LocalSettings.php unless being configured with MW_CONFIG_CALLBACK (eg. the installer)
- if ( defined( 'MW_CONFIG_FILE' ) ) {
- $files[] = MW_CONFIG_FILE;
- }
-
- foreach ( $files as $file ) {
- wfSuppressWarnings();
- $stat = stat( $file );
- wfRestoreWarnings();
- if ( $stat ) {
- // stat() duplicates data into numeric and string keys so kill off all the numeric ones
- foreach ( $stat as $k => $v ) {
- if ( is_numeric( $k ) ) {
- unset( $k );
- }
- }
- // The absolute filename itself will differ from install to install so don't leave it out
- if( ( $path = realpath( $file ) ) !== false ) {
- $state .= $path;
- } else {
- $state .= $file;
- }
- $state .= implode( '', $stat );
- } else {
- // The fact that the file isn't there is worth at least a
- // minuscule amount of entropy.
- $state .= '0';
- }
- }
-
- // Try and make this a little more unstable by including the varying process
- // id of the php process we are running inside of if we are able to access it
- if ( function_exists( 'getmypid' ) ) {
- $state .= getmypid();
- }
-
- // If available try to increase the instability of the data by throwing in
- // the precise amount of memory that we happen to be using at the moment.
- if ( function_exists( 'memory_get_usage' ) ) {
- $state .= memory_get_usage( true );
- }
-
- // It's mostly worthless but throw the wiki's id into the data for a little more variance
- $state .= wfWikiID();
-
- // If we have a secret key or proxy key set then throw it into the state as well
- global $wgSecretKey, $wgProxyKey;
- if ( $wgSecretKey ) {
- $state .= $wgSecretKey;
- } elseif ( $wgProxyKey ) {
- $state .= $wgProxyKey;
- }
-
- return $state;
- }
-
- /**
- * Randomly hash data while mixing in clock drift data for randomness
- *
- * @param string $data The data to randomly hash.
- * @return String The hashed bytes
- * @author Tim Starling
- */
- protected function driftHash( $data ) {
- // Minimum number of iterations (to avoid slow operations causing the loop to gather little entropy)
- $minIterations = self::MIN_ITERATIONS;
- // Duration of time to spend doing calculations (in seconds)
- $duration = ( self::MSEC_PER_BYTE / 1000 ) * $this->hashLength();
- // Create a buffer to use to trigger memory operations
- $bufLength = 10000000;
- $buffer = str_repeat( ' ', $bufLength );
- $bufPos = 0;
-
- // Iterate for $duration seconds or at least $minIterations number of iterations
- $iterations = 0;
- $startTime = microtime( true );
- $currentTime = $startTime;
- while ( $iterations < $minIterations || $currentTime - $startTime < $duration ) {
- // Trigger some memory writing to trigger some bus activity
- // This may create variance in the time between iterations
- $bufPos = ( $bufPos + 13 ) % $bufLength;
- $buffer[$bufPos] = ' ';
- // Add the drift between this iteration and the last in as entropy
- $nextTime = microtime( true );
- $delta = (int)( ( $nextTime - $currentTime ) * 1000000 );
- $data .= $delta;
- // Every 100 iterations hash the data and entropy
- if ( $iterations % 100 === 0 ) {
- $data = sha1( $data );
- }
- $currentTime = $nextTime;
- $iterations++;
- }
- $timeTaken = $currentTime - $startTime;
- $data = $this->hash( $data );
-
- wfDebug( __METHOD__ . ": Clock drift calculation " .
- "(time-taken=" . ( $timeTaken * 1000 ) . "ms, " .
- "iterations=$iterations, " .
- "time-per-iteration=" . ( $timeTaken / $iterations * 1e6 ) . "us)\n" );
- return $data;
- }
-
- /**
- * Return a rolling random state initially build using data from unstable sources
- * @return string A new weak random state
- */
- protected function randomState() {
- static $state = null;
- if ( is_null( $state ) ) {
- // Initialize the state with whatever unstable data we can find
- // It's important that this data is hashed right afterwards to prevent
- // it from being leaked into the output stream
- $state = $this->hash( $this->initialRandomState() );
- }
- // Generate a new random state based on the initial random state or previous
- // random state by combining it with clock drift
- $state = $this->driftHash( $state );
- return $state;
- }
-
- /**
- * Decide on the best acceptable hash algorithm we have available for hash()
- * @throws MWException
- * @return String A hash algorithm
- */
- protected function hashAlgo() {
- if ( !is_null( $this->algo ) ) {
- return $this->algo;
- }
-
- $algos = hash_algos();
- $preference = array( 'whirlpool', 'sha256', 'sha1', 'md5' );
-
- foreach ( $preference as $algorithm ) {
- if ( in_array( $algorithm, $algos ) ) {
- $this->algo = $algorithm;
- wfDebug( __METHOD__ . ": Using the {$this->algo} hash algorithm.\n" );
- return $this->algo;
- }
- }
-
- // We only reach here if no acceptable hash is found in the list, this should
- // be a technical impossibility since most of php's hash list is fixed and
- // some of the ones we list are available as their own native functions
- // But since we already require at least 5.2 and hash() was default in
- // 5.1.2 we don't bother falling back to methods like sha1 and md5.
- throw new MWException( "Could not find an acceptable hashing function in hash_algos()" );
- }
-
- /**
- * Return the byte-length output of the hash algorithm we are
- * using in self::hash and self::hmac.
- *
- * @return int Number of bytes the hash outputs
- */
- protected function hashLength() {
- if ( is_null( $this->hashLength ) ) {
- $this->hashLength = strlen( $this->hash( '' ) );
- }
- return $this->hashLength;
- }
-
- /**
- * Generate an acceptably unstable one-way-hash of some text
- * making use of the best hash algorithm that we have available.
- *
- * @param $data string
- * @return String A raw hash of the data
- */
- protected function hash( $data ) {
- return hash( $this->hashAlgo(), $data, true );
- }
-
- /**
- * Generate an acceptably unstable one-way-hmac of some text
- * making use of the best hash algorithm that we have available.
- *
- * @param $data string
- * @param $key string
- * @return String A raw hash of the data
- */
- protected function hmac( $data, $key ) {
- return hash_hmac( $this->hashAlgo(), $data, $key, true );
- }
-
- /**
- * @see self::wasStrong()
- */
- public function realWasStrong() {
- if ( is_null( $this->strong ) ) {
- throw new MWException( __METHOD__ . ' called before generation of random data' );
- }
- return $this->strong;
- }
-
- /**
- * @see self::generate()
- */
- public function realGenerate( $bytes, $forceStrong = false ) {
- wfProfileIn( __METHOD__ );
-
- wfDebug( __METHOD__ . ": Generating cryptographic random bytes for " . wfGetAllCallers( 5 ) . "\n" );
-
- $bytes = floor( $bytes );
- static $buffer = '';
- if ( is_null( $this->strong ) ) {
- // Set strength to false initially until we know what source data is coming from
- $this->strong = true;
- }
-
- if ( strlen( $buffer ) < $bytes ) {
- // If available make use of mcrypt_create_iv URANDOM source to generate randomness
- // On unix-like systems this reads from /dev/urandom but does it without any buffering
- // and bypasses openbasedir restrictions, so it's preferable to reading directly
- // On Windows starting in PHP 5.3.0 Windows' native CryptGenRandom is used to generate
- // entropy so this is also preferable to just trying to read urandom because it may work
- // on Windows systems as well.
- if ( function_exists( 'mcrypt_create_iv' ) ) {
- wfProfileIn( __METHOD__ . '-mcrypt' );
- $rem = $bytes - strlen( $buffer );
- $iv = mcrypt_create_iv( $rem, MCRYPT_DEV_URANDOM );
- if ( $iv === false ) {
- wfDebug( __METHOD__ . ": mcrypt_create_iv returned false.\n" );
- } else {
- $buffer .= $iv;
- wfDebug( __METHOD__ . ": mcrypt_create_iv generated " . strlen( $iv ) . " bytes of randomness.\n" );
- }
- wfProfileOut( __METHOD__ . '-mcrypt' );
- }
- }
-
- if ( strlen( $buffer ) < $bytes ) {
- // If available make use of openssl's random_pseudo_bytes method to attempt to generate randomness.
- // However don't do this on Windows with PHP < 5.3.4 due to a bug:
- // http://stackoverflow.com/questions/1940168/openssl-random-pseudo-bytes-is-slow-php
- // http://git.php.net/?p=php-src.git;a=commitdiff;h=cd62a70863c261b07f6dadedad9464f7e213cad5
- if ( function_exists( 'openssl_random_pseudo_bytes' )
- && ( !wfIsWindows() || version_compare( PHP_VERSION, '5.3.4', '>=' ) )
- ) {
- wfProfileIn( __METHOD__ . '-openssl' );
- $rem = $bytes - strlen( $buffer );
- $openssl_bytes = openssl_random_pseudo_bytes( $rem, $openssl_strong );
- if ( $openssl_bytes === false ) {
- wfDebug( __METHOD__ . ": openssl_random_pseudo_bytes returned false.\n" );
- } else {
- $buffer .= $openssl_bytes;
- wfDebug( __METHOD__ . ": openssl_random_pseudo_bytes generated " . strlen( $openssl_bytes ) . " bytes of " . ( $openssl_strong ? "strong" : "weak" ) . " randomness.\n" );
- }
- if ( strlen( $buffer ) >= $bytes ) {
- // openssl tells us if the random source was strong, if some of our data was generated
- // using it use it's say on whether the randomness is strong
- $this->strong = !!$openssl_strong;
- }
- wfProfileOut( __METHOD__ . '-openssl' );
- }
- }
-
- // Only read from urandom if we can control the buffer size or were passed forceStrong
- if ( strlen( $buffer ) < $bytes && ( function_exists( 'stream_set_read_buffer' ) || $forceStrong ) ) {
- wfProfileIn( __METHOD__ . '-fopen-urandom' );
- $rem = $bytes - strlen( $buffer );
- if ( !function_exists( 'stream_set_read_buffer' ) && $forceStrong ) {
- wfDebug( __METHOD__ . ": Was forced to read from /dev/urandom without control over the buffer size.\n" );
- }
- // /dev/urandom is generally considered the best possible commonly
- // available random source, and is available on most *nix systems.
- wfSuppressWarnings();
- $urandom = fopen( "/dev/urandom", "rb" );
- wfRestoreWarnings();
-
- // Attempt to read all our random data from urandom
- // php's fread always does buffered reads based on the stream's chunk_size
- // so in reality it will usually read more than the amount of data we're
- // asked for and not storing that risks depleting the system's random pool.
- // If stream_set_read_buffer is available set the chunk_size to the amount
- // of data we need. Otherwise read 8k, php's default chunk_size.
- if ( $urandom ) {
- // php's default chunk_size is 8k
- $chunk_size = 1024 * 8;
- if ( function_exists( 'stream_set_read_buffer' ) ) {
- // If possible set the chunk_size to the amount of data we need
- stream_set_read_buffer( $urandom, $rem );
- $chunk_size = $rem;
- }
- $random_bytes = fread( $urandom, max( $chunk_size, $rem ) );
- $buffer .= $random_bytes;
- fclose( $urandom );
- wfDebug( __METHOD__ . ": /dev/urandom generated " . strlen( $random_bytes ) . " bytes of randomness.\n" );
- if ( strlen( $buffer ) >= $bytes ) {
- // urandom is always strong, set to true if all our data was generated using it
- $this->strong = true;
- }
- } else {
- wfDebug( __METHOD__ . ": /dev/urandom could not be opened.\n" );
- }
- wfProfileOut( __METHOD__ . '-fopen-urandom' );
- }
-
- // If we cannot use or generate enough data from a secure source
- // use this loop to generate a good set of pseudo random data.
- // This works by initializing a random state using a pile of unstable data
- // and continually shoving it through a hash along with a variable salt.
- // We hash the random state with more salt to avoid the state from leaking
- // out and being used to predict the /randomness/ that follows.
- if ( strlen( $buffer ) < $bytes ) {
- wfDebug( __METHOD__ . ": Falling back to using a pseudo random state to generate randomness.\n" );
- }
- while ( strlen( $buffer ) < $bytes ) {
- wfProfileIn( __METHOD__ . '-fallback' );
- $buffer .= $this->hmac( $this->randomState(), mt_rand() );
- // This code is never really cryptographically strong, if we use it
- // at all, then set strong to false.
- $this->strong = false;
- wfProfileOut( __METHOD__ . '-fallback' );
- }
-
- // Once the buffer has been filled up with enough random data to fulfill
- // the request shift off enough data to handle the request and leave the
- // unused portion left inside the buffer for the next request for random data
- $generated = substr( $buffer, 0, $bytes );
- $buffer = substr( $buffer, $bytes );
-
- wfDebug( __METHOD__ . ": " . strlen( $buffer ) . " bytes of randomness leftover in the buffer.\n" );
-
- wfProfileOut( __METHOD__ );
- return $generated;
- }
-
- /**
- * @see self::generateHex()
- */
- public function realGenerateHex( $chars, $forceStrong = false ) {
- // hex strings are 2x the length of raw binary so we divide the length in half
- // odd numbers will result in a .5 that leads the generate() being 1 character
- // short, so we use ceil() to ensure that we always have enough bytes
- $bytes = ceil( $chars / 2 );
- // Generate the data and then convert it to a hex string
- $hex = bin2hex( $this->generate( $bytes, $forceStrong ) );
- // A bit of paranoia here, the caller asked for a specific length of string
- // here, and it's possible (eg when given an odd number) that we may actually
- // have at least 1 char more than they asked for. Just in case they made this
- // call intending to insert it into a database that does truncation we don't
- // want to give them too much and end up with their database and their live
- // code having two different values because part of what we gave them is truncated
- // hence, we strip out any run of characters longer than what we were asked for.
- return substr( $hex, 0, $chars );
- }
-
- /** Publicly exposed static methods **/
-
- /**
- * Return a singleton instance of MWCryptRand
- * @return MWCryptRand
- */
- protected static function singleton() {
- if ( is_null( self::$singleton ) ) {
- self::$singleton = new self;
- }
- return self::$singleton;
- }
-
- /**
- * Return a boolean indicating whether or not the source used for cryptographic
- * random bytes generation in the previously run generate* call
- * was cryptographically strong.
- *
- * @return bool Returns true if the source was strong, false if not.
- */
- public static function wasStrong() {
- return self::singleton()->realWasStrong();
- }
-
- /**
- * Generate a run of (ideally) cryptographically random data and return
- * it in raw binary form.
- * You can use MWCryptRand::wasStrong() if you wish to know if the source used
- * was cryptographically strong.
- *
- * @param int $bytes the number of bytes of random data to generate
- * @param bool $forceStrong Pass true if you want generate to prefer cryptographically
- * strong sources of entropy even if reading from them may steal
- * more entropy from the system than optimal.
- * @return String Raw binary random data
- */
- public static function generate( $bytes, $forceStrong = false ) {
- return self::singleton()->realGenerate( $bytes, $forceStrong );
- }
-
- /**
- * Generate a run of (ideally) cryptographically random data and return
- * it in hexadecimal string format.
- * You can use MWCryptRand::wasStrong() if you wish to know if the source used
- * was cryptographically strong.
- *
- * @param int $chars the number of hex chars of random data to generate
- * @param bool $forceStrong Pass true if you want generate to prefer cryptographically
- * strong sources of entropy even if reading from them may steal
- * more entropy from the system than optimal.
- * @return String Hexadecimal random data
- */
- public static function generateHex( $chars, $forceStrong = false ) {
- return self::singleton()->realGenerateHex( $chars, $forceStrong );
- }
-
-}
* @throws Exception|null
*/
public static function runUpdates( $updates ) {
- if ( empty( $updates ) ) return; # nothing to do
+ if ( empty( $updates ) ) {
+ return; # nothing to do
+ }
$open_transactions = array();
$exception = null;
$wgMemCachedDebug = false;
/** The list of MemCached servers and port numbers */
-$wgMemCachedServers = array( '127.0.0.1:11000' );
+$wgMemCachedServers = array( '127.0.0.1:11211' );
/**
* Use persistent connections to MemCached, which are shared across multiple
$wgVectorUseIconWatch = true;
/**
- * Use VForm design for Special:Userlogin. This can be overridden by
- * a useNew bool in the query string. For instance, if it is globally
- * false, you can try it with useNew=1.
+ * Use compact vertical form ("VForm") design for Special:Userlogin. This can
+ * be overridden by a useNew bool in the query string. For instance, if it is
+ * globally false, you can try it with useNew=1.
+ *
+ * @since 1.22
*/
$wgUseVFormUserLogin = false;
+/**
+ * Use compact vertical form ("VForm") design for account creation
+ * (Special:Userlogin?type=signup).
+ *
+ * @since 1.22
+ */
+$wgUseVFormCreateAccount = false;
+
/**
* Display user edit counts in various prominent places.
*/
$orig = $this->getOriginalContent();
$content = $orig ? $orig->getSection( $this->section ) : null;
- if ( !$content ) $content = $def_content;
+ if ( !$content ) {
+ $content = $def_content;
+ }
} else {
$undoafter = $wgRequest->getInt( 'undoafter' );
$undo = $wgRequest->getInt( 'undo' );
}
$revision = $this->mArticle->getRevisionFetched();
if ( $revision === null ) {
- if ( !$this->contentModel ) $this->contentModel = $this->getTitle()->getContentModel();
+ if ( !$this->contentModel ) {
+ $this->contentModel = $this->getTitle()->getContentModel();
+ }
$handler = ContentHandler::getForModelID( $this->contentModel );
return $handler->makeEmptyContent();
$content = $rev ? $rev->getContent( Revision::RAW ) : null;
if ( $content === false || $content === null ) {
- if ( !$this->contentModel ) $this->contentModel = $this->getTitle()->getContentModel();
+ if ( !$this->contentModel ) {
+ $this->contentModel = $this->getTitle()->getContentModel();
+ }
$handler = ContentHandler::getForModelID( $this->contentModel );
return $handler->makeEmptyContent();
if ( $namespace == NS_MEDIAWIKI ) {
# Show a warning if editing an interface message
$wgOut->wrapWikiMsg( "<div class='mw-editinginterface'>\n$1\n</div>", 'editinginterface' );
- } else if( $namespace == NS_FILE ) {
+ } elseif ( $namespace == NS_FILE ) {
# Show a hint to shared repo
$file = wfFindFile( $this->mTitle );
- if( $file && !$file->isLocal() ) {
+ if ( $file && !$file->isLocal() ) {
$descUrl = $file->getDescriptionUrl();
# there must be a description url to show a hint to shared repo
- if( $descUrl ) {
- if( !$this->mTitle->exists() ) {
+ if ( $descUrl ) {
+ if ( !$this->mTitle->exists() ) {
$wgOut->wrapWikiMsg( "<div class=\"mw-sharedupload-desc-create\">\n$1\n</div>", array(
'sharedupload-desc-create', $file->getRepo()->getDisplayName(), $descUrl
) );
}
# When the summary is hidden, also hide them on preview/show changes
- if( $this->nosummary ) {
+ if ( $this->nosummary ) {
$wgOut->addHTML( Html::hidden( 'nosummary', true ) );
}
$oldtitlemsg = 'currentrev';
# if message does not exist, show diff against the preloaded default
- if( $this->mTitle->getNamespace() == NS_MEDIAWIKI && !$this->mTitle->exists() ) {
+ if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI && !$this->mTitle->exists() ) {
$oldtext = $this->mTitle->getDefaultMessageText();
- if( $oldtext !== false ) {
+ if ( $oldtext !== false ) {
$oldtitlemsg = 'defaultmessagetext';
$oldContent = $this->toEditContent( $oldtext );
} else {
# don't parse non-wikitext pages, show message about preview
if ( $this->mTitle->isCssJsSubpage() || $this->mTitle->isCssOrJsPage() ) {
- if( $this->mTitle->isCssJsSubpage() ) {
+ if ( $this->mTitle->isCssJsSubpage() ) {
$level = 'user';
- } elseif( $this->mTitle->isCssOrJsPage() ) {
+ } elseif ( $this->mTitle->isCssOrJsPage() ) {
$level = 'site';
} else {
$level = false;
# Used messages to make sure grep find them:
# Messages: usercsspreview, userjspreview, sitecsspreview, sitejspreview
- if( $level && $format ) {
+ if ( $level && $format ) {
$note = "<div id='mw-{$level}{$format}preview'>" . wfMessage( "{$level}{$format}preview" )->text() . "</div>";
}
}
global $wgOut, $wgLang;
$this->textbox2 = $this->textbox1;
- if( is_array( $match ) ) {
+ if ( is_array( $match ) ) {
$match = $wgLang->listToText( $match );
}
$wgOut->prepareErrorPage( wfMessage( 'spamprotectiontitle' ) );
// customized by the local wiki. So get the default English version for
// passing to the parent constructor. Our overridden report() below
// makes sure that the page shown to the user is not forced to English.
- if( $msg instanceof Message ) {
+ if ( $msg instanceof Message ) {
$enMsg = clone( $msg );
} else {
$enMsg = wfMessage( $msg, $params );
*/
class UserBlockedError extends ErrorPageError {
public function __construct( Block $block ) {
- global $wgLang, $wgRequest;
-
- $blocker = $block->getBlocker();
- if ( $blocker instanceof User ) { // local user
- $blockerUserpage = $block->getBlocker()->getUserPage();
- $link = "[[{$blockerUserpage->getPrefixedText()}|{$blockerUserpage->getText()}]]";
- } else { // foreign user
- $link = $blocker;
- }
-
- $reason = $block->mReason;
- if( $reason == '' ) {
- $reason = wfMessage( 'blockednoreason' )->text();
- }
-
- /* $ip returns who *is* being blocked, $intended contains who was meant to be blocked.
- * This could be a username, an IP range, or a single IP. */
- $intended = $block->getTarget();
-
- parent::__construct(
- 'blockedtitle',
- $block->mAuto ? 'autoblockedtext' : 'blockedtext',
- array(
- $link,
- $reason,
- $wgRequest->getIP(),
- $block->getByName(),
- $block->getId(),
- $wgLang->formatExpiry( $block->mExpiry ),
- $intended,
- $wgLang->timeanddate( wfTimestamp( TS_MW, $block->mTimestamp ), true )
- )
- );
+ // @todo FIXME: Implement a more proper way to get context here.
+ $params = $block->getPermissionsError( RequestContext::getMain() );
+ parent::__construct( 'blockedtitle', array_shift( $params ), $params );
}
}
$where = array( 'user_id = log_user' );
# Hide private logs
$hideLogs = LogEventsList::getExcludeClause( $this->db );
- if ( $hideLogs ) $where[] = $hideLogs;
+ if ( $hideLogs ) {
+ $where[] = $hideLogs;
+ }
# Add on any caller specified conditions
- if ( $cond ) $where[] = $cond;
+ if ( $cond ) {
+ $where[] = $cond;
+ }
# Get logging table name for logging.* clause
$logging = $this->db->tableName( 'logging' );
$out = " <revision>\n";
$out .= " " . Xml::element( 'id', null, strval( $row->rev_id ) ) . "\n";
- if( isset( $row->rev_parent_id ) && $row->rev_parent_id ) {
+ if ( isset( $row->rev_parent_id ) && $row->rev_parent_id ) {
$out .= " " . Xml::element( 'parentid', null, strval( $row->rev_parent_id ) ) . "\n";
}
if ( substr( $to, -8 ) == '//IGNORE' ) {
$to = substr( $to, 0, strlen( $to ) - 8 );
}
- if( strcasecmp( $from, $to ) == 0 ) {
+ if ( strcasecmp( $from, $to ) == 0 ) {
return $string;
}
- if( strcasecmp( $from, 'utf-8' ) == 0 ) {
+ if ( strcasecmp( $from, 'utf-8' ) == 0 ) {
return utf8_decode( $string );
}
- if( strcasecmp( $to, 'utf-8' ) == 0 ) {
+ if ( strcasecmp( $to, 'utf-8' ) == 0 ) {
return utf8_encode( $string );
}
return $string;
* @return string
*/
public static function mb_substr( $str, $start, $count = 'end' ) {
- if( $start != 0 ) {
+ if ( $start != 0 ) {
$split = self::mb_substr_split_unicode( $str, intval( $start ) );
$str = substr( $str, $split );
}
- if( $count !== 'end' ) {
+ if ( $count !== 'end' ) {
$split = self::mb_substr_split_unicode( $str, intval( $count ) );
$str = substr( $str, 0, $split );
}
* @return int
*/
public static function mb_substr_split_unicode( $str, $splitPos ) {
- if( $splitPos == 0 ) {
+ if ( $splitPos == 0 ) {
return 0;
}
$byteLen = strlen( $str );
- if( $splitPos > 0 ) {
- if( $splitPos > 256 ) {
+ if ( $splitPos > 0 ) {
+ if ( $splitPos > 256 ) {
// Optimize large string offsets by skipping ahead N bytes.
// This will cut out most of our slow time on Latin-based text,
// and 1/2 to 1/3 on East European and Asian scripts.
$bytePos = 0;
}
- while( $charPos++ < $splitPos ) {
+ while ( $charPos++ < $splitPos ) {
++$bytePos;
// Move past any tail bytes
while ( $bytePos < $byteLen && $str[$bytePos] >= "\x80" && $str[$bytePos] < "\xc0" ) {
$splitPosX = $splitPos + 1;
$charPos = 0; // relative to end of string; we don't care about the actual char position here
$bytePos = $byteLen;
- while( $bytePos > 0 && $charPos-- >= $splitPosX ) {
+ while ( $bytePos > 0 && $charPos-- >= $splitPosX ) {
--$bytePos;
// Move past any tail bytes
while ( $bytePos > 0 && $str[$bytePos] >= "\x80" && $str[$bytePos] < "\xc0" ) {
$total = 0;
// Count ASCII bytes
- for( $i = 0; $i < 0x80; $i++ ) {
+ for ( $i = 0; $i < 0x80; $i++ ) {
$total += $counts[$i];
}
// Count multibyte sequence heads
- for( $i = 0xc0; $i < 0xff; $i++ ) {
+ for ( $i = 0xc0; $i < 0xff; $i++ ) {
$total += $counts[$i];
}
return $total;
$ar = array();
preg_match( '/' . $needle . '/u', $haystack, $ar, PREG_OFFSET_CAPTURE, $offset );
- if( isset( $ar[0][1] ) ) {
+ if ( isset( $ar[0][1] ) ) {
return $ar[0][1];
} else {
return false;
$ar = array();
preg_match_all( '/' . $needle . '/u', $haystack, $ar, PREG_OFFSET_CAPTURE, $offset );
- if( isset( $ar[0] ) && count( $ar[0] ) > 0 &&
+ if ( isset( $ar[0] ) && count( $ar[0] ) > 0 &&
isset( $ar[0][count( $ar[0] ) - 1][1] ) ) {
return $ar[0][count( $ar[0] ) - 1][1];
} else {
global $wgRequest;
$ctype = $wgRequest->getVal( 'ctype', 'application/xml' );
$allowedctypes = array( 'application/xml', 'text/xml', 'application/rss+xml', 'application/atom+xml' );
- return (in_array( $ctype, $allowedctypes ) ? $ctype : 'application/xml');
+ return ( in_array( $ctype, $allowedctypes ) ? $ctype : 'application/xml' );
}
/**
function outItem( $item ) {
?>
<item>
- <title><?php print $item->getTitle() ?></title>
- <link><?php print wfExpandUrl( $item->getUrl(), PROTO_CURRENT ) ?></link>
- <guid<?php if( !$item->rssIsPermalink ) print ' isPermaLink="false"' ?>><?php print $item->getUniqueId() ?></guid>
+ <title><?php print $item->getTitle(); ?></title>
+ <link><?php print wfExpandUrl( $item->getUrl(), PROTO_CURRENT ); ?></link>
+ <guid<?php if ( !$item->rssIsPermalink ) { print ' isPermaLink="false"'; } ?>><?php print $item->getUniqueId(); ?></guid>
<description><?php print $item->getDescription() ?></description>
- <?php if( $item->getDate() ) { ?><pubDate><?php print $this->formatTime( $item->getDate() ) ?></pubDate><?php } ?>
- <?php if( $item->getAuthor() ) { ?><dc:creator><?php print $item->getAuthor() ?></dc:creator><?php }?>
- <?php if( $item->getComments() ) { ?><comments><?php print wfExpandUrl( $item->getComments(), PROTO_CURRENT ) ?></comments><?php }?>
+ <?php if ( $item->getDate() ) { ?><pubDate><?php print $this->formatTime( $item->getDate() ); ?></pubDate><?php } ?>
+ <?php if ( $item->getAuthor() ) { ?><dc:creator><?php print $item->getAuthor(); ?></dc:creator><?php }?>
+ <?php if ( $item->getComments() ) { ?><comments><?php print wfExpandUrl( $item->getComments(), PROTO_CURRENT ); ?></comments><?php }?>
</item>
<?php
}
global $wgMimeType;
?>
<entry>
- <id><?php print $item->getUniqueId() ?></id>
- <title><?php print $item->getTitle() ?></title>
- <link rel="alternate" type="<?php print $wgMimeType ?>" href="<?php print wfExpandUrl( $item->getUrl(), PROTO_CURRENT ) ?>"/>
- <?php if( $item->getDate() ) { ?>
- <updated><?php print $this->formatTime( $item->getDate() ) ?>Z</updated>
+ <id><?php print $item->getUniqueId(); ?></id>
+ <title><?php print $item->getTitle(); ?></title>
+ <link rel="alternate" type="<?php print $wgMimeType ?>" href="<?php print wfExpandUrl( $item->getUrl(), PROTO_CURRENT ); ?>"/>
+ <?php if ( $item->getDate() ) { ?>
+ <updated><?php print $this->formatTime( $item->getDate() ); ?>Z</updated>
<?php } ?>
<summary type="html"><?php print $item->getDescription() ?></summary>
- <?php if( $item->getAuthor() ) { ?><author><name><?php print $item->getAuthor() ?></name></author><?php }?>
+ <?php if ( $item->getAuthor() ) { ?><author><name><?php print $item->getAuthor(); ?></name></author><?php }?>
</entry>
<?php /* @todo FIXME: Need to add comments
return false;
}
- if( !isset( $wgFeedClasses[$type] ) ) {
+ if ( !isset( $wgFeedClasses[$type] ) ) {
$wgOut->addWikiMsg( 'feed-invalid' );
return false;
}
$titleObj = Title::makeTitle( $row->rc_namespace, $row->rc_title );
$timestamp = wfTimestamp( TS_MW, $row->rc_timestamp );
$actiontext = '';
- if( $row->rc_type == RC_LOG ) {
+ if ( $row->rc_type == RC_LOG ) {
$rcRow = (array)$row; // newFromRow() only accepts arrays for RC rows
$actiontext = LogFormatter::newFromRow( $rcRow )->getActionText();
}
// Can't diff special pages, unreadable pages or pages with no new revision
// to compare against: just return the text.
- if( $title->getNamespace() < 0 || $accErrors || !$newid ) {
+ if ( $title->getNamespace() < 0 || $accErrors || !$newid ) {
wfProfileOut( __METHOD__ );
return $completeText;
}
- if( $oldid ) {
+ if ( $oldid ) {
wfProfileIn( __METHOD__ . "-dodiff" );
#$diffText = $de->getDiff( wfMessage( 'revisionasof',
wfProfileOut( __METHOD__ . "-dodiff" );
} else {
$rev = Revision::newFromId( $newid );
- if( $wgFeedDiffCutoff <= 0 || is_null( $rev ) ) {
+ if ( $wgFeedDiffCutoff <= 0 || is_null( $rev ) ) {
$newContent = ContentHandler::getForTitle( $title )->makeEmptyContent();
} else {
$newContent = $rev->getContent();
'diffchange' => 'font-weight: bold; text-decoration: none;',
);
- foreach( $styles as $class => $style ) {
+ foreach ( $styles as $class => $style ) {
$text = preg_replace( "/(<[^>]+)class=(['\"])$class\\2([^>]*>)/",
"\\1style=\"$style\"\\3", $text );
}
# Flag to hide all contents of the archived revisions
$suppress = $wgRequest->getVal( 'wpSuppress' ) && $wgUser->isAllowed( 'suppressrevision' );
- if( $this->oldimage ) {
+ if ( $this->oldimage ) {
$this->oldfile = RepoGroup::singleton()->getLocalRepo()->newFromArchiveName( $this->title, $this->oldimage );
}
- if( !self::haveDeletableFile( $this->file, $this->oldfile, $this->oldimage ) ) {
+ if ( !self::haveDeletableFile( $this->file, $this->oldfile, $this->oldimage ) ) {
$wgOut->addHTML( $this->prepareMessage( 'filedelete-nofile' ) );
$wgOut->addReturnTo( $this->title );
return;
}
// Perform the deletion if appropriate
- if( $wgRequest->wasPosted() && $wgUser->matchEditToken( $token, $this->oldimage ) ) {
+ if ( $wgRequest->wasPosted() && $wgUser->matchEditToken( $token, $this->oldimage ) ) {
$deleteReasonList = $wgRequest->getText( 'wpDeleteReasonList' );
$deleteReason = $wgRequest->getText( 'wpReason' );
$status = self::doDelete( $this->title, $this->file, $this->oldimage, $reason, $suppress, $wgUser );
- if( !$status->isGood() ) {
+ if ( !$status->isGood() ) {
$wgOut->addHTML( '<h2>' . $this->prepareMessage( 'filedeleteerror-short' ) . "</h2>\n" );
$wgOut->addWikiText( '<div class="error">' . $status->getWikiText( 'filedeleteerror-short', 'filedeleteerror-long' ) . '</div>' );
}
- if( $status->ok ) {
+ if ( $status->ok ) {
$wgOut->setPageTitle( wfMessage( 'actioncomplete' ) );
$wgOut->addHTML( $this->prepareMessage( 'filedelete-success' ) );
// Return to the main page if we just deleted all versions of the
$user = $wgUser;
}
- if( $oldimage ) {
+ if ( $oldimage ) {
$page = null;
$status = $file->deleteOld( $oldimage, $reason, $suppress );
- if( $status->ok ) {
+ if ( $status->ok ) {
// Need to do a log item
$logComment = wfMessage( 'deletedrevision', $oldimage )->inContentLanguage()->text();
- if( trim( $reason ) != '' ) {
+ if ( trim( $reason ) != '' ) {
$logComment .= wfMessage( 'colon-separator' )
->inContentLanguage()->text() . $reason;
}
// or revision is missing, so check for isOK() rather than isGood()
if ( $deleteStatus->isOK() ) {
$status = $file->delete( $reason, $suppress );
- if( $status->isOK() ) {
+ if ( $status->isOK() ) {
$dbw->commit( __METHOD__ );
} else {
$dbw->rollback( __METHOD__ );
private function showForm() {
global $wgOut, $wgUser, $wgRequest;
- if( $wgUser->isAllowed( 'suppressrevision' ) ) {
+ if ( $wgUser->isAllowed( 'suppressrevision' ) ) {
$suppress = "<tr id=\"wpDeleteSuppressRow\">
<td></td>
<td class='mw-input'><strong>" .
"</td>
</tr>
{$suppress}";
- if( $wgUser->isLoggedIn() ) {
+ if ( $wgUser->isLoggedIn() ) {
$form .= "
<tr>
<td></td>
*/
private function prepareMessage( $message ) {
global $wgLang;
- if( $this->oldimage ) {
+ if ( $this->oldimage ) {
return wfMessage(
"{$message}-old", # To ensure grep will find them: 'filedelete-intro-old', 'filedelete-nofile-old', 'filedelete-success-old'
wfEscapeWikiText( $this->title->getText() ),
$q = array();
$q['action'] = 'delete';
- if( $this->oldimage ) {
+ if ( $this->oldimage ) {
$q['oldimage'] = $this->oldimage;
}
if ( function_exists( 'pcntl_signal_dispatch' ) ) {
pcntl_signal_dispatch();
} else {
- declare (ticks=1) { $status = $status; }
+ declare( ticks = 1 ) {
+ $status = $status;
+ }
}
// Respond to TERM signal
if ( $this->termReceived ) {
switch( $type ) {
case self::BOOL:
- $value = $r->getBool( $name, $default ); break;
+ $value = $r->getBool( $name, $default );
+ break;
case self::INT:
- $value = $r->getInt( $name, $default ); break;
+ $value = $r->getInt( $name, $default );
+ break;
case self::STRING:
- $value = $r->getText( $name, $default ); break;
+ $value = $r->getText( $name, $default );
+ break;
case self::INTNULL:
- $value = $r->getIntOrNull( $name ); break;
+ $value = $r->getIntOrNull( $name );
+ break;
default:
throw new MWException( 'Unsupported datatype' );
}
if ( isset( $configArray['remote origin'] ) ) {
$remote = $configArray['remote origin'];
} else {
- foreach( $configArray as $sectionName => $sectionConf ) {
+ foreach ( $configArray as $sectionName => $sectionConf ) {
if ( substr( $sectionName, 0, 6 ) == 'remote' ) {
$remote = $sectionConf;
}
if ( substr( $url, -4 ) !== '.git' ) {
$url .= '.git';
}
- foreach( self::getViewers() as $repo => $viewer ) {
+ foreach ( self::getViewers() as $repo => $viewer ) {
$pattern = '#^' . $repo . '$#';
if ( preg_match( $pattern, $url ) ) {
$viewerUrl = preg_replace( $pattern, $viewer, $url );
protected static function getViewers() {
global $wgGitRepositoryViewers;
- if( self::$viewers === false ) {
+ if ( self::$viewers === false ) {
self::$viewers = $wgGitRepositoryViewers;
wfRunHooks( 'GitViewers', array( &self::$viewers ) );
}
* PHP extensions may be included here.
*/
-if( !function_exists( 'iconv' ) ) {
+if ( !function_exists( 'iconv' ) ) {
/**
* @codeCoverageIgnore
* @return string
}
}
-if( !function_exists( 'mb_strpos' ) ) {
+if ( !function_exists( 'mb_strpos' ) ) {
/**
* @codeCoverageIgnore
* @return int
}
-if( !function_exists( 'mb_strrpos' ) ) {
+if ( !function_exists( 'mb_strrpos' ) ) {
/**
* @codeCoverageIgnore
* @return int
} else {
reset( $a );
reset( $b );
- while( ( list( , $valueA ) = each( $a ) ) && ( list( , $valueB ) = each( $b ) ) ) {
+ while ( ( list( , $valueA ) = each( $a ) ) && ( list( , $valueB ) = each( $b ) ) ) {
$cmp = strcmp( $valueA, $valueB );
if ( $cmp !== 0 ) {
return $cmp;
*/
function wfObjectToArray( $objOrArray, $recursive = true ) {
$array = array();
- if( is_object( $objOrArray ) ) {
+ if ( is_object( $objOrArray ) ) {
$objOrArray = get_object_vars( $objOrArray );
}
foreach ( $objOrArray as $key => $value ) {
if ( is_array( $query ) ) {
$query = wfArrayToCgi( $query );
}
- if( $query != '' ) {
- if( false === strpos( $url, '?' ) ) {
+ if ( $query != '' ) {
+ if ( false === strpos( $url, '?' ) ) {
$url .= '?';
} else {
$url .= '&';
*/
function wfDebugMem( $exact = false ) {
$mem = memory_get_usage();
- if( !$exact ) {
+ if ( !$exact ) {
$mem = floor( $mem / 1024 ) . ' kilobytes';
} else {
$mem .= ' bytes';
function wfDebugLog( $logGroup, $text, $public = true ) {
global $wgDebugLogGroups;
$text = trim( $text ) . "\n";
- if( isset( $wgDebugLogGroups[$logGroup] ) ) {
+ if ( isset( $wgDebugLogGroups[$logGroup] ) ) {
$time = wfTimestamp( TS_DB );
$wiki = wfWikiID();
$host = wfHostname();
function wfGetLangObj( $langcode = false ) {
# Identify which language to get or create a language object for.
# Using is_object here due to Stub objects.
- if( is_object( $langcode ) ) {
+ if ( is_object( $langcode ) ) {
# Great, we already have the object (hopefully)!
return $langcode;
}
global $wgContLang, $wgLanguageCode;
- if( $langcode === true || $langcode === $wgLanguageCode ) {
+ if ( $langcode === true || $langcode === $wgLanguageCode ) {
# $langcode is the language code of the wikis content language object.
# or it is a boolean and value is true
return $wgContLang;
}
global $wgLang;
- if( $langcode === false || $langcode === $wgLang->getCode() ) {
+ if ( $langcode === false || $langcode === $wgLang->getCode() ) {
# $langcode is the language code of user language object.
# or it was a boolean and value is false
return $wgLang;
}
$validCodes = array_keys( Language::fetchLanguageNames() );
- if( in_array( $langcode, $validCodes ) ) {
+ if ( in_array( $langcode, $validCodes ) ) {
# $langcode corresponds to a valid language.
return Language::factory( $langcode );
}
$args = func_get_args();
array_shift( $args );
$forcontent = true;
- if( is_array( $wgForceUIMsgAsContentMsg ) &&
+ if ( is_array( $wgForceUIMsgAsContentMsg ) &&
in_array( $key, $wgForceUIMsgAsContentMsg ) )
{
$forcontent = false;
$args = func_get_args();
array_shift( $args );
$forcontent = true;
- if( is_array( $wgForceUIMsgAsContentMsg ) &&
+ if ( is_array( $wgForceUIMsgAsContentMsg ) &&
in_array( $key, $wgForceUIMsgAsContentMsg ) )
{
$forcontent = false;
$cache = MessageCache::singleton();
$message = $cache->get( $key, $useDB, $langCode );
- if( $message === false ) {
+ if ( $message === false ) {
$message = '<' . htmlspecialchars( $key ) . '>';
} elseif ( $transform ) {
$message = $cache->transform( $message );
$args = array_values( $args[0] );
}
$replacementKeys = array();
- foreach( $args as $n => $param ) {
+ foreach ( $args as $n => $param ) {
$replacementKeys['$' . ( $n + 1 )] = $param;
}
$message = strtr( $message, $replacementKeys );
array_shift( $args );
$options = (array)$options;
- foreach( $options as $arrayKey => $option ) {
- if( !preg_match( '/^[0-9]+|language$/', $arrayKey ) ) {
+ foreach ( $options as $arrayKey => $option ) {
+ if ( !preg_match( '/^[0-9]+|language$/', $arrayKey ) ) {
# An unknown index, neither numeric nor "language"
wfWarn( "wfMsgExt called with incorrect parameter key $arrayKey", 1, E_USER_WARNING );
- } elseif( preg_match( '/^[0-9]+$/', $arrayKey ) && !in_array( $option,
+ } elseif ( preg_match( '/^[0-9]+$/', $arrayKey ) && !in_array( $option,
array( 'parse', 'parseinline', 'escape', 'escapenoentities',
'replaceafter', 'parsemag', 'content' ) ) ) {
# A numeric index with unknown value
}
}
- if( in_array( 'content', $options, true ) ) {
+ if ( in_array( 'content', $options, true ) ) {
$forContent = true;
$langCode = true;
$langCodeObj = null;
- } elseif( array_key_exists( 'language', $options ) ) {
+ } elseif ( array_key_exists( 'language', $options ) ) {
$forContent = false;
$langCode = wfGetLangObj( $options['language'] );
$langCodeObj = $langCode;
$string = wfMsgGetKey( $key, /*DB*/true, $langCode, /*Transform*/false );
- if( !in_array( 'replaceafter', $options, true ) ) {
+ if ( !in_array( 'replaceafter', $options, true ) ) {
$string = wfMsgReplaceArgs( $string, $args );
}
$messageCache = MessageCache::singleton();
$parseInline = in_array( 'parseinline', $options, true );
- if( in_array( 'parse', $options, true ) || $parseInline ) {
+ if ( in_array( 'parse', $options, true ) || $parseInline ) {
$string = $messageCache->parse( $string, null, true, !$forContent, $langCodeObj );
if ( $string instanceof ParserOutput ) {
$string = $string->getText();
if ( $parseInline ) {
$m = array();
- if( preg_match( '/^<p>(.*)\n?<\/p>\n?$/sU', $string, $m ) ) {
+ if ( preg_match( '/^<p>(.*)\n?<\/p>\n?$/sU', $string, $m ) ) {
$string = $m[1];
}
}
$string = Sanitizer::escapeHtmlAllowEntities( $string );
}
- if( in_array( 'replaceafter', $options, true ) ) {
+ if ( in_array( 'replaceafter', $options, true ) ) {
$string = wfMsgReplaceArgs( $string, $args );
}
# Hostname overriding
global $wgOverrideHostname;
- if( $wgOverrideHostname !== false ) {
+ if ( $wgOverrideHostname !== false ) {
# Set static and skip any detection
$host = $wgOverrideHostname;
return $host;
} else {
$uname = false;
}
- if( is_array( $uname ) && isset( $uname['nodename'] ) ) {
+ if ( is_array( $uname ) && isset( $uname['nodename'] ) ) {
$host = $uname['nodename'];
} elseif ( getenv( 'COMPUTERNAME' ) ) {
# Windows computer name
function wfDebugBacktrace( $limit = 0 ) {
static $disabled = null;
- if( extension_loaded( 'Zend Optimizer' ) ) {
+ if ( extension_loaded( 'Zend Optimizer' ) ) {
wfDebug( "Zend Optimizer detected; skipping debug_backtrace for safety.\n" );
return array();
}
$msg = "<ul>\n";
}
$backtrace = wfDebugBacktrace();
- foreach( $backtrace as $call ) {
- if( isset( $call['file'] ) ) {
+ foreach ( $backtrace as $call ) {
+ if ( isset( $call['file'] ) ) {
$f = explode( DIRECTORY_SEPARATOR, $call['file'] );
$file = $f[count( $f ) - 1];
} else {
$file = '-';
}
- if( isset( $call['line'] ) ) {
+ if ( isset( $call['line'] ) ) {
$line = $call['line'];
} else {
$line = '-';
} else {
$msg .= '<li>' . $file . ' line ' . $line . ' calls ';
}
- if( !empty( $call['class'] ) ) {
+ if ( !empty( $call['class'] ) ) {
$msg .= $call['class'] . $call['type'];
}
$msg .= $call['function'] . '()';
$query = wfCgiToArray( $query );
- if( is_object( $link ) ) {
+ if ( is_object( $link ) ) {
$title = $link;
} else {
$title = Title::newFromText( $link );
- if( is_null( $title ) ) {
+ if ( is_null( $title ) ) {
return false;
}
}
static $result = null;
if ( $result === null || $force ) {
$result = false;
- if( isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) ) {
+ if ( isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) ) {
# @todo FIXME: We may want to blacklist some broken browsers
$m = array();
- if( preg_match(
+ if ( preg_match(
'/\bgzip(?:;(q)=([0-9]+(?:\.[0-9]+)))?\b/',
$_SERVER['HTTP_ACCEPT_ENCODING'],
$m )
)
{
- if( isset( $m[2] ) && ( $m[1] == 'q' ) && ( $m[2] == 0 ) ) {
+ if ( isset( $m[2] ) && ( $m[1] == 'q' ) && ( $m[2] == 0 ) ) {
$result = false;
return $result;
}
* @param $resetGzipEncoding Bool
*/
function wfResetOutputBuffers( $resetGzipEncoding = true ) {
- if( $resetGzipEncoding ) {
+ if ( $resetGzipEncoding ) {
// Suppress Content-Encoding and Content-Length
// headers from 1.10+s wfOutputHandler
global $wgDisableOutputCompression;
$wgDisableOutputCompression = true;
}
- while( $status = ob_get_status() ) {
- if( $status['type'] == 0 /* PHP_OUTPUT_HANDLER_INTERNAL */ ) {
+ while ( $status = ob_get_status() ) {
+ if ( $status['type'] == 0 /* PHP_OUTPUT_HANDLER_INTERNAL */ ) {
// Probably from zlib.output_compression or other
// PHP-internal setting which can't be removed.
//
// output behavior.
break;
}
- if( !ob_end_clean() ) {
+ if ( !ob_end_clean() ) {
// Could not remove output buffer handler; abort now
// to avoid getting in some kind of infinite loop.
break;
}
- if( $resetGzipEncoding ) {
- if( $status['name'] == 'ob_gzhandler' ) {
+ if ( $resetGzipEncoding ) {
+ if ( $status['name'] == 'ob_gzhandler' ) {
// Reset the 'Content-Encoding' field set by this handler
// so we can start fresh.
header_remove( 'Content-Encoding' );
*/
function wfAcceptToPrefs( $accept, $def = '*/*' ) {
# No arg means accept anything (per HTTP spec)
- if( !$accept ) {
+ if ( !$accept ) {
return array( $def => 1.0 );
}
$parts = explode( ',', $accept );
- foreach( $parts as $part ) {
+ foreach ( $parts as $part ) {
# @todo FIXME: Doesn't deal with params like 'text/html; level=1'
$values = explode( ';', trim( $part ) );
$match = array();
* @private
*/
function mimeTypeMatch( $type, $avail ) {
- if( array_key_exists( $type, $avail ) ) {
+ if ( array_key_exists( $type, $avail ) ) {
return $type;
} else {
$parts = explode( '/', $type );
- if( array_key_exists( $parts[0] . '/*', $avail ) ) {
+ if ( array_key_exists( $parts[0] . '/*', $avail ) ) {
return $parts[0] . '/*';
- } elseif( array_key_exists( '*/*', $avail ) ) {
+ } elseif ( array_key_exists( '*/*', $avail ) ) {
return '*/*';
} else {
return null;
function wfNegotiateType( $cprefs, $sprefs ) {
$combine = array();
- foreach( array_keys( $sprefs ) as $type ) {
+ foreach ( array_keys( $sprefs ) as $type ) {
$parts = explode( '/', $type );
- if( $parts[1] != '*' ) {
+ if ( $parts[1] != '*' ) {
$ckey = mimeTypeMatch( $type, $cprefs );
- if( $ckey ) {
+ if ( $ckey ) {
$combine[$type] = $sprefs[$type] * $cprefs[$ckey];
}
}
}
- foreach( array_keys( $cprefs ) as $type ) {
+ foreach ( array_keys( $cprefs ) as $type ) {
$parts = explode( '/', $type );
- if( $parts[1] != '*' && !array_key_exists( $type, $sprefs ) ) {
+ if ( $parts[1] != '*' && !array_key_exists( $type, $sprefs ) ) {
$skey = mimeTypeMatch( $type, $sprefs );
- if( $skey ) {
+ if ( $skey ) {
$combine[$type] = $sprefs[$skey] * $cprefs[$type];
}
}
$bestq = 0;
$besttype = null;
- foreach( array_keys( $combine ) as $type ) {
- if( $combine[$type] > $bestq ) {
+ foreach ( array_keys( $combine ) as $type ) {
+ if ( $combine[$type] > $bestq ) {
$besttype = $type;
$bestq = $combine[$type];
}
* @return String
*/
function wfTimestampOrNull( $outputtype = TS_UNIX, $ts = null ) {
- if( is_null( $ts ) ) {
+ if ( is_null( $ts ) ) {
return null;
} else {
return wfTimestamp( $outputtype, $ts );
$tmpDir = array_map( "getenv", array( 'TMPDIR', 'TMP', 'TEMP' ) );
- foreach( $tmpDir as $tmp ) {
- if( $tmp && file_exists( $tmp ) && is_dir( $tmp ) && is_writable( $tmp ) ) {
+ foreach ( $tmpDir as $tmp ) {
+ if ( $tmp && file_exists( $tmp ) && is_dir( $tmp ) && is_writable( $tmp ) ) {
return $tmp;
}
}
wfDebug( "$caller: called wfMkdirParents($dir)\n" );
}
- if( strval( $dir ) === '' || file_exists( $dir ) ) {
+ if ( strval( $dir ) === '' || file_exists( $dir ) ) {
return true;
}
$ok = mkdir( $dir, $mode, true ); // PHP5 <3
wfRestoreWarnings();
- if( !$ok ) {
+ if ( !$ok ) {
// PHP doesn't report the path in its warning message, so add our own to aid in diagnosis.
wfLogWarning( sprintf( "failed to mkdir \"%s\" mode 0%o", $dir, $mode ) );
}
function in_string( $needle, $str, $insensitive = false ) {
wfDeprecated( __METHOD__, '1.21' );
$func = 'strpos';
- if( $insensitive ) $func = 'stripos';
+ if ( $insensitive ) {
+ $func = 'stripos';
+ }
return $func( $str, $needle ) !== false;
}
* @return Bool - Whether or not the extension is loaded
*/
function wfDl( $extension, $fileName = null ) {
- if( extension_loaded( $extension ) ) {
+ if ( extension_loaded( $extension ) ) {
return true;
}
$canDl = false;
- if( PHP_SAPI == 'cli' || PHP_SAPI == 'cgi' || PHP_SAPI == 'embed' ) {
+ if ( PHP_SAPI == 'cli' || PHP_SAPI == 'cgi' || PHP_SAPI == 'embed' ) {
$canDl = ( function_exists( 'dl' ) && is_callable( 'dl' )
&& wfIniGetBool( 'enable_dl' ) && !wfIniGetBool( 'safe_mode' ) );
}
- if( $canDl ) {
+ if ( $canDl ) {
$fileName = $fileName ? $fileName : $extension;
- if( wfIsWindows() ) {
+ if ( wfIsWindows() ) {
$fileName = 'php_' . $fileName;
}
wfSuppressWarnings();
static $disabled;
if ( is_null( $disabled ) ) {
$disabled = false;
- if( wfIniGetBool( 'safe_mode' ) ) {
+ if ( wfIniGetBool( 'safe_mode' ) ) {
wfDebug( "wfShellExec can't run in safe_mode, PHP's exec functions are too broken.\n" );
$disabled = 'safemode';
} else {
wfInitShellLocale();
$envcmd = '';
- foreach( $environ as $k => $v ) {
+ foreach ( $environ as $k => $v ) {
if ( wfIsWindows() ) {
/* Surrounding a set in quotes (method used by wfEscapeShellArg) makes the quotes themselves
* appear in the environment variable, so we must use carat escaping as documented in
$haveDiff3 = $wgDiff3 && file_exists( $wgDiff3 );
wfRestoreWarnings();
- if( !$haveDiff3 ) {
+ if ( !$haveDiff3 ) {
wfDebug( "diff3 not found\n" );
return false;
}
wfEscapeShellArg( $yourtextName );
$handle = popen( $cmd, 'r' );
- if( fgets( $handle, 1024 ) ) {
+ if ( fgets( $handle, 1024 ) ) {
$conflict = true;
} else {
$conflict = false;
# This check may also protect against code injection in
# case of broken installations.
- if( !$haveDiff ) {
+ if ( !$haveDiff ) {
wfDebug( "diff executable not found\n" );
$diffs = new Diff( explode( "\n", $before ), explode( "\n", $after ) );
$format = new UnifiedDiffFormatter();
? ''
: ( '(?:' . preg_quote( $suffix, '#' ) . ')?' );
$matches = array();
- if( preg_match( "#([^/\\\\]*?){$encSuffix}[/\\\\]*$#", $path, $matches ) ) {
+ if ( preg_match( "#([^/\\\\]*?){$encSuffix}[/\\\\]*$#", $path, $matches ) ) {
return $matches[1];
} else {
return '';
$pieces = explode( DIRECTORY_SEPARATOR, dirname( $path ) );
$against = explode( DIRECTORY_SEPARATOR, $from );
- if( $pieces[0] !== $against[0] ) {
+ if ( $pieces[0] !== $against[0] ) {
// Non-matching Windows drive letters?
// Return a full path.
return $path;
}
// Trim off common prefix
- while( count( $pieces ) && count( $against )
+ while ( count( $pieces ) && count( $against )
&& $pieces[0] == $against[0] ) {
array_shift( $pieces );
array_shift( $against );
}
// relative dots to bump us to the parent
- while( count( $against ) ) {
+ while ( count( $against ) ) {
array_unshift( $pieces, '..' );
array_shift( $against );
}
*/
function wfBaseConvert( $input, $sourceBase, $destBase, $pad = 1, $lowercase = true, $engine = 'auto' ) {
$input = (string)$input;
- if(
+ if (
$sourceBase < 2 ||
$sourceBase > 36 ||
$destBase < 2 ||
'u' => 30, 'v' => 31, 'w' => 32, 'x' => 33, 'y' => 34, 'z' => 35
);
- if( extension_loaded( 'gmp' ) && ( $engine == 'auto' || $engine == 'gmp' ) ) {
+ if ( extension_loaded( 'gmp' ) && ( $engine == 'auto' || $engine == 'gmp' ) ) {
$result = gmp_strval( gmp_init( $input, $sourceBase ), $destBase );
- } elseif( extension_loaded( 'bcmath' ) && ( $engine == 'auto' || $engine == 'bcmath' ) ) {
+ } elseif ( extension_loaded( 'bcmath' ) && ( $engine == 'auto' || $engine == 'bcmath' ) ) {
$decimal = '0';
- foreach( str_split( strtolower( $input ) ) as $char ) {
+ foreach ( str_split( strtolower( $input ) ) as $char ) {
$decimal = bcmul( $decimal, $sourceBase );
$decimal = bcadd( $decimal, $baseChars[$char] );
}
- for( $result = ''; bccomp( $decimal, 0 ); $decimal = bcdiv( $decimal, $destBase, 0 ) ) {
+ for ( $result = ''; bccomp( $decimal, 0 ); $decimal = bcdiv( $decimal, $destBase, 0 ) ) {
$result .= $baseChars[bcmod( $decimal, $destBase )];
}
$result = strrev( $result );
} else {
$inDigits = array();
- foreach( str_split( strtolower( $input ) ) as $char ) {
+ foreach ( str_split( strtolower( $input ) ) as $char ) {
$inDigits[] = $baseChars[$char];
}
// Iterate over the input, modulo-ing out an output digit
// at a time until input is gone.
$result = '';
- while( $inDigits ) {
+ while ( $inDigits ) {
$work = 0;
$workDigits = array();
// Long division...
- foreach( $inDigits as $digit ) {
+ foreach ( $inDigits as $digit ) {
$work *= $sourceBase;
$work += $digit;
- if( $workDigits || $work >= $destBase ) {
+ if ( $workDigits || $work >= $destBase ) {
$workDigits[] = (int) ( $work / $destBase );
}
$work %= $destBase;
$result = strrev( $result );
}
- if( !$lowercase ) {
+ if ( !$lowercase ) {
$result = strtoupper( $result );
}
function wfHttpOnlySafe() {
global $wgHttpOnlyBlacklist;
- if( isset( $_SERVER['HTTP_USER_AGENT'] ) ) {
- foreach( $wgHttpOnlyBlacklist as $regex ) {
- if( preg_match( $regex, $_SERVER['HTTP_USER_AGENT'] ) ) {
+ if ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) {
+ foreach ( $wgHttpOnlyBlacklist as $regex ) {
+ if ( preg_match( $regex, $_SERVER['HTTP_USER_AGENT'] ) ) {
return false;
}
}
function wfSetupSession( $sessionId = false ) {
global $wgSessionsInMemcached, $wgSessionsInObjectCache, $wgCookiePath, $wgCookieDomain,
$wgCookieSecure, $wgCookieHttpOnly, $wgSessionHandler;
- if( $wgSessionsInObjectCache || $wgSessionsInMemcached ) {
+ if ( $wgSessionsInObjectCache || $wgSessionsInMemcached ) {
ObjectCacheSessionHandler::install();
- } elseif( $wgSessionHandler && $wgSessionHandler != ini_get( 'session.save_handler' ) ) {
+ } elseif ( $wgSessionHandler && $wgSessionHandler != ini_get( 'session.save_handler' ) ) {
# Only set this if $wgSessionHandler isn't null and session.save_handler
# hasn't already been set to the desired value (that causes errors)
ini_set( 'session.save_handler', $wgSessionHandler );
global $wgScriptPath, $wgScriptExtension, $wgScript, $wgLoadScript;
if ( $script === 'index' ) {
return $wgScript;
- } else if ( $script === 'load' ) {
+ } elseif ( $script === 'load' ) {
return $wgLoadScript;
} else {
return "{$wgScriptPath}/{$script}{$wgScriptExtension}";
* @return string script URL
*/
function wfGetScriptUrl() {
- if( isset( $_SERVER['SCRIPT_NAME'] ) ) {
+ if ( isset( $_SERVER['SCRIPT_NAME'] ) ) {
#
# as it was called, minus the query string.
#
function wfMemoryLimit() {
global $wgMemoryLimit;
$memlimit = wfShorthandToInteger( ini_get( 'memory_limit' ) );
- if( $memlimit != -1 ) {
+ if ( $memlimit != -1 ) {
$conflimit = wfShorthandToInteger( $wgMemoryLimit );
- if( $conflimit == -1 ) {
+ if ( $conflimit == -1 ) {
wfDebug( "Removing PHP's memory limit\n" );
wfSuppressWarnings();
ini_set( 'memory_limit', $conflimit );
*/
function wfShorthandToInteger( $string = '' ) {
$string = trim( $string );
- if( $string === '' ) {
+ if ( $string === '' ) {
return -1;
}
$last = $string[strlen( $string ) - 1];
foreach ( $codeSegment as $segNo => $seg ) {
if ( count( $codeSegment ) > 0 ) {
// when previous segment is x, it is a private segment and should be lc
- if( $segNo > 0 && strtolower( $codeSegment[( $segNo - 1 )] ) == 'x' ) {
+ if ( $segNo > 0 && strtolower( $codeSegment[( $segNo - 1 )] ) == 'x' ) {
$codeBCP[$segNo] = strtolower( $seg );
// ISO 3166 country code
} elseif ( ( strlen( $seg ) == 2 ) && ( $segNo > 0 ) ) {
# Handle redirects
$redirectTitle = RepoGroup::singleton()->checkRedirect( Title::makeTitle( NS_FILE, $name ) );
- if( $redirectTitle ) {
+ if ( $redirectTitle ) {
$name = $redirectTitle->getDBkey();
}
# Run the extension hook
$bad = false;
- if( !wfRunHooks( 'BadImage', array( $name, &$bad ) ) ) {
+ if ( !wfRunHooks( 'BadImage', array( $name, &$bad ) ) ) {
wfProfileOut( __METHOD__ );
return $bad;
}
$cacheable = ( $blacklist === null );
- if( $cacheable && $badImageCache !== null ) {
+ if ( $cacheable && $badImageCache !== null ) {
$badImages = $badImageCache;
} else { // cache miss
if ( $blacklist === null ) {
# Build the list now
$badImages = array();
$lines = explode( "\n", $blacklist );
- foreach( $lines as $line ) {
+ foreach ( $lines as $line ) {
# List items only
if ( substr( $line, 0, 1 ) !== '*' ) {
continue;
* done already.
* @deprecated since 1.18 load modules with ResourceLoader instead
*/
- static function addJS() { wfDeprecated( __METHOD__, '1.18' ); }
+ static function addJS() {
+ wfDeprecated( __METHOD__, '1.18' );
+ }
/**
* Initialise a new Object for the field
$validOptions = HTMLFormField::flattenOptions( $this->mParams['options'] );
- if ( in_array( $value, $validOptions ) )
+ if ( in_array( $value, $validOptions ) ) {
return true;
- else
+ } else {
return $this->msg( 'htmlform-select-badoption' )->parse();
+ }
}
function getInputHTML( $value ) {
return $this->getTableRow( $value );
}
- public function getInputHTML( $value ) { return ''; }
+ public function getInputHTML( $value ) {
+ return '';
+ }
}
/**
* Add a submit button inline in the form (as opposed to
* HTMLForm::addButton(), which will add it at the end).
*/
-class HTMLSubmitField extends HTMLFormField {
+class HTMLSubmitField extends HTMLButtonField {
+ protected $buttonType = 'submit';
+}
+
+/**
+ * Adds a generic button inline to the form. Does not do anything, you must add
+ * click handling code in JavaScript. Use a HTMLSubmitField if you merely
+ * wish to add a submit button to a form.
+ *
+ * @since 1.22
+ */
+class HTMLButtonField extends HTMLFormField {
+ protected $buttonType = 'button';
public function __construct( $info ) {
$info['nodata'] = true;
public function getInputHTML( $value ) {
$attr = array(
'class' => 'mw-htmlform-submit ' . $this->mClass,
- 'name' => $this->mName,
'id' => $this->mID,
);
$attr['disabled'] = 'disabled';
}
- return Xml::submitButton( $value, $attr );
+ return Html::input(
+ $this->mName,
+ $value,
+ $this->buttonType,
+ $attr
+ );
}
protected function needsLabel() {
--- /dev/null
+<?php
+/**
+ * Convenience class for weighted consistent hash rings.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @author Aaron Schulz
+ */
+
+/**
+ * Convenience class for weighted consistent hash rings
+ *
+ * @since 1.22
+ */
+class HashRing {
+ /** @var Array (location => (start, end)) */
+ protected $ring = array();
+
+ const RING_SIZE = 268435456; // 2^28
+
+ /**
+ * @param array $map (location => weight)
+ */
+ public function __construct( array $map ) {
+ $sum = array_sum( $map );
+ if ( !count( $map ) || $sum <= 0 ) {
+ throw new MWException( "Ring is empty or all weights are zero." );
+ }
+ // Sort the locations based on the hash of their names
+ $hashes = array();
+ foreach ( $map as $location => $weight ) {
+ $hashes[$location] = sha1( $location );
+ }
+ uksort( $map, function ( $a, $b ) use ( $hashes ) {
+ return strcmp( $hashes[$a], $hashes[$b] );
+ } );
+ // Fit the map to weight-proportionate one with a space of size RING_SIZE
+ $standardMap = array();
+ foreach ( $map as $location => $weight ) {
+ $standardMap[$location] = (int)floor( $weight / $sum * self::RING_SIZE );
+ }
+ // Build a ring of RING_SIZE spots, with each location at a spot in location hash order
+ $index = 0;
+ foreach ( $standardMap as $location => $weight ) {
+ // Location covers half-closed interval [$index,$index + $weight)
+ $this->ring[$location] = array( $index, $index + $weight );
+ $index += $weight;
+ }
+ // Make sure the last location covers what is left
+ end( $this->ring );
+ $this->ring[key( $this->ring )][1] = self::RING_SIZE;
+ }
+
+ /**
+ * Get the location of an item on the ring
+ *
+ * @param string $item
+ * @return string Location
+ */
+ public function getLocation( $item ) {
+ $locations = $this->getLocations( $item, 1 );
+ return $locations[0];
+ }
+
+ /**
+ * Get the location of an item on the ring, as well as the next clockwise locations
+ *
+ * @param string $item
+ * @param integer $limit Maximum number of locations to return
+ * @return array List of locations
+ */
+ public function getLocations( $item, $limit ) {
+ $locations = array();
+ $primaryLocation = null;
+ $spot = hexdec( substr( sha1( $item ), 0, 7 ) ); // first 28 bits
+ foreach ( $this->ring as $location => $range ) {
+ if ( count( $locations ) >= $limit ) {
+ break;
+ }
+ // The $primaryLocation is the location the item spot is in.
+ // After that is reached, keep appending the next locations.
+ if ( ( $range[0] <= $spot && $spot < $range[1] ) || $primaryLocation !== null ) {
+ if ( $primaryLocation === null ) {
+ $primaryLocation = $location;
+ }
+ $locations[] = $location;
+ }
+ }
+ // If more locations are requested, wrap-around and keep adding them
+ reset( $this->ring );
+ while ( count( $locations ) < $limit ) {
+ list( $location, ) = each( $this->ring );
+ if ( $location === $primaryLocation ) {
+ break; // don't go in circles
+ }
+ $locations[] = $location;
+ }
+ return $locations;
+ }
+}
* @return string
*/
function getText() {
- if( isset( self::$blobCache[$this->mOldId] ) ) {
+ if ( isset( self::$blobCache[$this->mOldId] ) ) {
$obj = self::$blobCache[$this->mOldId];
} else {
$dbr = wfGetDB( DB_SLAVE );
$row = $dbr->selectRow( 'text', array( 'old_flags', 'old_text' ), array( 'old_id' => $this->mOldId ) );
- if( !$row ) {
+ if ( !$row ) {
return false;
}
$flags = explode( ',', $row->old_flags );
- if( in_array( 'external', $flags ) ) {
+ if ( in_array( 'external', $flags ) ) {
$url = $row->old_text;
$parts = explode( '://', $url, 2 );
if ( !isset( $parts[1] ) || $parts[1] == '' ) {
$row->old_text = ExternalStore::fetchFromUrl( $url );
}
- if( !in_array( 'object', $flags ) ) {
+ if ( !in_array( 'object', $flags ) ) {
return false;
}
- if( in_array( 'gzip', $flags ) ) {
+ if ( in_array( 'gzip', $flags ) ) {
// This shouldn't happen, but a bug in the compress script
// may at times gzip-compress a HistoryBlob object row.
$obj = unserialize( gzinflate( $row->old_text ) );
$obj = unserialize( $row->old_text );
}
- if( !is_object( $obj ) ) {
+ if ( !is_object( $obj ) ) {
// Correct for old double-serialization bug.
$obj = unserialize( $obj );
}
function getText() {
$dbr = wfGetDB( DB_SLAVE );
$row = $dbr->selectRow( 'cur', array( 'cur_text' ), array( 'cur_id' => $this->mCurId ) );
- if( !$row ) {
+ if ( !$row ) {
return false;
}
return $row->cur_text;
<?php
+
/**
* A tool for running hook functions.
*
*/
class Hooks {
+ /**
+ * Array of events mapped to an array of callbacks to be run
+ * when that event is triggered.
+ */
protected static $handlers = array();
/**
- * Clears hooks registered via Hooks::register(). Does not touch $wgHooks.
- * This is intended for use while testing and will fail if MW_PHPUNIT_TEST is not defined.
+ * Attach an event handler to a given hook.
*
- * @since 1.21
- *
- * @param string $name the name of the hook to clear.
+ * @param string $name Name of hook
+ * @param mixed $callback Callback function to attach
*
- * @throws MWException if not in testing mode.
+ * @since 1.18
*/
- public static function clear( $name ) {
- if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
- throw new MWException( 'can not reset hooks in operation.' );
+ public static function register( $name, $callback ) {
+ if( !isset( self::$handlers[$name] ) ) {
+ self::$handlers[$name] = array();
}
- unset( self::$handlers[$name] );
+ self::$handlers[$name][] = $callback;
}
/**
- * Attach an event handler to a given hook
+ * Clears hooks registered via Hooks::register(). Does not touch $wgHooks.
+ * This is intended for use while testing and will fail if MW_PHPUNIT_TEST is not defined.
*
- * @since 1.18
+ * @param string $name the name of the hook to clear.
*
- * @param string $name name of hook
- * @param $callback Mixed: callback function to attach
+ * @since 1.21
+ * @throws MWException if not in testing mode.
*/
- public static function register( $name, $callback ) {
- if( !isset( self::$handlers[$name] ) ) {
- self::$handlers[$name] = array();
+ public static function clear( $name ) {
+ if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
+ throw new MWException( 'Cannot reset hooks in operation.' );
}
- self::$handlers[$name][] = $callback;
+ unset( self::$handlers[$name] );
}
/**
*
* @since 1.18
*
- * @param string $name name of hook
- * @return Boolean: true if the hook has a function registered to it
+ * @param string $name Name of hook
+ * @return bool True if the hook has a function registered to it
*/
public static function isRegistered( $name ) {
global $wgHooks;
-
return !empty( $wgHooks[$name] ) || !empty( self::$handlers[$name] );
}
/**
* Returns an array of all the event functions attached to a hook
* This combines functions registered via Hooks::register and with $wgHooks.
- * @since 1.18
*
- * @throws MWException
- * @throws FatalError
- * @param string $name name of the hook
+ * @since 1.18
*
+ * @param string $name Name of the hook
* @return array
*/
public static function getHandlers( $name ) {
global $wgHooks;
- // Return quickly in the most common case
- if ( empty( self::$handlers[$name] ) && empty( $wgHooks[$name] ) ) {
+ if ( !self::isRegistered( $name ) ) {
return array();
- }
-
- if ( !is_array( self::$handlers ) ) {
- throw new MWException( "Local hooks array is not an array!\n" );
- }
-
- if ( !is_array( $wgHooks ) ) {
- throw new MWException( "Global hooks array is not an array!\n" );
- }
-
- if ( empty( Hooks::$handlers[$name] ) ) {
- $hooks = $wgHooks[$name];
- } elseif ( empty( $wgHooks[$name] ) ) {
- $hooks = Hooks::$handlers[$name];
+ } elseif ( !isset( self::$handlers[$name] ) ) {
+ return $wgHooks[$name];
+ } elseif ( !isset( $wgHooks[$name] ) ) {
+ return self::$handlers[$name];
} else {
- // so they are both not empty...
- $hooks = array_merge( Hooks::$handlers[$name], $wgHooks[$name] );
+ return array_merge( self::$handlers[$name], $wgHooks[$name] );
}
-
- if ( !is_array( $hooks ) ) {
- throw new MWException( "Hooks array for event '$name' is not an array!\n" );
- }
-
- return $hooks;
}
/**
- * Call hook functions defined in Hooks::register
+ * Call hook functions defined in Hooks::register and $wgHooks.
+ *
+ * For a certain hook event, fetch the array of hook events and
+ * process them. Determine the proper callback for each hook and
+ * then call the actual hook using the appropriate arguments.
+ * Finally, process the return value and return/throw accordingly.
*
- * @param string $event event name
- * @param $args Array: parameters passed to hook functions
+ * @param string $event Event name
+ * @param array $args Array of parameters passed to hook functions
+ * @return bool True if no handler aborted the hook
*
* @throws MWException
* @throws FatalError
- * @return Boolean True if no handler aborted the hook
*/
- public static function run( $event, $args = array() ) {
- global $wgHooks;
-
- // Return quickly in the most common case
- if ( empty( self::$handlers[$event] ) && empty( $wgHooks[$event] ) ) {
- return true;
- }
-
+ public static function run( $event, array $args = array() ) {
wfProfileIn( 'hook: ' . $event );
- $hooks = self::getHandlers( $event );
+ foreach ( self::getHandlers( $event ) as $hook ) {
+ // Turn non-array values into an array. (Can't use casting because of objects.)
+ if ( !is_array( $hook ) ) {
+ $hook = array( $hook );
+ }
- foreach ( $hooks as $hook ) {
- $object = null;
- $method = null;
- $func = null;
- $data = null;
- $have_data = false;
- $closure = false;
- $badhookmsg = false;
+ if ( !array_filter( $hook ) ) {
+ // Either array is empty or it's an array filled with null/false/empty.
+ continue;
+ } elseif ( is_array( $hook[0] ) ) {
+ // First element is an array, meaning the developer intended
+ // the first element to be a callback. Merge it in so that
+ // processing can be uniform.
+ $hook = array_merge( $hook[0], array_slice( $hook, 1 ) );
+ }
/**
* $hook can be: a function, an object, an array of $function and
* $data, an array of just a function, an array of object and
* method, or an array of object, method, and data.
*/
- if ( is_array( $hook ) ) {
- if ( count( $hook ) < 1 ) {
- wfProfileOut( 'hook: ' . $event );
- throw new MWException( 'Empty array in hooks for ' . $event . "\n" );
- } elseif ( is_object( $hook[0] ) ) {
- $object = $hook[0];
- if ( $object instanceof Closure ) {
- $closure = true;
- if ( count( $hook ) > 1 ) {
- $data = $hook[1];
- $have_data = true;
- }
- } else {
- if ( count( $hook ) < 2 ) {
- $method = 'on' . $event;
- } else {
- $method = $hook[1];
- if ( count( $hook ) > 2 ) {
- $data = $hook[2];
- $have_data = true;
- }
- }
- }
- } elseif ( is_string( $hook[0] ) ) {
- $func = $hook[0];
- if ( count( $hook ) > 1 ) {
- $data = $hook[1];
- $have_data = true;
- }
- } else {
- wfProfileOut( 'hook: ' . $event );
- throw new MWException( 'Unknown datatype in hooks for ' . $event . "\n" );
- }
- } elseif ( is_string( $hook ) ) { # functions look like strings, too
- $func = $hook;
- } elseif ( is_object( $hook ) ) {
- $object = $hook;
- if ( $object instanceof Closure ) {
- $closure = true;
- } else {
- $method = "on" . $event;
+ if ( $hook[0] instanceof Closure ) {
+ $func = "hook-$event-closure";
+ $callback = array_shift( $hook );
+ } elseif ( is_object( $hook[0] ) ) {
+ $object = array_shift( $hook );
+ $method = array_shift( $hook );
+
+ // If no method was specified, default to on$event.
+ if ( $method === null ) {
+ $method = "on$event";
}
- } else {
- wfProfileOut( 'hook: ' . $event );
- throw new MWException( 'Unknown datatype in hooks for ' . $event . "\n" );
- }
- /* We put the first data element on, if needed. */
- if ( $have_data ) {
- $hook_args = array_merge( array( $data ), $args );
- } else {
- $hook_args = $args;
- }
-
- if ( $closure ) {
- $callback = $object;
- $func = "hook-$event-closure";
- } elseif ( isset( $object ) ) {
$func = get_class( $object ) . '::' . $method;
$callback = array( $object, $method );
+ } elseif ( is_string( $hook[0] ) ) {
+ $func = $callback = array_shift( $hook );
} else {
- $callback = $func;
+ throw new MWException( 'Unknown datatype in hooks for ' . $event . "\n" );
}
// Run autoloader (workaround for call_user_func_array bug)
- is_callable( $callback );
+ // and throw error if not callable.
+ if( !is_callable( $callback ) ) {
+ throw new MWException( 'Invalid callback in hooks for ' . $event . "\n" );
+ }
- /**
- * Call the hook. The documentation of call_user_func_array clearly
- * states that FALSE is returned on failure. However this is not
- * case always. In some version of PHP if the function signature
- * does not match the call signature, PHP will issue an warning:
- * Param y in x expected to be a reference, value given.
- *
- * In that case the call will also return null. The following code
- * catches that warning and provides better error message. The
- * function documentation also says that:
- * In other words, it does not depend on the function signature
- * whether the parameter is passed by a value or by a reference.
- * There is also PHP bug http://bugs.php.net/bug.php?id=47554 which
- * is unsurprisingly marked as bogus. In short handling of failures
- * with call_user_func_array is a failure, the documentation for that
- * function is wrong and misleading and PHP developers don't see any
- * problem here.
+ /*
+ * Call the hook. The documentation of call_user_func_array says
+ * false is returned on failure. However, if the function signature
+ * does not match the call signature, PHP will issue an warning and
+ * return null instead. The following code catches that warning and
+ * provides better error message.
*/
$retval = null;
- set_error_handler( 'Hooks::hookErrorHandler' );
+ $badhookmsg = null;
+ $hook_args = array_merge( $hook, $args );
+
+ // Profile first in case the Profiler causes errors.
wfProfileIn( $func );
+ set_error_handler( 'Hooks::hookErrorHandler' );
try {
$retval = call_user_func_array( $callback, $hook_args );
} catch ( MWHookException $e ) {
$badhookmsg = $e->getMessage();
}
- wfProfileOut( $func );
restore_error_handler();
+ wfProfileOut( $func );
- /* String return is an error; false return means stop processing. */
+ // Process the return value.
if ( is_string( $retval ) ) {
+ // String returned means error.
throw new FatalError( $retval );
- } elseif( $retval === null ) {
- if ( $closure ) {
- $prettyFunc = "$event closure";
- } elseif( is_array( $callback ) ) {
- if( is_object( $callback[0] ) ) {
- $prettyClass = get_class( $callback[0] );
- } else {
- $prettyClass = strval( $callback[0] );
- }
- $prettyFunc = $prettyClass . '::' . strval( $callback[1] );
- } else {
- $prettyFunc = strval( $callback );
- }
- if ( $badhookmsg ) {
- wfProfileOut( 'hook: ' . $event );
- throw new MWException(
- 'Detected bug in an extension! ' .
- "Hook $prettyFunc has invalid call signature; " . $badhookmsg
- );
- } else {
- wfProfileOut( 'hook: ' . $event );
- throw new MWException(
- 'Detected bug in an extension! ' .
- "Hook $prettyFunc failed to return a value; " .
- 'should return true to continue hook processing or false to abort.'
- );
- }
+ } elseif ( $badhookmsg !== null ) {
+ // Exception was thrown from Hooks::hookErrorHandler.
+ throw new MWException(
+ 'Detected bug in an extension! ' .
+ "Hook $func has invalid call signature; " . $badhookmsg
+ );
+ } elseif ( $retval === null ) {
+ // Null was returned. Error.
+ throw new MWException(
+ 'Detected bug in an extension! ' .
+ "Hook $func failed to return a value; " .
+ 'should return true to continue hook processing or false to abort.'
+ );
} elseif ( !$retval ) {
wfProfileOut( 'hook: ' . $event );
+ // False was returned. Stop processing, but no error.
return false;
}
}
}
/**
+ * Handle PHP errors issued inside a hook. Catch errors that have to do with
+ * a function expecting a reference, and let all others pass through.
+ *
* This REALLY should be protected... but it's public for compatibility
*
* @since 1.18
*
- * @param int $errno Unused
- * @param string $errstr error message
- * @throws MWHookException
- * @return Boolean: false
+ * @param int $errno Error number (unused)
+ * @param string $errstr Error message
+ * @throws MWHookException If the error has to do with the function signature
+ * @return bool Always returns false
*/
public static function hookErrorHandler( $errno, $errstr ) {
if ( strpos( $errstr, 'expected to be a reference, value given' ) !== false ) {
- throw new MWHookException( $errstr );
+ throw new MWHookException( $errstr, $errno );
}
return false;
}
);
// Allow more input types in HTML5 mode
- if( $wgHtml5 ) {
+ if ( $wgHtml5 ) {
$validTypes = array_merge( $validTypes, array(
'datetime',
'datetime-local',
foreach ( $attribs as $attrib => $value ) {
$lcattrib = strtolower( $attrib );
- if( is_array( $value ) ) {
+ if ( is_array( $value ) ) {
$value = implode( ' ', $value );
} else {
$value = strval( $value );
*/
static function srcSet( $urls ) {
$candidates = array();
- foreach( $urls as $density => $url ) {
+ foreach ( $urls as $density => $url ) {
// Image candidate syntax per current whatwg live spec, 2012-09-23:
// http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-1.html#attr-img-srcset
$candidates[] = "{$url} {$density}x";
} else {
$this->timeout = $wgHTTPTimeout;
}
- if( isset( $options['userAgent'] ) ) {
+ if ( isset( $options['userAgent'] ) ) {
$this->setUserAgent( $options['userAgent'] );
}
wfRestoreWarnings();
}
- if ( false === curl_exec( $curlHandle ) ) {
+ $curlRes = curl_exec( $curlHandle );
+ if ( curl_errno( $curlHandle ) == CURLE_OPERATION_TIMEOUTED ) {
+ $this->status->fatal( 'http-timed-out', $this->url );
+ } elseif ( $curlRes === false ) {
$this->status->fatal( 'http-curl-error', curl_error( $curlHandle ) );
} else {
$this->headerList = explode( "\r\n", $this->headerText );
if ( $this->method == 'POST' ) {
// Required for HTTP 1.0 POSTs
$this->reqHeaders['Content-Length'] = strlen( $this->postData );
- if( !isset( $this->reqHeaders['Content-Type'] ) ) {
+ if ( !isset( $this->reqHeaders['Content-Type'] ) ) {
$this->reqHeaders['Content-Type'] = "application/x-www-form-urlencoded";
}
}
// An IPv6 address is made up of 8 words (each x0000 to xFFFF).
// However, the "::" abbreviation can be used on consecutive x0000 words.
define( 'RE_IPV6_WORD', '([0-9A-Fa-f]{1,4})' );
-define( 'RE_IPV6_PREFIX', '(12[0-8]|1[01][0-9]|[1-9]?\d)');
+define( 'RE_IPV6_PREFIX', '(12[0-8]|1[01][0-9]|[1-9]?\d)' );
define( 'RE_IPV6_ADD',
'(?:' . // starts with "::" (including "::")
':(?::|(?::' . RE_IPV6_WORD . '){1,7})' .
static $privateRanges = false;
if ( !$privateRanges ) {
$privateRanges = array(
- array( '10.0.0.0', '10.255.255.255' ), # RFC 1918 (private)
- array( '172.16.0.0', '172.31.255.255' ), # "
- array( '192.168.0.0', '192.168.255.255' ), # "
- array( '0.0.0.0', '0.255.255.255' ), # this network
- array( '127.0.0.0', '127.255.255.255' ), # loopback
+ array( '10.0.0.0', '10.255.255.255' ), # RFC 1918 (private)
+ array( '172.16.0.0', '172.31.255.255' ), # RFC 1918 (private)
+ array( '192.168.0.0', '192.168.255.255' ), # RFC 1918 (private)
+ array( '0.0.0.0', '0.255.255.255' ), # this network
+ array( '127.0.0.0', '127.255.255.255' ), # loopback
);
}
$img = false;
}
- if( !$img ) {
+ if ( !$img ) {
# We're dealing with a non-image, spit out the name and be done with it.
$thumbhtml = "\n\t\t\t" . '<div style="height: ' . ( self::THUMB_PADDING + $this->mHeights ) . 'px;">'
. htmlspecialchars( $nt->getText() ) . '</div>';
- } elseif( $this->mHideBadImages && wfIsBadImage( $nt->getDBkey(), $this->getContextTitle() ) ) {
+ } elseif ( $this->mHideBadImages && wfIsBadImage( $nt->getDBkey(), $this->getContextTitle() ) ) {
# The image is blacklisted, just show it as a text link.
$thumbhtml = "\n\t\t\t" . '<div style="height: ' . ( self::THUMB_PADDING + $this->mHeights ) . 'px;">' .
Linker::link(
array( 'known', 'noclasses' )
) .
'</div>';
- } elseif( !( $thumb = $img->transform( $params ) ) ) {
+ } elseif ( !( $thumb = $img->transform( $params ) ) ) {
# Error generating thumbnail.
$thumbhtml = "\n\t\t\t" . '<div style="height: ' . ( self::THUMB_PADDING + $this->mHeights ) . 'px;">'
. htmlspecialchars( $img->getLastError() ) . '</div>';
// $linkTarget = Title::newFromText( $wgContLang->getNsText( MWNamespace::getUser() ) . ":{$ut}" );
// $ul = Linker::link( $linkTarget, $ut );
- if( $this->mShowBytes ) {
- if( $img ) {
+ if ( $this->mShowBytes ) {
+ if ( $img ) {
$fileSize = htmlspecialchars( $lang->formatSize( $img->getSize() ) );
} else {
$fileSize = wfMessage( 'filemissing' )->escaped();
}
// Add remote Filepage.css
- if( !$this->repo->isLocal() ) {
+ if ( !$this->repo->isLocal() ) {
$css = $this->repo->getDescriptionStylesheetUrl();
if ( $css ) {
$out->addStyle( $css );
$descText = $this->mPage->getFile()->getDescriptionText();
/* Add canonical to head if there is no local page for this shared file */
- if( $descUrl && $this->mPage->getID() == 0 ) {
+ if ( $descUrl && $this->mPage->getID() == 0 ) {
$out->setCanonicalUrl( $descUrl );
}
// Create links for every element
$currentCount = 0;
- foreach( $rows as $element ) {
+ foreach ( $rows as $element ) {
$currentCount++;
if ( $currentCount > $limit ) {
break;
* @param int $offset Paging offset
*/
protected function outputResults( $out, $skin, $dbr, $res, $num, $offset ) {
- if( $num > 0 ) {
+ if ( $num > 0 ) {
$gallery = new ImageGallery();
# $res might contain the whole 1,000 rows, so we read up to
# $num [should update this to use a Pager]
- for( $i = 0; $i < $num && $row = $dbr->fetchObject( $res ); $i++ ) {
+ for ( $i = 0; $i < $num && $row = $dbr->fetchObject( $res ); $i++ ) {
$namespace = isset( $row->namespace ) ? $row->namespace : NS_FILE;
$title = Title::makeTitleSafe( $namespace, $row->title );
if ( $title instanceof Title && $title->getNamespace() == NS_FILE ) {
}
private function debug( $data ) {
- if( $this->mDebug ) {
+ if ( $this->mDebug ) {
wfDebug( "IMPORT: $data\n" );
}
}
* @return bool
*/
public function setTargetNamespace( $namespace ) {
- if( is_null( $namespace ) ) {
+ if ( is_null( $namespace ) ) {
// Don't override namespaces
$this->mTargetNamespace = null;
- } elseif( $namespace >= 0 ) {
+ } elseif ( $namespace >= 0 ) {
// @todo FIXME: Check for validity
$this->mTargetNamespace = intval( $namespace );
} else {
*/
public function setTargetRootPage( $rootpage ) {
$status = Status::newGood();
- if( is_null( $rootpage ) ) {
+ if ( is_null( $rootpage ) ) {
// No rootpage
$this->mTargetRootPage = null;
- } elseif( $rootpage !== '' ) {
+ } elseif ( $rootpage !== '' ) {
$rootpage = rtrim( $rootpage, '/' ); //avoid double slashes
$title = Title::newFromText( $rootpage, !is_null( $this->mTargetNamespace ) ? $this->mTargetNamespace : NS_MAIN );
- if( !$title || $title->isExternal() ) {
+ if ( !$title || $title->isExternal() ) {
$status->fatal( 'import-rootpage-invalid' );
} else {
- if( !MWNamespace::hasSubpages( $title->getNamespace() ) ) {
+ if ( !MWNamespace::hasSubpages( $title->getNamespace() ) ) {
global $wgContLang;
$displayNSText = $title->getNamespace() == NS_MAIN
*/
public function debugRevisionHandler( &$revision ) {
$this->debug( "Got revision:" );
- if( is_object( $revision->title ) ) {
+ if ( is_object( $revision->title ) ) {
$this->debug( "-- Title: " . $revision->title->getPrefixedText() );
} else {
$this->debug( "-- Title: <invalid>" );
* @param $title Title
*/
function pageCallback( $title ) {
- if( isset( $this->mPageCallback ) ) {
+ if ( isset( $this->mPageCallback ) ) {
call_user_func( $this->mPageCallback, $title );
}
}
* @param array $pageInfo associative array of page information
*/
private function pageOutCallback( $title, $origTitle, $revCount, $sucCount, $pageInfo ) {
- if( isset( $this->mPageOutCallback ) ) {
+ if ( isset( $this->mPageOutCallback ) ) {
$args = func_get_args();
call_user_func_array( $this->mPageOutCallback, $args );
}
* @access private
*/
private function nodeContents() {
- if( $this->reader->isEmptyElement ) {
+ if ( $this->reader->isEmptyElement ) {
return "";
}
$buffer = "";
- while( $this->reader->read() ) {
+ while ( $this->reader->read() ) {
switch( $this->reader->nodeType ) {
case XmlReader::TEXT:
case XmlReader::SIGNIFICANT_WHITESPACE:
"END_ELEMENT",
"END_ENTITY",
"XML_DECLARATION",
- );
+ );
$lookup = array();
- foreach( $xmlReaderConstants as $name ) {
+ foreach ( $xmlReaderConstants as $name ) {
$lookup[constant("XmlReader::$name")] = $name;
}
}
private function processRevision( $pageInfo, $revisionInfo ) {
$revision = new WikiRevision;
- if( isset( $revisionInfo['id'] ) ) {
+ if ( isset( $revisionInfo['id'] ) ) {
$revision->setID( $revisionInfo['id'] );
}
if ( isset( $revisionInfo['text'] ) ) {
$workTitle = $text;
$origTitle = Title::newFromText( $workTitle );
- if( !is_null( $this->mTargetNamespace ) && !is_null( $origTitle ) ) {
+ if ( !is_null( $this->mTargetNamespace ) && !is_null( $origTitle ) ) {
# makeTitleSafe, because $origTitle can have a interwiki (different setting of interwiki map)
# and than dbKey can begin with a lowercase char
$title = Title::makeTitleSafe( $this->mTargetNamespace,
$origTitle->getDBkey() );
} else {
- if( !is_null( $this->mTargetRootPage ) ) {
+ if ( !is_null( $this->mTargetRootPage ) ) {
$workTitle = $this->mTargetRootPage . '/' . $workTitle;
}
$title = Title::newFromText( $workTitle );
}
- if( is_null( $title ) ) {
+ if ( is_null( $title ) ) {
# Invalid page title? Ignore the page
$this->notice( 'import-error-invalid', $workTitle );
return false;
- } elseif( $title->isExternal() ) {
+ } elseif ( $title->isExternal() ) {
$this->notice( 'import-error-interwiki', $title->getPrefixedText() );
return false;
- } elseif( !$title->canExist() ) {
+ } elseif ( !$title->canExist() ) {
$this->notice( 'import-error-special', $title->getPrefixedText() );
return false;
- } elseif( !$title->userCan( 'edit' ) && !$wgCommandLineMode ) {
+ } elseif ( !$title->userCan( 'edit' ) && !$wgCommandLineMode ) {
# Do not import if the importing wiki user cannot edit this page
$this->notice( 'import-error-edit', $title->getPrefixedText() );
return false;
- } elseif( !$title->exists() && !$title->userCan( 'create' ) && !$wgCommandLineMode ) {
+ } elseif ( !$title->exists() && !$title->userCan( 'create' ) && !$wgCommandLineMode ) {
# Do not import if the importing wiki user cannot create this page
$this->notice( 'import-error-create', $title->getPrefixedText() );
return false;
* @return bool|string
*/
function nodeContents() {
- if( $this->isEmptyElement ) {
+ if ( $this->isEmptyElement ) {
return "";
}
$buffer = "";
- while( $this->read() ) {
+ while ( $this->read() ) {
switch( $this->nodeType ) {
case XmlReader::TEXT:
case XmlReader::SIGNIFICANT_WHITESPACE:
* @throws MWException
*/
function setTitle( $title ) {
- if( is_object( $title ) ) {
+ if ( is_object( $title ) ) {
$this->title = $title;
- } elseif( is_null( $title ) ) {
+ } elseif ( is_null( $title ) ) {
throw new MWException( "WikiRevision given a null title in import. You may need to adjust \$wgLegalTitleChars." );
} else {
throw new MWException( "WikiRevision given non-object title in import." );
# Sneak a single revision into place
$user = User::newFromName( $this->getUser() );
- if( $user ) {
+ if ( $user ) {
$userId = intval( $user->getId() );
$userText = $user->getName();
$userObj = $user;
$linkCache->clear();
$page = WikiPage::factory( $this->title );
- if( !$page->exists() ) {
+ if ( !$page->exists() ) {
# must create the page...
$pageId = $page->insertOn( $dbw );
$created = true;
'rev_comment' => $this->getComment() ),
__METHOD__
);
- if( $prior ) {
+ if ( $prior ) {
// @todo FIXME: This could fail slightly for multiple matches :P
wfDebug( __METHOD__ . ": skipping existing revision for [[" .
$this->title->getPrefixedText() . "]], timestamp " . $this->timestamp . "\n" );
function importLogItem() {
$dbw = wfGetDB( DB_MASTER );
# @todo FIXME: This will not record autoblocks
- if( !$this->getTitle() ) {
+ if ( !$this->getTitle() ) {
wfDebug( __METHOD__ . ": skipping invalid {$this->type}/{$this->action} log time, timestamp " .
$this->timestamp . "\n" );
return;
__METHOD__
);
// @todo FIXME: This could fail slightly for multiple matches :P
- if( $prior ) {
+ if ( $prior ) {
wfDebug( __METHOD__ . ": skipping existing item for Log:{$this->type}/{$this->action}, timestamp " .
$this->timestamp . "\n" );
return;
wfDebug( __METHOD__ . "File already exists; importing as $archiveName\n" );
}
}
- if( !$file ) {
+ if ( !$file ) {
wfDebug( __METHOD__ . ': Bad file for ' . $this->getTitle() . "\n" );
return false;
}
$source = $this->downloadSource();
$flags |= File::DELETE_SOURCE;
}
- if( !$source ) {
+ if ( !$source ) {
wfDebug( __METHOD__ . ": Could not fetch remote file.\n" );
return false;
}
*/
function downloadSource() {
global $wgEnableUploads;
- if( !$wgEnableUploads ) {
+ if ( !$wgEnableUploads ) {
return false;
}
$tempo = tempnam( wfTempDir(), 'download' );
$f = fopen( $tempo, 'wb' );
- if( !$f ) {
+ if ( !$f ) {
wfDebug( "IMPORT: couldn't write to temp file $tempo\n" );
return false;
}
// @todo FIXME!
$src = $this->getSrc();
$data = Http::get( $src );
- if( !$data ) {
+ if ( !$data ) {
wfDebug( "IMPORT: couldn't fetch source $src\n" );
fclose( $f );
unlink( $tempo );
* @return bool|string
*/
function readChunk() {
- if( $this->atEnd() ) {
+ if ( $this->atEnd() ) {
return false;
}
$this->mRead = true;
wfSuppressWarnings();
$file = fopen( $filename, 'rt' );
wfRestoreWarnings();
- if( !$file ) {
+ if ( !$file ) {
return Status::newFatal( "importcantopen" );
}
return Status::newGood( new ImportStreamSource( $file ) );
static function newFromUpload( $fieldname = "xmlimport" ) {
$upload =& $_FILES[$fieldname];
- if( $upload === null || !$upload['name'] ) {
+ if ( $upload === null || !$upload['name'] ) {
return Status::newFatal( 'importnofile' );
}
- if( !empty( $upload['error'] ) ) {
+ if ( !empty( $upload['error'] ) ) {
switch( $upload['error'] ) {
case 1: # The uploaded file exceeds the upload_max_filesize directive in php.ini.
return Status::newFatal( 'importuploaderrorsize' );
}
$fname = $upload['tmp_name'];
- if( is_uploaded_file( $fname ) ) {
+ if ( is_uploaded_file( $fname ) ) {
return ImportStreamSource::newFromFile( $fname );
} else {
return Status::newFatal( 'importnofile' );
# otherwise prevent importing from large sites, such
# as the Wikimedia cluster, etc.
$data = Http::request( $method, $url, array( 'followRedirects' => true ) );
- if( $data !== false ) {
+ if ( $data !== false ) {
$file = tmpfile();
fwrite( $file, $data );
fflush( $file );
* @return Status
*/
public static function newFromInterwiki( $interwiki, $page, $history = false, $templates = false, $pageLinkDepth = 0 ) {
- if( $page == '' ) {
+ if ( $page == '' ) {
return Status::newFatal( 'import-noarticle' );
}
$link = Title::newFromText( "$interwiki:Special:Export/$page" );
- if( is_null( $link ) || $link->getInterwiki() == '' ) {
+ if ( is_null( $link ) || $link->getInterwiki() == '' ) {
return Status::newFatal( 'importbadinterwiki' );
} else {
$params = array();
- if ( $history ) $params['history'] = 1;
- if ( $templates ) $params['templates'] = 1;
- if ( $pageLinkDepth ) $params['pagelink-depth'] = $pageLinkDepth;
+ if ( $history ) {
+ $params['history'] = 1;
+ }
+ if ( $templates ) {
+ $params['templates'] = 1;
+ }
+ if ( $pageLinkDepth ) {
+ $params['pagelink-depth'] = $pageLinkDepth;
+ }
$url = $link->getFullURL( $params );
# For interwikis, use POST to avoid redirects.
return ImportStreamSource::newFromURL( $url, "POST" );
protected function stackItem( &$list, $path, $item ) {
$position =& $list;
if ( $path ) {
- foreach( $path as $key ) {
+ foreach ( $path as $key ) {
$position =& $position[$key];
}
}
* @return array filtered array
*/
public static function keepOneWildcard( $arr ) {
- if( !is_array( $arr ) ) {
+ if ( !is_array( $arr ) ) {
return $arr;
}
- foreach( $arr as $key => $value ) {
+ foreach ( $arr as $key => $value ) {
if ( $value instanceof LikeMatch ) {
return array_slice( $arr, 0, $key + 1 );
}
return "<!-- ERROR -->$html";
}
- if( is_string( $query ) ) {
+ if ( is_string( $query ) ) {
// some functions withing core using this still hand over query strings
wfDeprecated( __METHOD__ . ' with parameter $query as string (should be array)', '1.20' );
$query = wfCgiToArray( $query );
# If a thumbnail width has not been provided, it is set
# to the default user option as specified in Language*.php
if ( $fp['align'] == '' ) {
- if( $parser instanceof Parser ) {
+ if ( $parser instanceof Parser ) {
$fp['align'] = $parser->getTargetLanguage()->alignEnd();
} else {
# backwards compatibility, remove with makeImageLink2()
$hp =& $handlerParams;
$page = isset( $hp['page'] ) ? $hp['page'] : false;
- if ( !isset( $fp['align'] ) ) $fp['align'] = 'right';
- if ( !isset( $fp['alt'] ) ) $fp['alt'] = '';
- if ( !isset( $fp['title'] ) ) $fp['title'] = '';
- if ( !isset( $fp['caption'] ) ) $fp['caption'] = '';
+ if ( !isset( $fp['align'] ) ) {
+ $fp['align'] = 'right';
+ }
+ if ( !isset( $fp['alt'] ) ) {
+ $fp['alt'] = '';
+ }
+ if ( !isset( $fp['title'] ) ) {
+ $fp['title'] = '';
+ }
+ if ( !isset( $fp['caption'] ) ) {
+ $fp['caption'] = '';
+ }
if ( empty( $hp['width'] ) ) {
// Reduce width for upright images when parameter 'upright' is used
protected static function getUploadUrl( $destFile, $query = '' ) {
global $wgUploadMissingFileUrl, $wgUploadNavigationUrl;
$q = 'wpDestFile=' . $destFile->getPartialURL();
- if ( $query != '' )
+ if ( $query != '' ) {
$q .= '&' . $query;
+ }
if ( $wgUploadMissingFileUrl ) {
return wfAppendQuery( $wgUploadMissingFileUrl, $q );
- } elseif( $wgUploadNavigationUrl ) {
+ } elseif ( $wgUploadNavigationUrl ) {
return wfAppendQuery( $wgUploadNavigationUrl, $q );
} else {
$upload = SpecialPage::getTitleFor( 'Upload' );
$trail = "";
}
$linkRegexp = '/\[\[(.*?)\]\]' . preg_quote( $trail, '/' ) . '/';
- if ( isset( $match[1][0] ) && $match[1][0] == ':' )
+ if ( isset( $match[1][0] ) && $match[1][0] == ':' ) {
$match[1] = substr( $match[1], 1 );
+ }
list( $inside, $trail ) = self::splitTrail( $trail );
$linkText = $text;
$toc = '';
$lastLevel = 0;
foreach ( $tree as $section ) {
- if ( $section['toclevel'] > $lastLevel )
+ if ( $section['toclevel'] > $lastLevel ) {
$toc .= self::tocIndent();
- elseif ( $section['toclevel'] < $lastLevel )
+ } elseif ( $section['toclevel'] < $lastLevel ) {
$toc .= self::tocUnindent(
$lastLevel - $section['toclevel'] );
- else
+ } else {
$toc .= self::tocLineEnd();
+ }
$toc .= self::tocLine( $section['anchor'],
$section['line'], $section['number'],
}
$disableRollbackEditCount = false;
- if( $wgMiserMode ) {
- foreach( $disableRollbackEditCountSpecialPage as $specialPage ) {
- if( $context->getTitle()->isSpecial( $specialPage ) ) {
+ if ( $wgMiserMode ) {
+ foreach ( $disableRollbackEditCountSpecialPage as $specialPage ) {
+ if ( $context->getTitle()->isSpecial( $specialPage ) ) {
$disableRollbackEditCount = true;
break;
}
}
}
- if( !$disableRollbackEditCount && is_int( $wgShowRollbackEditCount ) && $wgShowRollbackEditCount > 0 ) {
+ if ( !$disableRollbackEditCount && is_int( $wgShowRollbackEditCount ) && $wgShowRollbackEditCount > 0 ) {
if ( !is_numeric( $editCount ) ) {
$editCount = self::getRollbackEditCount( $rev, false );
}
- if( $editCount > $wgShowRollbackEditCount ) {
+ if ( $editCount > $wgShowRollbackEditCount ) {
$editCount_output = $context->msg( 'rollbacklinkcount-morethan' )->numParams( $wgShowRollbackEditCount )->parse();
} else {
$editCount_output = $context->msg( 'rollbacklinkcount' )->numParams( $editCount )->parse();
*/
private function getLinkInsertions( $existing = array() ) {
$arr = array();
- foreach( $this->mLinks as $ns => $dbkeys ) {
+ foreach ( $this->mLinks as $ns => $dbkeys ) {
$diffs = isset( $existing[$ns] )
? array_diff_key( $dbkeys, $existing[$ns] )
: $dbkeys;
*/
private function getTemplateInsertions( $existing = array() ) {
$arr = array();
- foreach( $this->mTemplates as $ns => $dbkeys ) {
+ foreach ( $this->mTemplates as $ns => $dbkeys ) {
$diffs = isset( $existing[$ns] ) ? array_diff_key( $dbkeys, $existing[$ns] ) : $dbkeys;
foreach ( $diffs as $dbk => $id ) {
$arr[] = array(
private function getImageInsertions( $existing = array() ) {
$arr = array();
$diffs = array_diff_key( $this->mImages, $existing );
- foreach( $diffs as $iname => $dummy ) {
+ foreach ( $diffs as $iname => $dummy ) {
$arr[] = array(
'il_from' => $this->mId,
'il_to' => $iname
private function getExternalInsertions( $existing = array() ) {
$arr = array();
$diffs = array_diff_key( $this->mExternals, $existing );
- foreach( $diffs as $url => $dummy ) {
- foreach( wfMakeUrlIndexes( $url ) as $index ) {
+ foreach ( $diffs as $url => $dummy ) {
+ foreach ( wfMakeUrlIndexes( $url ) as $index ) {
$arr[] = array(
'el_from' => $this->mId,
'el_to' => $url,
private function getInterlangInsertions( $existing = array() ) {
$diffs = array_diff_assoc( $this->mInterlangs, $existing );
$arr = array();
- foreach( $diffs as $lang => $title ) {
+ foreach ( $diffs as $lang => $title ) {
$arr[] = array(
'll_from' => $this->mId,
'll_lang' => $lang,
*/
private function getInterwikiInsertions( $existing = array() ) {
$arr = array();
- foreach( $this->mInterwikis as $prefix => $dbkeys ) {
+ foreach ( $this->mInterwikis as $prefix => $dbkeys ) {
$diffs = isset( $existing[$prefix] ) ? array_diff_key( $dbkeys, $existing[$prefix] ) : $dbkeys;
foreach ( $diffs as $dbk => $id ) {
$arr[] = array(
--- /dev/null
+<?php
+/**
+ * A cryptographic random generator class used for generating secret keys
+ *
+ * This is based in part on Drupal code as well as what we used in our own code
+ * prior to introduction of this class.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @author Daniel Friesen
+ * @file
+ */
+
+class MWCryptRand {
+
+ /**
+ * Minimum number of iterations we want to make in our drift calculations.
+ */
+ const MIN_ITERATIONS = 1000;
+
+ /**
+ * Number of milliseconds we want to spend generating each separate byte
+ * of the final generated bytes.
+ * This is used in combination with the hash length to determine the duration
+ * we should spend doing drift calculations.
+ */
+ const MSEC_PER_BYTE = 0.5;
+
+ /**
+ * Singleton instance for public use
+ */
+ protected static $singleton = null;
+
+ /**
+ * The hash algorithm being used
+ */
+ protected $algo = null;
+
+ /**
+ * The number of bytes outputted by the hash algorithm
+ */
+ protected $hashLength = null;
+
+ /**
+ * A boolean indicating whether the previous random generation was done using
+ * cryptographically strong random number generator or not.
+ */
+ protected $strong = null;
+
+ /**
+ * Initialize an initial random state based off of whatever we can find
+ */
+ protected function initialRandomState() {
+ // $_SERVER contains a variety of unstable user and system specific information
+ // It'll vary a little with each page, and vary even more with separate users
+ // It'll also vary slightly across different machines
+ $state = serialize( $_SERVER );
+
+ // To try vary the system information of the state a bit more
+ // by including the system's hostname into the state
+ $state .= wfHostname();
+
+ // Try to gather a little entropy from the different php rand sources
+ $state .= rand() . uniqid( mt_rand(), true );
+
+ // Include some information about the filesystem's current state in the random state
+ $files = array();
+
+ // We know this file is here so grab some info about ourselves
+ $files[] = __FILE__;
+
+ // We must also have a parent folder, and with the usual file structure, a grandparent
+ $files[] = __DIR__;
+ $files[] = dirname( __DIR__ );
+
+ // The config file is likely the most often edited file we know should be around
+ // so include its stat info into the state.
+ // The constant with its location will almost always be defined, as WebStart.php defines
+ // MW_CONFIG_FILE to $IP/LocalSettings.php unless being configured with MW_CONFIG_CALLBACK (eg. the installer)
+ if ( defined( 'MW_CONFIG_FILE' ) ) {
+ $files[] = MW_CONFIG_FILE;
+ }
+
+ foreach ( $files as $file ) {
+ wfSuppressWarnings();
+ $stat = stat( $file );
+ wfRestoreWarnings();
+ if ( $stat ) {
+ // stat() duplicates data into numeric and string keys so kill off all the numeric ones
+ foreach ( $stat as $k => $v ) {
+ if ( is_numeric( $k ) ) {
+ unset( $k );
+ }
+ }
+ // The absolute filename itself will differ from install to install so don't leave it out
+ if ( ( $path = realpath( $file ) ) !== false ) {
+ $state .= $path;
+ } else {
+ $state .= $file;
+ }
+ $state .= implode( '', $stat );
+ } else {
+ // The fact that the file isn't there is worth at least a
+ // minuscule amount of entropy.
+ $state .= '0';
+ }
+ }
+
+ // Try and make this a little more unstable by including the varying process
+ // id of the php process we are running inside of if we are able to access it
+ if ( function_exists( 'getmypid' ) ) {
+ $state .= getmypid();
+ }
+
+ // If available try to increase the instability of the data by throwing in
+ // the precise amount of memory that we happen to be using at the moment.
+ if ( function_exists( 'memory_get_usage' ) ) {
+ $state .= memory_get_usage( true );
+ }
+
+ // It's mostly worthless but throw the wiki's id into the data for a little more variance
+ $state .= wfWikiID();
+
+ // If we have a secret key or proxy key set then throw it into the state as well
+ global $wgSecretKey, $wgProxyKey;
+ if ( $wgSecretKey ) {
+ $state .= $wgSecretKey;
+ } elseif ( $wgProxyKey ) {
+ $state .= $wgProxyKey;
+ }
+
+ return $state;
+ }
+
+ /**
+ * Randomly hash data while mixing in clock drift data for randomness
+ *
+ * @param string $data The data to randomly hash.
+ * @return String The hashed bytes
+ * @author Tim Starling
+ */
+ protected function driftHash( $data ) {
+ // Minimum number of iterations (to avoid slow operations causing the loop to gather little entropy)
+ $minIterations = self::MIN_ITERATIONS;
+ // Duration of time to spend doing calculations (in seconds)
+ $duration = ( self::MSEC_PER_BYTE / 1000 ) * $this->hashLength();
+ // Create a buffer to use to trigger memory operations
+ $bufLength = 10000000;
+ $buffer = str_repeat( ' ', $bufLength );
+ $bufPos = 0;
+
+ // Iterate for $duration seconds or at least $minIterations number of iterations
+ $iterations = 0;
+ $startTime = microtime( true );
+ $currentTime = $startTime;
+ while ( $iterations < $minIterations || $currentTime - $startTime < $duration ) {
+ // Trigger some memory writing to trigger some bus activity
+ // This may create variance in the time between iterations
+ $bufPos = ( $bufPos + 13 ) % $bufLength;
+ $buffer[$bufPos] = ' ';
+ // Add the drift between this iteration and the last in as entropy
+ $nextTime = microtime( true );
+ $delta = (int)( ( $nextTime - $currentTime ) * 1000000 );
+ $data .= $delta;
+ // Every 100 iterations hash the data and entropy
+ if ( $iterations % 100 === 0 ) {
+ $data = sha1( $data );
+ }
+ $currentTime = $nextTime;
+ $iterations++;
+ }
+ $timeTaken = $currentTime - $startTime;
+ $data = $this->hash( $data );
+
+ wfDebug( __METHOD__ . ": Clock drift calculation " .
+ "(time-taken=" . ( $timeTaken * 1000 ) . "ms, " .
+ "iterations=$iterations, " .
+ "time-per-iteration=" . ( $timeTaken / $iterations * 1e6 ) . "us)\n" );
+ return $data;
+ }
+
+ /**
+ * Return a rolling random state initially build using data from unstable sources
+ * @return string A new weak random state
+ */
+ protected function randomState() {
+ static $state = null;
+ if ( is_null( $state ) ) {
+ // Initialize the state with whatever unstable data we can find
+ // It's important that this data is hashed right afterwards to prevent
+ // it from being leaked into the output stream
+ $state = $this->hash( $this->initialRandomState() );
+ }
+ // Generate a new random state based on the initial random state or previous
+ // random state by combining it with clock drift
+ $state = $this->driftHash( $state );
+ return $state;
+ }
+
+ /**
+ * Decide on the best acceptable hash algorithm we have available for hash()
+ * @throws MWException
+ * @return String A hash algorithm
+ */
+ protected function hashAlgo() {
+ if ( !is_null( $this->algo ) ) {
+ return $this->algo;
+ }
+
+ $algos = hash_algos();
+ $preference = array( 'whirlpool', 'sha256', 'sha1', 'md5' );
+
+ foreach ( $preference as $algorithm ) {
+ if ( in_array( $algorithm, $algos ) ) {
+ $this->algo = $algorithm;
+ wfDebug( __METHOD__ . ": Using the {$this->algo} hash algorithm.\n" );
+ return $this->algo;
+ }
+ }
+
+ // We only reach here if no acceptable hash is found in the list, this should
+ // be a technical impossibility since most of php's hash list is fixed and
+ // some of the ones we list are available as their own native functions
+ // But since we already require at least 5.2 and hash() was default in
+ // 5.1.2 we don't bother falling back to methods like sha1 and md5.
+ throw new MWException( "Could not find an acceptable hashing function in hash_algos()" );
+ }
+
+ /**
+ * Return the byte-length output of the hash algorithm we are
+ * using in self::hash and self::hmac.
+ *
+ * @return int Number of bytes the hash outputs
+ */
+ protected function hashLength() {
+ if ( is_null( $this->hashLength ) ) {
+ $this->hashLength = strlen( $this->hash( '' ) );
+ }
+ return $this->hashLength;
+ }
+
+ /**
+ * Generate an acceptably unstable one-way-hash of some text
+ * making use of the best hash algorithm that we have available.
+ *
+ * @param $data string
+ * @return String A raw hash of the data
+ */
+ protected function hash( $data ) {
+ return hash( $this->hashAlgo(), $data, true );
+ }
+
+ /**
+ * Generate an acceptably unstable one-way-hmac of some text
+ * making use of the best hash algorithm that we have available.
+ *
+ * @param $data string
+ * @param $key string
+ * @return String A raw hash of the data
+ */
+ protected function hmac( $data, $key ) {
+ return hash_hmac( $this->hashAlgo(), $data, $key, true );
+ }
+
+ /**
+ * @see self::wasStrong()
+ */
+ public function realWasStrong() {
+ if ( is_null( $this->strong ) ) {
+ throw new MWException( __METHOD__ . ' called before generation of random data' );
+ }
+ return $this->strong;
+ }
+
+ /**
+ * @see self::generate()
+ */
+ public function realGenerate( $bytes, $forceStrong = false ) {
+ wfProfileIn( __METHOD__ );
+
+ wfDebug( __METHOD__ . ": Generating cryptographic random bytes for " . wfGetAllCallers( 5 ) . "\n" );
+
+ $bytes = floor( $bytes );
+ static $buffer = '';
+ if ( is_null( $this->strong ) ) {
+ // Set strength to false initially until we know what source data is coming from
+ $this->strong = true;
+ }
+
+ if ( strlen( $buffer ) < $bytes ) {
+ // If available make use of mcrypt_create_iv URANDOM source to generate randomness
+ // On unix-like systems this reads from /dev/urandom but does it without any buffering
+ // and bypasses openbasedir restrictions, so it's preferable to reading directly
+ // On Windows starting in PHP 5.3.0 Windows' native CryptGenRandom is used to generate
+ // entropy so this is also preferable to just trying to read urandom because it may work
+ // on Windows systems as well.
+ if ( function_exists( 'mcrypt_create_iv' ) ) {
+ wfProfileIn( __METHOD__ . '-mcrypt' );
+ $rem = $bytes - strlen( $buffer );
+ $iv = mcrypt_create_iv( $rem, MCRYPT_DEV_URANDOM );
+ if ( $iv === false ) {
+ wfDebug( __METHOD__ . ": mcrypt_create_iv returned false.\n" );
+ } else {
+ $buffer .= $iv;
+ wfDebug( __METHOD__ . ": mcrypt_create_iv generated " . strlen( $iv ) . " bytes of randomness.\n" );
+ }
+ wfProfileOut( __METHOD__ . '-mcrypt' );
+ }
+ }
+
+ if ( strlen( $buffer ) < $bytes ) {
+ // If available make use of openssl's random_pseudo_bytes method to attempt to generate randomness.
+ // However don't do this on Windows with PHP < 5.3.4 due to a bug:
+ // http://stackoverflow.com/questions/1940168/openssl-random-pseudo-bytes-is-slow-php
+ // http://git.php.net/?p=php-src.git;a=commitdiff;h=cd62a70863c261b07f6dadedad9464f7e213cad5
+ if ( function_exists( 'openssl_random_pseudo_bytes' )
+ && ( !wfIsWindows() || version_compare( PHP_VERSION, '5.3.4', '>=' ) )
+ ) {
+ wfProfileIn( __METHOD__ . '-openssl' );
+ $rem = $bytes - strlen( $buffer );
+ $openssl_bytes = openssl_random_pseudo_bytes( $rem, $openssl_strong );
+ if ( $openssl_bytes === false ) {
+ wfDebug( __METHOD__ . ": openssl_random_pseudo_bytes returned false.\n" );
+ } else {
+ $buffer .= $openssl_bytes;
+ wfDebug( __METHOD__ . ": openssl_random_pseudo_bytes generated " . strlen( $openssl_bytes ) . " bytes of " . ( $openssl_strong ? "strong" : "weak" ) . " randomness.\n" );
+ }
+ if ( strlen( $buffer ) >= $bytes ) {
+ // openssl tells us if the random source was strong, if some of our data was generated
+ // using it use it's say on whether the randomness is strong
+ $this->strong = !!$openssl_strong;
+ }
+ wfProfileOut( __METHOD__ . '-openssl' );
+ }
+ }
+
+ // Only read from urandom if we can control the buffer size or were passed forceStrong
+ if ( strlen( $buffer ) < $bytes && ( function_exists( 'stream_set_read_buffer' ) || $forceStrong ) ) {
+ wfProfileIn( __METHOD__ . '-fopen-urandom' );
+ $rem = $bytes - strlen( $buffer );
+ if ( !function_exists( 'stream_set_read_buffer' ) && $forceStrong ) {
+ wfDebug( __METHOD__ . ": Was forced to read from /dev/urandom without control over the buffer size.\n" );
+ }
+ // /dev/urandom is generally considered the best possible commonly
+ // available random source, and is available on most *nix systems.
+ wfSuppressWarnings();
+ $urandom = fopen( "/dev/urandom", "rb" );
+ wfRestoreWarnings();
+
+ // Attempt to read all our random data from urandom
+ // php's fread always does buffered reads based on the stream's chunk_size
+ // so in reality it will usually read more than the amount of data we're
+ // asked for and not storing that risks depleting the system's random pool.
+ // If stream_set_read_buffer is available set the chunk_size to the amount
+ // of data we need. Otherwise read 8k, php's default chunk_size.
+ if ( $urandom ) {
+ // php's default chunk_size is 8k
+ $chunk_size = 1024 * 8;
+ if ( function_exists( 'stream_set_read_buffer' ) ) {
+ // If possible set the chunk_size to the amount of data we need
+ stream_set_read_buffer( $urandom, $rem );
+ $chunk_size = $rem;
+ }
+ $random_bytes = fread( $urandom, max( $chunk_size, $rem ) );
+ $buffer .= $random_bytes;
+ fclose( $urandom );
+ wfDebug( __METHOD__ . ": /dev/urandom generated " . strlen( $random_bytes ) . " bytes of randomness.\n" );
+ if ( strlen( $buffer ) >= $bytes ) {
+ // urandom is always strong, set to true if all our data was generated using it
+ $this->strong = true;
+ }
+ } else {
+ wfDebug( __METHOD__ . ": /dev/urandom could not be opened.\n" );
+ }
+ wfProfileOut( __METHOD__ . '-fopen-urandom' );
+ }
+
+ // If we cannot use or generate enough data from a secure source
+ // use this loop to generate a good set of pseudo random data.
+ // This works by initializing a random state using a pile of unstable data
+ // and continually shoving it through a hash along with a variable salt.
+ // We hash the random state with more salt to avoid the state from leaking
+ // out and being used to predict the /randomness/ that follows.
+ if ( strlen( $buffer ) < $bytes ) {
+ wfDebug( __METHOD__ . ": Falling back to using a pseudo random state to generate randomness.\n" );
+ }
+ while ( strlen( $buffer ) < $bytes ) {
+ wfProfileIn( __METHOD__ . '-fallback' );
+ $buffer .= $this->hmac( $this->randomState(), mt_rand() );
+ // This code is never really cryptographically strong, if we use it
+ // at all, then set strong to false.
+ $this->strong = false;
+ wfProfileOut( __METHOD__ . '-fallback' );
+ }
+
+ // Once the buffer has been filled up with enough random data to fulfill
+ // the request shift off enough data to handle the request and leave the
+ // unused portion left inside the buffer for the next request for random data
+ $generated = substr( $buffer, 0, $bytes );
+ $buffer = substr( $buffer, $bytes );
+
+ wfDebug( __METHOD__ . ": " . strlen( $buffer ) . " bytes of randomness leftover in the buffer.\n" );
+
+ wfProfileOut( __METHOD__ );
+ return $generated;
+ }
+
+ /**
+ * @see self::generateHex()
+ */
+ public function realGenerateHex( $chars, $forceStrong = false ) {
+ // hex strings are 2x the length of raw binary so we divide the length in half
+ // odd numbers will result in a .5 that leads the generate() being 1 character
+ // short, so we use ceil() to ensure that we always have enough bytes
+ $bytes = ceil( $chars / 2 );
+ // Generate the data and then convert it to a hex string
+ $hex = bin2hex( $this->generate( $bytes, $forceStrong ) );
+ // A bit of paranoia here, the caller asked for a specific length of string
+ // here, and it's possible (eg when given an odd number) that we may actually
+ // have at least 1 char more than they asked for. Just in case they made this
+ // call intending to insert it into a database that does truncation we don't
+ // want to give them too much and end up with their database and their live
+ // code having two different values because part of what we gave them is truncated
+ // hence, we strip out any run of characters longer than what we were asked for.
+ return substr( $hex, 0, $chars );
+ }
+
+ /** Publicly exposed static methods **/
+
+ /**
+ * Return a singleton instance of MWCryptRand
+ * @return MWCryptRand
+ */
+ protected static function singleton() {
+ if ( is_null( self::$singleton ) ) {
+ self::$singleton = new self;
+ }
+ return self::$singleton;
+ }
+
+ /**
+ * Return a boolean indicating whether or not the source used for cryptographic
+ * random bytes generation in the previously run generate* call
+ * was cryptographically strong.
+ *
+ * @return bool Returns true if the source was strong, false if not.
+ */
+ public static function wasStrong() {
+ return self::singleton()->realWasStrong();
+ }
+
+ /**
+ * Generate a run of (ideally) cryptographically random data and return
+ * it in raw binary form.
+ * You can use MWCryptRand::wasStrong() if you wish to know if the source used
+ * was cryptographically strong.
+ *
+ * @param int $bytes the number of bytes of random data to generate
+ * @param bool $forceStrong Pass true if you want generate to prefer cryptographically
+ * strong sources of entropy even if reading from them may steal
+ * more entropy from the system than optimal.
+ * @return String Raw binary random data
+ */
+ public static function generate( $bytes, $forceStrong = false ) {
+ return self::singleton()->realGenerate( $bytes, $forceStrong );
+ }
+
+ /**
+ * Generate a run of (ideally) cryptographically random data and return
+ * it in hexadecimal string format.
+ * You can use MWCryptRand::wasStrong() if you wish to know if the source used
+ * was cryptographically strong.
+ *
+ * @param int $chars the number of hex chars of random data to generate
+ * @param bool $forceStrong Pass true if you want generate to prefer cryptographically
+ * strong sources of entropy even if reading from them may steal
+ * more entropy from the system than optimal.
+ * @return String Hexadecimal random data
+ */
+ public static function generateHex( $chars, $forceStrong = false ) {
+ return self::singleton()->realGenerateHex( $chars, $forceStrong );
+ }
+
+}
* @throws MWException
*/
protected static function cleanCallback( $callback ) {
- if( is_string( $callback ) ) {
+ if ( is_string( $callback ) ) {
if ( strpos( $callback, '::' ) !== false ) {
// PHP 5.1 cannot use call_user_func( 'Class::Method' )
// It can only handle only call_user_func( array( 'Class', 'Method' ) )
}
}
- if( count( $callback ) == 2 && $callback[0] == 'self' || $callback[0] == 'parent' ) {
+ if ( count( $callback ) == 2 && $callback[0] == 'self' || $callback[0] == 'parent' ) {
throw new MWException( 'MWFunction cannot call self::method() or parent::method()' );
}
* @return object
*/
public static function newObj( $class, $args = array() ) {
- if( !count( $args ) ) {
+ if ( !count( $args ) ) {
return new $class;
}
'numberofactiveusers',
'numberofpages',
'currentversion',
+ 'rootpagename',
+ 'rootpagenamee',
'basepagename',
'basepagenamee',
'currenttimestamp',
usort( $synonyms, array( $this, 'compareStringLength' ) );
$escSyn = array();
- foreach ( $synonyms as $synonym )
+ foreach ( $synonyms as $synonym ) {
// In case a magic word contains /, like that's going to happen;)
$escSyn[] = preg_quote( $synonym, '/' );
+ }
$this->mBaseRegex = implode( '|', $escSyn );
$case = $this->mCaseSensitive ? '' : 'iu';
* @return string
*/
function getRegexCase() {
- if ( $this->mRegex === '' )
+ if ( $this->mRegex === '' ) {
$this->initRegex();
+ }
return $this->mCaseSensitive ? '' : 'iu';
}
function replaceMultiple( $magicarr, $subject, &$result ) {
$search = array();
$replace = array();
- foreach( $magicarr as $id => $replacement ) {
+ foreach ( $magicarr as $id => $replacement ) {
$mw = MagicWord::get( $id );
$search[] = $mw->getRegex();
$replace[] = $replacement;
if ( isset( $params[0] ) && is_array( $params[0] ) ) {
$params = $params[0];
}
- foreach( $params as $param ) {
+ foreach ( $params as $param ) {
$this->parameters[] = self::rawParam( $param );
}
return $this;
if ( isset( $params[0] ) && is_array( $params[0] ) ) {
$params = $params[0];
}
- foreach( $params as $param ) {
+ foreach ( $params as $param ) {
$this->parameters[] = self::numParam( $param );
}
return $this;
if ( $lang instanceof Language || $lang instanceof StubUserLang ) {
$this->language = $lang;
} elseif ( is_string( $lang ) ) {
- if( $this->language->getCode() != $lang ) {
+ if ( $this->language->getCode() != $lang ) {
$this->language = Language::factory( $lang );
}
} else {
$string = $this->replaceParameters( $string, 'before' );
# Maybe transform using the full parser
- if( $this->format === 'parse' ) {
+ if ( $this->format === 'parse' ) {
$string = $this->parseText( $string );
$m = array();
- if( preg_match( '/^<p>(.*)\n?<\/p>\n?$/sU', $string, $m ) ) {
+ if ( preg_match( '/^<p>(.*)\n?<\/p>\n?$/sU', $string, $m ) ) {
$string = $m[1];
}
- } elseif( $this->format === 'block-parse' ) {
+ } elseif ( $this->format === 'block-parse' ) {
$string = $this->parseText( $string );
- } elseif( $this->format === 'text' ) {
+ } elseif ( $this->format === 'text' ) {
$string = $this->transformText( $string );
- } elseif( $this->format === 'escaped' ) {
+ } elseif ( $this->format === 'escaped' ) {
$string = $this->transformText( $string );
$string = htmlspecialchars( $string, ENT_QUOTES, 'UTF-8', false );
}
*/
protected function replaceParameters( $message, $type = 'before' ) {
$replacementKeys = array();
- foreach( $this->parameters as $n => $param ) {
+ foreach ( $this->parameters as $n => $param ) {
list( $paramType, $value ) = $this->extractParam( $param );
if ( $type === $paramType ) {
$replacementKeys['$' . ($n + 1)] = $value;
*/
public function fetchMessage() {
// Just in case the message is unset somewhere.
- if( !isset( $this->message ) ) {
+ if ( !isset( $this->message ) ) {
$this->message = $this->key;
}
return $this->message;
$httpaccept = isset( $_SERVER['HTTP_ACCEPT'] ) ? $_SERVER['HTTP_ACCEPT'] : null;
$rdftype = wfNegotiateType( wfAcceptToPrefs( $httpaccept ), wfAcceptToPrefs( self::RDF_TYPE_PREFS ) );
- if( !$rdftype ) {
+ if ( !$rdftype ) {
throw new HttpError( 406, wfMessage( 'notacceptable' ) );
}
$lastEditor = User::newFromId( $this->mArticle->getUser() );
$this->person( 'creator', $lastEditor );
- foreach( $this->mArticle->getContributors() as $user ) {
+ foreach ( $this->mArticle->getContributors() as $user ) {
$this->person( 'contributor', $user );
}
}
protected function pageOrString( $name, $page, $str ) {
- if( $page instanceof Title ) {
+ if ( $page instanceof Title ) {
$nt = $page;
} else {
$nt = Title::newFromText( $page );
}
- if( !$nt || $nt->getArticleID() == 0 ) {
+ if ( !$nt || $nt->getArticleID() == 0 ) {
$this->element( $name, $str );
} else {
$this->page( $name, $nt );
}
protected function person( $name, User $user ) {
- if( $user->isAnon() ) {
+ if ( $user->isAnon() ) {
$this->element( $name, wfMessage( 'anonymous' )->numParams( 1 )->text() );
} else {
$real = $user->getRealName();
- if( $real ) {
+ if ( $real ) {
$this->element( $name, $real );
} else {
$userName = $user->getName();
protected function rights() {
global $wgRightsPage, $wgRightsUrl, $wgRightsText;
- if( $wgRightsPage && ( $nt = Title::newFromText( $wgRightsPage ) )
+ if ( $wgRightsPage && ( $nt = Title::newFromText( $wgRightsPage ) )
&& ( $nt->getArticleID() != 0 ) ) {
$this->page( 'rights', $nt );
- } elseif( $wgRightsUrl ) {
+ } elseif ( $wgRightsUrl ) {
$this->url( 'rights', $wgRightsUrl );
- } elseif( $wgRightsText ) {
+ } elseif ( $wgRightsText ) {
$this->element( 'rights', $wgRightsText );
}
}
protected function getTerms( $url ) {
global $wgLicenseTerms;
- if( $wgLicenseTerms ) {
+ if ( $wgLicenseTerms ) {
return $wgLicenseTerms;
} else {
$known = $this->getKnownLicenses();
- if( isset( $known[$url] ) ) {
+ if ( isset( $known[$url] ) ) {
return $known[$url];
} else {
return array();
foreach ( $ccVersions as $version ) {
foreach ( $ccLicenses as $license ) {
- if( $version == '2.0' && substr( $license, 0, 2 ) != 'by' ) {
+ if ( $version == '2.0' && substr( $license, 0, 2 ) != 'by' ) {
# 2.0 dropped the non-attribs licenses
continue;
}
* appending MM_WELL_KNOWN_MIME_TYPES behind $wgMimeTypeFile, but who knows
* what will break? In practice this probably isn't a problem anyway -- Bryan)
*/
-define('MM_WELL_KNOWN_MIME_TYPES', <<<END_STRING
+define( 'MM_WELL_KNOWN_MIME_TYPES', <<<END_STRING
application/ogg ogx ogg ogm ogv oga spx
application/pdf pdf
application/vnd.oasis.opendocument.chart odc
* An extensive list of well known mime types is provided by
* the file mime.info in the includes directory.
*/
-define('MM_WELL_KNOWN_MIME_INFO', <<<END_STRING
+define( 'MM_WELL_KNOWN_MIME_INFO', <<<END_STRING
application/pdf [OFFICE]
application/vnd.oasis.opendocument.chart [OFFICE]
application/vnd.oasis.opendocument.chart-template [OFFICE]
$mime = $this->doGuessMimeType( $file, $ext );
- if( !$mime ) {
+ if ( !$mime ) {
wfDebug( __METHOD__ . ": internal type detection failed for $file (.$ext)...\n" );
$mime = $this->detectMimeType( $file, $ext );
}
$f = fopen( $file, 'rt' );
wfRestoreWarnings();
- if( !$f ) {
+ if ( !$f ) {
return 'unknown/unknown';
}
$head = fread( $f, 1024 );
$pack = array( 'UTF-16BE' => 'n*', 'UTF-16LE' => 'v*' );
$chars = unpack( $pack[$script_type], substr( $head, 2 ) );
$head = '';
- foreach( $chars as $codepoint ) {
- if( $codepoint < 128 ) {
+ foreach ( $chars as $codepoint ) {
+ if ( $codepoint < 128 ) {
$head .= chr( $codepoint );
} else {
$head .= '?';
$gis = getimagesize( $file );
wfRestoreWarnings();
- if( $gis && isset( $gis['mime'] ) ) {
+ if ( $gis && isset( $gis['mime'] ) ) {
$mime = $gis['mime'];
wfDebug( __METHOD__ . ": getimagesize detected $file as $mime\n" );
return $mime;
// Also test DjVu
$deja = new DjVuImage( $file );
- if( $deja->isValid() ) {
+ if ( $deja->isValid() ) {
wfDebug( __METHOD__ . ": detected $file as image/vnd.djvu\n" );
return 'image/vnd.djvu';
}
* @return string
*/
function detectZipType( $header, $tail = null, $ext = false ) {
- if( $ext ) { # TODO: remove $ext param
+ if ( $ext ) { # TODO: remove $ext param
wfDebug( __METHOD__ . ": WARNING: use of the \$ext parameter is deprecated. " .
"Use improveTypeFromExtension(\$mime, \$ext) instead.\n" );
}
$ext = strtolower( $i ? substr( $file, $i + 1 ) : '' );
}
if ( $ext ) {
- if( $this->isRecognizableExtension( $ext ) ) {
+ if ( $this->isRecognizableExtension( $ext ) ) {
wfDebug( __METHOD__ . ": refusing to guess mime type for .$ext file, we should have recognized it\n" );
} else {
$m = $this->guessTypesForExtension( $ext );
* @return (int?string?) a value to be used with the MEDIATYPE_xxx constants.
*/
function getMediaType( $path = null, $mime = null ) {
- if( !$mime && !$path ) {
+ if ( !$mime && !$path ) {
return MEDIATYPE_UNKNOWN;
}
// If mime type is unknown, guess it
- if( !$mime ) {
+ if ( !$mime ) {
$mime = $this->guessMimeType( $path, false );
}
// Read a chunk of the file
$f = fopen( $path, "rt" );
- if ( !$f ) return MEDIATYPE_UNKNOWN;
+ if ( !$f ) {
+ return MEDIATYPE_UNKNOWN;
+ }
$head = fread( $f, 256 );
fclose( $f );
$head = strtolower( $head );
// This is an UGLY HACK, file should be parsed correctly
- if ( strpos( $head, 'theora' ) !== false ) return MEDIATYPE_VIDEO;
- elseif ( strpos( $head, 'vorbis' ) !== false ) return MEDIATYPE_AUDIO;
- elseif ( strpos( $head, 'flac' ) !== false ) return MEDIATYPE_AUDIO;
- elseif ( strpos( $head, 'speex' ) !== false ) return MEDIATYPE_AUDIO;
- else return MEDIATYPE_MULTIMEDIA;
+ if ( strpos( $head, 'theora' ) !== false ) {
+ return MEDIATYPE_VIDEO;
+ } elseif ( strpos( $head, 'vorbis' ) !== false ) {
+ return MEDIATYPE_AUDIO;
+ } elseif ( strpos( $head, 'flac' ) !== false ) {
+ return MEDIATYPE_AUDIO;
+ } elseif ( strpos( $head, 'speex' ) !== false ) {
+ return MEDIATYPE_AUDIO;
+ } else {
+ return MEDIATYPE_MULTIMEDIA;
+ }
}
// Check for entry for full mime type
- if( $mime ) {
+ if ( $mime ) {
$type = $this->findMediaType( $mime );
if ( $type !== MEDIATYPE_UNKNOWN ) {
return $type;
}
}
- if( !$type ) {
+ if ( !$type ) {
$type = MEDIATYPE_UNKNOWN;
}
*/
function wfRequestExtension() {
/// @todo FIXME: this sort of dupes some code in WebRequest::getRequestUrl()
- if( isset( $_SERVER['REQUEST_URI'] ) ) {
+ if ( isset( $_SERVER['REQUEST_URI'] ) ) {
// Strip the query string...
list( $path ) = explode( '?', $_SERVER['REQUEST_URI'], 2 );
- } elseif( isset( $_SERVER['SCRIPT_NAME'] ) ) {
+ } elseif ( isset( $_SERVER['SCRIPT_NAME'] ) ) {
// Probably IIS. QUERY_STRING appears separately.
$path = $_SERVER['SCRIPT_NAME'];
} else {
}
$period = strrpos( $path, '.' );
- if( $period !== false ) {
+ if ( $period !== false ) {
return strtolower( substr( $path, $period ) );
}
return '';
* @return string
*/
function wfGzipHandler( $s ) {
- if( !function_exists( 'gzencode' ) ) {
+ if ( !function_exists( 'gzencode' ) ) {
wfDebug( __FUNCTION__ . "() skipping compression (gzencode unavailable)\n" );
return $s;
}
- if( headers_sent() ) {
+ if ( headers_sent() ) {
wfDebug( __FUNCTION__ . "() skipping compression (headers already sent)\n" );
return $s;
}
$ext = wfRequestExtension();
- if( $ext == '.gz' || $ext == '.tgz' ) {
+ if ( $ext == '.gz' || $ext == '.tgz' ) {
// Don't do gzip compression if the URL path ends in .gz or .tgz
// This confuses Safari and triggers a download of the page,
// even though it's pretty clearly labeled as viewable HTML.
return $s;
}
- if( wfClientAcceptsGzip() ) {
+ if ( wfClientAcceptsGzip() ) {
wfDebug( __FUNCTION__ . "() is compressing output\n" );
header( 'Content-Encoding: gzip' );
$s = gzencode( $s, 6 );
* @param string $text or array of strings
*/
function addKeyword( $text ) {
- if( is_array( $text ) ) {
+ if ( is_array( $text ) ) {
$this->mKeywords = array_merge( $this->mKeywords, $text );
} else {
array_push( $this->mKeywords, $text );
public function addScriptFile( $file, $version = null ) {
global $wgStylePath, $wgStyleVersion;
// See if $file parameter is an absolute URL or begins with a slash
- if( substr( $file, 0, 1 ) == '/' || preg_match( '#^[a-z]*://#i', $file ) ) {
+ if ( substr( $file, 0, 1 ) == '/' || preg_match( '#^[a-z]*://#i', $file ) ) {
$path = $file;
} else {
$path = "{$wgStylePath}/common/{$file}";
}
- if ( is_null( $version ) )
+ if ( is_null( $version ) ) {
$version = $wgStyleVersion;
+ }
$this->addScript( Html::linkedScript( wfAppendQuery( $path, $version ) ) );
}
protected function filterModules( $modules, $position = null, $type = ResourceLoaderModule::TYPE_COMBINED ) {
$resourceLoader = $this->getResourceLoader();
$filteredModules = array();
- foreach( $modules as $val ) {
+ foreach ( $modules as $val ) {
$module = $resourceLoader->getModule( $val );
- if( $module instanceof ResourceLoaderModule
+ if ( $module instanceof ResourceLoaderModule
&& $module->getOrigin() <= $this->getAllowedModules( $type )
&& ( is_null( $position ) || $module->getPosition() == $position )
&& ( !$this->mTarget || in_array( $this->mTarget, $module->getTargets() ) ) )
* @return Boolean: true iff cache-ok headers was sent.
*/
public function checkLastModified( $timestamp ) {
- global $wgCachePages, $wgCacheEpoch;
+ global $wgCachePages, $wgCacheEpoch, $wgUseSquid, $wgSquidMaxage;
if ( !$timestamp || $timestamp == '19700101000000' ) {
wfDebug( __METHOD__ . ": CACHE DISABLED, NO TIMESTAMP\n" );
return false;
}
- if( !$wgCachePages ) {
+ if ( !$wgCachePages ) {
wfDebug( __METHOD__ . ": CACHE DISABLED\n", false );
return false;
}
- if( $this->getUser()->getOption( 'nocache' ) ) {
+ if ( $this->getUser()->getOption( 'nocache' ) ) {
wfDebug( __METHOD__ . ": USER DISABLED CACHE\n", false );
return false;
}
'user' => $this->getUser()->getTouched(),
'epoch' => $wgCacheEpoch
);
+ if ( $wgUseSquid ) {
+ // bug 44570: the core page itself may not change, but resources might
+ $modifiedTimes['sepoch'] = wfTimestamp( TS_MW, time() - $wgSquidMaxage );
+ }
wfRunHooks( 'OutputPageCheckLastModified', array( &$modifiedTimes ) );
$maxModified = max( $modifiedTimes );
wfTimestamp( TS_ISO_8601, $clientHeaderTime ) . "\n", false );
wfDebug( __METHOD__ . ": effective Last-Modified: " .
wfTimestamp( TS_ISO_8601, $maxModified ) . "\n", false );
- if( $clientHeaderTime < $maxModified ) {
+ if ( $clientHeaderTime < $maxModified ) {
wfDebug( __METHOD__ . ": STALE, $info\n", false );
return false;
}
public function setRobotPolicy( $policy ) {
$policy = Article::formatRobotPolicy( $policy );
- if( isset( $policy['index'] ) ) {
+ if ( isset( $policy['index'] ) ) {
$this->setIndexPolicy( $policy['index'] );
}
- if( isset( $policy['follow'] ) ) {
+ if ( isset( $policy['follow'] ) ) {
$this->setFollowPolicy( $policy['follow'] );
}
}
*/
public function setIndexPolicy( $policy ) {
$policy = trim( $policy );
- if( in_array( $policy, array( 'index', 'noindex' ) ) ) {
+ if ( in_array( $policy, array( 'index', 'noindex' ) ) ) {
$this->mIndexPolicy = $policy;
}
}
*/
public function setFollowPolicy( $policy ) {
$policy = trim( $policy );
- if( in_array( $policy, array( 'follow', 'nofollow' ) ) ) {
+ if ( in_array( $policy, array( 'follow', 'nofollow' ) ) ) {
$this->mFollowPolicy = $policy;
}
}
* @return Int ResourceLoaderModule ORIGIN_ class constant
*/
public function getAllowedModules( $type ) {
- if( $type == ResourceLoaderModule::TYPE_COMBINED ) {
+ if ( $type == ResourceLoaderModule::TYPE_COMBINED ) {
return min( array_values( $this->mAllowedModules ) );
} else {
return isset( $this->mAllowedModules[$type] )
public function parse( $text, $linestart = true, $interface = false, $language = null ) {
global $wgParser;
- if( is_null( $this->getTitle() ) ) {
+ if ( is_null( $this->getTitle() ) ) {
throw new MWException( 'Empty $mTitle in ' . __METHOD__ );
}
public function addVaryHeader( $header, $option = null ) {
if ( !array_key_exists( $header, $this->mVaryHeader ) ) {
$this->mVaryHeader[$header] = (array)$option;
- } elseif( is_array( $option ) ) {
- if( is_array( $this->mVaryHeader[$header] ) ) {
+ } elseif ( is_array( $option ) ) {
+ if ( is_array( $this->mVaryHeader[$header] ) ) {
$this->mVaryHeader[$header] = array_merge( $this->mVaryHeader[$header], $option );
} else {
$this->mVaryHeader[$header] = $option;
$this->addVaryHeader( 'Cookie', $cookiesOption );
$headers = array();
- foreach( $this->mVaryHeader as $header => $option ) {
+ foreach ( $this->mVaryHeader as $header => $option ) {
$newheader = $header;
if ( is_array( $option ) && count( $option ) > 0 ) {
$newheader .= ';' . implode( ';', $option );
*/
function addAcceptLanguage() {
$lang = $this->getTitle()->getPageLanguage();
- if( !$this->getRequest()->getCheck( 'variant' ) && $lang->hasVariants() ) {
+ if ( !$this->getRequest()->getCheck( 'variant' ) && $lang->hasVariants() ) {
$variants = $lang->getVariants();
$aloption = array();
foreach ( $variants as $variant ) {
- if( $variant === $lang->getCode() ) {
+ if ( $variant === $lang->getCode() ) {
continue;
} else {
$aloption[] = 'string-contains=' . $variant;
$response->header( $this->getXVO() );
}
- if( $this->mEnableClientCache ) {
- if(
+ if ( $this->mEnableClientCache ) {
+ if (
$wgUseSquid && session_id() == '' && !$this->isPrintable() &&
$this->mSquidMaxage != 0 && !$this->haveCacheVaryCookies()
- )
- {
+ ) {
if ( $wgUseESI ) {
# We'll purge the proxy cache explicitly, but require end user agents
# to revalidate against the proxy on each visit.
$response->header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', 0 ) . ' GMT' );
$response->header( "Cache-Control: private, must-revalidate, max-age=0" );
}
- if( $this->mLastModified ) {
+ if ( $this->mLastModified ) {
$response->header( "Last-Modified: {$this->mLastModified}" );
}
} else {
public function output() {
global $wgLanguageCode, $wgDebugRedirects, $wgMimeType, $wgVaryOnXFP;
- if( $this->mDoNothing ) {
+ if ( $this->mDoNothing ) {
return;
}
$redirect = $this->mRedirect;
$code = $this->mRedirectCode;
- if( wfRunHooks( "BeforePageRedirect", array( $this, &$redirect, &$code ) ) ) {
- if( $code == '301' || $code == '303' ) {
- if( !$wgDebugRedirects ) {
+ if ( wfRunHooks( "BeforePageRedirect", array( $this, &$redirect, &$code ) ) ) {
+ if ( $code == '301' || $code == '303' ) {
+ if ( !$wgDebugRedirects ) {
$message = HttpStatus::getMessage( $code );
$response->header( "HTTP/1.1 $code $message" );
}
$this->sendCacheControl();
$response->header( "Content-Type: text/html; charset=utf-8" );
- if( $wgDebugRedirects ) {
+ if ( $wgDebugRedirects ) {
$url = htmlspecialchars( $redirect );
print "<html>\n<head>\n<title>Redirect</title>\n</head>\n<body>\n";
print "<p>Location: <a href=\"$url\">$url</a></p>\n";
* @param array $params message parameters; ignored if $msg is a Message object
*/
public function showErrorPage( $title, $msg, $params = array() ) {
- if( !$title instanceof Message ) {
+ if ( !$title instanceof Message ) {
$title = $this->msg( $title );
}
if ( count( $errors ) > 1 ) {
$text .= '<ul class="permissions-errors">' . "\n";
- foreach( $errors as $error ) {
+ foreach ( $errors as $error ) {
$text .= '<li>';
$text .= call_user_func_array( array( $this, 'msg' ), $error )->plain();
$text .= "</li>\n";
if ( !empty( $reasons ) ) {
// Permissions error
- if( $source ) {
+ if ( $source ) {
$this->setPageTitle( $this->msg( 'viewsource-title', $this->getTitle()->getPrefixedText() ) );
$this->addBacklinkSubtitle( $this->getTitle() );
} else {
}
// Show source, if supplied
- if( is_string( $source ) ) {
+ if ( is_string( $source ) ) {
$this->addWikiMsg( 'viewsourcetext' );
$pageLang = $this->getTitle()->getPageLanguage();
# If the title doesn't exist, it's fairly pointless to print a return
# link to it. After all, you just tried editing it and couldn't, so
# what's there to do there?
- if( $this->getTitle()->exists() ) {
+ if ( $this->getTitle()->exists() ) {
$this->returnToMain( null, $this->getTitle() );
}
}
*/
public function showLagWarning( $lag ) {
global $wgSlaveLagWarning, $wgSlaveLagCritical;
- if( $lag >= $wgSlaveLagWarning ) {
+ if ( $lag >= $wgSlaveLagWarning ) {
$message = $lag < $wgSlaveLagCritical
? 'lag-warn-normal'
: 'lag-warn-high';
* @param $options Options array to pass to Linker
*/
public function addReturnTo( $title, $query = array(), $text = null, $options = array() ) {
- if( in_array( 'http', $options ) ) {
+ if ( in_array( 'http', $options ) ) {
$proto = PROTO_HTTP;
- } elseif( in_array( 'https', $options ) ) {
+ } elseif ( in_array( 'https', $options ) ) {
$proto = PROTO_HTTPS;
} else {
$proto = PROTO_RELATIVE;
wfRunHooks( 'AjaxAddScript', array( &$this ) );
- if( $wgAjaxWatch && $this->getUser()->isLoggedIn() ) {
+ if ( $wgAjaxWatch && $this->getUser()->isLoggedIn() ) {
$this->addModules( 'mediawiki.page.watch.ajax' );
}
// Automatically select style/script elements
if ( $only === ResourceLoaderModule::TYPE_STYLES ) {
$link = Html::linkedStyle( $url );
- } else if ( $loadCall ) {
+ } elseif ( $loadCall ) {
$link = Html::inlineScript(
ResourceLoader::makeLoaderConditionalScript(
Xml::encodeJsCall( 'mw.loader.load', array( $url, 'text/javascript', true ) )
}
}
- if( $group == 'noscript' ) {
+ if ( $group == 'noscript' ) {
$links .= Html::rawElement( 'noscript', array(), $link ) . "\n";
} else {
$links .= $link . "\n";
// Add user JS if enabled
if ( $wgAllowUserJs ) {
if ( $this->getUser()->isLoggedIn() ) {
- if( $this->getTitle() && $this->getTitle()->isJsSubpage() && $this->userCanPreview() ) {
+ if ( $this->getTitle() && $this->getTitle()->isJsSubpage() && $this->userCanPreview() ) {
# XXX: additional security check/prompt?
// We're on a preview of a JS subpage
// Exclude this page from the user module in case it's in there (bug 26283)
) );
$p = "{$this->mIndexPolicy},{$this->mFollowPolicy}";
- if( $p !== 'index,follow' ) {
+ if ( $p !== 'index,follow' ) {
// http://www.robotstxt.org/wc/meta-user.html
// Only show if it's different from the default robots policy
$tags['meta-robots'] = Html::element( 'meta', array(
# Feeds
if ( $wgFeed ) {
- foreach( $this->getSyndicationLinks() as $format => $link ) {
+ foreach ( $this->getSyndicationLinks() as $format => $link ) {
# Use the page name for the title. In principle, this could
# lead to issues with having the same name for different feeds
# corresponding to the same page, but we can't avoid that at
$options = array();
// Even though we expect the media type to be lowercase, but here we
// force it to lowercase to be safe.
- if( $media ) {
+ if ( $media ) {
$options['media'] = $media;
}
- if( $condition ) {
+ if ( $condition ) {
$options['condition'] = $condition;
}
- if( $dir ) {
+ if ( $dir ) {
$options['dir'] = $dir;
}
$this->styles[$style] = $options;
* @param string $flip Set to 'flip' to flip the CSS if needed
*/
public function addInlineStyle( $style_css, $flip = 'noflip' ) {
- if( $flip === 'flip' && $this->getLanguage()->isRTL() ) {
+ if ( $flip === 'flip' && $this->getLanguage()->isRTL() ) {
# If wanted, and the interface is right-to-left, flip the CSS
$style_css = CSSJanus::transform( $style_css, true, false );
}
if ( $wgUseSiteCss ) {
$moduleStyles[] = 'site';
$moduleStyles[] = 'noscript';
- if( $this->getUser()->isLoggedIn() ) {
+ if ( $this->getUser()->isLoggedIn() ) {
$moduleStyles[] = 'user.groups';
}
}
}
$this->mExtStyles = array();
- foreach( $this->styles as $file => $options ) {
+ foreach ( $this->styles as $file => $options ) {
$link = $this->styleLink( $file, $options );
- if( $link ) {
+ if ( $link ) {
$links[$file] = $link;
}
}
* @return String: HTML fragment
*/
protected function styleLink( $style, $options ) {
- if( isset( $options['dir'] ) ) {
- if( $this->getLanguage()->getDir() != $options['dir'] ) {
+ if ( isset( $options['dir'] ) ) {
+ if ( $this->getLanguage()->getDir() != $options['dir'] ) {
return '';
}
}
- if( isset( $options['media'] ) ) {
+ if ( isset( $options['media'] ) ) {
$media = self::transformCssMedia( $options['media'] );
- if( is_null( $media ) ) {
+ if ( is_null( $media ) ) {
return '';
}
} else {
$media = 'all';
}
- if( substr( $style, 0, 1 ) == '/' ||
+ if ( substr( $style, 0, 1 ) == '/' ||
substr( $style, 0, 5 ) == 'http:' ||
substr( $style, 0, 6 ) == 'https:' ) {
$url = $style;
$link = Html::linkedStyle( $url, $media );
- if( isset( $options['condition'] ) ) {
+ if ( isset( $options['condition'] ) ) {
$condition = htmlspecialchars( $options['condition'] );
$link = "<!--[if $condition]>$link<![endif]-->";
}
'printable' => 'print',
'handheld' => 'handheld',
);
- foreach( $switches as $switch => $targetMedia ) {
- if( $wgRequest->getBool( $switch ) ) {
- if( $media == $targetMedia ) {
+ foreach ( $switches as $switch => $targetMedia ) {
+ if ( $wgRequest->getBool( $switch ) ) {
+ if ( $media == $targetMedia ) {
$media = '';
- } elseif( preg_match( $screenMediaQueryRegex, $media ) === 1 ) {
+ } elseif ( preg_match( $screenMediaQueryRegex, $media ) === 1 ) {
// This regex will not attempt to understand a comma-separated media_query_list
//
// Example supported values for $media: 'screen', 'only screen', 'screen and (min-width: 982px)' ),
// we don't want simple 'screen' but we might want screen queries that
// have a max-width or something, so we'll pass all others on and let the
// client do the query.
- if( $targetMedia == 'print' || $media == 'screen' ) {
+ if ( $targetMedia == 'print' || $media == 'screen' ) {
return null;
}
}
}
// Expand longer media queries as iPhone doesn't grok 'handheld'
- if( $wgHandheldForIPhone ) {
+ if ( $wgHandheldForIPhone ) {
$mediaAliases = array(
'screen' => 'screen and (min-device-width: 481px)',
'handheld' => 'handheld, only screen and (max-device-width: 480px)',
);
- if( isset( $mediaAliases[$media] ) ) {
+ if ( isset( $mediaAliases[$media] ) ) {
$media = $mediaAliases[$media];
}
}
$index = $this->getIndexField(); // column to sort on
$extraSort = $this->getExtraSortFields(); // extra columns to sort on for query planning
$order = $this->mRequest->getVal( 'order' );
- if( is_array( $index ) && isset( $index[$order] ) ) {
+ if ( is_array( $index ) && isset( $index[$order] ) ) {
$this->mOrderType = $order;
$this->mIndexField = $index[$order];
$this->mExtraSortFields = isset( $extraSort[$order] )
? (array)$extraSort[$order]
: array();
- } elseif( is_array( $index ) ) {
+ } elseif ( is_array( $index ) ) {
# First element is the default
reset( $index );
list( $this->mOrderType, $this->mIndexField ) = each( $index );
$this->mExtraSortFields = (array)$extraSort;
}
- if( !isset( $this->mDefaultDirection ) ) {
+ if ( !isset( $this->mDefaultDirection ) ) {
$dir = $this->getDefaultDirections();
$this->mDefaultDirection = is_array( $dir )
? $dir[$this->mOrderType]
}
$attrs = array();
- if( in_array( $type, array( 'first', 'prev', 'next', 'last' ) ) ) {
+ if ( in_array( $type, array( 'first', 'prev', 'next', 'last' ) ) ) {
# HTML5 rel attributes
$attrs['rel'] = $type;
}
- if( $type ) {
+ if ( $type ) {
$attrs['class'] = "mw-{$type}link";
}
*
* @return Array
*/
- protected function getExtraSortFields() { return array(); }
+ protected function getExtraSortFields() {
+ return array();
+ }
/**
* Return the default sorting direction: false for ascending, true for
*
* @return Boolean
*/
- protected function getDefaultDirections() { return false; }
+ protected function getDefaultDirections() {
+ return false;
+ }
}
/**
return '';
}
- if( isset( $this->mNavigationBar ) ) {
+ if ( isset( $this->mNavigationBar ) ) {
return $this->mNavigationBar;
}
$this->msg( 'viewprevnext' )->rawParams( $pagingLinks['prev'],
$pagingLinks['next'], $limits )->escaped();
- if( !is_array( $this->getIndexField() ) ) {
+ if ( !is_array( $this->getIndexField() ) ) {
# Early return to avoid undue nesting
return $this->mNavigationBar;
}
$extra = '';
$first = true;
$msgs = $this->getOrderTypeMessages();
- foreach( array_keys( $msgs ) as $order ) {
- if( $first ) {
+ foreach ( array_keys( $msgs ) as $order ) {
+ if ( $first ) {
$first = false;
} else {
$extra .= $this->msg( 'pipe-separator' )->escaped();
}
- if( $order == $this->mOrderType ) {
+ if ( $order == $this->mOrderType ) {
$extra .= $this->msg( $msgs[$order] )->escaped();
} else {
$extra .= $this->makeLink(
}
}
- if( $extra !== '' ) {
+ if ( $extra !== '' ) {
$extra = ' ' . $this->msg( 'parentheses' )->rawParams( $extra )->escaped();
$this->mNavigationBar .= $extra;
}
// If no year given, assume the current one
$year = gmdate( 'Y' );
// If this month hasn't happened yet this year, go back to last year's month
- if( $this->mMonth > gmdate( 'n' ) ) {
+ if ( $this->mMonth > gmdate( 'n' ) ) {
$year--;
}
}
}
$this->mSort = $this->getRequest()->getText( 'sort' );
- if ( !array_key_exists( $this->mSort, $this->getFieldNames() ) ) {
+ if ( !array_key_exists( $this->mSort, $this->getFieldNames() )
+ || !$this->isFieldSortable( $this->mSort )
+ ) {
$this->mSort = $this->getDefaultSort();
}
if ( $this->getRequest()->getBool( 'asc' ) ) {
*/
function getStartBody() {
global $wgStylePath;
- $tableClass = htmlspecialchars( $this->getTableClass() );
- $sortClass = htmlspecialchars( $this->getSortHeaderClass() );
+ $sortClass = $this->getSortHeaderClass();
- $s = "<table style='border:1px;' class=\"mw-datatable $tableClass\"><thead><tr>\n";
+ $s = '';
$fields = $this->getFieldNames();
# Make table header
foreach ( $fields as $field => $name ) {
if ( strval( $name ) == '' ) {
- $s .= "<th> </th>\n";
+ $s .= Html::rawElement( 'th', array(), ' ' ) . "\n";
} elseif ( $this->isFieldSortable( $field ) ) {
$query = array( 'sort' => $field, 'limit' => $this->mLimit );
if ( $field == $this->mSort ) {
$query['desc'] = '1';
$alt = $this->msg( 'ascending_abbrev' )->escaped();
}
- $image = htmlspecialchars( "$wgStylePath/common/images/$image" );
+ $image = "$wgStylePath/common/images/$image";
$link = $this->makeLink(
- "<img width=\"12\" height=\"12\" alt=\"$alt\" src=\"$image\" />" .
- htmlspecialchars( $name ), $query );
- $s .= "<th class=\"$sortClass\">$link</th>\n";
+ Html::element( 'img', array( 'width' => 12, 'height' => 12,
+ 'alt' => $alt, 'src' => $image ) ) . htmlspecialchars( $name ), $query );
+ $s .= Html::rawElement( 'th', array( 'class' => $sortClass ), $link ) . "\n";
} else {
- $s .= '<th>' . $this->makeLink( htmlspecialchars( $name ), $query ) . "</th>\n";
+ $s .= Html::rawElement( 'th', array(),
+ $this->makeLink( htmlspecialchars( $name ), $query ) ) . "\n";
}
} else {
- $s .= '<th>' . htmlspecialchars( $name ) . "</th>\n";
+ $s .= Html::element( 'th', array(), $name ) . "\n";
}
}
- $s .= "</tr></thead><tbody>\n";
- return $s;
+
+ $tableClass = $this->getTableClass();
+ $ret = Html::openElement( 'table', array( 'style' => 'border:1px;', 'class' => "mw-datatable $tableClass" ) );
+ $ret .= Html::rawElement( 'thead', array(), Html::rawElement( 'tr', array(), "\n" . $s . "\n" ) );
+ $ret .= Html::openElement( 'tbody' ) . "\n";
+
+ return $ret;
}
/**
*/
function getEmptyBody() {
$colspan = count( $this->getFieldNames() );
- $msgEmpty = $this->msg( 'table_pager_empty' )->escaped();
- return "<tr><td colspan=\"$colspan\">$msgEmpty</td></tr>\n";
+ $msgEmpty = $this->msg( 'table_pager_empty' )->text();
+ return Html::rawElement( 'tr', array(),
+ Html::element( 'td', array( 'colspan' => $colspan ), $msgEmpty ) );
}
/**
*/
function formatRow( $row ) {
$this->mCurrentRow = $row; // In case formatValue etc need to know
- $s = Xml::openElement( 'tr', $this->getRowAttrs( $row ) );
+ $s = Html::openElement( 'tr', $this->getRowAttrs( $row ) ) . "\n";
$fieldNames = $this->getFieldNames();
foreach ( $fieldNames as $field => $name ) {
$formatted = ' ';
}
- $s .= Xml::tags( 'td', $this->getCellAttrs( $field, $value ), $formatted );
+ $s .= Html::rawElement( 'td', $this->getCellAttrs( $field, $value ), $formatted ) . "\n";
}
- $s .= "</tr>\n";
+ $s .= Html::closeElement( 'tr' ) . "\n";
return $s;
}
'next' => 'arrow_disabled_right_25.png',
'last' => 'arrow_disabled_last_25.png',
);
- if( $this->getLanguage()->isRTL() ) {
+ if ( $this->getLanguage()->isRTL() ) {
$keys = array_keys( $labels );
$images = array_combine( $keys, array_reverse( $images ) );
$disabledImages = array_combine( $keys, array_reverse( $disabledImages ) );
$disabledTexts = array();
foreach ( $labels as $type => $label ) {
$msgLabel = $this->msg( $label )->escaped();
- $linkTexts[$type] = "<img src=\"$path/{$images[$type]}\" alt=\"$msgLabel\"/><br />$msgLabel";
- $disabledTexts[$type] = "<img src=\"$path/{$disabledImages[$type]}\" alt=\"$msgLabel\"/><br />$msgLabel";
+ $linkTexts[$type] = Html::element( 'img', array( 'src' => "$path/{$images[$type]}",
+ 'alt' => $msgLabel ) ) . "<br />$msgLabel";
+ $disabledTexts[$type] = Html::element( 'img', array( 'src' => "$path/{$disabledImages[$type]}",
+ 'alt' => $msgLabel ) ) . "<br />$msgLabel";
}
$links = $this->getPagingLinks( $linkTexts, $disabledTexts );
- $navClass = htmlspecialchars( $this->getNavClass() );
- $s = "<table class=\"$navClass\"><tr>\n";
+ $s = Html::openElement( 'table', array( 'class' => $this->getNavClass() ) );
+ $s .= Html::openElement( 'tr' ) . "\n";
$width = 100 / count( $links ) . '%';
foreach ( $labels as $type => $label ) {
- $s .= "<td style='width:$width;'>{$links[$type]}</td>\n";
+ $s .= Html::rawElement( 'td', array( 'style' => "width:$width;" ), $links[$type] ) . "\n";
}
- $s .= "</tr></table>\n";
+ $s .= Html::closeElement( 'tr' ) . Html::closeElement( 'table' ) . "\n";
return $s;
}
# The pair is either $index => $limit, in which case the $value
# will be numeric, or $limit => $text, in which case the $value
# will be a string.
- if( is_int( $value ) ) {
+ if ( is_int( $value ) ) {
$limit = $value;
$text = $this->getLanguage()->formatNum( $limit );
} else {
}
$s = '';
foreach ( $query as $name => $value ) {
- $encName = htmlspecialchars( $name );
- $encValue = htmlspecialchars( $value );
- $s .= "<input type=\"hidden\" name=\"$encName\" value=\"$encValue\"/>\n";
+ $s .= Html::hidden( $name, $value ) . "\n";
}
return $s;
}
function getLimitForm() {
global $wgScript;
- return Xml::openElement(
+ return Html::rawElement(
'form',
array(
'method' => 'get',
'action' => $wgScript
- ) ) . "\n" . $this->getLimitDropdown() . "</form>\n";
+ ),
+ "\n" . $this->getLimitDropdown()
+ ) . "\n";
}
/**
}
$pattern = (object)array(
- 'path' => $path,
- 'params' => $params,
+ 'path' => $path,
+ 'params' => $params,
'options' => $options,
- 'key' => $key,
+ 'key' => $key,
);
$pattern->weight = self::makeWeight( $pattern );
$this->patterns[] = $pattern;
*/
protected function sortByWeight() {
$weights = array();
- foreach( $this->patterns as $key => $pattern ) {
+ foreach ( $this->patterns as $key => $pattern ) {
$weights[$key] = $pattern->weight;
}
array_multisort( $weights, SORT_DESC, SORT_NUMERIC, $this->patterns );
$path = explode( '/', $pattern->path );
# For each level of the path
- foreach( $path as $piece ) {
+ foreach ( $path as $piece ) {
if ( preg_match( '/^\$(\d+|key)$/u', $piece ) ) {
# For a piece that is only a $1 variable add 1 points of weight
$weight += 1;
? 'prefs-help-email-required'
: 'prefs-help-email';
- if( $wgEnableUserEmail ) {
+ if ( $wgEnableUserEmail ) {
// additional messages when users can send email to each other
$helpMessages[] = 'prefs-help-email-others';
}
$nsOptions = $wgContLang->getFormattedNamespaces();
$nsOptions[0] = $context->msg( 'blanknamespace' )->text();
foreach ( $nsOptions as $ns => $name ) {
- if ( $ns < 0 )
+ if ( $ns < 0 ) {
unset( $nsOptions[$ns] );
+ }
}
$defaultPreferences['searchnamespaces'] = array(
$data[0] = intval( $data[0] );
$data[1] = intval( $data[1] );
$minDiff = abs( $data[0] ) * 60 + $data[1];
- if ( $data[0] < 0 ) $minDiff = - $minDiff;
+ if ( $data[0] < 0 ) {
+ $minDiff = - $minDiff;
+ }
} else {
$minDiff = intval( $data[0] ) * 60;
}
# via $wgHiddenPrefs, we don't want to destroy that setting in case the preference
# is subsequently re-enabled
# TODO: maintenance script to actually delete these
- foreach( $wgHiddenPrefs as $pref ) {
+ foreach ( $wgHiddenPrefs as $pref ) {
# If the user has not set a non-default value here, the default will be returned
# and subsequently discarded
$formData[$pref] = $user->getOption( $pref, null, true );
*/
public static function titleSearch( $search, $limit, $namespaces = array() ) {
$search = trim( $search );
- if( $search == '' ) {
+ if ( $search == '' ) {
return array(); // Return empty result
}
$namespaces = self::validateNamespaces( $namespaces );
// Find a Title which is not an interwiki and is in NS_MAIN
$title = Title::newFromText( $search );
- if( $title && $title->getInterwiki() == '' ) {
+ if ( $title && $title->getInterwiki() == '' ) {
$ns = array( $title->getNamespace() );
- if( $ns[0] == NS_MAIN ) {
+ if ( $ns[0] == NS_MAIN ) {
$ns = $namespaces; // no explicit prefix, use default namespaces
}
return self::searchBackend(
// Is this a namespace prefix?
$title = Title::newFromText( $search . 'Dummy' );
- if( $title && $title->getText() == 'Dummy'
+ if ( $title && $title->getText() == 'Dummy'
&& $title->getNamespace() != NS_MAIN
&& $title->getInterwiki() == '' ) {
return self::searchBackend(
* @return Array of strings
*/
protected static function searchBackend( $namespaces, $search, $limit ) {
- if( count( $namespaces ) == 1 ) {
+ if ( count( $namespaces ) == 1 ) {
$ns = $namespaces[0];
- if( $ns == NS_MEDIA ) {
+ if ( $ns == NS_MEDIA ) {
$namespaces = array( NS_FILE );
- } elseif( $ns == NS_SPECIAL ) {
+ } elseif ( $ns == NS_SPECIAL ) {
return self::specialSearch( $search, $limit );
}
}
$srchres = array();
- if( wfRunHooks( 'PrefixSearchBackend', array( $namespaces, $search, $limit, &$srchres ) ) ) {
+ if ( wfRunHooks( 'PrefixSearchBackend', array( $namespaces, $search, $limit, &$srchres ) ) ) {
return self::defaultSearchBackend( $namespaces, $search, $limit );
}
return $srchres;
// Unlike SpecialPage itself, we want the canonical forms of both
// canonical and alias title forms...
$keys = array();
- foreach( SpecialPageFactory::getList() as $page => $class ) {
+ foreach ( SpecialPageFactory::getList() as $page => $class ) {
$keys[$wgContLang->caseFold( $page )] = $page;
}
- foreach( $wgContLang->getSpecialPageAliases() as $page => $aliases ) {
- if( !array_key_exists( $page, SpecialPageFactory::getList() ) ) {# bug 20885
+ foreach ( $wgContLang->getSpecialPageAliases() as $page => $aliases ) {
+ if ( !array_key_exists( $page, SpecialPageFactory::getList() ) ) {# bug 20885
continue;
}
- foreach( $aliases as $alias ) {
+ foreach ( $aliases as $alias ) {
$keys[$wgContLang->caseFold( $alias )] = $alias;
}
}
ksort( $keys );
$srchres = array();
- foreach( $keys as $pageKey => $page ) {
- if( $searchKey === '' || strpos( $pageKey, $searchKey ) === 0 ) {
+ foreach ( $keys as $pageKey => $page ) {
+ if ( $searchKey === '' || strpos( $pageKey, $searchKey ) === 0 ) {
wfSuppressWarnings();
// bug 27671: Don't use SpecialPage::getTitleFor() here because it
// localizes its input leading to searches for e.g. Special:All
wfRestoreWarnings();
}
- if( count( $srchres ) >= $limit ) {
+ if ( count( $srchres ) >= $limit ) {
break;
}
}
*/
protected static function defaultSearchBackend( $namespaces, $search, $limit ) {
$ns = array_shift( $namespaces ); // support only one namespace
- if( in_array( NS_MAIN, $namespaces ) ) {
+ if ( in_array( NS_MAIN, $namespaces ) ) {
$ns = NS_MAIN; // if searching on many always default to main
}
// We will look at each given namespace against wgContLang namespaces
$validNamespaces = $wgContLang->getNamespaces();
- if( is_array( $namespaces ) && count( $namespaces ) > 0 ) {
+ if ( is_array( $namespaces ) && count( $namespaces ) > 0 ) {
$valid = array();
foreach ( $namespaces as $ns ) {
- if( is_numeric( $ns ) && array_key_exists( $ns, $validNamespaces ) ) {
+ if ( is_numeric( $ns ) && array_key_exists( $ns, $validNamespaces ) ) {
$valid[] = $ns;
}
}
- if( count( $valid ) > 0 ) {
+ if ( count( $valid ) > 0 ) {
return $valid;
}
}
$this->mReasonSelection = $wgRequest->getText( 'wpProtectReasonSelection' );
$this->mCascade = $wgRequest->getBool( 'mwProtect-cascade', $this->mCascade );
- foreach( $this->mApplicableTypes as $action ) {
+ foreach ( $this->mApplicableTypes as $action ) {
// @todo FIXME: This form currently requires individual selections,
// but the db allows multiples separated by commas.
}
$val = $wgRequest->getVal( "mwProtect-level-$action" );
- if( isset( $val ) && in_array( $val, $wgRestrictionLevels ) ) {
+ if ( isset( $val ) && in_array( $val, $wgRestrictionLevels ) ) {
// Prevent users from setting levels that they cannot later unset
- if( $val == 'sysop' ) {
+ if ( $val == 'sysop' ) {
// Special case, rewrite sysop to either protect and editprotected
- if( !$wgUser->isAllowedAny( 'protect', 'editprotected' ) )
- continue;
- } else {
- if( !$wgUser->isAllowed( $val ) )
+ if ( !$wgUser->isAllowedAny( 'protect', 'editprotected' ) ) {
continue;
+ }
+ } elseif ( !$wgUser->isAllowed( $val ) ) {
+ continue;
}
$this->mRestrictions[$action] = $val;
}
throw new ErrorPageError( 'protect-badnamespace-title', 'protect-badnamespace-text' );
}
- if( $wgRequest->wasPosted() ) {
- if( $this->save() ) {
+ if ( $wgRequest->wasPosted() ) {
+ if ( $this->save() ) {
$q = $this->mArticle->isRedirect() ? 'redirect=no' : '';
$wgOut->redirect( $this->mTitle->getFullURL( $q ) );
}
$reasonstr = $this->mReason;
}
$expiry = array();
- foreach( $this->mApplicableTypes as $action ) {
+ foreach ( $this->mApplicableTypes as $action ) {
$expiry[$action] = $this->getExpiry( $action );
- if( empty( $this->mRestrictions[$action] ) )
+ if ( empty( $this->mRestrictions[$action] ) ) {
continue; // unprotected
+ }
if ( !$expiry[$action] ) {
$this->show( array( 'protect_expiry_invalid' ) );
return false;
# to a semi-protected page.
$edit_restriction = isset( $this->mRestrictions['edit'] ) ? $this->mRestrictions['edit'] : '';
$this->mCascade = $wgRequest->getBool( 'mwProtect-cascade' );
- if ( $this->mCascade && ($edit_restriction != 'protect') &&
- !User::groupHasPermission( $edit_restriction, 'protect' ) )
+ if ( $this->mCascade && ( $edit_restriction != 'protect' ) &&
+ !User::groupHasPermission( $edit_restriction, 'protect' ) ) {
$this->mCascade = false;
+ }
$status = $this->mArticle->doUpdateRestrictions( $this->mRestrictions, $expiry, $this->mCascade, $reasonstr, $wgUser );
* you can also return an array of message name and its parameters
*/
$errorMsg = '';
- if( !wfRunHooks( 'ProtectionForm::save', array( $this->mArticle, &$errorMsg ) ) ) {
+ if ( !wfRunHooks( 'ProtectionForm::save', array( $this->mArticle, &$errorMsg ) ) ) {
if ( $errorMsg == '' ) {
$errorMsg = array( 'hookaborted' );
}
}
- if( $errorMsg != '' ) {
+ if ( $errorMsg != '' ) {
$this->show( $errorMsg );
return false;
}
);
$out = '';
- if( !$this->disabled ) {
+ if ( !$this->disabled ) {
$wgOut->addModules( 'mediawiki.legacy.protect' );
$out .= Xml::openElement( 'form', array( 'method' => 'post',
'action' => $this->mTitle->getLocalURL( 'action=protect' ),
Xml::openElement( 'table', array( 'id' => 'mwProtectSet' ) ) .
Xml::openElement( 'tbody' );
- foreach( $this->mRestrictions as $action => $selected ) {
+ foreach ( $this->mRestrictions as $action => $selected ) {
/* Not all languages have V_x <-> N_x relation */
$msg = wfMessage( 'restriction-' . $action );
$out .= "<tr><td>" .
wfMessage( 'protect-othertime-op' )->text(),
"othertime"
) . "\n";
- foreach( explode( ',', $scExpiryOptions ) as $option ) {
+ foreach ( explode( ',', $scExpiryOptions ) as $option ) {
if ( strpos( $option, ":" ) === false ) {
$show = $value = $option;
} else {
$expiryFormOptions .= Xml::option( $show, $value, $this->mExpirySelection[$action] === $value ) . "\n";
}
# Add expiry dropdown
- if( $showProtectOptions && !$this->disabled ) {
+ if ( $showProtectOptions && !$this->disabled ) {
$out .= "
<table><tr>
<td class='mw-label'>
$out .= Xml::closeElement( 'tbody' ) . Xml::closeElement( 'table' );
// JavaScript will add another row with a value-chaining checkbox
- if( $this->mTitle->exists() ) {
+ if ( $this->mTitle->exists() ) {
$out .= Xml::openElement( 'table', array( 'id' => 'mw-protect-table2' ) ) .
Xml::openElement( 'tbody' );
$out .= '<tr>
}
# Add manual and custom reason field/selects as well as submit
- if( !$this->disabled ) {
+ if ( !$this->disabled ) {
$out .= Xml::openElement( 'table', array( 'id' => 'mw-protect-table3' ) ) .
Xml::openElement( 'tbody' );
$out .= "
"</td>
</tr>";
# Disallow watching is user is not logged in
- if( $wgUser->isLoggedIn() ) {
+ if ( $wgUser->isLoggedIn() ) {
$out .= "
<tr>
<td></td>
global $wgRestrictionLevels, $wgUser;
$levels = array();
- foreach( $wgRestrictionLevels as $key ) {
+ foreach ( $wgRestrictionLevels as $key ) {
//don't let them choose levels above their own (aka so they can still unprotect and edit the page). but only when the form isn't disabled
- if( $key == 'sysop' ) {
+ if ( $key == 'sysop' ) {
//special case, rewrite sysop to protect and editprotected
- if( !$wgUser->isAllowedAny( 'protect', 'editprotected' ) && !$this->disabled )
+ if ( !$wgUser->isAllowedAny( 'protect', 'editprotected' ) && !$this->disabled ) {
continue;
+ }
} else {
- if( !$wgUser->isAllowed( $key ) && !$this->disabled )
+ if ( !$wgUser->isAllowed( $key ) && !$this->disabled ) {
continue;
+ }
}
$levels[] = $key;
}
) + $this->disabledAttrib;
$out = Xml::openElement( 'select', $attribs );
- foreach( $levels as $key ) {
+ foreach ( $levels as $key ) {
$out .= Xml::option( $this->getOptionLabel( $key ), $key, $key == $selected );
}
$out .= Xml::closeElement( 'select' );
* @return String
*/
private function getOptionLabel( $permission ) {
- if( $permission == '' ) {
+ if ( $permission == '' ) {
return wfMessage( 'protect-default' )->text();
} else {
$msg = wfMessage( "protect-level-{$permission}" );
- if( $msg->exists() ) {
+ if ( $msg->exists() ) {
return $msg->text();
}
return wfMessage( 'protect-fallback', $permission )->text();
global $wgRestrictionLevels, $wgOut;
$cascadeableLevels = array();
- foreach( $wgRestrictionLevels as $key ) {
+ foreach ( $wgRestrictionLevels as $key ) {
if ( User::groupHasPermission( $key, 'protect' )
|| $key == 'protect'
) {
wfRunHooks( 'wgQueryPages', array( &$wgQueryPages ) );
global $wgDisableCounters;
-if ( !$wgDisableCounters )
+if ( !$wgDisableCounters ) {
$wgQueryPages[] = array( 'PopularPagesPage', 'Popularpages' );
+}
/**
* This is a class for doing query pages; since they're almost all the same,
public static function newFromTitle( $title, $id = 0, $flags = 0 ) {
$conds = array(
'page_namespace' => $title->getNamespace(),
- 'page_title' => $title->getDBkey()
+ 'page_title' => $title->getDBkey()
);
if ( $id ) {
// Use the specified ID
* @return Revision or null
*/
public static function loadFromPageId( $db, $pageid, $id = 0 ) {
- $conds = array( 'rev_page' => intval( $pageid ), 'page_id' => intval( $pageid ) );
- if( $id ) {
+ $conds = array( 'rev_page' => intval( $pageid ), 'page_id' => intval( $pageid ) );
+ if ( $id ) {
$conds['rev_id'] = intval( $id );
} else {
$conds[] = 'rev_id=page_latest';
* @return Revision or null
*/
public static function loadFromTitle( $db, $title, $id = 0 ) {
- if( $id ) {
+ if ( $id ) {
$matchId = intval( $id );
} else {
$matchId = 'page_latest';
array(
"rev_id=$matchId",
'page_namespace' => $title->getNamespace(),
- 'page_title' => $title->getDBkey()
+ 'page_title' => $title->getDBkey()
)
);
}
public static function loadFromTimestamp( $db, $title, $timestamp ) {
return self::loadFromConds( $db,
array(
- 'rev_timestamp' => $db->timestamp( $timestamp ),
+ 'rev_timestamp' => $db->timestamp( $timestamp ),
'page_namespace' => $title->getNamespace(),
- 'page_title' => $title->getDBkey()
+ 'page_title' => $title->getDBkey()
)
);
}
*/
private static function loadFromConds( $db, $conditions, $flags = 0 ) {
$res = self::fetchFromConds( $db, $conditions, $flags );
- if( $res ) {
+ if ( $res ) {
$row = $res->fetchObject();
- if( $row ) {
+ if ( $row ) {
$ret = new Revision( $row );
return $ret;
}
array(
'rev_id=page_latest',
'page_namespace' => $title->getNamespace(),
- 'page_title' => $title->getDBkey()
+ 'page_title' => $title->getDBkey()
)
);
}
* @access private
*/
function __construct( $row ) {
- if( is_object( $row ) ) {
+ if ( is_object( $row ) ) {
$this->mId = intval( $row->rev_id );
$this->mPage = intval( $row->rev_page );
$this->mTextId = intval( $row->rev_text_id );
$this->mSha1 = $row->rev_sha1;
}
- if( isset( $row->page_latest ) ) {
+ if ( isset( $row->page_latest ) ) {
$this->mCurrent = ( $row->rev_id == $row->page_latest );
$this->mTitle = Title::newFromRow( $row );
} else {
$this->mTitle = null;
}
- if( !isset( $row->rev_content_model ) || is_null( $row->rev_content_model ) ) {
+ if ( !isset( $row->rev_content_model ) || is_null( $row->rev_content_model ) ) {
$this->mContentModel = null; # determine on demand if needed
} else {
$this->mContentModel = strval( $row->rev_content_model );
}
- if( !isset( $row->rev_content_format ) || is_null( $row->rev_content_format ) ) {
+ if ( !isset( $row->rev_content_format ) || is_null( $row->rev_content_format ) ) {
$this->mContentFormat = null; # determine on demand if needed
} else {
$this->mContentFormat = strval( $row->rev_content_format );
// Lazy extraction...
$this->mText = null;
- if( isset( $row->old_text ) ) {
+ if ( isset( $row->old_text ) ) {
$this->mTextRow = $row;
} else {
// 'text' table row entry will be lazy-loaded
$this->mUserText = $row->user_name; // logged-in user
}
$this->mOrigUserText = $row->rev_user_text;
- } elseif( is_array( $row ) ) {
+ } elseif ( is_array( $row ) ) {
// Build a new revision to be saved...
global $wgUser; // ugh
* @return Title|null
*/
public function getTitle() {
- if( isset( $this->mTitle ) ) {
+ if ( isset( $this->mTitle ) ) {
return $this->mTitle;
}
- if( !is_null( $this->mId ) ) { //rev_id is defined as NOT NULL, but this revision may not yet have been inserted.
+ if ( !is_null( $this->mId ) ) { //rev_id is defined as NOT NULL, but this revision may not yet have been inserted.
$dbr = wfGetDB( DB_SLAVE );
$row = $dbr->selectRow(
array( 'page', 'revision' ),
* @return Integer
*/
public function getUser( $audience = self::FOR_PUBLIC, User $user = null ) {
- if( $audience == self::FOR_PUBLIC && $this->isDeleted( self::DELETED_USER ) ) {
+ if ( $audience == self::FOR_PUBLIC && $this->isDeleted( self::DELETED_USER ) ) {
return 0;
- } elseif( $audience == self::FOR_THIS_USER && !$this->userCan( self::DELETED_USER, $user ) ) {
+ } elseif ( $audience == self::FOR_THIS_USER && !$this->userCan( self::DELETED_USER, $user ) ) {
return 0;
} else {
return $this->mUser;
* @return string
*/
public function getUserText( $audience = self::FOR_PUBLIC, User $user = null ) {
- if( $audience == self::FOR_PUBLIC && $this->isDeleted( self::DELETED_USER ) ) {
+ if ( $audience == self::FOR_PUBLIC && $this->isDeleted( self::DELETED_USER ) ) {
return '';
- } elseif( $audience == self::FOR_THIS_USER && !$this->userCan( self::DELETED_USER, $user ) ) {
+ } elseif ( $audience == self::FOR_THIS_USER && !$this->userCan( self::DELETED_USER, $user ) ) {
return '';
} else {
return $this->getRawUserText();
* @return String
*/
function getComment( $audience = self::FOR_PUBLIC, User $user = null ) {
- if( $audience == self::FOR_PUBLIC && $this->isDeleted( self::DELETED_COMMENT ) ) {
+ if ( $audience == self::FOR_PUBLIC && $this->isDeleted( self::DELETED_COMMENT ) ) {
return '';
- } elseif( $audience == self::FOR_THIS_USER && !$this->userCan( self::DELETED_COMMENT, $user ) ) {
+ } elseif ( $audience == self::FOR_THIS_USER && !$this->userCan( self::DELETED_COMMENT, $user ) ) {
return '';
} else {
return $this->mComment;
* @return Integer rcid of the unpatrolled row, zero if there isn't one
*/
public function isUnpatrolled() {
- if( $this->mUnpatrolled !== null ) {
+ if ( $this->mUnpatrolled !== null ) {
return $this->mUnpatrolled;
}
$dbr = wfGetDB( DB_SLAVE );
$this->mUnpatrolled = $dbr->selectField( 'recentchanges',
'rc_id',
array( // Add redundant user,timestamp condition so we can use the existing index
- 'rc_user_text' => $this->getRawUserText(),
- 'rc_timestamp' => $dbr->timestamp( $this->getTimestamp() ),
+ 'rc_user_text' => $this->getRawUserText(),
+ 'rc_timestamp' => $dbr->timestamp( $this->getTimestamp() ),
'rc_this_oldid' => $this->getId(),
- 'rc_patrolled' => 0
+ 'rc_patrolled' => 0
),
__METHOD__
);
* @return Content|null
*/
public function getContent( $audience = self::FOR_PUBLIC, User $user = null ) {
- if( $audience == self::FOR_PUBLIC && $this->isDeleted( self::DELETED_TEXT ) ) {
+ if ( $audience == self::FOR_PUBLIC && $this->isDeleted( self::DELETED_TEXT ) ) {
return null;
- } elseif( $audience == self::FOR_THIS_USER && !$this->userCan( self::DELETED_TEXT, $user ) ) {
+ } elseif ( $audience == self::FOR_THIS_USER && !$this->userCan( self::DELETED_TEXT, $user ) ) {
return null;
} else {
return $this->getContentInternal();
* @return Content|null the Revision's content, or null on failure.
*/
protected function getContentInternal() {
- if( is_null( $this->mContent ) ) {
+ if ( is_null( $this->mContent ) ) {
// Revision is immutable. Load on demand:
- if( is_null( $this->mText ) ) {
+ if ( is_null( $this->mText ) ) {
$this->mText = $this->loadText();
}
* @return Revision|null
*/
public function getPrevious() {
- if( $this->getTitle() ) {
+ if ( $this->getTitle() ) {
$prev = $this->getTitle()->getPreviousRevisionID( $this->getId() );
- if( $prev ) {
+ if ( $prev ) {
return self::newFromTitle( $this->getTitle(), $prev );
}
}
* @return Revision or null
*/
public function getNext() {
- if( $this->getTitle() ) {
+ if ( $this->getTitle() ) {
$next = $this->getTitle()->getNextRevisionID( $this->getId() );
if ( $next ) {
return self::newFromTitle( $this->getTitle(), $next );
* @return Integer
*/
private function getPreviousRevisionId( $db ) {
- if( is_null( $this->mPage ) ) {
+ if ( is_null( $this->mPage ) ) {
return 0;
}
# Use page_latest if ID is not given
- if( !$this->mId ) {
+ if ( !$this->mId ) {
$prevId = $db->selectField( 'page', 'page_latest',
array( 'page_id' => $this->mPage ),
__METHOD__ );
$textField = $prefix . 'text';
$flagsField = $prefix . 'flags';
- if( isset( $row->$flagsField ) ) {
+ if ( isset( $row->$flagsField ) ) {
$flags = explode( ',', $row->$flagsField );
} else {
$flags = array();
}
- if( isset( $row->$textField ) ) {
+ if ( isset( $row->$textField ) ) {
$text = $row->$textField;
} else {
wfProfileOut( __METHOD__ );
if ( in_array( 'external', $flags ) ) {
$url = $text;
$parts = explode( '://', $url, 2 );
- if( count( $parts ) == 1 || $parts[1] == '' ) {
+ if ( count( $parts ) == 1 || $parts[1] == '' ) {
wfProfileOut( __METHOD__ );
return false;
}
// If the text was fetched without an error, convert it
if ( $text !== false ) {
- if( in_array( 'gzip', $flags ) ) {
+ if ( in_array( 'gzip', $flags ) ) {
# Deal with optional compression of archived pages.
# This can be done periodically via maintenance/compressOld.php, and
# as pages are saved if $wgCompressRevisions is set.
$text = gzinflate( $text );
}
- if( in_array( 'object', $flags ) ) {
+ if ( in_array( 'object', $flags ) ) {
# Generic compressed storage
$obj = unserialize( $text );
if ( !is_object( $obj ) ) {
}
global $wgLegacyEncoding;
- if( $text !== false && $wgLegacyEncoding
+ if ( $text !== false && $wgLegacyEncoding
&& !in_array( 'utf-8', $flags ) && !in_array( 'utf8', $flags ) )
{
# Old revisions kept around in a legacy encoding?
# on load if $wgLegacyCharset is set in the future.
$flags[] = 'utf-8';
- if( $wgCompressRevisions ) {
- if( function_exists( 'gzdeflate' ) ) {
+ if ( $wgCompressRevisions ) {
+ if ( function_exists( 'gzdeflate' ) ) {
$text = gzdeflate( $text );
$flags[] = 'gzip';
} else {
$flags = self::compressRevisionText( $data );
# Write to external storage if required
- if( $wgDefaultExternalStore ) {
+ if ( $wgDefaultExternalStore ) {
// Store and get the URL
$data = ExternalStore::insertToDefault( $data );
- if( !$data ) {
+ if ( !$data ) {
wfProfileOut( __METHOD__ );
throw new MWException( "Unable to store text to external storage" );
}
- if( $flags ) {
+ if ( $flags ) {
$flags .= ',';
}
$flags .= 'external';
}
# Record the text (or external storage URL) to the text table
- if( !isset( $this->mTextId ) ) {
+ if ( !isset( $this->mTextId ) ) {
$old_id = $dbw->nextSequenceValue( 'text_old_id_seq' );
$dbw->insert( 'text',
array(
- 'old_id' => $old_id,
- 'old_text' => $data,
+ 'old_id' => $old_id,
+ 'old_text' => $data,
'old_flags' => $flags,
), __METHOD__
);
$this->mTextId = $dbw->insertId();
}
- if ( $this->mComment === null ) $this->mComment = "";
+ if ( $this->mComment === null ) {
+ $this->mComment = "";
+ }
# Record the edit in revisions
$rev_id = isset( $this->mId )
global $wgRevisionCacheExpiry, $wgMemc;
$textId = $this->getTextId();
$key = wfMemcKey( 'revisiontext', 'textid', $textId );
- if( $wgRevisionCacheExpiry ) {
+ if ( $wgRevisionCacheExpiry ) {
$text = $wgMemc->get( $key );
- if( is_string( $text ) ) {
+ if ( is_string( $text ) ) {
wfDebug( __METHOD__ . ": got id $textId from cache\n" );
wfProfileOut( __METHOD__ );
return $text;
$row = null;
}
- if( !$row ) {
+ if ( !$row ) {
// Text data is immutable; check slaves first.
$dbr = wfGetDB( DB_SLAVE );
$row = $dbr->selectRow( 'text',
__METHOD__ );
}
- if( !$row && wfGetLB()->getServerCount() > 1 ) {
+ if ( !$row && wfGetLB()->getServerCount() > 1 ) {
// Possible slave lag!
$dbw = wfGetDB( DB_MASTER );
$row = $dbw->selectRow( 'text',
$text = self::getRevisionText( $row );
# No negative caching -- negative hits on text rows may be due to corrupted slave servers
- if( $wgRevisionCacheExpiry && $text !== false ) {
+ if ( $wgRevisionCacheExpiry && $text !== false ) {
$wgMemc->set( $key, $text, $wgRevisionCacheExpiry );
}
),
__METHOD__ );
- if( $current ) {
+ if ( $current ) {
$row = array(
'page' => $pageId,
'comment' => $summary,
* @return Boolean
*/
public static function userCanBitfield( $bitfield, $field, User $user = null ) {
- if( $bitfield & $field ) { // aspect is deleted
+ if ( $bitfield & $field ) { // aspect is deleted
if ( $bitfield & self::DELETED_RESTRICTED ) {
$permission = 'suppressrevision';
} elseif ( $field & self::DELETED_TEXT ) {
static function countByPageId( $db, $id ) {
$row = $db->selectRow( 'revision', array( 'revCount' => 'COUNT(*)' ),
array( 'rev_page' => $id ), __METHOD__ );
- if( $row ) {
+ if ( $row ) {
return $row->revCount;
}
return 0;
*/
static function countByTitle( $db, $title ) {
$id = $title->getArticleID();
- if( $id ) {
+ if ( $id ) {
return self::countByPageId( $db, $id );
}
return 0;
* @return bool True if the given user was the only one to edit since the given timestamp
*/
public static function userWasLastToEdit( $db, $pageId, $userId, $since ) {
- if ( !$userId ) return false;
+ if ( !$userId ) {
+ return false;
+ }
if ( is_int( $db ) ) {
$db = wfGetDB( $db );
* @return int
*/
public function length() {
- if( !$this->res ) {
+ if ( !$this->res ) {
return 0;
} else {
return $this->res->numRows();
'td', 'th', 'tr',
);
$htmllist = array( # Tags used by list
- 'ul','ol',
+ 'ul', 'ol',
);
$listtags = array( # Tags that can appear in a list
'li',
# $params: String between element name and >
# $brace: Ending '>' or '/>'
# $rest: Everything until the next element of $bits
- if( preg_match( '!^(/?)(\\w+)([^>]*?)(/{0,1}>)([^<]*)$!', $x, $regs ) ) {
+ if ( preg_match( '!^(/?)(\\w+)([^>]*?)(/{0,1}>)([^<]*)$!', $x, $regs ) ) {
list( /* $qbar */, $slash, $t, $params, $brace, $rest ) = $regs;
} else {
$slash = $t = $params = $brace = $rest = null;
# Replace any variables or template parameters with
# plaintext results.
- if( is_callable( $processCallback ) ) {
+ if ( is_callable( $processCallback ) ) {
call_user_func_array( $processCallback, array( &$params, $args ) );
}
@list( /* $qbar */, $slash, $t, $params, $brace, $rest ) = $regs;
$badtag = false;
if ( isset( $htmlelements[$t = strtolower( $t )] ) ) {
- if( is_callable( $processCallback ) ) {
+ if ( is_callable( $processCallback ) ) {
call_user_func_array( $processCallback, array( &$params, $args ) );
}
$spaceStart--;
$spaceLen++;
}
- while ( substr( $text, $spaceStart + $spaceLen, 1 ) === ' ' )
+ while ( substr( $text, $spaceStart + $spaceLen, 1 ) === ' ' ) {
$spaceLen++;
+ }
if ( substr( $text, $spaceStart, 1 ) === "\n" and substr( $text, $spaceStart + $spaceLen, 1 ) === "\n" ) {
# Remove the comment, leading and trailing
# spaces, and leave only one newline.
$hrefExp = '/^(' . wfUrlProtocols() . ')[^\s]+$/';
$out = array();
- foreach( $attribs as $attribute => $value ) {
+ foreach ( $attribs as $attribute => $value ) {
#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 ) ) {
# Strip javascript "expression" from stylesheets.
# http://msdn.microsoft.com/workshop/author/dhtml/overview/recalc.asp
- if( $attribute == 'style' ) {
+ if ( $attribute == 'style' ) {
$value = Sanitizer::checkCss( $value );
}
*/
static function mergeAttributes( $a, $b ) {
$out = array_merge( $a, $b );
- if( isset( $a['class'] ) && isset( $b['class'] )
- && is_string( $a['class'] ) && is_string( $b['class'] )
- && $a['class'] !== $b['class'] ) {
+ if ( isset( $a['class'] ) && isset( $b['class'] )
+ && is_string( $a['class'] ) && is_string( $b['class'] )
+ && $a['class'] !== $b['class']
+ ) {
$classes = preg_split( '/\s+/', "{$a['class']} {$b['class']}",
-1, PREG_SPLIT_NO_EMPTY );
$out['class'] = implode( ' ', array_unique( $classes ) );
* @return String
*/
static function fixTagAttributes( $text, $element ) {
- if( trim( $text ) == '' ) {
+ if ( trim( $text ) == '' ) {
return '';
}
$stripped = Sanitizer::validateTagAttributes( $decoded, $element );
$attribs = array();
- foreach( $stripped as $attribute => $value ) {
+ foreach ( $stripped as $attribute => $value ) {
$encAttribute = htmlspecialchars( $attribute );
$encValue = Sanitizer::safeEncodeAttribute( $value );
* @return Array
*/
public static function decodeTagAttributes( $text ) {
- if( trim( $text ) == '' ) {
+ if ( trim( $text ) == '' ) {
return array();
}
$attribs = array();
$pairs = array();
- if( !preg_match_all(
+ if ( !preg_match_all(
self::getAttribsRegex(),
$text,
$pairs,
return $attribs;
}
- foreach( $pairs as $set ) {
+ foreach ( $pairs as $set ) {
$attribute = strtolower( $set[1] );
$value = Sanitizer::getTagAttributeCallback( $set );
* @return String
*/
private static function getTagAttributeCallback( $set ) {
- if( isset( $set[6] ) ) {
+ if ( isset( $set[6] ) ) {
# Illegal #XXXXXX color with no quotes.
return $set[6];
- } elseif( isset( $set[5] ) ) {
+ } elseif ( isset( $set[5] ) ) {
# No quotes.
return $set[5];
- } elseif( isset( $set[4] ) ) {
+ } elseif ( isset( $set[4] ) ) {
# Single-quoted
return $set[4];
- } elseif( isset( $set[3] ) ) {
+ } elseif ( isset( $set[3] ) ) {
# Double-quoted
return $set[3];
- } elseif( !isset( $set[2] ) ) {
+ } elseif ( !isset( $set[2] ) ) {
# In XHTML, attributes must have a value.
# For 'reduced' form, return explicitly the attribute name here.
return $set[1];
*/
static function normalizeCharReferencesCallback( $matches ) {
$ret = null;
- if( $matches[1] != '' ) {
+ if ( $matches[1] != '' ) {
$ret = Sanitizer::normalizeEntity( $matches[1] );
- } elseif( $matches[2] != '' ) {
+ } elseif ( $matches[2] != '' ) {
$ret = Sanitizer::decCharReference( $matches[2] );
- } elseif( $matches[3] != '' ) {
+ } elseif ( $matches[3] != '' ) {
$ret = Sanitizer::hexCharReference( $matches[3] );
}
- if( is_null( $ret ) ) {
+ if ( is_null( $ret ) ) {
return htmlspecialchars( $matches[0] );
} else {
return $ret;
*/
static function decCharReference( $codepoint ) {
$point = intval( $codepoint );
- if( Sanitizer::validateCodepoint( $point ) ) {
+ if ( Sanitizer::validateCodepoint( $point ) ) {
return sprintf( '&#%d;', $point );
} else {
return null;
*/
static function hexCharReference( $codepoint ) {
$point = hexdec( $codepoint );
- if( Sanitizer::validateCodepoint( $point ) ) {
+ if ( Sanitizer::validateCodepoint( $point ) ) {
return sprintf( '&#x%x;', $point );
} else {
return null;
* @return String
*/
static function decodeCharReferencesCallback( $matches ) {
- if( $matches[1] != '' ) {
+ if ( $matches[1] != '' ) {
return Sanitizer::decodeEntity( $matches[1] );
- } elseif( $matches[2] != '' ) {
+ } elseif ( $matches[2] != '' ) {
return Sanitizer::decodeChar( intval( $matches[2] ) );
- } elseif( $matches[3] != '' ) {
+ } elseif ( $matches[3] != '' ) {
return Sanitizer::decodeChar( hexdec( $matches[3] ) );
}
# Last case should be an ampersand by itself
* @private
*/
static function decodeChar( $codepoint ) {
- if( Sanitizer::validateCodepoint( $codepoint ) ) {
+ if ( Sanitizer::validateCodepoint( $codepoint ) ) {
return codepointToUtf8( $codepoint );
} else {
return UTF8_REPLACEMENT;
if ( isset( self::$htmlEntityAliases[$name] ) ) {
$name = self::$htmlEntityAliases[$name];
}
- if( isset( self::$htmlEntities[$name] ) ) {
+ if ( isset( self::$htmlEntities[$name] ) ) {
return codepointToUtf8( self::$htmlEntities[$name] );
} else {
return "&$name;";
*/
static function hackDocType() {
$out = "<!DOCTYPE html [\n";
- foreach( self::$htmlEntities as $entity => $codepoint ) {
+ foreach ( self::$htmlEntities as $entity => $codepoint ) {
$out .= "<!ENTITY $entity \"&#$codepoint;\">";
}
$out .= "]>\n";
# Validate hostname portion
$matches = array();
- if( preg_match( '!^([^:]+:)(//[^/]+)?(.*)$!iD', $url, $matches ) ) {
+ if ( preg_match( '!^([^:]+:)(//[^/]+)?(.*)$!iD', $url, $matches ) ) {
list( /* $whole */, $protocol, $host, $rest ) = $matches;
// Characters that will be ignored in IDNs.
*/
public static function validateEmail( $addr ) {
$result = null;
- if( !wfRunHooks( 'isValidEmailAddr', array( $addr, &$result ) ) ) {
+ if ( !wfRunHooks( 'isValidEmailAddr', array( $addr, &$result ) ) ) {
return $result;
}
}
// Set various default paths sensibly...
-if ( $wgScript === false ) $wgScript = "$wgScriptPath/index$wgScriptExtension";
-if ( $wgLoadScript === false ) $wgLoadScript = "$wgScriptPath/load$wgScriptExtension";
+if ( $wgScript === false ) {
+ $wgScript = "$wgScriptPath/index$wgScriptExtension";
+}
+if ( $wgLoadScript === false ) {
+ $wgLoadScript = "$wgScriptPath/load$wgScriptExtension";
+}
if ( $wgArticlePath === false ) {
if ( $wgUsePathInfo ) {
$wgActionPaths['view'] = $wgArticlePath;
}
-if ( !empty( $wgActionPaths ) && !isset( $wgActionPaths['view'] ) ) {
- # 'view' is assumed the default action path everywhere in the code
- # but is rarely filled in $wgActionPaths
- $wgActionPaths['view'] = $wgArticlePath;
+if ( $wgStylePath === false ) {
+ $wgStylePath = "$wgScriptPath/skins";
+}
+if ( $wgLocalStylePath === false ) {
+ $wgLocalStylePath = "$wgScriptPath/skins";
+}
+if ( $wgStyleDirectory === false ) {
+ $wgStyleDirectory = "$IP/skins";
+}
+if ( $wgExtensionAssetsPath === false ) {
+ $wgExtensionAssetsPath = "$wgScriptPath/extensions";
}
-if ( $wgStylePath === false ) $wgStylePath = "$wgScriptPath/skins";
-if ( $wgLocalStylePath === false ) $wgLocalStylePath = "$wgScriptPath/skins";
-if ( $wgStyleDirectory === false ) $wgStyleDirectory = "$IP/skins";
-if ( $wgExtensionAssetsPath === false ) $wgExtensionAssetsPath = "$wgScriptPath/extensions";
-
-if ( $wgLogo === false ) $wgLogo = "$wgStylePath/common/images/wiki.png";
+if ( $wgLogo === false ) {
+ $wgLogo = "$wgStylePath/common/images/wiki.png";
+}
-if ( $wgUploadPath === false ) $wgUploadPath = "$wgScriptPath/images";
-if ( $wgUploadDirectory === false ) $wgUploadDirectory = "$IP/images";
-if ( $wgReadOnlyFile === false ) $wgReadOnlyFile = "{$wgUploadDirectory}/lock_yBgMBwiR";
-if ( $wgFileCacheDirectory === false ) $wgFileCacheDirectory = "{$wgUploadDirectory}/cache";
-if ( $wgDeletedDirectory === false ) $wgDeletedDirectory = "{$wgUploadDirectory}/deleted";
+if ( $wgUploadPath === false ) {
+ $wgUploadPath = "$wgScriptPath/images";
+}
+if ( $wgUploadDirectory === false ) {
+ $wgUploadDirectory = "$IP/images";
+}
+if ( $wgReadOnlyFile === false ) {
+ $wgReadOnlyFile = "{$wgUploadDirectory}/lock_yBgMBwiR";
+}
+if ( $wgFileCacheDirectory === false ) {
+ $wgFileCacheDirectory = "{$wgUploadDirectory}/cache";
+}
+if ( $wgDeletedDirectory === false ) {
+ $wgDeletedDirectory = "{$wgUploadDirectory}/deleted";
+}
if ( isset( $wgFileStore['deleted']['directory'] ) ) {
$wgDeletedDirectory = $wgFileStore['deleted']['directory'];
* Initialise $wgLockManagers to include basic FS version
*/
$wgLockManagers[] = array(
- 'name' => 'fsLockManager',
- 'class' => 'FSLockManager',
+ 'name' => 'fsLockManager',
+ 'class' => 'FSLockManager',
'lockDirectory' => "{$wgUploadDirectory}/lockdir",
);
$wgLockManagers[] = array(
- 'name' => 'nullLockManager',
- 'class' => 'NullLockManager',
+ 'name' => 'nullLockManager',
+ 'class' => 'NullLockManager',
);
/**
}
if ( $wgUseInstantCommons ) {
$wgForeignFileRepos[] = array(
- 'class' => 'ForeignAPIRepo',
- 'name' => 'wikimediacommons',
- 'apibase' => WebRequest::detectProtocol() === 'https' ?
+ 'class' => 'ForeignAPIRepo',
+ 'name' => 'wikimediacommons',
+ 'apibase' => WebRequest::detectProtocol() === 'https' ?
'https://commons.wikimedia.org/w/api.php' :
'http://commons.wikimedia.org/w/api.php',
- 'hashLevels' => 2,
- 'fetchDescription' => true,
+ 'hashLevels' => 2,
+ 'fetchDescription' => true,
'descriptionCacheExpiry' => 43200,
- 'apiThumbCacheExpiry' => 86400,
+ 'apiThumbCacheExpiry' => 86400,
);
}
/*
);
/// @todo UGLY UGLY
-if( is_array( $wgExtraNamespaces ) ) {
+if ( is_array( $wgExtraNamespaces ) ) {
$wgCanonicalNamespaceNames = $wgCanonicalNamespaceNames + $wgExtraNamespaces;
}
}
# $wgDisabledActions is deprecated as of 1.18
-foreach( $wgDisabledActions as $action ) {
+foreach ( $wgDisabledActions as $action ) {
$wgActions[$action] = false;
}
}
date_default_timezone_set( $wgLocaltimezone );
-if( is_null( $wgLocalTZoffset ) ) {
+if ( is_null( $wgLocalTZoffset ) ) {
$wgLocalTZoffset = date( 'Z' ) / 60;
}
if ( is_object( $func ) && $func instanceof Closure ) {
$profName = $fname . '-extensions-closure';
} elseif ( is_array( $func ) ) {
- if ( is_object( $func[0] ) )
+ if ( is_object( $func[0] ) ) {
$profName = $fname . '-extensions-' . get_class( $func[0] ) . '::' . $func[1];
- else
+ } else {
$profName = $fname . '-extensions-' . implode( '::', $func );
+ }
} else {
$profName = $fname . '-extensions-' . strval( $func );
}
*/
protected function getSetting( $settingName, $wiki, /*array*/ $params ) {
$retval = null;
- if( array_key_exists( $settingName, $this->settings ) ) {
+ if ( array_key_exists( $settingName, $this->settings ) ) {
$thisSetting =& $this->settings[$settingName];
do {
// Do individual wiki settings
- if( array_key_exists( $wiki, $thisSetting ) ) {
+ if ( array_key_exists( $wiki, $thisSetting ) ) {
$retval = $thisSetting[$wiki];
break;
} elseif ( array_key_exists( "+$wiki", $thisSetting ) && is_array( $thisSetting["+$wiki"] ) ) {
}
// Do tag settings
- foreach( $params['tags'] as $tag ) {
- if( array_key_exists( $tag, $thisSetting ) ) {
+ foreach ( $params['tags'] as $tag ) {
+ if ( array_key_exists( $tag, $thisSetting ) ) {
if ( isset( $retval ) && is_array( $retval ) && is_array( $thisSetting[$tag] ) ) {
$retval = self::arrayMerge( $retval, $thisSetting[$tag] );
} else {
$retval = $thisSetting[$tag];
}
break 2;
- } elseif( array_key_exists( "+$tag", $thisSetting ) && is_array( $thisSetting["+$tag"] ) ) {
- if( !isset( $retval ) ) {
+ } elseif ( array_key_exists( "+$tag", $thisSetting ) && is_array( $thisSetting["+$tag"] ) ) {
+ if ( !isset( $retval ) ) {
$retval = array();
}
$retval = self::arrayMerge( $retval, $thisSetting["+$tag"] );
}
// Do suffix settings
$suffix = $params['suffix'];
- if( !is_null( $suffix ) ) {
- if( array_key_exists( $suffix, $thisSetting ) ) {
+ if ( !is_null( $suffix ) ) {
+ if ( array_key_exists( $suffix, $thisSetting ) ) {
if ( isset( $retval ) && is_array( $retval ) && is_array( $thisSetting[$suffix] ) ) {
$retval = self::arrayMerge( $retval, $thisSetting[$suffix] );
} else {
}
// Fall back to default.
- if( array_key_exists( 'default', $thisSetting ) ) {
- if( is_array( $retval ) && is_array( $thisSetting['default'] ) ) {
+ if ( array_key_exists( 'default', $thisSetting ) ) {
+ if ( is_array( $retval ) && is_array( $thisSetting['default'] ) ) {
$retval = self::arrayMerge( $retval, $thisSetting['default'] );
} else {
$retval = $thisSetting['default'];
} while ( false );
}
- if( !is_null( $retval ) && count( $params['params'] ) ) {
+ if ( !is_null( $retval ) && count( $params['params'] ) ) {
foreach ( $params['params'] as $key => $value ) {
$retval = $this->doReplace( '$' . $key, $value, $retval );
}
* @return string
*/
function doReplace( $from, $to, $in ) {
- if( is_string( $in ) ) {
+ if ( is_string( $in ) ) {
return str_replace( $from, $to, $in );
- } elseif( is_array( $in ) ) {
- foreach( $in as $key => $val ) {
+ } elseif ( is_array( $in ) ) {
+ foreach ( $in as $key => $val ) {
$in[$key] = $this->doReplace( $from, $to, $val );
}
return $in;
public function getAll( $wiki, $suffix = null, $params = array(), $wikiTags = array() ) {
$params = $this->mergeParams( $wiki, $suffix, $params, $wikiTags );
$localSettings = array();
- foreach( $this->settings as $varname => $stuff ) {
+ foreach ( $this->settings as $varname => $stuff ) {
$append = false;
$var = $varname;
if ( substr( $varname, 0, 1 ) == '+' ) {
'params' => array(),
);
- if( !is_callable( $this->siteParamsCallback ) ) {
+ if ( !is_callable( $this->siteParamsCallback ) ) {
return $default;
}
$ret = call_user_func_array( $this->siteParamsCallback, array( $this, $wiki ) );
# Validate the returned value
- if( !is_array( $ret ) ) {
+ if ( !is_array( $ret ) ) {
return $default;
}
- foreach( $default as $name => $def ) {
- if( !isset( $ret[$name] ) || ( is_array( $default[$name] ) && !is_array( $ret[$name] ) ) ) {
+ foreach ( $default as $name => $def ) {
+ if ( !isset( $ret[$name] ) || ( is_array( $default[$name] ) && !is_array( $ret[$name] ) ) ) {
$ret[$name] = $default[$name];
}
}
protected function mergeParams( $wiki, $suffix, /*array*/ $params, /*array*/ $wikiTags ) {
$ret = $this->getWikiParams( $wiki );
- if( is_null( $ret['suffix'] ) ) {
+ if ( is_null( $ret['suffix'] ) ) {
$ret['suffix'] = $suffix;
}
$ret['params'] += $params;
// Automatically fill that ones if needed
- if( !isset( $ret['params']['lang'] ) && !is_null( $ret['lang'] ) ) {
+ if ( !isset( $ret['params']['lang'] ) && !is_null( $ret['lang'] ) ) {
$ret['params']['lang'] = $ret['lang'];
}
- if( !isset( $ret['params']['site'] ) && !is_null( $ret['suffix'] ) ) {
+ if ( !isset( $ret['params']['site'] ) && !is_null( $ret['suffix'] ) ) {
$ret['params']['site'] = $ret['suffix'];
}
public function siteFromDB( $db ) {
// Allow override
$def = $this->getWikiParams( $db );
- if( !is_null( $def['suffix'] ) && !is_null( $def['lang'] ) ) {
+ if ( !is_null( $def['suffix'] ) && !is_null( $def['lang'] ) ) {
return array( $def['suffix'], $def['lang'] );
}
*/
static function arrayMerge( $array1/* ... */ ) {
$out = $array1;
- for( $i = 1; $i < func_num_args(); $i++ ) {
- foreach( func_get_arg( $i ) as $key => $value ) {
+ for ( $i = 1; $i < func_num_args(); $i++ ) {
+ foreach ( func_get_arg( $i ) as $key => $value ) {
if ( isset( $out[$key] ) && is_array( $out[$key] ) && is_array( $value ) ) {
$out[$key] = self::arrayMerge( $out[$key], $value );
} elseif ( !isset( $out[$key] ) || !$out[$key] && !is_numeric( $key ) ) {
wfDebug( __METHOD__ . ": reading site_stats from slave\n" );
$row = self::doLoad( wfGetDB( DB_SLAVE ) );
- if( !self::isSane( $row ) ) {
+ if ( !self::isSane( $row ) ) {
// Might have just been initialized during this request? Underflow?
wfDebug( __METHOD__ . ": site_stats damaged or missing on slave\n" );
$row = self::doLoad( wfGetDB( DB_MASTER ) );
}
- if( !self::isSane( $row ) ) {
+ if ( !self::isSane( $row ) ) {
// Normally the site_stats table is initialized at install time.
// Some manual construction scenarios may leave the table empty or
// broken, however, for instance when importing from a dump into a
$row = self::doLoad( wfGetDB( DB_MASTER ) );
}
- if( !self::isSane( $row ) ) {
+ if ( !self::isSane( $row ) ) {
wfDebug( __METHOD__ . ": site_stats persistently nonsensical o_O\n" );
}
return $row;
*/
static function pagesInNs( $ns ) {
wfProfileIn( __METHOD__ );
- if( !isset( self::$pageCount[$ns] ) ) {
+ if ( !isset( self::$pageCount[$ns] ) ) {
$dbr = wfGetDB( DB_SLAVE );
self::$pageCount[$ns] = (int)$dbr->selectField(
'page',
* @return bool
*/
private static function isSane( $row ) {
- if(
+ if (
$row === false
|| $row->ss_total_pages < $row->ss_good_articles
|| $row->ss_total_edits < $row->ss_total_pages
return false;
}
// Now check for underflow/overflow
- foreach( array( 'total_views', 'total_edits', 'good_articles',
+ foreach ( array( 'total_views', 'total_edits', 'good_articles',
'total_pages', 'users', 'images' ) as $member ) {
- if(
+ if (
$row->{"ss_$member"} > 2000000000
|| $row->{"ss_$member"} < 0
) {
$counter->files();
// Only do views if we don't want to not count them
- if( $options['views'] ) {
+ if ( $options['views'] ) {
$counter->views();
}
// Update/refresh
- if( $options['update'] ) {
+ if ( $options['update'] ) {
$counter->update();
} else {
$counter->refresh();
}
// Count active users if need be
- if( $options['activeUsers'] ) {
+ if ( $options['activeUsers'] ) {
SiteStatsUpdate::cacheUpdate( wfGetDB( DB_MASTER ) );
}
}
*/
static function getSkinNameMessages() {
$messages = array();
- foreach( self::getSkinNames() as $skinKey => $skinName ) {
+ foreach ( self::getSkinNames() as $skinKey => $skinName ) {
$messages[] = "skinname-$skinKey";
}
return $messages;
return $this->mRelevantUser;
}
$title = $this->getRelevantTitle();
- if( $title->hasSubjectNamespace( NS_USER ) ) {
+ if ( $title->hasSubjectNamespace( NS_USER ) ) {
$rootUser = $title->getRootText();
if ( User::isIP( $rootUser ) ) {
$this->mRelevantUser = User::newFromName( $rootUser, false );
if ( $c > 1 ) {
$subpages .= $wgLang->getDirMarkEntity() . $this->msg( 'pipe-separator' )->escaped();
- } else {
+ } else {
$subpages .= '< ';
}
*/
static function makeSpecialUrl( $name, $urlaction = '', $proto = null ) {
$title = SpecialPage::getSafeTitleFor( $name );
- if( is_null( $proto ) ) {
+ if ( is_null( $proto ) ) {
return $title->getLocalURL( $urlaction );
} else {
return $title->getFullURL( $urlaction, false, $proto );
$needParse = false;
- if( $name === 'default' ) {
+ if ( $name === 'default' ) {
// special case
global $wgSiteNotice;
$notice = $wgSiteNotice;
- if( empty( $notice ) ) {
+ if ( empty( $notice ) ) {
wfProfileOut( __METHOD__ );
return false;
}
} else {
$msg = $this->msg( $name )->inContentLanguage();
- if( $msg->isDisabled() ) {
+ if ( $msg->isDisabled() ) {
wfProfileOut( __METHOD__ );
return false;
}
// Use the extra hash appender to let eg SSL variants separately cache.
$key = wfMemcKey( $name . $wgRenderHashAppend );
$cachedNotice = $parserMemc->get( $key );
- if( is_array( $cachedNotice ) ) {
- if( md5( $notice ) == $cachedNotice['hash'] ) {
+ if ( is_array( $cachedNotice ) ) {
+ if ( md5( $notice ) == $cachedNotice['hash'] ) {
$notice = $cachedNotice['html'];
} else {
$needParse = true;
$ret = array();
$items = array( 'viewcount', 'credits', 'lastmod', 'numberofwatchingusers', 'copyright' );
- foreach( $items as $item ) {
+ foreach ( $items as $item ) {
if ( $this->data[$item] !== false ) {
$ret[] = $this->data[$item];
}
foreach ( $variants as $code ) {
$varname = $lang->getVariantname( $code );
- if ( $varname == 'disable' ) {
- continue;
- }
$s = $wgLang->pipeList( array(
$s,
'<a href="' . htmlspecialchars( $title->getLocalURL( 'variant=' . $code ) ) . '" lang="' . $code . '" hreflang="' . $code . '">' . htmlspecialchars( $varname ) . '</a>'
case NS_FILE:
$text = wfMessage( 'imagepage' );
# Make link known if image exists, even if the desc. page doesn't.
- if ( wfFindFile( $link ) )
+ if ( wfFindFile( $link ) ) {
$linkOptions[] = 'known';
+ }
break;
case NS_MEDIAWIKI:
$text = wfMessage( 'mediawikipage' );
$value = wfMessage( $value )->text();
// interpolate variables
$m = array();
- while( preg_match( '/\$([0-9]*?)/sm', $value, $m ) ) {
+ while ( preg_match( '/\$([0-9]*?)/sm', $value, $m ) ) {
list( $src, $var ) = $m;
wfSuppressWarnings();
$varValue = $this->_context[$var];
return new $classname();
}
+ /**
+ * Generates array of language links for the current page
+ *
+ * @return array
+ * @public
+ */
+ public function getLanguages() {
+ global $wgHideInterlanguageLinks;
+ $out = $this->getOutput();
+
+ # Language links
+ $language_urls = array();
+
+ if ( !$wgHideInterlanguageLinks ) {
+ foreach ( $out->getLanguageLinks() as $languageLinkText ) {
+ $languageLinkParts = explode( ':', $languageLinkText, 2 );
+ $class = 'interwiki-' . $languageLinkParts[0];
+ unset( $languageLinkParts );
+ $languageLinkTitle = Title::newFromText( $languageLinkText );
+ if ( $languageLinkTitle ) {
+ $ilInterwikiCode = $languageLinkTitle->getInterwiki();
+ $ilLangName = Language::fetchLanguageName( $ilInterwikiCode );
+
+ if ( strval( $ilLangName ) === '' ) {
+ $ilLangName = $languageLinkText;
+ } else {
+ $ilLangName = $this->formatLanguageName( $ilLangName );
+ }
+
+ $language_urls[] = array(
+ 'href' => $languageLinkTitle->getFullURL(),
+ 'text' => $ilLangName,
+ 'title' => $languageLinkTitle->getText(),
+ 'class' => $class,
+ 'lang' => $ilInterwikiCode,
+ 'hreflang' => $ilInterwikiCode
+ );
+ }
+ }
+ }
+ return $language_urls;
+ }
+
/**
* initialize various variables and generate the template
*
global $wgScript, $wgStylePath;
global $wgMimeType, $wgJsMimeType;
global $wgXhtmlDefaultNamespace, $wgXhtmlNamespaces, $wgHtml5Version;
- global $wgDisableCounters, $wgSitename, $wgLogo, $wgHideInterlanguageLinks;
+ global $wgDisableCounters, $wgSitename, $wgLogo;
global $wgMaxCredits, $wgShowCreditsIfMax;
global $wgPageShowWatchingUsers;
global $wgArticlePath, $wgScriptPath, $wgServer;
}
$tpl->set( 'catlinks', $this->getCategories() );
- if( $out->isSyndicated() ) {
+ if ( $out->isSyndicated() ) {
$feeds = array();
- foreach( $out->getSyndicationLinks() as $format => $link ) {
+ foreach ( $out->getSyndicationLinks() as $format => $link ) {
$feeds[$format] = array(
'text' => $this->msg( "feed-$format" )->text(),
'href' => $link
$out->mBodytext = Html::rawElement( 'div', $realBodyAttribs, $out->mBodytext );
$tpl->setRef( 'bodytext', $out->mBodytext );
- # Language links
- $language_urls = array();
-
- if ( !$wgHideInterlanguageLinks ) {
- foreach( $out->getLanguageLinks() as $languageLinkText ) {
- $languageLinkParts = explode( ':', $languageLinkText, 2 );
- $class = 'interwiki-' . $languageLinkParts[0];
- unset( $languageLinkParts );
- $languageLinkTitle = Title::newFromText( $languageLinkText );
- if ( $languageLinkTitle ) {
- $ilInterwikiCode = $languageLinkTitle->getInterwiki();
- $ilLangName = Language::fetchLanguageName( $ilInterwikiCode );
-
- if ( strval( $ilLangName ) === '' ) {
- $ilLangName = $languageLinkText;
- } else {
- $ilLangName = $this->formatLanguageName( $ilLangName );
- }
-
- $language_urls[] = array(
- 'href' => $languageLinkTitle->getFullURL(),
- 'text' => $ilLangName,
- 'title' => $languageLinkTitle->getText(),
- 'class' => $class,
- 'lang' => $ilInterwikiCode,
- 'hreflang' => $ilInterwikiCode
- );
- }
- }
- }
+ $language_urls = $this->getLanguages();
if ( count( $language_urls ) ) {
$tpl->setRef( 'language_urls', $language_urls );
} else {
$tpl->set( 'reporttime', wfReportTime() );
// original version by hansm
- if( !wfRunHooks( 'SkinTemplateOutputPageBeforeExec', array( &$this, &$tpl ) ) ) {
+ if ( !wfRunHooks( 'SkinTemplateOutputPageBeforeExec', array( &$this, &$tpl ) ) ) {
wfDebug( __METHOD__ . ": Hook SkinTemplateOutputPageBeforeExec broke outputPage execution!\n" );
}
if ( strval( $page ) !== '' ) {
$a['returnto'] = $page;
$query = $request->getVal( 'returntoquery', $this->thisquery );
- if( $query != '' ) {
+ if ( $query != '' ) {
$a['returntoquery'] = $query;
}
}
}
$returnto = wfArrayToCgi( $a );
- if( $this->loggedin ) {
+ if ( $this->loggedin ) {
$personal_urls['userpage'] = array(
'text' => $this->username,
'href' => &$this->userpageUrlDetails['href'],
# thickens, because the Title object is altered for special pages,
# so it doesn't contain the original alias-with-subpage.
$origTitle = Title::newFromText( $request->getText( 'title' ) );
- if( $origTitle instanceof Title && $origTitle->isSpecialPage() ) {
+ if ( $origTitle instanceof Title && $origTitle->isSpecialPage() ) {
list( $spName, $spPar ) = SpecialPageFactory::resolveAlias( $origTitle->getText() );
$active = $spName == 'Contributions'
&& ( ( $spPar && $spPar == $this->username )
'class' => $wgSecureLogin ? 'link-https' : ''
);
- if( $this->showIPinHeader() ) {
+ if ( $this->showIPinHeader() ) {
$href = &$this->userpageUrlDetails['href'];
$personal_urls['anonuserpage'] = array(
'text' => $this->username,
*/
function tabAction( $title, $message, $selected, $query = '', $checkEdit = false ) {
$classes = array();
- if( $selected ) {
+ if ( $selected ) {
$classes[] = 'selected';
}
- if( $checkEdit && !$title->isKnown() ) {
+ if ( $checkEdit && !$title->isKnown() ) {
$classes[] = 'new';
if ( $query !== '' ) {
$query = 'action=edit&redlink=1&' . $query;
}
$result = array();
- if( !wfRunHooks( 'SkinTemplateTabAction', array( &$this,
+ if ( !wfRunHooks( 'SkinTemplateTabAction', array( &$this,
$title, $message, $selected, $checkEdit,
&$classes, &$query, &$text, &$result ) ) ) {
return $result;
function makeTalkUrlDetails( $name, $urlaction = '' ) {
$title = Title::newFromText( $name );
- if( !is_object( $title ) ) {
+ if ( !is_object( $title ) ) {
throw new MWException( __METHOD__ . " given invalid pagename $name" );
}
$title = $title->getTalkPage();
wfRunHooks( 'SkinTemplatePreventOtherActiveTabs', array( &$this, &$preventActiveTabs ) );
// Checks if page is some kind of content
- if( $title->canExist() ) {
+ if ( $title->canExist() ) {
// Gets page objects for the related namespaces
$subjectPage = $title->getSubjectPage();
$talkPage = $title->getTalkPage();
$params = array();
}
// Loops over each variant
- foreach( $variants as $code ) {
+ foreach ( $variants as $code ) {
// Gets variant name from language code
$varname = $pageLang->getVariantname( $code );
- // Checks if the variant is marked as disabled
- if( $varname == 'disable' ) {
- // Skips this variant
- continue;
- }
// Appends variant link
$content_navigation['variants'][] = array(
'class' => ( $code == $preferred ) ? 'selected' : false,
$nav_urls = array();
$nav_urls['mainpage'] = array( 'href' => self::makeMainPageUrl() );
- if( $wgUploadNavigationUrl ) {
+ if ( $wgUploadNavigationUrl ) {
$nav_urls['upload'] = array( 'href' => $wgUploadNavigationUrl );
- } elseif( UploadBase::isEnabled() && UploadBase::isAllowed( $this->getUser() ) === true ) {
+ } elseif ( UploadBase::isEnabled() && UploadBase::isAllowed( $this->getUser() ) === true ) {
$nav_urls['upload'] = array( 'href' => self::makeSpecialUrl( 'Upload' ) );
} else {
$nav_urls['upload'] = false;
$ptool['active'] = $plink['active'];
}
foreach ( array( 'href', 'class', 'text' ) as $k ) {
- if ( isset( $plink[$k] ) )
+ if ( isset( $plink[$k] ) ) {
$ptool['links'][0][$k] = $plink[$k];
+ }
}
$personal_tools[$key] = $ptool;
}
case 'SEARCH':
// Search is a special case, skins should custom implement this
$boxes[$boxName] = array(
- 'id' => 'p-search',
- 'header' => $this->getMsg( 'search' )->text(),
+ 'id' => 'p-search',
+ 'header' => $this->getMsg( 'search' )->text(),
'generated' => false,
- 'content' => true,
+ 'content' => true,
);
break;
case 'TOOLBOX':
$msgObj = $this->getMsg( 'toolbox' );
$boxes[$boxName] = array(
- 'id' => 'p-tb',
- 'header' => $msgObj->exists() ? $msgObj->text() : 'toolbox',
+ 'id' => 'p-tb',
+ 'header' => $msgObj->exists() ? $msgObj->text() : 'toolbox',
'generated' => false,
- 'content' => $this->getToolbox(),
+ 'content' => $this->getToolbox(),
);
break;
case 'LANGUAGES':
if ( $this->data['language_urls'] ) {
$msgObj = $this->getMsg( 'otherlanguages' );
$boxes[$boxName] = array(
- 'id' => 'p-lang',
- 'header' => $msgObj->exists() ? $msgObj->text() : 'otherlanguages',
+ 'id' => 'p-lang',
+ 'header' => $msgObj->exists() ? $msgObj->text() : 'otherlanguages',
'generated' => false,
- 'content' => $this->data['language_urls'],
+ 'content' => $this->data['language_urls'],
);
}
break;
default:
$msgObj = $this->getMsg( $boxName );
$boxes[$boxName] = array(
- 'id' => "p-$boxName",
- 'header' => $msgObj->exists() ? $msgObj->text() : $boxName,
+ 'id' => "p-$boxName",
+ 'header' => $msgObj->exists() ? $msgObj->text() : $boxName,
'generated' => true,
- 'content' => $content,
+ 'content' => $content,
);
break;
}
} else {
if ( $hookContents ) {
$boxes['TOOLBOXEND'] = array(
- 'id' => 'p-toolboxend',
- 'header' => $boxes['TOOLBOX']['header'],
+ 'id' => 'p-toolboxend',
+ 'header' => $boxes['TOOLBOX']['header'],
'generated' => false,
- 'content' => "<ul>{$hookContents}</ul>",
+ 'content' => "<ul>{$hookContents}</ul>",
);
// HACK: Make sure that TOOLBOXEND is sorted next to TOOLBOX
$boxes2 = array();
$realAttrs = array(
'type' => 'search',
'name' => 'search',
+ 'placeholder' => wfMessage( 'searchsuggest-search' )->text(),
'value' => isset( $this->data['search'] ) ? $this->data['search'] : '',
);
$realAttrs = array_merge( $realAttrs, Linker::tooltipAndAccesskeyAttribs( 'search' ), $attrs );
// Reduce footer links down to only those which are being used
$validFooterLinks = array();
- foreach( $footerlinks as $category => $links ) {
+ foreach ( $footerlinks as $category => $links ) {
$validFooterLinks[$category] = array();
- foreach( $links as $link ) {
- if( isset( $this->data[$link] ) && $this->data[$link] ) {
+ foreach ( $links as $link ) {
+ if ( isset( $this->data[$link] ) && $this->data[$link] ) {
$validFooterLinks[$category][] = $link;
}
}
* @return Mixed
* @deprecated since 1.18
*/
- function name( $x = null ) { wfDeprecated( __METHOD__, '1.18' ); return wfSetVar( $this->mName, $x ); }
+ function name( $x = null ) {
+ wfDeprecated( __METHOD__, '1.18' );
+ return wfSetVar( $this->mName, $x );
+ }
/**
* These mutators are very evil, as the relevant variables should not mutate. So
* @return Mixed
* @deprecated since 1.18
*/
- function restriction( $x = null ) { wfDeprecated( __METHOD__, '1.18' ); return wfSetVar( $this->mRestriction, $x ); }
+ function restriction( $x = null ) {
+ wfDeprecated( __METHOD__, '1.18' );
+ return wfSetVar( $this->mRestriction, $x );
+ }
/**
* These mutators are very evil, as the relevant variables should not mutate. So
* @return Mixed
* @deprecated since 1.18
*/
- function func( $x = null ) { wfDeprecated( __METHOD__, '1.18' ); return wfSetVar( $this->mFunction, $x ); }
+ function func( $x = null ) {
+ wfDeprecated( __METHOD__, '1.18' );
+ return wfSetVar( $this->mFunction, $x );
+ }
/**
* These mutators are very evil, as the relevant variables should not mutate. So
* @return Mixed
* @deprecated since 1.18
*/
- function file( $x = null ) { wfDeprecated( __METHOD__, '1.18' ); return wfSetVar( $this->mFile, $x ); }
+ function file( $x = null ) {
+ wfDeprecated( __METHOD__, '1.18' );
+ return wfSetVar( $this->mFile, $x );
+ }
/**
* These mutators are very evil, as the relevant variables should not mutate. So
* @return Mixed
* @deprecated since 1.18
*/
- function includable( $x = null ) { wfDeprecated( __METHOD__, '1.18' ); return wfSetVar( $this->mIncludable, $x ); }
+ function includable( $x = null ) {
+ wfDeprecated( __METHOD__, '1.18' );
+ return wfSetVar( $this->mIncludable, $x );
+ }
/**
* Whether the special page is being evaluated via transclusion
abstract protected function getFormFields();
/**
- * Add pre- or post-text to the form
+ * Add pre-text to the form
* @return String HTML which will be sent to $form->addPreText()
*/
- protected function preText() { return ''; }
- protected function postText() { return ''; }
+ protected function preText() {
+ return '';
+ }
+
+ /**
+ * Add post-text to the form
+ * @return String HTML which will be sent to $form->addPostText()
+ */
+ protected function postText() {
+ return '';
+ }
/**
* Play with the HTMLForm if you need to more substantially
self::$mList['ChangeEmail'] = 'SpecialChangeEmail';
}
- if( $wgEnableJavaScriptTest ) {
+ if ( $wgEnableJavaScriptTest ) {
self::$mList['JavaScriptTest'] = 'SpecialJavaScriptTest';
}
*
* @file
* @ingroup StatCounter
+ * @author Aaron Schulz
*/
/**
$this->deltas = array();
}
+ /**
+ * @param array $deltas
+ * @return void
+ */
protected function sendDeltasUDP( array $deltas ) {
global $wgUDPProfilerHost, $wgUDPProfilerPort, $wgAggregateStatsID;
}
}
+ /**
+ * @param array $deltas
+ * @return void
+ */
protected function sendDeltasMemc( array $deltas ) {
global $wgMemc;
*/
protected function getErrorMessage( $error ) {
if ( is_array( $error ) ) {
- if( isset( $error['message'] ) && $error['message'] instanceof Message ) {
+ if ( isset( $error['message'] ) && $error['message'] instanceof Message ) {
$msg = $error['message'];
} elseif ( isset( $error['message'] ) && isset( $error['params'] ) ) {
$msg = wfMessage( $error['message'],
$result = array();
foreach ( $this->errors as $error ) {
if ( $error['type'] === $type ) {
- if( $error['message'] instanceof Message ) {
+ if ( $error['message'] instanceof Message ) {
$result[] = $error['message'];
- } elseif( $error['params'] ) {
+ } elseif ( $error['params'] ) {
$result[] = array_merge( array( $error['message'] ), $error['params'] );
} else {
$result[] = array( $error['message'] );
// Explode, then put the replaced separators back in
$items = explode( $separator, $cleaned );
- foreach( $items as $i => $str ) {
+ foreach ( $items as $i => $str ) {
$items[$i] = str_replace( $placeholder, $separator, $str );
}
* @param $data array
*/
function removeArray( $data ) {
- foreach( $data as $from => $to ) {
+ foreach ( $data as $from => $to ) {
$this->removePair( $from );
}
$this->fss = false;
);
/**
- * Different units for human readable timestamps.
- * @see MWTimestamp::getHumanTimestamp
+ * The actual timestamp being wrapped (DateTime object).
+ * @var DateTime
*/
- private static $units = array(
- "milliseconds" => 1,
- "seconds" => 1000, // 1000 milliseconds per second
- "minutes" => 60, // 60 seconds per minute
- "hours" => 60, // 60 minutes per hour
- "days" => 24, // 24 hours per day
- "months" => 30, // approximately 30 days per month
- "years" => 12, // 12 months per year
- );
-
- /**
- * The actual timestamp being wrapped. Either a DateTime
- * object or a string with a Unix timestamp depending on
- * PHP.
- * @var string|DateTime
- */
- private $timestamp;
+ public $timestamp;
/**
* Make a new timestamp and set it to the specified time,
throw new TimestampException( __METHOD__ . " : Invalid timestamp - $ts" );
}
- if( !$strtime ) {
+ if ( !$strtime ) {
$da = array_map( 'intval', $da );
$da[0] = "%04d-%02d-%02dT%02d:%02d:%02d.00+00:00";
$strtime = call_user_func_array( "sprintf", $da );
throw new TimestampException( __METHOD__ . ' Invalid timestamp format.' );
}
- if( $final === false ) {
+ if ( $final === false ) {
throw new TimestampException( __METHOD__ . ' Invalid timestamp format.' );
}
$this->timestamp = $final;
* @return string The formatted timestamp
*/
public function getTimestamp( $style = TS_UNIX ) {
- if( !isset( self::$formats[$style] ) ) {
+ if ( !isset( self::$formats[$style] ) ) {
throw new TimestampException( __METHOD__ . ' : Illegal timestamp output type.' );
}
- if( is_object( $this->timestamp ) ) {
- // DateTime object was used, call DateTime::format.
- $output = $this->timestamp->format( self::$formats[$style] );
- } elseif( TS_UNIX == $style ) {
- // Unix timestamp was used and is wanted, just return it.
- $output = $this->timestamp;
- } else {
- // Unix timestamp was used, use gmdate().
- $output = gmdate( self::$formats[$style], $this->timestamp );
- }
+ $output = $this->timestamp->format( self::$formats[$style] );
if ( ( $style == TS_RFC2822 ) || ( $style == TS_POSTGRES ) ) {
$output .= ' GMT';
* largest possible unit is used.
*
* @since 1.20
+ * @since 1.22 Uses Language::getHumanTimestamp to produce the timestamp
*
- * @return Message Formatted timestamp
+ * @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 Language|null $lang Language to use to make the human timestamp (or null to use main context's language)
+ * @return string Formatted timestamp
*/
- public function getHumanTimestamp() {
- $then = $this->getTimestamp( TS_UNIX );
- $now = time();
- $timeago = ($now - $then) * 1000;
- $message = false;
-
- foreach( self::$units as $unit => $factor ) {
- $next = $timeago / $factor;
- if( $next < 1 ) {
- break;
+ public function getHumanTimestamp( MWTimestamp $relativeTo = null, User $user = null, Language $lang = null ) {
+ if ( $relativeTo === null ) {
+ $relativeTo = new self();
+ }
+ if ( $user === null ) {
+ $user = RequestContext::getMain()->getUser();
+ }
+ if ( $lang === null ) {
+ $lang = RequestContext::getMain()->getLanguage();
+ }
+
+ // Adjust for the user's timezone.
+ $offsetThis = $this->offsetForUser( $user );
+ $offsetRel = $relativeTo->offsetForUser( $user );
+
+ $ts = '';
+ if ( wfRunHooks( 'GetHumanTimestamp', array( &$ts, $this, $relativeTo, $user, $lang ) ) ) {
+ $ts = $lang->getHumanTimestamp( $this, $relativeTo, $user );
+ }
+
+ // Reset the timezone on the objects.
+ $this->timestamp->sub( $offsetThis );
+ $relativeTo->timestamp->sub( $offsetRel );
+
+ return $ts;
+ }
+
+ /**
+ * Adjust the timestamp depending on the given user's preferences.
+ *
+ * @since 1.22
+ *
+ * @param User $user User to take preferences from
+ * @param[out] MWTimestamp $ts Timestamp to adjust
+ * @return DateInterval Offset that was applied to the timestamp
+ */
+ public function offsetForUser( User $user ) {
+ global $wgLocalTZoffset;
+
+ $option = $user->getOption( 'timecorrection' );
+ $data = explode( '|', $option, 3 );
+
+ // First handle the case of an actual timezone being specified.
+ if ( $data[0] == 'ZoneInfo' ) {
+ try {
+ $tz = new DateTimeZone( $data[2] );
+ } catch ( Exception $e ) {
+ $tz = false;
+ }
+
+ if ( $tz ) {
+ $this->timestamp->setTimezone( $tz );
+ return new DateInterval( 'P0Y' );
} else {
- $timeago = $next;
- $message = array( $unit, floor( $timeago ) );
+ $data[0] = 'Offset';
}
}
- if( $message ) {
- $initial = call_user_func_array( 'wfMessage', $message );
- return wfMessage( 'ago', $initial->parse() );
+ $diff = 0;
+ // If $option is in fact a pipe-separated value, check the
+ // first value.
+ if ( $data[0] == 'System' ) {
+ // First value is System, so use the system offset.
+ if ( isset( $wgLocalTZoffset ) ) {
+ $diff = $wgLocalTZoffset;
+ }
+ } elseif ( $data[0] == 'Offset' ) {
+ // First value is Offset, so use the specified offset
+ $diff = (int)$data[1];
} else {
- return wfMessage( 'just-now' );
+ // $option actually isn't a pipe separated value, but instead
+ // a comma separated value. Isn't MediaWiki fun?
+ $data = explode( ':', $option );
+ if ( count( $data ) >= 2 ) {
+ // Combination hours and minutes.
+ $diff = abs( (int)$data[0] ) * 60 + (int)$data[1];
+ if ( (int) $data[0] < 0 ) {
+ $diff *= -1;
+ }
+ } else {
+ // Just hours.
+ $diff = (int)$data[0] * 60;
+ }
}
+
+ $interval = new DateInterval('PT' . abs( $diff ) . 'M');
+ if ( $diff < 1 ) {
+ $interval->invert = 1;
+ }
+
+ $this->timestamp->add( $interval );
+ return $interval;
}
/**
public function __toString() {
return $this->getTimestamp();
}
+
+ /**
+ * Calculate the difference between two MWTimestamp objects.
+ *
+ * @since 1.22
+ * @param MWTimestamp $relativeTo Base time to calculate difference from
+ * @return DateInterval|bool The DateInterval object representing the difference between the two dates or false on failure
+ */
+ public function diff( MWTimestamp $relativeTo ) {
+ return $this->timestamp->diff( $relativeTo->timestamp );
+ }
}
/**
*
* @param int $id the page_id corresponding to the Title to create
* @param int $flags use Title::GAID_FOR_UPDATE to use master
- * @return Title the new object, or NULL on an error
+ * @return Title|null the new object, or NULL on an error
*/
public static function newFromID( $id, $flags = 0 ) {
$db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE );
*/
public function loadFromRow( $row ) {
if ( $row ) { // page found
- if ( isset( $row->page_id ) )
+ if ( isset( $row->page_id ) ) {
$this->mArticleID = (int)$row->page_id;
- if ( isset( $row->page_len ) )
+ }
+ if ( isset( $row->page_len ) ) {
$this->mLength = (int)$row->page_len;
- if ( isset( $row->page_is_redirect ) )
+ }
+ if ( isset( $row->page_is_redirect ) ) {
$this->mRedirect = (bool)$row->page_is_redirect;
- if ( isset( $row->page_latest ) )
+ }
+ if ( isset( $row->page_latest ) ) {
$this->mLatestID = (int)$row->page_latest;
- if ( isset( $row->page_content_model ) )
+ }
+ if ( isset( $row->page_content_model ) ) {
$this->mContentModel = strval( $row->page_content_model );
- else
+ } else {
$this->mContentModel = false; # initialized lazily in getContentModel()
+ }
} else { // page not found
$this->mArticleID = 0;
$this->mLength = 0;
$this->mContentModel = ContentHandler::getDefaultModelFor( $this );
}
- if( !$this->mContentModel ) {
+ if ( !$this->mContentModel ) {
throw new MWException( 'Failed to determine content model!' );
}
$subpage = explode( '/', $this->mTextform );
$subpage = $subpage[count( $subpage ) - 1];
$lastdot = strrpos( $subpage, '.' );
- if ( $lastdot === false )
+ if ( $lastdot === false ) {
return $subpage; # Never happens: only called for names ending in '.css' or '.js'
+ }
return substr( $subpage, 0, $lastdot );
}
* @return String
*/
private static function fixUrlQueryArgs( $query, $query2 = false ) {
- if( $query2 !== false ) {
+ if ( $query2 !== false ) {
wfDeprecated( "Title::get{Canonical,Full,Link,Local,Internal}URL " .
"method called with a second parameter is deprecated. Add your " .
"parameter to an array passed as the first parameter.", "1.19" );
$right = ( $right == 'sysop' ) ? 'protect' : $right;
if ( $right != '' && !$user->isAllowed( $right ) ) {
$pages = '';
- foreach ( $cascadingSources as $page )
+ foreach ( $cascadingSources as $page ) {
$pages .= '* [[:' . $page->getPrefixedText() . "]]\n";
+ }
$errors[] = array( 'cascadeprotected', count( $cascadingSources ), $pages );
}
}
}
} elseif ( $action == 'create' ) {
$title_protection = $this->getTitleProtection();
- if( $title_protection ) {
- if( $title_protection['pt_create_perm'] == 'sysop' ) {
+ if ( $title_protection ) {
+ if ( $title_protection['pt_create_perm'] == 'sysop' ) {
$title_protection['pt_create_perm'] = 'protect'; // B/C
}
- if( $title_protection['pt_create_perm'] == '' ||
+ if ( $title_protection['pt_create_perm'] == '' ||
!$user->isAllowed( $title_protection['pt_create_perm'] ) )
{
$errors[] = array( 'titleprotected', User::whoIs( $title_protection['pt_user'] ), $title_protection['pt_reason'] );
private function checkUserBlock( $action, $user, $errors, $doExpensiveQueries, $short ) {
// Account creation blocks handled at userlogin.
// Unblocking handled in SpecialUnblock
- if( !$doExpensiveQueries || in_array( $action, array( 'createaccount', 'unblock' ) ) ) {
+ if ( !$doExpensiveQueries || in_array( $action, array( 'createaccount', 'unblock' ) ) ) {
return $errors;
}
if ( ( $action == 'edit' || $action == 'create' ) && !$user->isBlockedFrom( $this ) ) {
// Don't block the user from editing their own talk page unless they've been
// explicitly blocked from that too.
- } elseif( $user->isBlocked() && $user->mBlock->prevents( $action ) !== false ) {
- $block = $user->getBlock();
-
- // This is from OutputPage::blockedPage
- // Copied at r23888 by werdna
-
- $id = $user->blockedBy();
- $reason = $user->blockedFor();
- if ( $reason == '' ) {
- $reason = wfMessage( 'blockednoreason' )->text();
- }
- $ip = $user->getRequest()->getIP();
-
- if ( is_numeric( $id ) ) {
- $name = User::whoIs( $id );
- } else {
- $name = $id;
- }
-
- $link = '[[' . $wgContLang->getNsText( NS_USER ) . ":{$name}|{$name}]]";
- $blockid = $block->getId();
- $blockExpiry = $block->getExpiry();
- $blockTimestamp = $wgLang->timeanddate( wfTimestamp( TS_MW, $block->mTimestamp ), true );
- if ( $blockExpiry == 'infinity' ) {
- $blockExpiry = wfMessage( 'infiniteblock' )->text();
- } else {
- $blockExpiry = $wgLang->timeanddate( wfTimestamp( TS_MW, $blockExpiry ), true );
- }
-
- $intended = strval( $block->getTarget() );
-
- $errors[] = array( ( $block->mAuto ? 'autoblockedtext' : 'blockedtext' ), $link, $reason, $ip, $name,
- $blockid, $blockExpiry, $intended, $blockTimestamp );
+ } elseif ( $user->isBlocked() && $user->mBlock->prevents( $action ) !== false ) {
+ // @todo FIXME: Pass the relevant context into this function.
+ $errors[] = $user->getBlock()->getPermissionsError( RequestContext::getMain() );
}
return $errors;
}
}
- if( !$whitelisted && is_array( $wgWhitelistReadRegexp ) && !empty( $wgWhitelistReadRegexp ) ) {
+ if ( !$whitelisted && is_array( $wgWhitelistReadRegexp ) && !empty( $wgWhitelistReadRegexp ) ) {
$name = $this->getPrefixedText();
// Check for regex whitelisting
foreach ( $wgWhitelistReadRegexp as $listItem ) {
}
$errors = array();
- while( count( $checks ) > 0 &&
+ while ( count( $checks ) > 0 &&
!( $short && count( $errors ) > 0 ) ) {
$method = array_shift( $checks );
$errors = $this->$method( $action, $user, $errors, $doExpensiveQueries, $short );
$restrictionTypes = $this->getRestrictionTypes();
# Special pages have inherent protection
- if( $this->isSpecialPage() ) {
+ if ( $this->isSpecialPage() ) {
return true;
}
$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 );
}
}
foreach ( $rows as $row ) {
// Don't take care of restrictions types that aren't allowed
- if ( !in_array( $row->pr_type, $restrictionTypes ) )
+ if ( !in_array( $row->pr_type, $restrictionTypes ) ) {
continue;
+ }
// This code should be refactored, now that it's being used more generally,
// But I don't really see any harm in leaving it in Block for now -werdna
return;
}
+ $method = __METHOD__;
$dbw = wfGetDB( DB_MASTER );
- $dbw->delete(
- 'page_restrictions',
- array( 'pr_expiry < ' . $dbw->addQuotes( $dbw->timestamp() ) ),
- __METHOD__
- );
-
- $dbw->delete(
- 'protected_titles',
- array( 'pt_expiry < ' . $dbw->addQuotes( $dbw->timestamp() ) ),
- __METHOD__
- );
+ $dbw->onTransactionIdle( function() use ( $dbw, $method ) {
+ $dbw->delete(
+ 'page_restrictions',
+ array( 'pr_expiry < ' . $dbw->addQuotes( $dbw->timestamp() ) ),
+ $method
+ );
+ $dbw->delete(
+ 'protected_titles',
+ array( 'pt_expiry < ' . $dbw->addQuotes( $dbw->timestamp() ) ),
+ $method
+ );
+ } );
}
/**
array(
"{$prefix}_from=page_id",
"{$prefix}_namespace" => $this->getNamespace(),
- "{$prefix}_title" => $this->getDBkey() ),
+ "{$prefix}_title" => $this->getDBkey() ),
__METHOD__,
$options
);
$titleField = "{$prefix}_title";
$fields = array( $namespaceFiled, $titleField, 'page_id', 'page_len', 'page_is_redirect', 'page_latest' );
- if ( $wgContentHandlerUseDB ) $fields[] = 'page_content_model';
+ if ( $wgContentHandlerUseDB ) {
+ $fields[] = 'page_content_model';
+ }
$res = $db->select(
array( $table, 'page' ),
# Protect the redirect title as the title used to be...
$dbw->insertSelect( 'page_restrictions', 'page_restrictions',
array(
- 'pr_page' => $redirid,
- 'pr_type' => 'pr_type',
- 'pr_level' => 'pr_level',
+ 'pr_page' => $redirid,
+ 'pr_type' => 'pr_type',
+ 'pr_level' => 'pr_level',
'pr_cascade' => 'pr_cascade',
- 'pr_user' => 'pr_user',
- 'pr_expiry' => 'pr_expiry'
+ 'pr_user' => 'pr_user',
+ 'pr_expiry' => 'pr_expiry'
),
array( 'pr_page' => $pageid ),
__METHOD__,
$dbw->update( 'page',
/* SET */ array(
'page_namespace' => $nt->getNamespace(),
- 'page_title' => $nt->getDBkey(),
+ 'page_title' => $nt->getDBkey(),
),
/* WHERE */ array( 'page_id' => $oldid ),
__METHOD__
$newid = $redirectArticle->insertOn( $dbw );
if ( $newid ) { // sanity
$redirectRevision = new Revision( array(
- 'title' => $this, // for determining the default content model
- 'page' => $newid,
+ 'title' => $this, // for determining the default content model
+ 'page' => $newid,
'comment' => $comment,
- 'content' => $redirectContent ) );
+ 'content' => $redirectContent ) );
$redirectRevision->insertOn( $dbw );
$redirectArticle->updateRevisionOn( $dbw, $redirectRevision, 0 );
# Is it a redirect?
$fields = array( 'page_is_redirect', 'page_latest', 'page_id' );
- if ( $wgContentHandlerUseDB ) $fields[] = 'page_content_model';
+ if ( $wgContentHandlerUseDB ) {
+ $fields[] = 'page_content_model';
+ }
$row = $dbw->selectRow( 'page',
$fields,
}
# Get the article text
$rev = Revision::newFromTitle( $nt, false, Revision::READ_LATEST );
- if( !is_object( $rev ) ) {
+ if ( !is_object( $rev ) ) {
return false;
}
$content = $rev->getContent();
// No DB query needed if $old and $new are the same or successive revisions:
if ( $old->getId() === $new->getId() ) {
return ( $old_cmp === '>' && $new_cmp === '<' ) ? 0 : 1;
- } else if ( $old->getId() === $new->getParentId() ) {
+ } elseif ( $old->getId() === $new->getParentId() ) {
if ( $old_cmp === '>' || $new_cmp === '<' ) {
return ( $old_cmp === '>' && $new_cmp === '<' ) ? 0 : 1;
}
*/
protected function millisecondsSinceEpochBinary( array $time ) {
list( $sec, $msec ) = $time;
- if ( PHP_INT_SIZE >= 8 ) { // 64 bit integers
- $ts = ( 1000 * $sec + $msec );
- $id_bin = str_pad( decbin( $ts % pow( 2, 46 ) ), 46, '0', STR_PAD_LEFT );
- } elseif ( extension_loaded( 'gmp' ) ) {
- $ts = gmp_mod( // wrap around
- gmp_add( gmp_mul( (string) $sec, (string) 1000 ), (string) $msec ),
- gmp_pow( '2', '46' )
- );
- $id_bin = str_pad( gmp_strval( $ts, 2 ), 46, '0', STR_PAD_LEFT );
- } elseif ( extension_loaded( 'bcmath' ) ) {
- $ts = bcmod( // wrap around
- bcadd( bcmul( $sec, 1000 ), $msec ),
- bcpow( 2, 46 )
- );
- $id_bin = wfBaseConvert( $ts, 10, 2, 46 );
- } else {
- throw new MWException( 'bcmath or gmp extension required for 32 bit machines.' );
+ $ts = 1000 * $sec + $msec;
+ if ( $ts > pow( 2, 52 ) ) {
+ throw new MWException( __METHOD__ .
+ ': sorry, this function doesn\'t work after the year 144680' );
}
- return $id_bin;
+ return substr( wfBaseConvert( $ts, 10, 2, 46 ), -46 );
}
/**
$this->loadFromId();
break;
case 'session':
- if( !$this->loadFromSession() ) {
+ if ( !$this->loadFromSession() ) {
// Loading from session failed. Load defaults.
$this->loadDefaults();
}
'user_email_token' => md5( $code ),
'user_email_token_expires > ' . $dbr->addQuotes( $dbr->timestamp() ),
) );
- if( $id !== false ) {
+ if ( $id !== false ) {
return User::newFromId( $id );
} else {
return null;
*/
public static function idFromName( $name ) {
$nt = Title::makeTitleSafe( NS_USER, $name );
- if( is_null( $nt ) ) {
+ if ( is_null( $nt ) ) {
# Illegal name
return null;
}
// Ensure that the name can't be misresolved as a different title,
// such as with extra namespace keys at the start.
$parsed = Title::newFromText( $name );
- if( is_null( $parsed )
+ if ( is_null( $parsed )
|| $parsed->getNamespace()
|| strcmp( $name, $parsed->getPrefixedText() ) ) {
wfDebugLog( 'username', __METHOD__ .
'\x{3000}' . # ideographic space
'\x{e000}-\x{f8ff}' . # private use
']/u';
- if( preg_match( $unicodeBlacklist, $name ) ) {
+ if ( preg_match( $unicodeBlacklist, $name ) ) {
wfDebugLog( 'username', __METHOD__ .
": '$name' invalid due to blacklisted characters" );
return false;
// Ensure that the username isn't longer than 235 bytes, so that
// (at least for the builtin skins) user javascript and css files
// will work. (bug 23080)
- if( strlen( $name ) > 235 ) {
+ if ( strlen( $name ) > 235 ) {
wfDebugLog( 'username', __METHOD__ .
": '$name' invalid due to length" );
return false;
}
// Preg yells if you try to give it an empty string
- if( $wgInvalidUsernameCharacters !== '' ) {
- if( preg_match( '/[' . preg_quote( $wgInvalidUsernameCharacters, '/' ) . ']/', $name ) ) {
+ if ( $wgInvalidUsernameCharacters !== '' ) {
+ if ( preg_match( '/[' . preg_quote( $wgInvalidUsernameCharacters, '/' ) . ']/', $name ) ) {
wfDebugLog( 'username', __METHOD__ .
": '$name' invalid due to wgInvalidUsernameCharacters" );
return false;
$result = false; //init $result to false for the internal checks
- if( !wfRunHooks( 'isValidPassword', array( $password, &$result, $this ) ) )
+ if ( !wfRunHooks( 'isValidPassword', array( $password, &$result, $this ) ) ) {
return $result;
+ }
if ( $result === false ) {
- if( strlen( $password ) < $wgMinimalPasswordLength ) {
+ if ( strlen( $password ) < $wgMinimalPasswordLength ) {
return 'passwordtooshort';
} elseif ( $wgContLang->lc( $password ) == $wgContLang->lc( $this->mName ) ) {
return 'password-name-match';
//a valid password.
return true;
}
- } elseif( $result === true ) {
+ } elseif ( $result === true ) {
return true;
} else {
return $result; //the isValidPassword hook set a string $result and returned true
# Reject names containing '#'; these will be cleaned up
# with title normalisation, but then it's too late to
# check elsewhere
- if( strpos( $name, '#' ) !== false )
+ if ( strpos( $name, '#' ) !== false ) {
return false;
+ }
# Clean up name according to title rules
$t = ( $validate === 'valid' ) ?
Title::newFromText( $name ) : Title::makeTitle( NS_USER, $name );
# Check for invalid titles
- if( is_null( $t ) ) {
+ if ( is_null( $t ) ) {
return false;
}
$this->mOptionsLoaded = false;
$loggedOut = $this->getRequest()->getCookie( 'LoggedOut' );
- if( $loggedOut !== null ) {
+ if ( $loggedOut !== null ) {
$this->mTouched = wfTimestamp( TS_MW, $loggedOut );
} else {
$this->mTouched = '1'; # Allow any pages to be cached
if ( $cookieId !== null ) {
$sId = intval( $cookieId );
- if( $sessId !== null && $cookieId != $sessId ) {
+ if ( $sessId !== null && $cookieId != $sessId ) {
wfDebugLog( 'loginSessions', "Session user ID ($sessId) and
cookie user ID ($sId) don't match!" );
return false;
}
global $wgBlockDisablesLogin;
- if( $wgBlockDisablesLogin && $proposedUser->isBlocked() ) {
+ if ( $wgBlockDisablesLogin && $proposedUser->isBlocked() ) {
# User blocked and we've disabled blocked user logins
return false;
}
$this->mId = intval( $this->mId );
/** Anonymous user */
- if( !$this->mId ) {
+ if ( !$this->mId ) {
$this->loadDefaults();
return false;
}
# default language setting
$defOpt['variant'] = $wgContLang->getCode();
$defOpt['language'] = $wgContLang->getCode();
- foreach( SearchEngine::searchableNamespaces() as $nsnum => $nsname ) {
+ foreach ( SearchEngine::searchableNamespaces() as $nsnum => $nsname ) {
$defOpt['searchNs' . $nsnum] = !empty( $wgNamespacesToBeSearchedDefault[$nsnum] );
}
$defOpt['skin'] = $wgDefaultSkin;
*/
public static function getDefaultOption( $opt ) {
$defOpts = self::getDefaultOptions();
- if( isset( $defOpts[$opt] ) ) {
+ if ( isset( $defOpts[$opt] ) ) {
return $defOpts[$opt];
} else {
return null;
global $wgEnableSorbs, $wgEnableDnsBlacklist,
$wgSorbsUrl, $wgDnsBlacklistUrls, $wgProxyWhitelist;
- if ( !$wgEnableDnsBlacklist && !$wgEnableSorbs )
+ if ( !$wgEnableDnsBlacklist && !$wgEnableSorbs ) {
return false;
+ }
- if ( $checkWhitelist && in_array( $ip, $wgProxyWhitelist ) )
+ if ( $checkWhitelist && in_array( $ip, $wgProxyWhitelist ) ) {
return false;
+ }
$urls = array_merge( $wgDnsBlacklistUrls, (array)$wgSorbsUrl );
return $this->inDnsBlacklist( $ip, $urls );
$found = false;
// @todo FIXME: IPv6 ??? (http://bugs.php.net/bug.php?id=33170)
- if( IP::isIPv4( $ip ) ) {
+ if ( IP::isIPv4( $ip ) ) {
# Reverse IP, bug 21255
$ipReversed = implode( '.', array_reverse( explode( '.', $ip ) ) );
- foreach( (array)$bases as $base ) {
+ foreach ( (array)$bases as $base ) {
# Make hostname
# If we have an access key, use that too (ProjectHoneypot, etc.)
- if( is_array( $base ) ) {
- if( count( $base ) >= 2 ) {
+ if ( is_array( $base ) ) {
+ if ( count( $base ) >= 2 ) {
# Access key is 1, base URL is 0
$host = "{$base[1]}.$ipReversed.{$base[0]}";
} else {
# Send query
$ipList = gethostbynamel( $host );
- if( $ipList ) {
+ if ( $ipList ) {
wfDebugLog( 'dnsblacklist', "Hostname $host is {$ipList[0]}, it's a proxy says $base!\n" );
$found = true;
break;
*/
public function isPingLimitable() {
global $wgRateLimitsExcludedIPs;
- if( in_array( $this->getRequest()->getIP(), $wgRateLimitsExcludedIPs ) ) {
+ if ( in_array( $this->getRequest()->getIP(), $wgRateLimitsExcludedIPs ) ) {
// No other good way currently to disable rate limits
// for specific IPs. :P
// But this is a crappy hack and should die.
public function pingLimiter( $action = 'edit' ) {
# Call the 'PingLimiter' hook
$result = false;
- if( !wfRunHooks( 'PingLimiter', array( &$this, $action, &$result ) ) ) {
+ if ( !wfRunHooks( 'PingLimiter', array( &$this, $action, &$result ) ) ) {
return $result;
}
global $wgRateLimits;
- if( !isset( $wgRateLimits[$action] ) ) {
+ if ( !isset( $wgRateLimits[$action] ) ) {
return false;
}
# Some groups shouldn't trigger the ping limiter, ever
- if( !$this->isPingLimitable() )
+ if ( !$this->isPingLimitable() ) {
return false;
+ }
global $wgMemc, $wgRateLimitLog;
wfProfileIn( __METHOD__ );
$ip = $this->getRequest()->getIP();
$userLimit = false;
- if( isset( $limits['anon'] ) && $id == 0 ) {
+ if ( isset( $limits['anon'] ) && $id == 0 ) {
$keys[wfMemcKey( 'limiter', $action, 'anon' )] = $limits['anon'];
}
- if( isset( $limits['user'] ) && $id != 0 ) {
+ if ( isset( $limits['user'] ) && $id != 0 ) {
$userLimit = $limits['user'];
}
- if( $this->isNewbie() ) {
- if( isset( $limits['newbie'] ) && $id != 0 ) {
+ if ( $this->isNewbie() ) {
+ if ( isset( $limits['newbie'] ) && $id != 0 ) {
$keys[wfMemcKey( 'limiter', $action, 'user', $id )] = $limits['newbie'];
}
- if( isset( $limits['ip'] ) ) {
+ if ( isset( $limits['ip'] ) ) {
$keys["mediawiki:limiter:$action:ip:$ip"] = $limits['ip'];
}
$matches = array();
- if( isset( $limits['subnet'] ) && preg_match( '/^(\d+\.\d+\.\d+)\.\d+$/', $ip, $matches ) ) {
+ if ( isset( $limits['subnet'] ) && preg_match( '/^(\d+\.\d+\.\d+)\.\d+$/', $ip, $matches ) ) {
$subnet = $matches[1];
$keys["mediawiki:limiter:$action:subnet:$subnet"] = $limits['subnet'];
}
}
// Set the user limit key
if ( $userLimit !== false ) {
- wfDebug( __METHOD__ . ": effective user limit: $userLimit\n" );
+ list( $max, $period ) = $userLimit;
+ wfDebug( __METHOD__ . ": effective user limit: $max in {$period}s\n" );
$keys[wfMemcKey( 'limiter', $action, 'user', $id )] = $userLimit;
}
$triggered = false;
- foreach( $keys as $key => $limit ) {
+ foreach ( $keys as $key => $limit ) {
list( $max, $period ) = $limit;
$summary = "(limit $max in {$period}s)";
$count = $wgMemc->get( $key );
// Already pinged?
- if( $count ) {
- if( $count >= $max ) {
+ if ( $count ) {
+ if ( $count >= $max ) {
wfDebug( __METHOD__ . ": tripped! $key at $count $summary\n" );
- if( $wgRateLimitLog ) {
+ if ( $wgRateLimitLog ) {
wfSuppressWarnings();
file_put_contents( $wgRateLimitLog, wfTimestamp( TS_MW ) . ' ' . wfWikiID() . ': ' . $this->getName() . " tripped $key at $count $summary\n", FILE_APPEND );
wfRestoreWarnings();
* @return Bool True if blocked, false otherwise
*/
public function isBlockedGlobally( $ip = '' ) {
- if( $this->mBlockedGlobally !== null ) {
+ if ( $this->mBlockedGlobally !== null ) {
return $this->mBlockedGlobally;
}
// User is already an IP?
- if( IP::isIPAddress( $this->getName() ) ) {
+ if ( IP::isIPAddress( $this->getName() ) ) {
$ip = $this->getName();
- } elseif( !$ip ) {
+ } elseif ( !$ip ) {
$ip = $this->getRequest()->getIP();
}
$blocked = false;
* @return Bool True if locked, false otherwise
*/
public function isLocked() {
- if( $this->mLocked !== null ) {
+ if ( $this->mLocked !== null ) {
return $this->mLocked;
}
global $wgAuth;
* @return Bool True if hidden, false otherwise
*/
public function isHidden() {
- if( $this->mHideName !== null ) {
+ if ( $this->mHideName !== null ) {
return $this->mHideName;
}
$this->getBlockedStatus();
- if( !$this->mHideName ) {
+ if ( !$this->mHideName ) {
global $wgAuth;
$authUser = $wgAuth->getUserInstance( $this );
$this->mHideName = (bool)$authUser->isHidden();
* @return Int The user's ID; 0 if the user is anonymous or nonexistent
*/
public function getId() {
- if( $this->mId === null && $this->mName !== null
- && User::isIP( $this->mName ) ) {
+ if ( $this->mId === null && $this->mName !== null && User::isIP( $this->mName ) ) {
// Special case, we know the user is anonymous
return 0;
- } elseif( !$this->isItemLoaded( 'id' ) ) {
+ } elseif ( !$this->isItemLoaded( 'id' ) ) {
// Don't load if this was initialized from an ID
$this->load();
}
$this->load();
# Load the newtalk status if it is unloaded (mNewtalk=-1)
- if( $this->mNewtalk === -1 ) {
+ if ( $this->mNewtalk === -1 ) {
$this->mNewtalk = false; # reset talk page status
# Check memcached separately for anons, who have no
# entire User object stored in there.
- if( !$this->mId ) {
+ if ( !$this->mId ) {
global $wgDisableAnonTalk;
- if( $wgDisableAnonTalk ) {
+ if ( $wgDisableAnonTalk ) {
// Anon newtalk disabled by configuration.
$this->mNewtalk = false;
} else {
global $wgMemc;
$key = wfMemcKey( 'newtalk', 'ip', $this->getName() );
$newtalk = $wgMemc->get( $key );
- if( strval( $newtalk ) !== '' ) {
+ if ( strval( $newtalk ) !== '' ) {
$this->mNewtalk = (bool)$newtalk;
} else {
// Since we are caching this, make sure it is up to date by getting it
*/
public function getNewMessageLinks() {
$talks = array();
- if( !wfRunHooks( 'UserRetrieveNewTalks', array( &$this, &$talks ) ) ) {
+ if ( !wfRunHooks( 'UserRetrieveNewTalks', array( &$this, &$talks ) ) ) {
return $talks;
- } elseif( !$this->getNewtalk() ) {
+ } elseif ( !$this->getNewtalk() ) {
return array();
}
$utp = $this->getTalkPage();
* @param $curRev Revision new, as yet unseen revision of the user talk page. Ignored if null or !$val.
*/
public function setNewtalk( $val, $curRev = null ) {
- if( wfReadOnly() ) {
+ if ( wfReadOnly() ) {
return;
}
$this->load();
$this->mNewtalk = $val;
- if( $this->isAnon() ) {
+ if ( $this->isAnon() ) {
$field = 'user_ip';
$id = $this->getName();
} else {
}
global $wgMemc;
- if( $val ) {
+ if ( $val ) {
$changed = $this->updateNewtalk( $field, $id, $curRev );
} else {
$changed = $this->deleteNewtalk( $field, $id );
}
- if( $this->isAnon() ) {
+ if ( $this->isAnon() ) {
// Anons have a separate memcached space, since
// user records aren't kept for them.
$key = wfMemcKey( 'newtalk', 'ip', $id );
*/
private function clearSharedCache() {
$this->load();
- if( $this->mId ) {
+ if ( $this->mId ) {
global $wgMemc;
$wgMemc->delete( wfMemcKey( 'user', 'id', $this->mId ) );
}
$dbw = wfGetDB( DB_MASTER );
$userid = $this->mId;
$touched = $this->mTouched;
- $dbw->onTransactionIdle( function() use ( $dbw, $userid, $touched ) {
+ $method = __METHOD__;
+ $dbw->onTransactionIdle( function() use ( $dbw, $userid, $touched, $method ) {
// Prevent contention slams by checking user_touched first
$encTouched = $dbw->addQuotes( $dbw->timestamp( $touched ) );
$needsPurge = $dbw->selectField( 'user', '1',
$dbw->update( 'user',
array( 'user_touched' => $dbw->timestamp( $touched ) ),
array( 'user_id' => $userid, 'user_touched < ' . $encTouched ),
- __METHOD__
+ $method
);
}
} );
public function setPassword( $str ) {
global $wgAuth;
- if( $str !== null ) {
- if( !$wgAuth->allowPasswordChange() ) {
+ if ( $str !== null ) {
+ if ( !$wgAuth->allowPasswordChange() ) {
throw new PasswordError( wfMessage( 'password-change-forbidden' )->text() );
}
- if( !$this->isValidPassword( $str ) ) {
+ if ( !$this->isValidPassword( $str ) ) {
global $wgMinimalPasswordLength;
$valid = $this->getPasswordValidity( $str );
if ( is_array( $valid ) ) {
}
}
- if( !$wgAuth->setPassword( $this, $str ) ) {
+ if ( !$wgAuth->setPassword( $this, $str ) ) {
throw new PasswordError( wfMessage( 'externaldberror' )->text() );
}
$this->load();
$this->setToken();
- if( $str === null ) {
+ if ( $str === null ) {
// Save an invalid hash...
$this->mPassword = '';
} else {
*/
public function setEmail( $str ) {
$this->load();
- if( $str == $this->mEmail ) {
+ if ( $str == $this->mEmail ) {
return;
}
$this->mEmail = $str;
# set it, and then it was disabled removing their ability to change it). But
# we don't want to erase the preferences in the database in case the preference
# is re-enabled again. So don't touch $mOptions, just override the returned value
- if( in_array( $oname, $wgHiddenPrefs ) && !$ignoreHidden ) {
+ if ( in_array( $oname, $wgHiddenPrefs ) && !$ignoreHidden ) {
return self::getDefaultOption( $oname );
}
# set it, and then it was disabled removing their ability to change it). But
# we don't want to erase the preferences in the database in case the preference
# is re-enabled again. So don't touch $mOptions, just override the returned value
- foreach( $wgHiddenPrefs as $pref ) {
+ foreach ( $wgHiddenPrefs as $pref ) {
$default = self::getDefaultOption( $pref );
- if( $default !== null ) {
+ if ( $default !== null ) {
$options[$pref] = $default;
}
}
*/
public function getIntOption( $oname, $defaultOverride = 0 ) {
$val = $this->getOption( $oname );
- if( $val == '' ) {
+ if ( $val == '' ) {
$val = $defaultOverride;
}
return intval( $val );
$this->loadOptions();
// Explicitly NULL values should refer to defaults
- if( is_null( $val ) ) {
+ if ( is_null( $val ) ) {
$val = self::getDefaultOption( $oname );
}
foreach ( $options as $key => $value ) {
if ( isset( $prefs[$key] ) ) {
$mapping[$key] = 'registered';
- } elseif( isset( $multiselectOptions[$key] ) ) {
+ } elseif ( isset( $multiselectOptions[$key] ) ) {
$mapping[$key] = 'registered-multiselect';
- } elseif( isset( $checkmatrixOptions[$key] ) ) {
+ } elseif ( isset( $checkmatrixOptions[$key] ) ) {
$mapping[$key] = 'registered-checkmatrix';
} elseif ( substr( $key, 0, 7 ) === 'userjs-' ) {
$mapping[$key] = 'userjs';
* @return array Names of the groups the user has belonged to.
*/
public function getFormerGroups() {
- if( is_null( $this->mFormerGroups ) ) {
+ if ( is_null( $this->mFormerGroups ) ) {
$dbr = wfGetDB( DB_MASTER );
$res = $dbr->select( 'user_former_groups',
array( 'ufg_group' ),
array( 'ufg_user' => $this->mId ),
__METHOD__ );
$this->mFormerGroups = array();
- foreach( $res as $row ) {
+ foreach ( $res as $row ) {
$this->mFormerGroups[] = $row->ufg_group;
}
}
__METHOD__
);
- if( $count === null ) {
+ if ( $count === null ) {
// it has not been initialized. do so.
$count = $this->initEditCount();
}
* @param string $group Name of the group to add
*/
public function addGroup( $group ) {
- if( wfRunHooks( 'UserAddGroup', array( $this, &$group ) ) ) {
+ if ( wfRunHooks( 'UserAddGroup', array( $this, &$group ) ) ) {
$dbw = wfGetDB( DB_MASTER );
- if( $this->getId() ) {
+ if ( $this->getId() ) {
$dbw->insert( 'user_groups',
array(
'ug_user' => $this->getID(),
}
$this->loadGroups();
$this->mGroups[] = $group;
+ // In case loadGroups was not called before, we now have the right twice.
+ // Get rid of the duplicate.
+ $this->mGroups = array_unique( $this->mGroups );
$this->mRights = User::getGroupPermissions( $this->getEffectiveGroups( true ) );
$this->invalidateCache();
*/
public function removeGroup( $group ) {
$this->load();
- if( wfRunHooks( 'UserRemoveGroup', array( $this, &$group ) ) ) {
+ if ( wfRunHooks( 'UserRemoveGroup', array( $this, &$group ) ) ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->delete( 'user_groups',
array(
*/
public function isAllowedAny( /*...*/ ) {
$permissions = func_get_args();
- foreach( $permissions as $permission ) {
- if( $this->isAllowed( $permission ) ) {
+ foreach ( $permissions as $permission ) {
+ if ( $this->isAllowed( $permission ) ) {
return true;
}
}
*/
public function isAllowedAll( /*...*/ ) {
$permissions = func_get_args();
- foreach( $permissions as $permission ) {
- if( !$this->isAllowed( $permission ) ) {
+ foreach ( $permissions as $permission ) {
+ if ( !$this->isAllowed( $permission ) ) {
return false;
}
}
return true; // In the spirit of DWIM
}
# Patrolling may not be enabled
- if( $action === 'patrol' || $action === 'autopatrol' ) {
+ if ( $action === 'patrol' || $action === 'autopatrol' ) {
global $wgUseRCPatrol, $wgUseNPPatrol;
- if( !$wgUseRCPatrol && !$wgUseNPPatrol )
+ if ( !$wgUseRCPatrol && !$wgUseNPPatrol ) {
return false;
+ }
}
# Use strict parameter to avoid matching numeric 0 accidentally inserted
# by misconfiguration: 0 == 'foo'
global $wgUseEnotif, $wgShowUpdatedMarker;
# Do nothing if the database is locked to writes
- if( wfReadOnly() ) {
+ if ( wfReadOnly() ) {
return;
}
- if( $title->getNamespace() == NS_USER_TALK &&
+ if ( $title->getNamespace() == NS_USER_TALK &&
$title->getText() == $this->getName() ) {
- if( !wfRunHooks( 'UserClearNewTalkNotification', array( &$this ) ) )
+ if ( !wfRunHooks( 'UserClearNewTalkNotification', array( &$this ) ) ) {
return;
+ }
$this->setNewtalk( false );
}
- if( !$wgUseEnotif && !$wgShowUpdatedMarker ) {
+ if ( !$wgUseEnotif && !$wgShowUpdatedMarker ) {
return;
}
- if( $this->isAnon() ) {
+ if ( $this->isAnon() ) {
// Nothing else to do...
return;
}
return;
}
$id = $this->getId();
- if( $id != 0 ) {
+ if ( $id != 0 ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->update( 'watchlist',
array( /* SET */
*/
private function decodeOptions( $str ) {
wfDeprecated( __METHOD__, '1.19' );
- if( !$str )
+ if ( !$str ) {
return;
+ }
$this->mOptionsLoaded = true;
$this->mOptionOverrides = array();
* Log this user out.
*/
public function logout() {
- if( wfRunHooks( 'UserLogout', array( &$this ) ) ) {
+ if ( wfRunHooks( 'UserLogout', array( &$this ) ) ) {
$this->doLogout();
}
}
global $wgAuth;
$this->load();
- if ( wfReadOnly() ) { return; }
- if ( 0 == $this->mId ) { return; }
+ if ( wfReadOnly() ) {
+ return;
+ }
+ if ( 0 == $this->mId ) {
+ return;
+ }
$this->mTouched = self::newTouchedTimestamp();
if ( !$wgAuth->allowSetLocalPassword() ) {
*/
public function idForName() {
$s = trim( $this->getName() );
- if ( $s === '' ) return 0;
+ if ( $s === '' ) {
+ return 0;
+ }
$dbr = wfGetDB( DB_SLAVE );
$id = $dbr->selectField( 'user', 'user_id', array( 'user_name' => $s ), __METHOD__ );
wfDeprecated( __METHOD__, '1.17' );
global $wgRenderHashAppend, $wgLang, $wgContLang;
- if( $this->mHash ) {
+ if ( $this->mHash ) {
return $this->mHash;
}
*/
public function isBlockedFromCreateAccount() {
$this->getBlockedStatus();
- if( $this->mBlock && $this->mBlock->prevents( 'createaccount' ) ) {
+ if ( $this->mBlock && $this->mBlock->prevents( 'createaccount' ) ) {
return $this->mBlock;
}
// to. Certain authentication plugins do NOT want to save
// domain passwords in a mysql database, so we should
// check this (in case $wgAuth->strict() is false).
- if( !$this->isValidPassword( $password ) ) {
+ if ( !$this->isValidPassword( $password ) ) {
return false;
}
- if( $wgAuth->authenticate( $this->getName(), $password ) ) {
+ if ( $wgAuth->authenticate( $this->getName(), $password ) ) {
return true;
- } elseif( $wgAuth->strict() ) {
+ } elseif ( $wgAuth->strict() ) {
/* Auth plugin doesn't allow local authentication */
return false;
- } elseif( $wgAuth->strictUserAuth( $this->getName() ) ) {
+ } elseif ( $wgAuth->strictUserAuth( $this->getName() ) ) {
/* Auth plugin doesn't allow local authentication for this user name */
return false;
}
global $wgNewPasswordExpiry;
$this->load();
- if( self::comparePasswords( $this->mNewpassword, $plaintext, $this->getId() ) ) {
+ if ( self::comparePasswords( $this->mNewpassword, $plaintext, $this->getId() ) ) {
if ( is_null( $this->mNewpassTime ) ) {
return true;
}
$token = MWCryptRand::generateHex( 32 );
$request->setSessionData( 'wsEditToken', $token );
}
- if( is_array( $salt ) ) {
+ if ( is_array( $salt ) ) {
$salt = implode( '|', $salt );
}
return md5( $token . $salt ) . EDIT_TOKEN_SUFFIX;
* @return Status
*/
public function sendMail( $subject, $body, $from = null, $replyto = null ) {
- if( is_null( $from ) ) {
+ if ( is_null( $from ) ) {
global $wgPasswordSender, $wgPasswordSenderName;
$sender = new MailAddress( $wgPasswordSender, $wgPasswordSenderName );
} else {
*/
public function canSendEmail() {
global $wgEnableEmail, $wgEnableUserEmail;
- if( !$wgEnableEmail || !$wgEnableUserEmail || !$this->isAllowed( 'sendemail' ) ) {
+ if ( !$wgEnableEmail || !$wgEnableUserEmail || !$this->isAllowed( 'sendemail' ) ) {
return false;
}
$canSend = $this->isEmailConfirmed();
global $wgEmailAuthentication;
$this->load();
$confirmed = true;
- if( wfRunHooks( 'EmailConfirmed', array( &$this, &$confirmed ) ) ) {
- if( $this->isAnon() ) {
+ if ( wfRunHooks( 'EmailConfirmed', array( &$this, &$confirmed ) ) ) {
+ if ( $this->isAnon() ) {
return false;
}
- if( !Sanitizer::validateEmail( $this->mEmail ) ) {
+ if ( !Sanitizer::validateEmail( $this->mEmail ) ) {
return false;
}
- if( $wgEmailAuthentication && !$this->getEmailAuthenticationTimestamp() ) {
+ if ( $wgEmailAuthentication && !$this->getEmailAuthenticationTimestamp() ) {
return false;
}
return true;
* non-existent/anonymous user accounts.
*/
public function getFirstEditTimestamp() {
- if( $this->getId() == 0 ) {
+ if ( $this->getId() == 0 ) {
return false; // anons
}
$dbr = wfGetDB( DB_SLAVE );
__METHOD__,
array( 'ORDER BY' => 'rev_timestamp ASC' )
);
- if( !$time ) {
+ if ( !$time ) {
return false; // no edits
}
return wfTimestamp( TS_MW, $time );
global $wgGroupPermissions, $wgRevokePermissions;
$rights = array();
// grant every granted permission first
- foreach( $groups as $group ) {
- if( isset( $wgGroupPermissions[$group] ) ) {
+ foreach ( $groups as $group ) {
+ if ( isset( $wgGroupPermissions[$group] ) ) {
$rights = array_merge( $rights,
// array_filter removes empty items
array_keys( array_filter( $wgGroupPermissions[$group] ) ) );
}
}
// now revoke the revoked permissions
- foreach( $groups as $group ) {
- if( isset( $wgRevokePermissions[$group] ) ) {
+ foreach ( $groups as $group ) {
+ if ( isset( $wgRevokePermissions[$group] ) ) {
$rights = array_diff( $rights,
array_keys( array_filter( $wgRevokePermissions[$group] ) ) );
}
*/
public static function getGroupPage( $group ) {
$msg = wfMessage( 'grouppage-' . $group )->inContentLanguage();
- if( $msg->exists() ) {
+ if ( $msg->exists() ) {
$title = Title::newFromText( $msg->text() );
- if( is_object( $title ) )
+ if ( is_object( $title ) ) {
return $title;
+ }
}
return false;
}
* @return String HTML link to the group
*/
public static function makeGroupLinkHTML( $group, $text = '' ) {
- if( $text == '' ) {
+ if ( $text == '' ) {
$text = self::getGroupName( $group );
}
$title = self::getGroupPage( $group );
- if( $title ) {
+ if ( $title ) {
return Linker::link( $title, htmlspecialchars( $text ) );
} else {
return $text;
* @return String Wikilink to the group
*/
public static function makeGroupLinkWiki( $group, $text = '' ) {
- if( $text == '' ) {
+ if ( $text == '' ) {
$text = self::getGroupName( $group );
}
$title = self::getGroupPage( $group );
- if( $title ) {
+ if ( $title ) {
$page = $title->getPrefixedText();
return "[[$page|$text]]";
} else {
global $wgAddGroups, $wgRemoveGroups, $wgGroupsAddToSelf, $wgGroupsRemoveFromSelf;
$groups = array( 'add' => array(), 'remove' => array(), 'add-self' => array(), 'remove-self' => array() );
- if( empty( $wgAddGroups[$group] ) ) {
+ if ( empty( $wgAddGroups[$group] ) ) {
// Don't add anything to $groups
- } elseif( $wgAddGroups[$group] === true ) {
+ } elseif ( $wgAddGroups[$group] === true ) {
// You get everything
$groups['add'] = self::getAllGroups();
- } elseif( is_array( $wgAddGroups[$group] ) ) {
+ } elseif ( is_array( $wgAddGroups[$group] ) ) {
$groups['add'] = $wgAddGroups[$group];
}
// Same thing for remove
- if( empty( $wgRemoveGroups[$group] ) ) {
- } elseif( $wgRemoveGroups[$group] === true ) {
+ if ( empty( $wgRemoveGroups[$group] ) ) {
+ } elseif ( $wgRemoveGroups[$group] === true ) {
$groups['remove'] = self::getAllGroups();
- } elseif( is_array( $wgRemoveGroups[$group] ) ) {
+ } elseif ( is_array( $wgRemoveGroups[$group] ) ) {
$groups['remove'] = $wgRemoveGroups[$group];
}
// Re-map numeric keys of AddToSelf/RemoveFromSelf to the 'user' key for backwards compatibility
- if( empty( $wgGroupsAddToSelf['user'] ) || $wgGroupsAddToSelf['user'] !== true ) {
- foreach( $wgGroupsAddToSelf as $key => $value ) {
- if( is_int( $key ) ) {
+ if ( empty( $wgGroupsAddToSelf['user'] ) || $wgGroupsAddToSelf['user'] !== true ) {
+ foreach ( $wgGroupsAddToSelf as $key => $value ) {
+ if ( is_int( $key ) ) {
$wgGroupsAddToSelf['user'][] = $value;
}
}
}
- if( empty( $wgGroupsRemoveFromSelf['user'] ) || $wgGroupsRemoveFromSelf['user'] !== true ) {
- foreach( $wgGroupsRemoveFromSelf as $key => $value ) {
- if( is_int( $key ) ) {
+ if ( empty( $wgGroupsRemoveFromSelf['user'] ) || $wgGroupsRemoveFromSelf['user'] !== true ) {
+ foreach ( $wgGroupsRemoveFromSelf as $key => $value ) {
+ if ( is_int( $key ) ) {
$wgGroupsRemoveFromSelf['user'][] = $value;
}
}
}
// Now figure out what groups the user can add to him/herself
- if( empty( $wgGroupsAddToSelf[$group] ) ) {
- } elseif( $wgGroupsAddToSelf[$group] === true ) {
+ if ( empty( $wgGroupsAddToSelf[$group] ) ) {
+ } elseif ( $wgGroupsAddToSelf[$group] === true ) {
// No idea WHY this would be used, but it's there
$groups['add-self'] = User::getAllGroups();
- } elseif( is_array( $wgGroupsAddToSelf[$group] ) ) {
+ } elseif ( is_array( $wgGroupsAddToSelf[$group] ) ) {
$groups['add-self'] = $wgGroupsAddToSelf[$group];
}
- if( empty( $wgGroupsRemoveFromSelf[$group] ) ) {
- } elseif( $wgGroupsRemoveFromSelf[$group] === true ) {
+ if ( empty( $wgGroupsRemoveFromSelf[$group] ) ) {
+ } elseif ( $wgGroupsRemoveFromSelf[$group] === true ) {
$groups['remove-self'] = User::getAllGroups();
- } elseif( is_array( $wgGroupsRemoveFromSelf[$group] ) ) {
+ } elseif ( is_array( $wgGroupsRemoveFromSelf[$group] ) ) {
$groups['remove-self'] = $wgGroupsRemoveFromSelf[$group];
}
* 'remove-self' => array( removable groups from self) )
*/
public function changeableGroups() {
- if( $this->isAllowed( 'userrights' ) ) {
+ if ( $this->isAllowed( 'userrights' ) ) {
// This group gives the right to modify everything (reverse-
// compatibility with old "userrights lets you change
// everything")
);
$addergroups = $this->getEffectiveGroups();
- foreach( $addergroups as $addergroup ) {
+ foreach ( $addergroups as $addergroup ) {
$groups = array_merge_recursive(
$groups, $this->changeableByGroup( $addergroup )
);
* Will have no effect for anonymous users.
*/
public function incEditCount() {
- if( !$this->isAnon() ) {
+ if ( !$this->isAnon() ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->update(
'user',
);
// Lazy initialization check...
- if( $dbw->affectedRows() == 0 ) {
+ if ( $dbw->affectedRows() == 0 ) {
// Now here's a goddamn hack...
$dbr = wfGetDB( DB_SLAVE );
- if( $dbr !== $dbw ) {
+ if ( $dbr !== $dbw ) {
// If we actually have a slave server, the count is
// at least one behind because the current transaction
// has not been committed and replicated.
global $wgPasswordSalt;
$hash = '';
- if( !wfRunHooks( 'UserCryptPassword', array( &$password, &$salt, &$wgPasswordSalt, &$hash ) ) ) {
+ if ( !wfRunHooks( 'UserCryptPassword', array( &$password, &$salt, &$wgPasswordSalt, &$hash ) ) ) {
return $hash;
}
- if( $wgPasswordSalt ) {
+ if ( $wgPasswordSalt ) {
if ( $salt === false ) {
$salt = MWCryptRand::generateHex( 8 );
}
$type = substr( $hash, 0, 3 );
$result = false;
- if( !wfRunHooks( 'UserComparePasswords', array( &$hash, &$password, &$userId, &$result ) ) ) {
+ if ( !wfRunHooks( 'UserComparePasswords', array( &$hash, &$password, &$userId, &$result ) ) ) {
return $result;
}
*/
public function addNewUserLogEntry( $action = false, $reason = '' ) {
global $wgUser, $wgNewUserLog;
- if( empty( $wgNewUserLog ) ) {
+ if ( empty( $wgNewUserLog ) ) {
return true; // disabled
}
// Maybe load from the object
if ( !is_null( $this->mOptionOverrides ) ) {
wfDebug( "User: loading options for user " . $this->getId() . " from override cache.\n" );
- foreach( $this->mOptionOverrides as $key => $value ) {
+ foreach ( $this->mOptionOverrides as $key => $value ) {
$this->mOptions[$key] = $value;
}
} else {
- if( !is_array( $data ) ) {
+ if ( !is_array( $data ) ) {
wfDebug( "User: loading options for user " . $this->getId() . " from database.\n" );
// Load from database
$dbr = wfGetDB( DB_SLAVE );
// Allow hooks to abort, for instance to save to a global profile.
// Reset options to default state before saving.
- if( !wfRunHooks( 'UserSaveOptions', array( $this, &$saveOptions ) ) ) {
+ if ( !wfRunHooks( 'UserSaveOptions', array( $this, &$saveOptions ) ) ) {
return;
}
$userId = $this->getId();
$insert_rows = array();
- foreach( $saveOptions as $key => $value ) {
+ foreach ( $saveOptions as $key => $value ) {
# Don't bother storing default values
$defaultOption = self::getDefaultOption( $key );
if ( ( is_null( $defaultOption ) &&
}
$dbw = wfGetDB( DB_MASTER );
- $dbw->delete( 'user_properties', array( 'up_user' => $userId ), __METHOD__ );
- $dbw->insert( 'user_properties', $insert_rows, __METHOD__ );
+ $hasRows = $dbw->selectField( 'user_properties', '1',
+ array( 'up_user' => $userId ), __METHOD__ );
+
+ if ( $hasRows ) {
+ // Only do this delete if there is something there. A very large portion of
+ // calls to this function are for setting 'rememberpassword' for new accounts.
+ // Doing this delete for new accounts with no rows in the table rougly causes
+ // gap locks on [max user ID,+infinity) which causes high contention since many
+ // updates will pile up on each other since they are for higher (newer) user IDs.
+ $dbw->delete( 'user_properties', array( 'up_user' => $userId ), __METHOD__ );
+ }
+ $dbw->insert( 'user_properties', $insert_rows, __METHOD__, array( 'IGNORE' ) );
}
/**
*/
static function arrayToHeaderString( $headers, $endl = "\n" ) {
$strings = array();
- foreach( $headers as $name => $value ) {
+ foreach ( $headers as $name => $value ) {
$strings[] = "$name: $value";
}
return implode( $endl, $strings );
#
# PHP mail()
#
- if( count( $to ) > 1 ) {
+ if ( count( $to ) > 1 ) {
$headers['To'] = 'undisclosed-recipients:;';
}
$headers = self::arrayToHeaderString( $headers, $endl );
*/
public static function quotedPrintable( $string, $charset = '' ) {
# Probably incomplete; see RFC 2045
- if( empty( $charset ) ) {
+ if ( empty( $charset ) ) {
$charset = 'UTF-8';
}
$charset = strtoupper( $charset );
$illegal = '\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\xff=';
$replace = $illegal . '\t ?_';
- if( !preg_match( "/[$illegal]/", $string ) ) {
+ if ( !preg_match( "/[$illegal]/", $string ) ) {
return $string;
}
$out = "=?$charset?Q?";
function compose( $user ) {
global $wgEnotifImpersonal;
- if ( !$this->composed_common )
+ if ( !$this->composed_common ) {
$this->composeCommonMailtext();
+ }
if ( $wgEnotifImpersonal ) {
$this->mailTargets[] = new MailAddress( $user );
*/
public static function whoIs( $database, $id, $ignoreInvalidDB = false ) {
$user = self::newFromId( $database, $id, $ignoreInvalidDB );
- if( $user ) {
+ if ( $user ) {
return $user->name;
} else {
return false;
*/
private static function newFromLookup( $database, $field, $value, $ignoreInvalidDB = false ) {
$db = self::getDB( $database, $ignoreInvalidDB );
- if( $db ) {
+ if ( $db ) {
$row = $db->selectRow( 'user',
array( 'user_id', 'user_name' ),
array( $field => $value ),
__METHOD__ );
- if( $row !== false ) {
+ if ( $row !== false ) {
return new UserRightsProxy( $db, $database,
$row->user_name,
intval( $row->user_id ) );
*/
public static function getDB( $database, $ignoreInvalidDB = false ) {
global $wgDBname;
- if( self::validDatabase( $database ) ) {
- if( $database == $wgDBname ) {
+ if ( self::validDatabase( $database ) ) {
+ if ( $database == $wgDBname ) {
// Hmm... this shouldn't happen though. :)
return wfGetDB( DB_MASTER );
} else {
);
}
- if( empty( $values ) ) {
+ if ( empty( $values ) ) {
// Nothing to do
return true;
}
wfSuppressWarnings();
$a = parse_url( $url );
wfRestoreWarnings();
- if( $a ) {
+ if ( $a ) {
$path = isset( $a['path'] ) ? $a['path'] : '';
global $wgScript;
- if( $path == $wgScript && $want !== 'all' ) {
+ if ( $path == $wgScript && $want !== 'all' ) {
// Script inside a rewrite path?
// Abort to keep from breaking...
return $matches;
// Raw PATH_INFO style
$router->add( "$wgScript/$1" );
- if( isset( $_SERVER['SCRIPT_NAME'] )
+ if ( isset( $_SERVER['SCRIPT_NAME'] )
&& preg_match( '/\.php5?/', $_SERVER['SCRIPT_NAME'] ) )
{
# Check for SCRIPT_NAME, we handle index.php explicitly
}
global $wgArticlePath;
- if( $wgArticlePath ) {
+ if ( $wgArticlePath ) {
$router->add( $wgArticlePath );
}
global $wgActionPaths;
- if( $wgActionPaths ) {
+ if ( $wgActionPaths ) {
$router->add( $wgActionPaths, array( 'action' => '$key' ) );
}
global $wgVariantArticlePath, $wgContLang;
- if( $wgVariantArticlePath ) {
+ if ( $wgVariantArticlePath ) {
$router->add( $wgVariantArticlePath,
array( 'variant' => '$2' ),
array( '$2' => $wgContLang->getVariants() )
}
$matches = self::getPathInfo( 'title' );
- foreach( $matches as $key => $val ) {
+ foreach ( $matches as $key => $val ) {
$this->data[$key] = $_GET[$key] = $_REQUEST[$key] = $val;
}
}
* @return array of URL variables to interpolate; empty if no match
*/
static function extractTitle( $path, $bases, $key = false ) {
- foreach( (array)$bases as $keyValue => $base ) {
+ foreach ( (array)$bases as $keyValue => $base ) {
// Find the part after $wgArticlePath
$base = str_replace( '$1', '', $base );
$baseLen = strlen( $base );
- if( substr( $path, 0, $baseLen ) == $base ) {
+ if ( substr( $path, 0, $baseLen ) == $base ) {
$raw = substr( $path, $baseLen );
- if( $raw !== '' ) {
+ if ( $raw !== '' ) {
$matches = array( 'title' => rawurldecode( $raw ) );
- if( $key ) {
+ if ( $key ) {
$matches[$key] = $keyValue;
}
return $matches;
*/
private function &fix_magic_quotes( &$arr, $topLevel = true ) {
$clean = array();
- foreach( $arr as $key => $val ) {
- if( is_array( $val ) ) {
+ foreach ( $arr as $key => $val ) {
+ if ( is_array( $val ) ) {
$cleanKey = $topLevel ? stripslashes( $key ) : $key;
$clean[$cleanKey] = $this->fix_magic_quotes( $arr[$key], false );
} else {
private function checkMagicQuotes() {
$mustFixQuotes = function_exists( 'get_magic_quotes_gpc' )
&& get_magic_quotes_gpc();
- if( $mustFixQuotes ) {
+ if ( $mustFixQuotes ) {
$this->fix_magic_quotes( $_COOKIE );
$this->fix_magic_quotes( $_ENV );
$this->fix_magic_quotes( $_GET );
* @private
*/
function normalizeUnicode( $data ) {
- if( is_array( $data ) ) {
- foreach( $data as $key => $val ) {
+ if ( is_array( $data ) ) {
+ foreach ( $data as $key => $val ) {
$data[$key] = $this->normalizeUnicode( $val );
}
} else {
# http://us2.php.net/variables.external#language.variables.external.dot-in-names
# Work around PHP *feature* to avoid *bugs* elsewhere.
$name = strtr( $name, '.', '_' );
- if( isset( $arr[$name] ) ) {
+ if ( isset( $arr[$name] ) ) {
global $wgContLang;
$data = $arr[$name];
- if( isset( $_GET[$name] ) && !is_array( $data ) ) {
+ if ( isset( $_GET[$name] ) && !is_array( $data ) ) {
# Check for alternate/legacy character encoding.
- if( isset( $wgContLang ) ) {
+ if ( isset( $wgContLang ) ) {
$data = $wgContLang->checkTitleEncoding( $data );
}
}
*/
public function getVal( $name, $default = null ) {
$val = $this->getGPCVal( $this->data, $name, $default );
- if( is_array( $val ) ) {
+ if ( is_array( $val ) ) {
$val = $default;
}
- if( is_null( $val ) ) {
+ if ( is_null( $val ) ) {
return $val;
} else {
return (string)$val;
*/
public function getArray( $name, $default = null ) {
$val = $this->getGPCVal( $this->data, $name, $default );
- if( is_null( $val ) ) {
+ if ( is_null( $val ) ) {
return null;
} else {
return (array)$val;
*/
public function getIntArray( $name, $default = null ) {
$val = $this->getArray( $name, $default );
- if( is_array( $val ) ) {
+ if ( is_array( $val ) ) {
$val = array_map( 'intval', $val );
}
return $val;
* @return Mixed: cookie value or $default if the cookie not set
*/
public function getCookie( $key, $prefix = null, $default = null ) {
- if( $prefix === null ) {
+ if ( $prefix === null ) {
global $wgCookiePrefix;
$prefix = $wgCookiePrefix;
}
* @return String
*/
public function getRequestURL() {
- if( isset( $_SERVER['REQUEST_URI'] ) && strlen( $_SERVER['REQUEST_URI'] ) ) {
+ if ( isset( $_SERVER['REQUEST_URI'] ) && strlen( $_SERVER['REQUEST_URI'] ) ) {
$base = $_SERVER['REQUEST_URI'];
} elseif ( isset( $_SERVER['HTTP_X_ORIGINAL_URL'] ) && strlen( $_SERVER['HTTP_X_ORIGINAL_URL'] ) ) {
// Probably IIS; doesn't set REQUEST_URI
$base = $_SERVER['HTTP_X_ORIGINAL_URL'];
- } elseif( isset( $_SERVER['SCRIPT_NAME'] ) ) {
+ } elseif ( isset( $_SERVER['SCRIPT_NAME'] ) ) {
$base = $_SERVER['SCRIPT_NAME'];
- if( isset( $_SERVER['QUERY_STRING'] ) && $_SERVER['QUERY_STRING'] != '' ) {
+ if ( isset( $_SERVER['QUERY_STRING'] ) && $_SERVER['QUERY_STRING'] != '' ) {
$base .= '?' . $_SERVER['QUERY_STRING'];
}
} else {
// need to strip it or we get false-positive redirect loops
// or weird output URLs
$hash = strpos( $base, '#' );
- if( $hash !== false ) {
+ if ( $hash !== false ) {
$base = substr( $base, 0, $hash );
}
- if( $base[0] == '/' ) {
+ if ( $base[0] == '/' ) {
// More than one slash will look like it is protocol relative
return preg_replace( '!^/+!', '/', $base );
} else {
global $wgUser;
$limit = $this->getInt( 'limit', 0 );
- if( $limit < 0 ) {
+ if ( $limit < 0 ) {
$limit = 0;
}
- if( ( $limit == 0 ) && ( $optionname != '' ) ) {
+ if ( ( $limit == 0 ) && ( $optionname != '' ) ) {
$limit = $wgUser->getIntOption( $optionname );
}
- if( $limit <= 0 ) {
+ if ( $limit <= 0 ) {
$limit = $deflimit;
}
- if( $limit > 5000 ) {
+ if ( $limit > 5000 ) {
$limit = 5000; # We have *some* limits...
}
$offset = $this->getInt( 'offset', 0 );
- if( $offset < 0 ) {
+ if ( $offset < 0 ) {
$offset = 0;
}
* @return Mixed
*/
public function getSessionData( $key ) {
- if( !isset( $_SESSION[$key] ) ) {
+ if ( !isset( $_SESSION[$key] ) ) {
return null;
}
return $_SESSION[$key];
* @throws MWException
*/
public function __construct( $data = array(), $wasPosted = false, $session = null ) {
- if( is_array( $data ) ) {
+ if ( is_array( $data ) ) {
$this->data = $data;
} else {
throw new MWException( "FauxRequest() got bogus data" );
}
$this->wasPosted = $wasPosted;
- if( $session ) {
+ if ( $session ) {
$this->session = $session;
}
}
* @return mixed
*/
public function getSessionData( $key ) {
- if( isset( $this->session[$key] ) ) {
+ if ( isset( $this->session[$key] ) ) {
return $this->session[$key];
}
return null;
if ( $expire == 0 ) {
$expire = time() + $wgCookieExpiration;
}
- if( $prefix === null ) {
+ if ( $prefix === null ) {
$prefix = $wgCookiePrefix;
}
- if( $domain === null ) {
+ if ( $domain === null ) {
$domain = $wgCookieDomain;
}
} else {
list( $key, $val ) = array_map( 'trim', explode( ":", $string, 2 ) );
- if( $replace || !isset( $this->headers[$key] ) ) {
+ if ( $replace || !isset( $this->headers[$key] ) ) {
$this->headers[$key] = $val;
}
}
'HTTP_SESSION_VARS'
);
foreach ( $_REQUEST as $name => $value ) {
- if( in_array( $name, $verboten ) ) {
+ if ( in_array( $name, $verboten ) ) {
header( "HTTP/1.1 500 Internal Server Error" );
echo "register_globals security paranoia: trying to overwrite superglobals, aborting.";
die( -1 );
# if we don't have permissions on parent directories.
$IP = getenv( 'MW_INSTALL_PATH' );
if ( $IP === false ) {
- if( realpath( '.' ) ) {
+ if ( realpath( '.' ) ) {
$IP = realpath( '.' );
} else {
$IP = dirname( __DIR__ );
# LocalSettings.php is the per site customization file. If it does not exist
# the wiki installer needs to be launched or the generated file uploaded to
# the root wiki directory
- if( !file_exists( MW_CONFIG_FILE ) ) {
+ if ( !file_exists( MW_CONFIG_FILE ) ) {
require_once( "$IP/includes/templates/NoLocalSettings.php" );
die();
}
* @return Title
*/
public function getTitle() {
- if( $this->context->getTitle() === null ) {
+ if ( $this->context->getTitle() === null ) {
$this->context->setTitle( $this->parseTitle() );
}
return $this->context->getTitle();
$resp->header( 'Retry-After: ' . max( intval( $maxLag ), 5 ) );
$resp->header( 'X-Database-Lag: ' . intval( $lag ) );
$resp->header( 'Content-Type: text/plain' );
- if( $wgShowHostnames ) {
+ if ( $wgShowHostnames ) {
echo "Waiting for $host: $lag seconds lagged\n";
} else {
echo "Waiting for a database server: $lag seconds lagged\n";
if ( $job ) {
$output = $job->toString() . "\n";
$t = - microtime( true );
+ wfProfileIn( __METHOD__ . '-' . get_class( $job ) );
$success = $job->run();
+ wfProfileOut( __METHOD__ . '-' . get_class( $job ) );
$group->ack( $job ); // done
$t += microtime( true );
$t = round( $t * 1000 );
- if ( !$success ) {
+ if ( $success === false ) {
$output .= "Error: " . $job->getLastError() . ", Time: $t ms\n";
} else {
$output .= "Success, Time: $t ms\n";
}
function _extractContext( $context, $offset ) {
- if( is_null( $context ) ) {
+ if ( is_null( $context ) ) {
return null;
} else {
// Hopefully integer overflow will be handled transparently here
$wgConf->loadFullData();
list( $major, $minor ) = $wgConf->siteFromDB( $wikiID );
- if( $major === null ) {
+ if ( $major === null ) {
return null;
}
$canonicalServer = $wgConf->get( 'wgCanonicalServer', $wikiID, $major,
public function pageDataFromTitle( $dbr, $title, $options = array() ) {
return $this->pageData( $dbr, array(
'page_namespace' => $title->getNamespace(),
- 'page_title' => $title->getDBkey() ), $options );
+ 'page_title' => $title->getDBkey() ), $options );
}
/**
*/
public function isRedirect() {
$content = $this->getContent();
- if ( !$content ) return false;
+ if ( !$content ) {
+ return false;
+ }
return $content->isRedirect();
}
$dbw = wfGetDB( DB_MASTER );
$dbw->replace( 'redirect', array( 'rd_from' ),
array(
- 'rd_from' => $this->getId(),
+ 'rd_from' => $this->getId(),
'rd_namespace' => $rt->getNamespace(),
- 'rd_title' => $rt->getDBkey(),
- 'rd_fragment' => $rt->getFragment(),
+ 'rd_title' => $rt->getDBkey(),
+ 'rd_fragment' => $rt->getFragment(),
'rd_interwiki' => $rt->getInterwiki(),
),
__METHOD__
public function doPurge() {
global $wgUseSquid;
- if( !wfRunHooks( 'ArticlePurge', array( &$this ) ) ) {
+ if ( !wfRunHooks( 'ArticlePurge', array( &$this ) ) ) {
return false;
}
$content = $this->getContent();
$text = $content === null ? null : $content->getWikitextForTransclusion();
- if ( $text === null ) $text = false;
+ if ( $text === null ) {
+ $text = false;
+ }
} else {
$text = false;
}
// Provide autosummaries if one is not provided and autosummaries are enabled.
if ( $wgUseAutomaticEditSummaries && $flags & EDIT_AUTOSUMMARY && $summary == '' ) {
- if ( !$old_content ) $old_content = null;
+ if ( !$old_content ) {
+ $old_content = null;
+ }
$summary = $handler->getAutosummary( $old_content, $content, $flags );
}
&& $shortTitle != $user->getTitleKey()
&& !( $revision->isMinor() && $user->isAllowed( 'nominornewtalk' ) )
) {
- if ( wfRunHooks( 'ArticleEditUpdateNewTalk', array( &$this ) ) ) {
- $other = User::newFromName( $shortTitle, false );
- if ( !$other ) {
- wfDebug( __METHOD__ . ": invalid username\n" );
- } elseif ( User::isIP( $shortTitle ) ) {
- // An anonymous user
- $other->setNewtalk( true, $revision );
- } elseif ( $other->isLoggedIn() ) {
- $other->setNewtalk( true, $revision );
- } else {
- wfDebug( __METHOD__ . ": don't need to notify a nonexistent user\n" );
+ $recipient = User::newFromName( $shortTitle, false );
+ if ( !$recipient ) {
+ wfDebug( __METHOD__ . ": invalid username\n" );
+ } else {
+ // Allow extensions to prevent user notification when a new message is added to their talk page
+ if ( wfRunHooks( 'ArticleEditUpdateNewTalk', array( &$this, $recipient ) ) ) {
+ if ( User::isIP( $shortTitle ) ) {
+ // An anonymous user
+ $recipient->setNewtalk( true, $revision );
+ } elseif ( $recipient->isLoggedIn() ) {
+ $recipient->setNewtalk( true, $revision );
+ } else {
+ wfDebug( __METHOD__ . ": don't need to notify a nonexistent user\n" );
+ }
}
}
}
if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
// XXX: could skip pseudo-messages like js/css here, based on content model.
$msgtext = $content ? $content->getWikitextForTransclusion() : null;
- if ( $msgtext === false || $msgtext === null ) $msgtext = '';
+ if ( $msgtext === false || $msgtext === null ) {
+ $msgtext = '';
+ }
MessageCache::singleton()->replace( $shortTitle, $msgtext );
}
- if( $options['created'] ) {
+ if ( $options['created'] ) {
self::onArticleCreate( $this->mTitle );
} else {
self::onArticleEdit( $this->mTitle );
$wgContLang->timeanddate( wfTimestamp( TS_MW, $s->rev_timestamp ) ),
$current->getId(), $wgContLang->timeanddate( $current->getTimestamp() )
);
- if( $summary instanceof Message ) {
+ if ( $summary instanceof Message ) {
$summary = $summary->params( $args )->inContentLanguage()->text();
} else {
$summary = wfMsgReplaceArgs( $summary, $args );
$resultDetails = array(
'summary' => $summary,
'current' => $current,
- 'target' => $target,
- 'newid' => $revId
+ 'target' => $target,
+ 'newid' => $revId
);
return array();
* @param array $added The names of categories that were added
* @param array $deleted The names of categories that were deleted
*/
- public function updateCategoryCounts( $added, $deleted ) {
- $ns = $this->mTitle->getNamespace();
+ public function updateCategoryCounts( array $added, array $deleted ) {
+ $that = $this;
+ $method = __METHOD__;
$dbw = wfGetDB( DB_MASTER );
- // First make sure the rows exist. If one of the "deleted" ones didn't
- // exist, we might legitimately not create it, but it's simpler to just
- // create it and then give it a negative value, since the value is bogus
- // anyway.
- //
- // Sometimes I wish we had INSERT ... ON DUPLICATE KEY UPDATE.
- $insertCats = array_merge( $added, $deleted );
- if ( !$insertCats ) {
- // Okay, nothing to do
- return;
- }
+ // Do this at the end of the commit to reduce lock wait timeouts
+ $dbw->onTransactionPreCommitOrIdle(
+ function() use ( $dbw, $that, $method, $added, $deleted ) {
+ $ns = $that->getTitle()->getNamespace();
- $insertRows = array();
+ // First make sure the rows exist. If one of the "deleted" ones didn't
+ // exist, we might legitimately not create it, but it's simpler to just
+ // create it and then give it a negative value, since the value is bogus
+ // anyway.
+ //
+ // Sometimes I wish we had INSERT ... ON DUPLICATE KEY UPDATE.
+ $insertCats = array_merge( $added, $deleted );
+ if ( !$insertCats ) {
+ // Okay, nothing to do
+ return;
+ }
- foreach ( $insertCats as $cat ) {
- $insertRows[] = array(
- 'cat_id' => $dbw->nextSequenceValue( 'category_cat_id_seq' ),
- 'cat_title' => $cat
- );
- }
- $dbw->insert( 'category', $insertRows, __METHOD__, 'IGNORE' );
+ $insertRows = array();
+ foreach ( $insertCats as $cat ) {
+ $insertRows[] = array(
+ 'cat_id' => $dbw->nextSequenceValue( 'category_cat_id_seq' ),
+ 'cat_title' => $cat
+ );
+ }
+ $dbw->insert( 'category', $insertRows, $method, 'IGNORE' );
- $addFields = array( 'cat_pages = cat_pages + 1' );
- $removeFields = array( 'cat_pages = cat_pages - 1' );
+ $addFields = array( 'cat_pages = cat_pages + 1' );
+ $removeFields = array( 'cat_pages = cat_pages - 1' );
- if ( $ns == NS_CATEGORY ) {
- $addFields[] = 'cat_subcats = cat_subcats + 1';
- $removeFields[] = 'cat_subcats = cat_subcats - 1';
- } elseif ( $ns == NS_FILE ) {
- $addFields[] = 'cat_files = cat_files + 1';
- $removeFields[] = 'cat_files = cat_files - 1';
- }
+ if ( $ns == NS_CATEGORY ) {
+ $addFields[] = 'cat_subcats = cat_subcats + 1';
+ $removeFields[] = 'cat_subcats = cat_subcats - 1';
+ } elseif ( $ns == NS_FILE ) {
+ $addFields[] = 'cat_files = cat_files + 1';
+ $removeFields[] = 'cat_files = cat_files - 1';
+ }
- if ( $added ) {
- $dbw->update(
- 'category',
- $addFields,
- array( 'cat_title' => $added ),
- __METHOD__
- );
- }
+ if ( $added ) {
+ $dbw->update(
+ 'category',
+ $addFields,
+ array( 'cat_title' => $added ),
+ $method
+ );
+ }
- if ( $deleted ) {
- $dbw->update(
- 'category',
- $removeFields,
- array( 'cat_title' => $deleted ),
- __METHOD__
- );
- }
+ if ( $deleted ) {
+ $dbw->update(
+ 'category',
+ $removeFields,
+ array( 'cat_title' => $deleted ),
+ $method
+ );
+ }
- foreach( $added as $catName ) {
- $cat = Category::newFromName( $catName );
- wfRunHooks( 'CategoryAfterPageAdded', array( $cat, $this ) );
- }
- foreach( $deleted as $catName ) {
- $cat = Category::newFromName( $catName );
- wfRunHooks( 'CategoryAfterPageRemoved', array( $cat, $this ) );
- }
+ foreach ( $added as $catName ) {
+ $cat = Category::newFromName( $catName );
+ wfRunHooks( 'CategoryAfterPageAdded', array( $cat, $that ) );
+ }
+ foreach ( $deleted as $catName ) {
+ $cat = Category::newFromName( $catName );
+ wfRunHooks( 'CategoryAfterPageRemoved', array( $cat, $that ) );
+ }
+ }
+ );
}
/**
*/
public static function element( $element, $attribs = null, $contents = '', $allowShortTag = true ) {
$out = '<' . $element;
- if( !is_null( $attribs ) ) {
+ if ( !is_null( $attribs ) ) {
$out .= self::expandAttributes( $attribs );
}
- if( is_null( $contents ) ) {
+ if ( is_null( $contents ) ) {
$out .= '>';
} else {
- if( $allowShortTag && $contents === '' ) {
+ if ( $allowShortTag && $contents === '' ) {
$out .= ' />';
} else {
$out .= '>' . htmlspecialchars( $contents ) . "</$element>";
*/
public static function expandAttributes( $attribs ) {
$out = '';
- if( is_null( $attribs ) ) {
+ if ( is_null( $attribs ) ) {
return null;
- } elseif( is_array( $attribs ) ) {
- foreach( $attribs as $name => $val ) {
+ } elseif ( is_array( $attribs ) ) {
+ foreach ( $attribs as $name => $val ) {
$out .= " {$name}=\"" . Sanitizer::encodeAttribute( $val ) . '"';
}
return $out;
*/
public static function elementClean( $element, $attribs = array(), $contents = '' ) {
global $wgContLang;
- if( $attribs ) {
+ if ( $attribs ) {
$attribs = array_map( array( 'UtfNormal', 'cleanUp' ), $attribs );
}
- if( $contents ) {
+ if ( $contents ) {
wfProfileIn( __METHOD__ . '-norm' );
$contents = $wgContLang->normalize( $contents );
wfProfileOut( __METHOD__ . '-norm' );
* @param string $element element name
* @return string
*/
- public static function closeElement( $element ) { return "</$element>"; }
+ public static function closeElement( $element ) {
+ return "</$element>";
+ }
/**
* Same as Xml::element(), but does not escape contents. Handy when the
wfDeprecated( __METHOD__, '1.19' );
return Html::namespaceSelector( array(
'selected' => $selected,
- 'all' => $all,
- 'label' => $label,
+ 'all' => $all,
+ 'label' => $label,
), array(
- 'name' => $element_name,
- 'id' => 'namespace',
+ 'name' => $element_name,
+ 'id' => 'namespace',
'class' => 'namespaceselector',
) );
}
public static function monthSelector( $selected = '', $allmonths = null, $id = 'month' ) {
global $wgLang;
$options = array();
- if( is_null( $selected ) )
+ if ( is_null( $selected ) ) {
$selected = '';
- if( !is_null( $allmonths ) )
+ }
+ if ( !is_null( $allmonths ) ) {
$options[] = self::option( wfMessage( 'monthsall' )->text(), $allmonths, $selected === $allmonths );
- for( $i = 1; $i < 13; $i++ )
+ }
+ for ( $i = 1; $i < 13; $i++ ) {
$options[] = self::option( $wgLang->getMonthName( $i ), $i, $selected === $i );
+ }
return self::openElement( 'select', array( 'id' => $id, 'name' => 'month', 'class' => 'mw-month-selector' ) )
. implode( "\n", $options )
. self::closeElement( 'select' );
*/
public static function dateMenu( $year, $month ) {
# Offset overrides year/month selection
- if( $month && $month !== -1 ) {
+ if ( $month && $month !== -1 ) {
$encMonth = intval( $month );
} else {
$encMonth = '';
}
- if( $year ) {
+ if ( $year ) {
$encYear = intval( $year );
- } elseif( $encMonth ) {
+ } elseif ( $encMonth ) {
$thisMonth = intval( gmdate( 'n' ) );
$thisYear = intval( gmdate( 'Y' ) );
- if( intval( $encMonth ) > $thisMonth ) {
+ if ( intval( $encMonth ) > $thisMonth ) {
$thisYear--;
}
$encYear = $thisYear;
// Make sure the site language is in the list;
// a custom language code might not have a defined name...
- if( !array_key_exists( $wgLanguageCode, $languages ) ) {
+ if ( !array_key_exists( $wgLanguageCode, $languages ) ) {
$languages[$wgLanguageCode] = $wgLanguageCode;
}
*/
$selected = isset( $languages[$selected] ) ? $selected : $wgLanguageCode;
$options = "\n";
- foreach( $languages as $code => $name ) {
+ foreach ( $languages as $code => $name ) {
$options .= Xml::option( "$code - $name", $code, ($code == $selected) ) . "\n";
}
$attrs = array( 'id' => 'wpUserLanguage', 'name' => 'wpUserLanguage' );
$attrs = array_merge( $attrs, $overrideAttrs );
- if( $msg === null ) {
+ if ( $msg === null ) {
$msg = wfMessage( 'yourlanguage' );
}
return array(
public static function input( $name, $size = false, $value = false, $attribs = array() ) {
$attributes = array( 'name' => $name );
- if( $size ) {
+ if ( $size ) {
$attributes['size'] = $size;
}
- if( $value !== false ) { // maybe 0
+ if ( $value !== false ) { // maybe 0
$attributes['value'] = $value;
}
$a = array( 'for' => $id );
# FIXME avoid copy pasting below:
- if( isset( $attribs['class'] ) ) {
+ if ( isset( $attribs['class'] ) ) {
$a['class'] = $attribs['class'];
}
- if( isset( $attribs['title'] ) ) {
+ if ( isset( $attribs['title'] ) ) {
$a['title'] = $attribs['title'];
}
*/
public static function option( $text, $value = null, $selected = false,
$attribs = array() ) {
- if( !is_null( $value ) ) {
+ if ( !is_null( $value ) ) {
$attribs['value'] = $value;
}
- if( $selected ) {
+ if ( $selected ) {
$attribs['selected'] = 'selected';
}
return Html::element( 'option', $attribs, $text );
} elseif ( substr( $value, 0, 1 ) == '*' && substr( $value, 1, 1 ) != '*' ) {
// A new group is starting ...
$value = trim( substr( $value, 1 ) );
- if( $optgroup ) $options .= self::closeElement( 'optgroup' );
+ if ( $optgroup ) {
+ $options .= self::closeElement( 'optgroup' );
+ }
$options .= self::openElement( 'optgroup', array( 'label' => $value ) );
$optgroup = true;
} elseif ( substr( $value, 0, 2 ) == '**' ) {
$options .= self::option( $value, $value, $selected === $value );
} else {
// groupless reason list
- if( $optgroup ) $options .= self::closeElement( 'optgroup' );
+ if ( $optgroup ) {
+ $options .= self::closeElement( 'optgroup' );
+ }
$options .= self::option( $value, $value, $selected === $value );
$optgroup = false;
}
}
- if( $optgroup ) $options .= self::closeElement( 'optgroup' );
+ if ( $optgroup ) {
+ $options .= self::closeElement( 'optgroup' );
+ }
$attribs = array();
- if( $name ) {
+ if ( $name ) {
$attribs['id'] = $name;
$attribs['name'] = $name;
}
- if( $class ) {
+ if ( $class ) {
$attribs['class'] = $class;
}
- if( $tabindex ) {
+ if ( $tabindex ) {
$attribs['tabindex'] = $tabindex;
}
# case folding violates XML standard, turn it off
xml_parser_set_option( $parser, XML_OPTION_CASE_FOLDING, false );
- if( !xml_parse( $parser, $text, true ) ) {
+ 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 );
$form = '';
$form .= "<table><tbody>";
- foreach( $fields as $labelmsg => $input ) {
+ foreach ( $fields as $labelmsg => $input ) {
$id = "mw-$labelmsg";
$form .= Xml::openElement( 'tr', array( 'id' => $id ) );
$form .= Xml::tags( 'td', array( 'class' => 'mw-label' ), wfMessage( $labelmsg )->parse() );
$form .= Xml::closeElement( 'tr' );
}
- if( $submitLabel ) {
+ if ( $submitLabel ) {
$form .= Xml::openElement( 'tr' );
$form .= Xml::tags( 'td', array(), '' );
$form .= Xml::openElement( 'td', array( 'class' => 'mw-submit' ) ) . Xml::submitButton( wfMessage( $submitLabel )->text() ) . Xml::closeElement( 'td' );
if ( is_array( $headers ) ) {
$s .= Xml::openElement( 'thead', $attribs );
- foreach( $headers as $id => $header ) {
+ foreach ( $headers as $id => $header ) {
$attribs = array();
if ( is_string( $id ) ) {
$s .= Xml::closeElement( 'thead' );
}
- foreach( $rows as $id => $row ) {
+ foreach ( $rows as $id => $row ) {
$attribs = array();
if ( is_string( $id ) ) {
public static function buildTableRow( $attribs, $cells ) {
$s = Xml::openElement( 'tr', $attribs );
- foreach( $cells as $id => $cell ) {
-
+ foreach ( $cells as $id => $cell ) {
$attribs = array();
if ( is_string( $id ) ) {
static function formatOptions( $options, $default = false ) {
$data = '';
- foreach( $options as $label => $value ) {
+ foreach ( $options as $label => $value ) {
if ( is_array( $value ) ) {
$contents = self::formatOptions( $value, $default );
$data .= Html::rawElement( 'optgroup', array( 'label' => $label ), $contents ) . "\n";
do {
$chunk = fread( $file, 32768 );
$ret = xml_parse( $parser, $chunk, feof( $file ) );
- if( $ret == 0 ) {
+ if ( $ret == 0 ) {
// XML isn't well-formed!
fclose( $file );
xml_parser_free( $parser );
return;
}
- } while( !feof( $file ) );
+ } while ( !feof( $file ) );
fclose( $file );
}
private function rootElementOpen( $parser, $name, $attribs ) {
$this->rootElement = $name;
- if( is_callable( $this->filterCallback ) ) {
+ if ( is_callable( $this->filterCallback ) ) {
xml_set_element_handler( $parser, array( $this, 'elementOpen' ), false );
$this->elementOpen( $parser, $name, $attribs );
} else {
* @param $attribs
*/
private function elementOpen( $parser, $name, $attribs ) {
- if( call_user_func( $this->filterCallback, $name, $attribs ) ) {
+ if ( call_user_func( $this->filterCallback, $name, $attribs ) ) {
// Filter hit!
$this->filterMatch = true;
}
$result = fgets( $this->mFP, 1024 );
list( $status, $len ) = explode( ' ', $result );
- if( $status == 'ERROR' ) {
+ if ( $status == 'ERROR' ) {
// $len is actually the error code...
print "zhdaemon error $len<br />\n";
return false;
}
$bytesread = 0;
$data = '';
- while( !feof( $this->mFP ) && $bytesread < $len ) {
+ while ( !feof( $this->mFP ) && $bytesread < $len ) {
$str = fread( $this->mFP, $len - $bytesread );
$bytesread += strlen( $str );
$data .= $str;
$info = explode( ';', $infoline );
$ret = array();
$i = 0;
- foreach( $info as $variant ) {
+ foreach ( $info as $variant ) {
list( $code, $len ) = explode( ' ', $variant );
$ret[strtolower( $code )] = substr( $data, $i, $len );
$i += $len;
# Hmm... too many to fit!
if ( $cnt > 0 && $contributors->count() > $cnt ) {
$others_link = $this->othersLink();
- if ( !$showIfMax )
+ if ( !$showIfMax ) {
return $this->msg( 'othercontribs' )->rawParams(
$others_link )->params( $contributors->count() )->escaped();
+ }
}
$real_names = array();
*/
function fetchRevisions( $limit, $offset, $direction ) {
// Fail if article doesn't exist.
- if( !$this->getTitle()->exists() ) {
+ if ( !$this->getTitle()->exists() ) {
return new FakeResultWrapper( array() );
}
function getQueryInfo() {
$queryInfo = array(
- 'tables' => array( 'revision', 'user' ),
- 'fields' => array_merge( Revision::selectFields(), Revision::selectUserFields() ),
- 'conds' => array_merge(
+ 'tables' => array( 'revision', 'user' ),
+ 'fields' => array_merge( Revision::selectFields(), Revision::selectUserFields() ),
+ 'conds' => array_merge(
array( 'rev_page' => $this->getWikiPage()->getId() ),
$this->conds ),
'options' => array( 'USE INDEX' => array( 'revision' => 'page_timestamp' ) ),
'join_conds' => array(
- 'user' => Revision::userJoinCond(),
+ 'user' => Revision::userJoinCond(),
'tag_summary' => array( 'LEFT JOIN', 'ts_rev_id=rev_id' ) ),
);
ChangeTags::modifyDisplayQuery(
$batch = new LinkBatch();
$revIds = array();
foreach ( $this->mResult as $row ) {
- if( $row->rev_parent_id ) {
+ if ( $row->rev_parent_id ) {
$revIds[] = $row->rev_parent_id;
}
- if( !is_null( $row->user_name ) ) {
+ if ( !is_null( $row->user_name ) ) {
$batch->add( NS_USER, $row->user_name );
$batch->add( NS_USER_TALK, $row->user_name );
} else { # for anons or usernames of imported revisions
$this->msg( 'editundo' )->escaped(),
$undoTooltip,
array(
- 'action' => 'edit',
+ 'action' => 'edit',
'undoafter' => $prevRev->getId(),
- 'undo' => $rev->getId()
+ 'undo' => $rev->getId()
)
);
$tools[] = "<span class=\"mw-history-undo\">{$undolink}</span>";
function diffButtons( $rev, $firstInList ) {
if ( $this->getNumRows() > 1 ) {
$id = $rev->getId();
- $radio = array( 'type' => 'radio', 'value' => $id );
+ $radio = array( 'type' => 'radio', 'value' => $id );
/** @todo: move title texts to javascript */
if ( $firstInList ) {
$first = Xml::element( 'input',
array_merge( $radio, array(
'style' => 'visibility:hidden',
- 'name' => 'oldid',
+ 'name' => 'oldid',
'id' => 'mw-oldid-null' ) )
);
$checkmark = array( 'checked' => 'checked' );
}
$first = Xml::element( 'input',
array_merge( $radio, $checkmark, array(
- 'name' => 'oldid',
+ 'name' => 'oldid',
'id' => "mw-oldid-$id" ) ) );
$checkmark = array();
}
$second = Xml::element( 'input',
array_merge( $radio, $checkmark, array(
- 'name' => 'diff',
+ 'name' => 'diff',
'id' => "mw-diff-$id" ) ) );
return $first . $second;
} else {
'COUNT(*)',
array(
'wl_namespace' => $title->getNamespace(),
- 'wl_title' => $title->getDBkey(),
+ 'wl_title' => $title->getDBkey(),
),
__METHOD__
);
$this->getRequest()->getQueryValues(),
array( 'title' => null, 'action' => null )
) );
- if( $this->onSubmit( array() ) ) {
+ if ( $this->onSubmit( array() ) ) {
$this->onSuccess();
}
} else {
global $wgParser;
# No longer used
- if( $this->mGen ) {
+ if ( $this->mGen ) {
return '';
}
switch ( $this->getRequest()->getText( 'direction' ) ) {
case 'next':
# output next revision, or nothing if there isn't one
- if( $oldid ) {
+ if ( $oldid ) {
$oldid = $this->getTitle()->getNextRevisionID( $oldid );
}
$oldid = $oldid ? $oldid : -1;
break;
case 'prev':
# output previous revision, or nothing if there isn't one
- if( !$oldid ) {
+ if ( !$oldid ) {
# get the current revision so we can get the penultimate one
$oldid = $this->page->getLatest();
}
);
}
$msg .= "Example" . ( count( $examples ) > 1 ? 's' : '' ) . ":\n";
- foreach( $examples as $k => $v ) {
-
+ foreach ( $examples as $k => $v ) {
if ( is_numeric( $k ) ) {
$msg .= " $v\n";
} else {
public function dieUsageMsg( $error ) {
# most of the time we send a 1 element, so we might as well send it as
# a string and make this an array here.
- if( is_string( $error ) ) {
+ if ( is_string( $error ) ) {
$error = array( $error );
}
$parsed = $this->parseMsg( $error );
*/
public function dieUsageMsgOrDebug( $error ) {
global $wgDebugAPI;
- if( $wgDebugAPI !== true ) {
+ if ( $wgDebugAPI !== true ) {
$this->dieUsageMsg( $error );
} else {
- if( is_string( $error ) ) {
+ if ( is_string( $error ) ) {
$error = array( $error );
}
$parsed = $this->parseMsg( $error );
// Check whether the error array was nested
// array( array( <code>, <params> ), array( <another_code>, <params> ) )
- if( is_array( $key ) ) {
+ if ( is_array( $key ) ) {
$error = $key;
$key = array_shift( $error );
}
/**
* Returns a list of all possible errors returned by the module
+ *
+ * Don't call this function directly: use getFinalPossibleErrors() to allow
+ * hooks to modify parameters as needed.
+ *
* @return array in the format of array( key, param1, param2, ... ) or array( 'code' => ..., 'info' => ... )
*/
public function getPossibleErrors() {
return $ret;
}
+ /**
+ * Get final list of possible errors, after hooks have had a chance to
+ * tweak it as needed.
+ *
+ * @return array
+ * @since 1.22
+ */
+ public function getFinalPossibleErrors() {
+ $possibleErrors = $this->getPossibleErrors();
+ wfRunHooks( 'APIGetPossibleErrors', array( $this, &$possibleErrors ) );
+ return $possibleErrors;
+ }
+
/**
* Parses a list of errors into a standardised format
* @param array $errors List of errors. Items can be in the for array( key, param1, param2, ... ) or array( 'code' => ..., 'info' => ... )
$res['userID'] = $target instanceof User ? $target->getId() : 0;
$block = Block::newFromTarget( $target );
- if( $block instanceof Block ) {
+ if ( $block instanceof Block ) {
$res['expiry'] = $block->mExpiry == $this->getDB()->getInfinity()
? 'infinite'
: wfTimestamp( TS_ISO_8601, $block->mExpiry );
* @return int
*/
private function revisionOrTitleOrId( $revision, $titleText, $titleId ) {
- if( $revision ) {
+ if ( $revision ) {
return $revision;
- } elseif( $titleText ) {
+ } elseif ( $titleText ) {
$title = Title::newFromText( $titleText );
- if( !$title || $title->isExternal() ) {
+ if ( !$title || $title->isExternal() ) {
$this->dieUsageMsg( array( 'invalidtitle', $titleText ) );
}
return $title->getLatestRevID();
} elseif ( $titleId ) {
$title = Title::newFromID( $titleId );
- if( !$title ) {
+ if ( !$title ) {
$this->dieUsageMsg( array( 'nosuchpageid', $titleId ) );
}
return $title->getLatestRevID();
wfSetupSession();
}
- if( $params['mailpassword'] && !$params['email'] ) {
+ if ( $params['mailpassword'] && !$params['email'] ) {
$this->dieUsageMsg( 'noemail' );
}
$status = $loginForm->addNewaccountInternal();
$result = array();
- if( $status->isGood() ) {
+ if ( $status->isGood() ) {
// Success!
global $wgEmailAuthentication;
$user = $status->getValue();
- if( $params['language'] ) {
+ if ( $params['language'] ) {
$user->setOption( 'language', $params['language'] );
}
- if( $params['mailpassword'] ) {
+ if ( $params['mailpassword'] ) {
// If mailpassword was set, disable the password and send an email.
$user->setPassword( null );
$status->merge( $loginForm->mailPasswordInternal( $user, false, 'createaccount-title', 'createaccount-text' ) );
- } elseif( $wgEmailAuthentication && Sanitizer::validateEmail( $user->getEmail() ) ) {
+ } elseif ( $wgEmailAuthentication && Sanitizer::validateEmail( $user->getEmail() ) ) {
// Send out an email authentication message if needed
$status->merge( $user->sendConfirmationMail() );
}
$apiResult = $this->getResult();
- if( $status->hasMessage( 'sessionfailure' ) || $status->hasMessage( 'nocookiesfornew' ) ) {
+ if ( $status->hasMessage( 'sessionfailure' ) || $status->hasMessage( 'nocookiesfornew' ) ) {
// Token was incorrect, so add it to result, but don't throw an exception
// since not having the correct token is part of the normal
// flow of events.
$result['token'] = LoginForm::getCreateaccountToken();
$result['result'] = 'needtoken';
- } elseif( !$status->isOK() ) {
+ } elseif ( !$status->isOK() ) {
// There was an error. Die now.
// Cannot use dieUsageMsg() directly because extensions
// might return custom error messages.
$errors = $status->getErrorsArray();
- if( $errors[0] instanceof Message ) {
+ if ( $errors[0] instanceof Message ) {
$code = 'aborted';
$desc = $errors[0];
} else {
$desc = wfMessage( $code, $errors[0] );
}
$this->dieUsage( $desc, $code );
- } elseif( !$status->isGood() ) {
+ } elseif ( !$status->isGood() ) {
// Status is not good, but OK. This means warnings.
$result['result'] = 'warning';
// Add any warnings to the result
$warnings = $status->getErrorsByType( 'warning' );
- if( $warnings ) {
- foreach( $warnings as &$warning ) {
+ if ( $warnings ) {
+ foreach ( $warnings as &$warning ) {
$apiResult->setIndexedTagName( $warning['params'], 'param' );
}
$apiResult->setIndexedTagName( $warnings, 'warning' );
$errors = parent::getPossibleErrors();
// All local errors are from LoginForm, which means they're actually message keys.
- foreach( $localErrors as $error ) {
+ foreach ( $localErrors as $error ) {
$errors[] = array( 'code' => $error, 'info' => wfMessage( $error )->parse() );
}
global $wgFeed, $wgFeedClasses, $wgSitename, $wgLanguageCode;
- if( !$wgFeed ) {
+ if ( !$wgFeed ) {
$this->dieUsage( 'Syndication feeds are not available', 'feed-unavailable' );
}
- if( !isset( $wgFeedClasses[$params['feedformat']] ) ) {
+ if ( !isset( $wgFeedClasses[$params['feedformat']] ) ) {
$this->dieUsage( 'Invalid subscription feed type', 'feed-invalid' );
}
) );
$feedItems = array();
- if( $pager->getNumRows() > 0 ) {
+ if ( $pager->getNumRows() > 0 ) {
foreach ( $pager->mResult as $row ) {
$feedItems[] = $this->feedItem( $row );
}
protected function feedItem( $row ) {
$title = Title::makeTitle( intval( $row->page_namespace ), $row->page_title );
- if( $title ) {
+ if( $title && $title->userCan( 'read' ) ) {
$date = $row->rev_timestamp;
$comments = $title->getTalkPage()->getFullURL();
$revision = Revision::newFromRow( $row );
$this->feedItemAuthor( $revision ),
$comments
);
- } else {
- return null;
}
+ return null;
}
/**
* @return string
*/
protected function feedItemDesc( $revision ) {
- if( $revision ) {
+ if ( $revision ) {
$msg = wfMessage( 'colon-separator' )->inContentLanguage()->text();
$content = $revision->getContent();
try {
$params = $this->extractRequestParams();
- if( !$wgFeed ) {
+ if ( !$wgFeed ) {
$this->dieUsage( 'Syndication feeds are not available', 'feed-unavailable' );
}
- if( !isset( $wgFeedClasses[$params['feedformat']] ) ) {
+ if ( !isset( $wgFeedClasses[$params['feedformat']] ) ) {
$this->dieUsage( 'Invalid subscription feed type', 'feed-invalid' );
}
*/
private static function addValues( array &$result, $values, $flag = null, $name = null ) {
foreach ( $values as $val ) {
- if( $val instanceof Title ) {
+ if ( $val instanceof Title ) {
$v = array();
ApiQueryBase::addTitleInfo( $v, $val );
- } elseif( $name !== null ) {
+ } elseif ( $name !== null ) {
$v = array( $name => $val );
} else {
$v = $val;
}
- if( $flag !== null ) {
+ if ( $flag !== null ) {
$v[$flag] = '';
}
$result[] = $v;
$pageSet = $this->getPageSet();
return array_merge(
parent::getPossibleErrors(),
- $pageSet->getPossibleErrors()
+ $pageSet->getFinalPossibleErrors()
);
}
}
if ( isset( $params['rootpage'] ) ) {
$statusRootPage = $importer->setTargetRootPage( $params['rootpage'] );
- if( !$statusRootPage->isGood() ) {
+ if ( !$statusRootPage->isGood() ) {
$this->dieUsageMsg( $statusRootPage->getErrorsArray() );
}
}
// Allow extensions to stop execution for arbitrary reasons.
$message = false;
- if( !wfRunHooks( 'ApiCheckCanExecute', array( $module, $user, &$message ) ) ) {
+ if ( !wfRunHooks( 'ApiCheckCanExecute', array( $module, $user, &$message ) ) ) {
$this->dieUsageMsg( $message );
}
}
$unusedParams = array_diff( $allParams, $paramsUsed );
}
- if( count( $unusedParams ) ) {
+ if ( count( $unusedParams ) ) {
$s = count( $unusedParams ) > 1 ? 's' : '';
$this->setWarning( "Unrecognized parameter$s: '" . implode( $unusedParams, "', '" ) . "'" );
}
*/
protected function printResult( $isError ) {
global $wgDebugAPI;
- if( $wgDebugAPI !== false ) {
+ if ( $wgDebugAPI !== false ) {
$this->setWarning( 'SECURITY WARNING: $wgDebugAPI is enabled' );
}
ApiBase::PARAM_DFLT => 'help',
ApiBase::PARAM_TYPE => $this->mModuleMgr->getNames( 'action' )
),
- 'maxlag' => array(
+ 'maxlag' => array(
ApiBase::PARAM_TYPE => 'integer'
),
'smaxage' => array(
ApiBase::PARAM_DFLT => 0
),
'requestid' => null,
- 'servedby' => false,
+ 'servedby' => false,
'origin' => null,
);
}
$r['redirectcreated'] = '';
}
- if( $toTitleExists ) {
+ if ( $toTitleExists ) {
$r['moveoverredirect'] = '';
}
if ( $retval === true ) {
$r['talkfrom'] = $fromTalk->getPrefixedText();
$r['talkto'] = $toTalk->getPrefixedText();
- if( $toTalkExists ) {
+ if ( $toTalkExists ) {
$r['talkmoveoverredirect'] = '';
}
} else {
}
// Errors
- $retval['errors'] = $this->parseErrors( $obj->getPossibleErrors() );
+ $retval['errors'] = $this->parseErrors( $obj->getFinalPossibleErrors() );
$result->setIndexedTagName( $retval['errors'], 'error' );
return $retval;
*/
private static function addValues( array &$result, $values, $flag = null, $name = null ) {
foreach ( $values as $val ) {
- if( $val instanceof Title ) {
+ if ( $val instanceof Title ) {
$v = array();
ApiQueryBase::addTitleInfo( $v, $val );
- } elseif( $name !== null ) {
+ } elseif ( $name !== null ) {
$v = array( $name => $val );
} else {
$v = $val;
}
- if( $flag !== null ) {
+ if ( $flag !== null ) {
$v[$flag] = '';
}
$result[] = $v;
public function getPossibleErrors() {
return array_merge(
parent::getPossibleErrors(),
- $this->getPageSet()->getPossibleErrors()
+ $this->getPageSet()->getFinalPossibleErrors()
);
}
public function getPossibleErrors() {
return array_merge(
parent::getPossibleErrors(),
- $this->getPageSet()->getPossibleErrors()
+ $this->getPageSet()->getFinalPossibleErrors()
);
}
foreach ( $messages_target as $message ) {
// === 0: must be at beginning of string (position 0)
if ( strpos( $message, $params['prefix'] ) === 0 ) {
- if( !$skip ) {
+ if ( !$skip ) {
$skip = true;
}
$messages_filtered[] = $message;
$res = $this->select( __METHOD__ );
//Get gender information
- if( MWNamespace::hasGenderDistinction( $params['namespace'] ) ) {
+ if ( MWNamespace::hasGenderDistinction( $params['namespace'] ) ) {
$users = array();
foreach ( $res as $row ) {
$users[] = $row->page_title;
if ( !is_null( $params['rights'] ) && count( $params['rights'] ) ) {
$groups = array();
- foreach( $params['rights'] as $r ) {
+ foreach ( $params['rights'] as $r ) {
$groups = array_merge( $groups, User::getGroupsWithPermission( $r ) );
}
// no group with the given right(s) exists, no need for a query
- if( !count( $groups ) ) {
+ if ( !count( $groups ) ) {
$this->getResult()->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), '' );
return;
}
$orderBy = array();
$sort = ( $this->params['dir'] == 'descending' ? ' DESC' : '' );
// Don't order by namespace/title if it's constant in the WHERE clause
- if( $this->hasNS && count( array_unique( $allRedirNs ) ) != 1 ) {
+ if ( $this->hasNS && count( array_unique( $allRedirNs ) ) != 1 ) {
$orderBy[] = $this->bl_ns . $sort;
}
- if( count( array_unique( $allRedirDBkey ) ) != 1 ) {
+ if ( count( array_unique( $allRedirDBkey ) ) != 1 ) {
$orderBy[] = $this->bl_title . $sort;
}
$orderBy[] = $this->bl_from . $sort;
list( $ip, $range ) = IP::parseCIDR( $params['ip'] );
if ( $ip && $range ) {
// We got a CIDR range
- if ( $range < 16 )
+ if ( $range < 16 ) {
$this->dieUsage( 'CIDR ranges broader than /16 are not accepted', 'cidrtoobroad' );
+ }
$lower = wfBaseConvert( $ip, 10, 16, 8, false );
$upper = wfBaseConvert( $ip + pow( 2, 32 - $range ) - 1, 10, 16, 8, false );
} else {
if ( $mode == 'revs' || $mode == 'user' ) {
// Ignore namespace and unique due to inability to know whether they were purposely set
- foreach( array( 'from', 'to', 'prefix', /*'namespace', 'unique'*/ ) as $p ) {
+ foreach ( array( 'from', 'to', 'prefix', /*'namespace', 'unique'*/ ) as $p ) {
if ( !is_null( $params[$p] ) ) {
$this->dieUsage( "The '{$p}' parameter cannot be used in modes 1 or 2", 'badparams' );
}
}
} else {
- foreach( array( 'start', 'end' ) as $p ) {
+ foreach ( array( 'start', 'end' ) as $p ) {
if ( !is_null( $params[$p] ) ) {
$this->dieUsage( "The {$p} parameter cannot be used in mode 3", 'badparams' );
}
}
$images = $namespaces[NS_FILE];
- if( $params['dir'] == 'descending' ) {
+ if ( $params['dir'] == 'descending' ) {
$images = array_reverse( $images );
}
}
$filesToFind = array_keys( $images );
- if( $params['localonly'] ) {
+ if ( $params['localonly'] ) {
$files = RepoGroup::singleton()->getLocalRepo()->findFiles( $filesToFind );
} else {
$files = RepoGroup::singleton()->findFiles( $filesToFind );
// find all files with the hashes, result format is: array( hash => array( dup1, dup2 ), hash1 => ... )
$filesToFindBySha1s = array_unique( array_values( $sha1s ) );
- if( $params['localonly'] ) {
+ if ( $params['localonly'] ) {
$filesBySha1s = RepoGroup::singleton()->getLocalRepo()->findBySha1s( $filesToFindBySha1s );
} else {
$filesBySha1s = RepoGroup::singleton()->findBySha1s( $filesToFindBySha1s );
}
// iterate over $images to handle continue param correct
- foreach( $images as $image => $pageId ) {
- if( !isset( $sha1s[$image] ) ) {
+ foreach ( $images as $image => $pageId ) {
+ if ( !isset( $sha1s[$image] ) ) {
continue; //file does not exist
}
$sha1 = $sha1s[$image];
$dupFiles = $filesBySha1s[$sha1];
- if( $params['dir'] == 'descending' ) {
+ if ( $params['dir'] == 'descending' ) {
$dupFiles = array_reverse( $dupFiles );
}
/** @var $dupFile File */
foreach ( $dupFiles as $dupFile ) {
$dupName = $dupFile->getName();
- if( $image == $dupName && $dupFile->isLocal() ) {
+ if ( $image == $dupName && $dupFile->isLocal() ) {
continue; //ignore the local file itself
}
- if( $skipUntilThisDup !== false && $dupName < $skipUntilThisDup ) {
+ if ( $skipUntilThisDup !== false && $dupName < $skipUntilThisDup ) {
continue; //skip to pos after the image from continue param
}
$skipUntilThisDup = false;
'user' => $dupFile->getUser( 'text' ),
'timestamp' => wfTimestamp( TS_ISO_8601, $dupFile->getTimestamp() )
);
- if( !$dupFile->isLocal() ) {
+ if ( !$dupFile->isLocal() ) {
$r['shared'] = '';
}
$fit = $this->addPageSubItem( $pageId, $r );
}
}
}
- if( !$fit ) {
+ if ( !$fit ) {
break;
}
}
if ( $fld_url ) {
$to = $row->el_to;
// expand protocol-relative urls
- if( $params['expandurl'] ) {
+ if ( $params['expandurl'] ) {
$to = wfExpandUrl( $to, PROTO_CANONICAL );
}
$vals['url'] = $to;
$entry = array();
$to = $row->el_to;
// expand protocol-relative urls
- if( $params['expandurl'] ) {
+ if ( $params['expandurl'] ) {
$to = wfExpandUrl( $to, PROTO_CANONICAL );
}
ApiResult::setContent( $entry, $to );
$result = $this->getResult();
//search only inside the local repo
- if( $params['localonly'] ) {
+ if ( $params['localonly'] ) {
$images = RepoGroup::singleton()->getLocalRepo()->findFiles( $titles );
} else {
$images = RepoGroup::singleton()->findFiles( $titles );
$pageSet->requestField( 'page_restrictions' );
// when resolving redirects, no page will have this field
- if( !$pageSet->isResolvingRedirects() ) {
+ if ( !$pageSet->isResolvingRedirects() ) {
$pageSet->requestField( 'page_is_redirect' );
}
$pageSet->requestField( 'page_is_new' );
$this->protections[$title->getNamespace()][$title->getDBkey()][] = $a;
}
// Also check old restrictions
- foreach( $this->titles as $pageId => $title ) {
+ foreach ( $this->titles as $pageId => $title ) {
if ( $this->pageRestrictions[$pageId] ) {
$namespace = $title->getNamespace();
$dbKey = $title->getDBkey();
break;
case 'rights':
$vals2 = array();
- if( $legacy ) {
+ if ( $legacy ) {
list( $vals2['old'], $vals2['new'] ) = $params;
} else {
$vals2['new'] = implode( ', ', $params['5::newgroups'] );
global $wgQueryPages;
$this->qpMap = array();
foreach ( $wgQueryPages as $page ) {
- if( !in_array( $page[1], $this->uselessQueryPages ) ) {
+ if ( !in_array( $page[1], $this->uselessQueryPages ) ) {
$this->qpMap[$page[1]] = $page[0];
}
}
}
if ( is_null( $matches ) ) {
$this->dieUsage( "{$what} search is disabled", "search-{$what}-disabled" );
+ } elseif( $matches instanceof Status && !$matches->isGood() ) {
+ $this->dieUsage( $matches->getWikiText(), 'search-error' );
}
$apiResult = $this->getResult();
return array_merge( parent::getPossibleErrors(), array(
array( 'code' => 'search-text-disabled', 'info' => 'text search is disabled' ),
array( 'code' => 'search-title-disabled', 'info' => 'title search is disabled' ),
+ array( 'code' => 'search-error', 'info' => 'search error has occurred' ),
) );
}
$data['lang'] = $GLOBALS['wgLanguageCode'];
$fallbacks = array();
- foreach( $wgContLang->getFallbackLanguages() as $code ) {
+ foreach ( $wgContLang->getFallbackLanguages() as $code ) {
$fallbacks[] = array( 'code' => $code );
}
$data['fallback'] = $fallbacks;
$this->getResult()->setIndexedTagName( $data['fallback'], 'lang' );
- if( $wgContLang->hasVariants() ) {
+ if ( $wgContLang->hasVariants() ) {
$variants = array();
- foreach( $wgContLang->getVariants() as $code ) {
+ foreach ( $wgContLang->getVariants() as $code ) {
$variants[] = array( 'code' => $code );
}
$data['variants'] = $variants;
$val['language'] = $langNames[$prefix];
}
$val['url'] = wfExpandUrl( $row['iw_url'], PROTO_CURRENT );
- if( isset( $row['iw_wikiid'] ) ) {
+ if ( isset( $row['iw_wikiid'] ) ) {
$val['wikiid'] = $row['iw_wikiid'];
}
- if( isset( $row['iw_api'] ) ) {
+ if ( isset( $row['iw_api'] ) ) {
$val['api'] = $row['iw_api'];
}
$data = array(
'url' => $url ? $url : '',
- 'text' => $text ? $text : ''
+ 'text' => $text ? $text : ''
);
return $this->getResult()->addValue( 'query', $property, $data );
// Do the actual query.
$res = $this->select( __METHOD__ );
- if( $this->fld_sizediff ) {
+ if ( $this->fld_sizediff ) {
$revIds = array();
foreach ( $res as $row ) {
- if( $row->rev_parent_id ) {
+ if ( $row->rev_parent_id ) {
$revIds[] = $row->rev_parent_id;
}
}
$this->addFieldsIf( 'rev_comment', $this->fld_comment || $this->fld_parsedcomment );
$this->addFieldsIf( 'rev_len', $this->fld_size || $this->fld_sizediff );
$this->addFieldsIf( 'rev_minor_edit', $this->fld_flags );
- $this->addFieldsIf( 'rev_parent_id', $this->fld_flags || $this->fld_sizediff );
+ $this->addFieldsIf( 'rev_parent_id', $this->fld_flags || $this->fld_sizediff || $this->fld_ids );
$this->addFieldsIf( 'rc_patrolled', $this->fld_patrolled );
if ( $this->fld_tags ) {
$vals['pageid'] = intval( $row->rev_page );
$vals['revid'] = intval( $row->rev_id );
// $vals['textid'] = intval( $row->rev_text_id ); // todo: Should this field be exposed?
+
+ if ( !is_null( $row->rev_parent_id ) ) {
+ $vals['parentid'] = intval( $row->rev_parent_id );
+ }
}
$title = Title::makeTitle( $row->page_namespace, $row->page_title );
),
'ids' => array(
'pageid' => 'integer',
- 'revid' => 'integer'
+ 'revid' => 'integer',
+ 'parentid' => array(
+ ApiBase::PROP_TYPE => 'integer',
+ ApiBase::PROP_NULLABLE => true
+ )
),
'title' => array(
'ns' => 'namespace',
if ( $user->isNewbie() ) {
$categories[] = 'ip';
$categories[] = 'subnet';
- if ( !$user->isAnon() )
+ if ( !$user->isAnon() ) {
$categories[] = 'newbie';
+ }
}
$categories = array_merge( $categories, $user->getGroups() );
$this->addFields( array( 'user_name', 'ug_group' ) );
$userGroupsRes = $this->select( __METHOD__ );
- foreach( $userGroupsRes as $row ) {
+ foreach ( $userGroupsRes as $row ) {
$userGroups[$row->user_name][] = $row->ug_group;
}
}
$ps = $this->getPageSet();
return array_merge(
parent::getPossibleErrors(),
- $ps->getPossibleErrors(),
+ $ps->getFinalPossibleErrors(),
$this->getRequireMaxOneParameterErrorMessages(
array( 'timestamp', 'torevid', 'newerthanrevid' ) ),
$this->getRequireOnlyOneParameterErrorMessages(
$this->mParams['chunk'] = $request->getFileName( 'chunk' );
// Copy the session key to the file key, for backward compatibility.
- if( !$this->mParams['filekey'] && $this->mParams['sessionkey'] ) {
+ if ( !$this->mParams['filekey'] && $this->mParams['sessionkey'] ) {
$this->mParams['filekey'] = $this->mParams['sessionkey'];
}
// Check if the uploaded file is sane
if ( $this->mParams['chunk'] ) {
$maxSize = $this->mUpload->getMaxUploadSize();
- if( $this->mParams['filesize'] > $maxSize ) {
+ if ( $this->mParams['filesize'] > $maxSize ) {
$this->dieUsage( 'The file you submitted was too large', 'file-too-large' );
}
if ( !$this->mUpload->getTitle() ) {
if ( $this->mParams['chunk'] ) {
// Chunk upload
$this->mUpload = new UploadFromChunks();
- if( isset( $this->mParams['filekey'] ) ) {
+ if ( isset( $this->mParams['filekey'] ) ) {
// handle new chunk
$this->mUpload->continueChunks(
$this->mParams['filename'],
*
* @file
* @author Tim Starling
+ * @author Aaron Schulz
* @copyright © 2009, Tim Starling, Domas Mituzas
* @copyright © 2010, Max Sem
* @copyright © 2011, Antoine Musso
self::$cache = new ProcessCacheLRU( 1 );
}
$dbKey = $title->getPrefixedDBkey();
- if ( !self::$cache->has( $dbKey, 'obj' ) ) {
+ if ( !self::$cache->has( $dbKey, 'obj', 3600 ) ) {
self::$cache->set( $dbKey, 'obj', new self( $title ) );
}
return self::$cache->get( $dbKey, 'obj' );
if ( !isset( $this->db ) ) {
$this->db = wfGetDB( DB_SLAVE );
}
-
return $this->db;
}
/**
* Get the backlinks for a given table. Cached in process memory only.
* @param $table String
- * @param $startId Integer or false
- * @param $endId Integer or false
+ * @param $startId Integer|false
+ * @param $endId Integer|false
+ * @param $max Integer|INF
* @return TitleArrayFromResult
*/
- public function getLinks( $table, $startId = false, $endId = false ) {
+ public function getLinks( $table, $startId = false, $endId = false, $max = INF ) {
+ return TitleArray::newFromResult( $this->queryLinks( $table, $startId, $endId, $max ) );
+ }
+
+ /**
+ * Get the backlinks for a given table. Cached in process memory only.
+ * @param $table String
+ * @param $startId Integer|false
+ * @param $endId Integer|false
+ * @param $max Integer|INF
+ * @return ResultWrapper
+ */
+ protected function queryLinks( $table, $startId, $endId, $max ) {
wfProfileIn( __METHOD__ );
$fromField = $this->getPrefix( $table ) . '_from';
- if ( $startId || $endId ) {
- // Partial range, not cached
- wfDebug( __METHOD__ . ": from DB (uncacheable range)\n" );
+ if ( !$startId && !$endId && is_infinite( $max )
+ && isset( $this->fullResultCache[$table] ) )
+ {
+ wfDebug( __METHOD__ . ": got results from cache\n" );
+ $res = $this->fullResultCache[$table];
+ } else {
+ wfDebug( __METHOD__ . ": got results from DB\n" );
$conds = $this->getConditions( $table );
-
// Use the from field in the condition rather than the joined page_id,
// because databases are stupid and don't necessarily propagate indexes.
if ( $startId ) {
$conds[] = "$fromField >= " . intval( $startId );
}
-
if ( $endId ) {
$conds[] = "$fromField <= " . intval( $endId );
}
+ $options = array( 'STRAIGHT_JOIN', 'ORDER BY' => $fromField );
+ if ( is_finite( $max ) && $max > 0 ) {
+ $options['LIMIT'] = $max;
+ }
$res = $this->getDB()->select(
array( $table, 'page' ),
array( 'page_namespace', 'page_title', 'page_id' ),
$conds,
__METHOD__,
- array(
- 'STRAIGHT_JOIN',
- 'ORDER BY' => $fromField
- ) );
- $ta = TitleArray::newFromResult( $res );
-
- wfProfileOut( __METHOD__ );
- return $ta;
- }
+ $options
+ );
- // @todo FIXME: Make this a function?
- if ( !isset( $this->fullResultCache[$table] ) ) {
- wfDebug( __METHOD__ . ": from DB\n" );
- $res = $this->getDB()->select(
- array( $table, 'page' ),
- array( 'page_namespace', 'page_title', 'page_id' ),
- $this->getConditions( $table ),
- __METHOD__,
- array(
- 'STRAIGHT_JOIN',
- 'ORDER BY' => $fromField,
- ) );
- $this->fullResultCache[$table] = $res;
+ if ( !$startId && !$endId && $res->numRows() < $max ) {
+ // The full results fit within the limit, so cache them
+ $this->fullResultCache[$table] = $res;
+ } else {
+ wfDebug( __METHOD__ . ": results from DB were uncacheable\n" );
+ }
}
- $ta = TitleArray::newFromResult( $this->fullResultCache[$table] );
-
wfProfileOut( __METHOD__ );
- return $ta;
+ return $res;
}
/**
} else {
$prefix = null;
wfRunHooks( 'BacklinkCacheGetPrefix', array( $table, &$prefix ) );
- if( $prefix ) {
+ if ( $prefix ) {
return $prefix;
} else {
throw new MWException( "Invalid table \"$table\" in " . __CLASS__ );
default:
$conds = null;
wfRunHooks( 'BacklinkCacheGetConditions', array( $table, $this->title, &$conds ) );
- if( !$conds ) {
+ if ( !$conds ) {
throw new MWException( "Invalid table \"$table\" in " . __CLASS__ );
}
}
/**
* Get the approximate number of backlinks
* @param $table String
- * @param $max integer Only count up to this many backlinks
+ * @param $max integer|INF Only count up to this many backlinks
* @return integer
*/
public function getNumLinks( $table, $max = INF ) {
}
// 4) fetch from the database ...
- if ( is_infinite( $max ) ) { // full count
- $count = $this->getLinks( $table )->count();
+ $count = $this->getLinks( $table, false, false, $max )->count();
+ if ( $count < $max ) { // full count
$wgMemc->set( $memcKey, $count, self::CACHE_EXPIRY );
- } else { // with limit
- $count = $this->getDB()->select(
- array( $table, 'page' ),
- '1',
- $this->getConditions( $table ),
- __METHOD__,
- array( 'LIMIT' => $max )
- )->numRows();
}
- return $count;
+ return min( $max, $count );
}
/**
}
// 4) ... finally fetch from the slow database :(
- $this->getLinks( $table );
- $cacheEntry = $this->partitionResult( $this->fullResultCache[$table], $batchSize );
+ $cacheEntry = array( 'numRows' => 0, 'batches' => array() ); // final result
+ // Do the selects in batches to avoid client-side OOMs (bug 43452).
+ // Use a LIMIT that plays well with $batchSize to keep equal sized partitions.
+ $selectSize = max( $batchSize, 200000 - ( 200000 % $batchSize ) );
+ $start = false;
+ do {
+ $res = $this->queryLinks( $table, $start, false, $selectSize );
+ $partitions = $this->partitionResult( $res, $batchSize, false );
+ // Merge the link count and range partitions for this chunk
+ $cacheEntry['numRows'] += $partitions['numRows'];
+ $cacheEntry['batches'] = array_merge( $cacheEntry['batches'], $partitions['batches'] );
+ if ( count( $partitions['batches'] ) ) {
+ list( $lStart, $lEnd ) = end( $partitions['batches'] );
+ $start = $lEnd + 1; // pick up after this inclusive range
+ }
+ } while ( $partitions['numRows'] >= $selectSize );
+ // Make sure the first range has start=false and the last one has end=false
+ if ( count( $cacheEntry['batches'] ) ) {
+ $cacheEntry['batches'][0][0] = false;
+ $cacheEntry['batches'][count( $cacheEntry['batches'] ) - 1][1] = false;
+ }
+
// Save partitions to memcached
$wgMemc->set( $memcKey, $cacheEntry, self::CACHE_EXPIRY );
* Partition a DB result with backlinks in it into batches
* @param $res ResultWrapper database result
* @param $batchSize integer
+ * @param $isComplete bool Whether $res includes all the backlinks
* @throws MWException
- * @return array @see
+ * @return array
*/
- protected function partitionResult( $res, $batchSize ) {
+ protected function partitionResult( $res, $batchSize, $isComplete = true ) {
$batches = array();
$numRows = $res->numRows();
$numBatches = ceil( $numRows / $batchSize );
for ( $i = 0; $i < $numBatches; $i++ ) {
- if ( $i == 0 ) {
+ if ( $i == 0 && $isComplete ) {
$start = false;
} else {
- $rowNum = intval( $numRows * $i / $numBatches );
+ $rowNum = $i * $batchSize;
$res->seek( $rowNum );
$row = $res->fetchObject();
- $start = $row->page_id;
+ $start = (int)$row->page_id;
}
- if ( $i == $numBatches - 1 ) {
+ if ( $i == ( $numBatches - 1 ) && $isComplete ) {
$end = false;
} else {
- $rowNum = intval( $numRows * ( $i + 1 ) / $numBatches );
+ $rowNum = min( $numRows - 1, ( $i + 1 ) * $batchSize - 1 );
$res->seek( $rowNum );
$row = $res->fetchObject();
- $end = $row->page_id - 1;
+ $end = (int)$row->page_id;
}
# Sanity check order
* @return bool
*/
function isExpired() {
- if( !isset( $GLOBALS[$this->name] ) ) {
+ if ( !isset( $GLOBALS[$this->name] ) ) {
return true;
}
return $GLOBALS[$this->name] != $this->value;
* @return string
*/
public function fetchText() {
- if( $this->useGzip() ) {
+ if ( $this->useGzip() ) {
$fh = gzopen( $this->cachePath(), 'rb' );
return stream_get_contents( $fh );
} else {
public function getGenderOf( $username, $caller = '' ) {
global $wgUser;
- if( $username instanceof User ) {
+ if ( $username instanceof User ) {
$username = $username->getName();
}
$username = self::normalizeUsername( $username );
if ( !isset( $this->cache[$username] ) ) {
-
if ( $this->misses >= $this->missLimit && $wgUser->getName() !== $username ) {
- if( $this->misses === $this->missLimit ) {
+ if ( $this->misses === $this->missLimit ) {
$this->misses++;
wfDebug( __METHOD__ . ": too many misses, returning default onwards\n" );
}
$this->misses++;
$this->doQuery( $username, $caller );
}
-
}
/* Undefined if there is a valid username which for some reason doesn't
public function doLinkBatch( $data, $caller = '' ) {
$users = array();
foreach ( $data as $ns => $pagenames ) {
- if ( !MWNamespace::hasGenderDistinction( $ns ) ) continue;
+ if ( !MWNamespace::hasGenderDistinction( $ns ) ) {
+ continue;
+ }
foreach ( array_keys( $pagenames ) as $username ) {
$users[$username] = true;
}
// For existing users, this value will be overwritten by the correct value
$this->cache[$name] = $default;
// query only for valid names, which can be in the database
- if( User::isValidUserName( $name ) ) {
+ if ( User::isValidUserName( $name ) ) {
$usersToCheck[] = $name;
}
}
JobQueueGroup::singleton()->push( $job );
JobQueueGroup::singleton()->deduplicateRootJob( $job );
} else { // few backlinks ($count might be off even if 0)
- $job->run(); // just do the purge query now
+ $dbw = wfGetDB( DB_MASTER );
+ $dbw->onTransactionIdle( function() use ( $job ) {
+ $job->run(); // just do the purge query now
+ } );
}
wfProfileOut( __METHOD__ );
protected $caller;
function __construct( $arr = array() ) {
- foreach( $arr as $item ) {
+ foreach ( $arr as $item ) {
$this->addObj( $item );
}
}
unset( $this->mGoodLinkFields[$dbkey] );
}
- public function getGoodLinks() { return $this->mGoodLinks; }
- public function getBadLinks() { return array_keys( $this->mBadLinks ); }
+ public function getGoodLinks() {
+ return $this->mGoodLinks;
+ }
+
+ public function getBadLinks() {
+ return array_keys( $this->mBadLinks );
+ }
/**
* Add a title to the link cache, return the page_id or zero if non-existent
*/
public function addLink( $title ) {
$nt = Title::newFromDBkey( $title );
- if( $nt ) {
+ if ( $nt ) {
return $this->addLinkObj( $nt );
} else {
return 0;
}
$f = array( 'page_id', 'page_len', 'page_is_redirect', 'page_latest' );
- if ( $wgContentHandlerUseDB ) $f[] = 'page_content_model';
+ if ( $wgContentHandlerUseDB ) {
+ $f[] = 'page_content_model';
+ }
$s = $db->selectRow( 'page', $f,
array( 'page_namespace' => $nt->getNamespace(), 'page_title' => $nt->getDBkey() ),
function load( $code = false ) {
global $wgUseLocalMessageCache;
- if( !is_string( $code ) ) {
+ if ( !is_string( $code ) ) {
# This isn't really nice, so at least make a note about it and try to
# fall back
wfDebug( __METHOD__ . " called without providing a language code\n" );
static function purge( $urlArr ) {
global $wgSquidServers, $wgHTCPMulticastRouting;
- if( !$urlArr ) {
+ if ( !$urlArr ) {
return;
}
$htcpOpCLR = 4; // HTCP CLR
// @todo FIXME: PHP doesn't support these socket constants (include/linux/in.h)
- if( !defined( "IPPROTO_IP" ) ) {
+ if ( !defined( "IPPROTO_IP" ) ) {
define( "IPPROTO_IP", 0 );
define( "IP_MULTICAST_LOOP", 34 );
define( "IP_MULTICAST_TTL", 33 );
if ( $conn ) {
// Set socket options
socket_set_option( $conn, IPPROTO_IP, IP_MULTICAST_LOOP, 0 );
- if ( $wgHTCPMulticastTTL != 1 )
+ if ( $wgHTCPMulticastTTL != 1 ) {
socket_set_option( $conn, IPPROTO_IP, IP_MULTICAST_TTL,
$wgHTCPMulticastTTL );
+ }
$urlArr = array_unique( $urlArr ); // Remove duplicates
foreach ( $urlArr as $url ) {
- if( !is_string( $url ) ) {
+ if ( !is_string( $url ) ) {
wfProfileOut( __METHOD__ );
throw new MWException( 'Bad purge URL' );
}
$usersToCheck = array();
$usersToQuery = array();
+ $userIds = array_unique( $userIds );
+
foreach ( $userIds as $userId ) {
$userId = (int)$userId;
if ( $userId <= 0 ) {
return call_user_func_array( array( $this->conn, $name ), $arguments );
}
+ /**
+ * @param string $script
+ * @param array $params
+ * @param integer $numKeys
+ * @return mixed
+ * @throws RedisException
+ */
+ public function luaEval( $script, array $params, $numKeys ) {
+ $sha1 = sha1( $script ); // 40 char hex
+ $conn = $this->conn; // convenience
+
+ // Try to run the server-side cached copy of the script
+ $conn->clearLastError();
+ $res = $conn->evalSha( $sha1, $params, $numKeys );
+ // If the script is not in cache, use eval() to retry and cache it
+ if ( preg_match( '/^NOSCRIPT/', $conn->getLastError() ) ) {
+ $conn->clearLastError();
+ $res = $conn->eval( $script, $params, $numKeys );
+ wfDebugLog( 'redis', "Used eval() for Lua script $sha1." );
+ }
+
+ if ( $conn->getLastError() ) { // script bug?
+ wfDebugLog( 'redis', "Lua script error: " . $conn->getLastError() );
+ }
+
+ return $res;
+ }
+
+ /**
+ * @param RedisConnRef $conn
+ * @return bool
+ */
public function isConnIdentical( Redis $conn ) {
return $this->conn === $conn;
}
if ( isset( $handler[1] ) ) {
$info .= '::' . $handler[1];
}
- } else if ( is_object( $handler ) ) {
+ } elseif ( is_object( $handler ) ) {
$info = get_class( $handler[0] );
$info .= '::on' . $event;
} else {
*/
public function exportSession() {
return array(
- 'ip' => $this->getRequest()->getIP(),
- 'headers' => $this->getRequest()->getAllHeaders(),
+ 'ip' => $this->getRequest()->getIP(),
+ 'headers' => $this->getRequest()->getAllHeaders(),
'sessionId' => session_id(),
- 'userId' => $this->getUser()->getId()
+ 'userId' => $this->getUser()->getId()
);
}
* Clone the table structure
*/
public function cloneTableStructure() {
- foreach( $this->tablesToClone as $tbl ) {
+ foreach ( $this->tablesToClone as $tbl ) {
# Clean up from previous aborted run. So that table escaping
# works correctly across DB engines, we need to change the pre-
# fix back and forth so tableName() works right.
self::changePrefix( $this->newTablePrefix );
$newTableName = $this->db->tableName( $tbl, 'raw' );
- if( $this->dropCurrentTables && !in_array( $this->db->getType(), array( 'postgres', 'oracle' ) ) ) {
+ if ( $this->dropCurrentTables && !in_array( $this->db->getType(), array( 'postgres', 'oracle' ) ) ) {
$this->db->dropTable( $tbl, __METHOD__ );
wfDebug( __METHOD__ . " dropping {$newTableName}\n", true );
//Dropping the oldTable because the prefix was changed
* @param bool $dropTables Optionally drop the tables we created
*/
public function destroy( $dropTables = false ) {
- if( $dropTables ) {
+ if ( $dropTables ) {
self::changePrefix( $this->newTablePrefix );
- foreach( $this->tablesToClone as $tbl ) {
+ foreach ( $this->tablesToClone as $tbl ) {
$this->db->dropTable( $tbl );
}
}
protected $mConn = null;
protected $mOpened = false;
- /**
- * @since 1.20
- * @var array of Closure
- */
+ /** @var array of Closure */
protected $mTrxIdleCallbacks = array();
+ /** @var array of Closure */
+ protected $mTrxPreCommitCallbacks = array();
protected $mTablePrefix;
protected $mFlags;
/**
* Returns true if there is a transaction open with possible write
- * queries or transaction idle callbacks waiting on it to finish.
+ * queries or transaction pre-commit/idle callbacks waiting on it to finish.
*
* @return bool
*/
public function writesOrCallbacksPending() {
- return $this->mTrxLevel && ( $this->mTrxDoneWrites || $this->mTrxIdleCallbacks );
+ return $this->mTrxLevel && (
+ $this->mTrxDoneWrites || $this->mTrxIdleCallbacks || $this->mTrxPreCommitCallbacks
+ );
}
/**
$dbType = strtolower( $dbType );
$class = 'Database' . ucfirst( $dbType );
- if( in_array( $dbType, $canonicalDBTypes ) || ( class_exists( $class ) && is_subclass_of( $class, 'DatabaseBase' ) ) ) {
+ if ( in_array( $dbType, $canonicalDBTypes ) || ( class_exists( $class ) && is_subclass_of( $class, 'DatabaseBase' ) ) ) {
return new $class(
isset( $p['host'] ) ? $p['host'] : false,
isset( $p['user'] ) ? $p['user'] : false,
# Transaction is gone, like it or not
$this->mTrxLevel = 0;
$this->mTrxIdleCallbacks = array(); // cancel
+ $this->mTrxPreCommitCallbacks = array(); // cancel
wfDebug( "Connection lost, reconnecting...\n" );
if ( $this->ping() ) {
* @return bool|null
*/
public function indexExists( $table, $index, $fname = 'DatabaseBase::indexExists' ) {
- if( !$this->tableExists( $table ) ) {
+ if ( !$this->tableExists( $table ) ) {
return null;
}
protected function indexName( $index ) {
// Backwards-compatibility hack
$renamed = array(
- 'ar_usertext_timestamp' => 'usertext_timestamp',
- 'un_user_id' => 'user_id',
- 'un_user_ip' => 'user_ip',
+ 'ar_usertext_timestamp' => 'usertext_timestamp',
+ 'un_user_id' => 'user_id',
+ 'un_user_ip' => 'user_ip',
);
if ( isset( $renamed[$index] ) ) {
$rows = array( $rows );
}
- foreach( $rows as $row ) {
+ foreach ( $rows as $row ) {
# Delete rows which collide
if ( $uniqueIndexes ) {
$sql = "DELETE FROM $quotedTable WHERE ";
* If there is a transaction and it is rolled back, then the callback is cancelled.
* Callbacks must commit any transactions that they begin.
*
- * This is useful for updates to different systems or separate transactions are needed.
+ * This is useful for updates to different systems or when separate transactions are needed.
+ * For example, one might want to enqueue jobs into a system outside the database, but only
+ * after the database is updated so that the jobs will see the data when they actually run.
+ * It can also be used for updates that easily cause deadlocks if locks are held too long.
*
+ * @param Closure $callback
* @since 1.20
+ */
+ final public function onTransactionIdle( Closure $callback ) {
+ $this->mTrxIdleCallbacks[] = $callback;
+ if ( !$this->mTrxLevel ) {
+ $this->runOnTransactionIdleCallbacks();
+ }
+ }
+
+ /**
+ * Run an anonymous function before the current transaction commits or now if there is none.
+ * If there is a transaction and it is rolled back, then the callback is cancelled.
+ * Callbacks must not start nor commit any transactions.
+ *
+ * This is useful for updates that easily cause deadlocks if locks are held too long
+ * but where atomicity is strongly desired for these updates and some related updates.
*
* @param Closure $callback
+ * @since 1.22
*/
- final public function onTransactionIdle( Closure $callback ) {
+ final public function onTransactionPreCommitOrIdle( Closure $callback ) {
if ( $this->mTrxLevel ) {
- $this->mTrxIdleCallbacks[] = $callback;
+ $this->mTrxPreCommitCallbacks[] = $callback;
} else {
- $callback();
+ $this->onTransactionIdle( $callback ); // this will trigger immediately
}
}
/**
- * Actually run the "on transaction idle" callbacks.
+ * Actually any "on transaction idle" callbacks.
*
* @since 1.20
*/
}
}
+ /**
+ * Actually any "on transaction pre-commit" callbacks.
+ *
+ * @since 1.22
+ */
+ protected function runOnTransactionPreCommitCallbacks() {
+ $e = null; // last exception
+ do { // callbacks may add callbacks :)
+ $callbacks = $this->mTrxPreCommitCallbacks;
+ $this->mTrxPreCommitCallbacks = array(); // recursion guard
+ foreach ( $callbacks as $callback ) {
+ try {
+ $callback();
+ } catch ( Exception $e ) {}
+ }
+ } while ( count( $this->mTrxPreCommitCallbacks ) );
+
+ if ( $e instanceof Exception ) {
+ throw $e; // re-throw any last exception
+ }
+ }
+
/**
* Begin a transaction. If a transaction is already in progress, that transaction will be committed before the
* new transaction is started.
}
}
+ $this->runOnTransactionPreCommitCallbacks();
$this->doCommit( $fname );
$this->runOnTransactionIdleCallbacks();
}
if ( $flush != 'flush' ) {
if ( !$this->mTrxLevel ) {
wfWarn( "$fname: No transaction to commit, something got out of sync!" );
- } elseif( $this->mTrxAutomatic ) {
+ } elseif ( $this->mTrxAutomatic ) {
wfWarn( "$fname: Explicit commit of implicit transaction. Something may be out of sync!" );
}
} else {
if ( !$this->mTrxLevel ) {
return; // nothing to do
- } elseif( !$this->mTrxAutomatic ) {
+ } elseif ( !$this->mTrxAutomatic ) {
wfWarn( "$fname: Flushing an explicit transaction, getting out of sync!" );
}
}
+ $this->runOnTransactionPreCommitCallbacks();
$this->doCommit( $fname );
$this->runOnTransactionIdleCallbacks();
}
}
$this->doRollback( $fname );
$this->mTrxIdleCallbacks = array(); // cancel
+ $this->mTrxPreCommitCallbacks = array(); // cancel
}
/**
* @since 1.18
*/
public function dropTable( $tableName, $fName = 'DatabaseBase::dropTable' ) {
- if( !$this->tableExists( $tableName, $fName ) ) {
+ if ( !$this->tableExists( $tableName, $fName ) ) {
return false;
}
$sql = "DROP TABLE " . $this->tableName( $tableName );
- if( $this->cascadingDeletes() ) {
+ if ( $this->cascadingDeletes() ) {
$sql .= " CASCADE";
}
return $this->query( $sql, $fName );
}
public function __destruct() {
- if ( count( $this->mTrxIdleCallbacks ) ) { // sanity
- trigger_error( "Transaction idle callbacks still pending." );
+ if ( count( $this->mTrxIdleCallbacks ) || count( $this->mTrxPreCommitCallbacks ) ) {
+ trigger_error( "Transaction idle or pre-commit callbacks still pending." ); // sanity
}
}
}
$connectionInfo = array();
- if( $dbName ) {
+ if ( $dbName ) {
$connectionInfo['Database'] = $dbName;
}
$ntAuthPassTest = strtolower( $password );
// Decide which auth scenerio to use
- if( $ntAuthPassTest == 'ntauth' && $ntAuthUserTest == 'ntauth' ) {
+ if ( $ntAuthPassTest == 'ntauth' && $ntAuthUserTest == 'ntauth' ) {
// Don't add credentials to $connectionInfo
} else {
$connectionInfo['UID'] = $user;
$rows = -1;
if ( $res ) {
$row = $this->fetchRow( $res );
- if ( isset( $row['EstimateRows'] ) ) $rows = $row['EstimateRows'];
+ if ( isset( $row['EstimateRows'] ) ) {
+ $rows = $row['EstimateRows'];
+ }
}
return $rows;
}
$identity = null;
$tableRaw = preg_replace( '#\[([^\]]*)\]#', '$1', $table ); // strip matching square brackets from table name
$res = $this->doQuery( "SELECT NAME AS idColumn FROM SYS.IDENTITY_COLUMNS WHERE OBJECT_NAME(OBJECT_ID)='{$tableRaw}'" );
- if( $res && $res->numrows() ) {
+ if ( $res && $res->numrows() ) {
// There is an identity for this table.
$identity = array_pop( $res->fetch( SQLSRV_FETCH_ASSOC ) );
}
$identityClause = '';
// if we have an identity column
- if( $identity ) {
+ if ( $identity ) {
// iterate through
foreach ( $a as $k => $v ) {
if ( $k == $identity ) {
- if( !is_null( $v ) ) {
+ if ( !is_null( $v ) ) {
// there is a value being passed to us, we need to turn on and off inserted identity
$sqlPre = "SET IDENTITY_INSERT $table ON;";
$sqlPost = ";SET IDENTITY_INSERT $table OFF;";
$rows = sqlsrv_fetch_array( $queryresult, SQLSRV_FETCH_ASSOC );
- foreach( $rows as $row ) {
+ foreach ( $rows as $row ) {
if ( $row !== null ) {
foreach ( $row as $k => $v ) {
if ( is_object( $v ) && method_exists( $v, 'format' ) ) {// DateTime Object
* @return resource
*/
protected function doQuery( $sql ) {
- if( $this->bufferResults() ) {
+ if ( $this->bufferResults() ) {
$ret = mysql_query( $sql, $this->mConn );
} else {
$ret = mysql_unbuffered_query( $sql, $this->mConn );
// Tell the server we're communicating with it in UTF-8.
// This may engage various charset conversions.
- if( $wgDBmysql5 ) {
+ if ( $wgDBmysql5 ) {
$this->query( 'SET NAMES utf8', __METHOD__ );
} else {
$this->query( 'SET NAMES binary', __METHOD__ );
// Only check for CR_SERVER_LOST and CR_UNKNOWN_ERROR, as
// these are the only errors mysql_fetch_object can cause.
// See http://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html.
- if( $errno == 2000 || $errno == 2013 ) {
+ if ( $errno == 2000 || $errno == 2013 ) {
throw new DBUnexpectedError( $this, 'Error in fetchObject(): ' . htmlspecialchars( $this->lastError() ) );
}
return $row;
// Only check for CR_SERVER_LOST and CR_UNKNOWN_ERROR, as
// these are the only errors mysql_fetch_object can cause.
// See http://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html.
- if( $errno == 2000 || $errno == 2013 ) {
+ if ( $errno == 2000 || $errno == 2013 ) {
throw new DBUnexpectedError( $this, 'Error in fetchRow(): ' . htmlspecialchars( $this->lastError() ) );
}
return $row;
} else {
$error = mysql_error();
}
- if( $error ) {
+ if ( $error ) {
$error .= ' (' . $this->mServer . ')';
}
return $error;
return false;
}
$n = mysql_num_fields( $res->result );
- for( $i = 0; $i < $n; $i++ ) {
+ for ( $i = 0; $i < $n; $i++ ) {
$meta = mysql_fetch_field( $res->result, $i );
- if( $field == $meta->name ) {
+ if ( $field == $meta->name ) {
return new MySQLField( $meta );
}
}
function strencode( $s ) {
$sQuoted = mysql_real_escape_string( $s, $this->mConn );
- if( $sQuoted === false ) {
+ if ( $sQuoted === false ) {
$this->ping();
$sQuoted = mysql_real_escape_string( $s, $this->mConn );
}
function getLagFromProcesslist() {
wfDeprecated( __METHOD__, '1.19' );
$res = $this->query( 'SHOW PROCESSLIST', __METHOD__ );
- if( !$res ) {
+ if ( !$res ) {
return false;
}
# Find slave SQL thread
- foreach( $res as $row ) {
+ foreach ( $res as $row ) {
/* This should work for most situations - when default db
* for thread is not specified, it had no events executed,
* and therefore it doesn't know yet how lagged it is.
$result = $this->query( "SELECT GET_LOCK($lockName, $timeout) AS lockstatus", $method );
$row = $this->fetchObject( $result );
- if( $row->lockstatus == 1 ) {
+ if ( $row->lockstatus == 1 ) {
return true;
} else {
wfDebug( __METHOD__ . " failed to acquire lock\n" );
public function lockTables( $read, $write, $method, $lowPriority = true ) {
$items = array();
- foreach( $write as $table ) {
+ foreach ( $write as $table ) {
$tbl = $this->tableName( $table ) .
( $lowPriority ? ' LOW_PRIORITY' : '' ) .
' WRITE';
$items[] = $tbl;
}
- foreach( $read as $table ) {
+ foreach ( $read as $table ) {
$items[] = $this->tableName( $table ) . ' READ';
}
$sql = "LOCK TABLES " . implode( ',', $items );
$endArray = array();
- foreach( $result as $table ) {
+ foreach ( $result as $table ) {
$vars = get_object_vars( $table );
$table = array_pop( $vars );
- if( !$prefix || strpos( $table, $prefix ) === 0 ) {
+ if ( !$prefix || strpos( $table, $prefix ) === 0 ) {
$endArray[] = $table;
}
}
* @return bool|ResultWrapper
*/
public function dropTable( $tableName, $fName = 'DatabaseMysql::dropTable' ) {
- if( !$this->tableExists( $tableName, $fName ) ) {
+ if ( !$this->tableExists( $tableName, $fName ) ) {
return false;
}
return $this->query( "DROP TABLE IF EXISTS " . $this->tableName( $tableName ), $fName );
// handle some oracle specifics
// remove AS column/table/subquery namings
- if( !$this->getFlag( DBO_DDLMODE ) ) {
+ if ( !$this->getFlag( DBO_DDLMODE ) ) {
$sql = preg_replace( '/ as /i', ' ', $sql );
}
function unionQueries( $sqls, $all ) {
$glue = ' UNION ALL ';
- return 'SELECT * ' . ( $all ? '':'/* UNION_UNIQUE */ ' ) . 'FROM (' . implode( $glue, $sqls ) . ')';
+ return 'SELECT * ' . ( $all ? '' : '/* UNION_UNIQUE */ ' ) . 'FROM (' . implode( $glue, $sqls ) . ')';
}
function wasDeadlock() {
$endArray[] = strtoupper( $prefix . 'IMAGE' );
$fixedOrderTabs = $endArray;
while ( ( $row = $result->fetchRow() ) !== false ) {
- if ( !in_array( $row['table_name'], $fixedOrderTabs ) )
+ if ( !in_array( $row['table_name'], $fixedOrderTabs ) ) {
$endArray[] = $row['table_name'];
+ }
}
return $endArray;
public function dropTable( $tableName, $fName = 'DatabaseOracle::dropTable' ) {
$tableName = $this->tableName( $tableName );
- if( !$this->tableExists( $tableName ) ) {
+ if ( !$this->tableExists( $tableName ) ) {
return false;
}
if ( is_array( $table ) ) {
$table = array_map( array( &$this, 'tableNameInternal' ), $table );
$tableWhere = 'IN (';
- foreach( $table as &$singleTable ) {
+ foreach ( $table as &$singleTable ) {
$singleTable = $this->removeIdentifierQuotes( $singleTable );
if ( isset( $this->mFieldInfoCache["$singleTable.$field"] ) ) {
return $this->mFieldInfoCache["$singleTable.$field"];
$res = new ORAResult( $this, $fieldInfoStmt );
if ( $res->numRows() == 0 ) {
if ( is_array( $table ) ) {
- foreach( $table as &$singleTable ) {
+ foreach ( $table as &$singleTable ) {
$this->mFieldInfoCache["$singleTable.$field"] = false;
}
} else {
* @since 1.19
*/
function defaultValue() {
- if( $this->has_default ) {
+ if ( $this->has_default ) {
return $this->default;
} else {
return false;
array(
"desc" => "%s: Connection state changed from %s -> %s\n",
"states" => array(
- PGSQL_CONNECTION_OK => "OK",
- PGSQL_CONNECTION_BAD => "BAD"
+ PGSQL_CONNECTION_OK => "OK",
+ PGSQL_CONNECTION_BAD => "BAD"
)
),
array(
"desc" => "%s: Transaction state changed from %s -> %s\n",
"states" => array(
- PGSQL_TRANSACTION_IDLE => "IDLE",
- PGSQL_TRANSACTION_ACTIVE => "ACTIVE",
+ PGSQL_TRANSACTION_IDLE => "IDLE",
+ PGSQL_TRANSACTION_ACTIVE => "ACTIVE",
PGSQL_TRANSACTION_INTRANS => "TRANS",
PGSQL_TRANSACTION_INERROR => "ERROR",
PGSQL_TRANSACTION_UNKNOWN => "UNKNOWN"
}
protected function describe_changed( $status, $desc_table ) {
- if( isset( $desc_table[$status] ) ) {
+ if ( isset( $desc_table[$status] ) ) {
return $desc_table[$status];
} else {
return "STATUS " . $status;
$sql = mb_convert_encoding( $sql, 'UTF-8' );
}
$this->mTransactionState->check();
- if( pg_send_query( $this->mConn, $sql ) === false ) {
+ if ( pg_send_query( $this->mConn, $sql ) === false ) {
throw new DBUnexpectedError( $this, "Unable to post new query to PostgreSQL\n" );
}
$this->mLastResult = pg_get_result( $this->mConn );
PGSQL_DIAG_SOURCE_LINE,
PGSQL_DIAG_SOURCE_FUNCTION );
foreach ( $diags as $d ) {
- wfDebug( sprintf("PgSQL ERROR(%d): %s\n", $d, pg_result_error_field( $this->mLastResult, $d ) ) );
+ wfDebug( sprintf( "PgSQL ERROR(%d): %s\n", $d, pg_result_error_field( $this->mLastResult, $d ) ) );
}
}
# @todo hashar: not sure if the following test really trigger if the object
# fetching failed.
- if( pg_last_error( $this->mConn ) ) {
+ if ( pg_last_error( $this->mConn ) ) {
throw new DBUnexpectedError( $this, 'SQL error: ' . htmlspecialchars( pg_last_error( $this->mConn ) ) );
}
return $row;
wfSuppressWarnings();
$row = pg_fetch_array( $res );
wfRestoreWarnings();
- if( pg_last_error( $this->mConn ) ) {
+ if ( pg_last_error( $this->mConn ) ) {
throw new DBUnexpectedError( $this, 'SQL error: ' . htmlspecialchars( pg_last_error( $this->mConn ) ) );
}
return $row;
wfSuppressWarnings();
$n = pg_num_rows( $res );
wfRestoreWarnings();
- if( pg_last_error( $this->mConn ) ) {
+ if ( pg_last_error( $this->mConn ) ) {
throw new DBUnexpectedError( $this, 'SQL error: ' . htmlspecialchars( pg_last_error( $this->mConn ) ) );
}
return $n;
// Forced result for simulated queries
return $this->mAffectedRows;
}
- if( empty( $this->mLastResult ) ) {
+ if ( empty( $this->mLastResult ) ) {
return 0;
}
return pg_affected_rows( $this->mLastResult );
if ( $res ) {
$row = $this->fetchRow( $res );
$count = array();
- if( preg_match( '/rows=(\d+)/', $row[0], $count ) ) {
+ if ( preg_match( '/rows=(\d+)/', $row[0], $count ) ) {
$rows = $count[1];
}
}
* @return Array
*/
function indexAttributes( $index, $schema = false ) {
- if ( $schema === false )
+ if ( $schema === false ) {
$schema = $this->getCoreSchema();
+ }
/*
* A subquery would be not needed if we didn't care about the order
* of attributes, but we do
{
$destTable = $this->tableName( $destTable );
- if( !is_array( $insertOptions ) ) {
+ if ( !is_array( $insertOptions ) ) {
$insertOptions = array( $insertOptions );
}
$savepoint->savepoint();
}
- if( !is_array( $selectOptions ) ) {
+ if ( !is_array( $selectOptions ) ) {
$selectOptions = array( $selectOptions );
}
list( $startOpts, $useIndex, $tailOpts ) = $this->makeSelectOptions( $selectOptions );
- if( is_array( $srcTable ) ) {
+ if ( is_array( $srcTable ) ) {
$srcTable = implode( ',', array_map( array( &$this, 'tableName' ), $srcTable ) );
} else {
$srcTable = $this->tableName( $srcTable );
$sql .= " $tailOpts";
$res = (bool)$this->query( $sql, $fname, $savepoint );
- if( $savepoint ) {
+ if ( $savepoint ) {
$bar = pg_last_error();
- if( $bar != false ) {
+ if ( $bar != false ) {
$savepoint->rollback();
} else {
$savepoint->release();
$result = $this->query( "SELECT tablename FROM pg_tables WHERE schemaname = $eschema", $fname );
$endArray = array();
- foreach( $result as $table ) {
+ foreach ( $result as $table ) {
$vars = get_object_vars( $table );
$table = array_pop( $vars );
- if( !$prefix || strpos( $table, $prefix ) === 0 ) {
+ if ( !$prefix || strpos( $table, $prefix ) === 0 ) {
$endArray[] = $table;
}
}
* @return string
*/
function pg_array_parse( $text, &$output, $limit = false, $offset = 1 ) {
- if( false === $limit ) {
+ if ( false === $limit ) {
$limit = strlen( $text ) - 1;
$output = array();
}
- if( '{}' == $text ) {
+ if ( '{}' == $text ) {
return $output;
}
do {
$this->mName = $dbName;
parent::__construct( $server, $user, $password, $dbName, $flags );
// parent doesn't open when $user is false, but we can work with $dbName
- if( $dbName ) {
+ if ( $dbName ) {
global $wgSharedDB;
- if( $this->open( $server, $user, $password, $dbName ) && $wgSharedDB ) {
+ if ( $this->open( $server, $user, $password, $dbName ) && $wgSharedDB ) {
$this->attachDatabase( $wgSharedDB );
}
}
*/
function makeSelectOptions( $options ) {
foreach ( $options as $k => $v ) {
- if ( is_numeric( $k ) && ($v == 'FOR UPDATE' || $v == 'LOCK IN SHARE MODE') ) {
+ if ( is_numeric( $k ) && ( $v == 'FOR UPDATE' || $v == 'LOCK IN SHARE MODE' ) ) {
$options[$k] = '';
}
}
* @return bool|ResultWrapper
*/
function replace( $table, $uniqueIndexes, $rows, $fname = 'DatabaseSqlite::replace' ) {
- if ( !count( $rows ) ) return true;
+ if ( !count( $rows ) ) {
+ return true;
+ }
# SQLite can't handle multi-row replaces, so divide up into multiple single-row queries
if ( isset( $rows[0] ) && is_array( $rows[0] ) ) {
function addQuotes( $s ) {
if ( $s instanceof Blob ) {
return "x'" . bin2hex( $s->fetch() ) . "'";
- } else if ( strpos( $s, "\0" ) !== false ) {
+ } 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:
$endArray = array();
- foreach( $result as $table ) {
+ foreach ( $result as $table ) {
$vars = get_object_vars( $table );
$table = array_pop( $vars );
- if( !$prefix || strpos( $table, $prefix ) === 0 ) {
+ if ( !$prefix || strpos( $table, $prefix ) === 0 ) {
if ( strpos( $table, 'sqlite_' ) !== 0 ) {
$endArray[] = $table;
}
}
}
- foreach( $params['servers'] as $i => $server ) {
+ foreach ( $params['servers'] as $i => $server ) {
$this->mLoads[$i] = $server['load'];
if ( isset( $server['groupLoads'] ) ) {
foreach ( $server['groupLoads'] as $group => $ratio ) {
* @return bool
*/
function isOpen( $index ) {
- if( !is_integer( $index ) ) {
+ if ( !is_integer( $index ) ) {
return false;
}
return (bool)$this->getAnyOpenConnection( $index );
* @return DatabaseBase
*/
function reallyOpenConnection( $server, $dbNameOverride = false ) {
- if( !is_array( $server ) ) {
+ if ( !is_array( $server ) ) {
throw new MWException( 'You must update your load-balancing configuration. ' .
'See DefaultSettings.php entry for $wgDBservers.' );
}
*/
function closeAll() {
foreach ( $this->mConns as $conns2 ) {
- foreach ( $conns2 as $conns3 ) {
+ foreach ( $conns2 as $conns3 ) {
foreach ( $conns3 as $conn ) {
$conn->close();
}
$requestRate = 10;
global $wgMemc;
- if ( empty( $wgMemc ) )
+ if ( empty( $wgMemc ) ) {
$wgMemc = wfGetMainCache();
+ }
$masterName = $this->parent->getServerName( 0 );
$memcKey = wfMemcKey( 'lag_times', $masterName );
// output errors as debug info, when display_errors is on
// this is necessary for all non html output of the api, because that clears all errors first
$obContents = ob_get_contents();
- if( $obContents ) {
+ if ( $obContents ) {
$obContentArray = explode( '<br />', $obContents );
- foreach( $obContentArray as $obContent ) {
- if( trim( $obContent ) ) {
+ foreach ( $obContentArray as $obContent ) {
+ if ( trim( $obContent ) ) {
self::debugMsg( Sanitizer::stripAllTags( $obContent ) );
}
}
$result->setIndexedTagName( $debugInfo, 'debuginfo' );
$result->setIndexedTagName( $debugInfo['log'], 'line' );
- foreach( $debugInfo['debugLog'] as $index => $debugLogText ) {
+ foreach ( $debugInfo['debugLog'] as $index => $debugLogText ) {
$vals = array();
ApiResult::setContent( $vals, $debugLogText );
$debugInfo['debugLog'][$index] = $vals; //replace
$this->xchanged[$skip] = $this->ychanged[$skip] = false;
}
// Skip trailing common lines.
- $xi = $n_from; $yi = $n_to;
+ $xi = $n_from;
+ $yi = $n_to;
for ( $endskip = 0; --$xi > $skip && --$yi > $skip; $endskip++ ) {
if ( $from_lines[$xi] !== $to_lines[$yi] ) {
break;
break;
}
}
- while ( list ( , $y ) = each( $matches ) ) {
+ while ( list( , $y ) = each( $matches ) ) {
if ( $y > $this->seq[$k -1] ) {
assert( '$y < $this->seq[$k]' );
// Optimization: this is a common case:
*/
function _compareseq( $xoff, $xlim, $yoff, $ylim ) {
// Slide down the bottom initial diagonal.
- while ( $xoff < $xlim && $yoff < $ylim
- && $this->xv[$xoff] == $this->yv[$yoff] ) {
+ while ( $xoff < $xlim && $yoff < $ylim && $this->xv[$xoff] == $this->yv[$yoff] ) {
++$xoff;
++$yoff;
}
// $nchunks = sqrt(min($xlim - $xoff, $ylim - $yoff) / 2.5);
// $nchunks = max(2,min(8,(int)$nchunks));
$nchunks = min( 7, $xlim - $xoff, $ylim - $yoff ) + 1;
- list ( $lcs, $seps ) = $this->_diag( $xoff, $xlim, $yoff, $ylim, $nchunks );
+ list( $lcs, $seps ) = $this->_diag( $xoff, $xlim, $yoff, $ylim, $nchunks );
}
if ( $lcs == 0 ) {
while ( $i < $len && ! $changed[$i] ) {
assert( '$j < $other_len && ! $other_changed[$j]' );
- $i++; $j++;
- while ( $j < $other_len && $other_changed[$j] )
+ $i++;
$j++;
+ while ( $j < $other_len && $other_changed[$j] ) {
+ $j++;
+ }
}
if ( $i == $len ) {
if ( $this->mNewRev->isDeleted( Revision::DELETED_TEXT ) ) {
$deleted = true; // new revisions text is hidden
- if ( $this->mNewRev->isDeleted( Revision::DELETED_RESTRICTED ) )
+ if ( $this->mNewRev->isDeleted( Revision::DELETED_RESTRICTED ) ) {
$suppressed = true; // also suppressed
+ }
}
# If the diff cannot be shown due to a deleted revision, then output
$change = RecentChange::newFromConds(
array(
// Redundant user,timestamp condition so we can use the existing index
- 'rc_user_text' => $this->mNewRev->getRawUserText(),
- 'rc_timestamp' => $db->timestamp( $this->mNewRev->getTimestamp() ),
+ 'rc_user_text' => $this->mNewRev->getRawUserText(),
+ 'rc_timestamp' => $db->timestamp( $this->mNewRev->getTimestamp() ),
'rc_this_oldid' => $this->mNewid,
'rc_last_oldid' => $this->mOldid,
- 'rc_patrolled' => 0
+ 'rc_patrolled' => 0
),
__METHOD__
);
$txt = $po ? $po->getText() : '';
$out->addHTML( $txt );
}
- } elseif( !wfRunHooks( 'ArticleContentViewCustom', array( $this->mNewContent, $this->mNewPage, $out ) ) ) {
+ } elseif ( !wfRunHooks( 'ArticleContentViewCustom', array( $this->mNewContent, $this->mNewPage, $out ) ) ) {
// Handled by extension
- } elseif( !ContentHandler::runLegacyHooks( 'ArticleViewCustom', array( $this->mNewContent, $this->mNewPage, $out ) ) ) {
+ } elseif ( !ContentHandler::runLegacyHooks( 'ArticleViewCustom', array( $this->mNewContent, $this->mNewPage, $out ) ) ) {
// NOTE: deprecated hook, B/C only
// Handled by extension
} else {
# Show categories etc.
$out->addParserOutputNoText( $parserOutput );
}
- } else if ( $parserOutput ) {
+ } elseif ( $parserOutput ) {
$out->addParserOutput( $parserOutput );
}
}
}
function localiseLineNumbersCb( $matches ) {
- if ( $matches[1] === '1' && $this->mReducedLineNumbers ) return '';
+ if ( $matches[1] === '1' && $this->mReducedLineNumbers ) {
+ return '';
+ }
return $this->msg( 'lineno' )->numParams( $matches[1] )->escaped();
}
static $externalBlobCache = array();
$cacheID = ( $itemID === false ) ? "$cluster/$id" : "$cluster/$id/";
- if( isset( $externalBlobCache[$cacheID] ) ) {
+ if ( isset( $externalBlobCache[$cacheID] ) ) {
wfDebugLog( 'ExternalStoreDB-cache', "ExternalStoreDB::fetchBlob cache hit on $cacheID\n" );
return $externalBlobCache[$cacheID];
}
// Try the master
$dbw =& $this->getMaster( $cluster );
$ret = $dbw->selectField( $this->getTable( $dbw ), 'blob_text', array( 'blob_id' => $id ), __METHOD__ );
- if( $ret === false) {
+ if ( $ret === false) {
wfDebugLog( 'ExternalStoreDB', "ExternalStoreDB::fetchBlob master failed to find $cacheID\n" );
}
}
- if( $itemID !== false && $ret !== false ) {
+ if ( $itemID !== false && $ret !== false ) {
// Unserialise object; caller extracts item
$ret = unserialize( $ret );
}
if ( $stat ) {
return array(
'mtime' => wfTimestamp( TS_MW, $stat['mtime'] ),
- 'size' => $stat['size']
+ 'size' => $stat['size']
);
} elseif ( !$hadError ) {
return false; // file does not exist
*/
public function __construct( $dir, array $params ) {
$path = realpath( $dir ); // normalize
- if( $path === false ) {
+ if ( $path === false ) {
$path = $dir;
}
$this->suffixStart = strlen( $path ) + 1; // size of "path/to/dir/"
*/
protected function getRelPath( $dir ) {
$path = realpath( $dir );
- if( $path === false ) {
+ if ( $path === false ) {
$path = $dir;
}
return strtr( substr( $path, $this->suffixStart ), '\\', '/' );
final protected function getScopedPHPBehaviorForOps() {
if ( php_sapi_name() != 'cli' ) { // http://bugs.php.net/bug.php?id=47540
$old = ignore_user_abort( true ); // avoid half-finished operations
- return new ScopedCallback( function() use ( $old ) { ignore_user_abort( $old ); } );
+ return new ScopedCallback( function() use ( $old ) {
+ ignore_user_abort( $old );
+ } );
}
return null;
}
: 0644;
// Get the FS backend configuration
$autoBackends[] = array(
- 'name' => $backendName,
- 'class' => 'FSFileBackend',
- 'lockManager' => 'fsLockManager',
+ 'name' => $backendName,
+ 'class' => 'FSFileBackend',
+ 'lockManager' => 'fsLockManager',
'containerPaths' => array(
- "{$repoName}-public" => "{$directory}",
- "{$repoName}-thumb" => $thumbDir,
- "{$repoName}-transcoded" => $transcodedDir,
+ "{$repoName}-public" => "{$directory}",
+ "{$repoName}-thumb" => $thumbDir,
+ "{$repoName}-transcoded" => $transcodedDir,
"{$repoName}-deleted" => $deletedDir,
- "{$repoName}-temp" => "{$directory}/temp"
+ "{$repoName}-temp" => "{$directory}/temp"
),
- 'fileMode' => $fileMode,
+ 'fileMode' => $fileMode,
);
}
unset( $config['class'] ); // backend won't need this
$this->backends[$name] = array(
- 'class' => $class,
- 'config' => $config,
+ 'class' => $class,
+ 'config' => $config,
'instance' => null
);
}
*/
final public function getOperationsInternal( array $ops ) {
$supportedOps = array(
- 'store' => 'StoreFileOp',
- 'copy' => 'CopyFileOp',
- 'move' => 'MoveFileOp',
- 'delete' => 'DeleteFileOp',
- 'create' => 'CreateFileOp',
+ 'store' => 'StoreFileOp',
+ 'copy' => 'CopyFileOp',
+ 'move' => 'MoveFileOp',
+ 'delete' => 'DeleteFileOp',
+ 'create' => 'CreateFileOp',
'describe' => 'DescribeFileOp',
- 'null' => 'NullFileOp'
+ 'null' => 'NullFileOp'
);
$performOps = array(); // array of FileOp objects
/**
* Like resolveStoragePath() except null values are returned if
- * the container is sharded and the shard could not be determined.
+ * the container is sharded and the shard could not be determined
+ * or if the path ends with '/'. The later case is illegal for FS
+ * backends and can confuse listings for object store backends.
+ *
+ * This function is used when resolving paths that must be valid
+ * locations for files. Directory and listing functions should
+ * generally just use resolveStoragePath() instead.
*
* @see FileBackendStore::resolveStoragePath()
*
*/
final protected function resolveStoragePathReal( $storagePath ) {
list( $container, $relPath, $cShard ) = $this->resolveStoragePath( $storagePath );
- if ( $cShard !== null ) {
+ if ( $cShard !== null && substr( $relPath, -1 ) !== '/' ) {
return array( $container, $relPath );
}
return array( null, null );
* Set the cached info for a container
*
* @param string $container Resolved container name
- * @param $val mixed Information to cache
+ * @param array $val Information to cache
+ * @return void
*/
- final protected function setContainerCache( $container, $val ) {
+ final protected function setContainerCache( $container, array $val ) {
$this->memCache->add( $this->containerCacheKey( $container ), $val, 14 * 86400 );
}
* The cache key is salted for a while to prevent race conditions.
*
* @param string $container Resolved container name
+ * @return void
*/
final protected function deleteContainerCache( $container ) {
if ( !$this->memCache->set( $this->containerCacheKey( $container ), 'PURGED', 300 ) ) {
* salting for the case when a file is created at a path were there was none before.
*
* @param string $path Storage path
- * @param $val mixed Information to cache
+ * @param array $val Stat information to cache
+ * @return void
*/
- final protected function setFileCache( $path, $val ) {
+ final protected function setFileCache( $path, array $val ) {
$path = FileBackend::normalizeStoragePath( $path );
if ( $path === null ) {
return; // invalid storage path
}
- $this->memCache->add( $this->fileCacheKey( $path ), $val, 7 * 86400 );
+ $age = time() - wfTimestamp( TS_UNIX, $val['mtime'] );
+ $ttl = min( 7 * 86400, max( 300, floor( .1 * $age ) ) );
+ $this->memCache->add( $this->fileCacheKey( $path ), $val, $ttl );
}
/**
* a file is created at a path were there was none before.
*
* @param string $path Storage path
+ * @return void
*/
final protected function deleteFileCache( $path ) {
$path = FileBackend::normalizeStoragePath( $path );
*
* @ingroup FileBackend
*/
-abstract class FileBackendStoreShardListIterator implements Iterator {
+abstract class FileBackendStoreShardListIterator extends FilterIterator {
/** @var FileBackendStore */
protected $backend;
/** @var Array */
protected $params;
- /** @var Array */
- protected $shardSuffixes;
+
protected $container; // string; full container name
protected $directory; // string; resolved relative path
- /** @var Traversable */
- protected $iter;
- protected $curShard = 0; // integer
- protected $pos = 0; // integer
-
/** @var Array */
protected $multiShardPaths = array(); // (rel path => 1)
$this->backend = $backend;
$this->container = $container;
$this->directory = $dir;
- $this->shardSuffixes = $suffixes;
$this->params = $params;
- }
- /**
- * @see Iterator::key()
- * @return integer
- */
- public function key() {
- return $this->pos;
- }
-
- /**
- * @see Iterator::valid()
- * @return bool
- */
- public function valid() {
- if ( $this->iter instanceof Iterator ) {
- return $this->iter->valid();
- } elseif ( is_array( $this->iter ) ) {
- return ( current( $this->iter ) !== false ); // no paths can have this value
+ $iter = new AppendIterator();
+ foreach ( $suffixes as $suffix ) {
+ $iter->append( $this->listFromShard( $this->container . $suffix ) );
}
- return false; // some failure?
- }
- /**
- * @see Iterator::current()
- * @return string|bool String or false
- */
- public function current() {
- return ( $this->iter instanceof Iterator )
- ? $this->iter->current()
- : current( $this->iter );
- }
-
- /**
- * @see Iterator::next()
- * @return void
- */
- public function next() {
- ++$this->pos;
- ( $this->iter instanceof Iterator ) ? $this->iter->next() : next( $this->iter );
- do {
- $continue = false; // keep scanning shards?
- $this->filterViaNext(); // filter out duplicates
- // Find the next non-empty shard if no elements are left
- if ( !$this->valid() ) {
- $this->nextShardIteratorIfNotValid();
- $continue = $this->valid(); // re-filter unless we ran out of shards
- }
- } while ( $continue );
+ parent::__construct( $iter );
}
- /**
- * @see Iterator::rewind()
- * @return void
- */
- public function rewind() {
- $this->pos = 0;
- $this->curShard = 0;
- $this->setIteratorFromCurrentShard();
- do {
- $continue = false; // keep scanning shards?
- $this->filterViaNext(); // filter out duplicates
- // Find the next non-empty shard if no elements are left
- if ( !$this->valid() ) {
- $this->nextShardIteratorIfNotValid();
- $continue = $this->valid(); // re-filter unless we ran out of shards
- }
- } while ( $continue );
- }
-
- /**
- * Filter out duplicate items by advancing to the next ones
- */
- protected function filterViaNext() {
- while ( $this->valid() ) {
- $rel = $this->iter->current(); // path relative to given directory
- $path = $this->params['dir'] . "/{$rel}"; // full storage path
- if ( $this->backend->isSingleShardPathInternal( $path ) ) {
- break; // path is only on one shard; no issue with duplicates
- } elseif ( isset( $this->multiShardPaths[$rel] ) ) {
- // Don't keep listing paths that are on multiple shards
- ( $this->iter instanceof Iterator ) ? $this->iter->next() : next( $this->iter );
- } else {
- $this->multiShardPaths[$rel] = 1;
- break;
- }
- }
- }
-
- /**
- * If the list iterator for this container shard is out of items,
- * then move on to the next container that has items.
- * If there are none, then it advances to the last container.
- */
- protected function nextShardIteratorIfNotValid() {
- while ( !$this->valid() && ++$this->curShard < count( $this->shardSuffixes ) ) {
- $this->setIteratorFromCurrentShard();
+ public function accept() {
+ $rel = $this->getInnerIterator()->current(); // path relative to given directory
+ $path = $this->params['dir'] . "/{$rel}"; // full storage path
+ if ( $this->backend->isSingleShardPathInternal( $path ) ) {
+ return true; // path is only on one shard; no issue with duplicates
+ } elseif ( isset( $this->multiShardPaths[$rel] ) ) {
+ // Don't keep listing paths that are on multiple shards
+ return false;
+ } else {
+ $this->multiShardPaths[$rel] = 1;
+ return true;
}
}
- /**
- * Set the list iterator to that of the current container shard
- */
- protected function setIteratorFromCurrentShard() {
- $this->iter = $this->listFromShard(
- $this->container . $this->shardSuffixes[$this->curShard],
- $this->directory, $this->params );
- // Start loading results so that current() works
- if ( $this->iter ) {
- ( $this->iter instanceof Iterator ) ? $this->iter->rewind() : reset( $this->iter );
- }
+ public function rewind() {
+ parent::rewind();
+ $this->multiShardPaths = array();
}
/**
* Get the list for a given container shard
*
* @param string $container Resolved container name
- * @param string $dir Resolved path relative to container
- * @param array $params
- * @return Traversable|Array|null
+ * @return Iterator
*/
- abstract protected function listFromShard( $container, $dir, array $params );
+ abstract protected function listFromShard( $container );
}
/**
* Iterator for listing directories
*/
class FileBackendStoreShardDirIterator extends FileBackendStoreShardListIterator {
- /**
- * @see FileBackendStoreShardListIterator::listFromShard()
- * @return Array|null|Traversable
- */
- protected function listFromShard( $container, $dir, array $params ) {
- return $this->backend->getDirectoryListInternal( $container, $dir, $params );
+ protected function listFromShard( $container ) {
+ $list = $this->backend->getDirectoryListInternal(
+ $container, $this->directory, $this->params );
+ if ( $list === null ) {
+ return new ArrayIterator( array() );
+ } else {
+ return is_array( $list ) ? new ArrayIterator( $list ) : $list;
+ }
}
}
* Iterator for listing regular files
*/
class FileBackendStoreShardFileIterator extends FileBackendStoreShardListIterator {
- /**
- * @see FileBackendStoreShardListIterator::listFromShard()
- * @return Array|null|Traversable
- */
- protected function listFromShard( $container, $dir, array $params ) {
- return $this->backend->getFileListInternal( $container, $dir, $params );
+ protected function listFromShard( $container ) {
+ $list = $this->backend->getFileListInternal(
+ $container, $this->directory, $this->params );
+ if ( $list === null ) {
+ return new ArrayIterator( array() );
+ } else {
+ return is_array( $list ) ? new ArrayIterator( $list ) : $list;
+ }
}
}
$pathsUsed = array_merge( $this->storagePathsRead(), $this->storagePathsChanged() );
foreach ( array_unique( $pathsUsed ) as $path ) {
$nullEntries[] = array( // assertion for recovery
- 'op' => 'null',
- 'path' => $path,
+ 'op' => 'null',
+ 'path' => $path,
'newSha1' => $this->fileSha1( $path, $oPredicates )
);
}
foreach ( $this->storagePathsChanged() as $path ) {
if ( $nPredicates['sha1'][$path] === false ) { // deleted
$deleteEntries[] = array(
- 'op' => 'delete',
- 'path' => $path,
+ 'op' => 'delete',
+ 'path' => $path,
'newSha1' => ''
);
} else { // created/updated
$updateEntries[] = array(
- 'op' => $this->fileExists( $path, $oPredicates ) ? 'update' : 'create',
- 'path' => $path,
+ 'op' => $this->fileExists( $path, $oPredicates ) ? 'update' : 'create',
+ 'path' => $path,
'newSha1' => $nPredicates['sha1'][$path]
);
}
$stat = array(
// Convert dates like "Tue, 03 Jan 2012 22:01:04 GMT" to TS_MW
'mtime' => wfTimestamp( TS_MW, $srcObj->last_modified ),
- 'size' => (int)$srcObj->content_length,
- 'sha1' => $srcObj->getMetadataValue( 'Sha1base36' )
+ 'size' => (int)$srcObj->content_length,
+ 'sha1' => $srcObj->getMetadataValue( 'Sha1base36' )
);
} catch ( NoSuchContainerException $e ) {
} catch ( NoSuchObjectException $e ) {
str_replace( '/swift/v1', '', // S3 API is the rgw default
$sContObj->cfs_http->getStorageUrl() . $spath ),
array(
- 'Signature' => $signature,
- 'Expires' => $expires,
+ 'Signature' => $signature,
+ 'Expires' => $expires,
'AWSAccessKeyId' => $this->rgwS3AccessKey )
);
}
foreach ( $entries as $entry ) {
$data[] = array(
'fj_batch_uuid' => $batchId,
- 'fj_backend' => $this->backend,
- 'fj_op' => $entry['op'],
- 'fj_path' => $entry['path'],
- 'fj_new_sha1' => $entry['newSha1'],
- 'fj_timestamp' => $dbw->timestamp( $now )
+ 'fj_backend' => $this->backend,
+ 'fj_op' => $entry['op'],
+ 'fj_path' => $entry['path'],
+ 'fj_new_sha1' => $entry['newSha1'],
+ 'fj_timestamp' => $dbw->timestamp( $now )
);
}
$db = $this->getConnection( $lockSrv ); // checked in isServerUp()
$bigints = array_unique( array_map(
- function( $key ) { return wfBaseConvert( substr( $key, 0, 15 ), 16, 10 ); },
+ function( $key ) {
+ return wfBaseConvert( substr( $key, 0, 15 ), 16, 10 );
+ },
array_map( array( $this, 'sha1Base16Absolute' ), $paths )
) );
*
* @param array $paths List of storage paths
* @param $type integer LockManager::LOCK_* constant
- * @return string
+ * @return Status
*/
abstract protected function doLock( array $paths, $type );
*
* @param array $paths List of storage paths
* @param $type integer LockManager::LOCK_* constant
- * @return string
+ * @return Status
*/
abstract protected function doUnlock( array $paths, $type );
}
$class = $config['class'];
unset( $config['class'] ); // lock manager won't need this
$this->managers[$name] = array(
- 'class' => $class,
- 'config' => $config,
+ 'class' => $class,
+ 'config' => $config,
'instance' => null
);
}
--- /dev/null
+<?php
+/**
+ * Version of LockManager based on using redis servers.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup LockManager
+ */
+
+/**
+ * Manage locks using redis servers.
+ *
+ * Version of LockManager based on using redis servers.
+ * This is meant for multi-wiki systems that may share files.
+ * All locks are non-blocking, which avoids deadlocks.
+ *
+ * All lock requests for a resource, identified by a hash string, will map to one
+ * bucket. Each bucket maps to one or several peer servers, each running redis.
+ * A majority of peers must agree for a lock to be acquired.
+ *
+ * This class requires Redis 2.6 as it makes use Lua scripts for fast atomic operations.
+ *
+ * @ingroup LockManager
+ * @since 1.22
+ */
+class RedisLockManager extends QuorumLockManager {
+ /** @var Array Mapping of lock types to the type actually used */
+ protected $lockTypeMap = array(
+ self::LOCK_SH => self::LOCK_SH,
+ self::LOCK_UW => self::LOCK_SH,
+ self::LOCK_EX => self::LOCK_EX
+ );
+
+ /** @var RedisConnectionPool */
+ protected $redisPool;
+ /** @var Array Map server names to hostname/IP and port numbers */
+ protected $lockServers = array();
+
+ protected $session = ''; // string; random UUID
+
+ /**
+ * Construct a new instance from configuration.
+ *
+ * $config paramaters include:
+ * - lockServers : Associative array of server names to "<IP>:<port>" strings.
+ * - srvsByBucket : Array of 1-16 consecutive integer keys, starting from 0,
+ * each having an odd-numbered list of server names (peers) as values.
+ * - redisConfig : Configuration for RedisConnectionPool::__construct().
+ *
+ * @param Array $config
+ * @throws MWException
+ */
+ public function __construct( array $config ) {
+ parent::__construct( $config );
+
+ $this->lockServers = $config['lockServers'];
+ // Sanitize srvsByBucket config to prevent PHP errors
+ $this->srvsByBucket = array_filter( $config['srvsByBucket'], 'is_array' );
+ $this->srvsByBucket = array_values( $this->srvsByBucket ); // consecutive
+
+ $config['redisConfig']['serializer'] = 'none';
+ $this->redisPool = RedisConnectionPool::singleton( $config['redisConfig'] );
+
+ $this->session = wfRandomString( 32 );
+ }
+
+ protected function getLocksOnServer( $lockSrv, array $paths, $type ) {
+ $status = Status::newGood();
+
+ $server = $this->lockServers[$lockSrv];
+ $conn = $this->redisPool->getConnection( $server );
+ if ( !$conn ) {
+ foreach ( $paths as $path ) {
+ $status->fatal( 'lockmanager-fail-acquirelock', $path );
+ }
+ return $status;
+ }
+
+ $keys = array_map( array( $this, 'recordKeyForPath' ), $paths ); // lock records
+
+ try {
+ static $script =
+<<<LUA
+ if ARGV[1] ~= 'EX' and ARGV[1] ~= 'SH' then
+ return redis.error_reply('Unrecognized lock type given (must be EX or SH)')
+ end
+ local failed = {}
+ -- Check that all the locks can be acquired
+ for i,resourceKey in ipairs(KEYS) do
+ local keyIsFree = true
+ local currentLocks = redis.call('hKeys',resourceKey)
+ for i,lockKey in ipairs(currentLocks) do
+ local _, _, type, session = string.find(lockKey,"(%w+):(%w+)")
+ -- Check any locks that are not owned by this session
+ if session ~= ARGV[2] then
+ local lockTimestamp = redis.call('hGet',resourceKey,lockKey)
+ if 1*lockTimestamp < ( ARGV[4] - ARGV[3] ) then
+ -- Lock is stale, so just prune it out
+ redis.call('hDel',resourceKey,lockKey)
+ elseif ARGV[1] == 'EX' or type == 'EX' then
+ keyIsFree = false
+ break
+ end
+ end
+ end
+ if not keyIsFree then
+ failed[#failed+1] = resourceKey
+ end
+ end
+ -- If all locks could be acquired, then do so
+ if #failed == 0 then
+ for i,resourceKey in ipairs(KEYS) do
+ redis.call('hSet',resourceKey,ARGV[1] .. ':' .. ARGV[2],ARGV[4])
+ -- In addition to invalidation logic, be sure to garbage collect
+ redis.call('expire',resourceKey,ARGV[3])
+ end
+ end
+ return failed
+LUA;
+ $res = $conn->luaEval( $script,
+ array_merge(
+ $keys, // KEYS[0], KEYS[1],...KEYS[N]
+ array(
+ $type === self::LOCK_SH ? 'SH' : 'EX', // ARGV[1]
+ $this->session, // ARGV[2]
+ $this->lockTTL, // ARGV[3]
+ time() // ARGV[4]
+ )
+ ),
+ count( $keys ) # number of first argument(s) that are keys
+ );
+ } catch ( RedisException $e ) {
+ $res = false;
+ $this->redisPool->handleException( $server, $conn, $e );
+ }
+
+ if ( $res === false ) {
+ foreach ( $paths as $path ) {
+ $status->fatal( 'lockmanager-fail-acquirelock', $path );
+ }
+ } else {
+ $pathsByKey = array_combine( $keys, $paths );
+ foreach ( $res as $key ) {
+ $status->fatal( 'lockmanager-fail-acquirelock', $pathsByKey[$key] );
+ }
+ }
+
+ return $status;
+ }
+
+ protected function freeLocksOnServer( $lockSrv, array $paths, $type ) {
+ $status = Status::newGood();
+
+ $server = $this->lockServers[$lockSrv];
+ $conn = $this->redisPool->getConnection( $server );
+ if ( !$conn ) {
+ foreach ( $paths as $path ) {
+ $status->fatal( 'lockmanager-fail-releaselock', $path );
+ }
+ return $status;
+ }
+
+ $keys = array_map( array( $this, 'recordKeyForPath' ), $paths ); // lock records
+
+ try {
+ static $script =
+<<<LUA
+ if ARGV[1] ~= 'EX' and ARGV[1] ~= 'SH' then
+ return redis.error_reply('Unrecognized lock type given (must be EX or SH)')
+ end
+ local failed = {}
+ for i,resourceKey in ipairs(KEYS) do
+ local released = redis.call('hDel',resourceKey,ARGV[1] .. ':' .. ARGV[2])
+ if released > 0 then
+ -- Remove the whole structure if it is now empty
+ if redis.call('hLen',resourceKey) == 0 then
+ redis.call('del',resourceKey)
+ end
+ else
+ failed[#failed+1] = resourceKey
+ end
+ end
+ return failed
+LUA;
+ $res = $conn->luaEval( $script,
+ array_merge(
+ $keys, // KEYS[0], KEYS[1],...KEYS[N]
+ array(
+ $type === self::LOCK_SH ? 'SH' : 'EX', // ARGV[1]
+ $this->session // ARGV[2]
+ )
+ ),
+ count( $keys ) # number of first argument(s) that are keys
+ );
+ } catch ( RedisException $e ) {
+ $res = false;
+ $this->redisPool->handleException( $server, $conn, $e );
+ }
+
+ if ( $res === false ) {
+ foreach ( $paths as $path ) {
+ $status->fatal( 'lockmanager-fail-releaselock', $path );
+ }
+ } else {
+ $pathsByKey = array_combine( $keys, $paths );
+ foreach ( $res as $key ) {
+ $status->fatal( 'lockmanager-fail-releaselock', $pathsByKey[$key] );
+ }
+ }
+
+ return $status;
+ }
+
+ protected function releaseAllLocks() {
+ return Status::newGood(); // not supported
+ }
+
+ protected function isServerUp( $lockSrv ) {
+ return (bool)$this->redisPool->getConnection( $this->lockServers[$lockSrv] );
+ }
+
+ /**
+ * @param $path string
+ * @return string
+ */
+ protected function recordKeyForPath( $path ) {
+ return implode( ':', array( __CLASS__, 'locks', $this->sha1Base36Absolute( $path ) ) );
+ }
+
+ /**
+ * Make sure remaining locks get cleared for sanity
+ */
+ function __destruct() {
+ while ( count( $this->locksHeld ) ) {
+ foreach ( $this->locksHeld as $path => $locks ) {
+ $this->doUnlock( array( $path ), self::LOCK_EX );
+ $this->doUnlock( array( $path ), self::LOCK_SH );
+ }
+ }
+ }
+}
$repoName = $info['name'];
// Get the FS backend configuration
$backend = new FSFileBackend( array(
- 'name' => $info['name'] . '-backend',
- 'lockManager' => 'fsLockManager',
+ 'name' => $info['name'] . '-backend',
+ 'lockManager' => 'fsLockManager',
'containerPaths' => array(
- "{$repoName}-public" => "{$directory}",
- "{$repoName}-temp" => "{$directory}/temp",
- "{$repoName}-thumb" => $thumbDir,
- "{$repoName}-transcoded" => $transcodedDir,
+ "{$repoName}-public" => "{$directory}",
+ "{$repoName}-temp" => "{$directory}/temp",
+ "{$repoName}-thumb" => $thumbDir,
+ "{$repoName}-transcoded" => $transcodedDir,
"{$repoName}-deleted" => $deletedDir
),
- 'fileMode' => $fileMode,
+ 'fileMode' => $fileMode,
) );
// Update repo config to use this backend
$info['backend'] = $backend;
*/
public function __construct( array $info = null ) {
// Verify required settings presence
- if(
+ if (
$info === null
|| !array_key_exists( 'name', $info )
|| !array_key_exists( 'backend', $info )
}
}
$operations[] = array(
- 'op' => $opName,
- 'src' => $srcPath,
- 'dst' => $dstPath,
- 'overwrite' => $flags & self::OVERWRITE,
+ 'op' => $opName,
+ 'src' => $srcPath,
+ 'dst' => $dstPath,
+ 'overwrite' => $flags & self::OVERWRITE,
'overwriteSame' => $flags & self::OVERWRITE_SAME,
);
}
$src = $this->resolveToStoragePath( $src );
$dst = $this->resolveToStoragePath( $dst );
$operations[] = array(
- 'op' => FileBackend::isStoragePath( $src ) ? 'copy' : 'store',
- 'src' => $src,
- 'dst' => $dst,
+ 'op' => FileBackend::isStoragePath( $src ) ? 'copy' : 'store',
+ 'src' => $src,
+ 'dst' => $dst,
'disposition' => isset( $triple[2] ) ? $triple[2] : null
);
$status->merge( $this->initDirectory( dirname( $dst ) ) );
$operations = array();
foreach ( $paths as $path ) {
$operations[] = array(
- 'op' => 'delete',
- 'src' => $this->resolveToStoragePath( $path ),
+ 'op' => 'delete',
+ 'src' => $this->resolveToStoragePath( $path ),
'ignoreMissingSource' => true
);
}
// race conditions unless an functioning LockManager is used.
// LocalFile also uses SELECT FOR UPDATE for synchronization.
$operations[] = array(
- 'op' => 'copy',
- 'src' => $dstPath,
- 'dst' => $archivePath,
+ 'op' => 'copy',
+ 'src' => $dstPath,
+ 'dst' => $archivePath,
'ignoreMissingSource' => true
);
if ( FileBackend::isStoragePath( $srcPath ) ) {
if ( $flags & self::DELETE_SOURCE ) {
$operations[] = array(
- 'op' => 'move',
- 'src' => $srcPath,
- 'dst' => $dstPath,
+ 'op' => 'move',
+ 'src' => $srcPath,
+ 'dst' => $dstPath,
'overwrite' => true, // replace current
- 'headers' => $headers
+ 'headers' => $headers
);
} else {
$operations[] = array(
- 'op' => 'copy',
- 'src' => $srcPath,
- 'dst' => $dstPath,
+ 'op' => 'copy',
+ 'src' => $srcPath,
+ 'dst' => $dstPath,
'overwrite' => true, // replace current
- 'headers' => $headers
+ 'headers' => $headers
);
}
} else { // FS source path
$operations[] = array(
- 'op' => 'store',
- 'src' => $srcPath,
- 'dst' => $dstPath,
+ 'op' => 'store',
+ 'src' => $srcPath,
+ 'dst' => $dstPath,
'overwrite' => true, // replace current
- 'headers' => $headers
+ 'headers' => $headers
);
if ( $flags & self::DELETE_SOURCE ) {
$sourceFSFilesToDelete[] = $srcPath;
}
$operations[] = array(
- 'op' => 'move',
- 'src' => $srcPath,
- 'dst' => $archivePath,
+ 'op' => 'move',
+ 'src' => $srcPath,
+ 'dst' => $archivePath,
// We may have 2+ identical files being deleted,
// all of which will map to the same destination file
'overwriteSame' => true // also see bug 31792
*/
public function getTempRepo() {
return new TempFileRepo( array(
- 'name' => "{$this->name}-temp",
- 'backend' => $this->backend,
- 'zones' => array(
+ 'name' => "{$this->name}-temp",
+ 'backend' => $this->backend,
+ 'zones' => array(
'public' => array(
'container' => $this->zones['temp']['container'],
'directory' => $this->zones['temp']['directory']
),
- 'thumb' => array(
+ 'thumb' => array(
'container' => $this->zones['thumb']['container'],
'directory' => ( $this->zones['thumb']['directory'] == '' )
? 'temp'
: $this->zones['thumb']['directory'] . '/temp'
),
- 'transcoded' => array(
+ 'transcoded' => array(
'container' => $this->zones['transcoded']['container'],
'directory' => ( $this->zones['transcoded']['directory'] == '' )
? 'temp'
: $this->zones['transcoded']['directory'] . '/temp'
)
),
- 'url' => $this->getZoneUrl( 'temp' ),
- 'thumbUrl' => $this->getZoneUrl( 'thumb' ) . '/temp',
- 'transcodedUrl' => $this->getZoneUrl( 'transcoded' ) . '/temp',
+ 'url' => $this->getZoneUrl( 'temp' ),
+ 'thumbUrl' => $this->getZoneUrl( 'thumb' ) . '/temp',
+ 'transcodedUrl' => $this->getZoneUrl( 'transcoded' ) . '/temp',
'hashLevels' => $this->hashLevels // performance
) );
}
// http://commons.wikimedia.org/w/api.php
$this->mApiBase = isset( $info['apibase'] ) ? $info['apibase'] : null;
- if( isset( $info['apiThumbCacheExpiry'] ) ) {
+ if ( isset( $info['apiThumbCacheExpiry'] ) ) {
$this->apiThumbCacheExpiry = $info['apiThumbCacheExpiry'];
}
- if( isset( $info['fileCacheExpiry'] ) ) {
+ if ( isset( $info['fileCacheExpiry'] ) ) {
$this->fileCacheExpiry = $info['fileCacheExpiry'];
}
- if( !$this->scriptDirUrl ) {
+ if ( !$this->scriptDirUrl ) {
// hack for description fetches
$this->scriptDirUrl = dirname( $this->mApiBase );
}
// If we can cache thumbs we can guess sane defaults for these
- if( $this->canCacheThumbs() && !$this->url ) {
+ if ( $this->canCacheThumbs() && !$this->url ) {
$this->url = $wgLocalFileRepo['url'];
}
- if( $this->canCacheThumbs() && !$this->thumbUrl ) {
+ if ( $this->canCacheThumbs() && !$this->thumbUrl ) {
$this->thumbUrl = $this->url . '/thumb';
}
}
if ( isset( $this->mFileExists[$k] ) ) {
$results[$k] = true;
unset( $files[$k] );
- } elseif( self::isVirtualUrl( $f ) ) {
+ } elseif ( self::isVirtualUrl( $f ) ) {
# @todo FIXME: We need to be able to handle virtual
# URLs better, at least when we know they refer to the
# same repo.
$data = $this->fetchImageQuery( array( 'titles' => implode( $files, '|' ),
'prop' => 'imageinfo' ) );
- if( isset( $data['query']['pages'] ) ) {
+ if ( isset( $data['query']['pages'] ) ) {
$i = 0;
- foreach( $files as $key => $file ) {
+ foreach ( $files as $key => $file ) {
$results[$key] = $this->mFileExists[$key] = !isset( $data['query']['pages'][$i]['missing'] );
$i++;
}
$query = array_merge( $query,
array(
- 'format' => 'json',
- 'action' => 'query',
+ 'format' => 'json',
+ 'action' => 'query',
'redirects' => 'true'
) );
if ( $this->mApiBase ) {
$url = $this->makeUrl( $query, 'api' );
}
- if( !isset( $this->mQueryCache[$url] ) ) {
+ if ( !isset( $this->mQueryCache[$url] ) ) {
$key = $this->getLocalCacheKey( 'ForeignAPIRepo', 'Metadata', md5( $url ) );
$data = $wgMemc->get( $key );
- if( !$data ) {
+ if ( !$data ) {
$data = self::httpGet( $url );
if ( !$data ) {
return null;
$wgMemc->set( $key, $data, 3600 );
}
- if( count( $this->mQueryCache ) > 100 ) {
+ if ( count( $this->mQueryCache ) > 100 ) {
// Keep the cache from growing infinitely
$this->mQueryCache = array();
}
* @return bool|array
*/
function getImageInfo( $data ) {
- if( $data && isset( $data['query']['pages'] ) ) {
- foreach( $data['query']['pages'] as $info ) {
- if( isset( $info['imageinfo'][0] ) ) {
+ if ( $data && isset( $data['query']['pages'] ) ) {
+ foreach ( $data['query']['pages'] as $info ) {
+ if ( isset( $info['imageinfo'][0] ) ) {
return $info['imageinfo'][0];
}
}
*/
function findBySha1( $hash ) {
$results = $this->fetchImageQuery( array(
- 'aisha1base36' => $hash,
- 'aiprop' => ForeignAPIFile::getProps(),
- 'list' => 'allimages', ) );
+ 'aisha1base36' => $hash,
+ 'aiprop' => ForeignAPIFile::getProps(),
+ 'list' => 'allimages',
+ ) );
$ret = array();
if ( isset( $results['query']['allimages'] ) ) {
foreach ( $results['query']['allimages'] as $img ) {
// 1.14 was broken, doesn't return name attribute
- if( !isset( $img['name'] ) ) {
+ if ( !isset( $img['name'] ) ) {
continue;
}
$ret[] = new ForeignAPIFile( Title::makeTitle( NS_FILE, $img['name'] ), $this, $img );
'iiprop' => 'url|timestamp',
'iiurlwidth' => $width,
'iiurlheight' => $height,
- 'iiurlparam' => $otherParams,
+ 'iiurlparam' => $otherParams,
'prop' => 'imageinfo' ) );
$info = $this->getImageInfo( $data );
- if( $data && $info && isset( $info['thumburl'] ) ) {
+ if ( $data && $info && isset( $info['thumburl'] ) ) {
wfDebug( __METHOD__ . " got remote thumb " . $info['thumburl'] . "\n" );
$result = $info;
return $info['thumburl'];
/* Get the array of urls that we already know */
$knownThumbUrls = $wgMemc->get( $key );
- if( !$knownThumbUrls ) {
+ if ( !$knownThumbUrls ) {
/* No knownThumbUrls for this file */
$knownThumbUrls = array();
} else {
- if( isset( $knownThumbUrls[$sizekey] ) ) {
+ if ( isset( $knownThumbUrls[$sizekey] ) ) {
wfDebug( __METHOD__ . ': Got thumburl from local cache: ' .
"{$knownThumbUrls[$sizekey]} \n" );
return $knownThumbUrls[$sizekey];
$metadata = null;
$foreignUrl = $this->getThumbUrl( $name, $width, $height, $metadata, $params );
- if( !$foreignUrl ) {
+ if ( !$foreignUrl ) {
wfDebug( __METHOD__ . " Could not find thumburl\n" );
return false;
}
// We need the same filename as the remote one :)
$fileName = rawurldecode( pathinfo( $foreignUrl, PATHINFO_BASENAME ) );
- if( !$this->validateFilename( $fileName ) ) {
+ if ( !$this->validateFilename( $fileName ) ) {
wfDebug( __METHOD__ . " The deduced filename $fileName is not safe\n" );
return false;
}
$localFilename = $localPath . "/" . $fileName;
$localUrl = $this->getZoneUrl( 'thumb' ) . "/" . $this->getHashPath( $name ) . rawurlencode( $name ) . "/" . rawurlencode( $fileName );
- if( $backend->fileExists( array( 'src' => $localFilename ) )
- && isset( $metadata['timestamp'] ) )
- {
+ if ( $backend->fileExists( array( 'src' => $localFilename ) )
+ && isset( $metadata['timestamp'] ) ) {
wfDebug( __METHOD__ . " Thumbnail was already downloaded before\n" );
$modified = $backend->getFileTimestamp( array( 'src' => $localFilename ) );
$remoteModified = strtotime( $metadata['timestamp'] );
$current = time();
$diff = abs( $modified - $current );
- if( $remoteModified < $modified && $diff < $this->fileCacheExpiry ) {
+ if ( $remoteModified < $modified && $diff < $this->fileCacheExpiry ) {
/* Use our current and already downloaded thumbnail */
$knownThumbUrls[$sizekey] = $localUrl;
$wgMemc->set( $key, $knownThumbUrls, $this->apiThumbCacheExpiry );
/* There is a new Commons file, or existing thumbnail older than a month */
}
$thumb = self::httpGet( $foreignUrl );
- if( !$thumb ) {
+ if ( !$thumb ) {
wfDebug( __METHOD__ . " Could not download thumb\n" );
return false;
}
# @todo FIXME: Delete old thumbs that aren't being used. Maintenance script?
$backend->prepare( array( 'dir' => dirname( $localFilename ) ) );
$params = array( 'dst' => $localFilename, 'content' => $thumb );
- if( !$backend->quickCreate( $params )->isOK() ) {
+ if ( !$backend->quickCreate( $params )->isOK() ) {
wfDebug( __METHOD__ . " could not write to thumb path '$localFilename'\n" );
return $foreignUrl;
}
$this->dbConn = DatabaseBase::factory( $this->dbType,
array(
'host' => $this->dbServer,
- 'user' => $this->dbUser,
+ 'user' => $this->dbUser,
'password' => $this->dbPassword,
'dbname' => $this->dbName,
'flags' => $this->dbFlags,
} // else $cachedValue is false or null: cache miss
$id = $this->getArticleID( $title );
- if( !$id ) {
+ if ( !$id ) {
$wgMemc->set( $memcKey, " ", $expiry );
return false;
}
__METHOD__
);
- if( $row && $row->rd_namespace == NS_FILE ) {
+ if ( $row && $row->rd_namespace == NS_FILE ) {
$targetTitle = Title::makeTitle( $row->rd_namespace, $row->rd_title );
$wgMemc->set( $memcKey, $targetTitle->getDBkey(), $expiry );
return $targetTitle;
* @return bool|int|mixed
*/
protected function getArticleID( $title ) {
- if( !$title instanceof Title ) {
+ if ( !$title instanceof Title ) {
return 0;
}
$dbr = $this->getSlaveDB();
* @return array An Array of arrays or iterators of file objects and the hash as key
*/
function findBySha1s( array $hashes ) {
- if( !count( $hashes ) ) {
+ if ( !count( $hashes ) ) {
return array(); //empty parameter
}
}
$redir = $this->localRepo->checkRedirect( $title );
- if( $redir ) {
+ if ( $redir ) {
return $redir;
}
foreach ( $this->foreignRepos as $repo ) {
if ( !$file ) {
foreach ( $this->foreignRepos as $repo ) {
$file = $repo->findFileFromKey( $hash, $options );
- if ( $file ) break;
+ if ( $file ) {
+ break;
+ }
}
}
return $file;
$result = array_merge_recursive( $result, $repo->findBySha1s( $hashes ) );
}
//sort the merged (and presorted) sublist of each hash
- foreach( $result as $hash => $files ) {
+ foreach ( $result as $hash => $files ) {
usort( $result[$hash], 'File::compare' );
}
return $result;
* @return bool
*/
function forEachForeignRepo( $callback, $params = array() ) {
- foreach( $this->foreignRepos as $repo ) {
+ foreach ( $this->foreignRepos as $repo ) {
$args = array_merge( array( $repo ), $params );
- if( call_user_func_array( $callback, $args ) ) {
+ if ( call_user_func_array( $callback, $args ) ) {
return true;
}
}
$this->exists = false;
$this->sha1 = '';
- if( $title instanceof Title ) {
+ if ( $title instanceof Title ) {
$this->title = File::normalizeTitle( $title, 'exception' );
$this->name = $title->getDBkey();
}
}
$conds = array();
- if( $this->id > 0 ) {
+ if ( $this->id > 0 ) {
$conds['fa_id'] = $this->id;
}
- if( $this->key ) {
+ if ( $this->key ) {
$conds['fa_storage_group'] = $this->group;
$conds['fa_storage_key'] = $this->key;
}
- if( $this->title ) {
+ if ( $this->title ) {
$conds['fa_name'] = $this->title->getDBkey();
}
- if( !count( $conds ) ) {
+ if ( !count( $conds ) ) {
throw new MWException( "No specific information for retrieving archived file" );
}
- if( !$this->title || $this->title->getNamespace() == NS_FILE ) {
+ if ( !$this->title || $this->title->getNamespace() == NS_FILE ) {
$this->dataLoaded = true; // set it here, to have also true on miss
$dbr = wfGetDB( DB_SLAVE );
$row = $dbr->selectRow(
$this->user_text = $row->fa_user_text;
$this->timestamp = $row->fa_timestamp;
$this->deleted = $row->fa_deleted;
- if( isset( $row->fa_sha1 ) ) {
+ if ( isset( $row->fa_sha1 ) ) {
$this->sha1 = $row->fa_sha1;
} else {
// old row, populate from key
*/
public function getUser() {
$this->load();
- if( $this->isDeleted( File::DELETED_USER ) ) {
+ if ( $this->isDeleted( File::DELETED_USER ) ) {
return 0;
} else {
return $this->user;
*/
public function getUserText() {
$this->load();
- if( $this->isDeleted( File::DELETED_USER ) ) {
+ if ( $this->isDeleted( File::DELETED_USER ) ) {
return 0;
} else {
return $this->user_text;
*/
public function getDescription() {
$this->load();
- if( $this->isDeleted( File::DELETED_COMMENT ) ) {
+ if ( $this->isDeleted( File::DELETED_COMMENT ) ) {
return 0;
} else {
return $this->description;
'mpeg' => 'mpg',
'tiff' => 'tif',
'ogv' => 'ogg' );
- if( isset( $squish[$lower] ) ) {
+ if ( isset( $squish[$lower] ) ) {
return $squish[$lower];
- } elseif( preg_match( '/^[0-9a-z]+$/', $lower ) ) {
+ } elseif ( preg_match( '/^[0-9a-z]+$/', $lower ) ) {
return $lower;
} else {
return '';
* @return array ("text", "html") etc
*/
public static function splitMime( $mime ) {
- if( strpos( $mime, '/' ) !== false ) {
+ if ( strpos( $mime, '/' ) !== false ) {
return explode( '/', $mime, 2 );
} else {
return array( $mime, 'unknown' );
*/
static function newFromTitle( Title $title, $repo ) {
$data = $repo->fetchImageQuery( array(
- 'titles' => 'File:' . $title->getDBkey(),
- 'iiprop' => self::getProps(),
- 'prop' => 'imageinfo',
+ 'titles' => 'File:' . $title->getDBkey(),
+ 'iiprop' => self::getProps(),
+ 'prop' => 'imageinfo',
'iimetadataversion' => MediaHandler::getMetadataVersion()
) );
$info = $repo->getImageInfo( $data );
- if( $info ) {
+ if ( $info ) {
$lastRedirect = isset( $data['query']['redirects'] )
? count( $data['query']['redirects'] ) - 1
: -1;
- if( $lastRedirect >= 0 ) {
+ if ( $lastRedirect >= 0 ) {
$newtitle = Title::newFromText( $data['query']['redirects'][$lastRedirect]['to'] );
$img = new self( $newtitle, $repo, $info, true );
- if( $img ) {
+ if ( $img ) {
$img->redirectedFrom( $title->getDBkey() );
}
} else {
* @return bool|MediaTransformOutput
*/
function transform( $params, $flags = 0 ) {
- if( !$this->canRender() ) {
+ if ( !$this->canRender() ) {
// show icon
return parent::transform( $params, $flags );
}
* @return array
*/
public static function parseMetadata( $metadata ) {
- if( !is_array( $metadata ) ) {
+ if ( !is_array( $metadata ) ) {
return $metadata;
}
$ret = array();
- foreach( $metadata as $meta ) {
+ foreach ( $metadata as $meta ) {
$ret[$meta['name']] = self::parseMetadata( $meta['value'] );
}
return $ret;
* @return string
*/
function getMimeType() {
- if( !isset( $this->mInfo['mime'] ) ) {
+ if ( !isset( $this->mInfo['mime'] ) ) {
$magic = MimeMagic::singleton();
$this->mInfo['mime'] = $magic->guessTypesForExtension( $this->getExtension() );
}
$dbw->update( 'image',
array(
- 'img_size' => $this->size, // sanity
- 'img_width' => $this->width,
- 'img_height' => $this->height,
- 'img_bits' => $this->bits,
+ 'img_size' => $this->size, // sanity
+ 'img_width' => $this->width,
+ 'img_height' => $this->height,
+ 'img_bits' => $this->bits,
'img_media_type' => $this->media_type,
'img_major_mime' => $major,
'img_minor_mime' => $minor,
- 'img_metadata' => $this->metadata,
- 'img_sha1' => $this->sha1,
+ 'img_metadata' => $this->metadata,
+ 'img_sha1' => $this->sha1,
),
array( 'img_name' => $this->getName() ),
__METHOD__
$oldKey = $this->repo->getSharedCacheKey( 'oldfile', $hashedName );
// Must purge thumbnails for old versions too! bug 30192
- foreach( $this->getHistory() as $oldFile ) {
+ foreach ( $this->getHistory() as $oldFile ) {
$oldFile->purgeThumbnails();
}
// Purge the squid
if ( $wgUseSquid ) {
$urls = array();
- foreach( $files as $file ) {
+ foreach ( $files as $file ) {
$urls[] = $this->getArchiveThumbUrl( $archiveName, $file );
}
SquidUpdate::purge( $urls );
// Always purge all files from squid regardless of handler filters
if ( $wgUseSquid ) {
$urls = array();
- foreach( $files as $file ) {
+ foreach ( $files as $file ) {
$urls[] = $this->getThumbUrl( $file );
}
array_shift( $urls ); // don't purge directory
# doesn't deadlock. SELECT FOR UPDATE causes a deadlock for every race condition.
$dbw->insert( 'image',
array(
- 'img_name' => $this->getName(),
- 'img_size' => $this->size,
- 'img_width' => intval( $this->width ),
- 'img_height' => intval( $this->height ),
- 'img_bits' => $this->bits,
- 'img_media_type' => $this->media_type,
- 'img_major_mime' => $this->major_mime,
- 'img_minor_mime' => $this->minor_mime,
- 'img_timestamp' => $timestamp,
+ 'img_name' => $this->getName(),
+ 'img_size' => $this->size,
+ 'img_width' => intval( $this->width ),
+ 'img_height' => intval( $this->height ),
+ 'img_bits' => $this->bits,
+ 'img_media_type' => $this->media_type,
+ 'img_major_mime' => $this->major_mime,
+ 'img_minor_mime' => $this->minor_mime,
+ 'img_timestamp' => $timestamp,
'img_description' => $comment,
- 'img_user' => $user->getId(),
- 'img_user_text' => $user->getName(),
- 'img_metadata' => $this->metadata,
- 'img_sha1' => $this->sha1
+ 'img_user' => $user->getId(),
+ 'img_user_text' => $user->getName(),
+ 'img_metadata' => $this->metadata,
+ 'img_sha1' => $this->sha1
),
__METHOD__,
'IGNORE'
*/
function getDescriptionText() {
$revision = Revision::newFromTitle( $this->title, false, Revision::READ_NORMAL );
- if ( !$revision ) return false;
+ if ( !$revision ) {
+ return false;
+ }
$content = $revision->getContent();
- if ( !$content ) return false;
+ if ( !$content ) {
+ return false;
+ }
$pout = $content->getParserOutput( $this->title, null, new ParserOptions() );
return $pout->getText();
}
$deletedRel = $this->file->repo->getDeletedHashPath( $row->fa_storage_key ) . $row->fa_storage_key;
$deletedUrl = $this->file->repo->getVirtualUrl() . '/deleted/' . $deletedRel;
- if( isset( $row->fa_sha1 ) ) {
+ if ( isset( $row->fa_sha1 ) ) {
$sha1 = $row->fa_sha1;
} else {
// old row, populate from key
*/
public function execute() {
$vars = Installer::getExistingLocalSettings();
- if( $vars ) {
+ if ( $vars ) {
$this->showStatusMessage(
Status::newFatal( "config-localsettings-cli-upgrade" )
);
}
$this->db->selectDB( $this->getVar( 'wgDBname' ) );
- if( $this->db->tableExists( 'archive', __METHOD__ ) ) {
+ if ( $this->db->tableExists( 'archive', __METHOD__ ) ) {
$status->warning( 'config-install-tables-exist' );
$this->enableLB();
return $status;
$this->db->begin( __METHOD__ );
$error = $this->db->sourceFile( $this->db->getSchemaPath() );
- if( $error !== true ) {
+ if ( $error !== true ) {
$this->db->reportQueryError( $error, 0, '', __METHOD__ );
$this->db->rollback( __METHOD__ );
$status->fatal( 'config-install-tables-failed', $error );
$this->db->commit( __METHOD__ );
}
// Resume normal operations
- if( $status->isOk() ) {
+ if ( $status->isOk() ) {
$this->enableLB();
}
return $status;
$this->setVar( 'wgDBpassword', $this->getVar( '_InstallPassword' ) );
}
- if( $this->getVar( '_CreateDBAccount' ) && strval( $this->getVar( 'wgDBpassword' ) ) == '' ) {
+ if ( $this->getVar( '_CreateDBAccount' ) && strval( $this->getVar( 'wgDBpassword' ) ) == '' ) {
return Status::newFatal( 'config-db-password-empty', $this->getVar( 'wgDBuser' ) );
}
}
$this->db->selectDB( $this->getVar( 'wgDBname' ) );
- if( $this->db->selectRow( 'interwiki', '*', array(), __METHOD__ ) ) {
+ if ( $this->db->selectRow( 'interwiki', '*', array(), __METHOD__ ) ) {
$status->warning( 'config-install-interwiki-exists' );
return $status;
}
if ( !$rows ) {
return Status::newFatal( 'config-install-interwiki-list' );
}
- foreach( $rows as $row ) {
+ foreach ( $rows as $row ) {
$row = preg_replace( '/^\s*([^#]*?)\s*(#.*)?$/', '\\1', $row ); // strip comments - whee
- if ( $row == "" ) continue;
+ if ( $row == "" ) {
+ continue;
+ }
$row .= "||";
$interwikis[] = array_combine(
array( 'iw_prefix', 'iw_url', 'iw_local', 'iw_api', 'iw_wikiid' ),
*/
public static function newForDB( &$db, $shared = false, $maintenance = null ) {
$type = $db->getType();
- if( in_array( $type, Installer::getDBTypes() ) ) {
+ if ( in_array( $type, Installer::getDBTypes() ) ) {
$class = ucfirst( $type ) . 'Updater';
return new $class( $db, $shared, $maintenance );
} else {
return;
}
global $wgCommandLineMode;
- if( !$wgCommandLineMode ) {
+ if ( !$wgCommandLineMode ) {
$str = htmlspecialchars( $str );
}
echo $str;
$updates = $this->updatesSkipped;
$this->updatesSkipped = array();
- foreach( $updates as $funcList ) {
+ foreach ( $updates as $funcList ) {
$func = $funcList[0];
$arg = $funcList[1];
$origParams = $funcList[2];
$this->setAppliedUpdates( $wgVersion, $this->updates );
- if( $this->fileHandle ) {
+ if ( $this->fileHandle ) {
$this->skipSchema = false;
$this->writeSchemaUpdateFile();
$this->setAppliedUpdates( "$wgVersion-schema", $this->updatesSkipped );
foreach ( $updates as $params ) {
$origParams = $params;
$func = array_shift( $params );
- if( !is_array( $func ) && method_exists( $this, $func ) ) {
+ if ( !is_array( $func ) && method_exists( $this, $func ) ) {
$func = array( $this, $func );
} elseif ( $passSelf ) {
array_unshift( $params, $this );
}
$ret = call_user_func_array( $func, $params );
flush();
- if( $ret !== false ) {
+ if ( $ret !== false ) {
$updatesDone[] = $origParams;
} else {
$updatesSkipped[] = array( $func, $params, $origParams );
*/
protected function setAppliedUpdates( $version, $updates = array() ) {
$this->db->clearFlag( DBO_DDLMODE );
- if( !$this->canUseNewUpdatelog() ) {
+ if ( !$this->canUseNewUpdatelog() ) {
return;
}
$key = "updatelist-$version-" . time();
public function insertUpdateRow( $key, $val = null ) {
$this->db->clearFlag( DBO_DDLMODE );
$values = array( 'ul_key' => $key );
- if( $val && $this->canUseNewUpdatelog() ) {
+ if ( $val && $this->canUseNewUpdatelog() ) {
$values['ul_value'] = $val;
}
$this->db->insert( 'updatelog', $values, __METHOD__, 'IGNORE' );
*/
public function appendLine( $line ) {
$line = rtrim( $line ) . ";\n";
- if( fwrite( $this->fileHandle, $line ) === false ) {
+ if ( fwrite( $this->fileHandle, $line ) === false ) {
throw new MWException( "trouble writing file" );
}
return false;
if ( !$isFullPath ) {
$path = $this->db->patchPath( $path );
}
- if( $this->fileHandle !== null ) {
+ if ( $this->fileHandle !== null ) {
$this->copyFile( $path );
} else {
$this->db->sourceFile( $path );
if ( !$this->db->tableExists( $table, __METHOD__ ) ) {
$this->output( "...skipping: '$table' table doesn't exist yet.\n" );
- } else if ( $this->db->indexExists( $table, $index, __METHOD__ ) ) {
+ } elseif ( $this->db->indexExists( $table, $index, __METHOD__ ) ) {
$this->output( "...index $index already set on $table table.\n" );
} else {
return $this->applyPatch( $patch, $fullpath, "Adding index $index to table $table" );
$this->output( "...$table table does not exist, skipping modify field patch.\n" );
} elseif ( !$this->db->fieldExists( $table, $field, __METHOD__ ) ) {
$this->output( "...$field field does not exist in $table table, skipping modify field patch.\n" );
- } elseif( $this->updateRowExists( $updateKey ) ) {
+ } elseif ( $this->updateRowExists( $updateKey ) ) {
$this->output( "...$field in table $table already modified by patch $patch.\n" );
} else {
$this->insertUpdateRow( $updateKey );
* Migrates user options from the user table blob to user_properties
*/
protected function doMigrateUserOptions() {
- if( $this->db->tableExists( 'user_properties' ) ) {
+ if ( $this->db->tableExists( 'user_properties' ) ) {
$cl = $this->maintenance->runChild( 'ConvertUserOptions', 'convertUserOptions.php' );
$cl->execute();
$this->output( "done.\n" );
/** Czech (česky)
* @author Danny B.
+ * @author Jezevec
* @author Mormegil
* @author 아라
*/
'config-mod-security' => "'''Upozornění''': váš webový server má zapnuto [http://modsecurity.org/ mod_security]. Při chybné konfiguraci může způsobovat potíže MediaWiki či dalším programům, které umožňují ukládat libovolný obsah.
Pokud narazíte na náhodné chyby, podívejte se do [http://modsecurity.org/documentation/ dokumentace mod_security] nebo kontaktujte technickou podporu vašeho poskytovatele.",
'config-diff3-bad' => 'Nebyl nalezen GNU diff3.',
+ 'config-git' => 'Nalezen software pro správu verzí Git: <code>$1</code>.',
+ 'config-git-bad' => 'Software pro správu verzí Git nebyl nalezen.',
'config-imagemagick' => 'Nalezen ImageMagick: <code>$1</code>.
Pokud povolíte načítání souborů, bude zapnuto vytváření náhledů.',
'config-gd' => 'Nalezena vestavěná grafická knihovna GD.
'config-mod-security' => "'''Warnung:''' Auf dem Webserver wurde [http://modsecurity.org/ ModSecurity] aktiviert. Sofern falsch konfiguriert, kann dies zu Problemen mit MediaWiki sowie anderer Software auf dem Server führen und es Benutzern ermöglichen beliebige Inhalte im Wiki einzustellen.
Für weitere Informationen empfehlen wir die [http://modsecurity.org/documentation/ Dokumentation zu ModSecurity] oder den Kontakt zum Hoster, sofern Fehler auftreten.",
'config-diff3-bad' => 'GNU diff3 wurde nicht gefunden.',
+ 'config-git' => 'Die Git-Versionsverwaltungssoftware wurde gefunden: <code>$1</code>.',
+ 'config-git-bad' => 'Die Git-Versionsverwaltungssoftware wurde nicht gefunden.',
'config-imagemagick' => 'ImageMagick wurde gefunden: <code>$1</code>.
Miniaturansichten von Bildern werden möglich sein, sobald das Hochladen von Dateien aktiviert wurde.',
'config-gd' => 'Die im System integrierte GD-Grafikbibliothek wurde gefunden.
'config-mod-security' => "'''Attention''': Votre serveur web a [http://modsecurity.org/ mod_security] activé. S&il est mal configuré, cela peut poser des problèmes à MediaWiki ou à d'autres applications qui permettent aux utilisateurs de publier un contenu quelconque.
Reportez-vous à [http://modsecurity.org/documentation/ la documentation de mod_security] ou contactez le support de votre hébergeur si vous rencontrez des erreurs aléatoires.",
'config-diff3-bad' => 'GNU diff3 introuvable.',
+ 'config-git' => 'Logiciel de contrôle de version Git trouvé : <code>$1</code>.',
+ 'config-git-bad' => 'Logiciel de contrôle de version Git non trouvé.',
'config-imagemagick' => "ImageMagick trouvé : <code>$1</code>.
La miniaturisation d'images sera activée si vous activez le téléversement de fichiers.",
'config-gd' => "La bibliothèque graphique GD intégrée a été trouvée.
'config-mod-security' => "'''Atención:''' O seu servidor web ten o [http://modsecurity.org/ mod_security] activado. Se estivese mal configurado, pode causar problemas a MediaWiki ou calquera outro software que permita aos usuarios publicar contidos arbitrarios.
Olle a [http://modsecurity.org/documentation/ documentación do mod_security] ou póñase en contacto co soporte do seu servidor se atopa erros aleatorios.",
'config-diff3-bad' => 'GNU diff3 non se atopou.',
+ 'config-git' => 'Atopouse o software de control da versión de Git: <code>$1</code>.',
+ 'config-git-bad' => 'Non se atopou o software de control da versión de Git.',
'config-imagemagick' => 'ImageMagick atopado: <code>$1</code>.
As miniaturas de imaxes estarán dispoñibles se activa as cargas.',
'config-gd' => 'Atopouse a biblioteca gráfica GD integrada.
);
/** Gujarati (ગુજરાતી)
+ * @author Ashok modhvadia
* @author Dineshjk
*/
$messages['gu'] = array(
== શરૂઆતના તબક્કે ==
* [//www.mediawiki.org/wiki/Manual:Configuration_settings કોનફીગ્યુરેશન સેટીંગ્સની યાદી]
* [//www.mediawiki.org/wiki/Manual:FAQ વારંવાર પુછાતા પ્રશ્નો]
-* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce મિડીયાવિકિ રીલીઝ મેઇલીંગ લીસ્ટ]',
+* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce મિડીયાવિકિ રીલીઝ મેઇલીંગ લીસ્ટ]
+* [//www.mediawiki.org/wiki/Localisation#Translation_resources Localise MediaWiki for your language]',
);
/** Manx (Gaelg)
'config-no-cache' => "'''警告:''' [http://www.php.net/apc APC]、[http://xcache.lighttpd.net/ XCache]、[http://www.iis.net/download/WinCacheForPhp WinCache] のいずれも見つかりませんでした。
オブジェクトのキャッシュは有効化されません。",
'config-diff3-bad' => 'GNU diff3 が見つかりません。',
+ 'config-git' => 'バージョン管理ソフトウェア Git が見つかりました: <code>$1</code>',
+ 'config-git-bad' => 'バージョン管理ソフトウェア Git が見つかりません。',
'config-imagemagick' => 'ImageMagickが見つかりました: <code>$1</code>。
アップロードが有効であれば、画像のサムネイルを利用できます。',
'config-gd' => 'GD画像ライブラリが内蔵されていることが確認されました。
MediaWiki bruch Funxjohne en däm Modul un deiht et esu nit.
Wann De <i lang="en">Mandrake</i> aam loufehäs, donn dat Pakätt <code lang="en">php-xml</code> enstalleere.',
'config-pcre' => 'Dem PHP sing Modul för <i lang="en">PCRE</i> schingk ze fähle.
-MediaWiki deiht et nit ohne de Funxjohne för de <i lang="en">Perl-compatible regular expressions</i>.',
+MediaWiki deiht et nit der ohne de Funxjohne för de rejolähre Ußdrök vun dä Zoot, wi <i lang="en">Perl</i> se kännt.',
'config-pcre-no-utf8' => "'''Dä:''' Et PHP-Modul <i lang=\"en\">PCRE</i> schingk ohne de <i lang=\"en\">PCRE_UTF8</i>-Aandeile övversaz ze sin.
MediaWiki bruch dä UTF-8-Krohm ävver, öm ohne Fähler loufe ze künne.",
'config-memory-raised' => 'Der jrühzte zohjelasse Shpeisherbedarf vum PHP, et <code lang="en">memory_limit</code>, shtund op $1 un es op $2 erop jesaz woode.',
'config-type-postgres' => '<i lang="en">PostgreSQL</i>',
'config-type-sqlite' => '<i lang="en">SQLite</i>',
'config-type-oracle' => '<i lang="en">Oracle</i>',
- 'config-type-ibm_db2' => 'Dä <i lang="en">IBM</i> ier <i lang="en">DB2</i>',
'config-support-info' => 'MediaWiki kann met heh dä Daatebangk_Süßteeme zosamme jonn:
$1
'config-support-postgres' => '* <i lang="en">$1</i> es e bikannt Daatebangksüßteem met offe Quälltäxde, un en och en Wahl nävve <i lang="en">MySQL</i> ([http://www.php.net/manual/de/pgsql.installation.php Aanleidung för et Övversäze un Enreeschte von PHP met <i lang="en">PostgreSQL</i> dobei, op Deutsch]) Et sinn_er ävver paa klein Fählershe bekannt, um kunne dat em Momang för et reschtijje Werke nit emfähle.',
'config-support-sqlite' => '* <i lang="en">$1</i> es e eijfach Daatebangksüßteem, wat joot ongershtöz weed. ([http://www.php.net/manual/de/pdo.installation.php Aanleidong för et Övversäze un Enreeschte von PHP met <i lang="en">SQLite</i> dobei, op Deutsch])',
'config-support-oracle' => '* <i lang="en">$1</i> es e jeschäfflesch Daatebangksüßteem för Ferme. ([http://www.php.net/manual/de/oci8.installation.php Aanleidong för et Övversäze un Enreeschte von PHP met <i lang="en">OCI8</i> dobei, op Deutsch])',
- 'config-support-ibm_db2' => '* $1 es en Datebengk för et Jeschäff un fö Ongernehme.', # Fuzzy
'config-header-mysql' => 'De Enshtällunge för de <i lang="en">MySQL</i> Daatebangk',
'config-header-postgres' => 'De Enshtällunge för de <i lang="en">PostgreSQL</i> Daatebangk',
'config-header-sqlite' => 'De Enshtällunge för de <i lang="en">SQLite</i> Daatebangk',
'config-header-oracle' => 'De Enshtällunge för de <i lang="en">Oracle</i> Daatebangk',
- 'config-header-ibm_db2' => 'De Enshtällunge för de <i lang="en">IBM</i> ier <i lang="en">DB2</i>',
'config-invalid-db-type' => 'Dat es en onjöltijje Zoot Daatebangk.',
'config-missing-db-name' => 'Do moß jät enjävve för dä Name vun dä Daatebangk.',
'config-missing-db-host' => 'Do moß jät enjävve för dä Name vun däm Rääschner met dä Daatebangk.',
Beim Shpeishere em '''UTF-8 Fomaat''' deiht et <i lang=\"en\">MySQL</i> der Zeishesaz un de Kodeerung vun dä Daate känne, un kann se akeraat aanzeije un ömwandelle,
allerdengs künne kein Zeishe ußerhalv vum [//de.wikipedia.org/wiki/Basic_Multilingual_Plane#Gliederung_in_Ebenen_und_Bl.C3.B6cke jrundlääje Knubbel för vill Shprooche (<i lang=\"en\">Basic Multilingual Plane — BMP</i>)] afjeshpeishert wääde.",
- 'config-ibm_db2-low-db-pagesize' => "De <i lang=\"en\">DB2</i> Daatebangk heh hät ene standattmääßeje Plaz för Tabälle met zoh klein Sigge. Dä Plaz en de Sigge moß '''32K''' udder mieh sin.",
'config-site-name' => 'Däm Wiki singe Name:',
'config-site-name-help' => 'Dä douch em Tittel vun de Brauserfinstere un aan ätlije andere Shtälle op.',
'config-site-name-blank' => 'Donn ene Name för di Sait aanjävve.',
'config-logo-help' => 'De Schtandart_Bedeen_Bovverfläsch vum MediaWiki hät e Logo bovve en der Eck met 135x160 Pixele.
Donn e zopaß Logo huh laade, un donn däm sing URL heh endraare.
-Wells De kei Logo han, draach heh nix en.',
+Wells De kei Logo han, draach heh nix en.', # Fuzzy
'config-instantcommons' => 'Donn <i lang="en">InstantCommons</i> zohlohße.',
'config-instantcommons-help' => '<i lang="en">[//www.mediawiki.org/wiki/InstantCommons InstantCommons]</i> es en Eijeschaff, di et för Wikis müjjelesch määt, Belder, Tondatteie un ander Meedijedatteie enzebenge, di op dä Webßait vun de <i lang="en">[//commons.wikimedia.org/ Wikimedia Commons]</i> ongerjebraat sin. Öm dat noze ze künne, moß dä ẞööver vum MediaWiki en Verbendung nohm Internet opnämme künne.
'config-memcache-noport' => 'Do has kein Pooz (<code lang="en">port</code>) Nommer aanjejovve för mem <code lang="en">memcached</code> ẞööver ze bruche: $1.
Wann De di Nommer nit weiß, der Shtandatt es 11211.',
'config-memcache-badport' => 'Dem <code lang="en">memcached</code> ẞööver singe Pooz (<code lang="en">port</code>) Nommere sullte zwesche $1 un $2 sin.',
- 'config-extensions' => 'Projramm-Zosätz (<i lang="en">extensions</i>)',
+ 'config-extensions' => 'Projramm-Zohsäz (<i lang="en">Extensions</i>)',
'config-extensions-help' => 'Di bovve opjeleß Zohsazprojramme för et MediaWiki sin em Verzeischneß <code lang="en">./extensions</code> ald ze fenge.
Do kann se heh un jez aanschallde, ävver se künnte noch zohsäzlesch Enshtellunge bruche.',
'config-mod-security' => "'''Предупредување''': на вашиот опслужувач има овозможено [http://modsecurity.org/ mod_security]. Ако не е поставено како што треба, ова може да предизвика проблеми кај МедијаВики и други програми што им овозможуваат на корисниците да објавуваат произволни содржини.
Погледнете ја [http://modsecurity.org/documentation/ mod_security документацијата] или обратете се кај домаќинот ако наидете на случајни грешки.",
'config-diff3-bad' => 'GNU diff3 не е пронајден.',
+ 'config-git' => 'Го пронајдов Git програмот за контрола на верзии: <code>$1</code>.',
+ 'config-git-bad' => 'Не го пронајдов Git-програмот за контрола на верзии.',
'config-imagemagick' => 'Пронајден е ImageMagick: <code>$1</code>.
Ако овозможите подигање, тогаш ќе биде овозможена минијатуризација на сликите.',
'config-gd' => 'Утврдив дека има вградена GD графичка библиотека.
'config-mod-security' => "'''Waarschuwing:''' uw webserver heeft de module [http://modsecurity.org/ mod_security] ingeschakeld. Als deze onjuist is ingesteld, kan dit problemen geven in combinatie met MediaWiki of andere software die gebruikers in staat stelt willekeurige inhoud te posten.
Lees de [http://modsecurity.org/documentation/ documentatie over mod_security] of neem contact op met de helpdesk van uw provider als u tegen problemen aanloopt.",
'config-diff3-bad' => 'GNU diff3 niet aangetroffen.',
+ 'config-git' => 'Versiecontrolesoftware git is aangetroffen: <code>$1</code>',
+ 'config-git-bad' => 'Geen git versiecontrolesoftware aangetroffen.',
'config-imagemagick' => 'ImageMagick aangetroffen: <code>$1</code>.
Het aanmaken van miniaturen van afbeeldingen wordt ingeschakeld als u uploaden inschakelt.',
'config-gd' => 'Ingebouwde GD grafische bibliotheek aangetroffen.
);
/** Urdu (اردو)
+ * @author Noor2020
* @author පසිඳු කාවින්ද
*/
$messages['ur'] = array(
'config-information' => 'معلومات',
+ 'config-git' => 'Git ورژن کنٹرول مصنع لطیف ملا: <code>$1</code> ۔',
+ 'config-git-bad' => 'GIT ورژن کنٹرول مصنع لطیف نہيں ملا ۔',
'config-profile-fishbowl' => 'صرف مجاز ایڈیٹرز',
'config-license-pd' => 'پبلک ڈومین',
'config-email-settings' => 'ای میل کی ترتیبات',
* @author Hydra
* @author Hzy980512
* @author Liangent
+ * @author Makecat
* @author PhiLiP
* @author Xiaomingyan
* @author Yfdyh000
Object caching is not enabled.",
'config-mod-security' => "'''警告''':您的服务器已启动[http://modsecurity.org/ mod_security]。若其配置错误, 会导致MediaWiki和其他软件的错误并允许用户任意发布内容。如果您遇到任何错误,请查阅[http://modsecurity.org/documentation/ mod_security文档]或联系您的客服。",
'config-diff3-bad' => '找不到GNU diff3。',
+ 'config-git' => '发现Git版本控制软件:<code>$1</code>',
+ 'config-git-bad' => 'Git版本控制软件未找到。',
'config-imagemagick' => '已找到ImageMagick:<code>$1</code>。如果你启用了上传功能,缩略图功能也将被启用。',
'config-gd' => '已找到内建的GD图形库。如果你启用了上传功能,缩略图功能也将被启用。',
'config-no-scaling' => '找不到GD库或ImageMagick。缩略图功能将不可用。',
'config-logo' => '标志URL:',
'config-logo-help' => '在MediaWiki的默认外观中,左侧栏菜单之上有一块135x160像素的标志区。请上传一幅相应大小的图像,并在此输入URL。
+你可以用<code>$wgStylePath</code>或<code>$wgScriptPath</code>来表示相对于这些位置的路径。
+
如果您不希望使用标志,请将本处留空。',
'config-instantcommons' => '启用即时共享资源',
'config-instantcommons-help' => '[//www.mediawiki.org/wiki/InstantCommons 即时共享资源]可以让wiki使用来自[//commons.wikimedia.org/ 维基共享资源]网站的图像、音频和其他媒体文件。要启用该功能,MediaWiki必须能够访问互联网。
*/
public function doEnvironmentChecks() {
$phpVersion = phpversion();
- if( version_compare( $phpVersion, self::MINIMUM_PHP_VERSION, '>=' ) ) {
+ if ( version_compare( $phpVersion, self::MINIMUM_PHP_VERSION, '>=' ) ) {
$this->showMessage( 'config-env-php', $phpVersion );
$good = true;
} else {
$good = false;
}
- if( $good ) {
+ if ( $good ) {
foreach ( $this->envChecks as $check ) {
$status = $this->$check();
if ( $status === false ) {
$_lsExists = file_exists( "$IP/LocalSettings.php" );
wfRestoreWarnings();
- if( !$_lsExists ) {
+ if ( !$_lsExists ) {
return false;
}
unset( $_lsExists );
* Environment check for register_globals.
*/
protected function envCheckRegisterGlobals() {
- if( wfIniGetBool( 'register_globals' ) ) {
+ if ( wfIniGetBool( 'register_globals' ) ) {
$this->showMessage( 'config-register-globals' );
}
}
* @return bool
*/
protected function envCheckMagicQuotes() {
- if( wfIniGetBool( "magic_quotes_runtime" ) ) {
+ if ( wfIniGetBool( "magic_quotes_runtime" ) ) {
$this->showError( 'config-magic-quotes-runtime' );
return false;
}
$n = wfShorthandToInteger( $limit );
- if( $n < $this->minMemorySize * 1024 * 1024 ) {
+ if ( $n < $this->minMemorySize * 1024 * 1024 ) {
$newLimit = "{$this->minMemorySize}M";
- if( ini_set( "memory_limit", $newLimit ) === false ) {
+ if ( ini_set( "memory_limit", $newLimit ) === false ) {
$this->showMessage( 'config-memory-bad', $limit );
} else {
$this->showMessage( 'config-memory-raised', $limit, $newLimit );
/**
* Environment check for setting the preferred PHP file extension.
+ * @return bool
*/
protected function envCheckExtension() {
// @todo FIXME: Detect this properly
}
/**
- * TODO: document
+ * Environment check for preferred locale in shell
* @return bool
*/
protected function envCheckShellLocale() {
}
/**
- * TODO: document
+ * Environment check for the permissions of the uploads directory
* @return bool
*/
protected function envCheckUploadsDirectory() {
protected function envCheckSuhosinMaxValueLength() {
$maxValueLength = ini_get( 'suhosin.get.max_value_length' );
if ( $maxValueLength > 0 ) {
- if( $maxValueLength < 1024 ) {
+ if ( $maxValueLength < 1024 ) {
# Only warn if the value is below the sane 1024
$this->showMessage( 'config-suhosin-max-value-length', $maxValueLength );
}
* We're going to prefer the pecl extension here unless
* utf8_normalize is more up to date.
*/
- if( $utf8 ) {
+ if ( $utf8 ) {
$useNormalizer = 'utf8';
$utf8 = utf8_normalize( $not_normal_c, UtfNormal::UNORM_NFC );
if ( $utf8 !== $normal_c ) {
$needsUpdate = true;
}
}
- if( $intl ) {
+ if ( $intl ) {
$useNormalizer = 'intl';
$intl = normalizer_normalize( $not_normal_c, Normalizer::FORM_C );
if ( $intl !== $normal_c ) {
}
// Uses messages 'config-unicode-using-php', 'config-unicode-using-utf8', 'config-unicode-using-intl'
- if( $useNormalizer === 'php' ) {
+ if ( $useNormalizer === 'php' ) {
$this->showMessage( 'config-unicode-pure-php-warning' );
} else {
$this->showMessage( 'config-unicode-using-' . $useNormalizer );
- if( $needsUpdate ) {
+ if ( $needsUpdate ) {
$this->showMessage( 'config-unicode-update-warning' );
}
}
* @return bool|string
*/
public static function locateExecutableInDefaultPaths( $names, $versionInfo = false ) {
- foreach( self::getPossibleBinPaths() as $path ) {
+ foreach ( self::getPossibleBinPaths() as $path ) {
$exe = self::locateExecutable( $path, $names, $versionInfo );
- if( $exe !== false ) {
+ if ( $exe !== false ) {
return $exe;
}
}
* @return array
*/
public function findExtensions() {
- if( $this->getVar( 'IP' ) === null ) {
+ if ( $this->getVar( 'IP' ) === null ) {
return array();
}
$dh = opendir( $extDir );
$exts = array();
while ( ( $file = readdir( $dh ) ) !== false ) {
- if( !is_dir( "$extDir/$file" ) ) {
+ if ( !is_dir( "$extDir/$file" ) ) {
continue;
}
- if( file_exists( "$extDir/$file/$file.php" ) ) {
+ if ( file_exists( "$extDir/$file/$file.php" ) ) {
$exts[] = $file;
}
}
require( "$IP/includes/DefaultSettings.php" );
- foreach( $exts as $e ) {
+ foreach ( $exts as $e ) {
require_once( "$IP/extensions/$e/$e.php" );
}
// Build the array of install steps starting from the core install list,
// then adding any callbacks that wanted to attach after a given step
- foreach( $coreInstallSteps as $step ) {
+ foreach ( $coreInstallSteps as $step ) {
$this->installSteps[] = $step;
- if( isset( $this->extraInstallSteps[$step['name']] ) ) {
+ if ( isset( $this->extraInstallSteps[$step['name']] ) ) {
$this->installSteps = array_merge(
$this->installSteps,
$this->extraInstallSteps[$step['name']]
}
// Prepend any steps that want to be at the beginning
- if( isset( $this->extraInstallSteps['BEGINNING'] ) ) {
+ if ( isset( $this->extraInstallSteps['BEGINNING'] ) ) {
$this->installSteps = array_merge(
$this->extraInstallSteps['BEGINNING'],
$this->installSteps
}
// Extensions should always go first, chance to tie into hooks and such
- if( count( $this->getVar( '_Extensions' ) ) ) {
+ if ( count( $this->getVar( '_Extensions' ) ) ) {
array_unshift( $this->installSteps,
array( 'name' => 'extensions', 'callback' => array( $this, 'includeExtensions' ) )
);
$installer = $this->getDBInstaller();
$installer->preInstall();
$steps = $this->getInstallSteps( $installer );
- foreach( $steps as $stepObj ) {
+ foreach ( $steps as $stepObj ) {
$name = $stepObj['name'];
call_user_func_array( $startCB, array( $name ) );
// If we've hit some sort of fatal, we need to bail.
// Callback already had a chance to do output above.
- if( !$status->isOk() ) {
+ if ( !$status->isOk() ) {
break;
}
}
- if( $status->isOk() ) {
+ if ( $status->isOk() ) {
$this->setVar( '_InstallDone', true );
}
return $installResults;
$user->addGroup( 'sysop' );
$user->addGroup( 'bureaucrat' );
- if( $this->getVar( '_AdminEmail' ) ) {
+ if ( $this->getVar( '_AdminEmail' ) ) {
$user->setEmail( $this->getVar( '_AdminEmail' ) );
}
$user->saveSettings();
}
$status = Status::newGood();
- if( $this->getVar( '_Subscribe' ) && $this->getVar( '_AdminEmail' ) ) {
+ if ( $this->getVar( '_Subscribe' ) && $this->getVar( '_AdminEmail' ) ) {
$this->subscribeToMediaWikiAnnounce( $status );
}
*/
private function subscribeToMediaWikiAnnounce( Status $s ) {
$params = array(
- 'email' => $this->getVar( '_AdminEmail' ),
+ 'email' => $this->getVar( '_AdminEmail' ),
'language' => 'en',
- 'digest' => 0
+ 'digest' => 0
);
// Mailman doesn't support as many languages as we do, so check to make
// sure their selected language is available
$myLang = $this->getVar( '_UserLang' );
- if( in_array( $myLang, $this->mediaWikiAnnounceLanguages ) ) {
+ if ( in_array( $myLang, $this->mediaWikiAnnounceLanguages ) ) {
$myLang = $myLang == 'pt-br' ? 'pt_BR' : $myLang; // rewrite to Mailman's pt_BR
$params['language'] = $myLang;
}
- if( MWHttpRequest::canMakeRequests() ) {
+ if ( MWHttpRequest::canMakeRequests() ) {
$res = MWHttpRequest::factory( $this->mediaWikiAnnounceUrl,
array( 'method' => 'POST', 'postData' => $params ) )->execute();
- if( !$res->isOK() ) {
+ if ( !$res->isOK() ) {
$s->warning( 'config-install-subscribe-fail', $res->getMessage() );
}
} else {
'wgEnotifWatchlist', 'wgEmailAuthentication', 'wgEnableUploads', 'wgUseInstantCommons'
);
- foreach( $confItems as $c ) {
+ foreach ( $confItems as $c ) {
$val = $installer->getVar( $c );
- if( in_array( $c, $boolItems ) ) {
+ if ( in_array( $c, $boolItems ) ) {
$val = wfBoolToStr( $val );
}
public function getText() {
$localSettings = $this->getDefaultText();
- if( count( $this->extensions ) ) {
+ if ( count( $this->extensions ) ) {
$localSettings .= "
# Enabled Extensions. Most extensions are enabled by including the base extension file here
# but check specific extension documentation for more details
# The following extensions were automatically enabled:\n";
- foreach( $this->extensions as $extName ) {
+ foreach ( $this->extensions as $extName ) {
$encExtName = self::escapePhpString( $extName );
$localSettings .= "require_once( \"\$IP/extensions/$encExtName/$encExtName.php\" );\n";
}
protected function buildMemcachedServerList() {
$servers = $this->values['_MemCachedServers'];
- if( !$servers ) {
+ if ( !$servers ) {
return 'array()';
} else {
$ret = 'array( ';
$servers = explode( ',', $servers );
- foreach( $servers as $srv ) {
+ foreach ( $servers as $srv ) {
$srv = trim( $srv );
$ret .= "'$srv', ";
}
* @return String
*/
protected function getDefaultText() {
- if( !$this->values['wgImageMagickConvertCommand'] ) {
+ if ( !$this->values['wgImageMagickConvertCommand'] ) {
$this->values['wgImageMagickConvertCommand'] = '/usr/bin/convert';
$magic = '#';
} else {
$magic = '';
}
- if( !$this->values['wgShellLocale'] ) {
+ if ( !$this->values['wgShellLocale'] ) {
$this->values['wgShellLocale'] = 'en_US.UTF-8';
$locale = '#';
} else {
//$rightsUrl = $this->values['wgRightsUrl'] ? '' : '#'; // TODO: Fixme, I'm unused!
$hashedUploads = $this->safeMode ? '' : '#';
$metaNamespace = '';
- if( $this->values['wgMetaNamespace'] !== $this->values['wgSitename'] ) {
+ if ( $this->values['wgMetaNamespace'] !== $this->values['wgSitename'] ) {
$metaNamespace = "\$wgMetaNamespace = \"{$this->values['wgMetaNamespace']}\";\n";
}
$groupRights = '';
- if( $this->groupPermissions ) {
+ if ( $this->groupPermissions ) {
$groupRights .= "# The following permissions were set based on your choice in the installer\n";
- foreach( $this->groupPermissions as $group => $rightArr ) {
+ foreach ( $this->groupPermissions as $group => $rightArr ) {
$group = self::escapePhpString( $group );
- foreach( $rightArr as $right => $perm ) {
+ foreach ( $rightArr as $right => $perm ) {
$right = self::escapePhpString( $right );
$groupRights .= "\$wgGroupPermissions['$group']['$right'] = " .
wfBoolToStr( $perm ) . ";\n";
$s .= $this->parent->getWarningBox( wfMessage( 'config-mysql-myisam-dep' )->text() );
$s .= Xml::closeElement( 'div' );
- if( $this->getVar( '_MysqlEngine' ) != 'MyISAM' ) {
+ if ( $this->getVar( '_MysqlEngine' ) != 'MyISAM' ) {
$s .= Xml::openElement( 'script', array( 'type' => 'text/javascript' ) );
$s .= '$(\'#dbMyisamWarning\').hide();';
$s .= Xml::closeElement( 'script' );
'itemAttribs' => array(
'MyISAM' => array(
'class' => 'showHideRadio',
- 'rel' => 'dbMyisamWarning'),
+ 'rel' => 'dbMyisamWarning'
+ ),
'InnoDB' => array(
'class' => 'hideShowRadio',
- 'rel' => 'dbMyisamWarning')
+ 'rel' => 'dbMyisamWarning'
+ )
)));
$s .= $this->parent->getHelpBox( 'config-mysql-engine-help' );
}
}
$conn = $status->value;
$dbName = $this->getVar( 'wgDBname' );
- if( !$conn->selectDB( $dbName ) ) {
+ if ( !$conn->selectDB( $dbName ) ) {
$conn->query( "CREATE DATABASE " . $conn->addIdentifierQuotes( $dbName ), __METHOD__ );
$conn->selectDB( $dbName );
}
*/
public function setupUser() {
$dbUser = $this->getVar( 'wgDBuser' );
- if( $dbUser == $this->getVar( '_InstallUser' ) ) {
+ if ( $dbUser == $this->getVar( '_InstallUser' ) ) {
return Status::newGood();
}
$status = $this->getConnection();
$tryToCreate = false;
}
- if( $tryToCreate ) {
+ if ( $tryToCreate ) {
$createHostList = array(
$server,
'localhost',
$createHostList = array_unique( $createHostList );
$escPass = $this->db->addQuotes( $password );
- foreach( $createHostList as $host ) {
+ foreach ( $createHostList as $host ) {
$fullName = $this->buildFullUserName( $dbUser, $host );
- if( !$this->userDefinitelyExists( $dbUser, $host ) ) {
+ if ( !$this->userDefinitelyExists( $dbUser, $host ) ) {
try{
$this->db->begin( __METHOD__ );
$this->db->query( "CREATE USER $fullName IDENTIFIED BY $escPass", __METHOD__ );
$this->db->commit( __METHOD__ );
$grantableNames[] = $fullName;
} catch( DBQueryError $dqe ) {
- if( $this->db->lastErrno() == 1396 /* ER_CANNOT_USER */ ) {
+ if ( $this->db->lastErrno() == 1396 /* ER_CANNOT_USER */ ) {
// User (probably) already exists
$this->db->rollback( __METHOD__ );
$status->warning( 'config-install-user-alreadyexists', $dbUser );
// Try to grant to all the users we know exist or we were able to create
$dbAllTables = $this->db->addIdentifierQuotes( $dbName ) . '.*';
- foreach( $grantableNames as $name ) {
+ foreach ( $grantableNames as $name ) {
try {
$this->db->begin( __METHOD__ );
$this->db->query( "GRANT ALL PRIVILEGES ON $dbAllTables TO $name", __METHOD__ );
return;
}
- if( $this->applyPatch( 'patch-fix-il_from.sql', false, "Fixing ancient broken imagelinks table." ) ) {
+ if ( $this->applyPatch( 'patch-fix-il_from.sql', false, "Fixing ancient broken imagelinks table." ) ) {
$this->output( "NOTE: you will have to run maintenance/refreshLinks.php after this." );
}
}
$this->output( wfTimestamp( TS_DB ) );
$this->output( "......checking for duplicate entries.\n" );
- list ( $cur, $old, $page, $revision, $text ) = $this->db->tableNamesN( 'cur', 'old', 'page', 'revision', 'text' );
+ list( $cur, $old, $page, $revision, $text ) = $this->db->tableNamesN( 'cur', 'old', 'page', 'revision', 'text' );
$rows = $this->db->query( "SELECT cur_title, cur_namespace, COUNT(cur_namespace) AS c
FROM $cur GROUP BY cur_title, cur_namespace HAVING c>1", __METHOD__ );
protected function doNamespaceSize() {
$tables = array(
- 'page' => 'page',
- 'archive' => 'ar',
+ 'page' => 'page',
+ 'archive' => 'ar',
'recentchanges' => 'rc',
- 'watchlist' => 'wl',
- 'querycache' => 'qc',
- 'logging' => 'log',
+ 'watchlist' => 'wl',
+ 'querycache' => 'qc',
+ 'logging' => 'log',
);
foreach ( $tables as $table => $prefix ) {
$field = $prefix . '_namespace';
foreach ( $groups as $group ) {
$this->db->insert( 'user_groups',
array(
- 'ug_user' => $row->ur_user,
+ 'ug_user' => $row->ur_user,
'ug_group' => $group ),
__METHOD__ );
}
$this->db->query( "UPDATE $page SET page_random = RAND() WHERE page_random = 0", __METHOD__ );
$rows = $this->db->affectedRows();
- if( $rows ) {
+ if ( $rows ) {
$this->output( "Set page_random to a random value on $rows rows where it was set to 0\n" );
} else {
$this->output( "...no page_random rows needed to be set\n" );
'callback' => array( $this, 'setupSchema' )
);
- if( $this->getVar( '_CreateDBAccount' ) ) {
+ if ( $this->getVar( '_CreateDBAccount' ) ) {
$this->parent->addInstallStep( $createDbAccount, 'database' );
}
$this->parent->addInstallStep( $commitCB, 'interwiki' );
$schema = $this->getVar( 'wgDBmwschema' );
$safeschema = $conn->addIdentifierQuotes( $schema );
$safeuser = $conn->addIdentifierQuotes( $this->getVar( 'wgDBuser' ) );
- if( !$conn->schemaExists( $schema ) ) {
+ if ( !$conn->schemaExists( $schema ) ) {
try {
$conn->query( "CREATE SCHEMA $safeschema AUTHORIZATION $safeuser" );
} catch ( DBQueryError $e ) {
*/
$conn = $status->value;
- if( $conn->tableExists( 'archive' ) ) {
+ if ( $conn->tableExists( 'archive' ) ) {
$status->warning( 'config-install-tables-exist' );
$this->enableLB();
return $status;
$conn->begin( __METHOD__ );
- if( !$conn->schemaExists( $schema ) ) {
+ if ( !$conn->schemaExists( $schema ) ) {
$status->fatal( 'config-install-pg-schema-not-exist' );
return $status;
}
$error = $conn->sourceFile( $conn->getSchemaPath() );
- if( $error !== true ) {
+ if ( $error !== true ) {
$conn->reportQueryError( $error, 0, '', __METHOD__ );
$conn->rollback( __METHOD__ );
$status->fatal( 'config-install-tables-failed', $error );
$conn->commit( __METHOD__ );
}
// Resume normal operations
- if( $status->isOk() ) {
+ if ( $status->isOk() ) {
$this->enableLB();
}
return $status;
# r15791 Change reserved word table names "user" and "text"
array( 'renameTable', 'user', 'mwuser' ),
array( 'renameTable', 'text', 'pagecontent' ),
- array( 'renameIndex', 'mwuser', 'user_pkey', 'mwuser_pkey'),
+ array( 'renameIndex', 'mwuser', 'user_pkey', 'mwuser_pkey' ),
array( 'renameIndex', 'mwuser', 'user_user_name_key', 'mwuser_user_name_key' ),
- array( 'renameIndex', 'pagecontent','text_pkey', 'pagecontent_pkey' ),
+ array( 'renameIndex', 'pagecontent', 'text_pkey', 'pagecontent_pkey' ),
# renamed sequences
array( 'renameSequence', 'ipblocks_ipb_id_val', 'ipblocks_ipb_id_seq' ),
),
'CREATE INDEX cl_sortkey ON "categorylinks" USING "btree" ("cl_to", "cl_sortkey", "cl_from")' ),
array( 'checkIndex', 'iwl_prefix_title_from', array(
- array('iwl_prefix', 'text_ops', 'btree', 0),
- array('iwl_title', 'text_ops', 'btree', 0),
- array('iwl_from', 'int4_ops', 'btree', 0),
+ array( 'iwl_prefix', 'text_ops', 'btree', 0 ),
+ array( 'iwl_title', 'text_ops', 'btree', 0 ),
+ array( 'iwl_from', 'int4_ops', 'btree', 0 ),
),
'CREATE INDEX iwl_prefix_title_from ON "iwlinks" USING "btree" ("iwl_prefix", "iwl_title", "iwl_from")' ),
array( 'checkIndex', 'logging_times', array(
array( 'checkOiNameConstraint' ),
array( 'checkPageDeletedTrigger' ),
array( 'checkRevUserFkey' ),
- array( 'dropIndex', 'ipblocks', 'ipb_address'),
+ array( 'dropIndex', 'ipblocks', 'ipb_address' ),
array( 'checkIndex', 'ipb_address_unique', array(
array( 'ipb_address', 'text_ops', 'btree', 0 ),
- array( 'ipb_user', 'int4_ops', 'btree', 0 ),
- array( 'ipb_auto', 'int2_ops', 'btree', 0 ),
+ array( 'ipb_user', 'int4_ops', 'btree', 0 ),
+ array( 'ipb_auto', 'int2_ops', 'btree', 0 ),
array( 'ipb_anon_only', 'int2_ops', 'btree', 0 ),
),
'CREATE UNIQUE INDEX ipb_address_unique ON ipblocks (ipb_address,ipb_user,ipb_auto,ipb_anon_only)' ),
if ( !$this->db->sequenceExists( $ns ) ) {
$this->output( "Creating sequence $ns\n" );
$this->db->query( "CREATE SEQUENCE $ns" );
- if( $pkey !== false ) {
+ if ( $pkey !== false ) {
$this->setDefault( $table, $pkey, '"nextval"(\'"' . $ns . '"\'::"regclass")' );
}
}
$old = $this->db->realTableName( $old, "quoted" );
$new = $this->db->realTableName( $new, "quoted" );
$this->db->query( "ALTER TABLE $old RENAME TO $new" );
- if( $patch !== false ) {
+ if ( $patch !== false ) {
$this->applyPatch( $patch );
}
}
exit( 1 );
}
- if ( $fi->type() === $newtype )
+ if ( $fi->type() === $newtype ) {
$this->output( "...column '$table.$field' is already of type '$newtype'\n" );
- else {
+ } else {
$this->output( "Changing column type of '$table.$field' from '{$fi->type()}' to '$newtype'\n" );
$sql = "ALTER TABLE $table ALTER $field TYPE $newtype";
if ( strlen( $default ) ) {
$result->fatal( 'config-outdated-sqlite', $db->getServerVersion(), self::MINIMUM_VERSION );
}
// Check for FTS3 full-text search module
- if( DatabaseSqlite::getFulltextSearchModule() != 'FTS3' ) {
+ if ( DatabaseSqlite::getFulltextSearchModule() != 'FTS3' ) {
$result->warning( 'config-no-fts3' );
}
return $result;
$this->exportVars();
$this->setupLanguage();
- if( ( $this->getVar( '_InstallDone' ) || $this->getVar( '_UpgradeDone' ) )
+ if ( ( $this->getVar( '_InstallDone' ) || $this->getVar( '_UpgradeDone' ) )
&& $this->request->getVal( 'localsettings' ) )
{
$this->request->response()->header( 'Content-type: application/x-httpd-php' );
$ls = InstallerOverrides::getLocalSettingsGenerator( $this );
$rightsProfile = $this->rightsProfiles[$this->getVar( '_RightsProfile' )];
- foreach( $rightsProfile as $group => $rightsArr ) {
+ foreach ( $rightsProfile as $group => $rightsArr ) {
$ls->setGroupRights( $group, $rightsArr );
}
echo $ls->getText();
}
$cssDir = $this->request->getVal( 'css' );
- if( $cssDir ) {
+ if ( $cssDir ) {
$cssDir = ( $cssDir == 'rtl' ? 'rtl' : 'ltr' );
$this->request->response()->header( 'Content-type: text/css' );
echo $this->output->getCSS( $cssDir );
do {
$nextPageId--;
$nextPage = $this->pageSequence[$nextPageId];
- } while( isset( $this->skippedPages[$nextPage] ) );
+ } while ( isset( $this->skippedPages[$nextPage] ) );
} else {
$nextPage = $this->pageSequence[$lowestUnhappy];
}
$this->currentPageName = $page->getName();
$this->startPageWrapper( $pageName );
- if( $page->isSlow() ) {
+ if ( $page->isSlow() ) {
$this->disableTimeLimit();
}
* @return bool
*/
public function startSession() {
- if( wfIniGetBool( 'session.auto_start' ) || session_id() ) {
+ if ( wfIniGetBool( 'session.auto_start' ) || session_id() ) {
// Done already
return true;
}
if ( !isset( $params['help'] ) ) {
$params['help'] = "";
}
- if( isset( $params['rawtext'] ) ) {
+ if ( isset( $params['rawtext'] ) ) {
$labelText = $params['rawtext'];
} else {
$labelText = $this->parse( wfMessage( $params['label'] )->text() );
* @param $status Status
*/
public function showStatusBox( $status ) {
- if( !$status->isGood() ) {
+ if ( !$status->isGood() ) {
$text = $status->getWikiText();
- if( $status->isOk() ) {
+ if ( $status->isOk() ) {
$box = $this->getWarningBox( $text );
} else {
$box = $this->getErrorBox( $text );
}
wfRestoreWarnings();
- if( $dir == 'rtl' ) {
+ if ( $dir == 'rtl' ) {
$css = CSSJanus::transform( $css, true );
}
$languages = Language::fetchLanguageNames();
ksort( $languages );
foreach ( $languages as $code => $lang ) {
- if ( isset( $wgDummyLanguageCodes[$code] ) ) continue;
+ if ( isset( $wgDummyLanguageCodes[$code] ) ) {
+ continue;
+ }
$s .= "\n" . Xml::option( "$code - $lang", $code, $code == $selectedCode );
}
$s .= "\n</select>\n";
$r = $this->parent->request;
if ( $r->wasPosted() ) {
$key = $r->getText( 'config_wgUpgradeKey' );
- if( !$key || $key !== $vars['wgUpgradeKey'] ) {
+ if ( !$key || $key !== $vars['wgUpgradeKey'] ) {
$this->parent->showError( 'config-localsettings-badkey' );
$this->showKeyForm();
return 'output';
// Give grep a chance to find the usages:
// config-support-mysql, config-support-postgres, config-support-oracle, config-support-sqlite
$dbSupport = '';
- foreach( $this->parent->getDBTypes() as $type ) {
+ foreach ( $this->parent->getDBTypes() as $type ) {
$link = DatabaseBase::factory( $type )->getSoftwareLink();
$dbSupport .= wfMessage( "config-support-$type", $link )->plain() . "\n";
}
if ( $result ) {
// If they're going to possibly regenerate LocalSettings, we
// need to create the upgrade/secret keys. Bug 26481
- if( !$this->getVar( '_ExistingDBSettings' ) ) {
+ if ( !$this->getVar( '_ExistingDBSettings' ) ) {
$this->parent->generateKeys();
}
$this->setVar( '_UpgradeDone', true );
// Make sure it won't conflict with any existing namespaces
global $wgContLang;
$nsIndex = $wgContLang->getNsIndex( $name );
- if( $nsIndex !== false && $nsIndex !== NS_PROJECT ) {
+ if ( $nsIndex !== false && $nsIndex !== NS_PROJECT ) {
$this->parent->showError( 'config-ns-conflict', $name );
$retVal = false;
}
// Validate e-mail if provided
$email = $this->getVar( '_AdminEmail' );
- if( $email && !Sanitizer::validateEmail( $email ) ) {
+ if ( $email && !Sanitizer::validateEmail( $email ) ) {
$this->parent->showError( 'config-admin-error-bademail' );
$retVal = false;
}
// If they asked to subscribe to mediawiki-announce but didn't give
// an e-mail, show an error. Bug 29332
- if( !$email && $this->getVar( '_Subscribe' ) ) {
+ if ( !$email && $this->getVar( '_Subscribe' ) ) {
$this->parent->showError( 'config-subscribe-noemail' );
$retVal = false;
}
$extensions = $this->parent->findExtensions();
- if( $extensions ) {
+ if ( $extensions ) {
$extHtml = $this->getFieldSetStart( 'config-extensions' );
- foreach( $extensions as $ext ) {
+ foreach ( $extensions as $ext ) {
$extHtml .= $this->parent->getCheckBox( array(
'var' => "ext-$ext",
'rawtext' => $ext,
);
$caches = array( 'none' );
- if( count( $this->getVar( '_Caches' ) ) ) {
+ if ( count( $this->getVar( '_Caches' ) ) ) {
$caches[] = 'accel';
}
$caches[] = 'memcached';
// or going back!
$cacheval = 'none';
}
- $hidden = ($cacheval == 'memcached') ? '' : 'display: none';
+ $hidden = ( $cacheval == 'memcached' ) ? '' : 'display: none';
$this->addHTML(
# Advanced settings
$this->getFieldSetStart( 'config-advanced-settings' ) .
} else {
$iframeAttribs['src'] = $this->getCCPartnerUrl();
}
- $wrapperStyle = ($this->getVar( '_LicenseCode' ) == 'cc-choose') ? '' : 'display: none';
+ $wrapperStyle = ( $this->getVar( '_LicenseCode' ) == 'cc-choose' ) ? '' : 'display: none';
return "<div class=\"config-cc-wrapper\" id=\"config-cc-wrapper\" style=\"$wrapperStyle\">\n" .
Html::element( 'iframe', $iframeAttribs, '', false /* not short */ ) .
$extsAvailable = $this->parent->findExtensions();
$extsToInstall = array();
- foreach( $extsAvailable as $ext ) {
- if( $this->parent->request->getCheck( 'config_ext-' . $ext ) ) {
+ foreach ( $extsAvailable as $ext ) {
+ if ( $this->parent->request->getCheck( 'config_ext-' . $ext ) ) {
$extsToInstall[] = $ext;
}
}
$this->parent->setVar( '_Extensions', $extsToInstall );
- if( $this->getVar( 'wgMainCacheType' ) == 'memcached' ) {
+ if ( $this->getVar( 'wgMainCacheType' ) == 'memcached' ) {
$memcServers = explode( "\n", $this->getVar( '_MemCachedServers' ) );
- if( !$memcServers ) {
+ if ( !$memcServers ) {
$this->parent->showError( 'config-memcache-needservers' );
return false;
}
- foreach( $memcServers as $server ) {
+ foreach ( $memcServers as $server ) {
$memcParts = explode( ":", $server, 2 );
if ( !isset( $memcParts[0] )
|| ( !IP::isValid( $memcParts[0] )
&& ( gethostbyname( $memcParts[0] ) == $memcParts[0] ) ) ) {
$this->parent->showError( 'config-memcache-badip', $memcParts[0] );
return false;
- } elseif( !isset( $memcParts[1] ) ) {
+ } elseif ( !isset( $memcParts[1] ) ) {
$this->parent->showError( 'config-memcache-noport', $memcParts[0] );
return false;
- } elseif( $memcParts[1] < 1 || $memcParts[1] > 65535 ) {
+ } elseif ( $memcParts[1] < 1 || $memcParts[1] > 65535 ) {
$this->parent->showError( 'config-memcache-badport', 1, 65535 );
return false;
}
}
public function execute() {
- if( $this->getVar( '_UpgradeDone' ) ) {
+ if ( $this->getVar( '_UpgradeDone' ) ) {
return 'skip';
- } elseif( $this->getVar( '_InstallDone' ) ) {
+ } elseif ( $this->getVar( '_InstallDone' ) ) {
return 'continue';
- } elseif( $this->parent->request->wasPosted() ) {
+ } elseif ( $this->parent->request->wasPosted() ) {
$this->startForm();
$this->addHTML( "<ul>" );
$results = $this->parent->performInstallation(
$html = "<span class=\"error\">$html</span>";
}
$this->addHTML( $html . "</li>\n" );
- if( !$status->isGood() ) {
+ if ( !$status->isGood() ) {
$this->parent->showStatusBox( $status );
}
}
public function getFileContents() {
$file = __DIR__ . '/../../' . $this->getFileName();
- if( ! file_exists( $file ) ) {
+ if ( ! file_exists( $file ) ) {
return wfMessage( 'config-nofile', $file )->plain();
}
return file_get_contents( $file );
protected function getFileName() {
global $wgVersion;
- if( !preg_match( '/^(\d+)\.(\d+).*/i', $wgVersion, $result ) ) {
+ if ( !preg_match( '/^(\d+)\.(\d+).*/i', $wgVersion, $result ) ) {
throw new MWException( 'Variable $wgVersion has an invalid value.' );
}
*/
public static function factory( $command, Title $title, $params = false, $id = 0 ) {
global $wgJobClasses;
- if( isset( $wgJobClasses[$command] ) ) {
+ if ( isset( $wgJobClasses[$command] ) ) {
$class = $wgJobClasses[$command];
return new $class( $title, $params, $id );
}
/**
* @return integer May be 0 for jobs stored outside the DB
+ * @deprecated 1.22
*/
public function getId() {
return $this->id;
*/
public function getDeduplicationInfo() {
$info = array(
- 'type' => $this->getType(),
+ 'type' => $this->getType(),
'namespace' => $this->getTitle()->getNamespace(),
- 'title' => $this->getTitle()->getDBkey(),
- 'params' => $this->getParams()
+ 'title' => $this->getTitle()->getDBkey(),
+ 'params' => $this->getParams()
);
if ( is_array( $info['params'] ) ) {
// Identical jobs with different "root" jobs should count as duplicates
}
/**
- * @return string One of (random, timestamp, fifo)
+ * @return string One of (random, timestamp, fifo, undefined)
*/
final public function getOrder() {
return $this->order;
}
/**
- * @return Array Subset of (random, timestamp, fifo)
+ * @return Array Subset of (random, timestamp, fifo, undefined)
*/
abstract protected function supportedOrders();
/**
- * @return string One of (random, timestamp, fifo)
+ * @return string One of (random, timestamp, fifo, undefined)
*/
abstract protected function optimalOrder();
// Flag this job as an old duplicate based on its "root" job...
try {
if ( $job && $this->isRootJobOldDuplicate( $job ) ) {
- wfIncrStats( 'job-pop-duplicate' );
+ JobQueue::incrStats( 'job-pop-duplicate', $this->type );
$job = DuplicateJob::newFromJob( $job ); // convert to a no-op
}
} catch ( MWException $e ) {} // don't lose jobs over this
return new ArrayIterator( array() ); // not implemented
}
+ /**
+ * Call wfIncrStats() for the queue overall and for the queue type
+ *
+ * @param string $key Event type
+ * @param string $type Job type
+ * @param integer $delta
+ * @since 1.22
+ */
+ public static function incrStats( $key, $type, $delta = 1 ) {
+ wfIncrStats( $key, $delta );
+ wfIncrStats( "{$key}-{$type}", $delta );
+ }
+
/**
* Namespace the queue with a key to isolate it for testing
*
if ( $this->cache->add( "$key:rebuild", 1, 1800 ) ) { // lock
$pendingDbInfo = array(
'pendingDBs' => $this->findPendingWikiQueues(),
- 'timestamp' => time()
+ 'timestamp' => time()
);
for ( $attempts = 1; $attempts <= 25; ++$attempts ) {
if ( $this->cache->add( "$key:lock", 1, 60 ) ) { // lock
* @return bool
*/
protected function doBatchPush( array $jobs, $flags ) {
- if ( count( $jobs ) ) {
- list( $dbw, $scope ) = $this->getMasterDB();
-
- $rowSet = array(); // (sha1 => job) map for jobs that are de-duplicated
- $rowList = array(); // list of jobs for jobs that are are not de-duplicated
-
- foreach ( $jobs as $job ) {
- $row = $this->insertFields( $job );
- if ( $job->ignoreDuplicates() ) {
- $rowSet[$row['job_sha1']] = $row;
- } else {
- $rowList[] = $row;
- }
+ list( $dbw, $scope ) = $this->getMasterDB();
+
+ $that = $this;
+ $method = __METHOD__;
+ $dbw->onTransactionIdle(
+ function() use ( $dbw, $that, $jobs, $flags, $method, $scope ) {
+ $that->doBatchPushInternal( $dbw, $jobs, $flags, $method );
}
+ );
- $key = $this->getCacheKey( 'empty' );
- $atomic = ( $flags & self::QOS_ATOMIC );
- $cache = $this->cache;
- $method = __METHOD__;
+ return true;
+ }
- $dbw->onTransactionIdle(
- function() use ( $dbw, $cache, $rowSet, $rowList, $atomic, $key, $method, $scope
- ) {
- if ( $atomic ) {
- $dbw->begin( $method ); // wrap all the job additions in one transaction
- }
- try {
- // Strip out any duplicate jobs that are already in the queue...
- if ( count( $rowSet ) ) {
- $res = $dbw->select( 'job', 'job_sha1',
- array(
- // No job_type condition since it's part of the job_sha1 hash
- 'job_sha1' => array_keys( $rowSet ),
- 'job_token' => '' // unclaimed
- ),
- $method
- );
- foreach ( $res as $row ) {
- wfDebug( "Job with hash '{$row->job_sha1}' is a duplicate." );
- unset( $rowSet[$row->job_sha1] ); // already enqueued
- }
- }
- // Build the full list of job rows to insert
- $rows = array_merge( $rowList, array_values( $rowSet ) );
- // Insert the job rows in chunks to avoid slave lag...
- foreach ( array_chunk( $rows, 50 ) as $rowBatch ) {
- $dbw->insert( 'job', $rowBatch, $method );
- }
- wfIncrStats( 'job-insert', count( $rows ) );
- wfIncrStats( 'job-insert-duplicate',
- count( $rowSet ) + count( $rowList ) - count( $rows ) );
- } catch ( DBError $e ) {
- if ( $atomic ) {
- $dbw->rollback( $method );
- }
- throw $e;
- }
- if ( $atomic ) {
- $dbw->commit( $method );
- }
+ /**
+ * This function should *not* be called outside of JobQueueDB
+ *
+ * @param DatabaseBase $dbw
+ * @param array $jobs
+ * @param int $flags
+ * @param string $method
+ * @return boolean
+ * @throws type
+ */
+ public function doBatchPushInternal( DatabaseBase $dbw, array $jobs, $flags, $method ) {
+ if ( !count( $jobs ) ) {
+ return true;
+ }
- $cache->set( $key, 'false', JobQueueDB::CACHE_TTL_LONG );
- } );
+ $rowSet = array(); // (sha1 => job) map for jobs that are de-duplicated
+ $rowList = array(); // list of jobs for jobs that are are not de-duplicated
+ foreach ( $jobs as $job ) {
+ $row = $this->insertFields( $job );
+ if ( $job->ignoreDuplicates() ) {
+ $rowSet[$row['job_sha1']] = $row;
+ } else {
+ $rowList[] = $row;
+ }
}
+ if ( $flags & self::QOS_ATOMIC ) {
+ $dbw->begin( $method ); // wrap all the job additions in one transaction
+ }
+ try {
+ // Strip out any duplicate jobs that are already in the queue...
+ if ( count( $rowSet ) ) {
+ $res = $dbw->select( 'job', 'job_sha1',
+ array(
+ // No job_type condition since it's part of the job_sha1 hash
+ 'job_sha1' => array_keys( $rowSet ),
+ 'job_token' => '' // unclaimed
+ ),
+ $method
+ );
+ foreach ( $res as $row ) {
+ wfDebug( "Job with hash '{$row->job_sha1}' is a duplicate." );
+ unset( $rowSet[$row->job_sha1] ); // already enqueued
+ }
+ }
+ // Build the full list of job rows to insert
+ $rows = array_merge( $rowList, array_values( $rowSet ) );
+ // Insert the job rows in chunks to avoid slave lag...
+ foreach ( array_chunk( $rows, 50 ) as $rowBatch ) {
+ $dbw->insert( 'job', $rowBatch, $method );
+ }
+ JobQueue::incrStats( 'job-insert', $this->type, count( $rows ) );
+ JobQueue::incrStats( 'job-insert-duplicate', $this->type,
+ count( $rowSet ) + count( $rowList ) - count( $rows ) );
+ } catch ( DBError $e ) {
+ if ( $flags & self::QOS_ATOMIC ) {
+ $dbw->rollback( $method );
+ }
+ throw $e;
+ }
+ if ( $flags & self::QOS_ATOMIC ) {
+ $dbw->commit( $method );
+ }
+
+ $this->cache->set( $this->getCacheKey( 'empty' ), 'false', JobQueueDB::CACHE_TTL_LONG );
+
return true;
}
$this->cache->set( $this->getCacheKey( 'empty' ), 'true', self::CACHE_TTL_LONG );
break; // nothing to do
}
- wfIncrStats( 'job-pop' );
+ JobQueue::incrStats( 'job-pop', $this->type );
// Get the job object from the row...
$title = Title::makeTitleSafe( $row->job_namespace, $row->job_title );
if ( !$title ) {
$dbw->delete( 'job', array( 'job_id' => $row->job_id ), __METHOD__ );
- wfDebugLog( 'JobQueueDB', "Row has invalid title '{$row->job_title}'." );
+ wfDebug( "Row has invalid title '{$row->job_title}'." );
continue; // try again
}
$job = Job::factory( $row->job_cmd, $title,
self::extractBlob( $row->job_params ), $row->job_id );
+ $job->metadata['id'] = $row->job_id;
$job->id = $row->job_id; // XXX: work around broken subclasses
break; // done
- } while( true );
+ } while ( true );
return $job;
}
$dir = $gte ? 'ASC' : 'DESC';
$row = $dbw->selectRow( 'job', '*', // find a random job
array(
- 'job_cmd' => $this->type,
+ 'job_cmd' => $this->type,
'job_token' => '', // unclaimed
"job_random {$ineq} {$dbw->addQuotes( $rand )}" ),
__METHOD__,
// instead of job_random for reducing excess claim retries.
$row = $dbw->selectRow( 'job', '*', // find a random job
array(
- 'job_cmd' => $this->type,
+ 'job_cmd' => $this->type,
'job_token' => '', // unclaimed
),
__METHOD__,
if ( $row ) { // claim the job
$dbw->update( 'job', // update by PK
array(
- 'job_token' => $uuid,
+ 'job_token' => $uuid,
'job_token_timestamp' => $dbw->timestamp(),
'job_attempts = job_attempts+1' ),
array( 'job_cmd' => $this->type, 'job_id' => $row->job_id, 'job_token' => '' ),
// This uses as much of the DB wrapper functions as possible.
$dbw->update( 'job',
array(
- 'job_token' => $uuid,
+ 'job_token' => $uuid,
'job_token_timestamp' => $dbw->timestamp(),
'job_attempts = job_attempts+1' ),
array( 'job_id = (' .
array( 'job_cmd' => $this->type, 'job_token' => $uuid ), __METHOD__
);
if ( !$row ) { // raced out by duplicate job removal
- wfDebugLog( 'JobQueueDB', "Row deleted as duplicate by another process." );
+ wfDebug( "Row deleted as duplicate by another process." );
}
} else {
break; // nothing to do
* @return Job|bool
*/
protected function doAck( Job $job ) {
- if ( !$job->getId() ) {
+ if ( !isset( $job->metadata['id'] ) ) {
throw new MWException( "Job of type '{$job->getType()}' has no ID." );
}
// Delete a row with a single DELETE without holding row locks over RTTs...
$dbw->delete( 'job',
- array( 'job_cmd' => $this->type, 'job_id' => $job->getId() ), __METHOD__ );
+ array( 'job_cmd' => $this->type, 'job_id' => $job->metadata['id'] ), __METHOD__ );
return true;
}
return array(
'recycleAndDeleteStaleJobs' => array(
'callback' => array( $this, 'recycleAndDeleteStaleJobs' ),
- 'period' => ceil( $this->claimTTL / 2 )
+ 'period' => ceil( $this->claimTTL / 2 )
)
);
}
strlen( $row->job_params ) ? unserialize( $row->job_params ) : false,
$row->job_id
);
+ $job->metadata['id'] = $row->job_id;
$job->id = $row->job_id; // XXX: work around broken subclasses
return $job;
}
"job_attempts < {$dbw->addQuotes( $this->maxTries )}" ), // retries left
__METHOD__
);
- $ids = array_map( function( $o ) { return $o->job_id; }, iterator_to_array( $res ) );
+ $ids = array_map(
+ function( $o ) {
+ return $o->job_id;
+ }, iterator_to_array( $res )
+ );
if ( count( $ids ) ) {
// Reset job_token for these jobs so that other runners will pick them up.
// Set the timestamp to the current time, as it is useful to now that the job
__METHOD__
);
$count += $dbw->affectedRows();
- wfIncrStats( 'job-recycle', $dbw->affectedRows() );
+ JobQueue::incrStats( 'job-recycle', $this->type, $dbw->affectedRows() );
$this->cache->set( $this->getCacheKey( 'empty' ), 'false', self::CACHE_TTL_LONG );
}
}
// Get the IDs of jobs that are considered stale and should be removed. Selecting
// the IDs first means that the UPDATE can be done by primary key (less deadlocks).
$res = $dbw->select( 'job', 'job_id', $conds, __METHOD__ );
- $ids = array_map( function( $o ) { return $o->job_id; }, iterator_to_array( $res ) );
+ $ids = array_map(
+ function( $o ) {
+ return $o->job_id;
+ }, iterator_to_array( $res )
+ );
if ( count( $ids ) ) {
$dbw->delete( 'job', array( 'job_id' => $ids ), __METHOD__ );
$count += $dbw->affectedRows();
+ JobQueue::incrStats( 'job-abandon', $this->type, $dbw->affectedRows() );
}
$dbw->unlock( "jobqueue-recycle-{$this->type}", __METHOD__ );
*/
private function getCacheKey( $property ) {
list( $db, $prefix ) = wfSplitWikiID( $this->wiki );
- return wfForeignMemcKey( $db, $prefix, 'jobqueue', $this->type, $property );
+ $cluster = is_string( $this->cluster ) ? $this->cluster : 'main';
+ return wfForeignMemcKey( $db, $prefix, 'jobqueue', $cluster, $this->type, $property );
}
/**
--- /dev/null
+<?php
+/**
+ * Job queue code for federated queues.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @author Aaron Schulz
+ */
+
+/**
+ * Class to handle enqueueing and running of background jobs for federated queues
+ *
+ * This class allows for queues to be partitioned into smaller queues.
+ * A partition is defined by the configuration for a JobQueue instance.
+ * For example, one can set $wgJobTypeConf['refreshLinks'] to point to a
+ * JobQueueFederated instance, which itself would consist of three JobQueueRedis
+ * instances, each using their own redis server. This would allow for the jobs
+ * to be split (evenly or based on weights) accross multiple servers if a single
+ * server becomes impractical or expensive. Different JobQueue classes can be mixed.
+ *
+ * The basic queue configuration (e.g. "order", "claimTTL") of a federated queue
+ * is inherited by the partition queues. Additional configuration defines what
+ * section each wiki is in, what partition queues each section uses (and their weight),
+ * and the JobQueue configuration for each partition. Some sections might only need a
+ * single queue partition, like the sections for groups of small wikis.
+ *
+ * If used for performance, then $wgMainCacheType should be set to memcached/redis.
+ * Note that "fifo" cannot be used for the ordering, since the data is distributed.
+ * One can still use "timestamp" instead, as in "roughly timestamp ordered".
+ *
+ * @ingroup JobQueue
+ * @since 1.22
+ */
+class JobQueueFederated extends JobQueue {
+ /** @var Array (wiki ID => section name) */
+ protected $sectionsByWiki = array();
+ /** @var Array (section name => (partition name => weight)) */
+ protected $partitionsBySection = array();
+ /** @var Array (section name => config array) */
+ protected $configByPartition = array();
+ /** @var Array (partition names => integer) */
+ protected $partitionsNoPush = array();
+
+ /** @var Array (partition name => JobQueue) */
+ protected $partitionQueues = array();
+ /** @var BagOStuff */
+ protected $cache;
+
+ const CACHE_TTL_SHORT = 30; // integer; seconds to cache info without re-validating
+ const CACHE_TTL_LONG = 300; // integer; seconds to cache info that is kept up to date
+
+ /**
+ * @params include:
+ * - sectionsByWiki : A map of wiki IDs to section names.
+ * Wikis will default to using the section "default".
+ * - partitionsBySection : Map of section names to maps of (partition name => weight).
+ * A section called 'default' must be defined if not all wikis
+ * have explicitly defined sections.
+ * - configByPartition : Map of queue partition names to configuration arrays.
+ * These configuration arrays are passed to JobQueue::factory().
+ * The options set here are overriden by those passed to this
+ * the federated queue itself (e.g. 'order' and 'claimTTL').
+ * - partitionsNoPush : List of partition names that can handle pop() but not push().
+ * This can be used to migrate away from a certain partition.
+ * @param array $params
+ */
+ protected function __construct( array $params ) {
+ parent::__construct( $params );
+ $this->sectionsByWiki = $params['sectionsByWiki'];
+ $this->partitionsBySection = $params['partitionsBySection'];
+ $this->configByPartition = $params['configByPartition'];
+ if ( isset( $params['partitionsNoPush'] ) ) {
+ $this->partitionsNoPush = array_flip( $params['partitionsNoPush'] );
+ }
+ $baseConfig = $params;
+ foreach ( array( 'class', 'sectionsByWiki',
+ 'partitionsBySection', 'configByPartition', 'partitionsNoPush' ) as $o )
+ {
+ unset( $baseConfig[$o] );
+ }
+ foreach ( $this->getPartitionMap() as $partition => $w ) {
+ if ( !isset( $this->configByPartition[$partition] ) ) {
+ throw new MWException( "No configuration for partition '$partition'." );
+ }
+ $this->partitionQueues[$partition] = JobQueue::factory(
+ $baseConfig + $this->configByPartition[$partition]
+ );
+ }
+ // Aggregate cache some per-queue values if there are multiple partition queues
+ $this->cache = $this->isFederated() ? wfGetMainCache() : new EmptyBagOStuff();
+ }
+
+ protected function supportedOrders() {
+ // No FIFO due to partitioning, though "rough timestamp order" is supported
+ return array( 'undefined', 'random', 'timestamp' );
+ }
+
+ protected function optimalOrder() {
+ return 'undefined'; // defer to the partitions
+ }
+
+ protected function supportsDelayedJobs() {
+ return true; // defer checks to the partitions
+ }
+
+ protected function doIsEmpty() {
+ $key = $this->getCacheKey( 'empty' );
+
+ $isEmpty = $this->cache->get( $key );
+ if ( $isEmpty === 'true' ) {
+ return true;
+ } elseif ( $isEmpty === 'false' ) {
+ return false;
+ }
+
+ foreach ( $this->partitionQueues as $queue ) {
+ if ( !$queue->doIsEmpty() ) {
+ $this->cache->add( $key, 'false', self::CACHE_TTL_LONG );
+ return false;
+ }
+ }
+
+ $this->cache->add( $key, 'true', self::CACHE_TTL_LONG );
+ return true;
+ }
+
+ protected function doGetSize() {
+ return $this->getCrossPartitionSum( 'size', 'doGetSize' );
+ }
+
+ protected function doGetAcquiredCount() {
+ return $this->getCrossPartitionSum( 'acquiredcount', 'doGetAcquiredCount' );
+ }
+
+ protected function doGetDelayedCount() {
+ return $this->getCrossPartitionSum( 'delayedcount', 'doGetDelayedCount' );
+ }
+
+ protected function doGetAbandonedCount() {
+ return $this->getCrossPartitionSum( 'abandonedcount', 'doGetAbandonedCount' );
+ }
+
+ /**
+ * @param string $type
+ * @param string $method
+ * @return integer
+ */
+ protected function getCrossPartitionSum( $type, $method ) {
+ $key = $this->getCacheKey( $type );
+
+ $count = $this->cache->get( $key );
+ if ( is_int( $count ) ) {
+ return $count;
+ }
+
+ $count = 0;
+ foreach ( $this->partitionQueues as $queue ) {
+ $count += $queue->$method();
+ }
+
+ $this->cache->set( $key, $count, self::CACHE_TTL_SHORT );
+ return $count;
+ }
+
+ protected function doBatchPush( array $jobs, $flags ) {
+ if ( !count( $jobs ) ) {
+ return true; // nothing to do
+ }
+
+ $partitionsTry = array_diff_key(
+ $this->getPartitionMap(),
+ $this->partitionsNoPush
+ ); // (partition => weight)
+
+ // Try to insert the jobs and update $partitionsTry on any failures
+ $jobsLeft = $this->tryJobInsertions( $jobs, $partitionsTry, $flags );
+ if ( count( $jobsLeft ) ) { // some jobs failed to insert?
+ // Try to insert the remaning jobs once more, ignoring the bad partitions
+ return !count( $this->tryJobInsertions( $jobsLeft, $partitionsTry, $flags ) );
+ } else {
+ return true;
+ }
+ }
+
+ /**
+ * @param array $jobs
+ * @param array $partitionsTry
+ * @param integer $flags
+ * @return array List of Job object that could not be inserted
+ */
+ protected function tryJobInsertions( array $jobs, array &$partitionsTry, $flags ) {
+ if ( !count( $partitionsTry ) ) {
+ return $jobs; // can't insert anything
+ }
+
+ $jobsLeft = array();
+
+ $partitionRing = new HashRing( $partitionsTry );
+ // Because jobs are spread across partitions, per-job de-duplication needs
+ // to use a consistent hash to avoid allowing duplicate jobs per partition.
+ // When inserting a batch of de-duplicated jobs, QOS_ATOMIC is disregarded.
+ $uJobsByPartition = array(); // (partition name => job list)
+ foreach ( $jobs as $key => $job ) {
+ if ( $job->ignoreDuplicates() ) {
+ $sha1 = sha1( serialize( $job->getDeduplicationInfo() ) );
+ $uJobsByPartition[$partitionRing->getLocation( $sha1 )][] = $job;
+ unset( $jobs[$key] );
+ }
+ }
+ // Get the batches of jobs that are not de-duplicated
+ if ( $flags & self::QOS_ATOMIC ) {
+ $nuJobBatches = array( $jobs ); // all or nothing
+ } else {
+ // Split the jobs into batches and spread them out over servers if there
+ // are many jobs. This helps keep the partitions even. Otherwise, send all
+ // the jobs to a single partition queue to avoids the extra connections.
+ $nuJobBatches = array_chunk( $jobs, 300 );
+ }
+
+ // Insert the de-duplicated jobs into the queues...
+ foreach ( $uJobsByPartition as $partition => $jobBatch ) {
+ $queue = $this->partitionQueues[$partition];
+ if ( $queue->doBatchPush( $jobBatch, $flags ) ) {
+ $key = $this->getCacheKey( 'empty' );
+ $this->cache->set( $key, 'false', JobQueueDB::CACHE_TTL_LONG );
+ } else {
+ unset( $partitionsTry[$partition] ); // blacklist partition
+ $jobsLeft = array_merge( $jobsLeft, $jobBatch ); // not inserted
+ }
+ }
+ // Insert the jobs that are not de-duplicated into the queues...
+ foreach ( $nuJobBatches as $jobBatch ) {
+ $partition = ArrayUtils::pickRandom( $partitionsTry );
+ if ( $partition === false ) { // all partitions at 0 weight?
+ $jobsLeft = array_merge( $jobsLeft, $jobBatch ); // not inserted
+ } else {
+ $queue = $this->partitionQueues[$partition];
+ if ( $queue->doBatchPush( $jobBatch, $flags ) ) {
+ $key = $this->getCacheKey( 'empty' );
+ $this->cache->set( $key, 'false', JobQueueDB::CACHE_TTL_LONG );
+ } else {
+ unset( $partitionsTry[$partition] ); // blacklist partition
+ $jobsLeft = array_merge( $jobsLeft, $jobBatch ); // not inserted
+ }
+ }
+ }
+
+ return $jobsLeft;
+ }
+
+ protected function doPop() {
+ $key = $this->getCacheKey( 'empty' );
+
+ $isEmpty = $this->cache->get( $key );
+ if ( $isEmpty === 'true' ) {
+ return false;
+ }
+
+ $partitionsTry = $this->getPartitionMap(); // (partition => weight)
+
+ while ( count( $partitionsTry ) ) {
+ $partition = ArrayUtils::pickRandom( $partitionsTry );
+ if ( $partition === false ) {
+ break; // all partitions at 0 weight
+ }
+ $queue = $this->partitionQueues[$partition];
+ $job = $queue->pop();
+ if ( $job ) {
+ $job->metadata['QueuePartition'] = $partition;
+ return $job;
+ } else {
+ unset( $partitionsTry[$partition] ); // blacklist partition
+ }
+ }
+
+ $this->cache->set( $key, 'true', JobQueueDB::CACHE_TTL_LONG );
+ return false;
+ }
+
+ protected function doAck( Job $job ) {
+ if ( !isset( $job->metadata['QueuePartition'] ) ) {
+ throw new MWException( "The given job has no defined partition name." );
+ }
+ return $this->partitionQueues[$job->metadata['QueuePartition']]->ack( $job );
+ }
+
+ protected function doWaitForBackups() {
+ foreach ( $this->partitionQueues as $queue ) {
+ $queue->waitForBackups();
+ }
+ }
+
+ protected function doGetPeriodicTasks() {
+ $tasks = array();
+ foreach ( $this->partitionQueues as $partition => $queue ) {
+ foreach ( $queue->getPeriodicTasks() as $task => $def ) {
+ $tasks["{$partition}:{$task}"] = $def;
+ }
+ }
+ return $tasks;
+ }
+
+ protected function doFlushCaches() {
+ static $types = array(
+ 'empty',
+ 'size',
+ 'acquiredcount',
+ 'delayedcount',
+ 'abandonedcount'
+ );
+ foreach ( $types as $type ) {
+ $this->cache->delete( $this->getCacheKey( $type ) );
+ }
+ foreach ( $this->partitionQueues as $queue ) {
+ $queue->doFlushCaches();
+ }
+ }
+
+ public function getAllQueuedJobs() {
+ $iterator = new AppendIterator();
+ foreach ( $this->partitionQueues as $queue ) {
+ $iterator->append( $queue->getAllQueuedJobs() );
+ }
+ return $iterator;
+ }
+
+ public function getAllDelayedJobs() {
+ $iterator = new AppendIterator();
+ foreach ( $this->partitionQueues as $queue ) {
+ $iterator->append( $queue->getAllDelayedJobs() );
+ }
+ return $iterator;
+ }
+
+ public function setTestingPrefix( $key ) {
+ foreach ( $this->partitionQueues as $queue ) {
+ $queue->setTestingPrefix( $key );
+ }
+ }
+
+ /**
+ * @return Array Map of (partition name => weight)
+ */
+ protected function getPartitionMap() {
+ $section = isset( $this->sectionsByWiki[$this->wiki] )
+ ? $this->sectionsByWiki[$this->wiki]
+ : 'default';
+ if ( !isset( $this->partitionsBySection[$section] ) ) {
+ throw new MWException( "No configuration for section '$section'." );
+ }
+ return $this->partitionsBySection[$section];
+ }
+
+ /**
+ * @return bool The queue is actually split up across multiple queue partitions
+ */
+ protected function isFederated() {
+ return ( count( $this->getPartitionMap() ) > 1 );
+ }
+
+ /**
+ * @return string
+ */
+ private function getCacheKey( $property ) {
+ list( $db, $prefix ) = wfSplitWikiID( $this->wiki );
+ return wfForeignMemcKey( $db, $prefix, 'jobqueue', $this->type, $property );
+ }
+}
wfDebugLog( 'JobQueueRedis', "Could not insert {$failed} {$this->type} job(s)." );
return false;
}
- wfIncrStats( 'job-insert', count( $items ) );
- wfIncrStats( 'job-insert-duplicate', count( $items ) - $failed - $pushed );
+ JobQueue::incrStats( 'job-insert', $this->type, count( $items ) );
+ JobQueue::incrStats( 'job-insert-duplicate', $this->type,
+ count( $items ) - $failed - $pushed );
} catch ( RedisException $e ) {
$this->throwRedisException( $this->server, $conn, $e );
}
* @throws RedisException
*/
protected function pushBlobs( RedisConnRef $conn, array $items ) {
- $args = array(); // ([id, sha1, blob [, id, sha1, blob ... ] ] )
+ $args = array(); // ([id, sha1, rtime, blob [, id, sha1, rtime, blob ... ] ] )
foreach ( $items as $item ) {
$args[] = (string)$item['uuid'];
$args[] = (string)$item['sha1'];
end
return pushed
LUA;
- return $this->redisEval( $conn, $script,
+ return $conn->luaEval( $script,
array_merge(
array(
$this->getQueueKey( 'l-unclaimed' ), # KEYS[1]
break; // no jobs; nothing to do
}
- wfIncrStats( 'job-pop' );
+ JobQueue::incrStats( 'job-pop', $this->type );
$item = unserialize( $blob );
if ( $item === false ) {
wfDebugLog( 'JobQueueRedis', "Could not unserialize {$this->type} job." );
-- Return the job data
return item
LUA;
- return $this->redisEval( $conn, $script,
+ return $conn->luaEval( $script,
array(
$this->getQueueKey( 'l-unclaimed' ), # KEYS[1]
$this->getQueueKey( 'h-sha1ById' ), # KEYS[2]
redis.call('hIncrBy',KEYS[5],id,1)
return redis.call('hGet',KEYS[6],id)
LUA;
- return $this->redisEval( $conn, $script,
+ return $conn->luaEval( $script,
array(
$this->getQueueKey( 'l-unclaimed' ), # KEYS[1]
$this->getQueueKey( 'h-sha1ById' ), # KEYS[2]
* @throws MWException
*/
protected function doAck( Job $job ) {
+ if ( !isset( $job->metadata['uuid'] ) ) {
+ throw new MWException( "Job of type '{$job->getType()}' has no UUID." );
+ }
if ( $this->claimTTL > 0 ) {
$conn = $this->getConnection();
try {
- // Get the exact field map this Job came from, regardless of whether
- // the job was transformed into a DuplicateJob or anything of the sort.
- $item = $job->metadata['sourceFields'];
-
static $script =
<<<LUA
-- Unmark the job as claimed
-- Delete the job data itself
return redis.call('hDel',KEYS[3],ARGV[1])
LUA;
- $res = $this->redisEval( $conn, $script,
+ $res = $conn->luaEval( $script,
array(
$this->getQueueKey( 'z-claimed' ), # KEYS[1]
$this->getQueueKey( 'h-attempts' ), # KEYS[2]
$this->getQueueKey( 'h-data' ), # KEYS[3]
- $item['uuid'] # ARGV[1]
+ $job->metadata['uuid'] # ARGV[1]
),
3 # number of first argument(s) that are keys
);
* @return bool
*/
protected function doIsRootJobOldDuplicate( Job $job ) {
- $params = $job->getParams();
- if ( !isset( $params['rootJobSignature'] ) ) {
+ if ( !$job->hasRootJobParams() ) {
return false; // job has no de-deplication info
- } elseif ( !isset( $params['rootJobTimestamp'] ) ) {
- wfDebugLog( 'JobQueueRedis', "Cannot check root job; missing 'rootJobTimestamp'." );
- return false;
}
+ $params = $job->getRootJobParams();
$conn = $this->getConnection();
try {
*/
public function getAllQueuedJobs() {
$conn = $this->getConnection();
- if ( !$conn ) {
- throw new MWException( "Unable to connect to redis server." );
- }
try {
$that = $this;
return new MappedIterator(
*/
public function getAllDelayedJobs() {
$conn = $this->getConnection();
- if ( !$conn ) {
- throw new MWException( "Unable to connect to redis server." );
- }
try {
$that = $this;
return new MappedIterator( // delayed jobs
}
$title = Title::makeTitle( $item['namespace'], $item['title'] );
$job = Job::factory( $item['type'], $title, $item['params'] );
- $job->metadata['sourceFields'] = $item;
+ $job->metadata['uuid'] = $item['uuid'];
return $job;
} catch ( RedisException $e ) {
$this->throwRedisException( $this->server, $conn, $e );
end
return #ids
LUA;
- $count += (int)$this->redisEval( $conn, $script,
+ $count += (int)$conn->luaEval( $script,
array(
$this->getQueueKey( 'z-delayed' ), // KEYS[1]
$this->getQueueKey( 'l-unclaimed' ), // KEYS[2]
end
return {released,abandoned,pruned}
LUA;
- $res = $this->redisEval( $conn, $script,
+ $res = $conn->luaEval( $script,
array(
$this->getQueueKey( 'z-claimed' ), # KEYS[1]
$this->getQueueKey( 'h-attempts' ), # KEYS[2]
if ( $res ) {
list( $released, $abandoned, $pruned ) = $res;
$count += $released + $pruned;
- wfIncrStats( 'job-recycle', count( $released ) );
+ JobQueue::incrStats( 'job-recycle', $this->type, $released );
+ JobQueue::incrStats( 'job-abandon', $this->type, $abandoned );
}
} catch ( RedisException $e ) {
$this->throwRedisException( $this->server, $conn, $e );
if ( $this->claimTTL > 0 ) {
$tasks['recycleAndDeleteStaleJobs'] = array(
'callback' => array( $this, 'recycleAndDeleteStaleJobs' ),
- 'period' => ceil( $this->claimTTL / 2 )
+ 'period' => ceil( $this->claimTTL / 2 )
);
}
if ( $this->checkDelay ) {
$tasks['releaseReadyDelayedJobs'] = array(
'callback' => array( $this, 'releaseReadyDelayedJobs' ),
- 'period' => 300 // 5 minutes
+ 'period' => 300 // 5 minutes
);
}
return $tasks;
}
- /**
- * @param RedisConnRef $conn
- * @param string $script
- * @param array $params
- * @param integer $numKeys
- * @return mixed
- */
- protected function redisEval( RedisConnRef $conn, $script, array $params, $numKeys ) {
- $sha1 = sha1( $script ); // 40 char hex
-
- // Try to run the server-side cached copy of the script
- $conn->clearLastError();
- $res = $conn->evalSha( $sha1, $params, $numKeys );
- // If the script is not in cache, use eval() to retry and cache it
- if ( $conn->getLastError() && $conn->script( 'exists', $sha1 ) === array( 0 ) ) {
- $conn->clearLastError();
- $res = $conn->eval( $script, $params, $numKeys );
- wfDebugLog( 'JobQueueRedis', "Used eval() for Lua script $sha1." );
- }
-
- if ( $conn->getLastError() ) { // script bug?
- wfDebugLog( 'JobQueueRedis', "Lua script error: " . $conn->getLastError() );
- }
-
- return $res;
- }
-
/**
* @param $job Job
* @return array
$title = Title::makeTitleSafe( $fields['namespace'], $fields['title'] );
if ( $title ) {
$job = Job::factory( $fields['type'], $title, $fields['params'] );
- $job->metadata['sourceFields'] = $fields;
+ $job->metadata['uuid'] = $fields['uuid'];
return $job;
}
return false;
UploadBase::setSessionStatus(
$this->params['filekey'],
array(
- 'result' => 'Success',
- 'stage' => 'assembling',
- 'filekey' => $newFileKey,
+ 'result' => 'Success',
+ 'stage' => 'assembling',
+ 'filekey' => $newFileKey,
'imageinfo' => $imageInfo,
- 'status' => Status::newGood()
+ 'status' => Status::newGood()
)
);
} catch ( MWException $e ) {
$this->params['filekey'],
array(
'result' => 'Failure',
- 'stage' => 'assembling',
+ 'stage' => 'assembling',
'status' => Status::newFatal( 'api-error-stashfailed' )
)
);
* @return Job
*/
public static function newFromJob( Job $job ) {
- $djob = new self( $job->getTitle(), $job->getParams(), $job->getId() );
+ $djob = new self( $job->getTitle(), $job->getParams(), $job->id );
$djob->command = $job->getType();
$djob->params = is_array( $djob->params ) ? $djob->params : array();
$djob->params = array( 'isDuplicate' => true ) + $djob->params;
function run() {
$enotif = new EmailNotification();
// Get the user from ID (rename safe). Anons are 0, so defer to name.
- if( isset( $this->params['editorID'] ) && $this->params['editorID'] ) {
+ if ( isset( $this->params['editorID'] ) && $this->params['editorID'] ) {
$editor = User::newFromId( $this->params['editorID'] );
// B/C, only the name might be given.
} else {
global $wgMaxBacklinksInvalidate;
# Get an estimate of the number of rows from the BacklinkCache
- $numRows = $this->blCache->getNumLinks( $this->params['table'] );
+ $max = max( $this->rowsPerJob * 2, $wgMaxBacklinksInvalidate ) + 1;
+ $numRows = $this->blCache->getNumLinks( $this->params['table'], $max );
if ( $wgMaxBacklinksInvalidate !== false && $numRows > $wgMaxBacklinksInvalidate ) {
wfDebug( "Skipped HTML cache invalidation of {$this->title->getPrefixedText()}." );
return true;
array(
'table' => $this->params['table'],
'start' => $start,
- 'end' => $id - 1
+ 'end' => $id - 1
) + $rootJobParams // carry over information for de-duplication
);
$start = $id;
array(
'table' => $this->params['table'],
'start' => $start,
- 'end' => $this->params['end']
+ 'end' => $this->params['end']
) + $rootJobParams // carry over information for de-duplication
);
wfDebug( __METHOD__ . ": repartitioning into " . count( $jobs ) . " jobs\n" );
array(
'table' => $this->params['table'],
'start' => $start,
- 'end' => $end,
+ 'end' => $end,
) + $rootJobParams // carry over information for de-duplication
);
}
}
# Update file cache
- if ( $wgUseFileCache ) {
+ if ( $wgUseFileCache ) {
foreach ( $titleArray as $title ) {
HTMLFileCache::clearFileCache( $title );
}
UploadBase::setSessionStatus(
$this->params['filekey'],
array(
- 'result' => 'Success',
- 'stage' => 'publish',
- 'filename' => $upload->getLocalFile()->getName(),
+ 'result' => 'Success',
+ 'stage' => 'publish',
+ 'filename' => $upload->getLocalFile()->getName(),
'imageinfo' => $imageInfo,
- 'status' => Status::newGood()
+ 'status' => Status::newGood()
)
);
} catch ( MWException $e ) {
$this->params['filekey'],
array(
'result' => 'Failure',
- 'stage' => 'publish',
+ 'stage' => 'publish',
'status' => Status::newFatal( 'api-error-publishfailed' )
)
);
* @return boolean success
*/
function run() {
- wfProfileIn( __METHOD__ );
-
$linkCache = LinkCache::singleton();
$linkCache->clear();
if ( is_null( $this->title ) ) {
$this->error = "refreshLinks: Invalid title";
- wfProfileOut( __METHOD__ );
return false;
}
if ( !$revision ) {
$this->error = 'refreshLinks: Article not found "' .
$this->title->getPrefixedDBkey() . '"';
- wfProfileOut( __METHOD__ );
return false; // XXX: what if it was just deleted?
}
self::runForTitleInternal( $this->title, $revision, __METHOD__ );
- wfProfileOut( __METHOD__ );
return true;
}
function run() {
global $wgUpdateRowsPerJob;
- wfProfileIn( __METHOD__ );
-
$linkCache = LinkCache::singleton();
$linkCache->clear();
if ( is_null( $this->title ) ) {
$this->error = "refreshLinks2: Invalid title";
- wfProfileOut( __METHOD__ );
return false;
}
$jobs = array_merge( $jobs, $this->getSingleTitleJobs( $table, $masterPos ) );
} else {
# This is a base job to trigger the insertion of partitioned jobs...
- if ( $tbc->getNumLinks( $table ) <= $wgUpdateRowsPerJob ) {
+ if ( $tbc->getNumLinks( $table, $wgUpdateRowsPerJob + 1 ) <= $wgUpdateRowsPerJob ) {
# Just directly insert the single per-title jobs
$jobs = array_merge( $jobs, $this->getSingleTitleJobs( $table, $masterPos ) );
} else {
list( $start, $end ) = $batch;
$jobs[] = new RefreshLinksJob2( $this->title,
array(
- 'table' => $table,
- 'start' => $start,
- 'end' => $end,
- 'masterPos' => $masterPos,
+ 'table' => $table,
+ 'start' => $start,
+ 'end' => $end,
+ 'masterPos' => $masterPos,
) + $this->getRootJobParams() // carry over information for de-duplication
);
}
JobQueueGroup::singleton()->push( $jobs );
}
- wfProfileOut( __METHOD__ );
return true;
}
switch ( $this->entry->getSubtype() ) {
case 'delete': // Show undelete link
- if( $user->isAllowed( 'undelete' ) ) {
+ if ( $user->isAllowed( 'undelete' ) ) {
$message = 'undeletelink';
} else {
$message = 'undeleteviewlink';
$this->msg( 'diff' )->escaped(),
array(),
array(
- 'target' => $this->entry->getTarget()->getPrefixedDBkey(),
- 'diff' => 'prev',
+ 'target' => $this->entry->getTarget()->getPrefixedDBkey(),
+ 'diff' => 'prev',
'timestamp' => $ids[0]
)
);
return array(
'tables' => $tables,
'fields' => $fields,
- 'conds' => array(),
+ 'conds' => array(),
'options' => array(),
'join_conds' => $joins,
);
}
public function getPerformer() {
- if( !$this->performer ) {
+ if ( !$this->performer ) {
$userId = (int) $this->row->log_user;
if ( $userId !== 0 ) { // logged-in users
if ( isset( $this->row->user_name ) ) {
}
public function getPerformer() {
- if( !$this->performer ) {
+ if ( !$this->performer ) {
$userId = (int) $this->row->rc_user;
if ( $userId !== 0 ) {
$this->performer = User::newFromId( $userId );
// If only one log type is used, then show a special message...
$headerType = (count( $type ) == 1) ? $type[0] : '';
$out = $this->getOutput();
- if( LogPage::isLogType( $headerType ) ) {
+ if ( LogPage::isLogType( $headerType ) ) {
$page = new LogPage( $headerType );
$out->setPageTitle( $page->getName()->text() );
$out->addHTML( $page->getDescription()->parseAsBlock() );
$title = SpecialPage::getTitleFor( 'Log' );
// For B/C, we take strings, but make sure they are converted...
- $types = ($types === '') ? array() : (array)$types;
+ $types = ( $types === '' ) ? array() : (array)$types;
$tagSelector = ChangeTags::buildTagFilterSelector( $tagFilter );
// Option value -> message mapping
$links = array();
$hiddens = ''; // keep track for "go" button
- foreach( $filter as $type => $val ) {
+ foreach ( $filter as $type => $val ) {
// Should the below assignment be outside the foreach?
// Then it would have to be copied. Not certain what is more expensive.
$query = $this->getDefaultQuery();
public function getTypeSelector() {
$typesByName = array(); // Temporary array
// First pass to load the log names
- foreach( LogPage::validTypes() as $type ) {
+ foreach ( LogPage::validTypes() as $type ) {
$page = new LogPage( $type );
$restriction = $page->getRestriction();
if ( $this->getUser()->isAllowed( $restriction ) ) {
$typesByName = array( '' => $public ) + $typesByName;
$select = new XmlSelect( 'type' );
- foreach( $typesByName as $type => $name ) {
+ foreach ( $typesByName as $type => $name ) {
$select->addOption( $name, $type );
}
private function getExtraInputs( $types ) {
$offender = $this->getRequest()->getVal( 'offender' );
$user = User::newFromName( $offender, false );
- if( !$user || ( $user->getId() == 0 && !IP::isIPAddress( $offender ) ) ) {
+ if ( !$user || ( $user->getId() == 0 && !IP::isIPAddress( $offender ) ) ) {
$offender = ''; // Blank field if invalid
}
- if( count( $types ) == 1 && $types[0] == 'suppress' ) {
+ if ( count( $types ) == 1 && $types[0] == 'suppress' ) {
return Xml::inputLabel( $this->msg( 'revdelete-offender' )->text(), 'offender',
'mw-log-offender', 20, $offender );
}
* @return string
*/
private function getShowHideLinks( $row ) {
- if( ( $this->flags == self::NO_ACTION_LINK ) // we don't want to see the links
+ if ( ( $this->flags == self::NO_ACTION_LINK ) // we don't want to see the links
|| $row->log_type == 'suppress' ) { // no one can hide items from the suppress log
return '';
}
$del = '';
$user = $this->getUser();
// Don't show useless checkbox to people who cannot hide log entries
- if( $user->isAllowed( 'deletedhistory' ) ) {
+ if ( $user->isAllowed( 'deletedhistory' ) ) {
$canHide = $user->isAllowed( 'deletelogentry' );
- if( $row->log_deleted || $canHide ) {
+ if ( $row->log_deleted || $canHide ) {
if ( $canHide && $this->flags & self::USE_REVDEL_CHECKBOXES ) { // Show checkboxes instead of links.
if ( !self::userCan( $row, LogPage::DELETED_RESTRICTED, $user ) ) { // If event was hidden from sysops
$del = Xml::check( 'deleterevisions', false, array( 'disabled' => 'disabled' ) );
} else {
$query = array(
'target' => SpecialPage::getTitleFor( 'Log', $row->log_type )->getPrefixedDBkey(),
- 'type' => 'logging',
- 'ids' => $row->log_id,
+ 'type' => 'logging',
+ 'ids' => $row->log_id,
);
$del = Linker::revDeleteLink( $query, self::isDeleted( $row, LogPage::DELETED_RESTRICTED ), $canHide );
}
public static function typeAction( $row, $type, $action, $right = '' ) {
$match = is_array( $type ) ?
in_array( $row->log_type, $type ) : $row->log_type == $type;
- if( $match ) {
+ if ( $match ) {
$match = is_array( $action ) ?
in_array( $row->log_action, $action ) : $row->log_action == $action;
- if( $match && $right ) {
+ if ( $match && $right ) {
global $wgUser;
$match = $wgUser->isAllowed( $right );
}
* @return Boolean
*/
public static function userCanBitfield( $bitfield, $field, User $user = null ) {
- if( $bitfield & $field ) {
+ if ( $bitfield & $field ) {
if ( $bitfield & LogPage::DELETED_RESTRICTED ) {
$permission = 'suppressrevision';
} else {
* set to '' to unset offset
* - wrap String Wrap the message in html (usually something like "<div ...>$1</div>").
* - flags Integer display flags (NO_ACTION_LINK,NO_EXTRA_USER_LINKS)
+ * - useRequestParams boolean Set true to use Pager-related parameters in the WebRequest
* @return Integer Number of total log items (not limited by $lim)
*/
public static function showLogExtract(
'showIfEmpty' => true,
'msgKey' => array( '' ),
'wrap' => "$1",
- 'flags' => 0
+ 'flags' => 0,
+ 'useRequestParams' => false,
);
# The + operator appends elements of remaining keys from the right
# handed array to the left handed, whereas duplicated keys are NOT overwritten.
$msgKey = $param['msgKey'];
$wrap = $param['wrap'];
$flags = $param['flags'];
+ $useRequestParams = $param['useRequestParams'];
if ( !is_array( $msgKey ) ) {
$msgKey = array( $msgKey );
}
# Insert list of top 50 (or top $lim) items
$loglist = new LogEventsList( $context, null, $flags );
$pager = new LogPager( $loglist, $types, $user, $page, '', $conds );
+ if ( !$useRequestParams ) {
+ # Reset vars that may have been taken from the request
+ $pager->mLimit = 50;
+ $pager->mDefaultLimit = 50;
+ $pager->mOffset = "";
+ $pager->mIsBackwards = false;
+ }
if ( isset( $param['offset'] ) ) { # Tell pager to ignore WebRequest offset
$pager->setOffset( $param['offset'] );
}
- if( $lim > 0 ) $pager->mLimit = $lim;
+ if ( $lim > 0 ) {
+ $pager->mLimit = $lim;
+ }
$logBody = $pager->getBody();
$s = '';
- if( $logBody ) {
+ if ( $logBody ) {
if ( $msgKey[0] ) {
$s = '<div class="mw-warning-with-logexcerpt">';
$s .= $loglist->beginLogEventsList() .
$logBody .
$loglist->endLogEventsList();
- } else {
- if ( $showIfEmpty ) {
- $s = Html::rawElement( 'div', array( 'class' => 'mw-warning-logempty' ),
- $context->msg( 'logempty' )->parse() );
- }
+ } elseif ( $showIfEmpty ) {
+ $s = Html::rawElement( 'div', array( 'class' => 'mw-warning-logempty' ),
+ $context->msg( 'logempty' )->parse() );
}
- if( $pager->getNumRows() > $pager->mLimit ) { # Show "Full log" link
+ if ( $pager->getNumRows() > $pager->mLimit ) { # Show "Full log" link
$urlParam = array();
if ( $page instanceof Title ) {
$urlParam['page'] = $page->getPrefixedDBkey();
} elseif ( $page != '' ) {
$urlParam['page'] = $page;
}
- if ( $user != '' )
+ if ( $user != '' ) {
$urlParam['user'] = $user;
- if ( !is_array( $types ) ) # Make it an array, if it isn't
+ }
+ if ( !is_array( $types ) ) { # Make it an array, if it isn't
$types = array( $types );
+ }
# If there is exactly one log type, we can link to Special:Log?type=foo
- if ( count( $types ) == 1 )
+ if ( count( $types ) == 1 ) {
$urlParam['type'] = $types[0];
+ }
$s .= Linker::link(
SpecialPage::getTitleFor( 'Log' ),
$context->msg( 'log-fulllog' )->escaped(),
$hiddenLogs = array();
// Don't show private logs to unprivileged users
- foreach( $wgLogRestrictions as $logType => $right ) {
- if( $audience == 'public' || !$user->isAllowed( $right ) ) {
+ foreach ( $wgLogRestrictions as $logType => $right ) {
+ if ( $audience == 'public' || !$user->isAllowed( $right ) ) {
$hiddenLogs[] = $logType;
}
}
- if( count( $hiddenLogs ) == 1 ) {
+ if ( count( $hiddenLogs ) == 1 ) {
return 'log_type != ' . $db->addQuotes( $hiddenLogs[0] );
- } elseif( $hiddenLogs ) {
+ } elseif ( $hiddenLogs ) {
return 'log_type NOT IN (' . $db->makeList( $hiddenLogs ) . ')';
}
return false;
// case 'suppress' --private log -- aaron (sign your messages so we know who to blame in a few years :-D)
// default:
}
- if( is_null( $text ) ) {
+ if ( is_null( $text ) ) {
$text = $this->getPlainActionText();
}
return $this->msg( 'parentheses' )->rawParams(
$this->context->getLanguage()->pipeList( $links ) )->escaped();
// Show unmerge link
- } elseif( $type == 'merge' && $subtype == 'merge' ) {
+ } elseif ( $type == 'merge' && $subtype == 'merge' ) {
if ( !$this->context->getUser()->isAllowed( 'mergehistory' ) ) {
return '';
}
$newId = !is_null( $log_id ) ? $log_id : $dbw->insertId();
# And update recentchanges
- if( $this->updateRecentChanges ) {
+ if ( $this->updateRecentChanges ) {
$titleObj = SpecialPage::getTitleFor( 'Log', $this->type );
RecentChange::notifyLog(
$this->type, $this->action, $this->target, $this->comment,
$this->params, $newId, $this->getRcCommentIRC()
);
- } elseif( $this->sendToUDP ) {
+ } elseif ( $this->sendToUDP ) {
# Don't send private logs to UDP
- if( isset( $wgLogRestrictions[$this->type] ) && $wgLogRestrictions[$this->type] != '*' ) {
+ if ( isset( $wgLogRestrictions[$this->type] ) && $wgLogRestrictions[$this->type] != '*' ) {
return $newId;
}
public function getRcComment() {
$rcComment = $this->actionText;
- if( $this->comment != '' ) {
+ if ( $this->comment != '' ) {
if ( $rcComment == '' ) {
$rcComment = $this->comment;
} else {
public function getRcCommentIRC() {
$rcComment = $this->ircActionText;
- if( $this->comment != '' ) {
+ if ( $this->comment != '' ) {
if ( $rcComment == '' ) {
$rcComment = $this->comment;
} else {
public static function logName( $type ) {
global $wgLogNames;
- if( isset( $wgLogNames[$type] ) ) {
+ if ( isset( $wgLogNames[$type] ) ) {
return str_replace( '_', ' ', wfMessage( $wgLogNames[$type] )->text() );
} else {
// Bogus log types? Perhaps an extension was removed.
$key = "$type/$action";
- if( isset( $wgLogActions[$key] ) ) {
- if( is_null( $title ) ) {
+ if ( isset( $wgLogActions[$key] ) ) {
+ if ( is_null( $title ) ) {
$rv = wfMessage( $wgLogActions[$key] )->inLanguage( $langObj )->escaped();
} else {
$titleLink = self::getTitleLink( $type, $langObjOrNull, $title, $params );
- if( count( $params ) == 0 ) {
+ if ( count( $params ) == 0 ) {
$rv = wfMessage( $wgLogActions[$key] )->rawParams( $titleLink )->inLanguage( $langObj )->escaped();
} else {
$details = '';
// Page protections
} elseif ( $type == 'protect' && count( $params ) == 3 ) {
// Restrictions and expiries
- if( $skin ) {
+ if ( $skin ) {
$details .= $wgLang->getDirMark() . htmlspecialchars( " {$params[1]}" );
} else {
$details .= " {$params[1]}";
}
// Cascading flag...
- if( $params[2] ) {
+ if ( $params[2] ) {
$details .= ' [' . wfMessage( 'protect-summary-cascade' )->inLanguage( $langObj )->text() . ']';
}
}
} else {
global $wgLogActionsHandlers;
- if( isset( $wgLogActionsHandlers[$key] ) ) {
+ if ( isset( $wgLogActionsHandlers[$key] ) ) {
$args = func_get_args();
$rv = call_user_func_array( $wgLogActionsHandlers[$key], $args );
} else {
// you want to link to something OTHER than the title of the log entry.
// The real problem, which Erik was trying to fix (and it sort-of works now) is
// that the same messages are being treated as both wikitext *and* HTML.
- if( $filterWikilinks ) {
+ if ( $filterWikilinks ) {
$rv = str_replace( '[[', '', $rv );
$rv = str_replace( ']]', '', $rv );
}
* @return String
*/
protected static function getTitleLink( $type, $lang, $title, &$params ) {
- if( !$lang ) {
+ if ( !$lang ) {
return $title->getPrefixedText();
}
}
break;
case 'block':
- if( substr( $title->getText(), 0, 1 ) == '#' ) {
+ if ( substr( $title->getText(), 0, 1 ) == '#' ) {
$titleLink = $title->getText();
} else {
// @todo Store the user identifier in the parameters
$params[1] = $lang->timeanddate( $params[1] );
break;
default:
- if( $title->isSpecialPage() ) {
+ if ( $title->isSpecialPage() ) {
list( $name, $par ) = SpecialPageFactory::resolveAlias( $title->getDBkey() );
# Use the language name for log titles, rather than Log/X
- if( $name == 'Log' ) {
+ if ( $name == 'Log' ) {
$logPage = new LogPage( $par );
$titleLink = Linker::link( $title, $logPage->getName()->escaped() );
$titleLink = wfMessage( 'parentheses' )
* @return Boolean
*/
public function addRelations( $field, $values, $logid ) {
- if( !strlen( $field ) || empty( $values ) ) {
+ if ( !strlen( $field ) || empty( $values ) ) {
return false; // nothing
}
$data = array();
- foreach( $values as $value ) {
+ foreach ( $values as $value ) {
$data[] = array(
'ls_field' => $field,
'ls_value' => $value,
public static function formatBlockFlags( $flags, $lang ) {
$flags = explode( ',', trim( $flags ) );
- if( count( $flags ) > 0 ) {
- for( $i = 0; $i < count( $flags ); $i++ ) {
+ if ( count( $flags ) > 0 ) {
+ for ( $i = 0; $i < count( $flags ); $i++ ) {
$flags[$i] = self::formatBlockFlag( $flags[$i], $lang );
}
return wfMessage( 'parentheses' )->inLanguage( $lang )
public static function formatBlockFlag( $flag, $lang ) {
static $messages = array();
- if( !isset( $messages[$flag] ) ) {
+ if ( !isset( $messages[$flag] ) ) {
$messages[$flag] = htmlspecialchars( $flag ); // Fallback
// For grepping. The following core messages can be used here:
public function getFilterParams() {
global $wgFilterLogTypes;
$filters = array();
- if( count( $this->types ) ) {
+ if ( count( $this->types ) ) {
return $filters;
}
- foreach( $wgFilterLogTypes as $type => $default ) {
+ foreach ( $wgFilterLogTypes as $type => $default ) {
// Avoid silly filtering
- if( $type !== 'patrol' || $this->getUser()->useNPPatrol() ) {
+ if ( $type !== 'patrol' || $this->getUser()->useNPPatrol() ) {
$hide = $this->getRequest()->getInt( "hide_{$type}_log", $default );
$filters[$type] = $hide;
- if( $hide )
+ if ( $hide ) {
$this->mConds[] = 'log_type != ' . $this->mDb->addQuotes( $type );
+ }
}
}
return $filters;
$user = $this->getUser();
// If $types is not an array, make it an array
- $types = ($types === '') ? array() : (array)$types;
+ $types = ( $types === '' ) ? array() : (array)$types;
// Don't even show header for private logs; don't recognize it...
$needReindex = false;
foreach ( $types as $type ) {
- if( isset( $wgLogRestrictions[$type] )
+ if ( isset( $wgLogRestrictions[$type] )
&& !$user->isAllowed( $wgLogRestrictions[$type] )
) {
$needReindex = true;
// Also, only show them upon specific request to avoid suprises.
$audience = $types ? 'user' : 'public';
$hideLogs = LogEventsList::getExcludeClause( $this->mDb, $audience, $user );
- if( $hideLogs !== false ) {
+ if ( $hideLogs !== false ) {
$this->mConds[] = $hideLogs;
}
- if( count( $types ) ) {
+ if ( count( $types ) ) {
$this->mConds['log_type'] = $types;
// Set typeCGI; used in url param for paging
- if( count( $types ) == 1 ) $this->typeCGI = $types[0];
+ if ( count( $types ) == 1 ) {
+ $this->typeCGI = $types[0];
+ }
}
}
* @return bool
*/
private function limitPerformer( $name ) {
- if( $name == '' ) {
+ if ( $name == '' ) {
return false;
}
$usertitle = Title::makeTitleSafe( NS_USER, $name );
- if( is_null( $usertitle ) ) {
+ if ( is_null( $usertitle ) ) {
return false;
}
/* Fetch userid at first, if known, provides awesome query plan afterwards */
$userid = User::idFromName( $name );
- if( !$userid ) {
+ if ( !$userid ) {
/* It should be nicer to abort query at all,
but for now it won't pass anywhere behind the optimizer */
$this->mConds[] = "NULL";
$this->mConds['log_user'] = $userid;
// Paranoia: avoid brute force searches (bug 17342)
$user = $this->getUser();
- if( !$user->isAllowed( 'deletedhistory' ) ) {
+ if ( !$user->isAllowed( 'deletedhistory' ) ) {
$this->mConds[] = $this->mDb->bitAnd( 'log_deleted', LogPage::DELETED_USER ) . ' = 0';
- } elseif( !$user->isAllowed( 'suppressrevision' ) ) {
+ } elseif ( !$user->isAllowed( 'suppressrevision' ) ) {
$this->mConds[] = $this->mDb->bitAnd( 'log_deleted', LogPage::SUPPRESSED_USER ) .
' != ' . LogPage::SUPPRESSED_USER;
}
$title = $page;
} else {
$title = Title::newFromText( $page );
- if( strlen( $page ) == 0 || !$title instanceof Title ) {
+ if ( strlen( $page ) == 0 || !$title instanceof Title ) {
return false;
}
}
# 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.
- if( $pattern && !$wgMiserMode ) {
+ if ( $pattern && !$wgMiserMode ) {
$this->mConds['log_namespace'] = $ns;
$this->mConds[] = 'log_title ' . $db->buildLike( $title->getDBkey(), $db->anyString() );
$this->pattern = $pattern;
}
// Paranoia: avoid brute force searches (bug 17342)
$user = $this->getUser();
- if( !$user->isAllowed( 'deletedhistory' ) ) {
+ if ( !$user->isAllowed( 'deletedhistory' ) ) {
$this->mConds[] = $db->bitAnd( 'log_deleted', LogPage::DELETED_ACTION) . ' = 0';
- } elseif( !$user->isAllowed( 'suppressrevision' ) ) {
+ } elseif ( !$user->isAllowed( 'suppressrevision' ) ) {
$this->mConds[] = $db->bitAnd( 'log_deleted', LogPage::SUPPRESSED_ACTION) .
' != ' . LogPage::SUPPRESSED_ACTION;
}
# Add log_search table if there are conditions on it.
# This filters the results to only include log rows that have
# log_search records with the specified ls_field and ls_value values.
- if( array_key_exists( 'ls_field', $this->mConds ) ) {
+ if ( array_key_exists( 'ls_field', $this->mConds ) ) {
$tables[] = 'log_search';
$index['log_search'] = 'ls_field_val';
$index['logging'] = 'PRIMARY';
# Avoid usage of the wrong index by limiting
# the choices of available indexes. This mainly
# avoids site-breaking filesorts.
- } elseif( $this->title || $this->pattern || $this->performer ) {
+ } elseif ( $this->title || $this->pattern || $this->performer ) {
$index['logging'] = array( 'page_time', 'user_time' );
- if( count( $this->types ) == 1 ) {
+ if ( count( $this->types ) == 1 ) {
$index['logging'][] = 'log_user_type_time';
}
- } elseif( count( $this->types ) == 1 ) {
+ } elseif ( count( $this->types ) == 1 ) {
$index['logging'] = 'type_time';
} else {
$index['logging'] = 'times';
$joins['log_search'] = array( 'INNER JOIN', 'ls_log_id=log_id' );
$info = array(
- 'tables' => $tables,
- 'fields' => $fields,
- 'conds' => array_merge( $conds, $this->mConds ),
- 'options' => $options,
+ 'tables' => $tables,
+ 'fields' => $fields,
+ 'conds' => array_merge( $conds, $this->mConds ),
+ 'options' => $options,
'join_conds' => $joins,
);
# Add ChangeTags filter query
public function getStartBody() {
wfProfileIn( __METHOD__ );
# Do a link batch query
- if( $this->getNumRows() > 0 ) {
+ if ( $this->getNumRows() > 0 ) {
$lb = new LinkBatch;
foreach ( $this->mResult as $row ) {
$lb->add( $row->log_namespace, $row->log_title );
array(
'wpOldTitle' => $destTitle->getPrefixedDBkey(),
'wpNewTitle' => $this->entry->getTarget()->getPrefixedDBkey(),
- 'wpReason' => $this->msg( 'revertmove' )->inContentLanguage()->text(),
+ 'wpReason' => $this->msg( 'revertmove' )->inContentLanguage()->text(),
'wpMovetalk' => 0
)
);
*/
function getImageSize( $image, $filename ) {
$f = fopen( $filename, 'rb' );
- if( !$f ) {
+ if ( !$f ) {
return false;
}
$header = fread( $f, 54 );
$im->sharpenImage( $radius, $sigma );
}
$im->setCompressionQuality( 80 );
- } elseif( $params['mimeType'] == 'image/png' ) {
+ } elseif ( $params['mimeType'] == 'image/png' ) {
$im->setCompressionQuality( 95 );
} elseif ( $params['mimeType'] == 'image/gif' ) {
if ( $this->getImageArea( $image ) > $wgMaxAnimatedGifArea ) {
$meta->addMetadata( Array( 'JPEGFileComment' => $seg['COM'] ), 'native' );
}
if ( isset( $seg['PSIR'] ) && count( $seg['PSIR'] ) > 0 ) {
- foreach( $seg['PSIR'] as $curPSIRValue ) {
+ foreach ( $seg['PSIR'] as $curPSIRValue ) {
$meta->doApp13( $curPSIRValue );
}
}
*/
static function getTiffByteOrder( $filename ) {
$fh = fopen( $filename, 'rb' );
- if ( !$fh ) return false;
+ if ( !$fh ) {
+ return false;
+ }
$head = fread( $fh, 2 );
fclose( $fh );
$image->dejaMetaTree = false;
$image->djvuTextTree = false;
$tree = new SimpleXMLElement( $metadata );
- if( $tree->getName() == 'mw-djvu' ) {
- foreach( $tree->children() as $b ) {
- if( $b->getName() == 'DjVuTxt' ) {
+ if ( $tree->getName() == 'mw-djvu' ) {
+ foreach ( $tree->children() as $b ) {
+ if ( $b->getName() == 'DjVuTxt' ) {
$image->djvuTextTree = $b;
- }
- elseif ( $b->getName() == 'DjVuXML' ) {
+ } elseif ( $b->getName() == 'DjVuXML' ) {
$image->dejaMetaTree = $b;
}
}
}
wfRestoreWarnings();
wfProfileOut( __METHOD__ );
- if( $gettext ) {
+ if ( $gettext ) {
return $image->djvuTextTree;
} else {
return $image->dejaMetaTree;
public function getImageSize() {
$data = $this->getInfo();
- if( $data !== false ) {
+ if ( $data !== false ) {
$width = $data['width'];
$height = $data['height'];
$start = ftell( $file );
$secondary = fread( $file, 4 );
echo str_repeat( ' ', $indent * 4 ) . "($secondary)\n";
- while( ftell( $file ) - $start < $length ) {
+ while ( ftell( $file ) - $start < $length ) {
$chunkHeader = fread( $file, 8 );
- if( $chunkHeader == '' ) {
+ if ( $chunkHeader == '' ) {
break;
}
// @todo FIXME: Would be good to replace this extract() call with something that explicitly initializes local variables.
extract( unpack( 'a4chunk/NchunkLength', $chunkHeader ) );
echo str_repeat( ' ', $indent * 4 ) . "$chunk $chunkLength\n";
- if( $chunk == 'FORM' ) {
+ if ( $chunk == 'FORM' ) {
$this->dumpForm( $file, $chunkLength, $indent + 1 );
} else {
fseek( $file, $chunkLength, SEEK_CUR );
- if( $chunkLength & 1 == 1 ) {
+ if ( $chunkLength & 1 == 1 ) {
// Padding byte between chunks
fseek( $file, 1, SEEK_CUR );
}
wfSuppressWarnings();
$file = fopen( $this->mFilename, 'rb' );
wfRestoreWarnings();
- if( $file === false ) {
+ if ( $file === false ) {
wfDebug( __METHOD__ . ": missing or failed file read\n" );
return false;
}
$header = fread( $file, 16 );
$info = false;
- if( strlen( $header ) < 16 ) {
+ if ( strlen( $header ) < 16 ) {
wfDebug( __METHOD__ . ": too short file header\n" );
} else {
// @todo FIXME: Would be good to replace this extract() call with something that explicitly initializes local variables.
extract( unpack( 'a4magic/a4form/NformLength/a4subtype', $header ) );
- if( $magic != 'AT&T' ) {
+ if ( $magic != 'AT&T' ) {
wfDebug( __METHOD__ . ": not a DjVu file\n" );
- } elseif( $subtype == 'DJVU' ) {
+ } elseif ( $subtype == 'DJVU' ) {
// Single-page document
$info = $this->getPageInfo( $file, $formLength );
- } elseif( $subtype == 'DJVM' ) {
+ } elseif ( $subtype == 'DJVM' ) {
// Multi-page document
$info = $this->getMultiPageInfo( $file, $formLength );
- } else {
+ } else {
wfDebug( __METHOD__ . ": unrecognized DJVU file type '$formType'\n" );
}
}
private function readChunk( $file ) {
$header = fread( $file, 8 );
- if( strlen( $header ) < 8 ) {
+ if ( strlen( $header ) < 8 ) {
return array( false, 0 );
} else {
// @todo FIXME: Would be good to replace this extract() call with something that explicitly initializes local variables.
private function skipChunk( $file, $chunkLength ) {
fseek( $file, $chunkLength, SEEK_CUR );
- if( $chunkLength & 0x01 == 1 && !feof( $file ) ) {
+ if ( $chunkLength & 0x01 == 1 && !feof( $file ) ) {
// padding byte
fseek( $file, 1, SEEK_CUR );
}
$start = ftell( $file );
do {
list( $chunk, $length ) = $this->readChunk( $file );
- if( !$chunk ) {
+ if ( !$chunk ) {
break;
}
- if( $chunk == 'FORM' ) {
+ if ( $chunk == 'FORM' ) {
$subtype = fread( $file, 4 );
- if( $subtype == 'DJVU' ) {
+ if ( $subtype == 'DJVU' ) {
wfDebug( __METHOD__ . ": found first subpage\n" );
return $this->getPageInfo( $file, $length );
}
wfDebug( __METHOD__ . ": skipping '$chunk' chunk\n" );
$this->skipChunk( $file, $length );
}
- } while( $length != 0 && !feof( $file ) && ftell( $file ) - $start < $formLength );
+ } while ( $length != 0 && !feof( $file ) && ftell( $file ) - $start < $formLength );
wfDebug( __METHOD__ . ": multi-page DJVU file contained no pages\n" );
return false;
private function getPageInfo( $file, $formLength ) {
list( $chunk, $length ) = $this->readChunk( $file );
- if( $chunk != 'INFO' ) {
+ if ( $chunk != 'INFO' ) {
wfDebug( __METHOD__ . ": expected INFO chunk, got '$chunk'\n" );
return false;
}
- if( $length < 9 ) {
+ if ( $length < 9 ) {
wfDebug( __METHOD__ . ": INFO should be 9 or 10 bytes, found $length\n" );
return false;
}
$data = fread( $file, $length );
- if( strlen( $data ) < $length ) {
+ if ( strlen( $data ) < $length ) {
wfDebug( __METHOD__ . ": INFO chunk cut off\n" );
return false;
}
$retval = '';
$txt = wfShellExec( $cmd, $retval, array(), array( 'memory' => self::DJVUTXT_MEMORY_LIMIT ) );
wfProfileOut( 'djvutxt' );
- if( $retval == 0 ) {
+ if ( $retval == 0 ) {
# Strip some control characters
$txt = preg_replace( "/[\013\035\037]/", "", $txt );
$reg = <<<EOR
const SHORT = 3; //!< A 16-bit (2-byte) unsigned integer.
const LONG = 4; //!< A 32-bit (4-byte) unsigned integer.
const RATIONAL = 5; //!< Two LONGs. The first LONG is the numerator and the second LONG expresses the denominator
+ const SHORT_OR_LONG = 6; //!< A 16-bit (2-byte) or 32-bit (4-byte) unsigned integer.
const UNDEFINED = 7; //!< An 8-bit byte that can take any value depending on the field definition
const SLONG = 9; //!< A 32-bit (4-byte) signed integer (2's complement notation),
const SRATIONAL = 10; //!< Two SLONGs. The first SLONG is the numerator and the second SLONG is the denominator.
# TIFF Rev. 6.0 Attribute Information (p22)
'IFD0' => array(
# Tags relating to image structure
- 'ImageWidth' => Exif::SHORT.','.Exif::LONG, # Image width
- 'ImageLength' => Exif::SHORT.','.Exif::LONG, # Image height
+ 'ImageWidth' => Exif::SHORT_OR_LONG, # Image width
+ 'ImageLength' => Exif::SHORT_OR_LONG, # Image height
'BitsPerSample' => array( Exif::SHORT, 3 ), # Number of bits per component
# "When a primary image is JPEG compressed, this designation is not"
# "necessary and is omitted." (p23)
'Orientation' => Exif::SHORT, # Orientation of image #p24
'SamplesPerPixel' => Exif::SHORT, # Number of components
'PlanarConfiguration' => Exif::SHORT, # Image data arrangement #p24
- 'YCbCrSubSampling' => array( Exif::SHORT, 2), # Subsampling ratio of Y to C #p24
+ 'YCbCrSubSampling' => array( Exif::SHORT, 2 ), # Subsampling ratio of Y to C #p24
'YCbCrPositioning' => Exif::SHORT, # Y and C positioning #p24-25
'XResolution' => Exif::RATIONAL, # Image resolution in width direction
'YResolution' => Exif::RATIONAL, # Image resolution in height direction
'ResolutionUnit' => Exif::SHORT, # Unit of X and Y resolution #(p26)
# Tags relating to recording offset
- 'StripOffsets' => Exif::SHORT.','.Exif::LONG, # Image data location
- 'RowsPerStrip' => Exif::SHORT.','.Exif::LONG, # Number of rows per strip
- 'StripByteCounts' => Exif::SHORT.','.Exif::LONG, # Bytes per compressed strip
- 'JPEGInterchangeFormat' => Exif::SHORT.','.Exif::LONG, # Offset to JPEG SOI
- 'JPEGInterchangeFormatLength' => Exif::SHORT.','.Exif::LONG, # Bytes of JPEG data
+ 'StripOffsets' => Exif::SHORT_OR_LONG, # Image data location
+ 'RowsPerStrip' => Exif::SHORT_OR_LONG, # Number of rows per strip
+ 'StripByteCounts' => Exif::SHORT_OR_LONG, # Bytes per compressed strip
+ 'JPEGInterchangeFormat' => Exif::SHORT_OR_LONG, # Offset to JPEG SOI
+ 'JPEGInterchangeFormatLength' => Exif::SHORT_OR_LONG, # Bytes of JPEG data
# Tags relating to image data characteristics
'TransferFunction' => Exif::IGNORE, # Transfer function
- 'WhitePoint' => array( Exif::RATIONAL, 2), # White point chromaticity
- 'PrimaryChromaticities' => array( Exif::RATIONAL, 6), # Chromaticities of primarities
- 'YCbCrCoefficients' => array( Exif::RATIONAL, 3), # Color space transformation matrix coefficients #p27
- 'ReferenceBlackWhite' => array( Exif::RATIONAL, 6), # Pair of black and white reference values
+ 'WhitePoint' => array( Exif::RATIONAL, 2 ), # White point chromaticity
+ 'PrimaryChromaticities' => array( Exif::RATIONAL, 6 ), # Chromaticities of primarities
+ 'YCbCrCoefficients' => array( Exif::RATIONAL, 3 ), # Color space transformation matrix coefficients #p27
+ 'ReferenceBlackWhite' => array( Exif::RATIONAL, 6 ), # Pair of black and white reference values
# Other tags
'DateTime' => Exif::ASCII, # File change date and time
'EXIF' => array(
# TODO: NOTE: Nonexistence of this field is taken to mean nonconformance
# to the EXIF 2.1 AND 2.2 standards
- 'ExifVersion' => Exif::UNDEFINED, # Exif version
+ 'ExifVersion' => Exif::UNDEFINED, # Exif version
'FlashPixVersion' => Exif::UNDEFINED, # Supported Flashpix version #p32
# Tags relating to Image Data Characteristics
# Tags relating to image configuration
'ComponentsConfiguration' => Exif::UNDEFINED, # Meaning of each component #p33
'CompressedBitsPerPixel' => Exif::RATIONAL, # Image compression mode
- 'PixelYDimension' => Exif::SHORT.','.Exif::LONG, # Valid image width
- 'PixelXDimension' => Exif::SHORT.','.Exif::LONG, # Valid image height
+ 'PixelYDimension' => Exif::SHORT_OR_LONG, # Valid image width
+ 'PixelXDimension' => Exif::SHORT_OR_LONG, # Valid image height
# Tags relating to related user information
'MakerNote' => Exif::IGNORE, # Manufacturer notes
'FocalPlaneXResolution' => Exif::RATIONAL, # Focal plane X resolution
'FocalPlaneYResolution' => Exif::RATIONAL, # Focal plane Y resolution
'FocalPlaneResolutionUnit' => Exif::SHORT, # Focal plane resolution unit #p46
- 'SubjectLocation' => array( Exif::SHORT, 2), # Subject location
+ 'SubjectLocation' => array( Exif::SHORT, 2 ), # Subject location
'ExposureIndex' => Exif::RATIONAL, # Exposure index
'SensingMethod' => Exif::SHORT, # Sensing method #p46
'FileSource' => Exif::UNDEFINED, # File source #p47
'GPSLatitudeRef' => Exif::ASCII, # North or South Latitude #p52-53
'GPSLatitude' => array( Exif::RATIONAL, 3 ), # Latitude
'GPSLongitudeRef' => Exif::ASCII, # East or West Longitude #p53
- 'GPSLongitude' => array( Exif::RATIONAL, 3), # Longitude
+ 'GPSLongitude' => array( Exif::RATIONAL, 3 ), # Longitude
'GPSAltitudeRef' => Exif::UNDEFINED,
# Altitude reference. Note, the exif standard says this should be an EXIF::Byte,
# but php seems to disagree.
'GPSAltitude' => Exif::RATIONAL, # Altitude
- 'GPSTimeStamp' => array( Exif::RATIONAL, 3), # GPS time (atomic clock)
+ 'GPSTimeStamp' => array( Exif::RATIONAL, 3 ), # GPS time (atomic clock)
'GPSSatellites' => Exif::ASCII, # Satellites used for measurement
'GPSStatus' => Exif::ASCII, # Receiver status #p54
'GPSMeasureMode' => Exif::ASCII, # Measurement mode #p54-55
}
$this->debugFile( $this->basename, __FUNCTION__, true );
- if( function_exists( 'exif_read_data' ) ) {
+ if ( function_exists( 'exif_read_data' ) ) {
wfSuppressWarnings();
$data = exif_read_data( $this->file, 0, true );
wfRestoreWarnings();
$debug = "tag is '$tag'";
$etype = $this->mExifTags[$section][$tag];
$ecount = 1;
- if( is_array( $etype ) ) {
+ if ( is_array( $etype ) ) {
list( $etype, $ecount ) = $etype;
- if ( $recursive )
+ if ( $recursive ) {
$ecount = 1; // checking individual elements
+ }
}
$count = count( $val );
- if( $ecount != $count ) {
+ if ( $ecount != $count ) {
$this->debug( $val, __FUNCTION__, "Expected $ecount elements for $tag but got $count" );
return false;
}
- if( $count > 1 ) {
- foreach( $val as $v ) {
- if( !$this->validate( $section, $tag, $v, true ) ) {
+ if ( $count > 1 ) {
+ foreach ( $val as $v ) {
+ if ( !$this->validate( $section, $tag, $v, true ) ) {
return false;
}
}
case (string)Exif::RATIONAL:
$this->debug( $val, __FUNCTION__, $debug );
return $this->isRational( $val );
+ case (string)Exif::SHORT_OR_LONG:
+ $this->debug( $val, __FUNCTION__, $debug );
+ return $this->isShort( $val ) || $this->isLong( $val );
case (string)Exif::UNDEFINED:
$this->debug( $val, __FUNCTION__, $debug );
return $this->isUndefined( $val );
case (string)Exif::SRATIONAL:
$this->debug( $val, __FUNCTION__, $debug );
return $this->isSrational( $val );
- case (string)Exif::SHORT.','.Exif::LONG:
- $this->debug( $val, __FUNCTION__, $debug );
- return $this->isShort( $val ) || $this->isLong( $val );
case (string)Exif::IGNORE:
$this->debug( $val, __FUNCTION__, $debug );
return false;
case 'Flash':
$flashDecode = array(
- 'fired' => $val & bindec( '00000001' ),
- 'return' => ( $val & bindec( '00000110' ) ) >> 1,
- 'mode' => ( $val & bindec( '00011000' ) ) >> 3,
+ 'fired' => $val & bindec( '00000001' ),
+ 'return' => ( $val & bindec( '00000110' ) ) >> 1,
+ 'mode' => ( $val & bindec( '00011000' ) ) >> 3,
'function' => ( $val & bindec( '00100000' ) ) >> 5,
- 'redeye' => ( $val & bindec( '01000000' ) ) >> 6,
+ 'redeye' => ( $val & bindec( '01000000' ) ) >> 6,
// 'reserved' => ($val & bindec( '10000000' )) >> 7,
);
$flashMsgs = array();
static function msg( $tag, $val, $arg = null, $arg2 = null ) {
global $wgContLang;
- if ( $val === '' )
+ if ( $val === '' ) {
$val = 'value';
+ }
return wfMessage( $wgContLang->lc( "exif-$tag-$val" ), $arg, $arg2 )->text();
}
static function formatNum( $num, $round = false ) {
global $wgLang;
$m = array();
- if( is_array( $num ) ) {
+ if ( is_array( $num ) ) {
$out = array();
- foreach( $num as $number ) {
+ foreach ( $num as $number ) {
$out[] = self::formatNum( $number );
}
return $wgLang->commaList( $out );
$numerator = intval( $m[1] );
$denominator = intval( $m[2] );
$gcd = self::gcd( abs( $numerator ), $denominator );
- if( $gcd != 0 ) {
+ if ( $gcd != 0 ) {
// 0 shouldn't happen! ;)
return self::formatNum( $numerator / $gcd ) . '/' . self::formatNum( $denominator / $gcd );
}
else
return gcd( $b, $a % $b );
*/
- while( $b != 0 ) {
+ while ( $b != 0 ) {
$remainder = $a % $b;
// tail recursion...
* @return String of html-ish looking wikitext
*/
public static function collapseContactInfo( $vals ) {
- if( !( isset( $vals['CiAdrExtadr'] )
+ if ( !( isset( $vals['CiAdrExtadr'] )
|| isset( $vals['CiAdrCity'] )
|| isset( $vals['CiAdrCtry'] )
|| isset( $vals['CiEmailWork'] )
// because people often insert >, etc into
// the metadata which should not be interpreted
// but we still want to auto-link urls.
- foreach( $vals as &$val ) {
+ foreach ( $vals as &$val ) {
$val = htmlspecialchars( $val );
}
return self::flattenArray( $vals );
$ser = $image->getMetadata();
if ( $ser ) {
$metadata = unserialize( $ser );
- if( $metadata['frameCount'] > 1 ) {
+ if ( $metadata['frameCount'] > 1 ) {
return true;
}
}
// Skip over the GCT
self::readGCT( $fh, $bpp );
- while( !feof( $fh ) ) {
+ while ( !feof( $fh ) ) {
$buf = fread( $fh, 1 );
if ( $buf == self::$gif_frame_sep ) {
self::skipBlock( $fh );
} elseif ( $buf == self::$gif_extension_sep ) {
$buf = fread( $fh, 1 );
- if ( strlen( $buf ) < 1 ) throw new Exception( "Ran out of input" );
+ if ( strlen( $buf ) < 1 ) {
+ throw new Exception( "Ran out of input" );
+ }
$extension_code = unpack( 'C', $buf );
$extension_code = $extension_code[1];
fread( $fh, 1 ); // Transparency, disposal method, user input
$buf = fread( $fh, 2 ); // Delay, in hundredths of seconds.
- if ( strlen( $buf ) < 2 ) throw new Exception( "Ran out of input" );
+ if ( strlen( $buf ) < 2 ) {
+ throw new Exception( "Ran out of input" );
+ }
$delay = unpack( 'v', $buf );
$delay = $delay[1];
$duration += $delay * 0.01;
fread( $fh, 1 ); // Transparent colour index
$term = fread( $fh, 1 ); // Should be a terminator
- if ( strlen( $term ) < 1 ) throw new Exception( "Ran out of input" );
+ if ( strlen( $term ) < 1 ) {
+ throw new Exception( "Ran out of input" );
+ }
$term = unpack( 'C', $term );
$term = $term[1];
if ( $term != 0 ) {
// Application extension (Netscape info about the animated gif)
// or XMP (or theoretically any other type of extension block)
$blockLength = fread( $fh, 1 );
- if ( strlen( $blockLength ) < 1 ) throw new Exception( "Ran out of input" );
+ if ( strlen( $blockLength ) < 1 ) {
+ throw new Exception( "Ran out of input" );
+ }
$blockLength = unpack( 'C', $blockLength );
$blockLength = $blockLength[1];
$data = fread( $fh, $blockLength );
// Unsigned little-endian integer, loop count or zero for "forever"
$loopData = fread( $fh, 2 );
- if ( strlen( $loopData ) < 2 ) throw new Exception( "Ran out of input" );
+ if ( strlen( $loopData ) < 2 ) {
+ throw new Exception( "Ran out of input" );
+ }
$loopData = unpack( 'v', $loopData );
$loopCount = $loopData[1];
} elseif ( $buf == self::$gif_term ) {
break;
} else {
- if ( strlen( $buf ) < 1 ) throw new Exception( "Ran out of input" );
+ if ( strlen( $buf ) < 1 ) {
+ throw new Exception( "Ran out of input" );
+ }
$byte = unpack( 'C', $buf );
$byte = $byte[1];
throw new Exception( "At position: " . ftell( $fh ) . ", Unknown byte " . $byte );
*/
static function readGCT( $fh, $bpp ) {
if ( $bpp > 0 ) {
- for( $i = 1; $i <= pow( 2, $bpp ); ++$i ) {
+ for ( $i = 1; $i <= pow( 2, $bpp ); ++$i ) {
fread( $fh, 3 );
}
}
* @return int
*/
static function decodeBPP( $data ) {
- if ( strlen( $data ) < 1 ) throw new Exception( "Ran out of input" );
+ if ( strlen( $data ) < 1 ) {
+ throw new Exception( "Ran out of input" );
+ }
$buf = unpack( 'C', $data );
$buf = $buf[1];
$bpp = ( $buf & 7 ) + 1;
static function skipBlock( $fh ) {
while ( !feof( $fh ) ) {
$buf = fread( $fh, 1 );
- if ( strlen( $buf ) < 1 ) throw new Exception( "Ran out of input" );
+ if ( strlen( $buf ) < 1 ) {
+ throw new Exception( "Ran out of input" );
+ }
$block_len = unpack( 'C', $buf );
$block_len = $block_len[1];
if ( $block_len == 0 ) {
$subLength = fread( $fh, 1 );
$blocks = 0;
- while( $subLength !== "\0" ) {
+ while ( $subLength !== "\0" ) {
$blocks++;
if ( $blocks > self::MAX_SUBBLOCKS ) {
throw new Exception( "MAX_SUBBLOCKS exceeded (over $blocks sub-blocks)" );
if ( !isset( $params['page'] ) ) {
$params['page'] = 1;
- } else {
+ } else {
if ( $params['page'] > $image->pageCount() ) {
$params['page'] = $image->pageCount();
}
$width = intval( $width );
# Sanity check $width
- if( $width <= 0 ) {
+ if ( $width <= 0 ) {
wfDebug( __METHOD__ . ": Invalid destination width: $width\n" );
return false;
}
}
$url = wfAppendQuery( $script, $this->getScriptParams( $params ) );
- if( $image->mustRender() || $params['width'] < $image->getWidth() ) {
+ if ( $image->mustRender() || $params['width'] < $image->getWidth() ) {
return new ThumbnailImage( $image, $url, false, $params );
}
}
$rotation = ( $params['rotation'] + $this->getRotation( $file ) ) % 360;
- if( $wgJpegTran && is_file( $wgJpegTran ) ) {
+ if ( $wgJpegTran && is_file( $wgJpegTran ) ) {
$cmd = wfEscapeShellArg( $wgJpegTran ) .
" -rotate " . wfEscapeShellArg( $rotation ) .
" -outfile " . wfEscapeShellArg( $params['dstPath'] ) .
}
$buffer = fread( $fh, 1 );
- while( $buffer === "\xFF" && !feof( $fh ) ) {
+ while ( $buffer === "\xFF" && !feof( $fh ) ) {
// Skip through any 0xFF padding bytes.
$buffer = fread( $fh, 1 );
}
} else {
// segment we don't care about, so skip
$size = wfUnpack( "nint", fread( $fh, 2 ), 2 );
- if ( $size['int'] <= 2 ) throw new MWException( "invalid marker size in jpeg" );
+ if ( $size['int'] <= 2 ) {
+ throw new MWException( "invalid marker size in jpeg" );
+ }
fseek( $fh, $size['int'] - 2, SEEK_CUR );
}
// PHP can take issue with very large unsigned ints and make them negative.
// Which should never ever happen, as this has to be inside a segment
// which is limited to a 16 bit number.
- if ( $lenData['len'] < 0 ) throw new MWException( "Too big PSIR (" . $lenData['len'] . ')' );
+ if ( $lenData['len'] < 0 ) {
+ throw new MWException( "Too big PSIR (" . $lenData['len'] . ')' );
+ }
$offset += 4; // 4bytes length field;
// if odd, add 1 to length to account for
// null pad byte.
- if ( $lenData['len'] % 2 == 1 ) $lenData['len']++;
+ if ( $lenData['len'] % 2 == 1 ) {
+ $lenData['len']++;
+ }
$offset += $lenData['len'];
}
* @param string $path the filename
* @return String
*/
- function getMetadata( $image, $path ) { return ''; }
+ function getMetadata( $image, $path ) {
+ return '';
+ }
/**
* Get metadata version.
*
* @return string
*/
- function getMetadataType( $image ) { return false; }
+ function getMetadataType( $image ) {
+ return false;
+ }
/**
* Check if the metadata string is valid for this handler.
* True if the handled types can be transformed
* @return bool
*/
- function canRender( $file ) { return true; }
+ function canRender( $file ) {
+ return true;
+ }
+
/**
* True if handled types cannot be displayed directly in a browser
* but can be rendered
* @return bool
*/
- function mustRender( $file ) { return false; }
+ function mustRender( $file ) {
+ return false;
+ }
+
/**
* True if the type has multi-page capabilities
* @return bool
*/
- function isMultiPage( $file ) { return false; }
+ function isMultiPage( $file ) {
+ return false;
+ }
+
/**
* Page count for a multi-page document, false if unsupported or unknown
* @return bool
*/
- function pageCount( $file ) { return false; }
+ function pageCount( $file ) {
+ return false;
+ }
+
/**
* The material is vectorized and thus scaling is lossless
* @return bool
*/
- function isVectorized( $file ) { return false; }
+ function isVectorized( $file ) {
+ return false;
+ }
+
/**
* The material is an image, and is animated.
* In particular, video material need not return true.
* @note Before 1.20, this was a method of ImageHandler only
* @return bool
*/
- function isAnimatedImage( $file ) { return false; }
+ function isAnimatedImage( $file ) {
+ return false;
+ }
+
/**
* If the material is animated, we can animate the thumbnail
* @since 1.20
* @return bool If material is not animated, handler may return any value.
*/
- function canAnimateThumbnail( $file ) { return true; }
+ function canAnimateThumbnail( $file ) {
+ return true;
+ }
+
/**
* False if the handler is disabled for all files
* @return bool
*/
- function isEnabled() { return true; }
+ function isEnabled() {
+ return true;
+ }
/**
* Get an associative array of page dimensions
function visibleMetadataFields() {
$fields = array();
$lines = explode( "\n", wfMessage( 'metadata-fields' )->inContentLanguage()->text() );
- foreach( $lines as $line ) {
+ foreach ( $lines as $line ) {
$matches = array();
- if( preg_match( '/^\\*\s*(.*?)\s*$/', $line, $matches ) ) {
+ if ( preg_match( '/^\\*\s*(.*?)\s*$/', $line, $matches ) ) {
$fields[] = $matches[1];
}
}
public static function fitBoxWidth( $boxWidth, $boxHeight, $maxHeight ) {
$idealWidth = $boxWidth * $maxHeight / $boxHeight;
$roundedUp = ceil( $idealWidth );
- if( round( $roundedUp * $boxHeight / $boxWidth ) > $maxHeight ) {
+ if ( round( $roundedUp * $boxHeight / $boxWidth ) > $maxHeight ) {
return floor( $idealWidth );
} else {
return $roundedUp;
* @return bool True if removed, false otherwise
*/
function removeBadFile( $dstPath, $retval = 0 ) {
- if( file_exists( $dstPath ) ) {
+ if ( file_exists( $dstPath ) ) {
$thumbstat = stat( $dstPath );
- if( $thumbstat['size'] == 0 || $retval != 0 ) {
+ if ( $thumbstat['size'] == 0 || $retval != 0 ) {
$result = unlink( $dstPath );
if ( $result ) {
if ( $this->page && $this->page !== 1 ) {
$query = 'page=' . urlencode( $this->page );
}
- if( $params ) {
+ if ( $params ) {
$query .= $query ? '&' . $params : $params;
}
$attribs = array(
# Previous parameters:
# $file, $url, $width, $height, $path = false, $page = false
- if( is_array( $parameters ) ) {
+ if ( is_array( $parameters ) ) {
$defaults = array(
'page' => false
);
$ser = $image->getMetadata();
if ( $ser ) {
$metadata = unserialize( $ser );
- if( $metadata['frameCount'] > 1 ) return true;
+ if ( $metadata['frameCount'] > 1 ) {
+ return true;
+ }
}
return false;
}
$metadata = unserialize( $image->getMetadata() );
wfRestoreWarnings();
- if( !$metadata || $metadata['frameCount'] <= 0 )
+ if ( !$metadata || $metadata['frameCount'] <= 0 ) {
return $original;
+ }
$info = array();
$info[] = $original;
}
} elseif ( $chunk_type == "acTL" ) {
$buf = fread( $fh, $chunk_size );
- if( !$buf || strlen( $buf ) < $chunk_size || $chunk_size < 4 ) {
+ if ( !$buf || strlen( $buf ) < $chunk_size || $chunk_size < 4 ) {
throw new Exception( __METHOD__ . ": Read error" );
}
$metadata = $file->getMetadata();
if ( $metadata ) {
$metadata = $this->unpackMetadata( $metadata );
- if( isset( $metadata['animated'] ) ) {
+ if ( isset( $metadata['animated'] ) ) {
return $metadata['animated'];
}
}
// File not found, broken, etc.
$metadata['error'] = array(
'message' => $e->getMessage(),
- 'code' => $e->getCode()
+ 'code' => $e->getCode()
);
wfDebug( __METHOD__ . ': ' . $e->getMessage() . "\n" );
}
$keepReading = $this->reader->read();
/* Skip until first element */
- while( $keepReading && $this->reader->nodeType != XmlReader::ELEMENT ) {
+ while ( $keepReading && $this->reader->nodeType != XmlReader::ELEMENT ) {
$keepReading = $this->reader->read();
}
*/
private function readField( $name, $metafield = null ) {
$this->debug( "Read field $metafield" );
- if( !$metafield || $this->reader->nodeType != XmlReader::ELEMENT ) {
+ if ( !$metafield || $this->reader->nodeType != XmlReader::ELEMENT ) {
return;
}
$keepReading = $this->reader->read();
- while( $keepReading ) {
- if( $this->reader->localName == $name && $this->reader->namespaceURI == self::NS_SVG && $this->reader->nodeType == XmlReader::END_ELEMENT ) {
+ while ( $keepReading ) {
+ if ( $this->reader->localName == $name && $this->reader->namespaceURI == self::NS_SVG && $this->reader->nodeType == XmlReader::END_ELEMENT ) {
break;
- } elseif( $this->reader->nodeType == XmlReader::TEXT ) {
+ } elseif ( $this->reader->nodeType == XmlReader::TEXT ) {
$this->metadata[$metafield] = trim( $this->reader->value );
}
$keepReading = $this->reader->read();
*/
private function readXml( $metafield = null ) {
$this->debug( "Read top level metadata" );
- if( !$metafield || $this->reader->nodeType != XmlReader::ELEMENT ) {
+ if ( !$metafield || $this->reader->nodeType != XmlReader::ELEMENT ) {
return;
}
// TODO: find and store type of xml snippet. metadata['metadataType'] = "rdf"
- if( method_exists( $this->reader, 'readInnerXML' ) ) {
+ if ( method_exists( $this->reader, 'readInnerXML' ) ) {
$this->metadata[$metafield] = trim( $this->reader->readInnerXML() );
} else {
throw new MWException( "The PHP XMLReader extension does not come with readInnerXML() method. Your libxml is probably out of date (need 2.6.20 or later)." );
*/
private function animateFilter( $name ) {
$this->debug( "animate filter for tag $name" );
- if( $this->reader->nodeType != XmlReader::ELEMENT ) {
+ if ( $this->reader->nodeType != XmlReader::ELEMENT ) {
return;
}
if ( $this->reader->isEmptyElement ) {
}
$exitDepth = $this->reader->depth;
$keepReading = $this->reader->read();
- while( $keepReading ) {
- if( $this->reader->localName == $name && $this->reader->depth <= $exitDepth
+ while ( $keepReading ) {
+ if ( $this->reader->localName == $name && $this->reader->depth <= $exitDepth
&& $this->reader->nodeType == XmlReader::END_ELEMENT ) {
break;
} elseif ( $this->reader->namespaceURI == self::NS_SVG && $this->reader->nodeType == XmlReader::ELEMENT ) {
}
private function debug( $data ) {
- if( $this->mDebug ) {
+ if ( $this->mDebug ) {
wfDebug( "SVGReader: $data\n" );
}
}
$width = null;
$height = null;
- if( $this->reader->getAttribute( 'viewBox' ) ) {
+ if ( $this->reader->getAttribute( 'viewBox' ) ) {
// min-x min-y width height
$viewBox = preg_split( '/\s+/', trim( $this->reader->getAttribute( 'viewBox' ) ) );
- if( count( $viewBox ) == 4 ) {
+ if ( count( $viewBox ) == 4 ) {
$viewWidth = $this->scaleSVGUnit( $viewBox[2] );
$viewHeight = $this->scaleSVGUnit( $viewBox[3] );
- if( $viewWidth > 0 && $viewHeight > 0 ) {
+ if ( $viewWidth > 0 && $viewHeight > 0 ) {
$aspect = $viewWidth / $viewHeight;
$defaultHeight = $defaultWidth / $aspect;
}
}
}
- if( $this->reader->getAttribute( 'width' ) ) {
+ if ( $this->reader->getAttribute( 'width' ) ) {
$width = $this->scaleSVGUnit( $this->reader->getAttribute( 'width' ), $defaultWidth );
$this->metadata['originalWidth'] = $this->reader->getAttribute( 'width' );
}
- if( $this->reader->getAttribute( 'height' ) ) {
+ if ( $this->reader->getAttribute( 'height' ) ) {
$height = $this->scaleSVGUnit( $this->reader->getAttribute( 'height' ), $defaultHeight );
$this->metadata['originalHeight'] = $this->reader->getAttribute( 'height' );
}
- if( !isset( $width ) && !isset( $height ) ) {
+ if ( !isset( $width ) && !isset( $height ) ) {
$width = $defaultWidth;
$height = $width / $aspect;
- } elseif( isset( $width ) && !isset( $height ) ) {
+ } elseif ( isset( $width ) && !isset( $height ) ) {
$height = $width / $aspect;
- } elseif( isset( $height ) && !isset( $width ) ) {
+ } elseif ( isset( $height ) && !isset( $width ) ) {
$width = $height * $aspect;
}
- if( $width > 0 && $height > 0 ) {
+ if ( $width > 0 && $height > 0 ) {
$this->metadata['width'] = intval( round( $width ) );
$this->metadata['height'] = intval( round( $height ) );
}
'in' => 90.0,
'em' => 16.0, // fake it?
'ex' => 12.0, // fake it?
- '' => 1.0, // "User units" pixels by default
+ '' => 1.0, // "User units" pixels by default
);
$matches = array();
- if( preg_match( '/^\s*(\d+(?:\.\d+)?)(em|ex|px|pt|pc|cm|mm|in|%|)\s*$/', $length, $matches ) ) {
+ if ( preg_match( '/^\s*(\d+(?:\.\d+)?)(em|ex|px|pt|pc|cm|mm|in|%|)\s*$/', $length, $matches ) ) {
$length = floatval( $matches[1] );
$unit = $matches[2];
- if( $unit == '%' ) {
+ if ( $unit == '%' ) {
return $length * 0.01 * $viewportSize;
} else {
return $length * $unitLength[$unit];
static function getXCFMetaData( $filename ) {
# Decode master structure
$f = fopen( $filename, 'rb' );
- if( !$f ) {
+ if ( !$f ) {
return false;
}
# The image structure always starts at offset 0 in the XCF file.
}
# Check values
- if( $header['magic'] !== 'gimp xcf' ) {
+ if ( $header['magic'] !== 'gimp xcf' ) {
wfDebug( __METHOD__ . " '$filename' has invalid magic signature.\n" );
return false;
}
) {
// the is_array is just paranoia. It should always
// be an array.
- foreach( $data['xmp-special']['LocationShown'] as $loc ) {
+ foreach ( $data['xmp-special']['LocationShown'] as $loc ) {
if ( !is_array( $loc ) ) {
// To avoid copying over the _type meta-fields.
continue;
}
- foreach( $loc as $field => $val ) {
+ foreach ( $loc as $field => $val ) {
$data['xmp-general'][$field . 'Dest'][] = $val;
}
}
) {
// the is_array is just paranoia. It should always
// be an array.
- foreach( $data['xmp-special']['LocationCreated'] as $loc ) {
+ foreach ( $data['xmp-special']['LocationCreated'] as $loc ) {
if ( !is_array( $loc ) ) {
// To avoid copying over the _type meta-fields.
continue;
}
- foreach( $loc as $field => $val ) {
+ foreach ( $loc as $field => $val ) {
$data['xmp-general'][$field . 'Created'][] = $val;
}
}
throw new MWException( 'Unexpected character data before first rdf:Description element' );
}
- if ( $this->mode[0] === self::MODE_IGNORE ) return;
+ if ( $this->mode[0] === self::MODE_IGNORE ) {
+ return;
+ }
if ( $this->mode[0] !== self::MODE_SIMPLE
&& $this->mode[0] !== self::MODE_QDESC
* @return Array XMP item configuration array.
*/
public static function getItems() {
- if( !self::$ranHooks ) {
+ if ( !self::$ranHooks ) {
// This is for if someone makes a custom metadata extension.
// For example, a medical wiki might want to decode DICOM xmp properties.
wfRunHooks( 'XMPGetInfo', Array( &self::$items ) );
}
usleep( $sleep ); // back off
$locked = $this->add( "{$key}:lock", $timeout );
- } while( !$locked );
+ } while ( !$locked );
return $locked;
}
if ( !isset( $params['persistent'] ) ) {
$params['persistent'] = $GLOBALS['wgMemCachedPersistent'];
}
- if ( !isset( $params['compress_threshold'] ) ) {
+ if ( !isset( $params['compress_threshold'] ) ) {
$params['compress_threshold'] = 1500;
}
if ( !isset( $params['timeout'] ) ) {
$this->stats['delete'] = 1;
}
$cmd = "delete $key $time\r\n";
- if( !$this->_fwrite( $sock, $cmd ) ) {
+ if ( !$this->_fwrite( $sock, $cmd ) ) {
return false;
}
$res = $this->_fgets( $sock );
$sock = false;
$timeout = $this->_connect_timeout;
$errno = $errstr = null;
- for( $i = 0; !$sock && $i < $this->_connect_attempts; $i++ ) {
+ for ( $i = 0; !$sock && $i < $this->_connect_attempts; $i++ ) {
wfSuppressWarnings();
if ( $this->_persistent == 1 ) {
$sock = pfsockopen( $ip, $port, $errno, $errstr, $timeout );
$bu = array();
foreach ( $this->_servers as $v ) {
if ( is_array( $v ) ) {
- for( $i = 0; $i < $v[1]; $i++ ) {
+ for ( $i = 0; $i < $v[1]; $i++ ) {
$bu[] = $v[0];
}
} else {
}
$realkey = is_array( $key ) ? $key[1] : $key;
- for( $tries = 0; $tries < 20; $tries++ ) {
+ for ( $tries = 0; $tries < 20; $tries++ ) {
$host = $this->_buckets[$hv % $this->_bucketcount];
$sock = $this->sock_to_host( $host );
if ( is_resource( $sock ) ) {
while ( 1 ) {
$decl = $this->_fgets( $sock );
- if( $decl === false ) {
+ if ( $decl === false ) {
/*
* If nothing can be read, something is wrong because we know exactly when
* to stop reading (right after "END") and we return right after that.
static function newAccelerator( $params ) {
if ( function_exists( 'apc_fetch' ) ) {
$id = 'apc';
- } elseif( function_exists( 'xcache_get' ) && wfIniGetBool( 'xcache.var_size' ) ) {
+ } elseif ( function_exists( 'xcache_get' ) && wfIniGetBool( 'xcache.var_size' ) ) {
$id = 'xcache';
- } elseif( function_exists( 'wincache_ucache_get' ) ) {
+ } elseif ( function_exists( 'wincache_ucache_get' ) ) {
$id = 'wincache';
} else {
throw new MWException( "CACHE_ACCEL requested but no suitable object " .
*/
static function read( $id ) {
$data = self::getCache()->get( self::getKey( $id ) );
- if( $data === false ) {
+ if ( $data === false ) {
return '';
}
return $data;
$conn->setex( $key, $expiry, $value );
}
- $result = $conn->exec();
+ /*
+ * multi()/exec() (transactional mode) allows multiple values to
+ * be set/get at once and will return an array of results, in
+ * the order they were set/get. In this case, we only set 1
+ * value, which should (in case of success) result in true.
+ */
+ $result = ( $conn->exec() == array( true ) );
} catch ( RedisException $e ) {
$result = false;
$this->handleException( $server, $conn, $e );
$expire = min( $expire, $wgParserCacheExpireTime );
}
- if( $this->containsOldMagic() ) { //compatibility hack
+ if ( $this->containsOldMagic() ) { //compatibility hack
$expire = min( $expire, 3600 ); # 1 hour
}
$parser->setFunctionHook( 'pagenamee', array( __CLASS__, 'pagenamee' ), SFH_NO_HASH );
$parser->setFunctionHook( 'fullpagename', array( __CLASS__, 'fullpagename' ), SFH_NO_HASH );
$parser->setFunctionHook( 'fullpagenamee', array( __CLASS__, 'fullpagenamee' ), SFH_NO_HASH );
+ $parser->setFunctionHook( 'rootpagename', array( __CLASS__, 'rootpagename' ), SFH_NO_HASH );
+ $parser->setFunctionHook( 'rootpagenamee', array( __CLASS__, 'rootpagenamee' ), SFH_NO_HASH );
$parser->setFunctionHook( 'basepagename', array( __CLASS__, 'basepagename' ), SFH_NO_HASH );
$parser->setFunctionHook( 'basepagenamee', array( __CLASS__, 'basepagenamee' ), SFH_NO_HASH );
$parser->setFunctionHook( 'subpagename', array( __CLASS__, 'subpagename' ), SFH_NO_HASH );
// Specify a different default date format other than the the normal default
// iff the user has 'default' for their setting
- if ( $pref == 'default' && $defaultPref )
+ if ( $pref == 'default' && $defaultPref ) {
$pref = $defaultPref;
+ }
$date = $df->reformat( $pref, $date, array( 'match-whole' ) );
return $date;
# before arriving here; if that's true, then the title can't be created
# and the variable will fail. If we can't get a decent title from the first
# attempt, url-decode and try for a second.
- if( is_null( $title ) )
+ if ( is_null( $title ) ) {
$title = Title::newFromURL( urldecode( $s ) );
- if( !is_null( $title ) ) {
+ }
+ if ( !is_null( $title ) ) {
# Convert NS_MEDIA -> NS_FILE
- if( $title->getNamespace() == NS_MEDIA ) {
+ if ( $title->getNamespace() == NS_MEDIA ) {
$title = Title::makeTitle( NS_FILE, $title->getDBkey() );
}
- if( !is_null( $arg ) ) {
+ if ( !is_null( $arg ) ) {
$text = $title->$func( $arg );
} else {
$text = $title->$func();
$text = Sanitizer::normalizeCharReferences( Sanitizer::removeHTMLtags( $text, null, array(), array(), $bad ) );
$title = Title::newFromText( Sanitizer::stripAllTags( $text ) );
- if( !$wgRestrictDisplayTitle ) {
+ if ( !$wgRestrictDisplayTitle ) {
+ $parser->mOutput->setDisplayTitle( $text );
+ } elseif ( $title instanceof Title && $title->getFragment() == '' && $title->equals( $parser->mTitle ) ) {
$parser->mOutput->setDisplayTitle( $text );
- } else {
- if ( $title instanceof Title && $title->getFragment() == '' && $title->equals( $parser->mTitle ) ) {
- $parser->mOutput->setDisplayTitle( $text );
- }
}
return '';
}
static function formatRaw( $num, $raw ) {
- if( self::matchAgainstMagicword( 'rawsuffix', $raw ) ) {
+ if ( self::matchAgainstMagicword( 'rawsuffix', $raw ) ) {
return $num;
} else {
global $wgContLang;
*/
static function mwnamespace( $parser, $title = null ) {
$t = Title::newFromText( $title );
- if ( is_null( $t ) )
+ if ( is_null( $t ) ) {
return '';
+ }
return str_replace( '_', ' ', $t->getNsText() );
}
static function namespacee( $parser, $title = null ) {
$t = Title::newFromText( $title );
- if ( is_null( $t ) )
+ if ( is_null( $t ) ) {
return '';
+ }
return wfUrlencode( $t->getNsText() );
}
static function namespacenumber( $parser, $title = null ) {
$t = Title::newFromText( $title );
- if ( is_null( $t ) )
+ if ( is_null( $t ) ) {
return '';
+ }
return $t->getNamespace();
}
static function talkspace( $parser, $title = null ) {
$t = Title::newFromText( $title );
- if ( is_null( $t ) || !$t->canTalk() )
+ if ( is_null( $t ) || !$t->canTalk() ) {
return '';
+ }
return str_replace( '_', ' ', $t->getTalkNsText() );
}
static function talkspacee( $parser, $title = null ) {
$t = Title::newFromText( $title );
- if ( is_null( $t ) || !$t->canTalk() )
+ if ( is_null( $t ) || !$t->canTalk() ) {
return '';
+ }
return wfUrlencode( $t->getTalkNsText() );
}
static function subjectspace( $parser, $title = null ) {
$t = Title::newFromText( $title );
- if ( is_null( $t ) )
+ if ( is_null( $t ) ) {
return '';
+ }
return str_replace( '_', ' ', $t->getSubjectNsText() );
}
static function subjectspacee( $parser, $title = null ) {
$t = Title::newFromText( $title );
- if ( is_null( $t ) )
+ if ( is_null( $t ) ) {
return '';
+ }
return wfUrlencode( $t->getSubjectNsText() );
}
*/
static function pagename( $parser, $title = null ) {
$t = Title::newFromText( $title );
- if ( is_null( $t ) )
+ if ( is_null( $t ) ) {
return '';
+ }
return wfEscapeWikiText( $t->getText() );
}
static function pagenamee( $parser, $title = null ) {
$t = Title::newFromText( $title );
- if ( is_null( $t ) )
+ if ( is_null( $t ) ) {
return '';
+ }
return wfEscapeWikiText( $t->getPartialURL() );
}
static function fullpagename( $parser, $title = null ) {
$t = Title::newFromText( $title );
- if ( is_null( $t ) || !$t->canTalk() )
+ if ( is_null( $t ) || !$t->canTalk() ) {
return '';
+ }
return wfEscapeWikiText( $t->getPrefixedText() );
}
static function fullpagenamee( $parser, $title = null ) {
$t = Title::newFromText( $title );
- if ( is_null( $t ) || !$t->canTalk() )
+ if ( is_null( $t ) || !$t->canTalk() ) {
return '';
+ }
return wfEscapeWikiText( $t->getPrefixedURL() );
}
static function subpagename( $parser, $title = null ) {
$t = Title::newFromText( $title );
- if ( is_null( $t ) )
+ if ( is_null( $t ) ) {
return '';
+ }
return wfEscapeWikiText( $t->getSubpageText() );
}
static function subpagenamee( $parser, $title = null ) {
$t = Title::newFromText( $title );
- if ( is_null( $t ) )
+ if ( is_null( $t ) ) {
return '';
+ }
return wfEscapeWikiText( $t->getSubpageUrlForm() );
}
+ static function rootpagename( $parser, $title = null ) {
+ $t = Title::newFromText( $title );
+ if ( is_null( $t ) ) {
+ return '';
+ }
+ return wfEscapeWikiText( $t->getRootText() );
+ }
+ static function rootpagenamee( $parser, $title = null ) {
+ $t = Title::newFromText( $title );
+ if ( is_null( $t ) ) {
+ return '';
+ }
+ return wfEscapeWikiText( wfUrlEncode( str_replace( ' ', '_', $t->getRootText() ) ) );
+ }
static function basepagename( $parser, $title = null ) {
$t = Title::newFromText( $title );
- if ( is_null( $t ) )
+ if ( is_null( $t ) ) {
return '';
+ }
return wfEscapeWikiText( $t->getBaseText() );
}
static function basepagenamee( $parser, $title = null ) {
$t = Title::newFromText( $title );
- if ( is_null( $t ) )
+ if ( is_null( $t ) ) {
return '';
+ }
return wfEscapeWikiText( wfUrlEncode( str_replace( ' ', '_', $t->getBaseText() ) ) );
}
static function talkpagename( $parser, $title = null ) {
$t = Title::newFromText( $title );
- if ( is_null( $t ) || !$t->canTalk() )
+ if ( is_null( $t ) || !$t->canTalk() ) {
return '';
+ }
return wfEscapeWikiText( $t->getTalkPage()->getPrefixedText() );
}
static function talkpagenamee( $parser, $title = null ) {
$t = Title::newFromText( $title );
- if ( is_null( $t ) || !$t->canTalk() )
+ if ( is_null( $t ) || !$t->canTalk() ) {
return '';
+ }
return wfEscapeWikiText( $t->getTalkPage()->getPrefixedURL() );
}
static function subjectpagename( $parser, $title = null ) {
$t = Title::newFromText( $title );
- if ( is_null( $t ) )
+ if ( is_null( $t ) ) {
return '';
+ }
return wfEscapeWikiText( $t->getSubjectPage()->getPrefixedText() );
}
static function subjectpagenamee( $parser, $title = null ) {
$t = Title::newFromText( $title );
- if ( is_null( $t ) )
+ if ( is_null( $t ) ) {
return '';
+ }
return wfEscapeWikiText( $t->getSubjectPage()->getPrefixedURL() );
}
static $cache = array();
// split the given option to its variable
- if( self::matchAgainstMagicword( 'rawsuffix', $arg1 ) ) {
+ if ( self::matchAgainstMagicword( 'rawsuffix', $arg1 ) ) {
//{{pagesincategory:|raw[|type]}}
$raw = $arg1;
$type = $magicWords->matchStartToEnd( $arg2 );
$type = $magicWords->matchStartToEnd( $arg1 );
$raw = $arg2;
}
- if( !$type ) { //backward compatibility
+ if ( !$type ) { //backward compatibility
$type = 'pagesincategory_all';
}
$title = Title::makeTitleSafe( NS_CATEGORY, $name );
- if( !$title ) { # invalid title
+ if ( !$title ) { # invalid title
return self::formatRaw( 0, $raw );
}
// Normalize name for cache
$name = $title->getDBkey();
- if( !isset( $cache[$name] ) ) {
+ if ( !isset( $cache[$name] ) ) {
$category = Category::newFromTitle( $title );
$allCount = $subcatCount = $fileCount = $pagesCount = 0;
- if( $parser->incrementExpensiveFunctionCount() ) {
+ if ( $parser->incrementExpensiveFunctionCount() ) {
// $allCount is the total number of cat members,
// not the count of how many members are normal pages.
$allCount = (int)$category->getPageCount();
static $cache = array();
$title = Title::newFromText( $page );
- if( !is_object( $title ) ) {
+ if ( !is_object( $title ) ) {
$cache[$page] = 0;
return self::formatRaw( 0, $raw );
}
$page = $title->getPrefixedText();
$length = 0;
- if( isset( $cache[$page] ) ) {
+ if ( isset( $cache[$page] ) ) {
$length = $cache[$page];
- } elseif( $parser->incrementExpensiveFunctionCount() ) {
+ } elseif ( $parser->incrementExpensiveFunctionCount() ) {
$rev = Revision::newFromTitle( $title, false, Revision::READ_NORMAL );
$pageID = $rev ? $rev->getPage() : 0;
$revID = $rev ? $rev->getId() : 0;
static function pad( $parser, $string, $length, $padding = '0', $direction = STR_PAD_RIGHT ) {
$padding = $parser->killMarkers( $padding );
$lengthOfPadding = mb_strlen( $padding );
- if ( $lengthOfPadding == 0 ) return $string;
+ if ( $lengthOfPadding == 0 ) {
+ return $string;
+ }
# The remaining length to add counts down to 0 as padding is added
$length = min( $length, 500 ) - mb_strlen( $string );
$arg = $magicWords->matchStartToEnd( $uarg );
$text = trim( $text );
- if( strlen( $text ) == 0 )
+ if ( strlen( $text ) == 0 ) {
return '';
+ }
$old = $parser->getCustomDefaultSort();
if ( $old === false || $arg !== 'defaultsort_noreplace' ) {
$parser->setDefaultSort( $text );
}
- if( $old === false || $old == $text || $arg ) {
+ if ( $old === false || $old == $text || $arg ) {
return '';
} else {
return( '<span class="error">' .
public static function filepath( $parser, $name = '', $argA = '', $argB = '' ) {
$file = wfFindFile( $name );
- if( $argA == 'nowiki' ) {
+ if ( $argA == 'nowiki' ) {
// {{filepath: | option [| size] }}
$isNowiki = true;
$parsedWidthParam = $parser->parseWidthParam( $argB );
} else {
// {{filepath: [| size [|option]] }}
$parsedWidthParam = $parser->parseWidthParam( $argA );
- $isNowiki = ($argB == 'nowiki');
+ $isNowiki = ( $argB == 'nowiki' );
}
if ( $file ) {
*/
static function html( $content, $attributes, $parser ) {
global $wgRawHtml;
- if( $wgRawHtml ) {
+ if ( $wgRawHtml ) {
return array( $content, 'markerType' => 'nowiki' );
} else {
throw new MWException( '<html> extension tag encountered unexpectedly' );
function replace( $matches ) {
# Extract information from $matches
$linked = true;
- if ( isset( $this->mLinked ) )
+ if ( isset( $this->mLinked ) ) {
$linked = $this->mLinked;
+ }
$bits = array();
$key = $this->keys[$this->mSource];
$fail = false;
// Pre-generate y/Y stuff because we need the year for the <span> title.
- if ( !isset( $bits['y'] ) && isset( $bits['Y'] ) )
+ if ( !isset( $bits['y'] ) && isset( $bits['Y'] ) ) {
$bits['y'] = $this->makeIsoYear( $bits['Y'] );
- if ( !isset( $bits['Y'] ) && isset( $bits['y'] ) )
+ }
+ if ( !isset( $bits['Y'] ) && isset( $bits['y'] ) ) {
$bits['Y'] = $this->makeNormalYear( $bits['y'] );
+ }
if ( !isset( $bits['m'] ) ) {
$m = $this->makeIsoMonth( $bits['F'] );
}
$isoBits = array();
- if ( isset( $bits['y'] ) )
+ if ( isset( $bits['y'] ) ) {
$isoBits[] = $bits['y'];
+ }
$isoBits[] = $bits['m'];
$isoBits[] = $bits['d'];
$isoDate = implode( '-', $isoBits );
*/
function getMonthRegex() {
$names = array();
- for( $i = 1; $i <= 12; $i++ ) {
+ for ( $i = 1; $i <= 12; $i++ ) {
$names[] = $this->lang->getMonthName( $i );
$names[] = $this->lang->getMonthAbbreviation( $i );
}
}
if ( $queries ) {
$where = array();
- foreach( $queries as $ns => $pages ) {
+ foreach ( $queries as $ns => $pages ) {
$where[] = $dbr->makeList(
array(
'page_namespace' => $ns,
wfProfileOut( __METHOD__ . '-check' );
# Do a second query for different language variants of links and categories
- if( $wgContLang->hasVariants() ) {
+ if ( $wgContLang->hasVariants() ) {
$this->doVariants( $colours );
}
# Make interwiki link HTML
$output = $this->parent->getOutput();
$replacePairs = array();
- foreach( $this->interwikis as $key => $link ) {
+ foreach ( $this->interwikis as $key => $link ) {
$replacePairs[$key] = Linker::link( $link['title'], $link['text'] );
$output->addInterwikiLink( $link['title'] );
}
$textVariant = $titlesAllVariants[$variantName][$i];
if ( $textVariant != $titlesAttrs[$i]['titleText'] ) {
$variantTitle = Title::makeTitle( $titlesAttrs[$i]['ns'], $textVariant );
- if( is_null( $variantTitle ) ) {
+ if ( is_null( $variantTitle ) ) {
continue;
}
$linkBatch->addObj( $variantTitle );
}
}
- if( !$linkBatch->isEmpty() ) {
+ if ( !$linkBatch->isEmpty() ) {
// construct query
$dbr = wfGetDB( DB_SLAVE );
$varRes = $dbr->select( 'page',
$vardbk = $variantTitle->getDBkey();
$holderKeys = array();
- if( isset( $variantMap[$varPdbk] ) ) {
+ if ( isset( $variantMap[$varPdbk] ) ) {
$holderKeys = $variantMap[$varPdbk];
$linkCache->addGoodLinkObjFromRow( $variantTitle, $s );
$output->addLink( $variantTitle, $s->page_id );
}
// loop over link holders
- foreach( $holderKeys as $key ) {
+ foreach ( $holderKeys as $key ) {
list( $ns, $index ) = explode( ':', $key, 2 );
$entry =& $this->internals[$ns][$index];
$pdbk = $entry['pdbk'];
wfRunHooks( 'GetLinkColours', array( $linkcolour_ids, &$colours ) );
// rebuild the categories in original order (if there are replacements)
- if( count( $varCategories ) > 0 ) {
+ if ( count( $varCategories ) > 0 ) {
$newCats = array();
$originalCats = $output->getCategories();
- foreach( $originalCats as $cat => $sortkey ) {
+ foreach ( $originalCats as $cat => $sortkey ) {
// make the replacement
- if( array_key_exists( $cat, $varCategories ) ) {
+ if ( array_key_exists( $cat, $varCategories ) ) {
$newCats[$varCategories[$cat]] = $sortkey;
} else {
$newCats[$cat] = $sortkey;
function replaceTextCallback( $matches ) {
$type = $matches[1];
$key = $matches[2];
- if( $type == 'LINK' ) {
+ if ( $type == 'LINK' ) {
list( $ns, $index ) = explode( ':', $key, 2 );
- if( isset( $this->internals[$ns][$index]['text'] ) ) {
+ if ( isset( $this->internals[$ns][$index]['text'] ) ) {
return $this->internals[$ns][$index]['text'];
}
- } elseif( $type == 'IWLINK' ) {
- if( isset( $this->interwikis[$key]['text'] ) ) {
+ } elseif ( $type == 'IWLINK' ) {
+ if ( isset( $this->interwikis[$key]['text'] ) ) {
return $this->interwikis[$key]['text'];
}
}
if ( $target !== null ) {
return $target;
- } elseif( $this->mOptions->getInterfaceMessage() ) {
+ } elseif ( $this->mOptions->getInterfaceMessage() ) {
return $this->mOptions->getUserLangObj();
- } elseif( is_null( $this->mTitle ) ) {
+ } elseif ( is_null( $this->mTitle ) ) {
throw new MWException( __METHOD__ . ': $this->mTitle is null' );
}
'x' => 'X',
));
$titleObj = SpecialPage::getTitleFor( 'Booksources', $num );
- return'<a href="' .
+ return '<a href="' .
htmlspecialchars( $titleObj->getLocalURL() ) .
"\" class=\"internal mw-magiclink-isbn\">ISBN $isbn</a>";
} else {
} else {
if ( strlen( $r ) == 2 ) {
if ( $state === 'i' ) {
- $output .= '</i>'; $state = '';
+ $output .= '</i>';
+ $state = '';
} elseif ( $state === 'bi' ) {
- $output .= '</i>'; $state = 'b';
+ $output .= '</i>';
+ $state = 'b';
} elseif ( $state === 'ib' ) {
- $output .= '</b></i><b>'; $state = 'b';
+ $output .= '</b></i><b>';
+ $state = 'b';
} elseif ( $state === 'both' ) {
- $output .= '<b><i>' . $buffer . '</i>'; $state = 'b';
+ $output .= '<b><i>' . $buffer . '</i>';
+ $state = 'b';
} else { # $state can be 'b' or ''
- $output .= '<i>'; $state .= 'i';
+ $output .= '<i>';
+ $state .= 'i';
}
} elseif ( strlen( $r ) == 3 ) {
if ( $state === 'b' ) {
- $output .= '</b>'; $state = '';
+ $output .= '</b>';
+ $state = '';
} elseif ( $state === 'bi' ) {
- $output .= '</i></b><i>'; $state = 'i';
+ $output .= '</i></b><i>';
+ $state = 'i';
} elseif ( $state === 'ib' ) {
- $output .= '</b>'; $state = 'i';
+ $output .= '</b>';
+ $state = 'i';
} elseif ( $state === 'both' ) {
- $output .= '<i><b>' . $buffer . '</b>'; $state = 'i';
+ $output .= '<i><b>' . $buffer . '</b>';
+ $state = 'i';
} else { # $state can be 'i' or ''
- $output .= '<b>'; $state .= 'b';
+ $output .= '<b>';
+ $state .= 'b';
}
} elseif ( strlen( $r ) == 5 ) {
if ( $state === 'b' ) {
- $output .= '</b><i>'; $state = 'i';
+ $output .= '</b><i>';
+ $state = 'i';
} elseif ( $state === 'i' ) {
- $output .= '</i><b>'; $state = 'b';
+ $output .= '</i><b>';
+ $state = 'b';
} elseif ( $state === 'bi' ) {
- $output .= '</i></b>'; $state = '';
+ $output .= '</i></b>';
+ $state = '';
} elseif ( $state === 'ib' ) {
- $output .= '</b></i>'; $state = '';
+ $output .= '</b></i>';
+ $state = '';
} elseif ( $state === 'both' ) {
- $output .= '<i><b>' . $buffer . '</b></i>'; $state = '';
+ $output .= '<i><b>' . $buffer . '</b></i>';
+ $state = '';
} else { # ($state == '')
- $buffer = ''; $state = 'both';
+ $buffer = '';
+ $state = 'both';
}
}
}
$state = self::COLON_STATE_TEXT;
$stack = 0;
$len = strlen( $str );
- for( $i = 0; $i < $len; $i++ ) {
+ for ( $i = 0; $i < $len; $i++ ) {
$c = $str[$i];
switch( $state ) {
case 'subpagenamee':
$value = wfEscapeWikiText( $this->mTitle->getSubpageUrlForm() );
break;
+ case 'rootpagename':
+ $value = wfEscapeWikiText( $this->mTitle->getRootText() );
+ break;
+ case 'rootpagenamee':
+ $value = wfEscapeWikiText( wfUrlEncode( str_replace( ' ', '_', $this->mTitle->getRootText() ) ) );
+ break;
case 'basepagename':
$value = wfEscapeWikiText( $this->mTitle->getBaseText() );
break;
break;
case 'pageid': // requested in bug 23427
$pageid = $this->getTitle()->getArticleID();
- if( $pageid == 0 ) {
+ if ( $pageid == 0 ) {
# 0 means the page doesn't exist in the database,
# which means the user is previewing a new page.
# The vary-revision flag must be set, because the magic word
if ( $skip ) {
$text = false;
$deps[] = array(
- 'title' => $title,
- 'page_id' => $title->getArticleID(),
- 'rev_id' => null
+ 'title' => $title,
+ 'page_id' => $title->getArticleID(),
+ 'rev_id' => null
);
break;
}
}
$deps[] = array(
- 'title' => $title,
- 'page_id' => $title->getArticleID(),
- 'rev_id' => $rev_id );
+ 'title' => $title,
+ 'page_id' => $title->getArticleID(),
+ 'rev_id' => $rev_id );
if ( $rev && !$title->equals( $rev->getTitle() ) ) {
# We fetched a rev from a different title; register it too...
$deps[] = array(
- 'title' => $rev->getTitle(),
- 'page_id' => $rev->getPage(),
- 'rev_id' => $rev_id );
+ 'title' => $rev->getTitle(),
+ 'page_id' => $rev->getPage(),
+ 'rev_id' => $rev_id );
}
if ( $rev ) {
# count number of headlines for each level
$sublevelCount[$toclevel]++;
$dot = 0;
- for( $i = 1; $i <= $toclevel; $i++ ) {
+ for ( $i = 1; $i <= $toclevel; $i++ ) {
if ( !empty( $sublevelCount[$i] ) ) {
if ( $dot ) {
$numbering .= '.';
"\r\n" => "\n",
);
$text = str_replace( array_keys( $pairs ), array_values( $pairs ), $text );
- if( $options->getPreSaveTransform() ) {
+ if ( $options->getPreSaveTransform() ) {
$text = $this->pstPass2( $text, $user );
}
$text = $this->mStripState->unstripBoth( $text );
$username = $user->getName();
# If not given, retrieve from the user object.
- if ( $nickname === false )
+ if ( $nickname === false ) {
$nickname = $user->getOption( 'nickname' );
+ }
if ( is_null( $fancySig ) ) {
$fancySig = $user->getBoolOption( 'fancysig' );
# Add to function cache
$mw = MagicWord::get( $id );
- if ( !$mw )
+ if ( !$mw ) {
throw new MWException( __METHOD__ . '() expecting a magic word identifier.' );
+ }
$synonyms = $mw->getSynonyms();
$sensitive = intval( $mw->isCaseSensitive() );
*/
function setFunctionTagHook( $tag, $callback, $flags ) {
$tag = strtolower( $tag );
- if ( preg_match( '/[<>\r\n]/', $tag, $m ) ) throw new MWException( "Invalid character {$m[0]} in setFunctionTagHook('$tag', ...) call" );
+ if ( preg_match( '/[<>\r\n]/', $tag, $m ) ) {
+ throw new MWException( "Invalid character {$m[0]} in setFunctionTagHook('$tag', ...) call" );
+ }
$old = isset( $this->mFunctionTagHooks[$tag] ) ?
$this->mFunctionTagHooks[$tag] : null;
$this->mFunctionTagHooks[$tag] = array( $callback, $flags );
if ( $match = $magicWordAlt->matchVariableStartToEnd( $parameterMatch ) ) {
$alt = $this->stripAltText( $match, false );
}
- elseif( $match = $magicWordLink->matchVariableStartToEnd( $parameterMatch ) ) {
+ elseif ( $match = $magicWordLink->matchVariableStartToEnd( $parameterMatch ) ) {
$linkValue = strip_tags( $this->replaceLinkHoldersText( $match ) );
$chars = self::EXT_LINK_URL_CLASS;
$prots = $this->mUrlProtocols;
# Special case; width and height come in one variable together
if ( $type === 'handler' && $paramName === 'width' ) {
$parsedWidthParam = $this->parseWidthParam( $value );
- if( isset( $parsedWidthParam['width'] ) ) {
+ if ( isset( $parsedWidthParam['width'] ) ) {
$width = $parsedWidthParam['width'];
if ( $handler->validateParam( 'width', $width ) ) {
$params[$type]['width'] = $width;
$validated = true;
}
}
- if( isset( $parsedWidthParam['height'] ) ) {
+ if ( isset( $parsedWidthParam['height'] ) ) {
$height = $parsedWidthParam['height'];
if ( $handler->validateParam( 'height', $height ) ) {
$params[$type]['height'] = $height;
* @return String: user name
*/
function getRevisionUser() {
- if( is_null( $this->mRevisionUser ) ) {
+ if ( is_null( $this->mRevisionUser ) ) {
$revObject = $this->getRevisionObject();
# if this template is subst: the revision id will be blank,
# so just use the current user's name
- if( $revObject ) {
+ if ( $revObject ) {
$this->mRevisionUser = $revObject->getUserText();
- } elseif( $this->ot['wiki'] || $this->mOptions->getIsPreview() ) {
+ } elseif ( $this->ot['wiki'] || $this->mOptions->getIsPreview() ) {
$this->mRevisionUser = $this->getUser()->getName();
}
}
*/
public function parseWidthParam( $value ) {
$parsedWidthParam = array();
- if( $value === '' ) {
+ if ( $value === '' ) {
return $parsedWidthParam;
}
$m = array();
// idhash seem to mean 'page id' + 'rendering hash' (r3710)
$pageid = $article->getID();
- $renderkey = (int)($wgRequest->getVal( 'action' ) == 'render');
+ $renderkey = (int)( $wgRequest->getVal( 'action' ) == 'render' );
$key = wfMemcKey( 'pcache', 'idhash', "{$pageid}-{$renderkey}!{$hash}" );
return $key;
public function getKey( $article, $popts, $useOutdated = true ) {
global $wgCacheEpoch;
- if( $popts instanceof User ) {
+ if ( $popts instanceof User ) {
wfWarn( "Use of outdated prototype ParserCache::getKey( &\$article, &\$user )\n" );
$popts = ParserOptions::newFromUser( $popts );
}
public function save( $parserOutput, $article, $popts ) {
$expire = $parserOutput->getCacheExpiry();
- if( $expire > 0 ) {
+ if ( $expire > 0 ) {
$now = wfTimestampNow();
$optionsKey = new CacheTime;
// add in language specific options, if any
// @todo FIXME: This is just a way of retrieving the url/user preferred variant
- if( !is_null( $title ) ) {
+ if ( !is_null( $title ) ) {
$confstr .= $title->getPageLanguage()->getExtraHashOptions();
} else {
global $wgContLang;
$confstr .= '!printable=1';
}
- if ( $this->mExtraKey != '' )
+ if ( $this->mExtraKey != '' ) {
$confstr .= $this->mExtraKey;
+ }
// Give a chance for extensions to modify the hash, if they have
// extra options or other effects on the parser cache.
global $wgServer, $wgRegisterInternalExternals;
$registerExternalLink = true;
- if( !$wgRegisterInternalExternals ) {
+ if ( !$wgRegisterInternalExternals ) {
$registerExternalLink = !self::isLinkInternal( $wgServer, $url );
}
- if( $registerExternalLink ) {
+ if ( $registerExternalLink ) {
$this->mExternalLinks[$url] = 1;
}
}
if ( $ns == NS_MEDIA ) {
// Normalize this pseudo-alias if it makes it down here...
$ns = NS_FILE;
- } elseif( $ns == NS_SPECIAL ) {
+ } elseif ( $ns == NS_SPECIAL ) {
// We don't record Special: links currently
// It might actually be wise to, but we'd need to do some normalization.
return;
- } elseif( $dbk === '' ) {
+ } elseif ( $dbk === '' ) {
// Don't record self links - [[#Foo]]
return;
}
*/
function addInterwikiLink( $title ) {
$prefix = $title->getInterwiki();
- if( $prefix == '' ) {
+ if ( $prefix == '' ) {
throw new MWException( 'Non-interwiki link passed, internal parser error.' );
}
if ( !isset( $this->mInterwikiLinks[$prefix] ) ) {
*/
public function getDisplayTitle() {
$t = $this->getTitleText();
- if( $t === '' ) {
+ if ( $t === '' ) {
return false;
}
return $t;
function setFunctionHook( $id, $callback, $flags = 0 ) {
$this->init();
- foreach ( $this->parsers as $parser ) {
+ foreach ( $this->parsers as $parser ) {
$parser->setFunctionHook( $id, $callback, $flags );
}
}
wfDebugLog( "Preprocessor", "Loaded preprocessor XML from memcached (key $cacheKey)" );
}
}
- }
- if ( $xml === false ) {
- if ( $cacheable ) {
+ if ( $xml === false ) {
wfProfileIn( __METHOD__ . '-cache-miss' );
$xml = $this->preprocessToXml( $text, $flags );
$cacheValue = sprintf( "%08d", self::CACHE_VERSION ) . $xml;
$wgMemc->set( $cacheKey, $cacheValue, 86400 );
wfProfileOut( __METHOD__ . '-cache-miss' );
wfDebugLog( "Preprocessor", "Saved preprocessor XML to memcached (key $cacheKey)" );
- } else {
- $xml = $this->preprocessToXml( $text, $flags );
}
-
+ } else {
+ $xml = $this->preprocessToXml( $text, $flags );
}
+
// Fail if the number of elements exceeds acceptable limits
// Do not attempt to generate the DOM
$this->parser->mGeneratedPPNodeCount += substr_count( $xml, '<' );
'open' => $curChar,
'close' => $rule['end'],
'count' => $count,
- 'lineStart' => ($i > 0 && $text[$i - 1] == "\n"),
+ 'lineStart' => ( $i > 0 && $text[$i - 1] == "\n" ),
);
$stack->push( $piece );
$first = true;
$s = '';
foreach ( $args as $root ) {
- if ( $root instanceof PPNode_DOM ) $root = $root->node;
+ if ( $root instanceof PPNode_DOM ) {
+ $root = $root->node;
+ }
if ( !is_array( $root ) && !( $root instanceof DOMNodeList ) ) {
$root = array( $root );
}
'open' => $curChar,
'close' => $rule['end'],
'count' => $count,
- 'lineStart' => ($i > 0 && $text[$i - 1] == "\n"),
+ 'lineStart' => ( $i > 0 && $text[$i - 1] == "\n" ),
);
$stack->push( $piece );
global $wgTidyInternal;
$retval = 0;
- if( $wgTidyInternal ) {
+ if ( $wgTidyInternal ) {
$errorStr = self::execInternalTidy( $text, true, $retval );
} else {
$errorStr = self::execExternalTidy( $text, true, $retval );
* @return Profiler
*/
public static function instance() {
- if( is_null( self::$__instance ) ) {
+ if ( is_null( self::$__instance ) ) {
global $wgProfiler;
- if( is_array( $wgProfiler ) ) {
- if( !isset( $wgProfiler['class'] ) ) {
+ if ( is_array( $wgProfiler ) ) {
+ if ( !isset( $wgProfiler['class'] ) ) {
wfDebug( __METHOD__ . " called without \$wgProfiler['class']"
. " set, falling back to ProfilerStub for safety\n" );
$class = 'ProfilerStub';
$class = $wgProfiler['class'];
}
self::$__instance = new $class( $wgProfiler );
- } elseif( $wgProfiler instanceof Profiler ) {
+ } elseif ( $wgProfiler instanceof Profiler ) {
self::$__instance = $wgProfiler; // back-compat
} else {
wfDebug( __METHOD__ . ' called with bogus $wgProfiler setting,'
*/
public function profileIn( $functionname ) {
global $wgDebugFunctionEntry;
- if( $wgDebugFunctionEntry ) {
+ if ( $wgDebugFunctionEntry ) {
$this->debug( str_repeat( ' ', count( $this->mWorkStack ) ) . 'Entering ' . $functionname . "\n" );
}
$memory = memory_get_usage();
$time = $this->getTime();
- if( $wgDebugFunctionEntry ) {
+ if ( $wgDebugFunctionEntry ) {
$this->debug( str_repeat( ' ', count( $this->mWorkStack ) - 1 ) . 'Exiting ' . $functionname . "\n" );
}
$this->debug( "Profiling error, !\$bit: $functionname\n" );
} else {
//if( $wgDebugProfiling ) {
- if( $functionname == 'close' ) {
+ if ( $functionname == 'close' ) {
$message = "Profile section ended by close(): {$bit[0]}";
$this->debug( "$message\n" );
$this->mStack[] = array( $message, 0, 0.0, 0, 0.0, 0 );
- }
- elseif( $bit[0] != $functionname ) {
+ } elseif ( $bit[0] != $functionname ) {
$message = "Profiling error: in({$bit[0]}), out($functionname)";
$this->debug( "$message\n" );
$this->mStack[] = array( $message, 0, 0.0, 0, 0.0, 0 );
* Close opened profiling sections
*/
public function close() {
- while( count( $this->mWorkStack ) ) {
+ while ( count( $this->mWorkStack ) ) {
$this->profileOut( 'close' );
}
}
global $wgDebugFunctionEntry, $wgProfileCallTree;
$wgDebugFunctionEntry = false;
- if( !count( $this->mStack ) && !count( $this->mCollated ) ) {
+ if ( !count( $this->mStack ) && !count( $this->mCollated ) ) {
return "No profiling output\n";
}
- if( $wgProfileCallTree ) {
+ if ( $wgProfileCallTree ) {
return $this->getCallTree();
} else {
return $this->getFunctionReport();
* @return array
*/
function remapCallTree( $stack ) {
- if( count( $stack ) < 2 ) {
+ if ( count( $stack ) < 2 ) {
return $stack;
}
$outputs = array();
- for( $max = count( $stack ) - 1; $max > 0; ) {
+ for ( $max = count( $stack ) - 1; $max > 0; ) {
/* Find all items under this entry */
$level = $stack[$max][1];
$working = array();
- for( $i = $max -1; $i >= 0; $i-- ) {
- if( $stack[$i][1] > $level ) {
+ for ( $i = $max -1; $i >= 0; $i-- ) {
+ if ( $stack[$i][1] > $level ) {
$working[] = $stack[$i];
} else {
break;
}
$working = $this->remapCallTree( array_reverse( $working ) );
$output = array();
- foreach( $working as $item ) {
+ foreach ( $working as $item ) {
array_push( $output, $item );
}
array_unshift( $output, $stack[$max] );
array_unshift( $outputs, $output );
}
$final = array();
- foreach( $outputs as $output ) {
- foreach( $output as $item ) {
+ foreach ( $outputs as $output ) {
+ foreach ( $output as $item ) {
$final[] = $item;
}
}
# First, subtract the overhead!
$overheadTotal = $overheadMemory = $overheadInternal = array();
- foreach( $this->mStack as $entry ) {
+ foreach ( $this->mStack as $entry ) {
$fname = $entry[0];
$start = $entry[2];
$end = $entry[4];
$elapsed = $end - $start;
$memory = $entry[5] - $entry[3];
- if( $fname == '-overhead-total' ) {
+ if ( $fname == '-overhead-total' ) {
$overheadTotal[] = $elapsed;
$overheadMemory[] = $memory;
- }
- elseif( $fname == '-overhead-internal' ) {
+ } elseif ( $fname == '-overhead-internal' ) {
$overheadInternal[] = $elapsed;
}
}
$overheadInternal = $overheadInternal ? array_sum( $overheadInternal ) / count( $overheadInternal ) : 0;
# Collate
- foreach( $this->mStack as $index => $entry ) {
+ foreach ( $this->mStack as $index => $entry ) {
$fname = $entry[0];
$start = $entry[2];
$end = $entry[4];
$memory = $entry[5] - $entry[3];
$subcalls = $this->calltreeCount( $this->mStack, $index );
- if( !preg_match( '/^-overhead/', $fname ) ) {
+ if ( !preg_match( '/^-overhead/', $fname ) ) {
# Adjust for profiling overhead (except special values with elapsed=0
- if( $elapsed ) {
+ if ( $elapsed ) {
$elapsed -= $overheadInternal;
$elapsed -= ($subcalls * $overheadTotal);
$memory -= ($subcalls * $overheadMemory);
}
}
- if( !array_key_exists( $fname, $this->mCollated ) ) {
+ if ( !array_key_exists( $fname, $this->mCollated ) ) {
$this->mCollated[$fname] = 0;
$this->mCalls[$fname] = 0;
$this->mMemory[$fname] = 0;
$total = isset( $this->mCollated['-total'] ) ? $this->mCollated['-total'] : 0;
- foreach( $this->mCollated as $fname => $elapsed ) {
+ foreach ( $this->mCollated as $fname => $elapsed ) {
$calls = $this->mCalls[$fname];
$percent = $total ? 100. * $elapsed / $total : 0;
$memory = $this->mMemory[$fname];
*/
protected static function calculateOverhead( $profileCount ) {
wfProfileIn( '-overhead-total' );
- for( $i = 0; $i < $profileCount; $i++ ) {
+ for ( $i = 0; $i < $profileCount; $i++ ) {
wfProfileIn( '-overhead-internal' );
wfProfileOut( '-overhead-internal' );
}
global $wgProfilePerHost, $wgProfileToDatabase;
# Do not log anything if database is readonly (bug 5375)
- if( wfReadOnly() || !$wgProfileToDatabase ) {
+ if ( wfReadOnly() || !$wgProfileToDatabase ) {
return;
}
$dbw = wfGetDB( DB_MASTER );
- if( !is_object( $dbw ) ) {
+ if ( !is_object( $dbw ) ) {
return;
}
- if( $wgProfilePerHost ) {
+ if ( $wgProfilePerHost ) {
$pfhost = wfHostname();
} else {
$pfhost = '';
try {
$this->collateData();
- foreach( $this->mCollated as $name => $elapsed ) {
+ foreach ( $this->mCollated as $name => $elapsed ) {
$eventCount = $this->mCalls[$name];
$timeSum = (float) ($elapsed * 1000);
$memorySum = (float)$this->mMemory[$name];
* @param string $s to output
*/
function debug( $s ) {
- if( defined( 'MW_COMPILED' ) || function_exists( 'wfDebug' ) ) {
+ if ( defined( 'MW_COMPILED' ) || function_exists( 'wfDebug' ) ) {
wfDebug( $s );
}
}
$plength = 0;
$packet = "";
foreach ( $this->mCollated as $entry => $pfdata ) {
- if( !isset( $pfdata['count'] )
+ if ( !isset( $pfdata['count'] )
|| !isset( $pfdata['cpu'] )
|| !isset( $pfdata['cpu_sq'] )
|| !isset( $pfdata['real'] )
// Add the testrunner (which configures QUnit) to the dependencies.
// Since it must be ready before any of the test suites are executed.
- foreach( $testModules['qunit'] as &$module ) {
+ foreach ( $testModules['qunit'] as &$module ) {
// Make sure all test modules are top-loading so that when QUnit starts
// on document-ready, it will run once and finish. If some tests arrive
// later (possibly after QUnit has already finished) they will be ignored.
$module['dependencies'][] = 'mediawiki.tests.qunit.testrunner';
}
- foreach( $testModules as $id => $names ) {
+ foreach ( $testModules as $id => $names ) {
// Register test modules
$this->register( $testModules[$id] );
if ( $media === '' || $media == 'all' ) {
$out[] = $style;
- } else if ( is_string( $media ) ) {
+ } elseif ( is_string( $media ) ) {
$out[] = "@media $media {\n" . str_replace( "\n", "\n\t", "\t" . $style ) . "}";
}
// else: skip
*/
$namespaceIds = $wgContLang->getNamespaceIds();
$caseSensitiveNamespaces = array();
- foreach( MWNamespace::getCanonicalNamespaces() as $index => $name ) {
+ foreach ( MWNamespace::getCanonicalNamespaces() as $index => $name ) {
$namespaceIds[$wgContLang->lc( $name )] = $index;
if ( !MWNamespace::isCapitalized( $index ) ) {
$caseSensitiveNamespaces[] = $index;
}
$pages = array();
- foreach( $user->getEffectiveGroups() as $group ) {
+ foreach ( $user->getEffectiveGroups() as $group ) {
if ( in_array( $group, array( '*', 'user' ) ) ) {
continue;
}
array_merge( Revision::selectFields(), Revision::selectUserFields() ),
array(
'rev_page' => $this->title->getArticleID(),
- 'rev_id' => $ids,
+ 'rev_id' => $ids,
),
__METHOD__,
array( 'ORDER BY' => 'rev_id DESC' ),
return $db->select( 'archive', '*',
array(
'ar_namespace' => $this->title->getNamespace(),
- 'ar_title' => $this->title->getDBkey(),
+ 'ar_title' => $this->title->getDBkey(),
'ar_timestamp' => $timestamps
),
__METHOD__,
$dbw->update( 'archive',
array( 'ar_deleted' => $bits ),
array(
- 'ar_namespace' => $this->list->title->getNamespace(),
- 'ar_title' => $this->list->title->getDBkey(),
+ 'ar_namespace' => $this->list->title->getNamespace(),
+ 'ar_title' => $this->list->title->getDBkey(),
// use timestamp for index
- 'ar_timestamp' => $this->row->ar_timestamp,
- 'ar_rev_id' => $this->row->ar_rev_id,
- 'ar_deleted' => $this->getBits()
+ 'ar_timestamp' => $this->row->ar_timestamp,
+ 'ar_rev_id' => $this->row->ar_rev_id,
+ 'ar_deleted' => $this->getBits()
),
__METHOD__ );
return (bool)$dbw->affectedRows();
*/
public function doQuery( $db ) {
$archiveNames = array();
- foreach( $this->ids as $timestamp ) {
+ foreach ( $this->ids as $timestamp ) {
$archiveNames[] = $timestamp . '!' . $this->title->getDBkey();
}
return $db->select(
'oldimage',
OldLocalFile::selectFields(),
array(
- 'oi_name' => $this->title->getDBkey(),
+ 'oi_name' => $this->title->getDBkey(),
'oi_archive_name' => $archiveNames
),
__METHOD__,
array(),
array(
'target' => $this->list->title->getPrefixedText(),
- 'file' => $this->file->getArchiveName(),
- 'token' => $this->list->getUser()->getEditToken(
+ 'file' => $this->file->getArchiveName(),
+ 'token' => $this->list->getUser()->getEditToken(
$this->file->getArchiveName() )
)
);
* @return string HTML
*/
protected function getUserTools() {
- if( $this->file->userCan( Revision::DELETED_USER, $this->list->getUser() ) ) {
+ if ( $this->file->userCan( Revision::DELETED_USER, $this->list->getUser() ) ) {
$link = Linker::userLink( $this->file->user, $this->file->user_text ) .
Linker::userToolLinks( $this->file->user, $this->file->user_text );
} else {
$link = $this->list->msg( 'rev-deleted-user' )->escaped();
}
- if( $this->file->isDeleted( Revision::DELETED_USER ) ) {
+ if ( $this->file->isDeleted( Revision::DELETED_USER ) ) {
return '<span class="history-deleted">' . $link . '</span>';
}
return $link;
* @return string HTML
*/
protected function getComment() {
- if( $this->file->userCan( File::DELETED_COMMENT, $this->list->getUser() ) ) {
+ if ( $this->file->userCan( File::DELETED_COMMENT, $this->list->getUser() ) ) {
$block = Linker::commentBlock( $this->file->description );
} else {
$block = ' ' . $this->list->msg( 'rev-deleted-comment' )->escaped();
}
- if( $this->file->isDeleted( File::DELETED_COMMENT ) ) {
+ if ( $this->file->isDeleted( File::DELETED_COMMENT ) ) {
return "<span class=\"history-deleted\">$block</span>";
}
return $block;
ArchivedFile::selectFields(),
array(
'fa_name' => $this->title->getDBkey(),
- 'fa_id' => $ids
+ 'fa_id' => $ids
),
__METHOD__,
array( 'ORDER BY' => 'fa_id DESC' )
$this->file->getTimestamp(), $this->list->getUser() ) );
# Hidden files...
- if( !$this->canViewContent() ) {
+ if ( !$this->canViewContent() ) {
$link = $date;
} else {
$undelete = SpecialPage::getTitleFor( 'Undelete' );
)
);
}
- if( $this->isDeleted() ) {
+ if ( $this->isDeleted() ) {
$link = '<span class="history-deleted">' . $link . '</span>';
}
return $link;
$action = $formatter->getActionText();
// Comment
$comment = $this->list->getLanguage()->getDirMark() . Linker::commentBlock( $this->row->log_comment );
- if( LogEventsList::isDeleted( $this->row, LogPage::DELETED_COMMENT ) ) {
+ if ( LogEventsList::isDeleted( $this->row, LogPage::DELETED_COMMENT ) ) {
$comment = '<span class="history-deleted">' . $comment . '</span>';
}
}
if ( !$item->canView() ) {
// Cannot access this revision
- $msg = ($opType == 'show') ?
+ $msg = ( $opType == 'show' ) ?
'revdelete-show-no-access' : 'revdelete-modify-no-access';
$status->error( $msg, $item->formatDate(), $item->formatTime() );
$status->failCount++;
continue;
}
// Cannot just "hide from Sysops" without hiding any fields
- if( $newBits == Revision::DELETED_RESTRICTED ) {
+ if ( $newBits == Revision::DELETED_RESTRICTED ) {
$status->warning( 'revdelete-only-restricted', $item->formatDate(), $item->formatTime() );
$status->failCount++;
continue;
if ( $ok ) {
$idsForLog[] = $item->getId();
$status->successCount++;
- if( $item->getAuthorId() > 0 ) {
+ if ( $item->getAuthorId() > 0 ) {
$authorIds[] = $item->getAuthorId();
- } elseif( IP::isIPAddress( $item->getAuthorName() ) ) {
+ } elseif ( IP::isIPAddress( $item->getAuthorName() ) ) {
$authorIPs[] = $item->getAuthorName();
}
} else {
protected function updateLog( $params ) {
// Get the URL param's corresponding DB field
$field = RevisionDeleter::getRelationType( $this->getType() );
- if( !$field ) {
+ if ( !$field ) {
throw new MWException( "Bad log URL param type!" );
}
// Put things hidden from sysops in the oversight log
# The same goes for the sysop-restricted *_deleted bit.
$delUser = Revision::DELETED_USER | Revision::DELETED_RESTRICTED;
$delAction = LogPage::DELETED_ACTION | Revision::DELETED_RESTRICTED;
- if( $op == '&' ) {
+ if ( $op == '&' ) {
$delUser = "~{$delUser}";
$delAction = "~{$delAction}";
}
* @param array $arr the array to update.
*/
protected static function checkItem( $desc, $field, $diff, $new, &$arr ) {
- if( $diff & $field ) {
+ if ( $diff & $field ) {
$arr[( $new & $field ) ? 0 : 1][] = $desc;
}
}
self::checkItem( 'revdelete-uname',
Revision::DELETED_USER, $diff, $n, $ret );
// Restriction application to sysops
- if( $diff & Revision::DELETED_RESTRICTED ) {
- if( $n & Revision::DELETED_RESTRICTED )
+ if ( $diff & Revision::DELETED_RESTRICTED ) {
+ if ( $n & Revision::DELETED_RESTRICTED ) {
$ret[2][] = 'revdelete-restricted';
- else
+ } else {
$ret[2][] = 'revdelete-unrestricted';
+ }
}
return $ret;
}
$parsed = substr( $query, strlen( $prefix ) + 1 );
}
}
- if ( trim( $parsed ) == '' )
+ if ( trim( $parsed ) == '' ) {
$parsed = $query; // prefix was the whole query
+ }
wfRunHooks( 'SearchEngineReplacePrefixesComplete', array( $this, $query, &$parsed ) );
$formatted = array_map( array( $wgContLang, 'getFormattedNsText' ), $namespaces );
foreach ( $formatted as $key => $ns ) {
- if ( empty( $ns ) )
+ if ( empty( $ns ) ) {
$formatted[$key] = wfMessage( 'blanknamespace' )->text();
+ }
}
return $formatted;
}
}
function numRows() {
- if ( $this->mResultSet === false )
+ if ( $this->mResultSet === false ) {
return false;
+ }
return $this->mResultSet->numRows();
}
function next() {
- if ( $this->mResultSet === false )
+ if ( $this->mResultSet === false ) {
return false;
+ }
$row = $this->mResultSet->fetchObject();
- if ( $row === false )
+ if ( $row === false ) {
return false;
+ }
return SearchResult::newFromRow( $row );
}
function free() {
- if ( $this->mResultSet === false )
+ if ( $this->mResultSet === false ) {
return false;
+ }
$this->mResultSet->free();
}
wfRunHooks( 'SearchResultInitFromTitle', array( $title, &$id ) );
$this->mRevision = Revision::newFromTitle(
$this->mTitle, $id, Revision::READ_NORMAL );
- if ( $this->mTitle->getNamespace() === NS_FILE )
+ if ( $this->mTitle->getNamespace() === NS_FILE ) {
$this->mImage = wfFindFile( $this->mTitle );
+ }
}
}
* @return Boolean
*/
function isBrokenTitle() {
- if ( is_null( $this->mTitle ) )
+ if ( is_null( $this->mTitle ) ) {
return true;
+ }
return false;
}
// TODO: make highliter take a content object. Make ContentHandler a factory for SearchHighliter.
list( $contextlines, $contextchars ) = SearchEngine::userHighlightPrefs( $wgUser );
$h = new SearchHighlighter();
- if ( $wgAdvancedSearchHighlighting )
+ if ( $wgAdvancedSearchHighlighting ) {
return $h->highlightText( $this->mText, $terms, $contextlines, $contextchars );
- else
+ } else {
return $h->highlightSimple( $this->mText, $terms, $contextlines, $contextchars );
+ }
}
/**
* @return String: timestamp
*/
function getTimestamp() {
- if ( $this->mRevision )
+ if ( $this->mRevision ) {
return $this->mRevision->getTimestamp();
- elseif ( $this->mImage )
+ } elseif ( $this->mImage ) {
return $this->mImage->getTimestamp();
+ }
return '';
}
global $wgSearchHighlightBoundaries;
$fname = __METHOD__;
- if ( $text == '' )
+ if ( $text == '' ) {
return '';
+ }
// spli text into text + templates/links/tables
$spat = "/(\\{\\{)|(\\[\\[[^\\]:]+:)|(\n\\{\\|)";
if ( $key == 2 ) {
// see if this is an image link
$ns = substr( $val[0], 2, - 1 );
- if ( $wgContLang->getNsIndex( $ns ) != NS_FILE )
+ if ( $wgContLang->getNsIndex( $ns ) != NS_FILE ) {
break;
+ }
}
$epat = $endPatterns[$key];
$last = - 1;
$extract = '';
foreach ( $snippets as $index => $line ) {
- if ( $last == - 1 )
+ if ( $last == - 1 ) {
$extract .= $line; // first line
- elseif ( $last + 1 == $index && $offsets[$last] + strlen( $snippets[$last] ) >= strlen( $all[$last] ) )
+ } elseif ( $last + 1 == $index && $offsets[$last] + strlen( $snippets[$last] ) >= strlen( $all[$last] ) ) {
$extract .= " " . $line; // continous lines
- else
+ } else {
$extract .= '<b> ... </b>' . $line;
+ }
$last = $index;
}
- if ( $extract )
+ if ( $extract ) {
$extract .= '<b> ... </b>';
+ }
$processed = array();
foreach ( $terms as $term ) {
$split = explode( "\n", $this->mCleanWikitext ? $this->removeWiki( $text ) : $text );
foreach ( $split as $line ) {
$tt = trim( $line );
- if ( $tt )
+ if ( $tt ) {
$extracts[$count++] = $tt;
+ }
}
}
while ( $char >= 0x80 && $char < 0xc0 ) {
// skip trailing bytes
$point++;
- if ( $point >= strlen( $text ) )
+ if ( $point >= strlen( $text ) ) {
return strlen( $text );
+ }
$char = ord( $text[$point] );
}
return $point;
* @protected
*/
function process( $pattern, $extracts, &$linesleft, &$contextchars, &$out, &$offsets ) {
- if ( $linesleft == 0 )
+ if ( $linesleft == 0 ) {
return; // nothing to do
+ }
foreach ( $extracts as $index => $line ) {
- if ( array_key_exists( $index, $out ) )
+ if ( array_key_exists( $index, $out ) ) {
continue; // this line already highlighted
+ }
$m = array();
- if ( !preg_match( $pattern, $line, $m, PREG_OFFSET_CAPTURE ) )
+ if ( !preg_match( $pattern, $line, $m, PREG_OFFSET_CAPTURE ) ) {
continue;
+ }
$offset = $m[0][1];
$len = strlen( $m[0][0] );
- if ( $offset + $len < $contextchars )
+ if ( $offset + $len < $contextchars ) {
$begin = 0;
- elseif ( $len > $contextchars )
+ } elseif ( $len > $contextchars ) {
$begin = $offset;
- else
+ } else {
$begin = $offset + intval( ( $len - $contextchars ) / 2 );
+ }
$end = $begin + $contextchars;
$out[$index] = $this->extract( $line, $begin, $end, $posBegin );
$offsets[$index] = $posBegin;
$linesleft--;
- if ( $linesleft == 0 )
+ if ( $linesleft == 0 ) {
return;
+ }
}
}
*/
function linkReplace( $matches ) {
$colon = strpos( $matches[1], ':' );
- if ( $colon === false )
+ if ( $colon === false ) {
return $matches[2]; // replace with caption
+ }
global $wgContLang;
$ns = substr( $matches[1], 0, $colon );
$index = $wgContLang->getNsIndex( $ns );
- if ( $index !== false && ( $index == NS_FILE || $index == NS_CATEGORY ) )
+ if ( $index !== false && ( $index == NS_FILE || $index == NS_CATEGORY ) ) {
return $matches[0]; // return the whole thing
- else
+ } else {
return $matches[2];
-
+ }
}
/**
if ( !empty( $terms[3] ) ) {
$regexp = preg_quote( $terms[3], '/' );
- if ( $terms[4] )
+ if ( $terms[4] ) {
$regexp .= "[0-9A-Za-z_]+";
+ }
} else {
$regexp = preg_quote( str_replace( '"', '', $terms[2] ), '/' );
}
function next() {
$row = $this->mResultSet->fetchObject();
- if ( $row === false )
+ if ( $row === false ) {
return false;
+ }
return new SearchResult( $row );
}
}
# @todo FIXME: This doesn't handle parenthetical expressions.
$m = array();
- if( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
+ if ( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
$filteredText, $m, PREG_SET_ORDER ) ) {
- foreach( $m as $bits ) {
+ foreach ( $m as $bits ) {
@list( /* all */, $modifier, $term, $nonQuoted, $wildcard ) = $bits;
- if( $nonQuoted != '' ) {
+ if ( $nonQuoted != '' ) {
$term = $nonQuoted;
$quote = '';
} else {
$quote = '"';
}
- if( $searchon !== '' ) $searchon .= ' ';
- if( $this->strictMatching && ($modifier == '') ) {
+ if ( $searchon !== '' ) {
+ $searchon .= ' ';
+ }
+ if ( $this->strictMatching && ( $modifier == '' ) ) {
// If we leave this out, boolean op defaults to OR which is rarely helpful.
$modifier = '+';
}
// Some languages such as Serbian store the input form in the search index,
// so we may need to search for matches in multiple writing system variants.
$convertedVariants = $wgContLang->autoConvertToAllVariants( $term );
- if( is_array( $convertedVariants ) ) {
+ if ( is_array( $convertedVariants ) ) {
$variants = array_unique( array_values( $convertedVariants ) );
} else {
$variants = array( $term );
$strippedVariants = array_unique( $strippedVariants );
$searchon .= $modifier;
- if( count( $strippedVariants ) > 1 )
+ if ( count( $strippedVariants ) > 1 ) {
$searchon .= '(';
- foreach( $strippedVariants as $stripped ) {
+ }
+ foreach ( $strippedVariants as $stripped ) {
$stripped = $this->normalizeText( $stripped );
- if( $nonQuoted && strpos( $stripped, ' ' ) !== false ) {
+ if ( $nonQuoted && strpos( $stripped, ' ' ) !== false ) {
// Hack for Chinese: we need to toss in quotes for
// multiple-character phrases since normalizeForSearch()
// added spaces between them to make word breaks.
}
$searchon .= "$quote$stripped$quote$wildcard ";
}
- if( count( $strippedVariants ) > 1 )
+ if ( count( $strippedVariants ) > 1 ) {
$searchon .= ')';
+ }
// Match individual terms or quoted phrase in result highlighting...
// Note that variants will be introduced in a later stage for highlighting!
global $wgContLang;
$regex = preg_quote( $string, '/' );
- if( $wgContLang->hasWordBreaks() ) {
- if( $wildcard ) {
+ if ( $wgContLang->hasWordBreaks() ) {
+ if ( $wildcard ) {
// Don't cut off the final bit!
$regex = "\b$regex";
} else {
global $wgCountTotalSearchHits;
// This seems out of place, why is this called with empty term?
- if ( trim( $term ) === '' ) return null;
+ if ( trim( $term ) === '' ) {
+ return null;
+ }
$filteredTerm = $this->filter( $term );
$query = $this->getQuery( $filteredTerm, $fulltext );
);
$total = null;
- if( $wgCountTotalSearchHits ) {
+ if ( $wgCountTotalSearchHits ) {
$query = $this->getCountQuery( $filteredTerm, $fulltext );
$totalResult = $this->db->select(
$query['tables'], $query['fields'], $query['conds'],
);
$row = $totalResult->fetchObject();
- if( $row ) {
+ if ( $row ) {
$total = intval( $row->c );
}
$totalResult->free();
foreach ( $this->features as $feature => $value ) {
if ( $feature === 'list-redirects' && !$value ) {
$query['conds']['page_is_redirect'] = 0;
- } elseif( $feature === 'title-suffix-filter' && $value ) {
+ } elseif ( $feature === 'title-suffix-filter' && $value ) {
$query['conds'][] = 'page_title' . $this->db->buildLike( $this->db->anyString(), $value );
}
}
$dbw->update( 'searchindex',
array( 'si_title' => $this->normalizeText( $title ) ),
- array( 'si_page' => $id ),
+ array( 'si_page' => $id ),
__METHOD__,
array( $dbw->lowPriorityOption() ) );
}
// ignores short words... Pad them so we can pass them
// through without reconfiguring the server...
$minLength = $this->minSearchLength();
- if( $minLength > 1 ) {
+ if ( $minLength > 1 ) {
$n = $minLength - 1;
$out = preg_replace(
"/\b(\w{1,$n})\b/",
* @return int
*/
protected function minSearchLength() {
- if( is_null( self::$mMinSearchLength ) ) {
+ if ( is_null( self::$mMinSearchLength ) ) {
$sql = "SHOW GLOBAL VARIABLES LIKE 'ft\\_min\\_word\\_len'";
$dbr = wfGetDB( DB_SLAVE );
$row = $result->fetchObject();
$result->free();
- if( $row && $row->Variable_name == 'ft_min_word_len' ) {
+ if ( $row && $row->Variable_name == 'ft_min_word_len' ) {
self::$mMinSearchLength = intval( $row->Value );
} else {
self::$mMinSearchLength = 0;
* @return SqlSearchResultSet
*/
function searchText( $term ) {
- if ( $term == '' )
+ if ( $term == '' ) {
return new SqlSearchResultSet( false, '' );
+ }
$resultSet = $this->db->resultObject( $this->db->query( $this->getQuery( $this->filter( $term ), true ) ) );
return new SqlSearchResultSet( $resultSet, $this->searchTerms );
* @return SqlSearchResultSet
*/
function searchTitle( $term ) {
- if ( $term == '' )
+ if ( $term == '' ) {
return new SqlSearchResultSet( false, '' );
+ }
$resultSet = $this->db->resultObject( $this->db->query( $this->getQuery( $this->filter( $term ), false ) ) );
return new MySQLSearchResultSet( $resultSet, $this->searchTerms );
* @return String
*/
function queryNamespaces() {
- if( is_null( $this->namespaces ) )
+ if ( is_null( $this->namespaces ) ) {
return '';
+ }
if ( !count( $this->namespaces ) ) {
$namespaces = '0';
} else {
$searchon = '';
if ( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
$filteredText, $m, PREG_SET_ORDER ) ) {
- foreach( $m as $terms ) {
+ foreach ( $m as $terms ) {
// Search terms in all variant forms, only
// apply on wiki with LanguageConverter
$temp_terms = $wgContLang->autoConvertToAllVariants( $terms[2] );
- if( is_array( $temp_terms ) ) {
+ if ( is_array( $temp_terms ) ) {
$temp_terms = array_unique( array_values( $temp_terms ) );
- foreach( $temp_terms as $t ) {
- $searchon .= ($terms[1] == '-' ? ' ~' : ' & ') . $this->escapeTerm( $t );
+ foreach ( $temp_terms as $t ) {
+ $searchon .= ( $terms[1] == '-' ? ' ~' : ' & ' ) . $this->escapeTerm( $t );
}
}
else {
- $searchon .= ($terms[1] == '-' ? ' ~' : ' & ') . $this->escapeTerm( $terms[2] );
+ $searchon .= ( $terms[1] == '-' ? ' ~' : ' & ' ) . $this->escapeTerm( $terms[2] );
}
if ( !empty( $terms[3] ) ) {
$regexp = preg_quote( $terms[3], '/' );
- if ( $terms[4] )
+ if ( $terms[4] ) {
$regexp .= "[0-9A-Za-z_]+";
+ }
} else {
$regexp = preg_quote( str_replace( '"', '', $terms[2] ), '/' );
}
$dbw->update( 'searchindex',
array( 'si_title' => $title ),
- array( 'si_page' => $id ),
+ array( 'si_page' => $id ),
'SearchOracle::updateTitle',
array() );
}
$searchstring = '';
$m = array();
- if( preg_match_all( '/([-!]?)(\S+)\s*/', $term, $m, PREG_SET_ORDER ) ) {
- foreach( $m as $terms ) {
+ if ( preg_match_all( '/([-!]?)(\S+)\s*/', $term, $m, PREG_SET_ORDER ) ) {
+ foreach ( $m as $terms ) {
if ( strlen( $terms[1] ) ) {
$searchstring .= ' & !';
}
}
else {
$m = array();
- if( preg_match_all( "/'([^']+)'/", $top, $m, PREG_SET_ORDER ) ) {
- foreach( $m as $terms ) {
+ if ( preg_match_all( "/'([^']+)'/", $top, $m, PREG_SET_ORDER ) ) {
+ foreach ( $m as $terms ) {
$this->searchTerms[$terms[1]] = $terms[1];
}
}
}
## Redirects
- if ( !$this->showRedirects )
+ if ( !$this->showRedirects ) {
$query .= ' AND page_is_redirect = 0';
+ }
## Namespaces - defaults to 0
- if( !is_null( $this->namespaces ) ) { // null -> search all
+ if ( !is_null( $this->namespaces ) ) { // null -> search all
if ( count( $this->namespaces ) < 1 ) {
$query .= ' AND page_namespace = 0';
} else {
function next() {
$row = $this->mResultSet->fetchObject();
- if( $row === false ) {
+ if ( $row === false ) {
return false;
} else {
return new PostgresSearchResult( $row );
$this->searchTerms = array();
$m = array();
- if( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
+ if ( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
$filteredText, $m, PREG_SET_ORDER ) ) {
- foreach( $m as $bits ) {
+ foreach ( $m as $bits ) {
@list( /* all */, $modifier, $term, $nonQuoted, $wildcard ) = $bits;
- if( $nonQuoted != '' ) {
+ if ( $nonQuoted != '' ) {
$term = $nonQuoted;
$quote = '';
} else {
$quote = '"';
}
- if( $searchon !== '' ) {
+ if ( $searchon !== '' ) {
$searchon .= ' ';
}
// Some languages such as Serbian store the input form in the search index,
// so we may need to search for matches in multiple writing system variants.
$convertedVariants = $wgContLang->autoConvertToAllVariants( $term );
- if( is_array( $convertedVariants ) ) {
+ if ( is_array( $convertedVariants ) ) {
$variants = array_unique( array_values( $convertedVariants ) );
} else {
$variants = array( $term );
$strippedVariants = array_unique( $strippedVariants );
$searchon .= $modifier;
- if( count( $strippedVariants ) > 1 )
+ if ( count( $strippedVariants ) > 1 ) {
$searchon .= '(';
- foreach( $strippedVariants as $stripped ) {
- if( $nonQuoted && strpos( $stripped, ' ' ) !== false ) {
+ }
+ foreach ( $strippedVariants as $stripped ) {
+ if ( $nonQuoted && strpos( $stripped, ' ' ) !== false ) {
// Hack for Chinese: we need to toss in quotes for
// multiple-character phrases since normalizeForSearch()
// added spaces between them to make word breaks.
}
$searchon .= "$quote$stripped$quote$wildcard ";
}
- if( count( $strippedVariants ) > 1 )
+ if ( count( $strippedVariants ) > 1 ) {
$searchon .= ')';
+ }
// Match individual terms or quoted phrase in result highlighting...
// Note that variants will be introduced in a later stage for highlighting!
global $wgContLang;
$regex = preg_quote( $string, '/' );
- if( $wgContLang->hasWordBreaks() ) {
- if( $wildcard ) {
+ if ( $wgContLang->hasWordBreaks() ) {
+ if ( $wildcard ) {
// Don't cut off the final bit!
$regex = "\b$regex";
} else {
$resultSet = $this->db->query( $this->getQuery( $filteredTerm, $fulltext ) );
$total = null;
- if( $wgCountTotalSearchHits ) {
+ if ( $wgCountTotalSearchHits ) {
$totalResult = $this->db->query( $this->getCountQuery( $filteredTerm, $fulltext ) );
$row = $totalResult->fetchObject();
- if( $row ) {
+ if ( $row ) {
$total = intval( $row->c );
}
$totalResult->free();
* @return String
*/
function queryRedirect() {
- if( $this->showRedirects ) {
+ if ( $this->showRedirects ) {
return '';
} else {
return 'AND page_is_redirect=0';
* @return String
*/
function queryNamespaces() {
- if( is_null( $this->namespaces ) )
+ if ( is_null( $this->namespaces ) ) {
return ''; # search all
+ }
if ( !count( $this->namespaces ) ) {
$namespaces = '0';
} else {
$dbw->update( 'searchindex',
array( 'si_title' => $title ),
- array( 'rowid' => $id ),
+ array( 'rowid' => $id ),
__METHOD__ );
}
}
$nt = $title;
}
- if( $nt ) {
+ if ( $nt ) {
$this->mId = $id;
$this->mText = $text;
function doUpdate() {
global $wgContLang, $wgDisableSearchUpdate;
- if( $wgDisableSearchUpdate || !$this->mId ) {
+ if ( $wgDisableSearchUpdate || !$this->mId ) {
return;
}
$search = SearchEngine::create();
$lc = SearchEngine::legalSearchChars() . '&#;';
- if( $this->mText === false ) {
+ if ( $this->mText === false ) {
$search->updateTitle( $this->mId,
$search->normalizeText( Title::indexTitle( $this->mNamespace, $this->mTitle ) ) );
wfProfileOut( __METHOD__ );
global $wgUseDatabaseMessages;
if ( !$wgUseDatabaseMessages ) {
$out->addWikiMsg( 'allmessagesnotsupportedDB' );
+
return;
} else {
$this->outputHeader( 'allmessagestext' );
$this->table->getNavigationBar() .
$this->table->getBody() .
$this->table->getNavigationBar() );
-
}
protected function getGroupName() {
$this->getHiddenFields( array( 'title', 'prefix', 'filter', 'lang', 'limit' ) ) .
Xml::closeElement( 'fieldset' ) .
Xml::closeElement( 'form' );
+
return $out;
}
$messageNames = array_map( array( $this->lang, 'ucfirst' ), $messageNames );
wfProfileOut( __METHOD__ );
+
return $messageNames;
}
break;
}
}
+
return $result;
}
array( 'broken' )
);
}
+
return $title . ' ' . $this->msg( 'parentheses' )->rawParams( $talk )->escaped();
case 'am_default' :
$s .= Xml::tags( 'td', $this->getCellAttrs( 'am_actual', $row->am_actual ), $formatted )
. "</tr>\n";
}
+
return $s;
}
if ( !$isSecond ) {
$arr['id'] = Sanitizer::escapeId( 'msg_' . $this->getLanguage()->lcfirst( $row->am_title ) );
}
+
return $arr;
}
* @param string $par becomes "FOO" when called like Special:Allpages/FOO (default NULL)
*/
function execute( $par ) {
- global $wgContLang;
$request = $this->getRequest();
$out = $this->getOutput();
$namespace = $request->getInt( 'namespace' );
$hideredirects = $request->getBool( 'hideredirects', false );
- $namespaces = $wgContLang->getNamespaces();
+ $namespaces = $this->getContext()->getLanguage()->getNamespaces();
$out->setPageTitle(
( $namespace > 0 && in_array( $namespace, array_keys( $namespaces ) ) ) ?
$out .= Xml::closeElement( 'fieldset' );
$out .= Xml::closeElement( 'form' );
$out .= Xml::closeElement( 'div' );
+
return $out;
}
} else {
$output->addHTML( $this->namespaceForm( $namespace, $from, $to, $hideredirects ) );
}
+
return;
}
* @return string
*/
function showline( $inpoint, $outpoint, $namespace = NS_MAIN, $hideRedirects = false ) {
+ // Use content language since page titles are considered to use content language
global $wgContLang;
$inpointf = htmlspecialchars( str_replace( '_', ' ', $inpoint ) );
$outpointf = htmlspecialchars( str_replace( '_', ' ', $outpoint ) );
'to' => $outpoint,
);
- if( $namespace ) {
+ if ( $namespace ) {
$queryParams['namespace'] = $namespace;
}
if ( $hideRedirects ) {
"<a href=\"$link\">$inpointf</a></td><td>",
"</td><td><a href=\"$link\">$outpointf</a>"
)->escaped();
+
return '<tr><td class="mw-allpages-alphaindexline">' . $out . '</td></tr>';
}
* @param bool $hideredirects dont show redirects (default FALSE)
*/
function showChunk( $namespace = NS_MAIN, $from = false, $to = false, $hideredirects = false ) {
- global $wgContLang;
$output = $this->getOutput();
$fromList = $this->getNamespaceKeyAndText( $namespace, $from );
$toList = $this->getNamespaceKeyAndText( $namespace, $to );
- $namespaces = $wgContLang->getNamespaces();
+ $namespaces = $this->getContext()->getLanguage()->getNamespaces();
$n = 0;
if ( !$fromList || !$toList ) {
)
);
}
-
}
/**
$title,
htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) )
);
+
return $this->getLanguage()->specialList( $link, htmlspecialchars( $d ) );
}
} elseif ( IP::isIPAddress( $target ) ) {
return Title::makeTitleSafe( NS_USER, $target );
}
+
return null;
}
$status = self::validateTarget( $value, $form->getUser() );
if ( !$status->isOK() ) {
$errors = $status->getErrorsArray();
+
return call_user_func_array( array( $form, 'msg' ), $errors[0] );
} else {
return true;
}
# BC @since 1.18
-class IPBlockForm extends SpecialBlock {}
+class IPBlockForm extends SpecialBlock {
+}
# B/C @since 1.18: Unblock interface is now at Special:Unblock
$title = SpecialPage::getTitleFor( 'Unblock', $this->target );
$out->redirect( $title->getFullURL() );
+
return;
}
break;
case Block::TYPE_USER:
- $conds['ipb_address'] = (string)$this->target;
+ $conds['ipb_address'] = $target->getName();
$conds['ipb_auto'] = 0;
break;
}
$pager->getBody() .
$pager->getNavigationBar()
);
-
} elseif ( $this->target ) {
$out->addWikiMsg( 'ipblocklist-no-results' );
-
} else {
$out->addWikiMsg( 'ipblocklist-empty' );
}
return true;
}
-
}
$ip = $this->getRequest()->getIP();
if ( !$wgBlockOpenProxies || $this->getRequest()->getText( 'ip' ) != md5( $ip . $wgProxyKey ) ) {
$this->getOutput()->addWikiMsg( 'proxyblocker-disabled' );
+
return;
}
return true;
}
}
+
return false;
}
private function makeForm() {
global $wgScript;
- $form = '<fieldset><legend>' . $this->msg( 'booksources-search-legend' )->escaped() . '</legend>';
- $form .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
- $form .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() );
+ $form = Html::openElement( 'fieldset' ) . "\n";
+ $form .= Html::element( 'legend', array(), $this->msg( 'booksources-search-legend' )->text() ) . "\n";
+ $form .= Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . "\n";
+ $form .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . "\n";
$form .= '<p>' . Xml::inputLabel( $this->msg( 'booksources-isbn' )->text(), 'isbn', 'isbn', 20, $this->isbn );
- $form .= ' ' . Xml::submitButton( $this->msg( 'booksources-go' )->text() ) . '</p>';
- $form .= Xml::closeElement( 'form' );
- $form .= '</fieldset>';
+ $form .= ' ' . Xml::submitButton( $this->msg( 'booksources-go' )->text() ) . "</p>\n";
+ $form .= Html::closeElement( 'form' ) . "\n";
+ $form .= Html::closeElement( 'fieldset' ) . "\n";
+
return $form;
}
$text = $content->getNativeData();
$this->getOutput()->addWikiText( str_replace( 'MAGICNUMBER', $this->isbn, $text ) );
+
return true;
} else {
throw new MWException( "Unexpected content type for book sources: " . $content->getModel() );
$this->getOutput()->addWikiMsg( 'booksources-text' );
$this->getOutput()->addHTML( '<ul>' );
$items = $wgContLang->getBookstoreList();
- foreach ( $items as $label => $url )
+ foreach ( $items as $label => $url ) {
$this->getOutput()->addHTML( $this->makeListItem( $label, $url ) );
+ }
$this->getOutput()->addHTML( '</ul>' );
+
return true;
}
*/
private function makeListItem( $label, $url ) {
$url = str_replace( '$1', $this->isbn, $url );
- return '<li><a href="' . htmlspecialchars( $url ) . '" class="external">' . htmlspecialchars( $label ) . '</a></li>';
+
+ return Html::rawElement( 'li', array(),
+ Html::element( 'a', array( 'href' => $url, 'class' => 'external' ), $label ) );
}
protected function getGroupName() {
function getQueryInfo() {
$dbr = wfGetDB( DB_SLAVE );
+
return array(
'tables' => array(
'redirect',
$out .= $this->msg( 'parentheses' )->rawParams( $this->getLanguage()->pipeList( $links ) )->escaped();
$out .= " {$arr} {$to}";
+
return $out;
}
$this->getOutput()->setSubtitle( $this->cacheHelper->getCachedNotice( $this->getContext() ) );
}
}
-
}
function getDefaultQuery() {
parent::getDefaultQuery();
unset( $this->mDefaultQuery['from'] );
+
return $this->mDefaultQuery;
}
}
$batch->execute();
$this->mResult->rewind();
+
return parent::getBody();
}
$title = Title::makeTitle( NS_CATEGORY, $result->cat_title );
$titleText = Linker::link( $title, htmlspecialchars( $title->getText() ) );
$count = $this->msg( 'nmembers' )->numParams( $result->cat_pages )->escaped();
+
return Xml::tags( 'li', null, $this->getLanguage()->specialList( $titleText, $count ) ) . "\n";
}
Xml::inputLabel(
$this->msg( 'categoriesfrom' )->text(),
'from', 'from', 20, $from ) .
- ' ' .
- Xml::submitButton( $this->msg( 'allpagessubmit' )->text()
- )
+ ' ' .
+ Xml::submitButton( $this->msg( 'allpagessubmit' )->text()
+ )
)
);
}
*/
function isListed() {
global $wgAuth;
+
return $wgAuth->allowPropChange( 'emailaddress' );
}
if ( !$wgAuth->allowPropChange( 'emailaddress' ) ) {
$this->error( 'cannotchangeemail' );
+
return;
}
if ( !$request->wasPosted() && !$user->isLoggedIn() ) {
$this->error( 'changeemail-no-info' );
+
return;
}
if ( $request->wasPosted() && $request->getBool( 'wpCancel' ) ) {
$this->doReturnTo();
+
return;
}
$out .= "</td>\n";
$out .= "</tr>";
}
+
return $out;
}
if ( $newaddr != '' && !Sanitizer::validateEmail( $newaddr ) ) {
$this->error( 'invalidemailaddress' );
+
return false;
}
$throttleCount = LoginForm::incLoginThrottle( $user->getName() );
if ( $throttleCount === true ) {
$this->error( 'login-throttled' );
+
return false;
}
global $wgRequirePasswordforEmailChange;
if ( $wgRequirePasswordforEmailChange && !$user->checkTemporaryPassword( $pass ) && !$user->checkPassword( $pass ) ) {
$this->error( 'wrongpassword' );
+
return false;
}
'<p class="error">' .
$this->getOutput()->parseInline( $status->getWikiText( 'mailerror' ) ) .
'</p>' );
+
return false;
}
$user = $this->getUser();
if ( !$request->wasPosted() && !$user->isLoggedIn() ) {
$this->error( $this->msg( 'resetpass-no-info' )->text() );
+
return;
}
if ( $request->wasPosted() && $request->getBool( 'wpCancel' ) ) {
$this->doReturnTo();
+
return;
}
$this->mDomain = $wgAuth->getDomain();
if ( !$wgAuth->allowPasswordChange() ) {
$this->error( $this->msg( 'resetpass_forbidden' )->text() );
+
return;
}
$login->setContext( $this->getContext() );
$login->execute( null );
}
+
return;
} catch ( PasswordError $e ) {
$this->error( $e->getMessage() );
$out .= "</td>\n";
$out .= "</tr>";
}
+
return $out;
}
return $title->getLatestRevID();
}
}
+
return null;
}
if ( !$title->exists() ) {
return $this->msg( 'compare-title-not-exists' )->parseAsBlock();
}
+
return true;
}
if ( $revision === null ) {
return $this->msg( 'compare-revision-not-exists' )->parseAsBlock();
}
+
return true;
}
}
$out->addWikiMsg( 'confirmemail_text' );
- $form = Xml::openElement(
+ $form = Html::openElement(
'form',
array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL() )
- );
- $form .= Html::hidden( 'token', $user->getEditToken() );
- $form .= Xml::submitButton( $this->msg( 'confirmemail_send' )->text() );
- $form .= Xml::closeElement( 'form' );
+ ) . "\n";
+ $form .= Html::hidden( 'token', $user->getEditToken() ) . "\n";
+ $form .= Xml::submitButton( $this->msg( 'confirmemail_send' )->text() ) . "\n";
+ $form .= Html::closeElement( 'form' ) . "\n";
$out->addHTML( $form );
}
}
$user = User::newFromConfirmationCode( $code );
if ( !is_object( $user ) ) {
$this->getOutput()->addWikiMsg( 'confirmemail_invalid' );
+
return;
}
$user = User::newFromConfirmationCode( $code );
if ( !is_object( $user ) ) {
$this->getOutput()->addWikiMsg( 'confirmemail_invalid' );
+
return;
}
if ( !strlen( $target ) ) {
$out->addHTML( $this->getForm() );
+
return;
}
$nt = Title::makeTitleSafe( NS_USER, $target );
if ( !$nt ) {
$out->addHTML( $this->getForm() );
+
return;
}
$userObj = User::newFromName( $nt->getText(), false );
if ( !$userObj ) {
$out->addHTML( $this->getForm() );
+
return;
}
$id = $userObj->getID();
$url = wfAppendQuery( wfScript( 'api' ), $apiParams );
$out->redirect( $url, '301' );
+
return;
}
$oldMsg = $this->msg( 'contribsub' );
if ( $oldMsg->exists() ) {
$linksWithParentheses = $this->msg( 'parentheses' )->rawParams( $links )->escaped();
+
return $oldMsg->rawParams( "$user $linksWithParentheses" );
}
);
}
}
+
# Block log link
$tools[] = Linker::linkKnown(
SpecialPage::getTitleFor( 'Log', 'block' ),
}
wfRunHooks( 'ContributionsToolLinks', array( $id, $userpage, &$tools ) );
+
return $tools;
}
}
if ( !isset( $this->opts['year'] ) ) {
- $this->opts['year'] = '';
+ $this->opts['year'] = gmdate( 'Y' );
}
if ( !isset( $this->opts['month'] ) ) {
'class' => 'namespaceselector',
)
) . ' ' .
- Html::rawElement(
- 'span',
- array( 'style' => 'white-space: nowrap' ),
- Xml::checkLabel(
- $this->msg( 'invert' )->text(),
- 'nsInvert',
- 'nsInvert',
- $this->opts['nsInvert'],
- array(
- 'title' => $this->msg( 'tooltip-invert' )->text(),
- 'class' => 'mw-input'
- )
- ) . ' '
- ) .
- Html::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),
- Xml::checkLabel(
- $this->msg( 'namespace_association' )->text(),
- 'associated',
- 'associated',
- $this->opts['associated'],
- array(
- 'title' => $this->msg( 'tooltip-namespace_association' )->text(),
- 'class' => 'mw-input'
- )
- ) . ' '
- )
+ Html::rawElement(
+ 'span',
+ array( 'style' => 'white-space: nowrap' ),
+ Xml::checkLabel(
+ $this->msg( 'invert' )->text(),
+ 'nsInvert',
+ 'nsInvert',
+ $this->opts['nsInvert'],
+ array(
+ 'title' => $this->msg( 'tooltip-invert' )->text(),
+ 'class' => 'mw-input'
+ )
+ ) . ' '
+ ) .
+ Html::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),
+ Xml::checkLabel(
+ $this->msg( 'namespace_association' )->text(),
+ 'associated',
+ 'associated',
+ $this->opts['associated'],
+ array(
+ 'title' => $this->msg( 'tooltip-namespace_association' )->text(),
+ 'class' => 'mw-input'
+ )
+ ) . ' '
+ )
);
if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {
function getDefaultQuery() {
$query = parent::getDefaultQuery();
$query['target'] = $this->target;
+
return $query;
}
);
wfRunHooks( 'ContribsPager::getQueryInfo', array( &$this, &$queryInfo ) );
+
return $queryInfo;
}
}
wfProfileOut( __METHOD__ );
+
return $ret;
}
function getQueryInfo() {
return array(
'tables' => array( 'page', 'pagelinks' ),
- 'fields' => array( 'namespace' => 'page_namespace',
- 'title' => 'page_title',
- 'value' => 'page_title'
+ 'fields' => array(
+ 'namespace' => 'page_namespace',
+ 'title' => 'page_title',
+ 'value' => 'page_title'
),
- 'conds' => array( 'pl_from IS NULL',
- 'page_namespace' => MWNamespace::getContentNamespaces(),
- 'page_is_redirect' => 0
+ 'conds' => array(
+ 'pl_from IS NULL',
+ 'page_namespace' => MWNamespace::getContentNamespaces(),
+ 'page_is_redirect' => 0
),
- 'join_conds' => array( 'pagelinks' => array( 'LEFT JOIN', array(
- 'page_id=pl_from'
- ) ) )
+ 'join_conds' => array(
+ 'pagelinks' => array(
+ 'LEFT JOIN',
+ array( 'page_id=pl_from' )
+ )
+ )
);
}
function getOrderFields() {
// For some crazy reason ordering by a constant
// causes a filesort
- if( count( MWNamespace::getContentNamespaces() ) > 1 ) {
+ if ( count( MWNamespace::getContentNamespaces() ) > 1 ) {
return array( 'page_namespace', 'page_title' );
} else {
return array( 'page_title' );
function getDefaultQuery() {
$query = parent::getDefaultQuery();
$query['target'] = $this->target;
+
return $query;
}
$conds[] = $this->mDb->bitAnd( 'ar_deleted', Revision::SUPPRESSED_USER ) .
' != ' . Revision::SUPPRESSED_USER;
}
+
return array(
'tables' => array( 'archive' ),
'fields' => array(
$ret = Html::rawElement( 'li', array(), $ret ) . "\n";
wfProfileOut( __METHOD__ );
+
return $ret;
}
if ( !$this->userCanExecute( $user ) ) {
$this->displayRestrictionError();
+
return;
}
if ( !strlen( $target ) ) {
$out->addHTML( $this->getForm( '' ) );
+
return;
}
$userObj = User::newFromName( $target, false );
if ( !$userObj ) {
$out->addHTML( $this->getForm( '' ) );
+
return;
}
$this->getSkin()->setRelevantUser( $userObj );
$pager = new DeletedContribsPager( $this->getContext(), $target, $options['namespace'] );
if ( !$pager->getNumRows() ) {
$out->addWikiMsg( 'nocontribs' );
+
return;
}
# If the text can be treated as a title, use it verbatim.
# Otherwise, pull the titles from the links table
$dp = Title::newFromText( $dMsgText );
- if( $dp ) {
- if( $dp->getNamespace() != NS_TEMPLATE ) {
+ if ( $dp ) {
+ if ( $dp->getNamespace() != NS_TEMPLATE ) {
# @todo FIXME: We assume the disambiguation message is a template but
# the page can potentially be from another namespace :/
wfDebug( "Mediawiki:disambiguationspage message does not refer to a template!\n" );
}
$linkBatch->addObj( $dp );
} else {
- # Get all the templates linked from the Mediawiki:Disambiguationspage
- $disPageObj = Title::makeTitleSafe( NS_MEDIAWIKI, 'disambiguationspage' );
- $res = $dbr->select(
- array( 'pagelinks', 'page' ),
- 'pl_title',
- array( 'page_id = pl_from',
- 'pl_namespace' => NS_TEMPLATE,
- 'page_namespace' => $disPageObj->getNamespace(),
- 'page_title' => $disPageObj->getDBkey()
- ), __METHOD__ );
-
- foreach ( $res as $row ) {
- $linkBatch->addObj( Title::makeTitle( NS_TEMPLATE, $row->pl_title ));
- }
+ # Get all the templates linked from the Mediawiki:Disambiguationspage
+ $disPageObj = Title::makeTitleSafe( NS_MEDIAWIKI, 'disambiguationspage' );
+ $res = $dbr->select(
+ array( 'pagelinks', 'page' ),
+ 'pl_title',
+ array(
+ 'page_id = pl_from',
+ 'pl_namespace' => NS_TEMPLATE,
+ 'page_namespace' => $disPageObj->getNamespace(),
+ 'page_title' => $disPageObj->getDBkey()
+ ),
+ __METHOD__
+ );
+
+ foreach ( $res as $row ) {
+ $linkBatch->addObj( Title::makeTitle( NS_TEMPLATE, $row->pl_title ) );
+ }
}
$set = $linkBatch->constructSet( 'tl', $dbr );
- if( $set === false ) {
+ if ( $set === false ) {
# We must always return a valid SQL query, but this way
# the DB will always quickly return an empty result
$set = 'FALSE';
// using the filter of reallyGetQueryInfo.
if ( $result && !isset( $result->nsb ) ) {
$dbr = wfGetDB( DB_SLAVE );
- $qi = $this->reallyGetQueryInfo( $result->namespace,
- $result->title );
- $res = $dbr->select( $qi['tables'], $qi['fields'],
- $qi['conds'], __METHOD__ );
+ $qi = $this->reallyGetQueryInfo(
+ $result->namespace,
+ $result->title
+ );
+ $res = $dbr->select(
+ $qi['tables'],
+ $qi['fields'],
+ $qi['conds'],
+ __METHOD__
+ );
+
if ( $res ) {
$result = $dbr->fetchObject( $res );
}
$lang = $this->getLanguage();
$arr = $lang->getArrow() . $lang->getDirMark();
- return( "{$linkA} {$edit} {$arr} {$linkB} {$arr} {$linkC}" );
+ return ( "{$linkA} {$edit} {$arr} {$linkB} {$arr} {$linkC}" );
}
protected function getGroupName() {
* @author Rob Church <robchur@gmail.com>
*/
class SpecialEditWatchlist extends UnlistedSpecialPage {
-
/**
* Editing modes
*/
$out = $this->getOutput();
# Anons don't get a watchlist
- if( $this->getUser()->isAnon() ) {
+ if ( $this->getUser()->isAnon() ) {
$out->setPageTitle( $this->msg( 'watchnologin' ) );
$llink = Linker::linkKnown(
SpecialPage::getTitleFor( 'Userlogin' ),
array( 'returnto' => $this->getTitle()->getPrefixedText() )
);
$out->addHTML( $this->msg( 'watchlistanontext' )->rawParams( $llink )->parse() );
+
return;
}
$this->outputHeader();
- $out->addSubtitle( $this->msg( 'watchlistfor2', $this->getUser()->getName()
- )->rawParams( SpecialEditWatchlist::buildTools( null ) ) );
+ $out->addSubtitle( $this->msg( 'watchlistfor2', $this->getUser()->getName() )
+ ->rawParams( SpecialEditWatchlist::buildTools( null ) ) );
# B/C: $mode used to be waaay down the parameter list, and the first parameter
# was $wgUser
- if( $mode instanceof User ) {
+ if ( $mode instanceof User ) {
$args = func_get_args();
if ( count( $args ) >= 4 ) {
$mode = $args[3];
}
$mode = self::getMode( $this->getRequest(), $mode );
- switch( $mode ) {
+ switch ( $mode ) {
case self::EDIT_CLEAR:
// The "Clear" link scared people too much.
// Pass on to the raw editor, from which it's very easy to clear.
case self::EDIT_RAW:
$out->setPageTitle( $this->msg( 'watchlistedit-raw-title' ) );
$form = $this->getRawForm();
- if( $form->show() ) {
+ if ( $form->show() ) {
$out->addHTML( $this->successMessage );
$out->addReturnTo( SpecialPage::getTitleFor( 'Watchlist' ) );
}
default:
$out->setPageTitle( $this->msg( 'watchlistedit-normal-title' ) );
$form = $this->getNormalForm();
- if( $form->show() ) {
+ if ( $form->show() ) {
$out->addHTML( $this->successMessage );
$out->addReturnTo( SpecialPage::getTitleFor( 'Watchlist' ) );
} elseif ( $this->toc !== false ) {
*/
private function extractTitles( $list ) {
$list = explode( "\n", trim( $list ) );
- if( !is_array( $list ) ) {
+ if ( !is_array( $list ) ) {
return array();
}
+
$titles = array();
- foreach( $list as $text ) {
+
+ foreach ( $list as $text ) {
$text = trim( $text );
- if( strlen( $text ) > 0 ) {
+ if ( strlen( $text ) > 0 ) {
$title = Title::newFromText( $text );
- if( $title instanceof Title && $title->isWatchable() ) {
+ if ( $title instanceof Title && $title->isWatchable() ) {
$titles[] = $title;
}
}
GenderCache::singleton()->doTitlesArray( $titles );
$list = array();
- foreach( $titles as $title ) {
+ /** @var Title $title */
+ foreach ( $titles as $title ) {
$list[] = $title->getPrefixedText();
}
+
return array_unique( $list );
}
$wanted = $this->extractTitles( $data['Titles'] );
$current = $this->getWatchlist();
- if( count( $wanted ) > 0 ) {
+ if ( count( $wanted ) > 0 ) {
$toWatch = array_diff( $wanted, $current );
$toUnwatch = array_diff( $current, $wanted );
$this->watchTitles( $toWatch );
$this->unwatchTitles( $toUnwatch );
$this->getUser()->invalidateCache();
- if( count( $toWatch ) > 0 || count( $toUnwatch ) > 0 ) {
+ if ( count( $toWatch ) > 0 || count( $toUnwatch ) > 0 ) {
$this->successMessage = $this->msg( 'watchlistedit-raw-done' )->parse();
} else {
return false;
}
- if( count( $toWatch ) > 0 ) {
+ if ( count( $toWatch ) > 0 ) {
$this->successMessage .= ' ' . $this->msg( 'watchlistedit-raw-added'
- )->numParams( count( $toWatch ) )->parse();
+ )->numParams( count( $toWatch ) )->parse();
$this->showTitles( $toWatch, $this->successMessage );
}
- if( count( $toUnwatch ) > 0 ) {
+ if ( count( $toUnwatch ) > 0 ) {
$this->successMessage .= ' ' . $this->msg( 'watchlistedit-raw-removed'
- )->numParams( count( $toUnwatch ) )->parse();
+ )->numParams( count( $toUnwatch ) )->parse();
$this->showTitles( $toUnwatch, $this->successMessage );
}
} else {
$this->clearWatchlist();
$this->getUser()->invalidateCache();
- if( count( $current ) > 0 ) {
+ if ( count( $current ) > 0 ) {
$this->successMessage = $this->msg( 'watchlistedit-raw-done' )->parse();
} else {
return false;
}
- $this->successMessage .= ' ' . $this->msg( 'watchlistedit-raw-removed'
- )->numParams( count( $current ) )->parse();
+ $this->successMessage .= ' ' . $this->msg( 'watchlistedit-raw-removed' )
+ ->numParams( count( $current ) )->parse();
$this->showTitles( $current, $this->successMessage );
}
+
return true;
}
$talk = $this->msg( 'talkpagelinktext' )->escaped();
// Do a batch existence check
$batch = new LinkBatch();
- foreach( $titles as $title ) {
- if( !$title instanceof Title ) {
+ foreach ( $titles as $title ) {
+ if ( !$title instanceof Title ) {
$title = Title::newFromText( $title );
}
- if( $title instanceof Title ) {
+
+ if ( $title instanceof Title ) {
$batch->addObj( $title );
$batch->addObj( $title->getTalkPage() );
}
}
+
$batch->execute();
+
// Print out the list
$output .= "<ul>\n";
- foreach( $titles as $title ) {
- if( !$title instanceof Title ) {
+
+ foreach ( $titles as $title ) {
+ if ( !$title instanceof Title ) {
$title = Title::newFromText( $title );
}
- if( $title instanceof Title ) {
+
+ if ( $title instanceof Title ) {
$output .= "<li>"
. Linker::link( $title )
. ' (' . Linker::link( $title->getTalkPage(), $talk )
. ")</li>\n";
}
}
+
$output .= "</ul>\n";
}
private function getWatchlist() {
$list = array();
$dbr = wfGetDB( DB_MASTER );
+
$res = $dbr->select(
'watchlist',
array(
),
__METHOD__
);
- if( $res->numRows() > 0 ) {
+
+ if ( $res->numRows() > 0 ) {
$titles = array();
foreach ( $res as $row ) {
$title = Title::makeTitleSafe( $row->wl_namespace, $row->wl_title );
+
if ( $this->checkTitle( $title, $row->wl_namespace, $row->wl_title )
&& !$title->isTalkPage()
) {
GenderCache::singleton()->doTitlesArray( $titles );
- foreach( $titles as $title ) {
+ foreach ( $titles as $title ) {
$list[] = $title->getPrefixedText();
}
}
+
$this->cleanupWatchlist();
+
return $list;
}
);
$lb = new LinkBatch();
+
foreach ( $res as $row ) {
$lb->add( $row->wl_namespace, $row->wl_title );
if ( !MWNamespace::isTalk( $row->wl_namespace ) ) {
}
$lb->execute();
+
return $titles;
}
) {
$title = false; // unrecoverable
}
+
if ( !$title
|| $title->getNamespace() != $namespace
|| $title->getDBkey() != $dbKey
) {
$this->badItems[] = array( $title, $namespace, $dbKey );
}
+
return (bool)$title;
}
* Attempts to clean up broken items
*/
private function cleanupWatchlist() {
- if( !count( $this->badItems ) ) {
+ if ( !count( $this->badItems ) ) {
return; //nothing to do
}
+
$dbw = wfGetDB( DB_MASTER );
$user = $this->getUser();
+
foreach ( $this->badItems as $row ) {
list( $title, $namespace, $dbKey ) = $row;
- wfDebug( "User {$user->getName()} has broken watchlist item ns($namespace):$dbKey, "
- . ( $title ? 'cleaning up' : 'deleting' ) . ".\n"
- );
+ $action = $title ? 'cleaning up' : 'deleting';
+ wfDebug( "User {$user->getName()} has broken watchlist item ns($namespace):$dbKey, $action.\n" );
$dbw->delete( 'watchlist',
array(
private function watchTitles( $titles ) {
$dbw = wfGetDB( DB_MASTER );
$rows = array();
- foreach( $titles as $title ) {
- if( !$title instanceof Title ) {
+
+ foreach ( $titles as $title ) {
+ if ( !$title instanceof Title ) {
$title = Title::newFromText( $title );
}
- if( $title instanceof Title ) {
+
+ if ( $title instanceof Title ) {
$rows[] = array(
'wl_user' => $this->getUser()->getId(),
'wl_namespace' => MWNamespace::getSubject( $title->getNamespace() ),
);
}
}
+
$dbw->insert( 'watchlist', $rows, __METHOD__, 'IGNORE' );
}
*/
private function unwatchTitles( $titles ) {
$dbw = wfGetDB( DB_MASTER );
- foreach( $titles as $title ) {
- if( !$title instanceof Title ) {
+
+ foreach ( $titles as $title ) {
+ if ( !$title instanceof Title ) {
$title = Title::newFromText( $title );
}
- if( $title instanceof Title ) {
+
+ if ( $title instanceof Title ) {
$dbw->delete(
'watchlist',
array(
),
__METHOD__
);
+
$dbw->delete(
'watchlist',
array(
),
__METHOD__
);
+
$page = WikiPage::factory( $title );
wfRunHooks( 'UnwatchArticleComplete', array( $this->getUser(), &$page ) );
}
public function submitNormal( $data ) {
$removed = array();
- foreach( $data as $titles ) {
+ foreach ( $data as $titles ) {
$this->unwatchTitles( $titles );
$removed = array_merge( $removed, $titles );
}
- if( count( $removed ) > 0 ) {
+ if ( count( $removed ) > 0 ) {
$this->successMessage = $this->msg( 'watchlistedit-normal-done'
- )->numParams( count( $removed ) )->parse();
+ )->numParams( count( $removed ) )->parse();
$this->showTitles( $removed, $this->successMessage );
+
return true;
} else {
return false;
$fields = array();
$count = 0;
- foreach( $this->getWatchlistInfo() as $namespace => $pages ) {
+ foreach ( $this->getWatchlistInfo() as $namespace => $pages ) {
if ( $namespace >= 0 ) {
$fields['TitlesNs' . $namespace] = array(
'class' => 'EditWatchlistCheckboxSeriesField',
);
}
- foreach( array_keys( $pages ) as $dbkey ) {
+ foreach ( array_keys( $pages ) as $dbkey ) {
$title = Title::makeTitleSafe( $namespace, $dbkey );
+
if ( $this->checkTitle( $title, $namespace, $dbkey ) ) {
$text = $this->buildRemoveLine( $title );
$fields['TitlesNs' . $namespace]['options'][$text] = $title->getPrefixedText();
if ( count( $fields ) > 1 && $count > 30 ) {
$this->toc = Linker::tocIndent();
$tocLength = 0;
- foreach( $fields as $data ) {
+ foreach ( $fields as $data ) {
# strip out the 'ns' prefix from the section name:
$ns = substr( $data['section'], 2 );
- $nsText = ($ns == NS_MAIN)
+ $nsText = ( $ns == NS_MAIN )
? $this->msg( 'blanknamespace' )->escaped()
: htmlspecialchars( $wgContLang->getFormattedNsText( $ns ) );
$this->toc .= Linker::tocLine( "editwatchlist-{$data['section']}", $nsText,
$this->getLanguage()->formatNum( ++$tocLength ), 1 ) . Linker::tocLineEnd();
}
+
$this->toc = Linker::tocList( $this->toc );
} else {
$this->toc = false;
$form->setWrapperLegendMsg( 'watchlistedit-normal-legend' );
$form->addHeaderText( $this->msg( 'watchlistedit-normal-explain' )->parse() );
$form->setSubmitCallback( array( $this, 'submitNormal' ) );
+
return $form;
}
*/
private function buildRemoveLine( $title ) {
$link = Linker::link( $title );
- if( $title->isRedirect() ) {
+
+ if ( $title->isRedirect() ) {
// Linker already makes class mw-redirect, so this is redundant
$link = '<span class="watchlistredir">' . $link . '</span>';
}
+
$tools[] = Linker::link( $title->getTalkPage(), $this->msg( 'talkpagelinktext' )->escaped() );
- if( $title->exists() ) {
+
+ if ( $title->exists() ) {
$tools[] = Linker::linkKnown(
$title,
$this->msg( 'history_short' )->escaped(),
array( 'action' => 'history' )
);
}
- if( $title->getNamespace() == NS_USER && !$title->isSubpage() ) {
+
+ if ( $title->getNamespace() == NS_USER && !$title->isSubpage() ) {
$tools[] = Linker::linkKnown(
SpecialPage::getTitleFor( 'Contributions', $title->getText() ),
$this->msg( 'contributions' )->escaped()
$form->setWrapperLegendMsg( 'watchlistedit-raw-legend' );
$form->addHeaderText( $this->msg( 'watchlistedit-raw-explain' )->parse() );
$form->setSubmitCallback( array( $this, 'submitRaw' ) );
+
return $form;
}
*/
public static function getMode( $request, $par ) {
$mode = strtolower( $request->getVal( 'action', $par ) );
- switch( $mode ) {
+
+ switch ( $mode ) {
case 'clear':
case self::EDIT_CLEAR:
return self::EDIT_CLEAR;
-
case 'raw':
case self::EDIT_RAW:
return self::EDIT_RAW;
-
case 'edit':
case self::EDIT_NORMAL:
return self::EDIT_NORMAL;
-
default:
return false;
}
'edit' => array( 'EditWatchlist', false ),
'raw' => array( 'EditWatchlist', 'raw' ),
);
- foreach( $modes as $mode => $arr ) {
+
+ foreach ( $modes as $mode => $arr ) {
// can use messages 'watchlisttools-view', 'watchlisttools-edit', 'watchlisttools-raw'
$tools[] = Linker::linkKnown(
SpecialPage::getTitleFor( $arr[0], $arr[1] ),
wfMessage( "watchlisttools-{$mode}" )->escaped()
);
}
- return Html::rawElement( 'span',
- array( 'class' => 'mw-watchlist-toollinks' ),
- wfMessage( 'parentheses', $wgLang->pipeList( $tools ) )->text() );
+
+ return Html::rawElement(
+ 'span',
+ array( 'class' => 'mw-watchlist-toollinks' ),
+ wfMessage( 'parentheses', $wgLang->pipeList( $tools ) )->text()
+ );
}
}
# B/C since 1.18
-class WatchlistEditor extends SpecialEditWatchlist {}
+class WatchlistEditor extends SpecialEditWatchlist {
+}
/**
* Extend HTMLForm purely so we can have a more sane way of getting the section headers
class EditWatchlistNormalHTMLForm extends HTMLForm {
public function getLegend( $namespace ) {
$namespace = substr( $namespace, 2 );
+
return $namespace == NS_MAIN
? $this->msg( 'blanknamespace' )->escaped()
: htmlspecialchars( $this->getContext()->getLanguage()->getFormattedNsText( $namespace ) );
}
+
public function getBody() {
return $this->displaySection( $this->mFieldTree, '', 'editwatchlist-' );
}
class SpecialEmailUser extends UnlistedSpecialPage {
protected $mTarget;
+ /**
+ * @var User|string $mTargetObj
+ */
+ protected $mTargetObj;
+
public function __construct() {
parent::__construct( 'Emailuser' );
}
public function getDescription() {
$target = self::getTarget( $this->mTarget );
- if( !$target instanceof User ) {
+ if ( !$target instanceof User ) {
return $this->msg( 'emailuser-title-notarget' )->text();
}
$this->outputHeader();
// error out if sending user cannot do this
- $error = self::getPermissionsError( $this->getUser(), $this->getRequest()->getVal( 'wpEditToken' ) );
+ $error = self::getPermissionsError(
+ $this->getUser(),
+ $this->getRequest()->getVal( 'wpEditToken' )
+ );
+
switch ( $error ) {
case null:
# Wahey!
}
// Got a valid target user name? Else ask for one.
$ret = self::getTarget( $this->mTarget );
- if( !$ret instanceof User ) {
- if( $this->mTarget != '' ) {
+ if ( !$ret instanceof User ) {
+ if ( $this->mTarget != '' ) {
$ret = ( $ret == 'notarget' ) ? 'emailnotarget' : ( $ret . 'text' );
$out->wrapWikiMsg( "<p class='error'>$1</p>", $ret );
}
$out->addHTML( $this->userForm( $this->mTarget ) );
+
return false;
}
$form->setWrapperLegendMsg( 'email-legend' );
$form->loadData();
- if( !wfRunHooks( 'EmailUserForm', array( &$form ) ) ) {
+ if ( !wfRunHooks( 'EmailUserForm', array( &$form ) ) ) {
return false;
}
$result = $form->show();
- if( $result === true || ( $result instanceof Status && $result->isGood() ) ) {
+ if ( $result === true || ( $result instanceof Status && $result->isGood() ) ) {
$out->setPageTitle( $this->msg( 'emailsent' ) );
$out->addWikiMsg( 'emailsenttext' );
$out->returnToMain( false, $this->mTargetObj->getUserPage() );
public static function getTarget( $target ) {
if ( $target == '' ) {
wfDebug( "Target is empty.\n" );
+
return 'notarget';
}
$nu = User::newFromName( $target );
- if( !$nu instanceof User || !$nu->getId() ) {
+ if ( !$nu instanceof User || !$nu->getId() ) {
wfDebug( "Target is invalid user.\n" );
+
return 'notarget';
} elseif ( !$nu->isEmailConfirmed() ) {
wfDebug( "User has no valid email.\n" );
+
return 'noemail';
} elseif ( !$nu->canReceiveEmail() ) {
wfDebug( "User does not allow user emails.\n" );
+
return 'nowikiemail';
}
*/
public static function getPermissionsError( $user, $editToken ) {
global $wgEnableEmail, $wgEnableUserEmail;
- if( !$wgEnableEmail || !$wgEnableUserEmail ) {
+
+ if ( !$wgEnableEmail || !$wgEnableUserEmail ) {
return 'usermaildisabled';
}
- if( !$user->isAllowed( 'sendemail' ) ) {
+ if ( !$user->isAllowed( 'sendemail' ) ) {
return 'badaccess';
}
- if( !$user->isEmailConfirmed() ) {
+ if ( !$user->isEmailConfirmed() ) {
return 'mailnologin';
}
- if( $user->isBlockedFromEmailuser() ) {
+ if ( $user->isBlockedFromEmailuser() ) {
wfDebug( "User is blocked from sending e-mail.\n" );
+
return "blockedemailuser";
}
- if( $user->pingLimiter( 'emailuser' ) ) {
+ if ( $user->pingLimiter( 'emailuser' ) ) {
wfDebug( "Ping limiter triggered.\n" );
+
return 'actionthrottledtext';
}
$hookErr = false;
+
wfRunHooks( 'UserCanSendEmail', array( &$user, &$hookErr ) );
wfRunHooks( 'EmailUserPermissionsErrors', array( $user, $editToken, &$hookErr ) );
+
if ( $hookErr ) {
return $hookErr;
}
*/
protected function userForm( $name ) {
global $wgScript;
- $string = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'askusername' ) ) .
+ $string = Xml::openElement(
+ 'form',
+ array( 'method' => 'get', 'action' => $wgScript, 'id' => 'askusername' )
+ ) .
Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
Xml::openElement( 'fieldset' ) .
Html::rawElement( 'legend', null, $this->msg( 'emailtarget' )->parse() ) .
- Xml::inputLabel( $this->msg( 'emailusername' )->text(), 'target', 'emailusertarget', 30, $name ) . ' ' .
+ Xml::inputLabel(
+ $this->msg( 'emailusername' )->text(),
+ 'target',
+ 'emailusertarget',
+ 30,
+ $name
+ ) .
+ ' ' .
Xml::submitButton( $this->msg( 'emailusernamesubmit' )->text() ) .
Xml::closeElement( 'fieldset' ) .
Xml::closeElement( 'form' ) . "\n";
+
return $string;
}
global $wgUserEmailUseReplyTo;
$target = self::getTarget( $data['Target'] );
- if( !$target instanceof User ) {
+ if ( !$target instanceof User ) {
return $context->msg( $target . 'text' )->parseAsBlock();
}
+
$to = new MailAddress( $target );
$from = new MailAddress( $context->getUser() );
$subject = $data['Subject'];
$from->name, $to->name )->inContentLanguage()->text();
$error = '';
- if( !wfRunHooks( 'EmailUser', array( &$to, &$from, &$subject, &$text, &$error ) ) ) {
+ if ( !wfRunHooks( 'EmailUser', array( &$to, &$from, &$subject, &$text, &$error ) ) ) {
return $error;
}
- if( $wgUserEmailUseReplyTo ) {
+ if ( $wgUserEmailUseReplyTo ) {
// Put the generic wiki autogenerated address in the From:
// header and reserve the user for Reply-To.
//
// wiki-borne mails from direct mails and protects against
// SPF and bounce problems with some mailers (see below).
global $wgPasswordSender, $wgPasswordSenderName;
+
$mailFrom = new MailAddress( $wgPasswordSender, $wgPasswordSenderName );
$replyTo = $from;
} else {
$status = UserMailer::send( $to, $mailFrom, $subject, $text, $replyTo );
- if( !$status->isGood() ) {
+ if ( !$status->isGood() ) {
return $status;
} else {
// if the user requested a copy of this mail, do this now,
}
wfRunHooks( 'EmailUserComplete', array( $to, $from, $subject, $text ) );
+
return $status;
}
}
* @ingroup SpecialPage
*/
class SpecialExport extends SpecialPage {
-
private $curonly, $doExport, $pageLinkDepth, $templates;
private $images;
}
}
}
- }
- elseif( $request->getCheck( 'addns' ) && $wgExportFromNamespaces ) {
+ } elseif ( $request->getCheck( 'addns' ) && $wgExportFromNamespaces ) {
$page = $request->getText( 'pages' );
$nsindex = $request->getText( 'nsindex', '' );
$page .= "\n" . implode( "\n", $nspages );
}
}
- }
- elseif( $request->getCheck( 'exportall' ) && $wgExportAllowAll ) {
+ } elseif ( $request->getCheck( 'exportall' ) && $wgExportAllowAll ) {
$this->doExport = true;
$exportall = true;
doExport(...) further down) */
$page = '';
$history = '';
- }
- elseif( $request->wasPosted() && $par == '' ) {
+ } elseif ( $request->wasPosted() && $par == '' ) {
$page = $request->getText( 'pages' );
$this->curonly = $request->getCheck( 'curonly' );
$rawOffset = $request->getVal( 'offset' );
- if( $rawOffset ) {
+ if ( $rawOffset ) {
$offset = wfTimestamp( TS_MW, $rawOffset );
} else {
$offset = null;
if ( $limit > 0 && ( $wgExportMaxHistory == 0 || $limit < $wgExportMaxHistory ) ) {
$history['limit'] = $limit;
}
+
if ( !is_null( $offset ) ) {
$history['offset'] = $offset;
}
+
if ( strtolower( $dir ) == 'desc' ) {
$history['dir'] = 'desc';
}
}
- if( $page != '' ) {
+ if ( $page != '' ) {
$this->doExport = true;
}
} else {
$page = $request->getText( 'pages', $par );
$historyCheck = $request->getCheck( 'history' );
- if( $historyCheck ) {
+ if ( $historyCheck ) {
$history = WikiExporter::FULL;
} else {
$history = WikiExporter::CURRENT;
}
- if( $page != '' ) {
+ if ( $page != '' ) {
$this->doExport = true;
}
}
- if( !$wgExportAllowHistory ) {
+ if ( !$wgExportAllowHistory ) {
// Override
$history = WikiExporter::CURRENT;
}
wfResetOutputBuffers();
$request->response()->header( "Content-type: application/xml; charset=utf-8" );
- if( $request->getCheck( 'wpDownload' ) ) {
+ if ( $request->getCheck( 'wpDownload' ) ) {
// Provide a sane filename suggestion
$filename = urlencode( $wgSitename . '-' . wfTimestampNow() . '.xml' );
$request->response()->header( "Content-disposition: attachment;filename={$filename}" );
$form = Xml::openElement( 'form', array( 'method' => 'post',
'action' => $this->getTitle()->getLocalURL( 'action=submit' ) ) );
- $form .= Xml::inputLabel( $this->msg( 'export-addcattext' )->text(), 'catname', 'catname', 40 ) . ' ';
- $form .= Xml::submitButton( $this->msg( 'export-addcat' )->text(), array( 'name' => 'addcat' ) ) . '<br />';
+ $form .= Xml::inputLabel(
+ $this->msg( 'export-addcattext' )->text(),
+ 'catname',
+ 'catname',
+ 40
+ ) . ' ';
+ $form .= Xml::submitButton(
+ $this->msg( 'export-addcat' )->text(),
+ array( 'name' => 'addcat' )
+ ) . '<br />';
if ( $wgExportFromNamespaces ) {
$form .= Html::namespaceSelector(
'selected' => $nsindex,
'label' => $this->msg( 'export-addnstext' )->text()
), array(
- 'name' => 'nsindex',
- 'id' => 'namespace',
+ 'name' => 'nsindex',
+ 'id' => 'namespace',
'class' => 'namespaceselector',
)
) . ' ';
- $form .= Xml::submitButton( $this->msg( 'export-addns' )->text(), array( 'name' => 'addns' ) ) . '<br />';
+ $form .= Xml::submitButton(
+ $this->msg( 'export-addns' )->text(),
+ array( 'name' => 'addns' )
+ ) . '<br />';
}
if ( $wgExportAllowAll ) {
) . '<br />';
}
- $form .= Xml::element( 'textarea', array( 'name' => 'pages', 'cols' => 40, 'rows' => 10 ), $page, false );
+ $form .= Xml::element(
+ 'textarea',
+ array( 'name' => 'pages', 'cols' => 40, 'rows' => 10 ),
+ $page,
+ false
+ );
$form .= '<br />';
- if( $wgExportAllowHistory ) {
+ if ( $wgExportAllowHistory ) {
$form .= Xml::checkLabel(
$this->msg( 'exportcuronly' )->text(),
'curonly',
$request->wasPosted() ? $request->getCheck( 'templates' ) : false
) . '<br />';
- if( $wgExportMaxLinkDepth || $this->userCanOverrideExportDepth() ) {
- $form .= Xml::inputLabel( $this->msg( 'export-pagelinks' )->text(), 'pagelink-depth', 'pagelink-depth', 20, 0 ) . '<br />';
+ if ( $wgExportMaxLinkDepth || $this->userCanOverrideExportDepth() ) {
+ $form .= Xml::inputLabel(
+ $this->msg( 'export-pagelinks' )->text(),
+ 'pagelink-depth',
+ 'pagelink-depth',
+ 20,
+ 0
+ ) . '<br />';
}
+
// Enable this when we can do something useful exporting/importing image information. :)
//$form .= Xml::checkLabel( $this->msg( 'export-images' )->text(), 'images', 'wpExportImages', false ) . '<br />';
$form .= Xml::checkLabel(
) . '<br />';
}
- $form .= Xml::submitButton( $this->msg( 'export-submit' )->text(), Linker::tooltipAndAccesskeyAttribs( 'export' ) );
+ $form .= Xml::submitButton(
+ $this->msg( 'export-submit' )->text(),
+ Linker::tooltipAndAccesskeyAttribs( 'export' )
+ );
$form .= Xml::closeElement( 'form' );
$out->addHTML( $form );
$pageSet = array(); // Inverted index of all pages to look up
// Split up and normalize input
- foreach( explode( "\n", $page ) as $pageName ) {
+ foreach ( explode( "\n", $page ) as $pageName ) {
$pageName = trim( $pageName );
$title = Title::newFromText( $pageName );
- if( $title && $title->getInterwiki() == '' && $title->getText() !== '' ) {
+ if ( $title && $title->getInterwiki() == '' && $title->getText() !== '' ) {
// Only record each page once!
$pageSet[$title->getPrefixedText()] = true;
}
$inputPages = array_keys( $pageSet );
// Look up any linked pages if asked...
- if( $this->templates ) {
+ if ( $this->templates ) {
$pageSet = $this->getTemplates( $inputPages, $pageSet );
}
$linkDepth = $this->pageLinkDepth;
- if( $linkDepth ) {
+ if ( $linkDepth ) {
$pageSet = $this->getPageLinks( $inputPages, $pageSet, $linkDepth );
}
- /*
- // Enable this when we can do something useful exporting/importing image information. :)
- if( $this->images ) ) {
- $pageSet = $this->getImages( $inputPages, $pageSet );
- }
- */
+ // Enable this when we can do something useful exporting/importing image information.
+ // if( $this->images ) ) {
+ // $pageSet = $this->getImages( $inputPages, $pageSet );
+ // }
$pages = array_keys( $pageSet );
// Normalize titles to the same format and remove dupes, see bug 17374
- foreach( $pages as $k => $v ) {
+ foreach ( $pages as $k => $v ) {
$pages[$k] = str_replace( " ", "_", $v );
}
}
/* Ok, let's get to it... */
- if( $history == WikiExporter::CURRENT ) {
+ if ( $history == WikiExporter::CURRENT ) {
$lb = false;
$db = wfGetDB( DB_SLAVE );
$buffer = WikiExporter::BUFFER;
if ( $exportall ) {
$exporter->allPages();
} else {
- foreach( $pages as $page ) {
- /*
- if( $wgExportMaxHistory && !$this->curonly ) {
- $title = Title::newFromText( $page );
- if( $title ) {
- $count = Revision::countByTitle( $db, $title );
- if( $count > $wgExportMaxHistory ) {
- wfDebug( __FUNCTION__ .
- ": Skipped $page, $count revisions too big\n" );
- continue;
- }
- }
- }*/
- #Bug 8824: Only export pages the user can read
+ foreach ( $pages as $page ) {
+ #Bug 8824: Only export pages the user can read
$title = Title::newFromText( $page );
- if( is_null( $title ) ) {
- continue; #TODO: perhaps output an <error> tag or something.
+ if ( is_null( $title ) ) {
+ // @todo Perhaps output an <error> tag or something.
+ continue;
}
- if( !$title->userCan( 'read', $this->getUser() ) ) {
- continue; #TODO: perhaps output an <error> tag or something.
+
+ if ( !$title->userCan( 'read', $this->getUser() ) ) {
+ // @todo Perhaps output an <error> tag or something.
+ continue;
}
$exporter->pageByTitle( $title );
$exporter->closeStream();
- if( $lb ) {
+ if ( $lb ) {
$lb->closeAll();
}
}
$pages[] = $n;
}
+
return $pages;
}
$pages[] = $n;
}
+
return $pages;
}
private function validateLinkDepth( $depth ) {
global $wgExportMaxLinkDepth;
- if( $depth < 0 ) {
+ if ( $depth < 0 ) {
return 0;
}
if ( !$this->userCanOverrideExportDepth() ) {
- if( $depth > $wgExportMaxLinkDepth ) {
+ if ( $depth > $wgExportMaxLinkDepth ) {
return $wgExportMaxLinkDepth;
}
}
* crazy-big export from being done by someone setting the depth
* number too high. In other words, last resort safety net.
*/
+
return intval( min( $depth, 5 ) );
}
* @return array
*/
private function getPageLinks( $inputPages, $pageSet, $depth ) {
- for( ; $depth > 0; --$depth ) {
+ for ( ; $depth > 0; --$depth ) {
$pageSet = $this->getLinks(
$inputPages, $pageSet, 'pagelinks',
array( 'namespace' => 'pl_namespace', 'title' => 'pl_title' ),
private function getLinks( $inputPages, $pageSet, $table, $fields, $join ) {
$dbr = wfGetDB( DB_SLAVE );
- foreach( $inputPages as $page ) {
+ foreach ( $inputPages as $page ) {
$title = Title::newFromText( $page );
- if( $title ) {
+ if ( $title ) {
$pageSet[$title->getPrefixedText()] = true;
/// @todo FIXME: May or may not be more efficient to batch these
/// by namespace when given multiple input pages.
__METHOD__
);
- foreach( $result as $row ) {
+ foreach ( $result as $row ) {
$template = Title::makeTitle( $row->namespace, $row->title );
$pageSet[$template->getPrefixedText()] = true;
}
* @author Martin Drashkov
*/
class FewestrevisionsPage extends QueryPage {
-
function __construct( $name = 'Fewestrevisions' ) {
parent::__construct( $name );
}
function getQueryInfo() {
return array(
'tables' => array( 'revision', 'page' ),
- 'fields' => array( 'namespace' => 'page_namespace',
- 'title' => 'page_title',
- 'value' => 'COUNT(*)',
- 'redirect' => 'page_is_redirect' ),
- 'conds' => array( 'page_namespace' => MWNamespace::getContentNamespaces(),
- 'page_id = rev_page' ),
- 'options' => array( 'HAVING' => 'COUNT(*) > 1',
- // ^^^ This was probably here to weed out redirects.
- // Since we mark them as such now, it might be
- // useful to remove this. People _do_ create pages
- // and never revise them, they aren't necessarily
- // redirects.
- 'GROUP BY' => array( 'page_namespace', 'page_title', 'page_is_redirect' ) )
+ 'fields' => array(
+ 'namespace' => 'page_namespace',
+ 'title' => 'page_title',
+ 'value' => 'COUNT(*)',
+ 'redirect' => 'page_is_redirect'
+ ),
+ 'conds' => array(
+ 'page_namespace' => MWNamespace::getContentNamespaces(),
+ 'page_id = rev_page' ),
+ 'options' => array(
+ 'HAVING' => 'COUNT(*) > 1',
+ // ^^^ This was probably here to weed out redirects.
+ // Since we mark them as such now, it might be
+ // useful to remove this. People _do_ create pages
+ // and never revise them, they aren't necessarily
+ // redirects.
+ 'GROUP BY' => array( 'page_namespace', 'page_title', 'page_is_redirect' )
+ )
);
}
global $wgContLang;
$nt = Title::makeTitleSafe( $result->namespace, $result->title );
- if( !$nt ) {
- return Html::element( 'span', array( 'class' => 'mw-invalidtitle' ),
- Linker::getInvalidTitleDescription( $this->getContext(), $result->namespace, $result->title ) );
+ if ( !$nt ) {
+ return Html::element(
+ 'span',
+ array( 'class' => 'mw-invalidtitle' ),
+ Linker::getInvalidTitleDescription(
+ $this->getContext(),
+ $result->namespace,
+ $result->title
+ )
+ );
}
$text = htmlspecialchars( $wgContLang->convert( $nt->getPrefixedText() ) );
$this->setHeaders();
$this->outputHeader();
- $this->filename = isset( $par ) ? $par : $this->getRequest()->getText( 'filename' );
+ $this->filename = isset( $par ) ? $par : $this->getRequest()->getText( 'filename' );
$this->file = null;
$this->hash = '';
$title = Title::newFromText( $this->filename, NS_FILE );
- if( $title && $title->getText() != '' ) {
+ if ( $title && $title->getText() != '' ) {
$this->file = wfFindFile( $title );
}
# Create the input form
$out->addHTML(
- Html::openElement( 'form', array( 'id' => 'fileduplicatesearch', 'method' => 'get', 'action' => $wgScript ) ) . "\n" .
- Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) . "\n" .
- Html::openElement( 'fieldset' ) . "\n" .
- Html::element( 'legend', null, $this->msg( 'fileduplicatesearch-legend' )->text() ) . "\n" .
- Xml::inputLabel( $this->msg( 'fileduplicatesearch-filename' )->text(), 'filename', 'filename', 50, $this->filename ) . "\n" .
- Xml::submitButton( $this->msg( 'fileduplicatesearch-submit' )->text() ) . "\n" .
- Html::closeElement( 'fieldset' ) . "\n" .
- Html::closeElement( 'form' )
+ Html::openElement(
+ 'form',
+ array( 'id' => 'fileduplicatesearch', 'method' => 'get', 'action' => $wgScript )
+ ) . "\n" .
+ Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) . "\n" .
+ Html::openElement( 'fieldset' ) . "\n" .
+ Html::element( 'legend', null, $this->msg( 'fileduplicatesearch-legend' )->text() ) . "\n" .
+ Xml::inputLabel(
+ $this->msg( 'fileduplicatesearch-filename' )->text(),
+ 'filename',
+ 'filename',
+ 50,
+ $this->filename
+ ) . "\n" .
+ Xml::submitButton( $this->msg( 'fileduplicatesearch-submit' )->text() ) . "\n" .
+ Html::closeElement( 'fieldset' ) . "\n" .
+ Html::closeElement( 'form' )
);
- if( $this->file ) {
+ if ( $this->file ) {
$this->hash = $this->file->getSha1();
- } elseif( $this->filename !== '' ) {
+ } elseif ( $this->filename !== '' ) {
$out->wrapWikiMsg(
"<p class='mw-fileduplicatesearch-noresults'>\n$1\n</p>",
array( 'fileduplicatesearch-noresults', wfEscapeWikiText( $this->filename ) )
);
}
- if( $this->hash != '' ) {
+ if ( $this->hash != '' ) {
# Show a thumbnail of the file
$img = $this->file;
if ( $img ) {
$thumb = $img->transform( array( 'width' => 120, 'height' => 120 ) );
- if( $thumb ) {
+ if ( $thumb ) {
$out->addHTML( '<div id="mw-fileduplicatesearch-icon">' .
$thumb->toHtml( array( 'desc-link' => false ) ) . '<br />' .
$this->msg( 'fileduplicatesearch-info' )->numParams(
$img->getWidth(), $img->getHeight() )->params(
- $this->getLanguage()->formatSize( $img->getSize() ),
- $img->getMimeType() )->parseAsBlock() .
+ $this->getLanguage()->formatSize( $img->getSize() ),
+ $img->getMimeType() )->parseAsBlock() .
'</div>' );
}
}
$numRows = count( $dupes );
# Show a short summary
- if( $numRows == 1 ) {
+ if ( $numRows == 1 ) {
$out->wrapWikiMsg(
"<p class='mw-fileduplicatesearch-result-1'>\n$1\n</p>",
array( 'fileduplicatesearch-result-1', wfEscapeWikiText( $this->filename ) )
function doBatchLookups( $list ) {
$batch = new LinkBatch();
- foreach( $list as $file ) {
+ /** @var File $file */
+ foreach ( $list as $file ) {
$batch->addObj( $file->getTitle() );
- if( $file->isLocal() ) {
+ if ( $file->isLocal() ) {
$userName = $file->getUser( 'text' );
$batch->add( NS_USER, $userName );
$batch->add( NS_USER_TALK, $userName );
}
}
+
$batch->execute();
}
* @ingroup SpecialPage
*/
class SpecialFilepath extends SpecialPage {
-
function __construct() {
parent::__construct( 'Filepath' );
}
$this->outputHeader();
$request = $this->getRequest();
- $file = !is_null( $par ) ? $par : $request->getText( 'file' );
+ $file = $par ?: $request->getText( 'file' );
$title = Title::newFromText( $file, NS_FILE );
- if ( ! $title instanceof Title || $title->getNamespace() != NS_FILE ) {
+ if ( !( $title instanceof Title ) || $title->getNamespace() != NS_FILE ) {
$this->showForm( $title );
} else {
$file = wfFindFile( $title );
// If a width is requested...
if ( $width != -1 ) {
$mto = $file->transform( array( 'width' => $width, 'height' => $height ) );
+
// ... and we can
if ( $mto && !$mto->isError() ) {
// ... change the URL to point to a thumbnail.
}
/**
- * @param $title Title
+ * @param Title $title Title requested, or null.
*/
function showForm( $title ) {
global $wgScript;
$this->getOutput()->addHTML(
- Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'specialfilepath' ) ) .
- Html::openElement( 'fieldset' ) .
- Html::element( 'legend', null, $this->msg( 'filepath' )->text() ) .
- Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
- Xml::inputLabel( $this->msg( 'filepath-page' )->text(), 'file', 'file', 25, is_object( $title ) ? $title->getText() : '' ) . ' ' .
- Xml::submitButton( $this->msg( 'filepath-submit' )->text() ) . "\n" .
- Html::closeElement( 'fieldset' ) .
- Html::closeElement( 'form' )
+ Html::openElement(
+ 'form',
+ array( 'method' => 'get', 'action' => $wgScript, 'id' => 'specialfilepath' )
+ ) .
+ Html::openElement( 'fieldset' ) .
+ Html::element( 'legend', null, $this->msg( 'filepath' )->text() ) .
+ Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
+ Xml::inputLabel(
+ $this->msg( 'filepath-page' )->text(),
+ 'file',
+ 'file',
+ 25,
+ is_object( $title ) ? $title->getText() : ''
+ ) . ' ' .
+ Xml::submitButton( $this->msg( 'filepath-submit' )->text() ) . "\n" .
+ Html::closeElement( 'fieldset' ) .
+ Html::closeElement( 'form' )
);
}
* @ingroup SpecialPage
*/
class SpecialImport extends SpecialPage {
-
private $interwiki = false;
private $namespace;
private $rootpage = '';
$source = Status::newFatal( 'import-token-mismatch' );
} elseif ( $sourceName == 'upload' ) {
$isUpload = true;
- if( $user->isAllowed( 'importupload' ) ) {
+ if ( $user->isAllowed( 'importupload' ) ) {
$source = ImportStreamSource::newFromUpload( "xmlimport" );
} else {
throw new PermissionsError( 'importupload' );
}
} elseif ( $sourceName == "interwiki" ) {
- if( !$user->isAllowed( 'import' ) ) {
+ if ( !$user->isAllowed( 'import' ) ) {
throw new PermissionsError( 'import' );
}
$this->interwiki = $request->getVal( 'interwiki' );
}
$out = $this->getOutput();
- if( !$source->isGood() ) {
- $out->wrapWikiMsg( "<p class=\"error\">\n$1\n</p>", array( 'importfailed', $source->getWikiText() ) );
+ if ( !$source->isGood() ) {
+ $out->wrapWikiMsg(
+ "<p class=\"error\">\n$1\n</p>",
+ array( 'importfailed', $source->getWikiText() )
+ );
} else {
$importer = new WikiImporter( $source->value );
- if( !is_null( $this->namespace ) ) {
+ if ( !is_null( $this->namespace ) ) {
$importer->setTargetNamespace( $this->namespace );
}
- if( !is_null( $this->rootpage ) ) {
+ if ( !is_null( $this->rootpage ) ) {
$statusRootPage = $importer->setTargetRootPage( $this->rootpage );
- if( !$statusRootPage->isGood() ) {
- $out->wrapWikiMsg( "<p class=\"error\">\n$1\n</p>", array( 'import-options-wrong', $statusRootPage->getWikiText(), count( $statusRootPage->getErrorsArray() ) ) );
+ if ( !$statusRootPage->isGood() ) {
+ $out->wrapWikiMsg(
+ "<p class=\"error\">\n$1\n</p>",
+ array(
+ 'import-options-wrong',
+ $statusRootPage->getWikiText(),
+ count( $statusRootPage->getErrorsArray() )
+ )
+ );
+
return;
}
}
$out->addWikiMsg( "importstart" );
- $reporter = new ImportReporter( $importer, $isUpload, $this->interwiki, $this->logcomment );
+ $reporter = new ImportReporter(
+ $importer,
+ $isUpload,
+ $this->interwiki,
+ $this->logcomment
+ );
$reporter->setContext( $this->getContext() );
$exception = false;
if ( $exception ) {
# No source or XML parse error
- $out->wrapWikiMsg( "<p class=\"error\">\n$1\n</p>", array( 'importfailed', $exception->getMessage() ) );
- } elseif( !$result->isGood() ) {
+ $out->wrapWikiMsg(
+ "<p class=\"error\">\n$1\n</p>",
+ array( 'importfailed', $exception->getMessage() )
+ );
+ } elseif ( !$result->isGood() ) {
# Zero revisions
- $out->wrapWikiMsg( "<p class=\"error\">\n$1\n</p>", array( 'importfailed', $result->getWikiText() ) );
+ $out->wrapWikiMsg(
+ "<p class=\"error\">\n$1\n</p>",
+ array( 'importfailed', $result->getWikiText() )
+ );
} else {
# Success!
$out->addWikiMsg( 'importsuccess' );
$user = $this->getUser();
$out = $this->getOutput();
- if( $user->isAllowed( 'importupload' ) ) {
+ if ( $user->isAllowed( 'importupload' ) ) {
$out->addHTML(
Xml::fieldset( $this->msg( 'import-upload' )->text() ) .
- Xml::openElement( 'form', array( 'enctype' => 'multipart/form-data', 'method' => 'post',
- 'action' => $action, 'id' => 'mw-import-upload-form' ) ) .
- $this->msg( 'importtext' )->parseAsBlock() .
- Html::hidden( 'action', 'submit' ) .
- Html::hidden( 'source', 'upload' ) .
- Xml::openElement( 'table', array( 'id' => 'mw-import-table-upload' ) ) .
-
- "<tr>
+ Xml::openElement(
+ 'form',
+ array(
+ 'enctype' => 'multipart/form-data',
+ 'method' => 'post',
+ 'action' => $action,
+ 'id' => 'mw-import-upload-form'
+ )
+ ) .
+ $this->msg( 'importtext' )->parseAsBlock() .
+ Html::hidden( 'action', 'submit' ) .
+ Html::hidden( 'source', 'upload' ) .
+ Xml::openElement( 'table', array( 'id' => 'mw-import-table-upload' ) ) .
+ "<tr>
<td class='mw-label'>" .
- Xml::label( $this->msg( 'import-upload-filename' )->text(), 'xmlimport' ) .
+ Xml::label( $this->msg( 'import-upload-filename' )->text(), 'xmlimport' ) .
"</td>
<td class='mw-input'>" .
- Html::input( 'xmlimport', '', 'file', array( 'id' => 'xmlimport' ) ) . ' ' .
+ Html::input( 'xmlimport', '', 'file', array( 'id' => 'xmlimport' ) ) . ' ' .
"</td>
</tr>
<tr>
<td class='mw-label'>" .
- Xml::label( $this->msg( 'import-comment' )->text(), 'mw-import-comment' ) .
+ Xml::label( $this->msg( 'import-comment' )->text(), 'mw-import-comment' ) .
"</td>
<td class='mw-input'>" .
- Xml::input( 'log-comment', 50, '',
- array( 'id' => 'mw-import-comment', 'type' => 'text' ) ) . ' ' .
+ Xml::input( 'log-comment', 50, '',
+ array( 'id' => 'mw-import-comment', 'type' => 'text' ) ) . ' ' .
"</td>
</tr>
<tr>
<td class='mw-label'>" .
- Xml::label( $this->msg( 'import-interwiki-rootpage' )->text(), 'mw-interwiki-rootpage-upload' ) .
+ Xml::label( $this->msg( 'import-interwiki-rootpage' )->text(), 'mw-interwiki-rootpage-upload' ) .
"</td>
<td class='mw-input'>" .
- Xml::input( 'rootpage', 50, $this->rootpage,
- array( 'id' => 'mw-interwiki-rootpage-upload', 'type' => 'text' ) ) . ' ' .
+ Xml::input( 'rootpage', 50, $this->rootpage,
+ array( 'id' => 'mw-interwiki-rootpage-upload', 'type' => 'text' ) ) . ' ' .
"</td>
</tr>
<tr>
<td></td>
<td class='mw-submit'>" .
- Xml::submitButton( $this->msg( 'uploadbtn' )->text() ) .
+ Xml::submitButton( $this->msg( 'uploadbtn' )->text() ) .
"</td>
</tr>" .
- Xml::closeElement( 'table' ) .
- Html::hidden( 'editToken', $user->getEditToken() ) .
- Xml::closeElement( 'form' ) .
- Xml::closeElement( 'fieldset' )
+ Xml::closeElement( 'table' ) .
+ Html::hidden( 'editToken', $user->getEditToken() ) .
+ Xml::closeElement( 'form' ) .
+ Xml::closeElement( 'fieldset' )
);
} else {
- if( empty( $wgImportSources ) ) {
+ if ( empty( $wgImportSources ) ) {
$out->addWikiMsg( 'importnosources' );
}
}
- if( $user->isAllowed( 'import' ) && !empty( $wgImportSources ) ) {
+ if ( $user->isAllowed( 'import' ) && !empty( $wgImportSources ) ) {
# Show input field for import depth only if $wgExportMaxLinkDepth > 0
$importDepth = '';
- if( $wgExportMaxLinkDepth > 0 ) {
+ if ( $wgExportMaxLinkDepth > 0 ) {
$importDepth = "<tr>
<td class='mw-label'>" .
- $this->msg( 'export-pagelinks' )->parse() .
- "</td>
+ $this->msg( 'export-pagelinks' )->parse() .
+ "</td>
<td class='mw-input'>" .
- Xml::input( 'pagelink-depth', 3, 0 ) .
- "</td>
- </tr>";
+ Xml::input( 'pagelink-depth', 3, 0 ) .
+ "</td>
+ </tr>";
}
$out->addHTML(
Xml::fieldset( $this->msg( 'importinterwiki' )->text() ) .
- Xml::openElement( 'form', array( 'method' => 'post', 'action' => $action, 'id' => 'mw-import-interwiki-form' ) ) .
- $this->msg( 'import-interwiki-text' )->parseAsBlock() .
- Html::hidden( 'action', 'submit' ) .
- Html::hidden( 'source', 'interwiki' ) .
- Html::hidden( 'editToken', $user->getEditToken() ) .
- Xml::openElement( 'table', array( 'id' => 'mw-import-table-interwiki' ) ) .
- "<tr>
+ Xml::openElement(
+ 'form',
+ array(
+ 'method' => 'post',
+ 'action' => $action,
+ 'id' => 'mw-import-interwiki-form'
+ )
+ ) .
+ $this->msg( 'import-interwiki-text' )->parseAsBlock() .
+ Html::hidden( 'action', 'submit' ) .
+ Html::hidden( 'source', 'interwiki' ) .
+ Html::hidden( 'editToken', $user->getEditToken() ) .
+ Xml::openElement( 'table', array( 'id' => 'mw-import-table-interwiki' ) ) .
+ "<tr>
<td class='mw-label'>" .
- Xml::label( $this->msg( 'import-interwiki-source' )->text(), 'interwiki' ) .
+ Xml::label( $this->msg( 'import-interwiki-source' )->text(), 'interwiki' ) .
"</td>
<td class='mw-input'>" .
- Xml::openElement( 'select', array( 'name' => 'interwiki', 'id' => 'interwiki' ) )
+ Xml::openElement(
+ 'select',
+ array( 'name' => 'interwiki', 'id' => 'interwiki' )
+ )
);
- foreach( $wgImportSources as $prefix ) {
+
+ foreach ( $wgImportSources as $prefix ) {
$selected = ( $this->interwiki === $prefix ) ? ' selected="selected"' : '';
$out->addHTML( Xml::option( $prefix, $prefix, $selected ) );
}
$out->addHTML(
- Xml::closeElement( 'select' ) .
- Xml::input( 'frompage', 50, $this->frompage, array( 'id' => 'frompage' ) ) .
+ Xml::closeElement( 'select' ) .
+ Xml::input( 'frompage', 50, $this->frompage, array( 'id' => 'frompage' ) ) .
"</td>
</tr>
<tr>
<td>
</td>
<td class='mw-input'>" .
- Xml::checkLabel( $this->msg( 'import-interwiki-history' )->text(), 'interwikiHistory', 'interwikiHistory', $this->history ) .
+ Xml::checkLabel(
+ $this->msg( 'import-interwiki-history' )->text(),
+ 'interwikiHistory',
+ 'interwikiHistory',
+ $this->history
+ ) .
"</td>
</tr>
<tr>
<td>
</td>
<td class='mw-input'>" .
- Xml::checkLabel( $this->msg( 'import-interwiki-templates' )->text(), 'interwikiTemplates', 'interwikiTemplates', $this->includeTemplates ) .
+ Xml::checkLabel(
+ $this->msg( 'import-interwiki-templates' )->text(),
+ 'interwikiTemplates',
+ 'interwikiTemplates',
+ $this->includeTemplates
+ ) .
"</td>
</tr>
$importDepth
<tr>
<td class='mw-label'>" .
- Xml::label( $this->msg( 'import-interwiki-namespace' )->text(), 'namespace' ) .
+ Xml::label( $this->msg( 'import-interwiki-namespace' )->text(), 'namespace' ) .
"</td>
<td class='mw-input'>" .
- Html::namespaceSelector(
- array(
- 'selected' => $this->namespace,
- 'all' => '',
- ), array(
- 'name' => 'namespace',
- 'id' => 'namespace',
- 'class' => 'namespaceselector',
- )
- ) .
+ Html::namespaceSelector(
+ array(
+ 'selected' => $this->namespace,
+ 'all' => '',
+ ), array(
+ 'name' => 'namespace',
+ 'id' => 'namespace',
+ 'class' => 'namespaceselector',
+ )
+ ) .
"</td>
</tr>
<tr>
<td class='mw-label'>" .
- Xml::label( $this->msg( 'import-comment' )->text(), 'mw-interwiki-comment' ) .
+ Xml::label( $this->msg( 'import-comment' )->text(), 'mw-interwiki-comment' ) .
"</td>
<td class='mw-input'>" .
- Xml::input( 'log-comment', 50, '',
- array( 'id' => 'mw-interwiki-comment', 'type' => 'text' ) ) . ' ' .
+ Xml::input( 'log-comment', 50, '',
+ array( 'id' => 'mw-interwiki-comment', 'type' => 'text' ) ) . ' ' .
"</td>
</tr>
<tr>
<td class='mw-label'>" .
- Xml::label( $this->msg( 'import-interwiki-rootpage' )->text(), 'mw-interwiki-rootpage-interwiki' ) .
+ Xml::label(
+ $this->msg( 'import-interwiki-rootpage' )->text(),
+ 'mw-interwiki-rootpage-interwiki'
+ ) .
"</td>
<td class='mw-input'>" .
- Xml::input( 'rootpage', 50, $this->rootpage,
- array( 'id' => 'mw-interwiki-rootpage-interwiki', 'type' => 'text' ) ) . ' ' .
+ Xml::input( 'rootpage', 50, $this->rootpage,
+ array( 'id' => 'mw-interwiki-rootpage-interwiki', 'type' => 'text' ) ) . ' ' .
"</td>
</tr>
<tr>
<td>
</td>
<td class='mw-submit'>" .
- Xml::submitButton( $this->msg( 'import-interwiki-submit' )->text(), Linker::tooltipAndAccesskeyAttribs( 'import' ) ) .
+ Xml::submitButton(
+ $this->msg( 'import-interwiki-submit' )->text(),
+ Linker::tooltipAndAccesskeyAttribs( 'import' )
+ ) .
"</td>
</tr>" .
- Xml::closeElement( 'table' ) .
- Xml::closeElement( 'form' ) .
- Xml::closeElement( 'fieldset' )
+ Xml::closeElement( 'table' ) .
+ Xml::closeElement( 'form' ) .
+ Xml::closeElement( 'fieldset' )
);
}
}
private $mOriginalPageOutCallback = null;
private $mLogItemCount = 0;
+
+ /**
+ * @param WikiImporter $importer
+ * @param $upload
+ * @param $interwiki
+ * @param string|bool $reason
+ */
function __construct( $importer, $upload, $interwiki, $reason = false ) {
$this->mOriginalPageOutCallback =
- $importer->setPageOutCallback( array( $this, 'reportPage' ) );
+ $importer->setPageOutCallback( array( $this, 'reportPage' ) );
$this->mOriginalLogCallback =
$importer->setLogItemCallback( array( $this, 'reportLogItem' ) );
$importer->setNoticeCallback( array( $this, 'reportNotice' ) );
$this->mPageCount++;
- if( $successCount > 0 ) {
- $this->getOutput()->addHTML( "<li>" . Linker::linkKnown( $title ) . " " .
- $this->msg( 'import-revision-count' )->numParams( $successCount )->escaped() .
- "</li>\n"
+ if ( $successCount > 0 ) {
+ $this->getOutput()->addHTML(
+ "<li>" . Linker::linkKnown( $title ) . " " .
+ $this->msg( 'import-revision-count' )->numParams( $successCount )->escaped() .
+ "</li>\n"
);
$log = new LogPage( 'import' );
- if( $this->mIsUpload ) {
+ if ( $this->mIsUpload ) {
$detail = $this->msg( 'import-logentry-upload-detail' )->numParams(
$successCount )->inContentLanguage()->text();
if ( $this->reason ) {
if ( $this->mLogItemCount > 0 ) {
$msg = $this->msg( 'imported-log-entries' )->numParams( $this->mLogItemCount )->parse();
$out->addHTML( Xml::tags( 'li', null, $msg ) );
- } elseif( $this->mPageCount == 0 && $this->mLogItemCount == 0 ) {
+ } elseif ( $this->mPageCount == 0 && $this->mLogItemCount == 0 ) {
$out->addHTML( "</ul>\n" );
+
return Status::newFatal( 'importnopages' );
}
$out->addHTML( "</ul>\n" );
*/
private function getFrameworkListHtml() {
$list = '<ul>';
- foreach( self::$frameworks as $framework => $initFn ) {
+ foreach ( self::$frameworks as $framework => $initFn ) {
$list .= Html::rawElement(
'li',
array(),
*/
private function wrapSummaryHtml( $html, $state ) {
$validStates = array( 'noframework', 'unknownframework', 'frameworkfound' );
- if( !in_array( $state, $validStates ) ) {
+ if ( !in_array( $state, $validStates ) ) {
throw new MWException( __METHOD__
. ' given an invalid state. Must be one of "'
. join( '", "', $validStates ) . '".'
$namespace = $request->getIntorNull( 'namespace', null );
$protocols_list = array();
- foreach( $wgUrlProtocols as $prot ) {
+ foreach ( $wgUrlProtocols as $prot ) {
if ( $prot !== '//' ) {
$protocols_list[] = $prot;
}
Html::closeElement( 'form' ) . "\n";
$out->addHTML( $s );
- if( $target != '' ) {
+ if ( $target != '' ) {
$this->setParams( array(
'query' => $target2,
'namespace' => $namespace,
'protocol' => $protocol ) );
parent::execute( $par );
- if( $this->mMungedQuery === false )
+ if ( $this->mMungedQuery === false ) {
$out->addWikiMsg( 'linksearch-error' );
+ }
}
}
global $wgMiserMode;
$params = array();
$params['target'] = $this->mProt . $this->mQuery;
- if( isset( $this->mNs ) && !$wgMiserMode ) {
+ if ( isset( $this->mNs ) && !$wgMiserMode ) {
$params['namespace'] = $this->mNs;
}
return $params;
// index-based-only lookup would be done
list( $this->mMungedQuery, $clause ) = self::mungeQuery(
$this->mQuery, $this->mProt );
- if( $this->mMungedQuery === false )
+ if ( $this->mMungedQuery === false ) {
// Invalid query; return no results
return array( 'tables' => 'page', 'fields' => 'page_id', 'conds' => '0=1' );
+ }
$stripped = LinkFilter::keepOneWildcard( $this->mMungedQuery );
$like = $dbr->buildLike( $stripped );
*/
function doQuery( $offset = false, $limit = false ) {
list( $this->mMungedQuery, ) = LinkSearchPage::mungeQuery( $this->mQuery, $this->mProt );
- if( $this->mMungedQuery === false ) {
+ if ( $this->mMungedQuery === false ) {
$this->getOutput()->addWikiMsg( 'linksearch-error' );
} else {
// For debugging
'img_user_text' => $this->msg( 'listfiles_user' )->text(),
'img_description' => $this->msg( 'listfiles_description' )->text(),
);
- if( !$wgMiserMode ) {
+ if ( !$wgMiserMode ) {
$this->mFieldNames['count'] = $this->msg( 'listfiles_count' )->text();
}
}
$options = $join_conds = array();
# Depends on $wgMiserMode
- if( isset( $this->mFieldNames['count'] ) ) {
+ if ( isset( $this->mFieldNames['count'] ) ) {
$tables[] = 'oldimage';
# Need to rewrite this one
unset( $field );
$dbr = wfGetDB( DB_SLAVE );
- if( $dbr->implicitGroupby() ) {
+ if ( $dbr->implicitGroupby() ) {
$options = array( 'GROUP BY' => 'img_name' );
} else {
$columnlist = preg_grep( '/^img/', array_keys( $this->getFieldNames() ) );
$join_conds = array( 'oldimage' => array( 'LEFT JOIN', 'oi_name = img_name' ) );
}
return array(
- 'tables' => $tables,
- 'fields' => $fields,
- 'conds' => $this->mQueryConds,
- 'options' => $options,
+ 'tables' => $tables,
+ 'fields' => $fields,
+ 'conds' => $this->mQueryConds,
+ 'options' => $options,
'join_conds' => $join_conds
);
}
return htmlspecialchars( $this->getLanguage()->userTimeAndDate( $value, $this->getUser() ) );
case 'img_name':
static $imgfile = null;
- if ( $imgfile === null ) $imgfile = $this->msg( 'imgfile' )->text();
+ if ( $imgfile === null ) {
+ $imgfile = $this->msg( 'imgfile' )->text();
+ }
// Weird files can maybe exist? Bug 22227
$filePage = Title::makeTitleSafe( NS_FILE, $value );
- if( $filePage ) {
+ if ( $filePage ) {
$link = Linker::linkKnown( $filePage, htmlspecialchars( $filePage->getText() ) );
$download = Xml::element( 'a',
array( 'href' => wfLocalFile( $filePage )->getURL() ),
if ( !$wgMiserMode ) {
$inputForm['listfiles_search_for'] = Html::input( 'ilsearch', $this->mSearch, 'text',
array(
- 'size' => '40',
+ 'size' => '40',
'maxlength' => '255',
- 'id' => 'mw-ilsearch',
+ 'id' => 'mw-ilsearch',
) );
}
$inputForm['username'] = Html::input( 'user', $this->mUserName, 'text', array(
- 'size' => '40',
+ 'size' => '40',
'maxlength' => '255',
- 'id' => 'mw-listfiles-user',
+ 'id' => 'mw-listfiles-user',
) );
return Html::openElement( 'form',
array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listfiles-form' ) ) .
$msg->text() :
MWNamespace::getCanonicalName( NS_PROJECT ) . ':' . $groupname;
- if( $group == '*' ) {
+ if ( $group == '*' ) {
// Do not make a link for the generic * group
$grouppage = htmlspecialchars( $groupnameLocalized );
} else {
*/
private function formatPermissions( $permissions, $revoke, $add, $remove, $addSelf, $removeSelf ) {
$r = array();
- foreach( $permissions as $permission => $granted ) {
+ foreach ( $permissions as $permission => $granted ) {
//show as granted only if it isn't revoked to prevent duplicate display of permissions
- if( $granted && ( !isset( $revoke[$permission] ) || !$revoke[$permission] ) ) {
+ if ( $granted && ( !isset( $revoke[$permission] ) || !$revoke[$permission] ) ) {
$description = $this->msg( 'listgrouprights-right-display',
User::getRightDescription( $permission ),
'<span class="mw-listgrouprights-right-name">' . $permission . '</span>'
$r[] = $description;
}
}
- foreach( $revoke as $permission => $revoked ) {
- if( $revoked ) {
+ foreach ( $revoke as $permission => $revoked ) {
+ if ( $revoked ) {
$description = $this->msg( 'listgrouprights-right-revoked',
User::getRightDescription( $permission ),
'<span class="mw-listgrouprights-right-name">' . $permission . '</span>'
}
sort( $r );
$lang = $this->getLanguage();
- if( $add === true ) {
+ if ( $add === true ) {
$r[] = $this->msg( 'listgrouprights-addgroup-all' )->escaped();
- } elseif( is_array( $add ) && count( $add ) ) {
+ } elseif ( is_array( $add ) && count( $add ) ) {
$add = array_values( array_unique( $add ) );
$r[] = $this->msg( 'listgrouprights-addgroup',
$lang->listToText( array_map( array( 'User', 'makeGroupLinkWiki' ), $add ) ),
count( $add )
)->parse();
}
- if( $remove === true ) {
+ if ( $remove === true ) {
$r[] = $this->msg( 'listgrouprights-removegroup-all' )->escaped();
- } elseif( is_array( $remove ) && count( $remove ) ) {
+ } elseif ( is_array( $remove ) && count( $remove ) ) {
$remove = array_values( array_unique( $remove ) );
$r[] = $this->msg( 'listgrouprights-removegroup',
$lang->listToText( array_map( array( 'User', 'makeGroupLinkWiki' ), $remove ) ),
count( $remove )
)->parse();
}
- if( $addSelf === true ) {
+ if ( $addSelf === true ) {
$r[] = $this->msg( 'listgrouprights-addgroup-self-all' )->escaped();
- } elseif( is_array( $addSelf ) && count( $addSelf ) ) {
+ } elseif ( is_array( $addSelf ) && count( $addSelf ) ) {
$addSelf = array_values( array_unique( $addSelf ) );
$r[] = $this->msg( 'listgrouprights-addgroup-self',
$lang->listToText( array_map( array( 'User', 'makeGroupLinkWiki' ), $addSelf ) ),
count( $addSelf )
)->parse();
}
- if( $removeSelf === true ) {
+ if ( $removeSelf === true ) {
$r[] = $this->msg( 'listgrouprights-removegroup-self-all' )->parse();
- } elseif( is_array( $removeSelf ) && count( $removeSelf ) ) {
+ } elseif ( is_array( $removeSelf ) && count( $removeSelf ) ) {
$removeSelf = array_values( array_unique( $removeSelf ) );
$r[] = $this->msg( 'listgrouprights-removegroup-self',
$lang->listToText( array_map( array( 'User', 'makeGroupLinkWiki' ), $removeSelf ) ),
count( $removeSelf )
)->parse();
}
- if( empty( $r ) ) {
+ if ( empty( $r ) ) {
return '';
} else {
return '<ul><li>' . implode( "</li>\n<li>", $r ) . '</li></ul>';
# Find out where the redirect leads
$target = $this->getRedirectTarget( $result );
- if( $target ) {
+ if ( $target ) {
# Make a link to the destination page
$lang = $this->getLanguage();
$arr = $lang->getArrow() . $lang->getDirMark();
$this->requestedUser = '';
if ( $un != '' ) {
$username = Title::makeTitleSafe( NS_USER, $un );
- if( ! is_null( $username ) ) {
+ if ( ! is_null( $username ) ) {
$this->requestedUser = $username->getText();
}
}
$dbr = wfGetDB( DB_SLAVE );
$conds = array();
// Don't show hidden names
- if( !$this->getUser()->isAllowed( 'hideuser' ) ) {
+ if ( !$this->getUser()->isAllowed( 'hideuser' ) ) {
$conds[] = 'ipb_deleted IS NULL OR ipb_deleted = 0';
}
$options = array();
- if( $this->requestedGroup != '' ) {
+ if ( $this->requestedGroup != '' ) {
$conds['ug_group'] = $this->requestedGroup;
} else {
//$options['USE INDEX'] = $this->creationSort ? 'PRIMARY' : 'user_name';
}
- if( $this->requestedUser != '' ) {
+ if ( $this->requestedUser != '' ) {
# Sorted either by account creation or name
- if( $this->creationSort ) {
+ if ( $this->creationSort ) {
$conds[] = 'user_id >= ' . intval( User::idFromName( $this->requestedUser ) );
} else {
$conds[] = 'user_name >= ' . $dbr->addQuotes( $this->requestedUser );
}
}
- if( $this->editsOnly ) {
+ if ( $this->editsOnly ) {
$conds[] = 'user_editcount > 0';
}
$groups = '';
$groups_list = self::getGroups( $row->user_id );
- if( !$this->including && count( $groups_list ) > 0 ) {
+ if ( !$this->including && count( $groups_list ) > 0 ) {
$list = array();
- foreach( $groups_list as $group )
+ foreach ( $groups_list as $group ) {
$list[] = self::buildGroupLink( $group, $userName );
+ }
$groups = $lang->commaList( $list );
}
$item = $lang->specialList( $ulinks, $groups );
- if( $row->ipb_deleted ) {
+ if ( $row->ipb_deleted ) {
$item = "<span class=\"deleted\">$item</span>";
}
$created = '';
# Some rows may be NULL
- if( !$this->including && $row->creation ) {
+ if ( !$this->including && $row->creation ) {
$user = $this->getUser();
$d = $lang->userDate( $row->creation, $user );
$t = $lang->userTime( $row->creation, $user );
$out .= Xml::label( $this->msg( 'group' )->text(), 'group' ) . ' ' .
Xml::openElement( 'select', array( 'name' => 'group', 'id' => 'group' ) ) .
Xml::option( $this->msg( 'group-all' )->text(), '' );
- foreach( $this->getAllGroups() as $group => $groupText )
+ foreach ( $this->getAllGroups() as $group => $groupText ) {
$out .= Xml::option( $groupText, $group, $group == $this->requestedGroup );
+ }
$out .= Xml::closeElement( 'select' ) . '<br />';
$out .= Xml::checkLabel( $this->msg( 'listusers-editsonly' )->text(), 'editsOnly', 'editsOnly', $this->editsOnly );
$out .= ' ';
*/
function getAllGroups() {
$result = array();
- foreach( User::getAllGroups() as $group ) {
+ foreach ( User::getAllGroups() as $group ) {
$result[$group] = User::getGroupName( $group );
}
asort( $result );
*/
function getDefaultQuery() {
$query = parent::getDefaultQuery();
- if( $this->requestedGroup != '' ) {
+ if ( $this->requestedGroup != '' ) {
$query['group'] = $this->requestedGroup;
}
- if( $this->requestedUser != '' ) {
+ if ( $this->requestedUser != '' ) {
$query['username'] = $this->requestedUser;
}
wfRunHooks( 'SpecialListusersDefaultQuery', array( $this, &$query ) );
$s = $up->getPageHeader();
}
- if( $usersbody ) {
+ if ( $usersbody ) {
$s .= $up->getNavigationBar();
$s .= Html::rawElement( 'ul', array(), $usersbody );
$s .= $up->getNavigationBar();
# Some log types are only for a 'User:' title but we might have been given
# only the username instead of the full title 'User:username'. This part try
# to lookup for a user by that name and eventually fix user input. See bug 1697.
- if( in_array( $opts->getValue( 'type' ), $this->typeOnUser ) ) {
+ if ( in_array( $opts->getValue( 'type' ), $this->typeOnUser ) ) {
# ok we have a type of log which expect a user title.
$target = Title::newFromText( $opts->getValue( 'page' ) );
- if( $target && $target->getNamespace() === NS_MAIN ) {
+ if ( $target && $target->getNamespace() === NS_MAIN ) {
# User forgot to add 'User:', we are adding it for him
$opts->setValue( 'page',
Title::makeTitleSafe( NS_USER, $opts->getValue( 'page' ) )
function getOrderFields() {
// For some crazy reason ordering by a constant
// causes a filesort in MySQL 5
- if( count( MWNamespace::getContentNamespaces() ) > 1 ) {
+ if ( count( MWNamespace::getContentNamespaces() ) > 1 ) {
return array( 'page_namespace', 'page_title' );
} else {
return array( 'page_title' );
$this->mTargetID = intval( $request->getVal( 'targetID' ) );
$this->mDestID = intval( $request->getVal( 'destID' ) );
$this->mTimestamp = $request->getVal( 'mergepoint' );
- if( !preg_match( '/[0-9]{14}/', $this->mTimestamp ) ) {
+ if ( !preg_match( '/[0-9]{14}/', $this->mTimestamp ) ) {
$this->mTimestamp = '';
}
$this->mComment = $request->getText( 'wpComment' );
$this->mMerge = $request->wasPosted() && $this->getUser()->matchEditToken( $request->getVal( 'wpEditToken' ) );
// target page
- if( $this->mSubmitted ) {
+ if ( $this->mSubmitted ) {
$this->mTargetObj = Title::newFromURL( $this->mTarget );
$this->mDestObj = Title::newFromURL( $this->mDest );
} else {
*/
function preCacheMessages() {
// Precache various messages
- if( !isset( $this->message ) ) {
+ if ( !isset( $this->message ) ) {
$this->message['last'] = $this->msg( 'last' )->escaped();
}
}
$this->setHeaders();
$this->outputHeader();
- if( $this->mTargetID && $this->mDestID && $this->mAction == 'submit' && $this->mMerge ) {
+ if ( $this->mTargetID && $this->mDestID && $this->mAction == 'submit' && $this->mMerge ) {
$this->merge();
return;
}
$errors = array();
if ( !$this->mTargetObj instanceof Title ) {
$errors[] = $this->msg( 'mergehistory-invalid-source' )->parseAsBlock();
- } elseif( !$this->mTargetObj->exists() ) {
+ } elseif ( !$this->mTargetObj->exists() ) {
$errors[] = $this->msg( 'mergehistory-no-source', array( 'parse' ),
wfEscapeWikiText( $this->mTargetObj->getPrefixedText() )
)->parseAsBlock();
if ( !$this->mDestObj instanceof Title ) {
$errors[] = $this->msg( 'mergehistory-invalid-destination' )->parseAsBlock();
- } elseif( !$this->mDestObj->exists() ) {
+ } elseif ( !$this->mDestObj->exists() ) {
$errors[] = $this->msg( 'mergehistory-no-destination', array( 'parse' ),
wfEscapeWikiText( $this->mDestObj->getPrefixedText() )
)->parseAsBlock();
);
$out->addHTML( $top );
- if( $haveRevisions ) {
+ if ( $haveRevisions ) {
# Format the user-visible controls (comment field, submission button)
# in a nice little table
$table =
$this->msg( 'mergehistory-list' )->escaped() . "</h2>\n"
);
- if( $haveRevisions ) {
+ if ( $haveRevisions ) {
$out->addHTML( $revisions->getNavigationBar() );
$out->addHTML( '<ul>' );
$out->addHTML( $revisions->getBody() );
array(),
array( 'oldid' => $rev->getId() )
);
- if( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
+ if ( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
$pageLink = '<span class="history-deleted">' . $pageLink . '</span>';
}
# Last link
- if( !$rev->userCan( Revision::DELETED_TEXT, $user ) ) {
+ if ( !$rev->userCan( Revision::DELETED_TEXT, $user ) ) {
$last = $this->message['last'];
- } elseif( isset( $this->prevId[$row->rev_id] ) ) {
+ } elseif ( isset( $this->prevId[$row->rev_id] ) ) {
$last = Linker::linkKnown(
$rev->getTitle(),
$this->message['last'],
$userLink = Linker::revUserTools( $rev );
$size = $row->rev_len;
- if( !is_null( $size ) ) {
+ if ( !is_null( $size ) ) {
$stxt = Linker::formatRevisionSize( $size );
}
$comment = Linker::revComment( $rev );
# keep it consistent...
$targetTitle = Title::newFromID( $this->mTargetID );
$destTitle = Title::newFromID( $this->mDestID );
- if( is_null( $targetTitle ) || is_null( $destTitle ) ) {
+ if ( is_null( $targetTitle ) || is_null( $destTitle ) ) {
return false; // validate these
}
- if( $targetTitle->getArticleID() == $destTitle->getArticleID() ) {
+ if ( $targetTitle->getArticleID() == $destTitle->getArticleID() ) {
return false;
}
# Verify that this timestamp is valid
__METHOD__
);
# Destination page must exist with revisions
- if( !$maxtimestamp ) {
+ if ( !$maxtimestamp ) {
$this->getOutput()->addWikiMsg( 'mergehistory-fail' );
return false;
}
__METHOD__
);
# $this->mTimestamp must be older than $maxtimestamp
- if( $this->mTimestamp >= $maxtimestamp ) {
+ if ( $this->mTimestamp >= $maxtimestamp ) {
$this->getOutput()->addWikiMsg( 'mergehistory-fail' );
return false;
}
# Update the revisions
- if( $this->mTimestamp ) {
+ if ( $this->mTimestamp ) {
$timewhere = "rev_timestamp <= {$this->mTimestamp}";
$timestampLimit = wfTimestamp( TS_MW, $this->mTimestamp );
} else {
__METHOD__,
array( 'FOR UPDATE' )
);
- if( !$haveRevisions ) {
- if( $this->mComment ) {
+ if ( !$haveRevisions ) {
+ if ( $this->mComment ) {
$comment = $this->msg(
'mergehistory-comment',
$targetTitle->getPrefixedText(),
if ( $redirectContent ) {
$redirectPage = WikiPage::factory( $targetTitle );
$redirectRevision = new Revision( array(
- 'title' => $targetTitle,
- 'page' => $this->mTargetID,
+ 'title' => $targetTitle,
+ 'page' => $this->mTargetID,
'comment' => $comment,
'content' => $redirectContent ) );
$redirectRevision->insertOn( $dbw );
$dbw->delete( 'pagelinks', array( 'pl_from' => $this->mDestID ), __METHOD__ );
$dbw->insert( 'pagelinks',
array(
- 'pl_from' => $this->mDestID,
+ 'pl_from' => $this->mDestID,
'pl_namespace' => $destTitle->getNamespace(),
- 'pl_title' => $destTitle->getDBkey() ),
+ 'pl_title' => $destTitle->getDBkey() ),
__METHOD__
);
} else {
}
$destTitle->invalidateCache(); // update histories
# Check if this did anything
- if( !$count ) {
+ if ( !$count ) {
$this->getOutput()->addWikiMsg( 'mergehistory-fail' );
return false;
}
$batch->addObj( Title::makeTitleSafe( NS_USER_TALK, $row->user_name ) );
$rev_id = isset( $rev_id ) ? $rev_id : $row->rev_id;
- if( $rev_id > $row->rev_id ) {
+ if ( $rev_id > $row->rev_id ) {
$this->mForm->prevId[$rev_id] = $row->rev_id;
- } elseif( $rev_id < $row->rev_id ) {
+ } elseif ( $rev_id < $row->rev_id ) {
$this->mForm->prevId[$row->rev_id] = $rev_id;
}
return array(
'tables' => array( 'revision', 'page', 'user' ),
'fields' => array_merge( Revision::selectFields(), Revision::selectUserFields() ),
- 'conds' => $conds,
+ 'conds' => $conds,
'join_conds' => array(
'page' => Revision::pageJoinCond(),
'user' => Revision::userJoinCond() )
$oldTitleText = $request->getVal( 'wpOldTitle', $target );
$this->oldTitle = Title::newFromText( $oldTitleText );
- if( is_null( $this->oldTitle ) ) {
+ if ( is_null( $this->oldTitle ) ) {
throw new ErrorPageError( 'notargettitle', 'notargettext' );
}
- if( !$this->oldTitle->exists() ) {
+ if ( !$this->oldTitle->exists() ) {
throw new ErrorPageError( 'nopagetitle', 'nopagetext' );
}
# link, check for validity. We can then show some diagnostic
# information and save a click.
$newerr = $this->oldTitle->isValidMoveOperation( $newTitle );
- if( is_array( $newerr ) ) {
+ if ( is_array( $newerr ) ) {
$err = $newerr;
}
}
}
} else {
$errStr = array();
- foreach( $err as $errMsg ) {
- if( $errMsg[0] == 'hookaborted' ) {
+ foreach ( $err as $errMsg ) {
+ if ( $errMsg[0] == 'hookaborted' ) {
$errStr[] = $errMsg[1];
} else {
$errMsgName = array_shift( $errMsg );
</tr>"
);
- if( $considerTalk ) {
+ if ( $considerTalk ) {
$out->addHTML( "
<tr>
<td></td>
);
}
- if( $canMoveSubpage ) {
+ if ( $canMoveSubpage ) {
$out->addHTML( "
<tr>
<td></td>
$watchChecked = $user->isLoggedIn() && ( $this->watch || $user->getBoolOption( 'watchmoves' )
|| $user->isWatched( $this->oldTitle ) );
# Don't allow watching if user is not logged in
- if( $user->isLoggedIn() ) {
+ if ( $user->isLoggedIn() ) {
$out->addHTML( "
<tr>
<td></td>
<td class='mw-input'>" .
Xml::checkLabel( $this->msg( 'move-watch' )->text(), 'wpWatch', 'watch', $watchChecked ) .
"</td>
- </tr>");
+ </tr>" );
}
$out->addHTML( "
# Now we move extra pages we've been asked to move: subpages and talk
# pages. First, if the old page or the new page is a talk page, we
# can't move any talk pages: cancel that.
- if( $ot->isTalkPage() || $nt->isTalkPage() ) {
+ if ( $ot->isTalkPage() || $nt->isTalkPage() ) {
$this->moveTalk = false;
}
// @todo FIXME: Use Title::moveSubpages() here
$dbr = wfGetDB( DB_MASTER );
- if( $this->moveSubpages && (
+ if ( $this->moveSubpages && (
MWNamespace::hasSubpages( $nt->getNamespace() ) || (
$this->moveTalk &&
MWNamespace::hasSubpages( $nt->getTalkPage()->getNamespace() )
. ' OR page_title = ' . $dbr->addQuotes( $ot->getDBkey() )
);
$conds['page_namespace'] = array();
- if( MWNamespace::hasSubpages( $nt->getNamespace() ) ) {
+ if ( MWNamespace::hasSubpages( $nt->getNamespace() ) ) {
$conds['page_namespace'][] = $ot->getNamespace();
}
- if( $this->moveTalk && MWNamespace::hasSubpages( $nt->getTalkPage()->getNamespace() ) ) {
+ if ( $this->moveTalk && MWNamespace::hasSubpages( $nt->getTalkPage()->getNamespace() ) ) {
$conds['page_namespace'][] = $ot->getTalkPage()->getNamespace();
}
- } elseif( $this->moveTalk ) {
+ } elseif ( $this->moveTalk ) {
$conds = array(
'page_namespace' => $ot->getTalkPage()->getNamespace(),
'page_title' => $ot->getDBkey()
}
$extraPages = array();
- if( !is_null( $conds ) ) {
+ if ( !is_null( $conds ) ) {
$extraPages = TitleArray::newFromResult(
$dbr->select( 'page',
array( 'page_id', 'page_namespace', 'page_title' ),
$extraOutput = array();
$count = 1;
- foreach( $extraPages as $oldSubpage ) {
- if( $ot->equals( $oldSubpage ) ) {
+ foreach ( $extraPages as $oldSubpage ) {
+ if ( $ot->equals( $oldSubpage ) ) {
# Already did this one.
continue;
}
StringUtils::escapeRegexReplacement( $nt->getDBkey() ), # bug 21234
$oldSubpage->getDBkey()
);
- if( $oldSubpage->isTalkPage() ) {
+ if ( $oldSubpage->isTalkPage() ) {
$newNs = $nt->getTalkPage()->getNamespace();
} else {
$newNs = $nt->getSubjectPage()->getNamespace();
# Bug 14385: we need makeTitleSafe because the new page names may
# be longer than 255 characters.
$newSubpage = Title::makeTitleSafe( $newNs, $newPageName );
- if( !$newSubpage ) {
+ if ( !$newSubpage ) {
$oldLink = Linker::linkKnown( $oldSubpage );
$extraOutput[] = $this->msg( 'movepage-page-unmoved' )->rawParams( $oldLink
)->params( Title::makeName( $newNs, $newPageName ) )->escaped();
$extraOutput[] = $this->msg( 'movepage-page-exists' )->rawParams( $link )->escaped();
} else {
$success = $oldSubpage->moveTo( $newSubpage, true, $this->reason, $createRedirect );
- if( $success === true ) {
+ if ( $success === true ) {
if ( $this->fixRedirects ) {
DoubleRedirectJob::fixRedirects( 'move', $oldSubpage, $newSubpage );
}
$newLink = Linker::linkKnown( $newSubpage );
$extraOutput[] = $this->msg( 'movepage-page-moved' )->rawParams( $oldLink, $newLink )->escaped();
++$count;
- if( $count >= $wgMaximumMovedPages ) {
+ if ( $count >= $wgMaximumMovedPages ) {
$extraOutput[] = $this->msg( 'movepage-max-pages' )->numParams( $wgMaximumMovedPages )->escaped();
break;
}
}
- if( $extraOutput !== array() ) {
+ if ( $extraOutput !== array() ) {
$out->addHTML( "<ul>\n<li>" . implode( "</li>\n<li>", $extraOutput ) . "</li>\n</ul>" );
}
# Deal with watches (we don't watch subpages)
- if( $this->watch && $user->isLoggedIn() ) {
+ if ( $this->watch && $user->isLoggedIn() ) {
$user->addWatch( $ot );
$user->addWatch( $nt );
} else {
# Re-clear the file redirect cache, which may have been polluted by
# parsing in messages above. See CR r56745.
# @todo FIXME: Needs a more robust solution inside FileRepo.
- if( $ot->getNamespace() == NS_FILE ) {
+ if ( $ot->getNamespace() == NS_FILE ) {
RepoGroup::singleton()->getLocalRepo()->invalidateImageRedirect( $ot );
}
}
}
function showSubpages( $title ) {
- if( !MWNamespace::hasSubpages( $title->getNamespace() ) )
+ if ( !MWNamespace::hasSubpages( $title->getNamespace() ) ) {
return;
+ }
$subpages = $title->getSubpages();
$count = $subpages instanceof TitleArray ? $subpages->count() : 0;
$out->addWikiMsg( 'movesubpagetext', $this->getLanguage()->formatNum( $count ) );
$out->addHTML( "<ul>\n" );
- foreach( $subpages as $subpage ) {
+ foreach ( $subpages as $subpage ) {
$link = Linker::link( $subpage );
$out->addHTML( "<li>$link</li>\n" );
}
$conds = $jconds = array();
$tables = array( 'image' );
- if( !$this->showbots ) {
+ if ( !$this->showbots ) {
$groupsWithBotPermission = User::getGroupsWithPermission( 'bot' );
- if( count( $groupsWithBotPermission ) ) {
+ if ( count( $groupsWithBotPermission ) ) {
$tables[] = 'user_groups';
$conds[] = 'ug_group IS NULL';
$jconds['user_groups'] = array(
}
}
- if( !$wgMiserMode && $this->like !== null ) {
+ if ( !$wgMiserMode && $this->like !== null ) {
$dbr = wfGetDB( DB_SLAVE );
$likeObj = Title::newFromURL( $this->like );
- if( $likeObj instanceof Title ) {
+ if ( $likeObj instanceof Title ) {
$like = $dbr->buildLike( $dbr->anyString(), strtolower( $likeObj->getDBkey() ), $dbr->anyString() );
$conds[] = "LOWER(img_name) $like";
}
),
);
- if( $wgMiserMode ) {
+ if ( $wgMiserMode ) {
unset( $fields['like'] );
}
$this->customFilters = array();
wfRunHooks( 'SpecialNewPagesFilters', array( $this, &$this->customFilters ) );
- foreach( $this->customFilters as $key => $params ) {
+ foreach ( $this->customFilters as $key => $params ) {
$opts->add( $key, $params['default'] );
}
// Set values
$opts->fetchValuesFromRequest( $this->getRequest() );
- if ( $par ) $this->parseParams( $par );
+ if ( $par ) {
+ $this->parseParams( $par );
+ }
// Validate
$opts->validateIntBounds( 'limit', 0, 5000 );
- if( !$wgEnableNewpagesUserFilter ) {
+ if ( !$wgEnableNewpagesUserFilter ) {
$opts->setValue( 'username', '' );
}
}
}
if ( preg_match( '/^namespace=(.*)$/', $bit, $m ) ) {
$ns = $this->getLanguage()->getNsIndex( $m[1] );
- if( $ns !== false ) {
+ if ( $ns !== false ) {
$this->opts->setValue( 'namespace', $ns );
}
}
$this->showNavigation = !$this->including(); // Maybe changed in setup
$this->setup( $par );
- if( !$this->including() ) {
+ if ( !$this->including() ) {
// Settings
$this->form();
$feedType = $this->opts->getValue( 'feed' );
- if( $feedType ) {
+ if ( $feedType ) {
$this->feed( $feedType );
return;
}
$pager->mLimit = $this->opts->getValue( 'limit' );
$pager->mOffset = $this->opts->getValue( 'offset' );
- if( $pager->getNumRows() ) {
+ if ( $pager->getNumRows() ) {
$navigation = '';
if ( $this->showNavigation ) {
$navigation = $pager->getNavigationBar();
'selected' => $namespace,
'all' => 'all',
), array(
- 'name' => 'namespace',
- 'id' => 'namespace',
+ 'name' => 'namespace',
+ 'id' => 'namespace',
'class' => 'namespaceselector',
)
) . ' ' .
$query = array( 'redirect' => 'no' );
- if( $this->patrollable( $result ) ) {
+ if ( $this->patrollable( $result ) ) {
$query['rcid'] = $result->rc_id;
}
}
# Tags, if any.
- if( isset( $result->ts_tags ) ) {
+ if ( isset( $result->ts_tags ) ) {
list( $tagDisplay, $newClasses ) = ChangeTags::formatSummaryRow( $result->ts_tags, 'newpages' );
$classes = array_merge( $classes, $newClasses );
} else {
return;
}
- if( !isset( $wgFeedClasses[$type] ) ) {
+ if ( !isset( $wgFeedClasses[$type] ) ) {
$this->getOutput()->addWikiMsg( 'feed-invalid' );
return;
}
$pager->mLimit = min( $limit, $wgFeedLimit );
$feed->outHeader();
- if( $pager->getNumRows() > 0 ) {
+ if ( $pager->getNumRows() > 0 ) {
foreach ( $pager->mResult as $row ) {
$feed->outItem( $this->feedItem( $row ) );
}
protected function feedItem( $row ) {
$title = Title::makeTitle( intval( $row->rc_namespace ), $row->rc_title );
- if( $title ) {
+ if ( $title ) {
$date = $row->rc_timestamp;
$comments = $title->getTalkPage()->getFullURL();
protected function feedItemDesc( $row ) {
$revision = Revision::newFromId( $row->rev_id );
- if( $revision ) {
+ if ( $revision ) {
//XXX: include content model/type in feed item?
return '<p>' . htmlspecialchars( $revision->getUserText() ) .
$this->msg( 'colon-separator' )->inContentLanguage()->escaped() .
$username = $this->opts->getValue( 'username' );
$user = Title::makeTitleSafe( NS_USER, $username );
- if( $namespace !== false ) {
+ if ( $namespace !== false ) {
if ( $this->opts->getValue( 'invert' ) ) {
$conds[] = 'rc_namespace != ' . $this->mDb->addQuotes( $namespace );
} else {
}
# $wgEnableNewpagesUserFilter - temp WMF hack
- if( $wgEnableNewpagesUserFilter && $user ) {
+ if ( $wgEnableNewpagesUserFilter && $user ) {
$conds['rc_user_text'] = $user->getText();
$rcIndexes = 'rc_user_text';
# If anons cannot make new pages, don't "exclude logged in users"!
- } elseif( User::groupHasPermission( '*', 'createpage' ) && $this->opts->getValue( 'hideliu' ) ) {
+ } elseif ( User::groupHasPermission( '*', 'createpage' ) && $this->opts->getValue( 'hideliu' ) ) {
$conds['rc_user'] = 0;
}
# If this user cannot see patrolled edits or they are off, don't do dumb queries!
- if( $this->opts->getValue( 'hidepatrolled' ) && $this->getUser()->useNPPatrol() ) {
+ if ( $this->opts->getValue( 'hidepatrolled' ) && $this->getUser()->useNPPatrol() ) {
$conds['rc_patrolled'] = 0;
}
- if( $this->opts->getValue( 'hidebots' ) ) {
+ if ( $this->opts->getValue( 'hidebots' ) ) {
$conds['rc_bot'] = 0;
}
$tables = array( 'recentchanges', 'page' );
$fields = array(
'rc_namespace', 'rc_title', 'rc_cur_id', 'rc_user', 'rc_user_text',
- 'rc_comment', 'rc_timestamp', 'rc_patrolled','rc_id', 'rc_deleted',
+ 'rc_comment', 'rc_timestamp', 'rc_patrolled', 'rc_id', 'rc_deleted',
'length' => 'page_len', 'rev_id' => 'page_latest', 'rc_this_oldid',
'page_namespace', 'page_title'
);
array( &$this, $this->opts, &$conds, &$tables, &$fields, &$join_conds ) );
$info = array(
- 'tables' => $tables,
- 'fields' => $fields,
- 'conds' => $conds,
- 'options' => array( 'USE INDEX' => array( 'recentchanges' => $rcIndexes ) ),
+ 'tables' => $tables,
+ 'fields' => $fields,
+ 'conds' => $conds,
+ 'options' => array( 'USE INDEX' => array( 'recentchanges' => $rcIndexes ) ),
'join_conds' => $join_conds
);
*/
private $email;
+ /**
+ * @var User
+ */
+ private $firstUser;
+
/**
* @var Status
*/
'type' => 'text',
'label-message' => 'passwordreset-username',
);
- if( $this->getUser()->isLoggedIn() ) {
+ if ( $this->getUser()->isLoggedIn() ) {
$a['Username']['default'] = $this->getUser()->getName();
}
}
);
}
- if( $this->getUser()->isAllowed( 'passwordreset' ) ) {
+ if ( $this->getUser()->isAllowed( 'passwordreset' ) ) {
$a['Capture'] = array(
'type' => 'check',
'label-message' => 'passwordreset-capture',
}
}
- if( isset( $data['Capture'] ) && !$this->getUser()->isAllowed( 'passwordreset' ) ) {
+ if ( isset( $data['Capture'] ) && !$this->getUser()->isAllowed( 'passwordreset' ) ) {
// The user knows they don't have the passwordreset permission, but they tried to spoof the form. That's naughty
throw new PermissionsError( 'passwordreset' );
}
);
if ( $res ) {
$users = array();
- foreach( $res as $row ) {
+ foreach ( $res as $row ) {
$users[] = User::newFromRow( $row );
}
} else {
return array( $error );
}
- if( count( $users ) == 0 ) {
- if( $method == 'email' ) {
+ if ( count( $users ) == 0 ) {
+ if ( $method == 'email' ) {
// Don't reveal whether or not an email address is in use
return true;
} else {
$this->result = $firstUser->sendMail( $title->escaped(), $this->email->text() );
- // Blank the email if the user is not supposed to see it
- if( !isset( $data['Capture'] ) || !$data['Capture'] ) {
+ if ( isset( $data['Capture'] ) && $data['Capture'] ) {
+ // Save the user, will be used if an error occurs when sending the email
+ $this->firstUser = $firstUser;
+ } else {
+ // Blank the email if the user is not supposed to see it
$this->email = null;
}
if ( $this->result->isGood() ) {
return true;
- } elseif( isset( $data['Capture'] ) && $data['Capture'] ) {
+ } elseif ( isset( $data['Capture'] ) && $data['Capture'] ) {
// The email didn't send, but maybe they knew that and that's why they captured it
return true;
} else {
}
public function onSuccess() {
- if( $this->getUser()->isAllowed( 'passwordreset' ) && $this->email != null ) {
+ if ( $this->getUser()->isAllowed( 'passwordreset' ) && $this->email != null ) {
// @todo: Logging
- if( $this->result->isGood() ) {
+ if ( $this->result->isGood() ) {
$this->getOutput()->addWikiMsg( 'passwordreset-emailsent-capture' );
} else {
- $this->getOutput()->addWikiMsg( 'passwordreset-emailerror-capture', $this->result->getMessage() );
+ $this->getOutput()->addWikiMsg( 'passwordreset-emailerror-capture',
+ $this->result->getMessage(), $this->firstUser->getName() );
}
$this->getOutput()->addHTML( Html::rawElement( 'pre', array(), $this->email->escaped() ) );
global $wgContLang;
$title = Title::makeTitleSafe( $result->namespace, $result->title );
- if( !$title ) {
+ if ( !$title ) {
return Html::element( 'span', array( 'class' => 'mw-invalidtitle' ),
Linker::getInvalidTitleDescription( $this->getContext(), $result->namespace, $result->title ) );
}
);
$showme = '';
- if( isset( $par ) ) {
+ if ( isset( $par ) ) {
$showme = $par;
- } elseif( $prefix != '' ) {
+ } elseif ( $prefix != '' ) {
$showme = $prefix;
- } elseif( $from != '' && $ns === null ) {
+ } elseif ( $from != '' && $ns === null ) {
// For back-compat with Special:Allpages
// Don't do this if namespace is passed, so paging works when doing NS views.
$showme = $from;
Html::namespaceSelector( array(
'selected' => $namespace,
), array(
- 'name' => 'namespace',
- 'id' => 'namespace',
+ 'name' => 'namespace',
+ 'id' => 'namespace',
'class' => 'namespaceselector',
) ) .
Xml::checkLabel(
$conds,
__METHOD__,
array(
- 'ORDER BY' => 'page_title',
- 'LIMIT' => $this->maxPerPage + 1,
+ 'ORDER BY' => 'page_title',
+ 'LIMIT' => $this->maxPerPage + 1,
'USE INDEX' => 'name_title',
)
);
### @todo FIXME: Side link to previous
$n = 0;
- if( $res->numRows() > 0 ) {
+ if ( $res->numRows() > 0 ) {
$out = Xml::openElement( 'table', array( 'id' => 'mw-prefixindex-list-table' ) );
- while( ( $n < $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
+ while ( ( $n < $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
$t = Title::makeTitle( $s->page_namespace, $s->page_title );
- if( $t ) {
+ if ( $t ) {
$link = ($s->page_is_redirect ? '<div class="allpagesredirect">' : '' ) .
Linker::linkKnown(
$t,
} else {
$link = '[[' . htmlspecialchars( $s->page_title ) . ']]';
}
- if( $n % 3 == 0 ) {
+ if ( $n % 3 == 0 ) {
$out .= '<tr>';
}
$out .= "<td>$link</td>";
$n++;
- if( $n % 3 == 0 ) {
+ if ( $n % 3 == 0 ) {
$out .= '</tr>';
}
}
- if( ($n % 3) != 0 ) {
+ if ( ($n % 3) != 0 ) {
$out .= '</tr>';
}
$out .= Xml::closeElement( 'table' );
'</td>
<td id="mw-prefixindex-nav-form" class="mw-prefixindex-nav">';
- if( isset( $res ) && $res && ( $n == $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
+ if ( isset( $res ) && $res && ( $n == $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
$query = array(
'from' => $s->page_title,
'prefix' => $prefix,
'hideredirects' => $hideredirects,
);
- if( $namespace || $prefix == '' ) {
+ if ( $namespace || $prefix == '' ) {
// Keep the namespace even if it's 0 for empty prefixes.
// This tells us we're not just a holdover from old links.
$query['namespace'] = $namespace;
$this->outputHeader();
// Purge expired entries on one in every 10 queries
- if( !mt_rand( 0, 10 ) ) {
+ if ( !mt_rand( 0, 10 ) ) {
Title::purgeExpiredRestrictions();
}
$this->getOutput()->addHTML( $this->showOptions( $NS, $type, $level, $sizetype, $size, $indefOnly, $cascadeOnly ) );
- if( $pager->getNumRows() ) {
+ if ( $pager->getNumRows() ) {
$this->getOutput()->addHTML(
$pager->getNavigationBar() .
'<ul>' . $pager->getBody() . '</ul>' .
static $infinity = null;
- if( is_null( $infinity ) ) {
+ if ( is_null( $infinity ) ) {
$infinity = wfGetDB( DB_SLAVE )->getInfinity();
}
$title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
- if( !$title ) {
+ if ( !$title ) {
wfProfileOut( __METHOD__ );
return Html::rawElement( 'li', array(),
Html::element( 'span', array( 'class' => 'mw-invalidtitle' ),
$description_items[] = $protType;
- if( $row->pr_cascade ) {
+ if ( $row->pr_cascade ) {
$description_items[] = $this->msg( 'protect-summary-cascade' )->text();
}
$lang = $this->getLanguage();
$expiry = $lang->formatExpiry( $row->pr_expiry, TS_MW );
- if( $expiry != $infinity ) {
+ if ( $expiry != $infinity ) {
$user = $this->getUser();
$description_items[] = $this->msg(
'protect-expiring-local',
)->escaped();
}
- if( !is_null( $size = $row->page_len ) ) {
+ if ( !is_null( $size = $row->page_len ) ) {
$stxt = $lang->getDirMark() . ' ' . Linker::formatRevisionSize( $size );
}
# Show a link to the change protection form for allowed users otherwise a link to the protection log
- if( $this->getUser()->isAllowed( 'protect' ) ) {
+ if ( $this->getUser()->isAllowed( 'protect' ) ) {
$changeProtection = Linker::linkKnown(
$title,
$this->msg( 'protect_change' )->escaped(),
$options = array();
// First pass to load the log names
- foreach( Title::getFilteredRestrictionTypes( true ) as $type ) {
+ foreach ( Title::getFilteredRestrictionTypes( true ) as $type ) {
$text = $this->msg( "restriction-$type" )->text();
$m[$text] = $type;
}
// Third pass generates sorted XHTML content
- foreach( $m as $text => $type ) {
+ foreach ( $m as $text => $type ) {
$selected = ($type == $pr_type );
$options[] = Xml::option( $text, $type, $selected ) . "\n";
}
$options = array();
// First pass to load the log names
- foreach( $wgRestrictionLevels as $type ) {
+ foreach ( $wgRestrictionLevels as $type ) {
// Messages used can be 'restriction-level-sysop' and 'restriction-level-autoconfirmed'
- if( $type != '' && $type != '*' ) {
+ if ( $type != '' && $type != '*' ) {
$text = $this->msg( "restriction-level-$type" )->text();
$m[$text] = $type;
}
}
// Third pass generates sorted XHTML content
- foreach( $m as $text => $type ) {
- $selected = ($type == $pr_level );
+ foreach ( $m as $text => $type ) {
+ $selected = ( $type == $pr_level );
$options[] = Xml::option( $text, $type, $selected );
}
$conds[] = 'page_id=pr_page';
$conds[] = 'pr_type=' . $this->mDb->addQuotes( $this->type );
- if( $this->sizetype == 'min' ) {
+ if ( $this->sizetype == 'min' ) {
$conds[] = 'page_len>=' . $this->size;
- } elseif( $this->sizetype == 'max' ) {
+ } elseif ( $this->sizetype == 'max' ) {
$conds[] = 'page_len<=' . $this->size;
}
- if( $this->indefonly ) {
+ if ( $this->indefonly ) {
$conds[] = "pr_expiry = {$this->mDb->addQuotes( $this->mDb->getInfinity() )} OR pr_expiry IS NULL";
}
- if( $this->cascadeonly ) {
+ if ( $this->cascadeonly ) {
$conds[] = 'pr_cascade = 1';
}
- if( $this->level )
+ if ( $this->level ) {
$conds[] = 'pr_level=' . $this->mDb->addQuotes( $this->level );
- if( !is_null( $this->namespace ) )
+ }
+ if ( !is_null( $this->namespace ) ) {
$conds[] = 'page_namespace=' . $this->mDb->addQuotes( $this->namespace );
+ }
return array(
'tables' => array( 'page_restrictions', 'page' ),
'fields' => array( 'pr_id', 'page_namespace', 'page_title', 'page_len',
static $infinity = null;
- if( is_null( $infinity ) ) {
+ if ( is_null( $infinity ) ) {
$infinity = wfGetDB( DB_SLAVE )->getInfinity();
}
$title = Title::makeTitleSafe( $row->pt_namespace, $row->pt_title );
- if( !$title ) {
+ if ( !$title ) {
wfProfileOut( __METHOD__ );
return Html::rawElement( 'li', array(),
Html::element( 'span', array( 'class' => 'mw-invalidtitle' ),
$lang = $this->getLanguage();
$expiry = strlen( $row->pt_expiry ) ? $lang->formatExpiry( $row->pt_expiry, TS_MW ) : $infinity;
- if( $expiry != $infinity ) {
+ if ( $expiry != $infinity ) {
$user = $this->getUser();
$description_items[] = $this->msg(
'protect-expiring-local',
$options = array();
// First pass to load the log names
- foreach( $wgRestrictionLevels as $type ) {
+ foreach ( $wgRestrictionLevels as $type ) {
if ( $type != '' && $type != '*' ) {
$text = $this->msg( "restriction-level-$type" )->text();
$m[$text] = $type;
}
}
// Is there only one level (aside from "all")?
- if( count( $m ) <= 2 ) {
+ if ( count( $m ) <= 2 ) {
return '';
}
// Third pass generates sorted XHTML content
- foreach( $m as $text => $type ) {
+ foreach ( $m as $text => $type ) {
$selected = ($type == $pr_level );
$options[] = Xml::option( $text, $type, $selected );
}
function getQueryInfo() {
$conds = $this->mConds;
$conds[] = 'pt_expiry>' . $this->mDb->addQuotes( $this->mDb->timestamp() );
- if( $this->level )
+ if ( $this->level ) {
$conds['pt_create_perm'] = $this->level;
- if( !is_null( $this->namespace ) )
+ }
+ if ( !is_null( $this->namespace ) ) {
$conds[] = 'pt_namespace=' . $this->mDb->addQuotes( $this->namespace );
+ }
return array(
'tables' => 'protected_titles',
'fields' => array( 'pt_namespace', 'pt_title', 'pt_create_perm',
}
public function setNamespace( $ns ) {
- if( !$ns || $ns < NS_MAIN ) {
+ if ( !$ns || $ns < NS_MAIN ) {
$ns = NS_MAIN;
}
$this->namespaces = array( $ns );
$title = $this->getRandomTitle();
- if( is_null( $title ) ) {
+ if ( is_null( $title ) ) {
$this->setHeaders();
$this->getOutput()->addWikiMsg( strtolower( $this->getName() ) . '-nopages',
$this->getNsList(), count( $this->namespaces ) );
private function getNsList() {
global $wgContLang;
$nsNames = array();
- foreach( $this->namespaces as $n ) {
- if( $n === NS_MAIN ) {
+ foreach ( $this->namespaces as $n ) {
+ if ( $n === NS_MAIN ) {
$nsNames[] = $this->msg( 'blanknamespace' )->plain();
} else {
$nsNames[] = $wgContLang->getNsText( $n );
* any more bias than what the page_random scheme
* causes anyway. Trust me, I'm a mathematician. :)
*/
- if( !$row ) {
+ if ( !$row ) {
$row = $this->selectRandomPageFromDB( "0" );
}
- if( $row ) {
+ if ( $row ) {
return Title::makeTitleSafe( $row->page_namespace, $row->page_title );
} else {
return null;
public function setup( $parameters ) {
$opts = $this->getDefaultOptions();
- foreach( $this->getCustomFilters() as $key => $params ) {
+ foreach ( $this->getCustomFilters() as $key => $params ) {
$opts->add( $key, $params['default'] );
}
$opts->fetchValuesFromRequest( $this->getRequest() );
// Give precedence to subpage syntax
- if( $parameters !== null ) {
+ if ( $parameters !== null ) {
$this->parseParameters( $parameters, $opts );
}
$this->getOutput()->setSquidMaxage( 10 );
# Check if the client has a cached version
$lastmod = $this->checkLastModified( $feedFormat );
- if( $lastmod === false ) {
+ if ( $lastmod === false ) {
return;
}
// Fetch results, prepare a batch link existence check query
$conds = $this->buildMainQueryConds( $opts );
$rows = $this->doMainQuery( $conds, $opts );
- if( $rows === false ) {
- if( !$this->including() ) {
+ if ( $rows === false ) {
+ if ( !$this->including() ) {
$this->doHeader( $opts );
}
return;
}
- if( !$feedFormat ) {
+ if ( !$feedFormat ) {
$batch = new LinkBatch;
- foreach( $rows as $row ) {
+ foreach ( $rows as $row ) {
$batch->add( NS_USER, $row->rc_user_text );
$batch->add( NS_USER_TALK, $row->rc_user_text );
$batch->add( $row->rc_namespace, $row->rc_title );
}
$batch->execute();
}
- if( $feedFormat ) {
+ if ( $feedFormat ) {
list( $changesFeed, $formatter ) = $this->getFeedObject( $feedFormat );
/** @var ChangesFeed $changesFeed */
$changesFeed->execute( $formatter, $rows, $lastmod, $opts );
*/
public function parseParameters( $par, FormOptions $opts ) {
$bits = preg_split( '/\s*,\s*/', trim( $par ) );
- foreach( $bits as $bit ) {
- if( 'hidebots' === $bit ) {
+ foreach ( $bits as $bit ) {
+ if ( 'hidebots' === $bit ) {
$opts['hidebots'] = true;
}
- if( 'bots' === $bit ) {
+ if ( 'bots' === $bit ) {
$opts['hidebots'] = false;
}
- if( 'hideminor' === $bit ) {
+ if ( 'hideminor' === $bit ) {
$opts['hideminor'] = true;
}
- if( 'minor' === $bit ) {
+ if ( 'minor' === $bit ) {
$opts['hideminor'] = false;
}
- if( 'hideliu' === $bit ) {
+ if ( 'hideliu' === $bit ) {
$opts['hideliu'] = true;
}
- if( 'hidepatrolled' === $bit ) {
+ if ( 'hidepatrolled' === $bit ) {
$opts['hidepatrolled'] = true;
}
- if( 'hideanons' === $bit ) {
+ if ( 'hideanons' === $bit ) {
$opts['hideanons'] = true;
}
- if( 'hidemyself' === $bit ) {
+ if ( 'hidemyself' === $bit ) {
$opts['hidemyself'] = true;
}
- if( is_numeric( $bit ) ) {
+ if ( is_numeric( $bit ) ) {
$opts['limit'] = $bit;
}
$m = array();
- if( preg_match( '/^limit=(\d+)$/', $bit, $m ) ) {
+ if ( preg_match( '/^limit=(\d+)$/', $bit, $m ) ) {
$opts['limit'] = $m[1];
}
- if( preg_match( '/^days=(\d+)$/', $bit, $m ) ) {
+ if ( preg_match( '/^days=(\d+)$/', $bit, $m ) ) {
$opts['days'] = $m[1];
}
- if( preg_match( '/^namespace=(\d+)$/', $bit, $m ) ) {
+ if ( preg_match( '/^namespace=(\d+)$/', $bit, $m ) ) {
$opts['namespace'] = $m[1];
}
}
public function checkLastModified( $feedFormat ) {
$dbr = wfGetDB( DB_SLAVE );
$lastmod = $dbr->selectField( 'recentchanges', 'MAX(rc_timestamp)', false, __METHOD__ );
- if( $feedFormat || !$this->getUser()->useRCPatrol() ) {
- if( $lastmod && $this->getOutput()->checkLastModified( $lastmod ) ) {
+ if ( $feedFormat || !$this->getUser()->useRCPatrol() ) {
+ if ( $lastmod && $this->getOutput()->checkLastModified( $lastmod ) ) {
# Client cache fresh and headers sent, nothing more to do.
return false;
}
# It makes no sense to hide both anons and logged-in users
# Where this occurs, force anons to be shown
$forcebot = false;
- if( $opts['hideanons'] && $opts['hideliu'] ) {
+ if ( $opts['hideanons'] && $opts['hideliu'] ) {
# Check if the user wants to show bots only
- if( $opts['hidebots'] ) {
+ if ( $opts['hidebots'] ) {
$opts['hideanons'] = false;
} else {
$forcebot = true;
$cutoff = $dbr->timestamp( $cutoff_unixtime );
$fromValid = preg_match( '/^[0-9]{14}$/', $opts['from'] );
- if( $fromValid && $opts['from'] > wfTimestamp( TS_MW, $cutoff ) ) {
+ if ( $fromValid && $opts['from'] > wfTimestamp( TS_MW, $cutoff ) ) {
$cutoff = $dbr->timestamp( $opts['from'] );
} else {
$opts->reset( 'from' );
$hideLoggedInUsers = $opts['hideliu'] && !$forcebot;
$hideAnonymousUsers = $opts['hideanons'] && !$forcebot;
- if( $opts['hideminor'] ) {
+ if ( $opts['hideminor'] ) {
$conds['rc_minor'] = 0;
}
- if( $opts['hidebots'] ) {
+ if ( $opts['hidebots'] ) {
$conds['rc_bot'] = 0;
}
- if( $hidePatrol ) {
+ if ( $hidePatrol ) {
$conds['rc_patrolled'] = 0;
}
- if( $forcebot ) {
+ if ( $forcebot ) {
$conds['rc_bot'] = 1;
}
- if( $hideLoggedInUsers ) {
+ if ( $hideLoggedInUsers ) {
$conds[] = 'rc_user = 0';
}
- if( $hideAnonymousUsers ) {
+ if ( $hideAnonymousUsers ) {
$conds[] = 'rc_user != 0';
}
- if( $opts['hidemyself'] ) {
- if( $this->getUser()->getId() ) {
+ if ( $opts['hidemyself'] ) {
+ if ( $this->getUser()->getId() ) {
$conds[] = 'rc_user != ' . $dbr->addQuotes( $this->getUser()->getId() );
} else {
$conds[] = 'rc_user_text != ' . $dbr->addQuotes( $this->getUser()->getName() );
}
# Namespace filtering
- if( $opts['namespace'] !== '' ) {
+ if ( $opts['namespace'] !== '' ) {
$selectedNS = $dbr->addQuotes( $opts['namespace'] );
$operator = $opts['invert'] ? '!=' : '=';
$boolean = $opts['invert'] ? 'AND' : 'OR';
# namespace association (bug 2429)
- if( !$opts['associated'] ) {
+ if ( !$opts['associated'] ) {
$condition = "rc_namespace $operator $selectedNS";
} else {
# Also add the associated namespace
// (b) We want pages in more than one namespace (inverted/associated)
// (c) There is a tag to filter on (use tag index instead)
// (d) UNION + sort/limit is not an option for the DBMS
- if( $namespace === ''
+ if ( $namespace === ''
|| ( $invert || $associated )
|| $opts['tagfilter'] != ''
|| !$dbr->unionSupportsOrderAndLimit() )
$limit = $opts['limit'];
- if( !$this->including() ) {
+ if ( !$this->including() ) {
// Output options box
$this->doHeader( $opts );
}
$this->getOutput()->setFeedAppendQuery( false );
}
- if( $wgAllowCategorizedRecentChanges ) {
+ if ( $wgAllowCategorizedRecentChanges ) {
$this->filterByCategories( $rows, $opts );
}
$list = ChangesList::newFromContext( $this->getContext() );
$s = $list->beginRecentChangesList();
- foreach( $rows as $obj ) {
- if( $limit == 0 ) {
+ foreach ( $rows as $obj ) {
+ if ( $limit == 0 ) {
break;
}
$rc = RecentChange::newFromRow( $obj );
$rc->counter = $counter++;
# Check if the page has been updated since the last visit
- if( $wgShowUpdatedMarker && !empty( $obj->wl_notificationtimestamp ) ) {
+ if ( $wgShowUpdatedMarker && !empty( $obj->wl_notificationtimestamp ) ) {
$rc->notificationtimestamp = ( $obj->rc_timestamp >= $obj->wl_notificationtimestamp );
} else {
$rc->notificationtimestamp = false; // Default
}
# Check the number of users watching the page
$rc->numberofWatchingusers = 0; // Default
- if( $showWatcherCount && $obj->rc_namespace >= 0 ) {
- if( !isset( $watcherCache[$obj->rc_namespace][$obj->rc_title] ) ) {
+ if ( $showWatcherCount && $obj->rc_namespace >= 0 ) {
+ if ( !isset( $watcherCache[$obj->rc_namespace][$obj->rc_title] ) ) {
$watcherCache[$obj->rc_namespace][$obj->rc_title] =
$dbr->selectField(
'watchlist',
$submit = ' ' . Xml::submitbutton( $this->msg( 'allpagessubmit' )->text() );
$out = Xml::openElement( 'table', array( 'class' => 'mw-recentchanges-table' ) );
- foreach( $extraOpts as $name => $optionRow ) {
+ foreach ( $extraOpts as $name => $optionRow ) {
# Add submit button to the last row only
++$count;
$addSubmit = ( $count === $extraOptsCount ) ? $submit : '';
$out .= Xml::openElement( 'tr' );
- if( is_array( $optionRow ) ) {
+ if ( is_array( $optionRow ) ) {
$out .= Xml::tags( 'td', array( 'class' => 'mw-label mw-' . $name . '-label' ), $optionRow[0] );
$out .= Xml::tags( 'td', array( 'class' => 'mw-input' ), $optionRow[1] . $addSubmit );
} else {
$out .= Xml::closeElement( 'table' );
$unconsumed = $opts->getUnconsumedValues();
- foreach( $unconsumed as $key => $value ) {
+ foreach ( $unconsumed as $key => $value ) {
$out .= Html::hidden( $key, $value );
}
$extraOpts['namespace'] = $this->namespaceFilterForm( $opts );
global $wgAllowCategorizedRecentChanges;
- if( $wgAllowCategorizedRecentChanges ) {
+ if ( $wgAllowCategorizedRecentChanges ) {
$extraOpts['category'] = $this->categoryFilterForm( $opts );
}
function filterByCategories( &$rows, FormOptions $opts ) {
$categories = array_map( 'trim', explode( '|', $opts['categories'] ) );
- if( !count( $categories ) ) {
+ if ( !count( $categories ) ) {
return;
}
# Filter categories
$cats = array();
- foreach( $categories as $cat ) {
+ foreach ( $categories as $cat ) {
$cat = trim( $cat );
- if( $cat == '' ) {
+ if ( $cat == '' ) {
continue;
}
$cats[] = $cat;
$articles = array();
$a2r = array();
$rowsarr = array();
- foreach( $rows as $k => $r ) {
+ foreach ( $rows as $k => $r ) {
$nt = Title::makeTitle( $r->rc_namespace, $r->rc_title );
$id = $nt->getArticleID();
- if( $id == 0 ) {
+ if ( $id == 0 ) {
continue; # Page might have been deleted...
}
- if( !in_array( $id, $articles ) ) {
+ if ( !in_array( $id, $articles ) ) {
$articles[] = $id;
}
- if( !isset( $a2r[$id] ) ) {
+ if ( !isset( $a2r[$id] ) ) {
$a2r[$id] = array();
}
$a2r[$id][] = $k;
}
# Shortcut?
- if( !count( $articles ) || !count( $cats ) ) {
+ if ( !count( $articles ) || !count( $cats ) ) {
return;
}
# Filter
$newrows = array();
- foreach( $match as $id ) {
- foreach( $a2r[$id] as $rev ) {
+ foreach ( $match as $id ) {
+ foreach ( $a2r[$id] as $rev ) {
$k = $rev;
$newrows[$k] = $rowsarr[$k];
}
$note = '';
$msg = $this->msg( 'rclegend' );
- if( !$msg->isDisabled() ) {
+ if ( !$msg->isDisabled() ) {
$note .= '<div class="mw-rclegend">' . $msg->parse() . "</div>\n";
}
$lang = $this->getLanguage();
$user = $this->getUser();
- if( $options['from'] ) {
+ if ( $options['from'] ) {
$note .= $this->msg( 'rcnotefrom' )->numParams( $options['limit'] )->params(
$lang->userTimeAndDate( $options['from'], $user ),
$lang->userDate( $options['from'], $user ),
// limit links
$cl = array();
- foreach( $wgRCLinkLimits as $value ) {
+ foreach ( $wgRCLinkLimits as $value ) {
$cl[] = $this->makeOptionsLink( $lang->formatNum( $value ),
array( 'limit' => $value ), $nondefaults, $value == $options['limit'] );
}
// day links, reset 'from' to none
$dl = array();
- foreach( $wgRCLinkDays as $value ) {
+ foreach ( $wgRCLinkDays as $value ) {
$dl[] = $this->makeOptionsLink( $lang->formatNum( $value ),
array( 'days' => $value, 'from' => '' ), $nondefaults, $value == $options['days'] );
}
// show/hide links
$showhide = array( $this->msg( 'show' )->text(), $this->msg( 'hide' )->text() );
$filters = array(
- 'hideminor' => 'rcshowhideminor',
- 'hidebots' => 'rcshowhidebots',
- 'hideanons' => 'rcshowhideanons',
- 'hideliu' => 'rcshowhideliu',
+ 'hideminor' => 'rcshowhideminor',
+ 'hidebots' => 'rcshowhidebots',
+ 'hideanons' => 'rcshowhideanons',
+ 'hideliu' => 'rcshowhideliu',
'hidepatrolled' => 'rcshowhidepatr',
- 'hidemyself' => 'rcshowhidemine'
+ 'hidemyself' => 'rcshowhidemine'
);
foreach ( $this->getCustomFilters() as $key => $params ) {
$filters[$key] = $params['msg'];
}
$outputPage = $this->getOutput();
$title = Title::newFromURL( $target );
- if( !$title || $title->getInterwiki() != '' ) {
+ if ( !$title || $title->getInterwiki() != '' ) {
$outputPage->wrapWikiMsg( "<div class=\"errorbox\">\n$1\n</div><br style=\"clear: both\" />", 'allpagesbadtitle' );
return false;
}
// left join with watchlist table to highlight watched rows
$uid = $this->getUser()->getId();
- if( $uid ) {
+ if ( $uid ) {
$tables[] = 'watchlist';
$select[] = 'wl_user';
$join_conds['watchlist'] = array( 'LEFT JOIN', array(
return false;
}
- if( $ns == NS_CATEGORY && !$showlinkedto ) {
+ if ( $ns == NS_CATEGORY && !$showlinkedto ) {
// special handling for categories
// XXX: should try to make this less kludgy
$link_tables = array( 'categorylinks' );
// for now, always join on these tables; really should be configurable as in whatlinkshere
$link_tables = array( 'pagelinks', 'templatelinks' );
// imagelinks only contains links to pages in NS_FILE
- if( $ns == NS_FILE || !$showlinkedto ) {
+ if ( $ns == NS_FILE || !$showlinkedto ) {
$link_tables[] = 'imagelinks';
}
}
- if( $id == 0 && !$showlinkedto ) {
+ if ( $id == 0 && !$showlinkedto ) {
return false; // nonexistent pages can't link to any pages
}
$subsql = array(); // SELECT statements to combine with UNION
- foreach( $link_tables as $link_table ) {
+ foreach ( $link_tables as $link_table ) {
$pfx = $prefix[$link_table];
// imagelinks and categorylinks tables have no xx_namespace field, and have xx_to instead of xx_title
- if( $link_table == 'imagelinks' ) {
+ if ( $link_table == 'imagelinks' ) {
$link_ns = NS_FILE;
- } elseif( $link_table == 'categorylinks' ) {
+ } elseif ( $link_table == 'categorylinks' ) {
$link_ns = NS_CATEGORY;
} else {
$link_ns = 0;
}
- if( $showlinkedto ) {
+ if ( $showlinkedto ) {
// find changes to pages linking to this page
- if( $link_ns ) {
- if( $ns != $link_ns ) {
+ if ( $link_ns ) {
+ if ( $ns != $link_ns ) {
continue;
} // should never happen, but check anyway
$subconds = array( "{$pfx}_to" => $dbkey );
} else {
// find changes to pages linked from this page
$subconds = array( "{$pfx}_from" => $id );
- if( $link_table == 'imagelinks' || $link_table == 'categorylinks' ) {
+ if ( $link_table == 'imagelinks' || $link_table == 'categorylinks' ) {
$subconds["rc_namespace"] = $link_ns;
$subjoin = "rc_title = {$pfx}_to";
} else {
}
}
- if( $dbr->unionSupportsOrderAndLimit() ) {
+ if ( $dbr->unionSupportsOrderAndLimit() ) {
$order = array( 'ORDER BY' => 'rc_timestamp DESC' );
} else {
$order = array();
$join_conds + array( $link_table => array( 'INNER JOIN', $subjoin ) )
);
- if( $dbr->unionSupportsOrderAndLimit() )
+ if ( $dbr->unionSupportsOrderAndLimit() ) {
$query = $dbr->limitResult( $query, $limit );
+ }
$subsql[] = $query;
}
- if( count( $subsql ) == 0 ) {
+ if ( count( $subsql ) == 0 ) {
return false; // should never happen
}
- if( count( $subsql ) == 1 && $dbr->unionSupportsOrderAndLimit() ) {
+ if ( count( $subsql ) == 1 && $dbr->unionSupportsOrderAndLimit() ) {
$sql = $subsql[0];
} else {
// need to resort and relimit after union
$res = $dbr->query( $sql, __METHOD__ );
- if( $res->numRows() == 0 ) {
+ if ( $res->numRows() == 0 ) {
$this->mResultEmpty = true;
}
function setTopText( FormOptions $opts ) {
$target = $this->getTargetTitle();
- if( $target ) {
+ if ( $target ) {
$this->getOutput()->addBacklinkSubtitle( $target );
}
}
function setBottomText( FormOptions $opts ) {
- if( isset( $this->mResultEmpty ) && $this->mResultEmpty ) {
+ if ( isset( $this->mResultEmpty ) && $this->mResultEmpty ) {
$this->getOutput()->addWikiMsg( 'recentchangeslinked-noresult' );
}
}
'list-class' => 'RevDel_ArchiveList',
'permission' => 'deleterevision',
),
- 'oldimage'=> array(
+ 'oldimage' => array(
'check-label' => 'revdelete-hide-image',
'deletion-bits' => File::DELETED_FILE,
'success' => 'revdelete-success',
}
# No targets?
- if( !isset( self::$allowedTypes[$this->typeName] ) || count( $this->ids ) == 0 ) {
+ if ( !isset( self::$allowedTypes[$this->typeName] ) || count( $this->ids ) == 0 ) {
throw new ErrorPageError( 'revdelete-nooldid-title', 'revdelete-nooldid-text' );
}
$this->typeInfo = self::$allowedTypes[$this->typeName];
# If we have revisions, get the title from the first one
# since they should all be from the same page. This allows
# for more flexibility with page moves...
- if( $this->typeName == 'revision' ) {
+ if ( $this->typeName == 'revision' ) {
$rev = Revision::newFromId( $this->ids[0] );
$this->targetObj = $rev ? $rev->getTitle() : $this->targetObj;
}
$this->otherReason = $request->getVal( 'wpReason' );
# We need a target page!
- if( is_null( $this->targetObj ) ) {
+ if ( is_null( $this->targetObj ) ) {
$output->addWikiMsg( 'undelete-header' );
return;
}
array( 'revdelete-hide-comment', 'wpHideComment', Revision::DELETED_COMMENT ),
array( 'revdelete-hide-user', 'wpHideUser', Revision::DELETED_USER )
);
- if( $user->isAllowed( 'suppressrevision' ) ) {
+ if ( $user->isAllowed( 'suppressrevision' ) ) {
$this->checks[] = array( 'revdelete-hide-restricted',
'wpHideRestricted', Revision::DELETED_RESTRICTED );
}
# Either submit or create our form
- if( $this->mIsAllowed && $this->submitClicked ) {
+ if ( $this->mIsAllowed && $this->submitClicked ) {
$this->submit( $request );
} else {
$this->showForm();
LogEventsList::showLogExtract( $output, 'delete',
$this->targetObj, '', array( 'lim' => 25, 'conds' => $qc ) );
# Show relevant lines from the suppression log
- if( $user->isAllowed( 'suppressionlog' ) ) {
+ if ( $user->isAllowed( 'suppressionlog' ) ) {
$suppressLogPage = new LogPage( 'suppress' );
$output->addHTML( "<h2>" . $suppressLogPage->getName()->escaped() . "</h2>\n" );
LogEventsList::showLogExtract( $output, 'suppress',
*/
protected function showConvenienceLinks() {
# Give a link to the logs/hist for this page
- if( $this->targetObj ) {
+ if ( $this->targetObj ) {
$links = array();
$links[] = Linker::linkKnown(
SpecialPage::getTitleFor( 'Log' ),
array( 'action' => 'history' )
);
# Link to deleted edits
- if( $this->getUser()->isAllowed( 'undelete' ) ) {
+ if ( $this->getUser()->isAllowed( 'undelete' ) ) {
$undelete = SpecialPage::getTitleFor( 'Undelete' );
$links[] = Linker::linkKnown(
$undelete,
return;
}
$user = $this->getUser();
- if( !$oimage->userCan( File::DELETED_FILE, $user ) ) {
- if( $oimage->isDeleted( File::DELETED_RESTRICTED ) ) {
+ if ( !$oimage->userCan( File::DELETED_FILE, $user ) ) {
+ if ( $oimage->isDeleted( File::DELETED_RESTRICTED ) ) {
throw new PermissionsError( 'suppressrevision' );
} else {
throw new PermissionsError( 'deletedtext' );
for ( $list->reset(); $list->current(); $list->next() ) {
$item = $list->current();
if ( !$item->canView() ) {
- if( !$this->submitClicked ) {
+ if ( !$this->submitClicked ) {
throw new PermissionsError( 'suppressrevision' );
}
$UserAllowed = false;
$this->getOutput()->addHTML( $item->getHTML() );
}
- if( !$numRevisions ) {
+ if ( !$numRevisions ) {
throw new ErrorPageError( 'revdelete-nooldid-title', 'revdelete-nooldid-text' );
}
$this->addUsageText();
// Normal sysops can always see what they did, but can't always change it
- if( !$UserAllowed ) return;
+ if ( !$UserAllowed ) {
+ return;
+ }
// Show form if the user can submit
- if( $this->mIsAllowed ) {
+ if ( $this->mIsAllowed ) {
$out = Xml::openElement( 'form', array( 'method' => 'post',
'action' => $this->getTitle()->getLocalURL( array( 'action' => 'submit' ) ),
'id' => 'mw-revdel-form-revisions' ) ) .
} else {
$out = '';
}
- if( $this->mIsAllowed ) {
+ if ( $this->mIsAllowed ) {
$out .= Xml::closeElement( 'form' ) . "\n";
// Show link to edit the dropdown reasons
- if( $this->getUser()->isAllowed( 'editinterface' ) ) {
+ if ( $this->getUser()->isAllowed( 'editinterface' ) ) {
$title = Title::makeTitle( NS_MEDIAWIKI, 'Revdelete-reason-dropdown' );
$link = Linker::link(
$title,
*/
protected function addUsageText() {
$this->getOutput()->addWikiMsg( 'revdelete-text' );
- if( $this->getUser()->isAllowed( 'suppressrevision' ) ) {
+ if ( $this->getUser()->isAllowed( 'suppressrevision' ) ) {
$this->getOutput()->addWikiMsg( 'revdelete-suppress-text' );
}
- if( $this->mIsAllowed ) {
+ if ( $this->mIsAllowed ) {
$this->getOutput()->addWikiMsg( 'revdelete-confirm' );
}
}
$html = '<table>';
// If there is just one item, use checkboxes
$list = $this->getList();
- if( $list->length() == 1 ) {
+ if ( $list->length() == 1 ) {
$list->reset();
$bitfield = $list->current()->getBits(); // existing field
- if( $this->submitClicked ) {
+ if ( $this->submitClicked ) {
$bitfield = $this->extractBitfield( $this->extractBitParams(), $bitfield );
}
- foreach( $this->checks as $item ) {
+ foreach ( $this->checks as $item ) {
list( $message, $name, $field ) = $item;
$innerHTML = Xml::checkLabel( $this->msg( $message )->text(), $name, $name, $bitfield & $field );
- if( $field == Revision::DELETED_RESTRICTED )
+ if ( $field == Revision::DELETED_RESTRICTED ) {
$innerHTML = "<b>$innerHTML</b>";
+ }
$line = Xml::tags( 'td', array( 'class' => 'mw-input' ), $innerHTML );
$html .= "<tr>$line</tr>\n";
}
$html .= '<th class="mw-revdel-checkbox">' . $this->msg( 'revdelete-radio-unset' )->escaped() . '</th>';
$html .= '<th class="mw-revdel-checkbox">' . $this->msg( 'revdelete-radio-set' )->escaped() . '</th>';
$html .= "<th></th></tr>\n";
- foreach( $this->checks as $item ) {
+ foreach ( $this->checks as $item ) {
list( $message, $name, $field ) = $item;
// If there are several items, use third state by default...
- if( $this->submitClicked ) {
+ if ( $this->submitClicked ) {
$selected = $this->getRequest()->getInt( $name, 0 /* unchecked */ );
} else {
$selected = -1; // use existing field
$line .= '<td class="mw-revdel-checkbox">' . Xml::radio( $name, 0, $selected == 0 ) . '</td>';
$line .= '<td class="mw-revdel-checkbox">' . Xml::radio( $name, 1, $selected == 1 ) . '</td>';
$label = $this->msg( $message )->escaped();
- if( $field == Revision::DELETED_RESTRICTED ) {
+ if ( $field == Revision::DELETED_RESTRICTED ) {
$label = "<b>$label</b>";
}
$line .= "<td>$label</td>";
protected function submit() {
# Check edit token on submission
$token = $this->getRequest()->getVal( 'wpEditToken' );
- if( $this->submitClicked && !$this->getUser()->matchEditToken( $token ) ) {
+ if ( $this->submitClicked && !$this->getUser()->matchEditToken( $token ) ) {
$this->getOutput()->addWikiMsg( 'sessionfailure' );
return false;
}
$bitParams = $this->extractBitParams();
$listReason = $this->getRequest()->getText( 'wpRevDeleteReasonList', 'other' ); // from dropdown
$comment = $listReason;
- if( $comment != 'other' && $this->otherReason != '' ) {
+ if ( $comment != 'other' && $this->otherReason != '' ) {
// Entry from drop down menu + additional comment
$comment .= $this->msg( 'colon-separator' )->inContentLanguage()->text() . $this->otherReason;
- } elseif( $comment == 'other' ) {
+ } elseif ( $comment == 'other' ) {
$comment = $this->otherReason;
}
# Can the user set this field?
- if( $bitParams[Revision::DELETED_RESTRICTED] == 1 && !$this->getUser()->isAllowed( 'suppressrevision' ) ) {
+ if ( $bitParams[Revision::DELETED_RESTRICTED] == 1 && !$this->getUser()->isAllowed( 'suppressrevision' ) ) {
throw new PermissionsError( 'suppressrevision' );
}
# If the save went through, go to success message...
*/
protected function extractBitParams() {
$bitfield = array();
- foreach( $this->checks as $item ) {
+ foreach ( $this->checks as $item ) {
list( /* message */, $name, $field ) = $item;
$val = $this->getRequest()->getInt( $name, 0 /* unchecked */ );
- if( $val < -1 || $val > 1 ) {
+ if ( $val < -1 || $val > 1 ) {
$val = -1; // -1 for existing value
}
$bitfield[$field] = $val;
}
- if( !isset( $bitfield[Revision::DELETED_RESTRICTED] ) ) {
+ if ( !isset( $bitfield[Revision::DELETED_RESTRICTED] ) ) {
$bitfield[Revision::DELETED_RESTRICTED] = 0;
}
return $bitfield;
public static function extractBitfield( $bitPars, $oldfield ) {
// Build the actual new rev_deleted bitfield
$newBits = 0;
- foreach( $bitPars as $const => $val ) {
- if( $val == 1 ) {
+ foreach ( $bitPars as $const => $val ) {
+ if ( $val == 1 ) {
$newBits |= $const; // $const is the *_deleted const
- } elseif( $val == -1 ) {
+ } elseif ( $val == -1 ) {
$newBits |= ($oldfield & $const); // use existing
}
}
if ( $profile === null ) {
// BC with old request format
$profile = 'advanced';
- foreach( $profiles as $key => $data ) {
+ foreach ( $profiles as $key => $data ) {
if ( $nslist === $data['namespaces'] && $key !== 'advanced' ) {
$profile = $key;
}
# Try to go to page as entered.
$t = Title::newFromText( $term );
# If the string cannot be used to create a title
- if( is_null( $t ) ) {
+ if ( is_null( $t ) ) {
$this->showResults( $term );
return;
}
return;
}
- if( !is_null( $t ) ) {
+ if ( !is_null( $t ) ) {
$this->getOutput()->redirect( $t->getFullURL() );
return;
}
# No match, generate an edit URL
$t = Title::newFromText( $term );
- if( !is_null( $t ) ) {
+ if ( !is_null( $t ) ) {
global $wgGoToEdit;
wfRunHooks( 'SpecialSearchNogomatch', array( &$t ) );
wfDebugLog( 'nogomatch', $t->getText(), false );
# If the feature is enabled, go straight to the edit page
- if( $wgGoToEdit ) {
+ if ( $wgGoToEdit ) {
$this->getOutput()->redirect( $t->getFullURL( array( 'action' => 'edit' ) ) );
return;
}
$rewritten = $search->replacePrefixes( $term );
$titleMatches = $search->searchTitle( $rewritten );
- if( !( $titleMatches instanceof SearchResultTooMany ) ) {
+ if ( !( $titleMatches instanceof SearchResultTooMany ) ) {
$textMatches = $search->searchText( $rewritten );
}
$textStatus = null;
- if( $textMatches instanceof Status ) {
+ if ( $textMatches instanceof Status ) {
$textStatus = $textMatches;
$textMatches = null;
}
// did you mean... suggestions
- if( $textMatches && !$textStatus && $textMatches->hasSuggestion() ) {
+ if ( $textMatches && !$textStatus && $textMatches->hasSuggestion() ) {
$st = SpecialPage::getTitleFor( 'Search' );
# mirror Go/Search behavior of original request ..
$didYouMeanParams = array( 'search' => $textMatches->getSuggestionQuery() );
- if( $this->fulltext != null ) {
+ if ( $this->fulltext != null ) {
$didYouMeanParams['fulltext'] = $this->fulltext;
}
$suggestionSnippet = $textMatches->getSuggestionSnippet();
- if( $suggestionSnippet == '' ) {
+ if ( $suggestionSnippet == '' ) {
$suggestionSnippet = null;
}
);
// Sometimes the search engine knows there are too many hits
- if( $titleMatches instanceof SearchResultTooMany ) {
+ if ( $titleMatches instanceof SearchResultTooMany ) {
$out->wrapWikiMsg( "==$1==\n", 'toomanymatches' );
wfProfileOut( __METHOD__ );
return;
}
$filePrefix = $wgContLang->getFormattedNsText( NS_FILE ) . ':';
- if( trim( $term ) === '' || $filePrefix === trim( $term ) ) {
+ if ( trim( $term ) === '' || $filePrefix === trim( $term ) ) {
$out->addHTML( $this->formHeader( $term, 0, 0 ) );
$out->addHtml( $this->getProfileForm( $this->profile, $term ) );
$out->addHTML( '</form>' );
// get total number of results if backend can calculate it
$totalRes = 0;
- if( $titleMatches && !is_null( $titleMatches->getTotalHits() ) )
+ if ( $titleMatches && !is_null( $titleMatches->getTotalHits() ) ) {
$totalRes += $titleMatches->getTotalHits();
- if( $textMatches && !is_null( $textMatches->getTotalHits() ) )
+ }
+ if ( $textMatches && !is_null( $textMatches->getTotalHits() ) ) {
$totalRes += $textMatches->getTotalHits();
+ }
// show number of results and current offset
$out->addHTML( $this->formHeader( $term, $num, $totalRes ) );
$out->addHtml( "<div class='searchresults'>" );
// prev/next links
- if( $num || $this->offset ) {
+ if ( $num || $this->offset ) {
// Show the create link ahead
$this->showCreateLink( $t );
$prevnext = $this->getLanguage()->viewPrevNext( $this->getTitle(), $this->offset, $this->limit,
}
$out->parserOptions()->setEditSection( false );
- if( $titleMatches ) {
- if( $numTitleMatches > 0 ) {
+ if ( $titleMatches ) {
+ if ( $numTitleMatches > 0 ) {
$out->wrapWikiMsg( "==$1==\n", 'titlematches' );
$out->addHTML( $this->showMatches( $titleMatches ) );
}
$titleMatches->free();
}
- if( $textMatches && !$textStatus ) {
+ if ( $textMatches && !$textStatus ) {
// output appropriate heading
- if( $numTextMatches > 0 && $numTitleMatches > 0 ) {
+ if ( $numTextMatches > 0 && $numTitleMatches > 0 ) {
// if no title matches the heading is redundant
$out->wrapWikiMsg( "==$1==\n", 'textmatches' );
- } elseif( $totalRes == 0 ) {
+ } elseif ( $totalRes == 0 ) {
# Don't show the 'no text matches' if we received title matches
# $out->wrapWikiMsg( "==$1==\n", 'notextmatches' );
}
// show interwiki results if any
- if( $textMatches->hasInterwikiResults() ) {
+ if ( $textMatches->hasInterwikiResults() ) {
$out->addHTML( $this->showInterwiki( $textMatches->getInterwikiResults(), $term ) );
}
// show results
- if( $numTextMatches > 0 ) {
+ if ( $numTextMatches > 0 ) {
$out->addHTML( $this->showMatches( $textMatches ) );
}
$textMatches->free();
}
- if( $num === 0 ) {
+ if ( $num === 0 ) {
if ( $textStatus ) {
$out->addHTML( '<div class="error">' .
htmlspecialchars( $textStatus->getWikiText( 'search-error' ) ) . '</div>' );
}
$out->addHtml( "</div>" );
- if( $num || $this->offset ) {
+ if ( $num || $this->offset ) {
$out->addHTML( "<p class='mw-search-pager-bottom'>{$prevnext}</p>\n" );
}
wfRunHooks( 'SpecialSearchResultsAppend', array( $this, $out, $term ) );
// show direct page/create link if applicable
// Check DBkey !== '' in case of fragment link only.
- if( is_null( $t ) || $t->getDBkey() === '' ) {
+ if ( is_null( $t ) || $t->getDBkey() === '' ) {
// invalid title
// preserve the paragraph for margins etc...
$this->getOutput()->addHtml( '<p></p>' );
return;
}
- if( $t->isKnown() ) {
+ if ( $t->isKnown() ) {
$messageName = 'searchmenu-exists';
- } elseif( $t->userCan( 'create', $this->getUser() ) ) {
+ } elseif ( $t->userCan( 'create', $this->getUser() ) ) {
$messageName = 'searchmenu-new';
} else {
$messageName = 'searchmenu-new-nocreate';
wfRunHooks( 'SpecialSearchCreateLink', array( $t, &$params ) );
// Extensions using the hook might still return an empty $messageName
- if( $messageName ) {
+ if ( $messageName ) {
$this->getOutput()->wrapWikiMsg( "<p class=\"mw-search-createlink\">\n$1</p>", $params );
} else {
// preserve the paragraph for margins etc...
*/
protected function setupPage( $term ) {
# Should advanced UI be used?
- $this->searchAdvanced = ($this->profile === 'advanced');
+ $this->searchAdvanced = ( $this->profile === 'advanced' );
$out = $this->getOutput();
- if( strval( $term ) !== '' ) {
+ if ( strval( $term ) !== '' ) {
$out->setPageTitle( $this->msg( 'searchresults' ) );
$out->setHTMLTitle( $this->msg( 'pagetitle' )->rawParams(
$this->msg( 'searchresults-title' )->rawParams( $term )->text()
*/
protected function powerSearch( &$request ) {
$arr = array();
- foreach( SearchEngine::searchableNamespaces() as $ns => $name ) {
- if( $request->getCheck( 'ns' . $ns ) ) {
+ foreach ( SearchEngine::searchableNamespaces() as $ns => $name ) {
+ if ( $request->getCheck( 'ns' . $ns ) ) {
$arr[] = $ns;
}
}
protected function powerSearchOptions() {
$opt = array();
$opt['redirs'] = $this->searchRedirects ? 1 : 0;
- if( $this->profile !== 'advanced' ) {
+ if ( $this->profile !== 'advanced' ) {
$opt['profile'] = $this->profile;
} else {
- foreach( $this->namespaces as $n ) {
+ foreach ( $this->namespaces as $n ) {
$opt['ns' . $n] = 1;
}
}
$out = "";
$infoLine = $matches->getInfo();
- if( !is_null( $infoLine ) ) {
+ if ( !is_null( $infoLine ) ) {
$out .= "\n<!-- {$infoLine} -->\n";
}
$out .= "<ul class='mw-search-results'>\n";
$result = $matches->next();
- while( $result ) {
+ while ( $result ) {
$out .= $this->showHit( $result, $terms );
$result = $matches->next();
}
protected function showHit( $result, $terms ) {
wfProfileIn( __METHOD__ );
- if( $result->isBrokenTitle() ) {
+ if ( $result->isBrokenTitle() ) {
wfProfileOut( __METHOD__ );
return "<!-- Broken link in search result -->\n";
}
$titleSnippet = $result->getTitleSnippet( $terms );
- if( $titleSnippet == '' )
+ if ( $titleSnippet == '' ) {
$titleSnippet = null;
+ }
$link_t = clone $t;
//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( !$t->userCan( 'read', $this->getUser() ) ) {
+ if ( !$t->userCan( 'read', $this->getUser() ) ) {
wfProfileOut( __METHOD__ );
return "<li>{$link}</li>\n";
}
// If the page doesn't *exist*... our search index is out of date.
// The least confusing at this point is to drop the result.
// You may get less results, but... oh well. :P
- if( $result->isMissingRevision() ) {
+ if ( $result->isMissingRevision() ) {
wfProfileOut( __METHOD__ );
return "<!-- missing page " . htmlspecialchars( $t->getPrefixedText() ) . "-->\n";
}
$sectionText = $result->getSectionSnippet( $terms );
$redirect = '';
- if( !is_null( $redirectTitle ) ) {
- if( $redirectText == '' )
+ if ( !is_null( $redirectTitle ) ) {
+ if ( $redirectText == '' ) {
$redirectText = null;
+ }
$redirect = "<span class='searchalttitle'>" .
$this->msg( 'search-redirect' )->rawParams(
$section = '';
- if( !is_null( $sectionTitle ) ) {
- if( $sectionText == '' )
+ if ( !is_null( $sectionTitle ) ) {
+ if ( $sectionText == '' ) {
$sectionText = null;
+ }
$section = "<span class='searchalttitle'>" .
$this->msg( 'search-section' )->rawParams(
$lang = $this->getLanguage();
// format score
- if( is_null( $result->getScore() ) ) {
+ if ( is_null( $result->getScore() ) ) {
// Search engine doesn't report scoring info
$score = '';
} else {
$size = $this->msg( 'search-result-size', $lang->formatSize( $byteSize ) )
->numParams( $wordCount )->escaped();
- if( $t->getNamespace() == NS_CATEGORY ) {
+ if ( $t->getNamespace() == NS_CATEGORY ) {
$cat = Category::newFromTitle( $t );
$size = $this->msg( 'search-result-category-size' )
->numParams( $cat->getPageCount(), $cat->getSubcatCount(), $cat->getFileCount() )
// link to related articles if supported
$related = '';
- if( $result->hasRelated() ) {
+ if ( $result->hasRelated() ) {
$st = SpecialPage::getTitleFor( 'Search' );
$stParams = array_merge(
$this->powerSearchOptions(),
}
// Include a thumbnail for media files...
- if( $t->getNamespace() == NS_FILE ) {
+ if ( $t->getNamespace() == NS_FILE ) {
$img = wfFindFile( $t );
- if( $img ) {
+ if ( $img ) {
$thumb = $img->transform( array( 'width' => 120, 'height' => 120 ) );
- if( $thumb ) {
+ if ( $thumb ) {
$desc = $this->msg( 'parentheses' )->rawParams( $img->getShortDesc() )->escaped();
wfProfileOut( __METHOD__ );
// Float doesn't seem to interact well with the bullets.
// work out custom project captions
$customCaptions = array();
$customLines = explode( "\n", $this->msg( 'search-interwiki-custom' )->text() ); // format per line <iwprefix>:<caption>
- foreach( $customLines as $line ) {
+ foreach ( $customLines as $line ) {
$parts = explode( ":", $line, 2 );
- if( count( $parts ) == 2 ) { // validate line
+ if ( count( $parts ) == 2 ) { // validate line
$customCaptions[$parts[0]] = $parts[1];
}
}
$prev = null;
$result = $matches->next();
- while( $result ) {
+ while ( $result ) {
$out .= $this->showInterwikiHit( $result, $prev, $terms, $query, $customCaptions );
$prev = $result->getInterwikiPrefix();
$result = $matches->next();
*
* @return string
*/
- protected function showInterwikiHit( $result, $lastInterwiki, $terms, $query, $customCaptions) {
+ protected function showInterwikiHit( $result, $lastInterwiki, $terms, $query, $customCaptions ) {
wfProfileIn( __METHOD__ );
- if( $result->isBrokenTitle() ) {
+ if ( $result->isBrokenTitle() ) {
wfProfileOut( __METHOD__ );
return "<!-- Broken link in search result -->\n";
}
$titleSnippet = $result->getTitleSnippet( $terms );
- if( $titleSnippet == '' )
+ if ( $titleSnippet == '' ) {
$titleSnippet = null;
+ }
$link = Linker::linkKnown(
$t,
$redirectTitle = $result->getRedirectTitle();
$redirectText = $result->getRedirectSnippet( $terms );
$redirect = '';
- if( !is_null( $redirectTitle ) ) {
- if( $redirectText == '' )
+ if ( !is_null( $redirectTitle ) ) {
+ if ( $redirectText == '' ) {
$redirectText = null;
+ }
$redirect = "<span class='searchalttitle'>" .
$this->msg( 'search-redirect' )->rawParams(
$out = "";
// display project name
- if( is_null( $lastInterwiki ) || $lastInterwiki != $t->getInterwiki() ) {
- if( array_key_exists( $t->getInterwiki(), $customCaptions ) ) {
+ if ( is_null( $lastInterwiki ) || $lastInterwiki != $t->getInterwiki() ) {
+ if ( array_key_exists( $t->getInterwiki(), $customCaptions ) ) {
// captions from 'search-interwiki-custom'
$caption = $customCaptions[$t->getInterwiki()];
} else {
protected function powerSearchBox( $term, $opts ) {
// Groups namespaces into rows according to subject
$rows = array();
- foreach( SearchEngine::searchableNamespaces() as $namespace => $name ) {
+ foreach ( SearchEngine::searchableNamespaces() as $namespace => $name ) {
$subject = MWNamespace::getSubject( $namespace );
- if( !array_key_exists( $subject, $rows ) ) {
+ if ( !array_key_exists( $subject, $rows ) ) {
$rows[$subject] = "";
}
$name = str_replace( '_', ' ', $name );
- if( $name == '' ) {
+ if ( $name == '' ) {
$name = $this->msg( 'blanknamespace' )->text();
}
$rows[$subject] .=
// Lays out namespaces in multiple floating two-column tables so they'll
// be arranged nicely while still accommodating different screen widths
$namespaceTables = '';
- for( $i = 0; $i < $numRows; $i += 4 ) {
+ for ( $i = 0; $i < $numRows; $i += 4 ) {
$namespaceTables .= Xml::openElement(
'table',
array( 'cellpadding' => 0, 'cellspacing' => 0 )
);
- for( $j = $i; $j < $i + 4 && $j < $numRows; $j++ ) {
+ for ( $j = $i; $j < $i + 4 && $j < $numRows; $j++ ) {
$namespaceTables .= Xml::tags( 'tr', null, $rows[$j] );
}
$namespaceTables .= Xml::closeElement( 'table' );
$showSections = array( 'namespaceTables' => $namespaceTables );
// Show redirects check only if backend supports it
- if( $this->getSearchEngine()->supports( 'list-redirects' ) ) {
+ if ( $this->getSearchEngine()->supports( 'list-redirects' ) ) {
$showSections['redirects'] =
Xml::checkLabel( $this->msg( 'powersearch-redir' )->text(), 'redirs', 'redirs', $this->searchRedirects );
}
$hidden = '';
unset( $opts['redirs'] );
- foreach( $opts as $key => $value ) {
+ foreach ( $opts as $key => $value ) {
$hidden .= Html::hidden( $key, $value );
}
// Return final output
wfRunHooks( 'SpecialSearchProfiles', array( &$profiles ) );
- foreach( $profiles as &$data ) {
- if ( !is_array( $data['namespaces'] ) ) continue;
+ foreach ( $profiles as &$data ) {
+ if ( !is_array( $data['namespaces'] ) ) {
+ continue;
+ }
sort( $data['namespaces'] );
}
$out = Xml::openElement( 'div', array( 'class' => 'mw-search-formheader' ) );
$bareterm = $term;
- if( $this->startsWithImage( $term ) ) {
+ if ( $this->startsWithImage( $term ) ) {
// Deletes prefixes
$bareterm = substr( $term, strpos( $term, ':' ) + 1 );
}
*/
protected function makeSearchLink( $term, $namespaces, $label, $tooltip, $params = array() ) {
$opt = $params;
- foreach( $namespaces as $n ) {
+ foreach ( $namespaces as $n ) {
$opt['ns' . $n] = 1;
}
$opt['redirs'] = $this->searchRedirects;
global $wgContLang;
$p = explode( ':', $term );
- if( count( $p ) > 1 ) {
+ if ( count( $p ) > 1 ) {
return $wgContLang->getNsIndex( $p[0] ) == NS_FILE;
}
return false;
$allkeyword = $this->msg( 'searchall' )->inContentLanguage()->text();
$p = explode( ':', $term );
- if( count( $p ) > 1 ) {
+ if ( count( $p ) > 1 ) {
return $p[0] == $allkeyword;
}
return false;
$pages = SpecialPageFactory::getUsablePages( $this->getUser() );
- if( !count( $pages ) ) {
+ if ( !count( $pages ) ) {
# Yeah, that was pointless. Thanks for coming.
return false;
}
foreach ( $pages as $page ) {
if ( $page->isListed() ) {
$group = $page->getFinalGroupName();
- if( !isset( $groups[$group] ) ) {
+ if ( !isset( $groups[$group] ) ) {
$groups[$group] = array();
}
$groups[$group][$page->getDescription()] = array(
/** Sort */
if ( $wgSortSpecialPages ) {
- foreach( $groups as $group => $sortedPages ) {
+ foreach ( $groups as $group => $sortedPages ) {
ksort( $groups[$group] );
}
}
/** Always move "other" to end */
- if( array_key_exists( 'other', $groups ) ) {
+ if ( array_key_exists( 'other', $groups ) ) {
$other = $groups['other'];
unset( $groups['other'] );
$groups['other'] = $other;
Html::openElement( 'td', array( 'style' => 'width:30%;vertical-align:top' ) ) . "\n" .
Html::openElement( 'ul' ) . "\n"
);
- foreach( $sortedPages as $desc => $specialpage ) {
+ foreach ( $sortedPages as $desc => $specialpage ) {
list( $title, $restricted, $cached ) = $specialpage;
$pageClasses = array();
$includesCachedPages = true;
$pageClasses[] = 'mw-specialpagecached';
}
- if( $restricted ) {
+ if ( $restricted ) {
$includesRestrictedPages = true;
$pageClasses[] = 'mw-specialpagerestricted';
}
# Split up the larger groups
$count++;
- if( $total > 3 && $count == $middle ) {
+ if ( $total > 3 && $count == $middle ) {
$out->addHTML(
Html::closeElement( 'ul' ) . Html::closeElement( 'td' ) .
Html::element( 'td', array( 'style' => 'width:10%' ), '' ) .
# Staticic - views
$viewsStats = '';
- if( !$wgDisableCounters ) {
+ if ( !$wgDisableCounters ) {
$viewsStats = $this->getViewsStats();
}
# Set active user count
- if( !$wgMiserMode ) {
+ if ( !$wgMiserMode ) {
$key = wfMemcKey( 'sitestats', 'activeusers-updated' );
// Re-calculate the count if the last tally is old...
- if( !$wgMemc->get( $key ) ) {
+ if ( !$wgMemc->get( $key ) ) {
$dbw = wfGetDB( DB_MASTER );
SiteStatsUpdate::cacheUpdate( $dbw );
$wgMemc->set( $key, '1', 24 * 3600 ); // don't update for 1 day
$text .= $viewsStats;
# Statistic - popular pages
- if( !$wgDisableCounters && !$wgMiserMode ) {
+ if ( !$wgDisableCounters && !$wgMiserMode ) {
$text .= $this->getMostViewedPages();
}
# Statistic - other
$extraStats = array();
- if( wfRunHooks( 'SpecialStatsAddExtra', array( &$extraStats ) ) ) {
+ if ( wfRunHooks( 'SpecialStatsAddExtra', array( &$extraStats ) ) ) {
$text .= $this->getOtherStats( $extraStats );
}
* @return string table row in HTML format
*/
private function formatRow( $text, $number, $trExtraParams = array(), $descMsg = '', $descMsgParam = '' ) {
- if( $descMsg ) {
+ if ( $descMsg ) {
$msg = $this->msg( $descMsg, $descMsgParam );
if ( $msg->exists() ) {
$descriptionText = $this->msg( 'parentheses' )->rawParams( $msg->parse() )->escaped();
- $text .= "<br />" . Xml::element( 'small', array( 'class' => 'mw-statistic-desc'),
+ $text .= "<br />" . Xml::element( 'small', array( 'class' => 'mw-statistic-desc' ),
" $descriptionText" );
}
}
private function getGroupStats() {
global $wgGroupPermissions, $wgImplicitGroups;
$text = '';
- foreach( $wgGroupPermissions as $group => $permissions ) {
+ foreach ( $wgGroupPermissions as $group => $permissions ) {
# Skip generic * and implicit groups
if ( in_array( $group, $wgImplicitGroups ) || $group == '*' ) {
continue;
# Add a class when a usergroup contains no members to allow hiding these rows
$classZero = '';
$countUsers = SiteStats::numberingroup( $groupname );
- if( $countUsers == 0 ) {
+ if ( $countUsers == 0 ) {
$classZero = ' statistics-group-zero';
}
$text .= $this->formatRow( $grouppage . ' ' . $grouplink,
'LIMIT' => 10,
)
);
- if( $res->numRows() > 0 ) {
+ if ( $res->numRows() > 0 ) {
$text .= Xml::openElement( 'tr' );
$text .= Xml::tags( 'th', array( 'colspan' => '2' ), $this->msg( 'statistics-mostpopular' )->parse() );
$text .= Xml::closeElement( 'tr' );
foreach ( $res as $row ) {
$title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
- if( $title instanceof Title ) {
+ if ( $title instanceof Title ) {
$text .= $this->formatRow( Linker::link( $title ),
$this->getLanguage()->formatNum( $row->page_counter ) );
private function getOtherStats( array $stats ) {
$return = '';
- foreach( $stats as $header => $items ) {
-
+ foreach ( $stats as $header => $items ) {
// Identify the structure used
if ( is_array( $items ) ) {
}
// Collect all items that belong to the same header
- foreach( $items as $key => $value ) {
+ foreach ( $items as $key => $value ) {
$name = $this->msg( $key )->inContentLanguage()->parse();
$number = htmlspecialchars( $value );
$html .= $this->doTagRow( $row->ct_tag, $row->hitcount );
}
- foreach( ChangeTags::listDefinedTags() as $tag ) {
+ foreach ( ChangeTags::listDefinedTags() as $tag ) {
$html .= $this->doTagRow( $tag, 0 );
}
$form->setSubmitTextMsg( 'ipusubmit' );
$form->addPreText( $this->msg( 'unblockiptext' )->parseAsBlock() );
- if( $form->show() ) {
+ if ( $form->show() ) {
switch( $this->type ) {
case Block::TYPE_USER:
case Block::TYPE_IP:
)
);
- if( $this->block instanceof Block ) {
+ if ( $this->block instanceof Block ) {
list( $target, $type ) = $this->block->getTargetAndType();
# Autoblocks are logged as "autoblock #123 because the IP was recently used by
# User:Foo, and we've just got any block, auto or not, that applies to a target
# the user has specified. Someone could be fishing to connect IPs to autoblocks,
# so don't show any distinction between unblocked IPs and autoblocked IPs
- if( $type == Block::TYPE_AUTO && $this->type == Block::TYPE_IP ) {
+ if ( $type == Block::TYPE_AUTO && $this->type == Block::TYPE_IP ) {
$fields['Target']['default'] = $this->target;
unset( $fields['Name'] );
$target = $data['Target'];
$block = Block::newFromTarget( $data['Target'] );
- if( !$block instanceof Block ) {
+ if ( !$block instanceof Block ) {
return array( array( 'ipb_cant_unblock', $target ) );
}
# If the specified IP is a single address, and the block is a range block, don't
# unblock the whole range.
list( $target, $type ) = SpecialBlock::getTargetAndType( $target );
- if( $block->getType() == Block::TYPE_RANGE && $type == Block::TYPE_IP ) {
+ if ( $block->getType() == Block::TYPE_RANGE && $type == Block::TYPE_IP ) {
$range = $block->getTarget();
return array( array( 'ipb_blocked_as_range', $target, $range ) );
}
# If the name was hidden and the blocking user cannot hide
# names, then don't allow any block removals...
- if( !$performer->isAllowed( 'hideuser' ) && $block->mHideName ) {
+ if ( !$performer->isAllowed( 'hideuser' ) && $block->mHideName ) {
return array( 'unblock-hideuser' );
}
}
# Unset _deleted fields as needed
- if( $block->mHideName ) {
+ if ( $block->mHideName ) {
# Something is deeply FUBAR if this is not a User object, but who knows?
$id = $block->getTarget() instanceof User
? $block->getTarget()->getID()
function getOrderFields() {
// For some crazy reason ordering by a constant
// causes a filesort
- if( $this->requestedNamespace === false && count( MWNamespace::getContentNamespaces() ) > 1 )
+ if ( $this->requestedNamespace === false && count( MWNamespace::getContentNamespaces() ) > 1 ) {
return array( 'page_namespace', 'page_title' );
+ }
return array( 'page_title' );
}
// Guess the desired name from the filename if not provided
$this->mDesiredDestName = $request->getText( 'wpDestFile' );
- if( !$this->mDesiredDestName && $request->getFileName( 'wpUploadFile' ) !== null ) {
+ if ( !$this->mDesiredDestName && $request->getFileName( 'wpUploadFile' ) !== null ) {
$this->mDesiredDestName = $request->getFileName( 'wpUploadFile' );
}
$this->mComment = $request->getText( 'wpUploadDescription' );
$this->outputHeader();
# Check uploading enabled
- if( !UploadBase::isEnabled() ) {
+ if ( !UploadBase::isEnabled() ) {
throw new ErrorPageError( 'uploaddisabled', 'uploaddisabledtext' );
}
# Check permissions
$user = $this->getUser();
$permissionRequired = UploadBase::isAllowed( $user );
- if( $permissionRequired !== true ) {
+ if ( $permissionRequired !== true ) {
throw new PermissionsError( $permissionRequired );
}
# Check blocks
- if( $user->isBlocked() ) {
+ if ( $user->isBlocked() ) {
throw new UserBlockedError( $user->getBlock() );
}
$this->processUpload();
} else {
# Backwards compatibility hook
- if( !wfRunHooks( 'UploadForm:initial', array( &$this ) ) ) {
+ if ( !wfRunHooks( 'UploadForm:initial', array( &$this ) ) ) {
wfDebug( "Hook 'UploadForm:initial' broke output of the upload form" );
return;
}
$form->setTitle( $this->getTitle() );
# Check the token, but only if necessary
- if(
+ if (
!$this->mTokenOk && !$this->mCancelUpload &&
( $this->mUpload && $this->mUploadClicked )
) {
$title = Title::makeTitleSafe( NS_FILE, $this->mDesiredDestName );
$user = $this->getUser();
// Show a subtitle link to deleted revisions (to sysops et al only)
- if( $title instanceof Title ) {
+ if ( $title instanceof Title ) {
$count = $title->isDeleted();
if ( $count > 0 && $user->isAllowed( 'deletedhistory' ) ) {
$restorelink = Linker::linkKnown(
$warningHtml = '<h2>' . $this->msg( 'uploadwarning' )->escaped() . "</h2>\n"
. '<ul class="warning">';
- foreach( $warnings as $warning => $args ) {
- if( $warning == 'badfilename' ) {
+ foreach ( $warnings as $warning => $args ) {
+ if ( $warning == 'badfilename' ) {
$this->mDesiredDestName = Title::makeTitle( NS_FILE, $args )->getText();
}
- if( $warning == 'exists' ) {
+ if ( $warning == 'exists' ) {
$msg = "\t<li>" . self::getExistsWarning( $args ) . "</li>\n";
- } elseif( $warning == 'duplicate' ) {
+ } elseif ( $warning == 'duplicate' ) {
$msg = self::getDupeWarning( $args );
- } elseif( $warning == 'duplicate-archive' ) {
+ } elseif ( $warning == 'duplicate-archive' ) {
$msg = "\t<li>" . $this->msg( 'file-deleted-duplicate',
Title::makeTitle( NS_FILE, $args )->getPrefixedText() )->parse()
. "</li>\n";
protected function processUpload() {
// Fetch the file if required
$status = $this->mUpload->fetchFile();
- if( !$status->isOK() ) {
+ if ( !$status->isOK() ) {
$this->showUploadError( $this->getOutput()->parse( $status->getWikiText() ) );
return;
}
- if( !wfRunHooks( 'UploadForm:BeforeProcessing', array( &$this ) ) ) {
+ if ( !wfRunHooks( 'UploadForm:BeforeProcessing', array( &$this ) ) ) {
wfDebug( "Hook 'UploadForm:BeforeProcessing' broke processing the file.\n" );
// This code path is deprecated. If you want to break upload processing
// do so by hooking into the appropriate hooks in UploadBase::verifyUpload
// Verify permissions for this title
$permErrors = $this->mUpload->verifyTitlePermissions( $this->getUser() );
- if( $permErrors !== true ) {
+ if ( $permErrors !== true ) {
$code = array_shift( $permErrors[0] );
$this->showRecoverableUploadError( $this->msg( $code, $permErrors[0] )->parse() );
return;
$this->mLocalFile = $this->mUpload->getLocalFile();
// Check warnings if necessary
- if( !$this->mIgnoreWarning ) {
+ if ( !$this->mIgnoreWarning ) {
$warnings = $this->mUpload->checkWarnings();
- if( $this->showUploadWarning( $warnings ) ) {
+ if ( $this->showUploadWarning( $warnings ) ) {
return;
}
}
// Get the page text if this is not a reupload
- if( !$this->mForReUpload ) {
+ if ( !$this->mForReUpload ) {
$pageText = self::getInitialPageText( $this->mComment, $this->mLicense,
$this->mCopyrightStatus, $this->mCopyrightSource );
} else {
* Thus, forcing them as content messages makes the upload to produce an int: template
* instead of hardcoding it there in the uploader language.
*/
- foreach( array( 'license-header', 'filedesc', 'filestatus', 'filesource' ) as $msgName ) {
+ foreach ( array( 'license-header', 'filedesc', 'filestatus', 'filesource' ) as $msgName ) {
if ( in_array( $msgName, $wgForceUIMsgAsContentMsg ) ) {
$msg[$msgName] = "{{int:$msgName}}";
} else {
* @return Bool|String
*/
protected function getWatchCheck() {
- if( $this->getUser()->getOption( 'watchdefault' ) ) {
+ if ( $this->getUser()->getOption( 'watchdefault' ) ) {
// Watch all edits!
return true;
}
$local = wfLocalFile( $this->mDesiredDestName );
- if( $local && $local->exists() ) {
+ if ( $local && $local->exists() ) {
// We're uploading a new version of an existing file.
// No creation, so don't watch it if we're not already.
return $this->getUser()->isWatched( $local->getTitle() );
$filename = $file->getTitle()->getPrefixedText();
$warning = '';
- if( $exists['warning'] == 'exists' ) {
+ if ( $exists['warning'] == 'exists' ) {
// Exact match
$warning = wfMessage( 'fileexists', $filename )->parse();
- } elseif( $exists['warning'] == 'page-exists' ) {
+ } elseif ( $exists['warning'] == 'page-exists' ) {
// Page exists but file does not
$warning = wfMessage( 'filepageexists', $filename )->parse();
} elseif ( $exists['warning'] == 'exists-normalized' ) {
*/
public static function ajaxGetExistsWarning( $filename ) {
$file = wfFindFile( $filename );
- if( !$file ) {
+ if ( !$file ) {
// Force local file so we have an object to do further checks against
// if there isn't an exact match...
$file = wfLocalFile( $filename );
$gallery = new ImageGallery;
$gallery->setShowBytes( false );
- foreach( $dupes as $file ) {
+ foreach ( $dupes as $file ) {
$gallery->add( $file->getTitle() );
}
return '<li>' .
global $wgCheckFileExtensions, $wgStrictFileExtensions,
$wgFileExtensions, $wgFileBlacklist;
- if( $wgCheckFileExtensions ) {
- if( $wgStrictFileExtensions ) {
+ if ( $wgCheckFileExtensions ) {
+ if ( $wgStrictFileExtensions ) {
# Everything not permitted is banned
$extensionsList =
'<div id="mw-upload-permitted">' .
global $wgUploadStashScalerBaseUrl;
$scalerBaseUrl = $wgUploadStashScalerBaseUrl;
- if( preg_match( '/^\/\//', $scalerBaseUrl ) ) {
+ if ( preg_match( '/^\/\//', $scalerBaseUrl ) ) {
// this is apparently a protocol-relative URL, which makes no sense in this context,
// since this is used for communication that's internal to the application.
// default to http.
$this->mReturnTo = $request->getVal( 'returnto', '' );
$this->mReturnToQuery = $request->getVal( 'returntoquery', '' );
- if( $wgEnableEmail ) {
+ if ( $wgEnableEmail ) {
$this->mEmail = $request->getText( 'wpEmail' );
} else {
$this->mEmail = '';
}
- if( !in_array( 'realname', $wgHiddenPrefs ) ) {
+ if ( !in_array( 'realname', $wgHiddenPrefs ) ) {
$this->mRealName = $request->getText( 'wpRealName' );
} else {
$this->mRealName = '';
}
- if( !$wgAuth->validDomain( $this->mDomain ) ) {
+ if ( !$wgAuth->validDomain( $this->mDomain ) ) {
$this->mDomain = $wgAuth->getDomain();
}
$wgAuth->setDomain( $this->mDomain );
# 2. Do not return to PasswordReset after a successful password change
# but goto Wiki start page (Main_Page) instead ( bug 33997 )
$returnToTitle = Title::newFromText( $this->mReturnTo );
- if( is_object( $returnToTitle ) && (
+ if ( is_object( $returnToTitle ) && (
$returnToTitle->isSpecial( 'Userlogout' )
|| $returnToTitle->isSpecial( 'PasswordReset' ) ) ) {
$this->mReturnTo = '';
if ( !is_null( $this->mCookieCheck ) ) {
$this->onCookieRedirectCheck( $this->mCookieCheck );
return;
- } elseif( $this->mPosted ) {
- if( $this->mCreateaccount ) {
+ } elseif ( $this->mPosted ) {
+ if ( $this->mCreateaccount ) {
$this->addNewAccount();
return;
} elseif ( $this->mCreateaccountMail ) {
}
$status = $this->addNewaccountInternal();
- if( !$status->isGood() ) {
+ if ( !$status->isGood() ) {
$error = $this->getOutput()->parse( $status->getWikiText() );
$this->mainLoginForm( $error );
return;
$out = $this->getOutput();
$out->setPageTitle( $this->msg( 'accmailtitle' ) );
- if( !$result->isGood() ) {
+ if ( !$result->isGood() ) {
$this->mainLoginForm( $this->msg( 'mailerror', $result->getWikiText() )->text() );
} else {
$out->addWikiMsg( 'accmailtext', $u->getName(), $u->getEmail() );
# Create the account and abort if there's a problem doing so
$status = $this->addNewAccountInternal();
- if( !$status->isGood() ) {
+ if ( !$status->isGood() ) {
$error = $this->getOutput()->parse( $status->getWikiText() );
$this->mainLoginForm( $error );
return false;
if ( $this->getUser()->isAnon() ) {
# If we showed up language selection links, and one was in use, be
# smart (and sensible) and save that language as the user's preference
- if( $wgLoginLanguageSelector && $this->mLanguage ) {
+ if ( $wgLoginLanguageSelector && $this->mLanguage ) {
$u->setOption( 'language', $this->mLanguage );
} else {
$out = $this->getOutput();
# Send out an email authentication message if needed
- if( $wgEmailAuthentication && Sanitizer::validateEmail( $u->getEmail() ) ) {
+ if ( $wgEmailAuthentication && Sanitizer::validateEmail( $u->getEmail() ) ) {
$status = $u->sendConfirmationMail();
- if( $status->isGood() ) {
+ if ( $status->isGood() ) {
$out->addWikiMsg( 'confirmemail_oncreate' );
} else {
$out->addWikiText( $status->getWikiText( 'confirmemail_sendfailed' ) );
# If not logged in, assume the new account as the current one and set
# session cookies then show a "welcome" message or a "need cookies"
# message as needed
- if( $this->getUser()->isAnon() ) {
+ if ( $this->getUser()->isAnon() ) {
$u->setCookies();
$wgUser = $u;
// This should set it for OutputPage and the Skin
$this->getContext()->setUser( $u );
wfRunHooks( 'AddNewAccount', array( $u, false ) );
$u->addNewUserLogEntry( 'create' );
- if( $this->hasSessionCookie() ) {
+ if ( $this->hasSessionCookie() ) {
$this->successfulCreation();
} else {
$this->cookieRedirectCheck( 'new' );
$wgMinimalPasswordLength, $wgEmailConfirmToEdit;
// If the user passes an invalid domain, something is fishy
- if( !$wgAuth->validDomain( $this->mDomain ) ) {
+ if ( !$wgAuth->validDomain( $this->mDomain ) ) {
return Status::newFatal( 'wrongpassword' );
}
// cation server before they create an account (otherwise, they can
// create a local account and login as any domain user). We only need
// to check this for domains that aren't local.
- if( 'local' != $this->mDomain && $this->mDomain != '' ) {
- if(
+ if ( 'local' != $this->mDomain && $this->mDomain != '' ) {
+ if (
!$wgAuth->canCreateAccounts() &&
(
!$wgAuth->userExists( $this->mUsername ) ||
$u->setRealName( $this->mRealName );
$abortError = '';
- if( !wfRunHooks( 'AbortNewAccount', array( $u, &$abortError ) ) ) {
+ if ( !wfRunHooks( 'AbortNewAccount', array( $u, &$abortError ) ) ) {
// Hook point to add extra creation throttles and blocks
wfDebug( "LoginForm::addNewAccountInternal: a hook blocked creation\n" );
return Status::newFatal( new RawMessage( $abortError ) );
}
}
- if( !$wgAuth->addUser( $u, $this->mPassword, $this->mEmail, $this->mRealName ) ) {
+ if ( !$wgAuth->addUser( $u, $this->mPassword, $this->mEmail, $this->mRealName ) ) {
return Status::newFatal( 'externaldberror' );
}
}
$u = User::newFromName( $this->mUsername );
- if( !( $u instanceof User ) || !User::isUsableName( $u->getName() ) ) {
+ if ( !( $u instanceof User ) || !User::isUsableName( $u->getName() ) ) {
return self::ILLEGAL;
}
// Give general extensions, such as a captcha, a chance to abort logins
$abort = self::ABORTED;
- if( !wfRunHooks( 'AbortLogin', array( $u, $this->mPassword, &$abort, &$this->mAbortLoginErrorMsg ) ) ) {
+ if ( !wfRunHooks( 'AbortLogin', array( $u, $this->mPassword, &$abort, &$this->mAbortLoginErrorMsg ) ) ) {
return $abort;
}
global $wgBlockDisablesLogin;
if ( !$u->checkPassword( $this->mPassword ) ) {
- if( $u->checkTemporaryPassword( $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-
// 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() ) {
+ if ( !$u->isEmailConfirmed() ) {
$u->confirmEmail();
$u->saveSettings();
}
}
$abortError = '';
- if( !wfRunHooks( 'AbortAutoAccount', array( $user, &$abortError ) ) ) {
+ if ( !wfRunHooks( 'AbortAutoAccount', array( $user, &$abortError ) ) ) {
// Hook point to add extra creation throttles and blocks
wfDebug( "LoginForm::attemptAutoCreate: a hook blocked creation: $abortError\n" );
$this->mAbortLoginErrorMsg = $abortError;
case self::SUCCESS:
# We've verified now, update the real record
$user = $this->getUser();
- if( (bool)$this->mRemember != $user->getBoolOption( 'rememberpassword' ) ) {
+ if ( (bool)$this->mRemember != $user->getBoolOption( 'rememberpassword' ) ) {
$user->setOption( 'rememberpassword', $this->mRemember ? 1 : 0 );
$user->saveSettings();
} else {
$user->invalidateCache();
}
- if( $wgSecureLogin && !$this->mStickHTTPS ) {
+ if ( $wgSecureLogin && !$this->mStickHTTPS ) {
$user->setCookies( null, false );
} else {
$user->setCookies();
$key = wfMemcKey( 'password-throttle', $request->getIP(), md5( $this->mUsername ) );
$wgMemc->delete( $key );
- if( $this->hasSessionCookie() || $this->mSkipCookieCheck ) {
+ if ( $this->hasSessionCookie() || $this->mSkipCookieCheck ) {
/* Replace the language object to provide user interface in
* correct language immediately on this first page load.
*/
$this->mainLoginForm( $this->msg( 'wrongpassword' )->text() );
break;
case self::NOT_EXISTS:
- if( $this->getUser()->isAllowed( 'createaccount' ) ) {
+ if ( $this->getUser()->isAllowed( 'createaccount' ) ) {
$this->mainLoginForm( $this->msg( 'nosuchuser',
wfEscapeWikiText( $this->mUsername ) )->parse() );
} else {
return Status::newFatal( 'noemail', $u->getName() );
}
$ip = $this->getRequest()->getIP();
- if( !$ip ) {
+ if ( !$ip ) {
return Status::newFatal( 'badipaddress' );
}
$injected_html = '';
wfRunHooks( 'UserLoginComplete', array( &$currentUser, &$injected_html ) );
- if( $injected_html !== '' ) {
+ if ( $injected_html !== '' ) {
$this->displaySuccessfulAction( $this->msg( 'loginsuccesstitle' ),
'loginsuccess', $injected_html );
} else {
if ( $wgSecureLogin && !$this->mStickHTTPS ) {
$options = array( 'http' );
$proto = PROTO_HTTP;
- } elseif( $wgSecureLogin ) {
+ } elseif ( $wgSecureLogin ) {
$options = array( 'https' );
$proto = PROTO_HTTPS;
} else {
* @return Boolean
*/
private function shouldShowVForm() {
- global $wgUseVFormUserLogin;
+ global $wgUseVFormCreateAccount, $wgUseVFormUserLogin;
if ( $this->mType == 'signup' ) {
- return false;
+ return $this->mRequest->getBool( 'useNew', $wgUseVFormCreateAccount );
} else {
return $this->mRequest->getBool( 'useNew', $wgUseVFormUserLogin );
}
}
if ( $this->mType == 'signup' ) {
- $template = new UsercreateTemplate();
+ $out->addModules( 'mediawiki.special.userlogin.signup' );
+ if ( $this->mShowVForm ) {
+ $template = new UsercreateTemplateVForm();
+ $out->addModuleStyles( array(
+ 'mediawiki.ui',
+ 'mediawiki.special.createaccount.vform'
+ ) );
+ // XXX hack pending RL or JS parse() support for complex content messages
+ // https://bugzilla.wikimedia.org/show_bug.cgi?id=25349
+ $out->addJsConfigVars( 'wgCreateacctImgcaptchaHelp',
+ $this->msg( 'createacct-imgcaptcha-help' )->parse() );
+ $out->addModules( 'mediawiki.special.createaccount.vform.js' );
+ } else {
+ $template = new UsercreateTemplate();
+ }
$q = 'action=submitlogin&type=signup';
$linkq = 'type=login';
$linkmsg = 'gotaccount';
- $out->addModules( 'mediawiki.special.userlogin.signup' );
} else {
if ( $this->mShowVForm ) {
$template = new UserloginTemplateVForm();
}
# Don't show a "create account" link if the user can't.
- if( $this->showCreateOrLoginLink( $user ) ) {
+ if ( $this->showCreateOrLoginLink( $user ) ) {
# Pass any language selection on to the mode switch link
- if( $wgLoginLanguageSelector && $this->mLanguage ) {
+ if ( $wgLoginLanguageSelector && $this->mLanguage ) {
$linkq .= '&uselang=' . $this->mLanguage;
}
if ( !$this->mShowVForm ) {
: is_array( $wgPasswordResetRoutes ) && in_array( true, array_values( $wgPasswordResetRoutes ) );
$template->set( 'header', '' );
+ $template->set( 'skin', $this->getSkin() );
$template->set( 'name', $this->mUsername );
$template->set( 'password', $this->mPassword );
$template->set( 'retype', $this->mRetype );
}
# Prepare language selection links as needed
- if( $wgLoginLanguageSelector ) {
+ if ( $wgLoginLanguageSelector ) {
$template->set( 'languages', $this->makeLanguageSelector() );
- if( $this->mLanguage ) {
+ if ( $this->mLanguage ) {
$template->set( 'uselang', $this->mLanguage );
}
}
* @return Boolean
*/
function showCreateOrLoginLink( &$user ) {
- if( $this->mType == 'signup' ) {
+ if ( $this->mType == 'signup' ) {
return true;
- } elseif( $user->isAllowed( 'createaccount' ) ) {
+ } elseif ( $user->isAllowed( 'createaccount' ) ) {
return true;
} else {
return false;
*/
private function renewSessionId() {
global $wgSecureLogin, $wgCookieSecure;
- if( $wgSecureLogin && !$this->mStickHTTPS ) {
+ if ( $wgSecureLogin && !$this->mStickHTTPS ) {
$wgCookieSecure = false;
}
*/
function makeLanguageSelector() {
$msg = $this->msg( 'loginlanguagelinks' )->inContentLanguage();
- if( !$msg->isBlank() ) {
+ if ( !$msg->isBlank() ) {
$langs = explode( "\n", $msg->text() );
$links = array();
- foreach( $langs as $lang ) {
+ foreach ( $langs as $lang ) {
$lang = trim( $lang, '* ' );
$parts = explode( '|', $lang );
if ( count( $parts ) >= 2 ) {
* @return string
*/
function makeLanguageSelectorLink( $text, $lang ) {
- if( $this->getLanguage()->getCode() == $lang ) {
+ if ( $this->getLanguage()->getCode() == $lang ) {
// no link for currently used language
return htmlspecialchars( $text );
}
$query = array( 'uselang' => $lang );
- if( $this->mType == 'signup' ) {
+ if ( $this->mType == 'signup' ) {
$query['type'] = 'signup';
}
- if( $this->mReturnTo !== '' ) {
+ if ( $this->mReturnTo !== '' ) {
$query['returnto'] = $this->mReturnTo;
$query['returntoquery'] = $this->mReturnToQuery;
}
* (e.g. they don't have the userrights permission), then don't
* allow them to use Special:UserRights.
*/
- if( $user->isBlocked() && !$user->isAllowed( 'userrights' ) ) {
+ if ( $user->isBlocked() && !$user->isAllowed( 'userrights' ) ) {
throw new UserBlockedError( $user->getBlock() );
}
$request = $this->getRequest();
- if( $par !== null ) {
+ if ( $par !== null ) {
$this->mTarget = $par;
} else {
$this->mTarget = $request->getVal( 'user' );
* edit their own groups, automatically set them as the
* target.
*/
- if ( !count( $available['add'] ) && !count( $available['remove'] ) )
+ if ( !count( $available['add'] ) && !count( $available['remove'] ) ) {
$this->mTarget = $user->getName();
+ }
}
if ( User::getCanonicalName( $this->mTarget ) == $user->getName() ) {
$this->isself = true;
}
- if( !$this->userCanChangeRights( $user, true ) ) {
+ if ( !$this->userCanChangeRights( $user, true ) ) {
// @todo FIXME: There may be intermediate groups we can mention.
$msg = $user->isAnon() ? 'userrights-nologin' : 'userrights-notallowed';
throw new PermissionsError( null, array( array( $msg ) ) );
$this->switchForm();
}
- if( $request->wasPosted() ) {
+ if ( $request->wasPosted() ) {
// save settings
- if( $request->getCheck( 'saveusergroups' ) ) {
+ if ( $request->getCheck( 'saveusergroups' ) ) {
$reason = $request->getVal( 'user-reason' );
$tok = $request->getVal( 'wpEditToken' );
- if( $user->matchEditToken( $tok, $this->mTarget ) ) {
+ if ( $user->matchEditToken( $tok, $this->mTarget ) ) {
$this->saveUserGroups(
$this->mTarget,
$reason
}
// show some more forms
- if( $this->mTarget !== null ) {
+ if ( $this->mTarget !== null ) {
$this->editUserGroupsForm( $this->mTarget );
}
}
*/
function saveUserGroups( $username, $reason = '' ) {
$status = $this->fetchUser( $username );
- if( !$status->isOK() ) {
+ if ( !$status->isOK() ) {
$this->getOutput()->addWikiText( $status->getWikiText() );
return;
} else {
$newGroups = $oldGroups;
// remove then add groups
- if( $remove ) {
+ if ( $remove ) {
$newGroups = array_diff( $newGroups, $remove );
- foreach( $remove as $group ) {
+ foreach ( $remove as $group ) {
$user->removeGroup( $group );
}
}
- if( $add ) {
+ if ( $add ) {
$newGroups = array_merge( $newGroups, $add );
- foreach( $add as $group ) {
+ foreach ( $add as $group ) {
$user->addGroup( $group );
}
}
wfDebug( 'newGroups: ' . print_r( $newGroups, true ) );
wfRunHooks( 'UserRights', array( &$user, $add, $remove ) );
- if( $newGroups != $oldGroups ) {
+ if ( $newGroups != $oldGroups ) {
$this->addLogEntry( $user, $oldGroups, $newGroups, $reason );
}
return array( $add, $remove );
*/
function editUserGroupsForm( $username ) {
$status = $this->fetchUser( $username );
- if( !$status->isOK() ) {
+ if ( !$status->isOK() ) {
$this->getOutput()->addWikiText( $status->getWikiText() );
return;
} else {
global $wgUserrightsInterwikiDelimiter;
$parts = explode( $wgUserrightsInterwikiDelimiter, $username );
- if( count( $parts ) < 2 ) {
+ if ( count( $parts ) < 2 ) {
$name = trim( $username );
$database = '';
} else {
list( $name, $database ) = array_map( 'trim', $parts );
- if( $database == wfWikiID() ) {
+ if ( $database == wfWikiID() ) {
$database = '';
} else {
- if( !$this->getUser()->isAllowed( 'userrights-interwiki' ) ) {
+ if ( !$this->getUser()->isAllowed( 'userrights-interwiki' ) ) {
return Status::newFatal( 'userrights-no-interwiki' );
}
- if( !UserRightsProxy::validDatabase( $database ) ) {
+ if ( !UserRightsProxy::validDatabase( $database ) ) {
return Status::newFatal( 'userrights-nodatabase', $database );
}
}
}
- if( $name === '' ) {
+ if ( $name === '' ) {
return Status::newFatal( 'nouserspecified' );
}
- if( $name[0] == '#' ) {
+ if ( $name[0] == '#' ) {
// Numeric ID can be specified...
// We'll do a lookup for the name internally.
$id = intval( substr( $name, 1 ) );
- if( $database == '' ) {
+ if ( $database == '' ) {
$name = User::whoIs( $id );
} else {
$name = UserRightsProxy::whoIs( $database, $id );
}
- if( !$name ) {
+ if ( !$name ) {
return Status::newFatal( 'noname' );
}
} else {
$name = User::getCanonicalName( $name );
- if( $name === false ) {
+ if ( $name === false ) {
// invalid name
return Status::newFatal( 'nosuchusershort', $username );
}
}
- if( $database == '' ) {
+ if ( $database == '' ) {
$user = User::newFromName( $name );
} else {
$user = UserRightsProxy::newFromName( $database, $name );
}
- if( !$user || $user->isAnon() ) {
+ if ( !$user || $user->isAnon() ) {
return Status::newFatal( 'nosuchusershort', $username );
}
}
function makeGroupNameList( $ids ) {
- if( empty( $ids ) ) {
+ if ( empty( $ids ) ) {
return $this->msg( 'rightsnone' )->inContentLanguage()->text();
} else {
return implode( ', ', $ids );
function makeGroupNameListForLog( $ids ) {
wfDeprecated( __METHOD__, '1.21' );
- if( empty( $ids ) ) {
+ if ( empty( $ids ) ) {
return '';
} else {
return $this->makeGroupNameList( $ids );
protected function showEditUserGroupsForm( $user, $groups ) {
$list = array();
$membersList = array();
- foreach( $groups as $group ) {
+ foreach ( $groups as $group ) {
$list[] = self::buildGroupLink( $group );
$membersList[] = self::buildGroupMemberLink( $group );
}
$autoList = array();
$autoMembersList = array();
if ( $user instanceof User ) {
- foreach( Autopromote::getAutopromoteGroups( $user ) as $group ) {
+ foreach ( Autopromote::getAutopromoteGroups( $user ) as $group ) {
$autoList[] = self::buildGroupLink( $group );
$autoMembersList[] = self::buildGroupMemberLink( $group );
}
# more easily manage it.
$columns = array( 'unchangeable' => array(), 'changeable' => array() );
- foreach( $allgroups as $group ) {
+ foreach ( $allgroups as $group ) {
$set = in_array( $group, $usergroups );
# Should the checkbox be disabled?
$disabled = !(
'irreversible' => $irreversible
);
- if( $disabled ) {
+ if ( $disabled ) {
$columns['unchangeable'][$group] = $checkbox;
} else {
$columns['changeable'][$group] = $checkbox;
# Build the HTML table
$ret .= Xml::openElement( 'table', array( 'class' => 'mw-userrights-groups' ) ) .
"<tr>\n";
- foreach( $columns as $name => $column ) {
- if( $column === array() )
+ foreach ( $columns as $name => $column ) {
+ if ( $column === array() ) {
continue;
+ }
$ret .= Xml::element( 'th', null, $this->msg( 'userrights-' . $name . '-col', count( $column ) )->text() );
}
$ret .= "</tr>\n<tr>\n";
- foreach( $columns as $column ) {
- if( $column === array() )
+ foreach ( $columns as $column ) {
+ if ( $column === array() ) {
continue;
+ }
$ret .= "\t<td style='vertical-align:top;'>\n";
- foreach( $column as $group => $checkbox ) {
+ foreach ( $column as $group => $checkbox ) {
$attr = $checkbox['disabled'] ? array( 'disabled' => 'disabled' ) : array();
$member = User::getGroupMember( $group, $user->getName() );
$out = $this->getOutput();
$out->allowClickjacking();
- if( $par !== 'Credits' ) {
+ if ( $par !== 'Credits' ) {
$text =
$this->getMediaWikiCredits() .
$this->softwareInformation() .
<th>" . wfMessage( 'version-software-version' )->text() . "</th>
</tr>\n";
- foreach( $software as $name => $version ) {
+ foreach ( $software as $name => $version ) {
$out .= "<tr>
<td>" . $name . "</td>
<td dir=\"ltr\">" . $version . "</td>
wfProfileIn( __METHOD__ );
$gitVersion = self::getVersionLinkedGit();
- if( $gitVersion ) {
+ if ( $gitVersion ) {
$v = $gitVersion;
} else {
$svnVersion = self::getVersionLinkedSvn();
- if( $svnVersion ) {
+ if ( $svnVersion ) {
$v = $svnVersion;
} else {
$v = $wgVersion; // fallback
global $IP;
$info = self::getSvnInfo( $IP );
- if( !isset( $info['checkout-rev'] ) ) {
+ if ( !isset( $info['checkout-rev'] ) ) {
return false;
}
private static function getwgVersionLinked() {
global $wgVersion;
$versionUrl = "";
- if( wfRunHooks( 'SpecialVersionVersionUrl', array( $wgVersion, &$versionUrl ) ) ) {
+ if ( wfRunHooks( 'SpecialVersionVersionUrl', array( $wgVersion, &$versionUrl ) ) ) {
$versionParts = array();
preg_match( "/^(\d+\.\d+)/", $wgVersion, $versionParts );
$versionUrl = "https://www.mediawiki.org/wiki/MediaWiki_{$versionParts[1]}";
$gitInfo = new GitInfo( $IP );
$headSHA1 = $gitInfo->getHeadSHA1();
- if( !$headSHA1 ) {
+ if ( !$headSHA1 ) {
return false;
}
}
$fhooks = $wgParser->getFunctionHooks();
- if( count( $fhooks ) ) {
+ if ( count( $fhooks ) ) {
$out .= $this->openExtType( $this->msg( 'version-parser-function-hooks' )->text(), 'parser-function-hooks' );
$out .= '<tr><td colspan="4">' . $this->listToText( $fhooks ) . "</td></tr>\n";
}
* @return int
*/
function compare( $a, $b ) {
- if( $a['name'] === $b['name'] ) {
+ if ( $a['name'] === $b['name'] ) {
return 0;
} else {
return $this->getLanguage()->lc( $a['name'] ) > $this->getLanguage()->lc( $b['name'] )
}
$gitHeadCommitDate = $gitInfo->getHeadCommitDate();
if ( $gitHeadCommitDate ) {
- $vcsText .= "<br/>" . $wgLang->timeanddate( $gitHeadCommitDate, true );
+ $vcsText .= "<br/>" . $wgLang->timeanddate( $gitHeadCommitDate, true );
}
} else {
$svnInfo = self::getSvnInfo( dirname( $extension['path'] ) );
# Make description text.
$description = isset ( $extension['description'] ) ? $extension['description'] : '';
- if( isset ( $extension['descriptionmsg'] ) ) {
+ if ( isset ( $extension['descriptionmsg'] ) ) {
# Look for a localized description.
$descriptionMsg = $extension['descriptionmsg'];
- if( is_array( $descriptionMsg ) ) {
+ if ( is_array( $descriptionMsg ) ) {
$descriptionMsgKey = $descriptionMsg[0]; // Get the message key
array_shift( $descriptionMsg ); // Shift out the message key to get the parameters only
array_map( "htmlspecialchars", $descriptionMsg ); // For sanity
$ret .= Xml::closeElement( 'table' );
return $ret;
- } else
+ } else {
return '';
+ }
}
private function openExtType( $text, $name = null ) {
$opt = array( 'colspan' => 4 );
$out = '';
- if( $this->firstExtOpened ) {
+ if ( $this->firstExtOpened ) {
// Insert a spacing line
$out .= '<tr class="sv-space">' . Html::element( 'td', $opt ) . "</tr>\n";
}
$this->firstExtOpened = true;
- if( $name ) {
+ if ( $name ) {
$opt['id'] = "sv-$name";
}
*/
function listAuthors( $authors ) {
$list = array();
- foreach( (array)$authors as $item ) {
+ foreach ( (array)$authors as $item ) {
if ( $item == '...' ) {
$list[] = $this->msg( 'version-poweredby-others' )->text();
} elseif ( substr( $item, -5 ) == ' ...]' ) {
* @return Mixed
*/
public static function arrayToString( $list ) {
- if( is_array( $list ) && count( $list ) == 1 ) {
+ if ( is_array( $list ) && count( $list ) == 1 ) {
$list = $list[0];
}
- if( is_object( $list ) ) {
+ if ( is_object( $list ) ) {
$class = wfMessage( 'parentheses' )->params( get_class( $list ) )->escaped();
return $class;
} elseif ( !is_array( $list ) ) {
return $list;
} else {
- if( is_object( $list[0] ) ) {
+ if ( is_object( $list[0] ) ) {
$class = get_class( $list[0] );
} else {
$class = $list[0];
// http://svnbook.red-bean.com/nightly/en/svn.developer.insidewc.html
$entries = $dir . '/.svn/entries';
- if( !file_exists( $entries ) ) {
+ if ( !file_exists( $entries ) ) {
return false;
}
}
// check if file is xml (subversion release <= 1.3) or not (subversion release = 1.4)
- if( preg_match( '/^<\?xml/', $lines[0] ) ) {
+ if ( preg_match( '/^<\?xml/', $lines[0] ) ) {
// subversion is release <= 1.3
- if( !function_exists( 'simplexml_load_file' ) ) {
+ if ( !function_exists( 'simplexml_load_file' ) ) {
// We could fall back to expat... YUCK
return false;
}
$xml = simplexml_load_file( $entries );
wfRestoreWarnings();
- if( $xml ) {
- foreach( $xml->entry as $entry ) {
- if( $xml->entry[0]['name'] == '' ) {
+ if ( $xml ) {
+ foreach ( $xml->entry as $entry ) {
+ if ( $xml->entry[0]['name'] == '' ) {
// The directory entry should always have a revision marker.
- if( $entry['revision'] ) {
+ if ( $entry['revision'] ) {
return array( 'checkout-rev' => intval( $entry['revision'] ) );
}
}
$output = $this->getOutput();
# Anons don't get a watchlist
- if( $user->isAnon() ) {
+ if ( $user->isAnon() ) {
$output->setPageTitle( $this->msg( 'watchnologin' ) );
$output->setRobotPolicy( 'noindex,nofollow' );
$llink = Linker::linkKnown(
$request = $this->getRequest();
$mode = SpecialEditWatchlist::getMode( $request, $par );
- if( $mode !== false ) {
+ if ( $mode !== false ) {
# TODO: localise?
switch( $mode ) {
case SpecialEditWatchlist::EDIT_CLEAR:
// @TODO: use FormOptions!
$defaults = array(
- /* float */ 'days' => floatval( $user->getOption( 'watchlistdays' ) ), /* 3.0 or 0.5, watch further below */
+ /* float */ 'days' => floatval( $user->getOption( 'watchlistdays' ) ), /* 3.0 or 0.5, watch further below */
/* bool */ 'hideMinor' => (int)$user->getBoolOption( 'watchlisthideminor' ),
- /* bool */ 'hideBots' => (int)$user->getBoolOption( 'watchlisthidebots' ),
+ /* bool */ 'hideBots' => (int)$user->getBoolOption( 'watchlisthidebots' ),
/* bool */ 'hideAnons' => (int)$user->getBoolOption( 'watchlisthideanons' ),
- /* bool */ 'hideLiu' => (int)$user->getBoolOption( 'watchlisthideliu' ),
+ /* bool */ 'hideLiu' => (int)$user->getBoolOption( 'watchlisthideliu' ),
/* bool */ 'hidePatrolled' => (int)$user->getBoolOption( 'watchlisthidepatrolled' ),
- /* bool */ 'hideOwn' => (int)$user->getBoolOption( 'watchlisthideown' ),
- /* bool */ 'extended' => (int)$user->getBoolOption( 'extendwatchlist' ),
+ /* bool */ 'hideOwn' => (int)$user->getBoolOption( 'watchlisthideown' ),
+ /* bool */ 'extended' => (int)$user->getBoolOption( 'extendwatchlist' ),
/* ? */ 'namespace' => '', //means all
- /* ? */ 'invert' => false,
+ /* ? */ 'invert' => false,
/* bool */ 'associated' => false,
);
$this->customFilters = array();
wfRunHooks( 'SpecialWatchlistFilters', array( $this, &$this->customFilters ) );
- foreach( $this->customFilters as $key => $params ) {
+ foreach ( $this->customFilters as $key => $params ) {
$defaults[$key] = $params['default'];
}
$values['hideOwn'] = (int)$request->getBool( 'hideOwn', $defaults['hideOwn'] );
$values['hidePatrolled'] = (int)$request->getBool( 'hidePatrolled', $defaults['hidePatrolled'] );
$values['extended'] = (int)$request->getBool( 'extended', $defaults['extended'] );
- foreach( $this->customFilters as $key => $params ) {
+ foreach ( $this->customFilters as $key => $params ) {
$values[$key] = (int)$request->getBool( $key, $defaults[$key] );
}
$values['invert'] = $invert;
$values['associated'] = $associated;
- if( is_null( $values['days'] ) || !is_numeric( $values['days'] ) ) {
+ if ( is_null( $values['days'] ) || !is_numeric( $values['days'] ) ) {
$big = 1000; /* The magical big */
- if( $nitems > $big ) {
+ if ( $nitems > $big ) {
# Set default cutoff shorter
$values['days'] = $defaults['days'] = (12.0 / 24.0); # 12 hours...
} else {
wfAppendToArrayIfNotDefault( $name, $values[$name], $defaults, $nondefaults );
}
- if( ( $wgEnotifWatchlist || $wgShowUpdatedMarker ) && $request->getVal( 'reset' ) &&
+ if ( ( $wgEnotifWatchlist || $wgShowUpdatedMarker ) && $request->getVal( 'reset' ) &&
$request->wasPosted() )
{
$user->clearAllNotifications();
# Possible where conditions
$conds = array();
- if( $values['days'] > 0 ) {
+ if ( $values['days'] > 0 ) {
$conds[] = 'rc_timestamp > ' . $dbr->addQuotes( $dbr->timestamp( time() - intval( $values['days'] * 86400 ) ) );
}
# Up estimate of watched items by 15% to compensate for talk pages...
# Toggles
- if( $values['hideOwn'] ) {
+ if ( $values['hideOwn'] ) {
$conds[] = 'rc_user != ' . $user->getId();
}
- if( $values['hideBots'] ) {
+ if ( $values['hideBots'] ) {
$conds[] = 'rc_bot = 0';
}
- if( $values['hideMinor'] ) {
+ if ( $values['hideMinor'] ) {
$conds[] = 'rc_minor = 0';
}
- if( $values['hideLiu'] ) {
+ if ( $values['hideLiu'] ) {
$conds[] = 'rc_user = 0';
}
- if( $values['hideAnons'] ) {
+ if ( $values['hideAnons'] ) {
$conds[] = 'rc_user != 0';
}
if ( $user->useRCPatrol() && $values['hidePatrolled'] ) {
}
# Toggle watchlist content (all recent edits or just the latest)
- if( $values['extended'] ) {
+ if ( $values['extended'] ) {
$limitWatchlist = $user->getIntOption( 'wllimit' );
$usePage = false;
} else {
# Show a message about slave lag, if applicable
$lag = wfGetLB()->safeGetLag( $dbr );
- if( $lag > 0 ) {
+ if ( $lag > 0 ) {
$output->showLagWarning( $lag );
}
# Show watchlist header
$form .= $this->msg( 'watchlist-details' )->numParams( $nitems )->parse() . "\n";
- if( $user->getOption( 'enotifwatchlistpages' ) && $wgEnotifWatchlist ) {
+ if ( $user->getOption( 'enotifwatchlistpages' ) && $wgEnotifWatchlist ) {
$form .= $this->msg( 'wlheader-enotif' )->parseAsBlock() . "\n";
}
- if( $wgShowUpdatedMarker ) {
+ if ( $wgShowUpdatedMarker ) {
$form .= Xml::openElement( 'form', array( 'method' => 'post',
'action' => $this->getTitle()->getLocalURL(),
'id' => 'mw-watchlist-resetbutton' ) ) . "\n" .
),
);
$options = array( 'ORDER BY' => 'rc_timestamp DESC' );
- if( $wgShowUpdatedMarker ) {
+ if ( $wgShowUpdatedMarker ) {
$fields[] = 'wl_notificationtimestamp';
}
- if( $limitWatchlist ) {
+ if ( $limitWatchlist ) {
$options['LIMIT'] = $limitWatchlist;
}
$lang = $this->getLanguage();
$wlInfo = '';
- if( $values['days'] > 0 ) {
+ if ( $values['days'] > 0 ) {
$timestamp = wfTimestampNow();
$wlInfo = $this->msg( 'wlnote' )->numParams( $numRows, round( $values['days'] * 24 ) )->params(
$lang->userDate( $timestamp, $user ), $lang->userTime( $timestamp, $user ) )->parse() . "<br />\n";
# Spit out some control panel links
$filters = array(
- 'hideMinor' => 'rcshowhideminor',
- 'hideBots' => 'rcshowhidebots',
- 'hideAnons' => 'rcshowhideanons',
- 'hideLiu' => 'rcshowhideliu',
- 'hideOwn' => 'rcshowhidemine',
+ 'hideMinor' => 'rcshowhideminor',
+ 'hideBots' => 'rcshowhidebots',
+ 'hideAnons' => 'rcshowhideanons',
+ 'hideLiu' => 'rcshowhideliu',
+ 'hideOwn' => 'rcshowhidemine',
'hidePatrolled' => 'rcshowhidepatr'
);
foreach ( $this->customFilters as $key => $params ) {
}
$links = array();
- foreach( $filters as $name => $msg ) {
+ foreach ( $filters as $name => $msg ) {
$links[] = $this->showHideLink( $nondefaults, $msg, $name, $values[$name] );
}
'all' => '',
'label' => $this->msg( 'namespace' )->text()
), array(
- 'name' => 'namespace',
- 'id' => 'namespace',
+ 'name' => 'namespace',
+ 'id' => 'namespace',
'class' => 'namespaceselector',
)
) . ' ';
$output->addHTML( $form );
# If there's nothing to show, stop here
- if( $numRows == 0 ) {
+ if ( $numRows == 0 ) {
$output->addWikiMsg( 'watchnochange' );
return;
}
$hours = array( 1, 2, 6, 12 );
$days = array( 1, 3, 7 );
$i = 0;
- foreach( $hours as $h ) {
+ foreach ( $hours as $h ) {
$hours[$i++] = $this->hoursLink( $h, $options );
}
$i = 0;
- foreach( $days as $d ) {
+ foreach ( $days as $d ) {
$days[$i++] = $this->daysLink( $d, $options );
}
return $this->msg( 'wlshowlast' )->rawParams(
$this->opts = $opts;
$this->target = Title::newFromURL( $opts->getValue( 'target' ) );
- if( !$this->target ) {
+ if ( !$this->target ) {
$out->addHTML( $this->whatlinkshereForm() );
return;
}
$hidetrans = $this->opts->getValue( 'hidetrans' );
$hideimages = $target->getNamespace() != NS_FILE || $this->opts->getValue( 'hideimages' );
- $fetchlinks = (!$hidelinks || !$hideredirs);
+ $fetchlinks = ( !$hidelinks || !$hideredirs );
// Make the query
$plConds = array(
'pl_namespace' => $target->getNamespace(),
'pl_title' => $target->getDBkey(),
);
- if( $hideredirs ) {
+ if ( $hideredirs ) {
$plConds['rd_from'] = null;
- } elseif( $hidelinks ) {
+ } elseif ( $hidelinks ) {
$plConds[] = 'rd_from is NOT NULL';
}
'rd_interwiki = ' . $dbr->addQuotes( '' ) . ' OR rd_interwiki IS NULL'
)));
- if( $fetchlinks ) {
+ if ( $fetchlinks ) {
$options['ORDER BY'] = 'pl_from';
$plRes = $dbr->select( array( 'pagelinks', 'page', 'redirect' ), $fields,
$plConds, __METHOD__, $options,
);
}
- if( !$hidetrans ) {
+ if ( !$hidetrans ) {
$options['ORDER BY'] = 'tl_from';
$tlRes = $dbr->select( array( 'templatelinks', 'page', 'redirect' ), $fields,
$tlConds, __METHOD__, $options,
);
}
- if( !$hideimages ) {
+ if ( !$hideimages ) {
$options['ORDER BY'] = 'il_from';
$ilRes = $dbr->select( array( 'imagelinks', 'page', 'redirect' ), $fields,
$ilConds, __METHOD__, $options,
);
}
- if( ( !$fetchlinks || !$plRes->numRows() ) && ( $hidetrans || !$tlRes->numRows() ) && ( $hideimages || !$ilRes->numRows() ) ) {
+ if ( ( !$fetchlinks || !$plRes->numRows() ) && ( $hidetrans || !$tlRes->numRows() ) && ( $hideimages || !$ilRes->numRows() ) ) {
if ( 0 == $level ) {
$out->addHTML( $this->whatlinkshereForm() );
// Show filters only if there are links
- if( $hidelinks || $hidetrans || $hideredirs || $hideimages )
+ if ( $hidelinks || $hidetrans || $hideredirs || $hideimages ) {
$out->addHTML( $this->getFilterPanel() );
+ }
$errMsg = is_int( $namespace ) ? 'nolinkshere-ns' : 'nolinkshere';
$out->addWikiMsg( $errMsg, $this->target->getPrefixedText() );
// Read the rows into an array and remove duplicates
// templatelinks comes second so that the templatelinks row overwrites the
// pagelinks row, so we get (inclusion) rather than nothing
- if( $fetchlinks ) {
+ if ( $fetchlinks ) {
foreach ( $plRes as $row ) {
$row->is_template = 0;
$row->is_image = 0;
$rows[$row->page_id] = $row;
}
}
- if( !$hidetrans ) {
+ if ( !$hidetrans ) {
foreach ( $tlRes as $row ) {
$row->is_template = 1;
$row->is_image = 0;
$rows[$row->page_id] = $row;
}
}
- if( !$hideimages ) {
+ if ( !$hideimages ) {
foreach ( $ilRes as $row ) {
$row->is_template = 0;
$row->is_image = 1;
$out->addHTML( $this->listEnd() );
- if( $level == 0 ) {
+ if ( $level == 0 ) {
$out->addHTML( $prevnext );
}
}
}
}
- if( $row->rd_from ) {
+ if ( $row->rd_from ) {
$query = array( 'redirect' => 'no' );
} else {
$query = array();
// Display properties (redirect or template)
$propsText = '';
$props = array();
- if ( $row->rd_from )
+ if ( $row->rd_from ) {
$props[] = $msgcache['isredirect'];
- if ( $row->is_template )
+ }
+ if ( $row->is_template ) {
$props[] = $msgcache['istemplate'];
- if( $row->is_image )
+ }
+ if ( $row->is_image ) {
$props[] = $msgcache['isimage'];
+ }
if ( count( $props ) ) {
$propsText = $this->msg( 'parentheses' )->rawParams( implode( $msgcache['semicolon-separator'], $props ) )->escaped();
protected function wlhLink( Title $target, $text ) {
static $title = null;
- if ( $title === null )
+ if ( $title === null ) {
$title = $this->getTitle();
+ }
return Linker::linkKnown(
$title,
'all' => '',
'label' => $this->msg( 'namespace' )->text()
), array(
- 'name' => 'namespace',
- 'id' => 'namespace',
+ 'name' => 'namespace',
+ 'id' => 'namespace',
'class' => 'namespaceselector',
)
);
$links = array();
$types = array( 'hidetrans', 'hidelinks', 'hideredirs' );
- if( $this->target->getNamespace() == NS_FILE )
+ if ( $this->target->getNamespace() == NS_FILE ) {
$types[] = 'hideimages';
+ }
// Combined message keys: 'whatlinkshere-hideredirs', 'whatlinkshere-hidetrans', 'whatlinkshere-hidelinks', 'whatlinkshere-hideimages'
// To be sure they will be found by grep
- foreach( $types as $type ) {
+ foreach ( $types as $type ) {
$chosen = $this->opts->getValue( $type );
$msg = $chosen ? $show : $hide;
$overrides = array( $type => !$chosen );
global $wgScript;
# Do not show useless input form if special page is cached
- if( $this->isCached() ) {
+ if ( $this->isCached() ) {
return '';
}
function execute() {
if ( $this->data['message'] ) {
?>
- <div class="<?php $this->text('messagetype') ?>box">
+ <div class="<?php $this->text( 'messagetype' ); ?>box">
<?php
if ( $this->data['messagetype'] == 'error' ) {
- ?><strong><?php $this->msg( 'loginerror' ) ?></strong><br /><?php
+ ?><strong><?php $this->msg( 'loginerror' ); ?></strong><br /><?php
}
- $this->html('message');
+ $this->html( 'message' );
?>
</div>
<div class="visualClear"></div>
<div id="signupstart"><?php $this->msgWiki( 'signupstart' ); ?></div>
<div id="userlogin">
-<form name="userlogin2" id="userlogin2" method="post" action="<?php $this->text('action') ?>">
- <h2><?php $this->msg('createaccount') ?></h2>
- <p id="userloginlink"><?php $this->html('link') ?></p>
- <?php $this->html('header'); /* pre-table point for form plugins... */ ?>
+<form name="userlogin2" id="userlogin2" method="post" action="<?php $this->text( 'action' ); ?>">
+ <h2><?php $this->msg( 'createaccount' ); ?></h2>
+ <p id="userloginlink"><?php $this->html( 'link' ); ?></p>
+ <?php $this->html( 'header' ); /* pre-table point for form plugins... */ ?>
<?php
if ( $this->haveData( 'languages' ) ) {
?><div id="languagelinks"><p><?php $this->html( 'languages' ); ?></p></div><?php
?>
<table>
<tr>
- <td class="mw-label"><label for='wpName2'><?php $this->msg('yourname') ?></label></td>
+ <td class="mw-label"><label for='wpName2'><?php $this->msg( 'yourname' ); ?></label></td>
<td class="mw-input">
<?php
echo Html::input( 'wpName', $this->data['name'], 'text', array(
</td>
</tr>
<tr class="mw-row-password">
- <td class="mw-label"><label for='wpPassword2'><?php $this->msg('yourpassword') ?></label></td>
+ <td class="mw-label"><label for='wpPassword2'><?php $this->msg( 'yourpassword' ); ?></label></td>
<td class="mw-input">
<?php
echo Html::input( 'wpPassword', null, 'password', array(
}
?>
<tr id="mw-user-domain-section">
- <td class="mw-label"><?php $this->msg( 'yourdomainname' ) ?></td>
+ <td class="mw-label"><?php $this->msg( 'yourdomainname' ); ?></td>
<td class="mw-input">
- <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>"
+ <select name="wpDomain" value="<?php $this->text( 'domain' ); ?>"
tabindex="4">
<?php echo $doms ?>
</select>
}
?>
<tr class="mw-row-password">
- <td class="mw-label"><label for='wpRetype'><?php $this->msg('yourpasswordagain') ?></label></td>
+ <td class="mw-label"><label for='wpRetype'><?php $this->msg( 'yourpasswordagain' ); ?></label></td>
<td class="mw-input">
<?php
echo Html::input( 'wpRetype', null, 'password', array(
<?php
if ( $this->data['useemail'] ) {
?>
- <td class="mw-label"><label for='wpEmail'><?php $this->msg('youremail') ?></label></td>
+ <td class="mw-label"><label for='wpEmail'><?php $this->msg( 'youremail' ); ?></label></td>
<td class="mw-input">
<?php
echo Html::input( 'wpEmail', $this->data['email'], 'email', array(
) ); ?>
<div class="prefsectiontip">
<?php // duplicated in Preferences.php profilePreferences()
- if( $this->data['emailrequired'] ) {
- $this->msgWiki('prefs-help-email-required');
+ if ( $this->data['emailrequired'] ) {
+ $this->msgWiki( 'prefs-help-email-required' );
} else {
- $this->msgWiki('prefs-help-email');
+ $this->msgWiki( 'prefs-help-email' );
}
- if( $this->data['emailothers'] ) {
- $this->msgWiki('prefs-help-email-others');
+ if ( $this->data['emailothers'] ) {
+ $this->msgWiki( 'prefs-help-email-others' );
} ?>
</div>
</td>
?>
</tr>
<tr>
- <td class="mw-label"><label for='wpRealName'><?php $this->msg('yourrealname') ?></label></td>
+ <td class="mw-label"><label for='wpRealName'><?php $this->msg( 'yourrealname' ); ?></label></td>
<td class="mw-input">
<input type='text' class='loginText' name="wpRealName" id="wpRealName"
tabindex="7"
- value="<?php $this->text('realname') ?>" size='20' />
+ value="<?php $this->text( 'realname' ); ?>" size='20' />
<div class="prefsectiontip">
- <?php $this->msgWiki('prefs-help-realname'); ?>
+ <?php $this->msgWiki( 'prefs-help-realname' ); ?>
</div>
</td>
<?php
?>
</tr>
<tr>
- <td class="mw-label"><label for='wpReason'><?php $this->msg('createaccountreason') ?></label></td>
+ <td class="mw-label"><label for='wpReason'><?php $this->msg( 'createaccountreason' ); ?></label></td>
<td class="mw-input">
<input type='text' class='loginText' name="wpReason" id="wpReason"
tabindex="8"
- value="<?php $this->text('reason') ?>" size='20' />
+ value="<?php $this->text( 'reason' ); ?>" size='20' />
</td>
<?php
}
if ( !empty( $inputItem['msg'] ) && $inputItem['type'] != 'checkbox' ) {
?><td class="mw-label"><label for="<?php
echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
- $this->msgWiki( $inputItem['msg'] ) ?></label><?php
+ $this->msgWiki( $inputItem['msg'] ); ?></label><?php
} else {
?><td><?php
}
?></td>
<td class="mw-input">
- <input type="<?php echo htmlspecialchars( $inputItem['type'] ) ?>" name="<?php
+ <input type="<?php echo htmlspecialchars( $inputItem['type'] ); ?>" name="<?php
echo htmlspecialchars( $inputItem['name'] ); ?>"
tabindex="<?php echo $tabIndex++; ?>"
value="<?php
}
?>" id="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"
<?php
- if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['value'] ) )
+ if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['value'] ) ) {
echo 'checked="checked"';
+ }
?> /> <?php
if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['msg'] ) ) {
?>
<label for="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
- $this->msgHtml( $inputItem['msg'] ) ?></label><?php
+ $this->msgHtml( $inputItem['msg'] ); ?></label><?php
}
if ( $inputItem['helptext'] !== false ) {
?>
<td class="mw-submit">
<input type='submit' name="wpCreateaccount" id="wpCreateaccount"
tabindex="<?php echo $tabIndex++; ?>"
- value="<?php $this->msg('createaccount') ?>" />
+ value="<?php $this->msg( 'createaccount' ); ?>" />
</td>
</tr>
</table>
--- /dev/null
+<?php
+/**
+ * Html form for account creation with new VForm appearance.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Templates
+ */
+
+if ( !defined( 'MEDIAWIKI' ) ) {
+ die( -1 );
+}
+
+/**
+ * Html form for create account with new VForm appearance.
+ *
+ * @since 1.22
+ */
+class UsercreateTemplateVForm extends BaseTemplate {
+
+ /**
+ * Extensions (AntiSpoof and TitleBlacklist) call this in response to
+ * UserCreateForm hook to add checkboxes to the create account form.
+ */
+ function addInputItem( $name, $value, $type, $msg, $helptext = false ) {
+ $this->data['extraInput'][] = array(
+ 'name' => $name,
+ 'value' => $value,
+ 'type' => $type,
+ 'msg' => $msg,
+ 'helptext' => $helptext,
+ );
+ }
+
+ function execute() {
+ global $wgCookieExpiration;
+ $expirationDays = ceil( $wgCookieExpiration / ( 3600 * 24 ) );
+?>
+<div class="mw-ui-container">
+ <?php
+ if ( $this->haveData( 'languages' ) ) {
+ ?>
+ <div id="languagelinks">
+ <p><?php $this->html( 'languages' ); ?></p>
+ </div>
+ <?php
+ }
+ ?>
+<div id="userloginForm">
+<h2 class="createaccount-join"><?php $this->msg( 'createacct-join' ); ?></h2>
+<form name="userlogin2" id="userlogin2" class="mw-ui-vform" method="post" action="<?php $this->text( 'action' ); ?>">
+ <section class="mw-form-header">
+ <?php $this->html( 'header' ); /* extensions such as ConfirmEdit add form HTML here */ ?>
+ </section>
+ <?php
+ if ( $this->data['message'] ) {
+?>
+ <div class="<?php $this->text( 'messagetype' ); ?>box">
+ <?php if ( $this->data['messagetype'] == 'error' ) { ?>
+ <strong><?php $this->msg( 'loginerror' )?></strong><br />
+ <?php } ?>
+ <?php $this->html( 'message' ); ?>
+ </div>
+ <?php } ?>
+ <div>
+ <label for='wpName2'>
+ <?php $this->msg( 'userlogin-yourname' ); ?>
+
+ <span class="mw-ui-flush-right"><?php echo $this->getMsg( 'createacct-helpusername-link' )->parse(); ?></span>
+ </label>
+ <?php echo Html::input( 'wpName', $this->data['name'], 'text', array(
+ 'class' => 'mw-input loginText',
+ 'id' => 'wpName2',
+ 'tabindex' => '1',
+ 'size' => '20',
+ 'required',
+ 'placeholder' => $this->getMsg( 'userlogin-yourname-ph' )->text(),
+ 'autofocus'
+ ) ); ?>
+ </div>
+ <div>
+ <?php if ( $this->data['createemail'] ) { ?>
+ <label class="mw-ui-checkbox-label">
+ <input name="wpCreateaccountMail" type="checkbox" value="1" id="wpCreateaccountMail" tabindex="2"
+ <?php if ( $this->data['createemailset'] ) {
+ echo 'checked="checked"';
+ } ?>
+ >
+ <?php $this->msg( 'createaccountmail' ); ?>
+ </label>
+ <?php } ?>
+ </div>
+ <div class="mw-row-password">
+ <label for='wpPassword2'><?php $this->msg( 'userlogin-yourpassword' ); ?></label>
+ <?php echo Html::input( 'wpPassword', null, 'password', array(
+ 'class' => 'mw-input loginPassword',
+ 'id' => 'wpPassword2',
+ 'tabindex' => '3',
+ 'size' => '20',
+ 'required',
+ 'placeholder' => $this->getMsg( 'createacct-yourpassword-ph' )->text()
+ ) + User::passwordChangeInputAttribs() ); ?>
+ </div>
+ <?php if ( $this->data['usedomain'] ) {
+ $doms = "";
+ foreach ( $this->data['domainnames'] as $dom ) {
+ $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
+ }
+ ?>
+ <div>
+ <label><?php $this->msg( 'yourdomainname' ); ?></label>
+ <div class="mw-input">
+ <select name="wpDomain" value="<?php $this->text( 'domain' ); ?>"
+ tabindex="4">
+ <?php echo $doms ?>
+ </select>
+ </div>
+ </div>
+ <?php } ?>
+ <div class="mw-row-password">
+ <label for='wpRetype'><?php $this->msg( 'createacct-yourpasswordagain' ); ?></label>
+ <?php
+ echo Html::input( 'wpRetype', null, 'password', array(
+ 'class' => 'mw-input loginPassword',
+ 'id' => 'wpRetype',
+ 'tabindex' => '5',
+ 'size' => '20',
+ 'required',
+ 'placeholder' => $this->getMsg( 'createacct-yourpasswordagain-ph' )->text()
+ ) + User::passwordChangeInputAttribs() );
+ ?>
+ </div>
+ <div>
+ <?php if ( $this->data['useemail'] ) { ?>
+ <label for='wpEmail'>
+ <?php
+ $this->msg( $this->data['emailrequired'] ?
+ 'createacct-emailrequired' :
+ 'createacct-emailoptional'
+ );
+ ?>
+ </label>
+ <?php
+ echo Html::input( 'wpEmail', $this->data['email'], 'email', array(
+ 'class' => 'mw-input loginText',
+ 'id' => 'wpEmail',
+ 'tabindex' => '6',
+ 'size' => '20',
+ 'placeholder' => $this->getMsg( 'createacct-email-ph' )->text()
+ ) + ( $this->data['emailrequired'] ? array() : array( 'required' => '' ) ) );
+ ?>
+ <?php
+ // VForm eliminates the prefsectiontip div tip:
+ // prefs-help-email-required is redundant with the placeholder text
+ // Doesn't show the wordy prefs-help-email
+ // Doesn't show the wordy prefs-help-email-others
+ ?>
+ <?php } ?>
+ </div>
+ <?php if ( $this->data['userealname'] ) { ?>
+ <div>
+ <label for='wpRealName'><?php $this->msg( 'createacct-realname' ); ?></label>
+ <input type='text' class='mw-input loginText' name="wpRealName" id="wpRealName"
+ tabindex="7"
+ value="<?php $this->text( 'realname' ); ?>" size='20' />
+ <div class="prefsectiontip">
+ <?php $this->msgWiki( 'prefs-help-realname' ); ?>
+ </div>
+ </div>
+ <?php }
+ if ( $this->data['usereason'] ) { ?>
+ <div>
+ <label for='wpReason'><?php $this->msg( 'createacct-reason' ); ?></label>
+ <input type='text' class='mw-input loginText' name="wpReason" id="wpReason"
+ tabindex="8"
+ value="<?php $this->text( 'reason' ); ?>" size='20' />
+ </div>
+ <?php }
+ $tabIndex = 9;
+ if ( isset( $this->data['extraInput'] ) && is_array( $this->data['extraInput'] ) ) {
+ foreach ( $this->data['extraInput'] as $inputItem ) { ?>
+ <div>
+ <?php
+ // If it's a checkbox, output the whole thing (assume it has a msg).
+ if ( $inputItem['type'] == 'checkbox' ) {
+ ?>
+ <label class="mw-ui-checkbox-label">
+ <input
+ name="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"
+ id="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"
+ type="checkbox" value="1"
+ tabindex="<?php echo $tabIndex++; ?>"
+ <?php if ( !empty( $inputItem['value'] ) ) {
+ echo 'checked="checked"';
+ } ?>
+ >
+ <?php $this->msg( $inputItem['msg'] ); ?>
+ </label>
+ <?php
+ } else {
+ // Not a checkbox.
+ if ( !empty( $inputItem['msg'] ) ) {
+ // Output the message label
+ ?>
+ <label for="<?php echo htmlspecialchars( $inputItem['name'] ); ?>">
+ <?php $this->msgWiki( $inputItem['msg'] ); ?>
+ </label>
+ <?php
+ }
+ ?>
+ <input
+ type="<?php echo htmlspecialchars( $inputItem['type'] ); ?>"
+ class="mw-input"
+ name="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"
+ tabindex="<?php echo $tabIndex++; ?>"
+ value="<?php echo htmlspecialchars( $inputItem['value'] ); ?>"
+ id="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"
+ />
+ <?php
+ }
+ if ( $inputItem['helptext'] !== false ) {
+ ?>
+ <div class="prefsectiontip">
+ <?php $this->msgWiki( $inputItem['helptext'] ); ?>
+ </div>
+ <?php
+ }
+ ?>
+ </div>
+ <?php
+ }
+ }
+ // JS attempts to move the image CAPTCHA below this part of the form,
+ // so skip one index.
+ $tabIndex++;
+ ?>
+ <div class="mw-submit">
+ <input type='submit' class="mw-ui-button mw-ui-big mw-ui-block mw-ui-primary" name="wpCreateaccount" id="wpCreateaccount"
+ tabindex="<?php echo $tabIndex++; ?>"
+ value="<?php $this->msg( 'createaccount' ); ?>" />
+ </div>
+ <input type="hidden" id="useNew" name="useNew" value="1" />
+<?php if ( $this->haveData( 'uselang' ) ) { ?><input type="hidden" name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php } ?>
+<?php if ( $this->haveData( 'token' ) ) { ?><input type="hidden" name="wpCreateaccountToken" value="<?php $this->text( 'token' ); ?>" /><?php } ?>
+</form>
+</div>
+<div class="mw-createacct-benefits-container">
+ <h2><?php $this->msg( 'createacct-benefit-heading' ); ?></h2>
+ <div class="mw-createacct-benefits-list">
+ <div>
+ <div class="mw-benefits-icon <?php $this->msg( 'createacct-benefit-icon1' ); ?>"></div>
+ <div class="mw-number-text">
+ <h3><?php $this->msg( 'createacct-benefit-head1' ); ?></h3>
+ <p><?php $this->msg( 'createacct-benefit-body1' ); ?></p>
+ </div>
+ </div>
+ <div>
+ <div class="mw-benefits-icon <?php $this->msg( 'createacct-benefit-icon2' ); ?>"></div>
+ <div class="mw-number-text">
+ <h3><?php $this->msg( 'createacct-benefit-head2' ); ?></h3>
+ <p><?php $this->msg( 'createacct-benefit-body2' ); ?></p>
+ </div>
+ </div>
+ <div>
+ <div class="mw-benefits-icon <?php $this->msg( 'createacct-benefit-icon3' ); ?>"></div>
+ <div class="mw-number-text">
+ <h3><?php $this->msg( 'createacct-benefit-head3' ); ?></h3>
+ <p><?php $this->msg( 'createacct-benefit-body3' ); ?></p>
+ </div>
+ </div>
+ </div>
+</div>
+</div>
+<?php
+
+ }
+}
function execute() {
if ( $this->data['message'] ) {
?>
- <div class="<?php $this->text('messagetype') ?>box">
+ <div class="<?php $this->text( 'messagetype' ); ?>box">
<?php
if ( $this->data['messagetype'] == 'error' ) {
- ?><strong><?php $this->msg( 'loginerror' ) ?></strong><br /><?php
+ ?><strong><?php $this->msg( 'loginerror' ); ?></strong><br /><?php
}
?>
- <?php $this->html('message') ?>
+ <?php $this->html( 'message' ); ?>
</div>
<div class="visualClear"></div><?php
?>
<div id="loginstart"><?php $this->msgWiki( 'loginstart' ); ?></div>
<div id="userloginForm">
-<form name="userlogin" method="post" action="<?php $this->text('action') ?>">
- <h2><?php $this->msg('login') ?></h2>
- <p id="userloginlink"><?php $this->html('link') ?></p>
- <?php $this->html('header'); /* pre-table point for form plugins... */ ?>
- <div id="userloginprompt"><?php $this->msgWiki('loginprompt') ?></div>
+<form name="userlogin" method="post" action="<?php $this->text( 'action' ); ?>">
+ <h2><?php $this->msg( 'login' ); ?></h2>
+ <p id="userloginlink"><?php $this->html( 'link' ); ?></p>
+ <?php $this->html( 'header' ); /* pre-table point for form plugins... */ ?>
+ <div id="userloginprompt"><?php $this->msgWiki( 'loginprompt' ); ?></div>
<?php
if ( $this->haveData( 'languages' ) ) {
?><div id="languagelinks"><p><?php $this->html( 'languages' ); ?></p></div><?php
?>
<table>
<tr>
- <td class="mw-label"><label for='wpName1'><?php $this->msg('yourname') ?></label></td>
+ <td class="mw-label"><label for='wpName1'><?php $this->msg( 'yourname' ); ?></label></td>
<td class="mw-input">
<?php
echo Html::input( 'wpName', $this->data['name'], 'text', array(
</td>
</tr>
<tr>
- <td class="mw-label"><label for='wpPassword1'><?php $this->msg('yourpassword') ?></label></td>
+ <td class="mw-label"><label for='wpPassword1'><?php $this->msg( 'yourpassword' ); ?></label></td>
<td class="mw-input">
<?php
echo Html::input( 'wpPassword', null, 'password', array(
*/
class UserloginTemplateVForm extends BaseTemplate {
- /**
- * Get the Skin object related to this object, so that BaseTemplate msg 31
- * methods work.
- *
- * @return Skin object
- */
- public function getSkin() {
- global $wgOut;
- return $wgOut->getSkin();
- }
-
function execute() {
global $wgCookieExpiration;
$expirationDays = ceil( $wgCookieExpiration / ( 3600 * 24 ) );
?>
<div class="mw-ui-container">
<?php
- // Some extensions including CAPTCHAs add content to header on UserLoginForm hook.
- $this->html('header');
- if( $this->haveData( 'languages' ) ) {
+ if ( $this->haveData( 'languages' ) ) {
?>
<div id="languagelinks">
- <p><?php $this->html('languages' ); ?></p>
+ <p><?php $this->html( 'languages' ); ?></p>
</div>
<?php
}
?>
<div id="userloginForm">
-<form name="userlogin" class="mw-ui-vform" method="post" action="<?php $this->text('action') ?>">
+<form name="userlogin" class="mw-ui-vform" method="post" action="<?php $this->text( 'action' ); ?>">
+ <section class="mw-form-header">
+ <?php $this->html( 'header' ); /* extensions such as ConfirmEdit add form HTML here */ ?>
+ </section>
<?php
- if( $this->data['message'] ) {
+ if ( $this->data['message'] ) {
?>
- <div class="<?php $this->text('messagetype') ?>box">
+ <div class="<?php $this->text( 'messagetype' ); ?>box">
<?php
if ( $this->data['messagetype'] == 'error' ) {
?>
<strong><?php $this->msg( 'loginerror' )?></strong><br />
<?php
}
- $this->html('message')
+ $this->html( 'message' );
?>
</div>
<?php
<div>
<label for='wpPassword1'>
<?php
- $this->msg('userlogin-yourpassword');
+ $this->msg( 'userlogin-yourpassword' );
if ( $this->data['useemail'] && $this->data['canreset'] && $this->data['resetlink'] === true ) {
echo Linker::link(
?>
</div>
<?php
- if( isset( $this->data['usedomain'] ) && $this->data['usedomain'] ) {
+ if ( isset( $this->data['usedomain'] ) && $this->data['usedomain'] ) {
$doms = "";
- foreach( $this->data['domainnames'] as $dom ) {
+ foreach ( $this->data['domainnames'] as $dom ) {
$doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
}
?>
<div id="mw-user-domain-section">
- <label for='wpDomain' class="pos-above"><?php $this->msg( 'yourdomain' ) ?></label>
- <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>"
+ <label for='wpDomain' class="pos-above"><?php $this->msg( 'yourdomain' ); ?></label>
+ <select name="wpDomain" value="<?php $this->text( 'domain' ); ?>"
tabindex="3">
<?php echo $doms ?>
</select>
</div>
<?php }
- if( $this->haveData( 'extrafields' ) ) {
+ if ( $this->haveData( 'extrafields' ) ) {
echo $this->data['extrafields'];
} ?>
<div>
- <?php if( $this->data['canremember'] ) { ?>
+ <?php if ( $this->data['canremember'] ) { ?>
<label class="mw-ui-checkbox-label">
<input name="wpRemember" type="checkbox" value="1" id="wpRemember" tabindex="4"
<?php if ( $this->data['remember'] ) {
<?php } ?>
</div>
- <?php if( $this->data['cansecurelogin'] ) { ?>
+ <?php if ( $this->data['cansecurelogin'] ) { ?>
<div>
<label class="mw-ui-checkbox-label">
<input name="wpStickHTTPS" type="checkbox" value="1" id="wpStickHTTPS" tabindex="5"
?>
</div>
<div id="mw-userlogin-help">
- <?php echo $this->getMsg( 'userlogin-helplink' )->parse() ?>
+ <?php echo $this->getMsg( 'userlogin-helplink' )->parse(); ?>
</div>
- <?php if( $this->haveData( 'createOrLoginHref' ) ) { ?>
+ <?php if ( $this->haveData( 'createOrLoginHref' ) ) { ?>
<div id="mw-createaccount-cta">
- <h3 id="mw-userloginlink"><?php $this->msg( 'userlogin-noaccount' ) ?><a href="<?php $this->text( 'createOrLoginHref' ) ?>" id="mw-createaccount-join" tabindex="7" class="mw-ui-button mw-ui-constructive"><?php $this->msg( 'userlogin-joinproject' ) ?></a></h3>
+ <h3 id="mw-userloginlink"><?php $this->msg( 'userlogin-noaccount' ); ?><a href="<?php $this->text( 'createOrLoginHref' ); ?>" id="mw-createaccount-join" tabindex="7" class="mw-ui-button mw-ui-constructive"><?php $this->msg( 'userlogin-joinproject' ); ?></a></h3>
</div>
<?php } ?>
<input type="hidden" id="mw-useNew" name="useNew" value="1" />
-<?php if( $this->haveData( 'uselang' ) ) { ?><input type="hidden" name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php } ?>
-<?php if( $this->haveData( 'token' ) ) { ?><input type="hidden" name="wpLoginToken" value="<?php $this->text( 'token' ); ?>" /><?php } ?>
+<?php if ( $this->haveData( 'uselang' ) ) { ?><input type="hidden" name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php } ?>
+<?php if ( $this->haveData( 'token' ) ) { ?><input type="hidden" name="wpLoginToken" value="<?php $this->text( 'token' ); ?>" /><?php } ?>
</form>
</div>
</div>
self::WINDOWS_NONASCII_FILENAME => 'windows-nonascii-filename',
self::FILENAME_TOO_LONG => 'filename-toolong',
);
- if( isset( $code_to_status[$error] ) ) {
+ if ( isset( $code_to_status[$error] ) ) {
return $code_to_status[$error];
}
public static function createFromRequest( &$request, $type = null ) {
$type = $type ? $type : $request->getVal( 'wpSourceType', 'File' );
- if( !$type ) {
+ if ( !$type ) {
return null;
}
if ( is_null( $className ) ) {
$className = 'UploadFrom' . $type;
wfDebug( __METHOD__ . ": class name: $className\n" );
- if( !in_array( $type, self::$uploadHandlers ) ) {
+ if ( !in_array( $type, self::$uploadHandlers ) ) {
return null;
}
}
// Check whether this upload class is enabled
- if( !call_user_func( array( $className, 'isEnabled' ) ) ) {
+ if ( !call_user_func( array( $className, 'isEnabled' ) ) ) {
return null;
}
// Check whether the request is valid
- if( !call_user_func( array( $className, 'isValidRequest' ), $request ) ) {
+ if ( !call_user_func( array( $className, 'isValidRequest' ), $request ) ) {
return null;
}
/**
* If there was no filename or a zero size given, give up quick.
*/
- if( $this->isEmptyFile() ) {
+ if ( $this->isEmptyFile() ) {
wfProfileOut( __METHOD__ );
return array( 'status' => self::EMPTY_FILE );
}
* Honor $wgMaxUploadSize
*/
$maxSize = self::getMaxUploadSize( $this->getSourceType() );
- if( $this->mFileSize > $maxSize ) {
+ if ( $this->mFileSize > $maxSize ) {
wfProfileOut( __METHOD__ );
return array(
'status' => self::FILE_TOO_LARGE,
* probably not accept it.
*/
$verification = $this->verifyFile();
- if( $verification !== true ) {
+ if ( $verification !== true ) {
wfProfileOut( __METHOD__ );
return array(
'status' => self::VERIFICATION_ERROR,
* Make sure this file can be created
*/
$result = $this->validateName();
- if( $result !== true ) {
+ if ( $result !== true ) {
wfProfileOut( __METHOD__ );
return $result;
}
$error = '';
- if( !wfRunHooks( 'UploadVerification',
+ if ( !wfRunHooks( 'UploadVerification',
array( $this->mDestName, $this->mTempPath, &$error ) ) )
{
wfProfileOut( __METHOD__ );
**/
public function validateName() {
$nt = $this->getTitle();
- if( is_null( $nt ) ) {
+ if ( is_null( $nt ) ) {
$result = array( 'status' => $this->mTitleError );
- if( $this->mTitleError == self::ILLEGAL_FILENAME ) {
+ if ( $this->mTitleError == self::ILLEGAL_FILENAME ) {
$result['filtered'] = $this->mFilteredName;
}
if ( $this->mTitleError == self::FILETYPE_BADTYPE ) {
# check for htmlish code and javascript
if ( !$wgDisableUploadScriptChecks ) {
- if( self::detectScript( $this->mTempPath, $mime, $this->mFinalExtension ) ) {
+ if ( self::detectScript( $this->mTempPath, $mime, $this->mFinalExtension ) ) {
wfProfileOut( __METHOD__ );
return array( 'uploadscripted' );
}
- if( $this->mFinalExtension == 'svg' || $mime == 'image/svg+xml' ) {
- if( $this->detectScriptInSvg( $this->mTempPath ) ) {
+ if ( $this->mFinalExtension == 'svg' || $mime == 'image/svg+xml' ) {
+ if ( $this->detectScriptInSvg( $this->mTempPath ) ) {
wfProfileOut( __METHOD__ );
return array( 'uploadscripted' );
}
* to modify it by uploading a new revision.
*/
$nt = $this->getTitle();
- if( is_null( $nt ) ) {
+ if ( is_null( $nt ) ) {
return true;
}
$permErrors = $nt->getUserPermissionsErrors( 'edit', $user );
} else {
$permErrorsCreate = array();
}
- if( $permErrors || $permErrorsUpload || $permErrorsCreate ) {
+ if ( $permErrors || $permErrorsUpload || $permErrorsCreate ) {
$permErrors = array_merge( $permErrors, wfArrayDiff2( $permErrorsUpload, $permErrors ) );
$permErrors = array_merge( $permErrors, wfArrayDiff2( $permErrorsCreate, $permErrors ) );
return $permErrors;
$comparableName = str_replace( ' ', '_', $this->mDesiredDestName );
$comparableName = Title::capitalize( $comparableName, NS_FILE );
- if( $this->mDesiredDestName != $filename && $comparableName != $filename ) {
+ if ( $this->mDesiredDestName != $filename && $comparableName != $filename ) {
$warnings['badfilename'] = $filename;
}
}
$exists = self::getExistsWarning( $localFile );
- if( $exists !== false ) {
+ if ( $exists !== false ) {
$warnings['exists'] = $exists;
}
$title = $this->getTitle();
// Remove all matches against self
foreach ( $dupes as $key => $dupe ) {
- if( $title->equals( $dupe->getTitle() ) ) {
+ if ( $title->equals( $dupe->getTitle() ) ) {
unset( $dupes[$key] );
}
}
- if( $dupes ) {
+ if ( $dupes ) {
$warnings['duplicate'] = $dupes;
}
$user
);
- if( $status->isGood() ) {
+ if ( $status->isGood() ) {
if ( $watch ) {
$user->addWatch( $this->getLocalFile()->getTitle() );
}
$this->mFilteredName = wfStripIllegalFilenameChars( $this->mFilteredName );
/* Normalize to title form before we do any further processing */
$nt = Title::makeTitleSafe( NS_FILE, $this->mFilteredName );
- if( is_null( $nt ) ) {
+ if ( is_null( $nt ) ) {
$this->mTitleError = self::ILLEGAL_FILENAME;
return $this->mTitle = null;
}
*/
list( $partname, $ext ) = $this->splitExtensions( $this->mFilteredName );
- if( count( $ext ) ) {
+ if ( count( $ext ) ) {
$this->mFinalExtension = trim( $ext[count( $ext ) - 1] );
} else {
$this->mFinalExtension = '';
# If there was more than one "extension", reassemble the base
# filename to prevent bogus complaints about length
- if( count( $ext ) > 1 ) {
- for( $i = 0; $i < count( $ext ) - 1; $i++ ) {
+ if ( count( $ext ) > 1 ) {
+ for ( $i = 0; $i < count( $ext ) - 1; $i++ ) {
$partname .= '.' . $ext[$i];
}
}
- if( strlen( $partname ) < 1 ) {
+ if ( strlen( $partname ) < 1 ) {
$this->mTitleError = self::MIN_LENGTH_PARTNAME;
return $this->mTitle = null;
}
* @return LocalFile|null
*/
public function getLocalFile() {
- if( is_null( $this->mLocalFile ) ) {
+ if ( is_null( $this->mLocalFile ) ) {
$nt = $this->getTitle();
$this->mLocalFile = is_null( $nt ) ? null : wfLocalFile( $nt );
}
public static function verifyExtension( $mime, $extension ) {
$magic = MimeMagic::singleton();
- if ( !$mime || $mime == 'unknown' || $mime == 'unknown/unknown' )
+ if ( !$mime || $mime == 'unknown' || $mime == 'unknown/unknown' ) {
if ( !$magic->isRecognizableExtension( $extension ) ) {
wfDebug( __METHOD__ . ": passing file with unknown detected mime type; " .
"unrecognized extension '$extension', can't verify\n" );
"recognized extension '$extension', so probably invalid file\n" );
return false;
}
+ }
$match = $magic->isMatchingExtension( $extension, $mime );
if ( $match === null ) {
wfDebug( __METHOD__ . ": no file extension known for mime type $mime, passing file\n" );
return true;
- } elseif( $match === true ) {
+ } elseif ( $match === true ) {
wfDebug( __METHOD__ . ": mime type $mime matches extension $extension, passing file\n" );
#TODO: if it's a bitmap, make sure PHP or ImageMagic resp. can handle it!
# ugly hack: for text files, always look at the entire file.
# For binary field, just check the first K.
- if( strpos( $mime, 'text/' ) === 0 ) {
+ if ( strpos( $mime, 'text/' ) === 0 ) {
$chunk = file_get_contents( $file );
} else {
$fp = fopen( $file, 'rb' );
$chunk = strtolower( $chunk );
- if( !$chunk ) {
+ if ( !$chunk ) {
wfProfileOut( __METHOD__ );
return false;
}
# decode from UTF-16 if needed (could be used for obfuscation).
- if( substr( $chunk, 0, 2 ) == "\xfe\xff" ) {
+ if ( substr( $chunk, 0, 2 ) == "\xfe\xff" ) {
$enc = 'UTF-16BE';
- } elseif( substr( $chunk, 0, 2 ) == "\xff\xfe" ) {
+ } elseif ( substr( $chunk, 0, 2 ) == "\xff\xfe" ) {
$enc = 'UTF-16LE';
} else {
$enc = null;
}
- if( $enc ) {
+ if ( $enc ) {
$chunk = iconv( $enc, "ASCII//IGNORE", $chunk );
}
'<table'
);
- if( !$wgAllowTitlesInSVG && $extension !== 'svg' && $mime !== 'image/svg' ) {
+ if ( !$wgAllowTitlesInSVG && $extension !== 'svg' && $mime !== 'image/svg' ) {
$tags[] = '<title';
}
- foreach( $tags as $tag ) {
- if( false !== strpos( $chunk, $tag ) ) {
+ foreach ( $tags as $tag ) {
+ if ( false !== strpos( $chunk, $tag ) ) {
wfDebug( __METHOD__ . ": found something that may make it be mistaken for html: $tag\n" );
wfProfileOut( __METHOD__ );
return true;
$chunk = Sanitizer::decodeCharReferences( $chunk );
# look for script-types
- if( preg_match( '!type\s*=\s*[\'"]?\s*(?:\w*/)?(?:ecma|java)!sim', $chunk ) ) {
+ if ( preg_match( '!type\s*=\s*[\'"]?\s*(?:\w*/)?(?:ecma|java)!sim', $chunk ) ) {
wfDebug( __METHOD__ . ": found script types\n" );
wfProfileOut( __METHOD__ );
return true;
}
# look for html-style script-urls
- if( preg_match( '!(?:href|src|data)\s*=\s*[\'"]?\s*(?:ecma|java)script:!sim', $chunk ) ) {
+ if ( preg_match( '!(?:href|src|data)\s*=\s*[\'"]?\s*(?:ecma|java)script:!sim', $chunk ) ) {
wfDebug( __METHOD__ . ": found html-style script urls\n" );
wfProfileOut( __METHOD__ );
return true;
}
# look for css-style script-urls
- if( preg_match( '!url\s*\(\s*[\'"]?\s*(?:ecma|java)script:!sim', $chunk ) ) {
+ if ( preg_match( '!url\s*\(\s*[\'"]?\s*(?:ecma|java)script:!sim', $chunk ) ) {
wfDebug( __METHOD__ . ": found css-style script urls\n" );
wfProfileOut( __METHOD__ );
return true;
/*
* check for elements that can contain javascript
*/
- if( $strippedElement == 'script' ) {
+ if ( $strippedElement == 'script' ) {
wfDebug( __METHOD__ . ": Found script element '$element' in uploaded file.\n" );
return true;
}
# e.g., <svg xmlns="http://www.w3.org/2000/svg"> <handler xmlns:ev="http://www.w3.org/2001/xml-events" ev:event="load">alert(1)</handler> </svg>
- if( $strippedElement == 'handler' ) {
+ if ( $strippedElement == 'handler' ) {
wfDebug( __METHOD__ . ": Found scriptable element '$element' in uploaded file.\n" );
return true;
}
# SVG reported in Feb '12 that used xml:stylesheet to generate javascript block
- if( $strippedElement == 'stylesheet' ) {
+ if ( $strippedElement == 'stylesheet' ) {
wfDebug( __METHOD__ . ": Found scriptable element '$element' in uploaded file.\n" );
return true;
}
- foreach( $attribs as $attrib => $value ) {
+ foreach ( $attribs as $attrib => $value ) {
$stripped = $this->stripXmlNamespace( $attrib );
$value = strtolower( $value );
- if( substr( $stripped, 0, 2 ) == 'on' ) {
+ if ( substr( $stripped, 0, 2 ) == 'on' ) {
wfDebug( __METHOD__ . ": Found event-handler attribute '$attrib'='$value' in uploaded file.\n" );
return true;
}
# href with javascript target
- if( $stripped == 'href' && strpos( strtolower( $value ), 'javascript:' ) !== false ) {
+ if ( $stripped == 'href' && strpos( strtolower( $value ), 'javascript:' ) !== false ) {
wfDebug( __METHOD__ . ": Found script in href attribute '$attrib'='$value' in uploaded file.\n" );
return true;
}
# href with embedded svg as target
- if( $stripped == 'href' && preg_match( '!data:[^,]*image/svg[^,]*,!sim', $value ) ) {
+ if ( $stripped == 'href' && preg_match( '!data:[^,]*image/svg[^,]*,!sim', $value ) ) {
wfDebug( __METHOD__ . ": Found href to embedded svg \"<$strippedElement '$attrib'='$value'...\" in uploaded file.\n" );
return true;
}
# href with embedded (text/xml) svg as target
- if( $stripped == 'href' && preg_match( '!data:[^,]*text/xml[^,]*,!sim', $value ) ) {
+ if ( $stripped == 'href' && preg_match( '!data:[^,]*text/xml[^,]*,!sim', $value ) ) {
wfDebug( __METHOD__ . ": Found href to embedded svg \"<$strippedElement '$attrib'='$value'...\" in uploaded file.\n" );
return true;
}
# use set/animate to add event-handler attribute to parent
- if( ( $strippedElement == 'set' || $strippedElement == 'animate' ) && $stripped == 'attributename' && substr( $value, 0, 2 ) == 'on' ) {
+ if ( ( $strippedElement == 'set' || $strippedElement == 'animate' ) && $stripped == 'attributename' && substr( $value, 0, 2 ) == 'on' ) {
wfDebug( __METHOD__ . ": Found svg setting event-handler attribute with \"<$strippedElement $stripped='$value'...\" in uploaded file.\n" );
return true;
}
# use set to add href attribute to parent element
- if( $strippedElement == 'set' && $stripped == 'attributename' && strpos( $value, 'href' ) !== false ) {
+ if ( $strippedElement == 'set' && $stripped == 'attributename' && strpos( $value, 'href' ) !== false ) {
wfDebug( __METHOD__ . ": Found svg setting href attribute '$value' in uploaded file.\n" );
return true;
}
# use set to add a remote / data / script target to an element
- if( $strippedElement == 'set' && $stripped == 'to' && preg_match( '!(http|https|data|script):!sim', $value ) ) {
+ if ( $strippedElement == 'set' && $stripped == 'to' && preg_match( '!(http|https|data|script):!sim', $value ) ) {
wfDebug( __METHOD__ . ": Found svg setting attribute to '$value' in uploaded file.\n" );
return true;
}
# use handler attribute with remote / data / script
- if( $stripped == 'handler' && preg_match( '!(http|https|data|script):!sim', $value ) ) {
+ if ( $stripped == 'handler' && preg_match( '!(http|https|data|script):!sim', $value ) ) {
wfDebug( __METHOD__ . ": Found svg setting handler with remote/data/script '$attrib'='$value' in uploaded file.\n" );
return true;
}
# use CSS styles to bring in remote code
# catch url("http:..., url('http:..., url(http:..., but not url("#..., url('#..., url(#....
- if( $stripped == 'style' && preg_match_all( '!((?:font|clip-path|fill|filter|marker|marker-end|marker-mid|marker-start|mask|stroke)\s*:\s*url\s*\(\s*["\']?\s*[^#]+.*?\))!sim', $value, $matches ) ) {
+ if ( $stripped == 'style' && preg_match_all( '!((?:font|clip-path|fill|filter|marker|marker-end|marker-mid|marker-start|mask|stroke)\s*:\s*url\s*\(\s*["\']?\s*[^#]+.*?\))!sim', $value, $matches ) ) {
foreach ( $matches[1] as $match ) {
if ( !preg_match( '!(?:font|clip-path|fill|filter|marker|marker-end|marker-mid|marker-start|mask|stroke)\s*:\s*url\s*\(\s*(#|\'#|"#)!sim', $match ) ) {
wfDebug( __METHOD__ . ": Found svg setting a style with remote url '$attrib'='$value' in uploaded file.\n" );
}
# image filters can pull in url, which could be svg that executes scripts
- if( $strippedElement == 'image' && $stripped == 'filter' && preg_match( '!url\s*\(!sim', $value ) ) {
+ if ( $strippedElement == 'image' && $stripped == 'filter' && preg_match( '!url\s*\(!sim', $value ) ) {
wfDebug( __METHOD__ . ": Found image filter with url: \"<$strippedElement $stripped='$value'...\" in uploaded file.\n" );
return true;
}
private function checkOverwrite( $user ) {
// First check whether the local file can be overwritten
$file = $this->getLocalFile();
- if( $file->exists() ) {
- if( !self::userCanReUpload( $user, $file ) ) {
+ if ( $file->exists() ) {
+ if ( !self::userCanReUpload( $user, $file ) ) {
return array( 'fileexists-forbidden', $file->getName() );
} else {
return true;
* @return Boolean
*/
public static function userCanReUpload( User $user, $img ) {
- if( $user->isAllowed( 'reupload' ) ) {
+ if ( $user->isAllowed( 'reupload' ) ) {
return true; // non-conditional
}
- if( !$user->isAllowed( 'reupload-own' ) ) {
+ if ( !$user->isAllowed( 'reupload-own' ) ) {
return false;
}
- if( is_string( $img ) ) {
+ if ( is_string( $img ) ) {
$img = wfLocalFile( $img );
}
if ( !( $img instanceof LocalFile ) ) {
* @return mixed False if the file does not exists, else an array
*/
public static function getExistsWarning( $file ) {
- if( $file->exists() ) {
+ if ( $file->exists() ) {
return array( 'warning' => 'exists', 'file' => $file );
}
- if( $file->getTitle()->getArticleID() ) {
+ if ( $file->getTitle()->getArticleID() ) {
return array( 'warning' => 'page-exists', 'file' => $file );
}
return array( 'warning' => 'was-deleted', 'file' => $file );
}
- if( strpos( $file->getName(), '.' ) == false ) {
+ if ( strpos( $file->getName(), '.' ) == false ) {
$partname = $file->getName();
$extension = '';
} else {
$nt_lc = Title::makeTitle( NS_FILE, "{$partname}.{$normalizedExtension}" );
$file_lc = wfLocalFile( $nt_lc );
- if( $file_lc->exists() ) {
+ if ( $file_lc->exists() ) {
return array(
'warning' => 'exists-normalized',
'file' => $file,
# Check for filenames like 50px- or 180px-, these are mostly thumbnails
$nt_thb = Title::newFromText( substr( $partname, strpos( $partname, '-' ) + 1 ) . '.' . $extension, NS_FILE );
$file_thb = wfLocalFile( $nt_thb );
- if( $file_thb->exists() ) {
+ if ( $file_thb->exists() ) {
return array(
'warning' => 'thumb',
'file' => $file,
}
}
- foreach( self::getFilenamePrefixBlacklist() as $prefix ) {
+ foreach ( self::getFilenamePrefixBlacklist() as $prefix ) {
if ( substr( $partname, 0, strlen( $prefix ) ) == $prefix ) {
return array(
'warning' => 'bad-prefix',
public static function getFilenamePrefixBlacklist() {
$blacklist = array();
$message = wfMessage( 'filename-prefix-blacklist' )->inContentLanguage();
- if( !$message->isDisabled() ) {
+ if ( !$message->isDisabled() ) {
$lines = explode( "\n", $message->plain() );
- foreach( $lines as $line ) {
+ foreach ( $lines as $line ) {
// Remove comment lines
$comment = substr( trim( $line ), 0, 1 );
if ( $comment == '#' || $comment == '' ) {
// user object. sometimes this won't exist, as when running from cron.
$this->user = $user;
- if( $repo ) {
+ if ( $repo ) {
$this->repo = $repo;
} else {
$this->repo = RepoGroup::singleton()->getLocalRepo();
}
- if( $stash ) {
+ if ( $stash ) {
$this->stash = $stash;
} else {
- if( $user ) {
+ if ( $user ) {
wfDebug( __METHOD__ . " creating new UploadFromChunks instance for " . $user->getId() . "\n" );
} else {
wfDebug( __METHOD__ . " creating new UploadFromChunks instance with no user\n" );
// Concatenate all the chunks to mVirtualTempPath
$fileList = Array();
// The first chunk is stored at the mVirtualTempPath path so we start on "chunk 1"
- for( $i = 0; $i <= $this->getChunkIndex(); $i++ ) {
+ for ( $i = 0; $i <= $this->getChunkIndex(); $i++ ) {
$fileList[] = $this->getVirtualChunkLocation( $i );
}
$tStart = microtime( true );
$status = $this->repo->concatenate( $fileList, $tmpPath, FileRepo::DELETE_SOURCE );
$tAmount = microtime( true ) - $tStart;
- if( !$status->isOk() ) {
+ if ( !$status->isOk() ) {
return $status;
}
wfDebugLog( 'fileconcatenate', "Combined $i chunks in $tAmount seconds.\n" );
// Update local chunk index for the current chunk
$this->mChunkIndex++;
$status = $this->outputChunk( $chunkPath );
- if( $status->isGood() ) {
+ if ( $status->isGood() ) {
// Update local offset:
$this->mOffset = $preAppendOffset + $chunkSize;
// Update chunk table status db
* @return Integer index of the current chunk
*/
private function getChunkIndex() {
- if( $this->mChunkIndex !== null ) {
+ if ( $this->mChunkIndex !== null ) {
return $this->mChunkIndex;
}
return 0;
}
private function getChunkFileKey( $index = null ) {
- if( $index === null ) {
+ if ( $index === null ) {
$index = $this->getChunkIndex();
}
return $this->mFileKey . '.' . $index;
function initializeFromRequest( &$request ) {
$upload = $request->getUpload( 'wpUploadFile' );
$desiredDestName = $request->getText( 'wpDestFile' );
- if( !$desiredDestName ) {
+ if ( !$desiredDestName ) {
$desiredDestName = $upload->getName();
}
// user object. sometimes this won't exist, as when running from cron.
$this->user = $user;
- if( $repo ) {
+ if ( $repo ) {
$this->repo = $repo;
} else {
$this->repo = RepoGroup::singleton()->getLocalRepo();
}
- if( $stash ) {
+ if ( $stash ) {
$this->stash = $stash;
} else {
- if( $user ) {
+ if ( $user ) {
wfDebug( __METHOD__ . " creating new UploadStash instance for " . $user->getId() . "\n" );
} else {
wfDebug( __METHOD__ . " creating new UploadStash instance with no user\n" );
return false;
}
$valid = false;
- foreach( $wgCopyUploadsDomains as $domain ) {
+ foreach ( $wgCopyUploadsDomains as $domain ) {
// See if the domain for the upload matches this whitelisted domain
$whitelistedDomainPieces = explode( '.', $domain );
$uploadDomainPieces = explode( '.', $parsedUrl['host'] );
return Status::newFatal( 'http-invalid-url' );
}
- if( !self::isAllowedHost( $this->mUrl ) ) {
+ if ( !self::isAllowedHost( $this->mUrl ) ) {
return Status::newFatal( 'upload-copy-upload-invalid-domain' );
}
if ( !$this->mAsync ) {
__METHOD__
);
- if( !$row ) {
+ if ( !$row ) {
throw new UploadStashNoSuchKeyException( "No such key ($key), cannot remove" );
}
protected function fetchFileMetadata( $key, $readFromDB = DB_SLAVE ) {
// populate $fileMetadata[$key]
$dbr = null;
- if( $readFromDB === DB_MASTER ) {
+ if ( $readFromDB === DB_MASTER ) {
// sometimes reading from the master is necessary, if there's replication lag.
$dbr = $this->repo->getMasterDb();
} else {
$alpha = '[a-z]';
$digit = '[0-9]';
$alphanum = '[a-z0-9]';
- $x = 'x' ; # private use singleton
+ $x = 'x'; # private use singleton
$singleton = '[a-wy-z]'; # other singleton
$s = $lenient ? '[-_]' : '-';
}
/**
+ * Returns an array of localised namespaces indexed by their numbers. If the namespace is not
+ * available in localised form, it will be included in English.
+ *
* @return array
*/
public function getNamespaces() {
$s .= $this->getMonthNameGen( substr( $ts, 4, 2 ) );
break;
case 'xjx':
- if ( !$hebrew ) $hebrew = self::tsToHebrew( $ts );
+ if ( !$hebrew ) {
+ $hebrew = self::tsToHebrew( $ts );
+ }
$s .= $this->getHebrewCalendarMonthNameGen( $hebrew[1] );
break;
case 'd':
}
if ( strlen( $s ) == 2 ) {
$str = $s . "'";
- } else {
+ } else {
$str = substr( $s, 0, strlen( $s ) - 2 ) . '"';
$str .= substr( $s, strlen( $s ) - 2, 2 );
}
# will normalize out-of-range values so we don't have to split $minDiff
# into hours and minutes.
$t = mktime( (
- (int)substr( $ts, 8, 2 ) ), # Hours
- (int)substr( $ts, 10, 2 ) + $minDiff, # Minutes
- (int)substr( $ts, 12, 2 ), # Seconds
- (int)substr( $ts, 4, 2 ), # Month
- (int)substr( $ts, 6, 2 ), # Day
- (int)substr( $ts, 0, 4 ) ); # Year
+ (int)substr( $ts, 8, 2 ) ), # Hours
+ (int)substr( $ts, 10, 2 ) + $minDiff, # Minutes
+ (int)substr( $ts, 12, 2 ), # Seconds
+ (int)substr( $ts, 4, 2 ), # Month
+ (int)substr( $ts, 6, 2 ), # Day
+ (int)substr( $ts, 0, 4 ) ); # Year
$date = date( 'YmdHis', $t );
wfRestoreWarnings();
* @param $type string May be date, time or both
* @param $pref string The format name as it appears in Messages*.php
*
+ * @since 1.22 New type 'pretty' that provides a more readable timestamp format
+ *
* @return string
*/
function getDateFormatString( $type, $pref ) {
$df = self::$dataCache->getSubitem( $this->mCode, 'dateFormats', "$pref $type" );
} else {
$df = self::$dataCache->getSubitem( $this->mCode, 'dateFormats', "$pref $type" );
- if ( is_null( $df ) ) {
+
+ if ( $type === 'pretty' && $df === null ) {
+ $df = $this->getDateFormatString( 'date', $pref );
+ }
+
+ if ( $df === null ) {
$pref = $this->getDefaultDateFormat();
$df = self::$dataCache->getSubitem( $this->mCode, 'dateFormats', "$pref $type" );
}
return $this->internalUserTimeAndDate( 'both', $ts, $user, $options );
}
+ /**
+ * Convert an MWTimestamp into a pretty human-readable timestamp using
+ * the given user preferences and relative base time.
+ *
+ * DO NOT USE THIS FUNCTION DIRECTLY. Instead, call MWTimestamp::getHumanTimestamp
+ * on your timestamp object, which will then call this function. Calling
+ * this function directly will cause hooks to be skipped over.
+ *
+ * @see MWTimestamp::getHumanTimestamp
+ * @param MWTimestamp $ts Timestamp to prettify
+ * @param MWTimestamp $relativeTo Base timestamp
+ * @param User $user User preferences to use
+ * @return string Human timestamp
+ * @since 1.21
+ */
+ public function getHumanTimestamp( MWTimestamp $ts, MWTimestamp $relativeTo, User $user ) {
+ $diff = $ts->diff( $relativeTo );
+ $diffDay = (bool)( (int)$ts->timestamp->format( 'w' ) - (int)$relativeTo->timestamp->format( 'w' ) );
+ $days = $diff->days ?: (int)$diffDay;
+ if ( $diff->invert || $days > 5 && $ts->timestamp->format( 'Y' ) !== $relativeTo->timestamp->format( 'Y' ) ) {
+ // Timestamps are in different years: use full timestamp
+ // Also do full timestamp for future dates
+ /**
+ * @FIXME Add better handling of future timestamps.
+ */
+ $format = $this->getDateFormatString( 'both', $user->getDatePreference() ?: 'default' );
+ $ts = $this->sprintfDate( $format, $ts->getTimestamp( TS_MW ) );
+ } elseif ( $days > 5 ) {
+ // Timestamps are in same year, but more than 5 days ago: show day and month only.
+ $format = $this->getDateFormatString( 'pretty', $user->getDatePreference() ?: 'default' );
+ $ts = $this->sprintfDate( $format, $ts->getTimestamp( TS_MW ) );
+ } elseif ( $days > 1 ) {
+ // Timestamp within the past week: show the day of the week and time
+ $format = $this->getDateFormatString( 'time', $user->getDatePreference() ?: 'default' );
+ $weekday = self::$mWeekdayMsgs[$ts->timestamp->format( 'w' )];
+ $ts = wfMessage( "$weekday-at" )
+ ->inLanguage( $this )
+ ->params( $this->sprintfDate( $format, $ts->getTimestamp( TS_MW ) ) )
+ ->text();
+ } elseif ( $days == 1 ) {
+ // Timestamp was yesterday: say 'yesterday' and the time.
+ $format = $this->getDateFormatString( 'time', $user->getDatePreference() ?: 'default' );
+ $ts = wfMessage( 'yesterday-at' )
+ ->inLanguage( $this )
+ ->params( $this->sprintfDate( $format, $ts->getTimestamp( TS_MW ) ) )
+ ->text();
+ } elseif ( $diff->h > 1 || $diff->h == 1 && $diff->i > 30 ) {
+ // Timestamp was today, but more than 90 minutes ago: say 'today' and the time.
+ $format = $this->getDateFormatString( 'time', $user->getDatePreference() ?: 'default' );
+ $ts = wfMessage( 'today-at' )
+ ->inLanguage( $this )
+ ->params( $this->sprintfDate( $format, $ts->getTimestamp( TS_MW ) ) )
+ ->text();
+
+ // From here on in, the timestamp was soon enough ago so that we can simply say
+ // XX units ago, e.g., "2 hours ago" or "5 minutes ago"
+ } elseif ( $diff->h == 1 ) {
+ // Less than 90 minutes, but more than an hour ago.
+ $ts = wfMessage( 'hours-ago' )->inLanguage( $this )->numParams( 1 )->text();
+ } elseif ( $diff->i >= 1 ) {
+ // A few minutes ago.
+ $ts = wfMessage( 'minutes-ago' )->inLanguage( $this )->numParams( $diff->i )->text();
+ } elseif ( $diff->s >= 30 ) {
+ // Less than a minute, but more than 30 sec ago.
+ $ts = wfMessage( 'seconds-ago' )->inLanguage( $this )->numParams( $diff->s )->text();
+ } else {
+ // Less than 30 seconds ago.
+ $ts = wfMessage( 'just-now' )->text();
+ }
+
+ return $ts;
+ }
+
/**
* @param $key string
* @return array|null
* @since 1.20
*/
function getDirMarkEntity( $opposite = false ) {
- if ( $opposite ) { return $this->isRTL() ? '‎' : '‏'; }
+ if ( $opposite ) {
+ return $this->isRTL() ? '‎' : '‏';
+ }
return $this->isRTL() ? '‏' : '‎';
}
function getDirMark( $opposite = false ) {
$lrm = "\xE2\x80\x8E"; # LEFT-TO-RIGHT MARK, commonly abbreviated LRM
$rlm = "\xE2\x80\x8F"; # RIGHT-TO-LEFT MARK, commonly abbreviated RLM
- if ( $opposite ) { return $this->isRTL() ? $lrm : $rlm; }
+ if ( $opposite ) {
+ return $this->isRTL() ? $lrm : $rlm;
+ }
return $this->isRTL() ? $rlm : $lrm;
}
$numMatches = preg_match_all( "/(#+)/", $digitGroupingPattern, $matches );
preg_match( "/\d+/", $number, $integerPart );
preg_match( "/\.\d*/", $number, $decimalPart );
- $groupedNumber = ( count( $decimalPart ) > 0 ) ? $decimalPart[0]:"";
+ $groupedNumber = ( count( $decimalPart ) > 0 ) ? $decimalPart[0] : "";
if ( $groupedNumber === $number ) {
// the string does not have any number part. Eg: .12345
return $sign . $groupedNumber;
}
$start = $end = strlen( $integerPart[0] );
while ( $start > 0 ) {
- $match = $matches[0][$numMatches -1] ;
+ $match = $matches[0][$numMatches - 1];
$matchLen = strlen( $match );
$start = $end - $matchLen;
if ( $start < 0 ) {
$start = 0;
}
- $groupedNumber = substr( $number, $start, $end -$start ) . $groupedNumber ;
+ $groupedNumber = substr( $number, $start, $end -$start ) . $groupedNumber;
$end = $start;
if ( $numMatches > 1 ) {
// use the last pattern for the rest of the number
# We got the first byte only of a multibyte char; remove it.
$string = substr( $string, 0, -1 );
} elseif ( $char >= 0x80 &&
- preg_match( '/^(.*)(?:[\xe0-\xef][\x80-\xbf]|' .
- '[\xf0-\xf7][\x80-\xbf]{1,2})$/', $string, $m ) )
- {
+ preg_match( '/^(.*)(?:[\xe0-\xef][\x80-\xbf]|' .
+ '[\xf0-\xf7][\x80-\xbf]{1,2})$/', $string, $m )
+ ) {
# We chopped in the middle of a character; remove it
$string = $m[1];
}
break;
}
}
- if ( $pos >= $textLen ) break; // extra iteration just for above checks
+ if ( $pos >= $textLen ) {
+ break; // extra iteration just for above checks
+ }
# Read the next char...
$ch = $text[$pos];
function getGrammarForms() {
global $wgGrammarForms;
if ( isset( $wgGrammarForms[$this->getCode()] ) && is_array( $wgGrammarForms[$this->getCode()] ) ) {
- return $wgGrammarForms[$this->getCode()];
+ return $wgGrammarForms[$this->getCode()];
}
return array();
}
* @since 1.18
*/
public function formatExpiry( $expiry, $format = true ) {
- static $infinity, $infinityMsg;
+ static $infinity;
if ( $infinity === null ) {
- $infinityMsg = wfMessage( 'infiniteblock' );
$infinity = wfGetDB( DB_SLAVE )->getInfinity();
}
if ( $expiry == '' || $expiry == $infinity ) {
return $format === true
- ? $infinityMsg
+ ? $this->getMessageFromDB( 'infiniteblock' )
: $infinity;
} else {
return $format === true
}
}
- if( $this->guessVariant( $text, $toVariant ) ) {
+ if ( $this->guessVariant( $text, $toVariant ) ) {
wfProfileOut( __METHOD__ );
return $text;
}
if ( $pos === false ) {
// No more markup, append final segment
$fragment = substr( $text, $startPos );
- $out .= $shouldConvert? $this->autoConvert( $fragment, $variant ): $fragment;
+ $out .= $shouldConvert ? $this->autoConvert( $fragment, $variant ) : $fragment;
return $out;
}
// Markup found
// Append initial segment
$fragment = substr( $text, $startPos, $pos - $startPos );
- $out .= $shouldConvert? $this->autoConvert( $fragment, $variant ): $fragment;
+ $out .= $shouldConvert ? $this->autoConvert( $fragment, $variant ) : $fragment;
// Advance position
$startPos = $pos;
while ( $startPos < $length ) {
$m = false;
- preg_match( '/-\{|\}-/', $text, $m, PREG_OFFSET_CAPTURE, $startPos );
+ preg_match( '/-\{|\}-/', $text, $m, PREG_OFFSET_CAPTURE, $startPos );
if ( !$m ) {
// Unclosed rule
break;
$choice = preg_split( $varsep_pattern, $rules );
foreach ( $choice as $c ) {
- $v = explode( ':', $c, 2 );
+ $v = explode( ':', $c, 2 );
if ( count( $v ) != 2 ) {
// syntax error, skip
continue;
}
$to = trim( $v[1] );
- $v = trim( $v[0] );
- $u = explode( '=>', $v, 2 );
+ $v = trim( $v[0] );
+ $u = explode( '=>', $v, 2 );
// if $to is empty, strtr() could return a wrong result
if ( count( $u ) == 1 && $to && in_array( $v, $variants ) ) {
$bidtable[$v] = $to;
// then we check its fallback variants.
$variantFallbacks =
$this->mConverter->getVariantFallbacks( $variant );
- if( is_array( $variantFallbacks ) ) {
+ if ( is_array( $variantFallbacks ) ) {
foreach ( $variantFallbacks as $variantFallback ) {
// if current variant's fallback exist in flags
if ( isset( $this->mVariantFlags[$variantFallback] ) ) {
*/
/**
- * These determine things like interwikis, language selectors, and so on.
- * Safe to change without running scripts on the respective sites.
- *
- * \xE2\x80\x8E is the left-to-right marker and
- * \xE2\x80\x8F is the right-to-left marker.
- * They are required for ensuring the correct display of brackets in
- * mixed rtl/ltr environment.
- *
- * Some writing systems require some line-height fixes. This includes
- * most Indic scripts, like Devanagari.
- * If you are adding support for such a language, add it also to
- * the relevant section in skins/common/shared.css.
- *
- * @ingroup Language
- */
+ * These determine things like interwikis, language selectors, and so on.
+ * Safe to change without running scripts on the respective sites.
+ *
+ * \xE2\x80\x8E is the left-to-right marker and
+ * \xE2\x80\x8F is the right-to-left marker.
+ * They are required for ensuring the correct display of brackets in
+ * mixed rtl/ltr environment.
+ *
+ * Some writing systems require some line-height fixes. This includes
+ * most Indic scripts, like Devanagari.
+ * If you are adding support for such a language, add it also to
+ * the relevant section in skins/common/shared.css.
+ *
+ * @ingroup Language
+ */
/* private */ $coreLanguageNames = array(
'aa' => 'Qafár af', # Afar
'ab' => 'Аҧсшәа', # Abkhaz
'ho' => 'Hiri Motu', # Hiri Motu
'hr' => 'hrvatski', # Croatian
'hsb' => 'hornjoserbsce', # Upper Sorbian
- 'ht' => 'Kreyòl ayisyen', # Haitian Creole French
+ 'ht' => 'Kreyòl ayisyen', # Haitian Creole French
'hu' => 'magyar', # Hungarian
'hy' => 'Հայերեն', # Armenian
'hz' => 'Otsiherero', # Herero
'ks-arab' => 'کٲشُر', # Kashmiri (Perso-Arabic script)
'ks-deva' => 'कॉशुर', # Kashmiri (Devanagari script)
'ksh' => 'Ripoarisch', # Ripuarian
- 'ku' => 'Kurdî', # Kurdish (multiple scripts - defaults to Latin)
+ 'ku' => 'Kurdî', # Kurdish (multiple scripts - defaults to Latin)
'ku-latn' => "Kurdî (latînî)\xE2\x80\x8E", # Northern Kurdish (Latin script)
'ku-arab' => "كوردي (عەرەبی)\xE2\x80\x8F", # Northern Kurdish (Arabic script) (falls back to ckb)
'kv' => 'коми', # Komi-Zyrian (Cyrillic is common script but also written in Latin script)
'liv' => 'Līvõ kēļ', # Livonian
'lmo' => 'lumbaart', # Lombard
'ln' => 'lingála', # Lingala
- 'lo' => 'ລາວ',# Laotian
+ 'lo' => 'ລາວ', # Laotian
'loz' => 'Silozi', # Lozi
'lt' => 'lietuvių', # Lithuanian
'ltg' => 'latgaļu', # Latgalian
* @return string
*/
function convertPlural( $count, $forms ) {
- if ( !count( $forms ) ) { return ''; }
+ if ( !count( $forms ) ) {
+ return '';
+ }
// If the actual number is not mentioned in the expression, then just two forms are enough:
// singular for $count == 1
// plural for $count != 1
// For example, "This user belongs to {{PLURAL:$1|one group|several groups}}."
- if ( count( $forms ) === 2 ) return $count == 1 ? $forms[0] : $forms[1];
+ if ( count( $forms ) === 2 ) {
+ return $count == 1 ? $forms[0] : $forms[1];
+ }
// @todo FIXME: CLDR defines 4 plural forms instead of 3
// http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
return $forms[2];
} else {
switch ( $count % 10 ) {
- case 1: return $forms[0];
+ case 1: return $forms[0];
case 2:
case 3:
- case 4: return $forms[1];
+ case 4: return $forms[1];
default: return $forms[2];
}
}
# join and array_slice instead mb_substr
$ar = array();
preg_match_all( '/./us', $word, $ar );
- if ( !preg_match( "/[a-zA-Z_]/us", $word ) )
+ 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], -2 ) ) == 'ї' )
+ if ( ( join( '', array_slice( $ar[0], -4 ) ) == 'вики' ) || ( join( '', array_slice( $ar[0], -4 ) ) == 'Вики' ) ) {
+ } elseif ( join( '', array_slice( $ar[0], -2 ) ) == 'ї' ) {
$word = join( '', array_slice( $ar[0], 0, -2 ) ) . 'їѩ';
+ }
break;
case 'accusative': # винительный падеж
# stub
break;
}
+ }
return $word;
}
* @return string
*/
function convertPlural( $count, $forms ) {
- if ( !count( $forms ) ) { return ''; }
+ if ( !count( $forms ) ) {
+ return '';
+ }
$forms = $this->preConvertPlural( $forms, 4 );
switch ( $count % 10 ) {
- case 1: return $forms[0];
- case 2: return $forms[1];
+ case 1: return $forms[0];
+ case 2: return $forms[1];
case 3:
- case 4: return $forms[2];
+ case 4: return $forms[2];
default: return $forms[3];
}
}
*/
function strrtuxCallback( $matches ) {
static $ux = array(
- 'x' => 'xx' , 'X' => 'Xx' ,
- "\xc4\x88" => "Cx" , "\xc4\x89" => "cx" ,
- "\xc4\x9c" => "Gx" , "\xc4\x9d" => "gx" ,
- "\xc4\xa4" => "Hx" , "\xc4\xa5" => "hx" ,
- "\xc4\xb4" => "Jx" , "\xc4\xb5" => "jx" ,
- "\xc5\x9c" => "Sx" , "\xc5\x9d" => "sx" ,
- "\xc5\xac" => "Ux" , "\xc5\xad" => "ux"
+ 'x' => 'xx', 'X' => 'Xx',
+ "\xc4\x88" => "Cx", "\xc4\x89" => "cx",
+ "\xc4\x9c" => "Gx", "\xc4\x9d" => "gx",
+ "\xc4\xa4" => "Hx", "\xc4\xa5" => "hx",
+ "\xc4\xb4" => "Jx", "\xc4\xb5" => "jx",
+ "\xc5\x9c" => "Sx", "\xc5\x9d" => "sx",
+ "\xc5\xac" => "Ux", "\xc5\xad" => "ux",
);
return strtr( $matches[1], $ux );
}
*/
function strrtxuCallback( $matches ) {
static $xu = array(
- 'xx' => 'x' , 'xX' => 'x' ,
- 'Xx' => 'X' , 'XX' => 'X' ,
- "Cx" => "\xc4\x88" , "CX" => "\xc4\x88" ,
- "cx" => "\xc4\x89" , "cX" => "\xc4\x89" ,
- "Gx" => "\xc4\x9c" , "GX" => "\xc4\x9c" ,
- "gx" => "\xc4\x9d" , "gX" => "\xc4\x9d" ,
- "Hx" => "\xc4\xa4" , "HX" => "\xc4\xa4" ,
- "hx" => "\xc4\xa5" , "hX" => "\xc4\xa5" ,
- "Jx" => "\xc4\xb4" , "JX" => "\xc4\xb4" ,
- "jx" => "\xc4\xb5" , "jX" => "\xc4\xb5" ,
- "Sx" => "\xc5\x9c" , "SX" => "\xc5\x9c" ,
- "sx" => "\xc5\x9d" , "sX" => "\xc5\x9d" ,
- "Ux" => "\xc5\xac" , "UX" => "\xc5\xac" ,
- "ux" => "\xc5\xad" , "uX" => "\xc5\xad"
+ 'xx' => 'x', 'xX' => 'x',
+ 'Xx' => 'X', 'XX' => 'X',
+ "Cx" => "\xc4\x88", "CX" => "\xc4\x88",
+ "cx" => "\xc4\x89", "cX" => "\xc4\x89",
+ "Gx" => "\xc4\x9c", "GX" => "\xc4\x9c",
+ "gx" => "\xc4\x9d", "gX" => "\xc4\x9d",
+ "Hx" => "\xc4\xa4", "HX" => "\xc4\xa4",
+ "hx" => "\xc4\xa5", "hX" => "\xc4\xa5",
+ "Jx" => "\xc4\xb4", "JX" => "\xc4\xb4",
+ "jx" => "\xc4\xb5", "jX" => "\xc4\xb5",
+ "Sx" => "\xc5\x9c", "SX" => "\xc5\x9c",
+ "sx" => "\xc5\x9d", "sX" => "\xc5\x9d",
+ "Ux" => "\xc5\xac", "UX" => "\xc5\xac",
+ "ux" => "\xc5\xad", "uX" => "\xc5\xad",
);
return strtr( $matches[1], $xu ) . strtr( $matches[2], $xu );
}
if ( $ishigh and !$isutf ) {
# Assume Latin1
$s = utf8_encode( $s );
- } else {
- if ( preg_match( '/(\xc4[\x88\x89\x9c\x9d\xa4\xa5\xb4\xb5]' .
- '|\xc5[\x9c\x9d\xac\xad])/', $s ) )
+ } elseif ( preg_match( '/(\xc4[\x88\x89\x9c\x9d\xa4\xa5\xb4\xb5]' .
+ '|\xc5[\x9c\x9d\xac\xad])/', $s )
+ ) {
return $s;
}
# The general case cannot be handled without a dictionary, but there's at least one notable
# special case we should check for:
- if ( preg_match( '/wiki$/i', $word ) )
+ if ( preg_match( '/wiki$/i', $word ) ) {
$aou = false;
+ }
# append i after final consonant
- if ( preg_match( '/[bcdfghjklmnpqrstvwxz]$/i', $word ) )
+ if ( preg_match( '/[bcdfghjklmnpqrstvwxz]$/i', $word ) ) {
$word .= 'i';
+ }
switch ( $case ) {
case 'genitive':
case 'ainmlae':
switch ( $word ) {
case 'an Domhnach':
- $word = 'Dé Domhnaigh'; break;
+ $word = 'Dé Domhnaigh';
+ break;
case 'an Luan':
- $word = 'Dé Luain'; break;
+ $word = 'Dé Luain';
+ break;
case 'an Mháirt':
- $word = 'Dé Mháirt'; break;
+ $word = 'Dé Mháirt';
+ break;
case 'an Chéadaoin':
- $word = 'Dé Chéadaoin'; break;
+ $word = 'Dé Chéadaoin';
+ break;
case 'an Déardaoin':
- $word = 'Déardaoin'; break;
+ $word = 'Déardaoin';
+ break;
case 'an Aoine':
- $word = 'Dé hAoine'; break;
+ $word = 'Dé hAoine';
+ break;
case 'an Satharn':
- $word = 'Dé Sathairn'; break;
+ $word = 'Dé Sathairn';
+ break;
}
}
return $word;
$flags,
$manualLevel );
$names = array(
- 'gan' => '原文',
+ 'gan' => '原文',
'gan-hans' => '简体',
'gan-hant' => '繁體',
);
$this->mTables = array(
'gan-hans' => new ReplacementArray( $zh2Hans ),
'gan-hant' => new ReplacementArray( $zh2Hant ),
- 'gan' => new ReplacementArray
+ 'gan' => new ReplacementArray
);
}
$variants = array( 'gan', 'gan-hans', 'gan-hant' );
$variantfallbacks = array(
- 'gan' => array( 'gan-hans', 'gan-hant' ),
+ 'gan' => array( 'gan-hans', 'gan-hant' ),
'gan-hans' => array( 'gan' ),
'gan-hant' => array( 'gan' ),
);
$ml = array(
- 'gan' => 'disable',
+ 'gan' => 'disable',
);
$this->mConverter = new GanConverter( $this, 'gan',
* @return string
*/
function convertPlural( $count, $forms ) {
- if ( !count( $forms ) ) { return ''; }
+ if ( !count( $forms ) ) {
+ return '';
+ }
$forms = $this->preConvertPlural( $forms, 4 );
* @return string
*/
function convertPlural( $count, $forms ) {
- if ( !count( $forms ) ) { return ''; }
+ if ( !count( $forms ) ) {
+ return '';
+ }
$forms = $this->preConvertPlural( $forms, 2 );
return ( $count <= 1 ) ? $forms[0] : $forms[1];
* @return string
*/
function convertPlural( $count, $forms ) {
- if ( !count( $forms ) ) { return ''; }
+ if ( !count( $forms ) ) {
+ return '';
+ }
// @todo FIXME: CLDR defines 4 plural forms instead of 3. Plural for for decimals is missing.
// http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
$forms = $this->preConvertPlural( $forms, 3 );
return $forms[2];
} else {
switch ( $count % 10 ) {
- case 1: return $forms[0];
+ case 1: return $forms[0];
case 2:
case 3:
- case 4: return $forms[1];
+ case 4: return $forms[1];
default: return $forms[2];
}
}
# join and array_slice instead mb_substr
$ar = array();
preg_match_all( '/./us', $word, $ar );
- if ( !preg_match( "/[a-zA-Z_]/us", $word ) )
+ if ( !preg_match( "/[a-zA-Z_]/us", $word ) ) {
switch ( $case ) {
case 'genitive': # սեռական հոլով
- if ( join( '', array_slice( $ar[0], -1 ) ) == 'ա' )
+ if ( join( '', array_slice( $ar[0], -1 ) ) == 'ա' ) {
$word = join( '', array_slice( $ar[0], 0, -1 ) ) . 'այի';
- elseif ( join( '', array_slice( $ar[0], -1 ) ) == 'ո' )
+ } elseif ( join( '', array_slice( $ar[0], -1 ) ) == 'ո' ) {
$word = join( '', array_slice( $ar[0], 0, -1 ) ) . 'ոյի';
- elseif ( join( '', array_slice( $ar[0], -4 ) ) == 'գիրք' )
+ } elseif ( join( '', array_slice( $ar[0], -4 ) ) == 'գիրք' ) {
$word = join( '', array_slice( $ar[0], 0, -4 ) ) . 'գրքի';
- else
+ } else {
$word .= 'ի';
+ }
break;
case 'dative': # Տրական հոլով
# stub
# stub
break;
}
+ }
return $word;
}
'lowercase' => new ReplacementArray( $this->mUpperToLowerCaseLatin ),
'ike-cans' => new ReplacementArray( $this->mToSyllabics ),
'ike-latn' => new ReplacementArray( $this->mToLatin ),
- 'iu' => new ReplacementArray()
+ 'iu' => new ReplacementArray()
);
}
* @param $ignoreOtherCond bool
*/
function findVariantLink( &$link, &$nt, $ignoreOtherCond = false ) {
- // check for user namespace
+ // check for user namespace
if ( is_object( $nt ) ) {
$ns = $nt->getNamespace();
- if ( $ns == NS_USER || $ns == NS_USER_TALK )
+ if ( $ns == NS_USER || $ns == NS_USER_TALK ) {
return;
+ }
}
$oldlink = $link;
parent::findVariantLink( $link, $nt, $ignoreOtherCond );
- if ( $this->getPreferredVariant() == $this->mMainLanguageCode )
+ if ( $this->getPreferredVariant() == $this->mMainLanguageCode ) {
$link = $oldlink;
+ }
}
/**
global $wgTitle;
if ( is_object( $wgTitle ) && $wgTitle->getNamespace() == NS_FILE ) {
$imagename = $wgTitle->getNsText();
- if ( preg_match( "/^$imagename:/", $text ) ) return $text;
+ if ( preg_match( "/^$imagename:/", $text ) ) {
+ return $text;
+ }
}
return parent::autoConvert( $text, $toVariant );
}
if ( trim( $text ) ) {
$this->loadTables();
// To syllabics, first translate uppercase to lowercase Latin
- if($toVariant == 'ike-cans') {
+ if ( $toVariant == 'ike-cans' ) {
$text = $this->mTables['lowercase']->replace( $text );
}
$text = $this->mTables[$toVariant]->replace( $text );
function convertGrammar( $word, $case ) {
global $wgGrammarForms;
if ( isset( $wgGrammarForms['kaa'][$case][$word] ) ) {
- return $wgGrammarForms['kaa'][$case][$word];
+ return $wgGrammarForms['kaa'][$case][$word];
}
/* Full code of function convertGrammar() is in development. Updates coming soon. */
return $word;
$kk2Cyrl = array();
$kk2Latn = array();
$kk2Arab = array();
- $kk2KZ = array();
- $kk2TR = array();
- $kk2CN = array();
+ $kk2KZ = array();
+ $kk2TR = array();
+ $kk2CN = array();
$this->mTables = array(
'kk-cyrl' => new ReplacementArray( $kk2Cyrl ),
'kk-latn' => new ReplacementArray( $kk2Latn ),
'kk-arab' => new ReplacementArray( $kk2Arab ),
- 'kk-kz' => new ReplacementArray( array_merge( $kk2Cyrl, $kk2KZ ) ),
- 'kk-tr' => new ReplacementArray( array_merge( $kk2Latn, $kk2TR ) ),
- 'kk-cn' => new ReplacementArray( array_merge( $kk2Arab, $kk2CN ) ),
- 'kk' => new ReplacementArray()
+ 'kk-kz' => new ReplacementArray( array_merge( $kk2Cyrl, $kk2KZ ) ),
+ 'kk-tr' => new ReplacementArray( array_merge( $kk2Latn, $kk2TR ) ),
+ 'kk-cn' => new ReplacementArray( array_merge( $kk2Arab, $kk2CN ) ),
+ 'kk' => new ReplacementArray()
);
}
# # Punctuation -> Arabic
'/#|№|No\./u' => '', # ؀
'/\,/' => '،', # ،
- '/;/' => '؛', # ؛
+ '/;/' => '؛', # ؛
'/\?/' => '؟', # ؟
- '/%/' => '٪', # ٪
+ '/%/' => '٪', # ٪
'/\*/' => '٭', # ٭
# # Digits -> Arabic
'/0/' => '۰', # ۰
// check for user namespace
if ( is_object( $nt ) ) {
$ns = $nt->getNamespace();
- if ( $ns == NS_USER || $ns == NS_USER_TALK )
+ if ( $ns == NS_USER || $ns == NS_USER_TALK ) {
return;
+ }
}
$oldlink = $link;
parent::findVariantLink( $link, $nt, $ignoreOtherCond );
- if ( $this->getPreferredVariant() == $this->mMainLanguageCode )
+ if ( $this->getPreferredVariant() == $this->mMainLanguageCode ) {
$link = $oldlink;
+ }
}
/**
global $wgTitle;
if ( is_object( $wgTitle ) && $wgTitle->getNamespace() == NS_FILE ) {
$imagename = $wgTitle->getNsText();
- if ( preg_match( "/^$imagename:/", $text ) ) return $text;
+ if ( preg_match( "/^$imagename:/", $text ) ) {
+ return $text;
+ }
}
return parent::autoConvert( $text, $toVariant );
}
$variants = array( 'kk', 'kk-cyrl', 'kk-latn', 'kk-arab', 'kk-kz', 'kk-tr', 'kk-cn' );
$variantfallbacks = array(
- 'kk' => 'kk-cyrl',
+ 'kk' => 'kk-cyrl',
'kk-cyrl' => 'kk',
'kk-latn' => 'kk',
'kk-arab' => 'kk',
- 'kk-kz' => 'kk-cyrl',
- 'kk-tr' => 'kk-latn',
- 'kk-cn' => 'kk-arab'
+ 'kk-kz' => 'kk-cyrl',
+ 'kk-tr' => 'kk-latn',
+ 'kk-cn' => 'kk-arab'
);
$this->mConverter = new KkConverter( $this, 'kk', $variants, $variantfallbacks );
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "а";
}
- } elseif ( in_array( $wordEnding, $secondPerson ) ) {
+ } elseif ( in_array( $wordEnding, $secondPerson ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "ге";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "ға";
}
- } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
- if ( in_array( $wordLastVowel, $frontVowels ) ) {
+ } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
+ if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "не";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "на";
break;
case "dc31":
case "possessive accusative": # täweldık + tabıs
- if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) {
+ if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "ді";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "ды";
}
- } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
+ } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
$word = $word . "н";
}
break;
break;
case "dc41":
case "possessive locative": # täweldık + jatıs
- if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) {
+ if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "де";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "да";
}
- } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
+ } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "нде";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "дан";
}
- } elseif ( in_array( $wordEnding, $Nasals ) ) {
+ } elseif ( in_array( $wordEnding, $Nasals ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "нен";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
break;
case "dc51":
case "possessive ablative": # täweldık + şığıs
- if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $thirdPerson ) ) {
+ if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $thirdPerson ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "нен";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "нан";
}
- } elseif ( in_array( $wordEnding, $secondPerson ) ) {
+ } elseif ( in_array( $wordEnding, $secondPerson ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "ден";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "a";
}
- } elseif ( in_array( $wordEnding, $secondPerson ) ) {
+ } elseif ( in_array( $wordEnding, $secondPerson ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "ge";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "ğa";
}
- } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
- if ( in_array( $wordLastVowel, $frontVowels ) ) {
+ } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
+ if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "ne";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "na";
break;
case "dc31":
case "possessive accusative": # täweldık + tabıs
- if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) {
+ if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "di";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "dı";
}
- } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
+ } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
$word = $word . "n";
}
break;
break;
case "dc41":
case "possessive locative": # täweldık + jatıs
- if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) {
+ if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "de";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "da";
}
- } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
+ } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "nde";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "dan";
}
- } elseif ( in_array( $wordEnding, $Nasals ) ) {
+ } elseif ( in_array( $wordEnding, $Nasals ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "nen";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
break;
case "dc51":
case "possessive ablative": # täweldık + şığıs
- if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $thirdPerson ) ) {
+ if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $thirdPerson ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "nen";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "nan";
}
- } elseif ( in_array( $wordEnding, $secondPerson ) ) {
+ } elseif ( in_array( $wordEnding, $secondPerson ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "den";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
// Set up some constants...
// Vowels in last syllable
$frontVowels = array( "ە", "ٶ", "ٷ", "ٸ", "ٵ", "ە" );
- $backVowels = array( "ا", "و", "ۇ", "ى" );
+ $backVowels = array( "ا", "و", "ۇ", "ى" );
$allVowels = array( "ە", "ٶ", "ٷ", "ٸ", "ٵ", "ە", "ا", "و", "ۇ", "ى" );
// Preceding letters
$Nasals = array( "م", "ن", "ڭ" );
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "ا";
}
- } elseif ( in_array( $wordEnding, $secondPerson ) ) {
+ } elseif ( in_array( $wordEnding, $secondPerson ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "گە";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "عا";
}
- } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
- if ( in_array( $wordLastVowel, $frontVowels ) ) {
+ } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
+ if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "نە";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "نا";
break;
case "dc31":
case "possessive accusative": # täweldık + tabıs
- if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) {
+ if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "دٸ";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "دى";
}
- } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
+ } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
$word = $word . "ن";
}
break;
break;
case "dc41":
case "possessive locative": # täweldık + jatıs
- if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) {
+ if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "دە";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "دا";
}
- } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
+ } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "ندە";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "دان";
}
- } elseif ( in_array( $wordEnding, $Nasals ) ) {
+ } elseif ( in_array( $wordEnding, $Nasals ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "نەن";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
break;
case "dc51":
case "possessive ablative": # täweldık + şığıs
- if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $thirdPerson ) ) {
+ if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $thirdPerson ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "نەن";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
$word = $word . "نان";
}
- } elseif ( in_array( $wordEnding, $secondPerson ) ) {
+ } elseif ( in_array( $wordEnding, $secondPerson ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
$word = $word . "دەن";
} elseif ( in_array( $wordLastVowel, $backVowels ) ) {
switch ( $gender ) {
case 'm':
$lord = 'dä';
- break ;
+ break;
case 'f':
$lord = 'di';
break;
* @return string
*/
function convertPlural( $count, $forms ) {
- if ( !count( $forms ) ) { return ''; }
+ if ( !count( $forms ) ) {
+ return '';
+ }
$forms = $this->preConvertPlural( $forms, 3 );
if ( $count == 1 ) {
/* Doppel- und Halbvokale */
'ڵ' => 'll', # ll
- 'ڕ' => 'rr', # rr
- 'ا' => 'a',
+ 'ڕ' => 'rr', # rr
+ 'ا' => 'a',
# 'ئێ' => 'ê', # initial e
- 'ە' => 'e',
- 'ه' => 'e', # with one non-joiner
- 'ه' => 'e', # with two non-joiner
- 'ة' => 'e',
+ 'ە' => 'e',
+ 'ه' => 'e', # with one non-joiner
+ 'ه' => 'e', # with two non-joiner
+ 'ة' => 'e',
'ێ' => 'ê',
- 'ي' => 'î',
- 'ی' => 'î', # U+06CC db 8c ARABIC LETTER FARSI YEH
- 'ى' => 'î', # U+0649 d9 89 ARABIC LETTER ALEF MAKSURA
- 'ۆ' => 'o',
- 'و' => 'w',
- 'ئ' => '', # initial hemze should not be shown
- '،' => ',',
- 'ع' => '\'', # ayn
- '؟' => '?',
+ 'ي' => 'î',
+ 'ی' => 'î', # U+06CC db 8c ARABIC LETTER FARSI YEH
+ 'ى' => 'î', # U+0649 d9 89 ARABIC LETTER ALEF MAKSURA
+ 'ۆ' => 'o',
+ 'و' => 'w',
+ 'ئ' => '', # initial hemze should not be shown
+ '،' => ',',
+ 'ع' => '\'', # ayn
+ '؟' => '?',
# digits
'٠' => '0', # ٠
' o' => 'ئۆ ',
' u' => 'ئو ',
' û' => 'ئوو ',
- 'A' => 'ئا',
- 'E' => 'ئە',
- 'Ê' => 'ئێ',
- 'Î' => 'ئی',
- 'O' => 'ئۆ',
- 'U' => 'ئو',
- 'Û' => 'ئوو',
+ 'A' => 'ئا',
+ 'E' => 'ئە',
+ 'Ê' => 'ئێ',
+ 'Î' => 'ئی',
+ 'O' => 'ئۆ',
+ 'U' => 'ئو',
+ 'Û' => 'ئوو',
' A' => 'ئا ',
' E' => 'ئە ',
' Ê' => 'ئێ ',
$this->mTables = array(
'ku-latn' => new ReplacementArray( $this->mArabicToLatin ),
'ku-arab' => new ReplacementArray( $this->mLatinToArabic ),
- 'ku' => new ReplacementArray()
+ 'ku' => new ReplacementArray()
);
}
// check for user namespace
if ( is_object( $nt ) ) {
$ns = $nt->getNamespace();
- if ( $ns == NS_USER || $ns == NS_USER_TALK )
+ if ( $ns == NS_USER || $ns == NS_USER_TALK ) {
return;
+ }
}
$oldlink = $link;
parent::findVariantLink( $link, $nt, $ignoreOtherCond );
- if ( $this->getPreferredVariant() == $this->mMainLanguageCode )
+ if ( $this->getPreferredVariant() == $this->mMainLanguageCode ) {
$link = $oldlink;
+ }
}
/**
global $wgTitle;
if ( is_object( $wgTitle ) && $wgTitle->getNamespace() == NS_FILE ) {
$imagename = $wgTitle->getNsText();
- if ( preg_match( "/^$imagename:/", $text ) ) return $text;
+ if ( preg_match( "/^$imagename:/", $text ) ) {
+ return $text;
+ }
}
return parent::autoConvert( $text, $toVariant );
}
$variants = array( 'ku', 'ku-arab', 'ku-latn' );
$variantfallbacks = array(
- 'ku' => 'ku-latn',
+ 'ku' => 'ku-latn',
'ku-arab' => 'ku-latn',
'ku-latn' => 'ku-arab',
);
switch ( $case ) {
case 'genitive':
// only a few declensions, and even for those mostly the singular only
- $in = array( '/u[ms]$/', # 2nd declension singular
- '/ommunia$/', # 3rd declension neuter plural (partly)
- '/a$/', # 1st declension singular
- '/libri$/', '/nuntii$/', # 2nd declension plural (partly)
- '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
- '/es$/' # 5th declension singular
- );
- $out = array( 'i',
- 'ommunium',
- 'ae',
- 'librorum', 'nuntiorum',
- 'tionis', 'ntis', 'atis',
- 'ei'
- );
+ $in = array(
+ '/u[ms]$/', # 2nd declension singular
+ '/ommunia$/', # 3rd declension neuter plural (partly)
+ '/a$/', # 1st declension singular
+ '/libri$/', '/nuntii$/', # 2nd declension plural (partly)
+ '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
+ '/es$/' # 5th declension singular
+ );
+ $out = array(
+ 'i',
+ 'ommunium',
+ 'ae',
+ 'librorum', 'nuntiorum',
+ 'tionis', 'ntis', 'atis',
+ 'ei'
+ );
return preg_replace( $in, $out, $word );
case 'accusative':
// only a few declensions, and even for those mostly the singular only
- $in = array( '/u[ms]$/', # 2nd declension singular
- '/a$/', # 1st declension singular
- '/ommuniam$/', # 3rd declension neuter plural (partly)
- '/libri$/', '/nuntii$/', # 2nd declension plural (partly)
- '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
- '/es$/' # 5th declension singular
- );
- $out = array( 'um',
- 'am',
- 'ommunia',
- 'libros', 'nuntios',
- 'tionem', 'ntem', 'atem',
- 'em'
- );
+ $in = array(
+ '/u[ms]$/', # 2nd declension singular
+ '/a$/', # 1st declension singular
+ '/ommuniam$/', # 3rd declension neuter plural (partly)
+ '/libri$/', '/nuntii$/', # 2nd declension plural (partly)
+ '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
+ '/es$/' # 5th declension singular
+ );
+ $out = array(
+ 'um',
+ 'am',
+ 'ommunia',
+ 'libros', 'nuntios',
+ 'tionem', 'ntem', 'atem',
+ 'em'
+ );
return preg_replace( $in, $out, $word );
case 'ablative':
// only a few declensions, and even for those mostly the singular only
- $in = array( '/u[ms]$/', # 2nd declension singular
- '/ommunia$/', # 3rd declension neuter plural (partly)
- '/a$/', # 1st declension singular
- '/libri$/', '/nuntii$/', # 2nd declension plural (partly)
- '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
- '/es$/' # 5th declension singular
- );
- $out = array( 'o',
- 'ommunibus',
- 'a',
- 'libris', 'nuntiis',
- 'tione', 'nte', 'ate',
- 'e'
- );
+ $in = array(
+ '/u[ms]$/', # 2nd declension singular
+ '/ommunia$/', # 3rd declension neuter plural (partly)
+ '/a$/', # 1st declension singular
+ '/libri$/', '/nuntii$/', # 2nd declension plural (partly)
+ '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
+ '/es$/' # 5th declension singular
+ );
+ $out = array(
+ 'o',
+ 'ommunibus',
+ 'a',
+ 'libris', 'nuntiis',
+ 'tione', 'nte', 'ate',
+ 'e'
+ );
return preg_replace( $in, $out, $word );
default:
return $word;
* @return string
*/
function convertPlural( $count, $forms ) {
- if ( !count( $forms ) ) { return ''; }
+ if ( !count( $forms ) ) {
+ return '';
+ }
$forms = $this->preConvertPlural( $forms, 2 );
return ( $count <= 1 ) ? $forms[0] : $forms[1];
* @return string
*/
function convertPlural( $count, $forms ) {
- if ( !count( $forms ) ) { return ''; }
+ if ( !count( $forms ) ) {
+ return '';
+ }
$forms = $this->preConvertPlural( $forms, 4 );
- if ( $count == 1 ) $index = 0;
- elseif ( $count == 0 || ( $count % 100 > 1 && $count % 100 < 11 ) ) $index = 1;
- elseif ( $count % 100 > 10 && $count % 100 < 20 ) $index = 2;
- else $index = 3;
+ if ( $count == 1 ) {
+ $index = 0;
+ } elseif ( $count == 0 || ( $count % 100 > 1 && $count % 100 < 11 ) ) {
+ $index = 1;
+ } elseif ( $count % 100 > 10 && $count % 100 < 20 ) {
+ $index = 2;
+ } else {
+ $index = 3;
+ }
return $forms[$index];
}
}
# Checking if $word ends on 'у'. 'У' can be either consonant 'W' or vowel 'U' in cyrillic Ossetic.
# Examples: {{grammar:genitive|аунеу}} = аунеуы, {{grammar:genitive|лæппу}} = лæппуйы.
elseif ( preg_match( "/у$/u", $word ) ) {
- if ( !preg_match( "/[аæеёиоыэюя]$/u", mb_substr( $word, -2, 1 ) ) )
+ if ( !preg_match( "/[аæеёиоыэюя]$/u", mb_substr( $word, -2, 1 ) ) ) {
$jot = 'й';
+ }
} elseif ( !preg_match( "/[бвгджзйклмнопрстфхцчшщьъ]$/u", $word ) ) {
$hyphen = '-';
}
switch ( $case ) {
- case 'genitive': $ending = $hyphen . $jot . 'ы'; break;
- case 'dative': $ending = $hyphen . $jot . 'æн'; break;
- case 'allative': $ending = $hyphen . $end_allative; break;
+ case 'genitive':
+ $ending = $hyphen . $jot . 'ы';
+ break;
+ case 'dative':
+ $ending = $hyphen . $jot . 'æн';
+ break;
+ case 'allative':
+ $ending = $hyphen . $end_allative;
+ break;
case 'ablative':
if ( $jot == 'й' ) {
- $ending = $hyphen . $jot . 'æ'; break;
+ $ending = $hyphen . $jot . 'æ';
+ } else {
+ $ending = $hyphen . $jot . 'æй';
}
- else {
- $ending = $hyphen . $jot . 'æй'; break;
- }
- case 'inessive': break;
- case 'superessive': $ending = $hyphen . $jot . 'ыл'; break;
- case 'equative': $ending = $hyphen . $jot . 'ау'; break;
- case 'comitative': $ending = $hyphen . 'имæ'; break;
+ break;
+ case 'inessive':
+ break;
+ case 'superessive':
+ $ending = $hyphen . $jot . 'ыл';
+ break;
+ case 'equative':
+ $ending = $hyphen . $jot . 'ау';
+ break;
+ case 'comitative':
+ $ending = $hyphen . 'имæ';
+ break;
}
return $word . $ending;
}
* @return string
*/
function convertPlural( $count, $forms ) {
- if ( !count( $forms ) ) { return ''; }
+ if ( !count( $forms ) ) {
+ return '';
+ }
$forms = $this->preConvertPlural( $forms, 3 );
$count = abs( $count );
if ( $count == 1 ) {
* @return string
*/
function convertPlural( $count, $forms ) {
- if ( !count( $forms ) ) { return ''; }
+ if ( !count( $forms ) ) {
+ return '';
+ }
// if no number with word, then use $form[0] for singular and $form[1] for plural or zero
- if ( count( $forms ) === 2 ) return $count == 1 ? $forms[0] : $forms[1];
+ if ( count( $forms ) === 2 ) {
+ return $count == 1 ? $forms[0] : $forms[1];
+ }
// @todo FIXME: CLDR defines 4 plural forms. Form with decimals missing.
// See http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#sh
return $forms[2];
} else {
switch ( $count % 10 ) {
- case 1: return $forms[0];
+ case 1: return $forms[0];
case 2:
case 3:
- case 4: return $forms[1];
+ case 4: return $forms[1];
default: return $forms[2];
}
}
public $mToLatin = array(
'ⴰ' => 'a', 'ⴱ' => 'b', 'ⴳ' => 'g', 'ⴷ' => 'd', 'ⴹ' => 'ḍ', 'ⴻ' => 'e',
'ⴼ' => 'f', 'ⴽ' => 'k', 'ⵀ' => 'h', 'ⵃ' => 'ḥ', 'ⵄ' => 'ε', 'ⵅ' => 'x',
- 'ⵇ' => 'q', 'ⵉ' => 'i', 'ⵊ' => 'j', 'ⵍ' => 'l', 'ⵎ' => 'm', 'ⵏ' => 'n',
+ 'ⵇ' => 'q', 'ⵉ' => 'i', 'ⵊ' => 'j', 'ⵍ' => 'l', 'ⵎ' => 'm', 'ⵏ' => 'n',
'ⵓ' => 'u', 'ⵔ' => 'r', 'ⵕ' => 'ṛ', 'ⵖ' => 'γ', 'ⵙ' => 's', 'ⵚ' => 'ṣ',
'ⵛ' => 'š', 'ⵜ' => 't', 'ⵟ' => 'ṭ', 'ⵡ' => 'w', 'ⵢ' => 'y', 'ⵣ' => 'z',
'ⵥ' => 'ẓ', 'ⵯ' => 'ʷ', 'ⵖ' => 'ɣ', 'ⵠ' => 'v', 'ⵒ' => 'p',
);
public $mUpperToLowerCaseLatin = array(
- 'A' => 'a', 'B' => 'b', 'C' => 'c', 'D' => 'd', 'E' => 'e',
- 'F' => 'f', 'G' => 'g', 'H' => 'h', 'I' => 'i', 'J' => 'j',
- 'K' => 'k', 'L' => 'l', 'M' => 'm', 'N' => 'n', 'O' => 'o',
- 'P' => 'p', 'Q' => 'q', 'R' => 'r', 'S' => 's', 'T' => 't',
- 'U' => 'u', 'V' => 'v', 'W' => 'w', 'X' => 'x', 'Y' => 'y',
+ 'A' => 'a', 'B' => 'b', 'C' => 'c', 'D' => 'd', 'E' => 'e',
+ 'F' => 'f', 'G' => 'g', 'H' => 'h', 'I' => 'i', 'J' => 'j',
+ 'K' => 'k', 'L' => 'l', 'M' => 'm', 'N' => 'n', 'O' => 'o',
+ 'P' => 'p', 'Q' => 'q', 'R' => 'r', 'S' => 's', 'T' => 't',
+ 'U' => 'u', 'V' => 'v', 'W' => 'w', 'X' => 'x', 'Y' => 'y',
'Z' => 'z', 'Ɣ' => 'ɣ',
);
public $mToTifinagh = array(
'a' => 'ⴰ', 'b' => 'ⴱ', 'g' => 'ⴳ', 'd' => 'ⴷ', 'ḍ' => 'ⴹ', 'e' => 'ⴻ',
'f' => 'ⴼ', 'k' => 'ⴽ', 'h' => 'ⵀ', 'ḥ' => 'ⵃ', 'ε' => 'ⵄ', 'x' => 'ⵅ',
- 'q' => 'ⵇ', 'i' => 'ⵉ', 'j' => 'ⵊ', 'l' => 'ⵍ', 'm' => 'ⵎ', 'n' => 'ⵏ',
+ 'q' => 'ⵇ', 'i' => 'ⵉ', 'j' => 'ⵊ', 'l' => 'ⵍ', 'm' => 'ⵎ', 'n' => 'ⵏ',
'u' => 'ⵓ', 'r' => 'ⵔ', 'ṛ' => 'ⵕ', 'γ' => 'ⵖ', 's' => 'ⵙ', 'ṣ' => 'ⵚ',
'š' => 'ⵛ', 't' => 'ⵜ', 'ṭ' => 'ⵟ', 'w' => 'ⵡ', 'y' => 'ⵢ', 'z' => 'ⵣ',
'ẓ' => 'ⵥ', 'ʷ' => 'ⵯ', 'ɣ' => 'ⵖ', 'v' => 'ⵠ', 'p' => 'ⵒ',
'lowercase' => new ReplacementArray( $this->mUpperToLowerCaseLatin ),
'shi-tfng' => new ReplacementArray( $this->mToTifinagh ),
'shi-latn' => new ReplacementArray( $this->mToLatin ),
- 'shi' => new ReplacementArray()
+ 'shi' => new ReplacementArray()
);
}
* @param $ignoreOtherCond bool
*/
function findVariantLink( &$link, &$nt, $ignoreOtherCond = false ) {
- // check for user namespace
+ // check for user namespace
if ( is_object( $nt ) ) {
$ns = $nt->getNamespace();
- if ( $ns == NS_USER || $ns == NS_USER_TALK )
+ if ( $ns == NS_USER || $ns == NS_USER_TALK ) {
return;
+ }
}
$oldlink = $link;
parent::findVariantLink( $link, $nt, $ignoreOtherCond );
- if ( $this->getPreferredVariant() == $this->mMainLanguageCode )
+ if ( $this->getPreferredVariant() == $this->mMainLanguageCode ) {
$link = $oldlink;
+ }
}
/**
global $wgTitle;
if ( is_object( $wgTitle ) && $wgTitle->getNamespace() == NS_FILE ) {
$imagename = $wgTitle->getNsText();
- if ( preg_match( "/^$imagename:/", $text ) ) return $text;
+ if ( preg_match( "/^$imagename:/", $text ) ) {
+ return $text;
+ }
}
return parent::autoConvert( $text, $toVariant );
}
if ( trim( $text ) ) {
$this->loadTables();
// To Tifinagh, first translate uppercase to lowercase Latin
- if( $toVariant == 'shi-tfng' ) {
+ if ( $toVariant == 'shi-tfng' ) {
$text = $this->mTables['lowercase']->replace( $text );
}
$text = $this->mTables[$toVariant]->replace( $text );
$variants = array( 'shi', 'shi-tfng', 'shi-latn' );
$variantfallbacks = array(
- 'shi' => 'shi-tfng',
+ 'shi' => 'shi-tfng',
'shi-tfng' => 'shi',
'shi-latn' => 'shi',
);
* @return string
*/
function convertPlural( $count, $forms ) {
- if ( !count( $forms ) ) { return ''; }
+ if ( !count( $forms ) ) {
+ return '';
+ }
$forms = $this->preConvertPlural( $forms, 3 );
if ( $count == 1 ) {
switch ( $case ) {
case 'mestnik': # locative
- $word = 'o ' . $word; break;
+ $word = 'o ' . $word;
+ break;
case 'orodnik': # instrumental
$word = 'z ' . $word;
+ break;
}
return $word; # this will return the original value for 'imenovalnik' (nominativ) and all undefined case values
$this->mTables = array(
'sr-ec' => new ReplacementArray( $this->mToCyrillics ),
'sr-el' => new ReplacementArray( $this->mToLatin ),
- 'sr' => new ReplacementArray()
+ 'sr' => new ReplacementArray()
);
}
// check for user namespace
if ( is_object( $nt ) ) {
$ns = $nt->getNamespace();
- if ( $ns == NS_USER || $ns == NS_USER_TALK )
+ if ( $ns == NS_USER || $ns == NS_USER_TALK ) {
return;
+ }
}
$oldlink = $link;
parent::findVariantLink( $link, $nt, $ignoreOtherCond );
- if ( $this->getPreferredVariant() == $this->mMainLanguageCode )
+ if ( $this->getPreferredVariant() == $this->mMainLanguageCode ) {
$link = $oldlink;
+ }
}
/**
global $wgTitle;
if ( is_object( $wgTitle ) && $wgTitle->getNamespace() == NS_FILE ) {
$imagename = $wgTitle->getNsText();
- if ( preg_match( "/^$imagename:/", $text ) ) return $text;
+ if ( preg_match( "/^$imagename:/", $text ) ) {
+ return $text;
+ }
}
return parent::autoConvert( $text, $toVariant );
}
* @since 1.19
*/
public function guessVariant( $text, $variant ) {
- $numCyrillic = preg_match_all("/[шђчћжШЂЧЋЖ]/u", $text, $dummy);
- $numLatin = preg_match_all("/[šđč枊ĐČĆŽ]/u", $text, $dummy);
+ $numCyrillic = preg_match_all( "/[шђчћжШЂЧЋЖ]/u", $text, $dummy );
+ $numLatin = preg_match_all( "/[šđč枊ĐČĆŽ]/u", $text, $dummy );
- if( $variant == 'sr-ec' ) {
- return (boolean) ($numCyrillic > $numLatin);
- } elseif( $variant == 'sr-el' ) {
- return (boolean) ($numLatin > $numCyrillic);
+ if ( $variant == 'sr-ec' ) {
+ return (boolean) ( $numCyrillic > $numLatin );
+ } elseif ( $variant == 'sr-el' ) {
+ return (boolean) ( $numLatin > $numCyrillic );
} else {
return false;
}
$variants = array( 'sr', 'sr-ec', 'sr-el' );
$variantfallbacks = array(
- 'sr' => 'sr-ec',
+ 'sr' => 'sr-ec',
'sr-ec' => 'sr',
'sr-el' => 'sr',
);
$flags = array(
'S' => 'S', 'писмо' => 'S', 'pismo' => 'S',
- 'W' => 'W', 'реч' => 'W', 'reč' => 'W', 'ријеч' => 'W', 'riječ' => 'W'
+ 'W' => 'W', 'реч' => 'W', 'reč' => 'W', 'ријеч' => 'W', 'riječ' => 'W'
);
$this->mConverter = new SrConverter( $this, 'sr', $variants, $variantfallbacks, $flags );
$wgHooks['PageContentSaveComplete'][] = $this->mConverter;
return $forms[2];
} else {
switch ( $count % 10 ) {
- case 1: return $forms[0];
+ case 1: return $forms[0];
case 2:
case 3:
- case 4: return $forms[1];
+ case 4: return $forms[1];
default: return $forms[2];
}
}
* @return string
*/
function convertPlural( $count, $forms ) {
- if ( !count( $forms ) ) { return ''; }
+ if ( !count( $forms ) ) {
+ return '';
+ }
$forms = $this->preConvertPlural( $forms, 3 );
if ( $count > 10 && floor( ( $count % 100 ) / 10 ) == 1 ) {
return $forms[2];
} else {
switch ( $count % 10 ) {
- case 1: return $forms[0];
+ case 1: return $forms[0];
case 2:
case 3:
- case 4: return $forms[1];
+ case 4: return $forms[1];
default: return $forms[2];
}
}
* @return string
*/
function convertPlural( $count, $forms ) {
- if ( !count( $forms ) ) { return ''; }
+ if ( !count( $forms ) ) {
+ return '';
+ }
$forms = $this->preConvertPlural( $forms, 3 );
if ( $count > 10 && floor( ( $count % 100 ) / 10 ) == 1 ) {
return $forms[2];
} else {
switch ( $count % 10 ) {
- case 1: return $forms[0];
+ case 1: return $forms[0];
case 2:
case 3:
- case 4: return $forms[1];
+ case 4: return $forms[1];
default: return $forms[2];
}
}
function loadDefaultTables() {
$this->mTables = array(
'tg-latn' => new ReplacementArray( $this->table ),
- 'tg' => new ReplacementArray()
+ 'tg' => new ReplacementArray()
);
}
* @return string
*/
function convertPlural( $count, $forms ) {
- if ( !count( $forms ) ) { return ''; }
+ if ( !count( $forms ) ) {
+ return '';
+ }
$forms = $this->preConvertPlural( $forms, 2 );
return ( $count <= 1 ) ? $forms[0] : $forms[1];
* @return string
*/
function convertPlural( $count, $forms ) {
- if ( !count( $forms ) ) { return ''; }
+ if ( !count( $forms ) ) {
+ return '';
+ }
$forms = $this->preConvertPlural( $forms, 2 );
return ( $count <= 1 ) ? $forms[0] : $forms[1];
# join and array_slice instead mb_substr
$ar = array();
preg_match_all( '/./us', $word, $ar );
- if ( !preg_match( "/[a-zA-Z_]/us", $word ) )
+ 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 ) ) == 'ь' )
+ 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 ) ) == 'ія' )
+ } 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 ) ) == 'ти' )
+ } 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], -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], -4 ) ) == 'вікі' ) || ( join( '', array_slice( $ar[0], -4 ) ) == 'Вікі' ) ) {
+ } elseif ( join( '', array_slice( $ar[0], -2 ) ) == 'ія' ) {
$word = join( '', array_slice( $ar[0], 0, -2 ) ) . 'ію';
+ }
break;
case 'instrumental': # орудний відмінок
# stub
# stub
break;
}
+ }
return $word;
}
* @return string
*/
function convertPlural( $count, $forms ) {
- if ( !count( $forms ) ) { return ''; }
+ if ( !count( $forms ) ) {
+ return '';
+ }
// If the actual number is not mentioned in the expression, then just two forms are enough:
// singular for $count == 1
// plural for $count != 1
// For example, "This user belongs to {{PLURAL:$1|one group|several groups}}."
- if ( count( $forms ) === 2 ) return $count == 1 ? $forms[0] : $forms[1];
+ if ( count( $forms ) === 2 ) {
+ return $count == 1 ? $forms[0] : $forms[1];
+ }
// @todo FIXME: CLDR defines 4 plural forms. Form for decimals is missing/
// See http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#uk
return $forms[2];
} else {
switch ( $count % 10 ) {
- case 1: return $forms[0];
+ case 1: return $forms[0];
case 2:
case 3:
- case 4: return $forms[1];
+ case 4: return $forms[1];
default: return $forms[2];
}
}
'f' => 'ф', 'F' => 'Ф',
'g' => 'г', 'G' => 'Г',
'g‘' => 'ғ', 'G‘' => 'Ғ', 'gʻ' => 'ғ', 'Gʻ' => 'Ғ',
- 'h' => 'ҳ', 'H' => 'Ҳ',
+ 'h' => 'ҳ', 'H' => 'Ҳ',
'i' => 'и', 'I' => 'И',
- 'k' => 'к', 'K' => 'К',
+ 'k' => 'к', 'K' => 'К',
'l' => 'л', 'L' => 'Л',
'm' => 'м', 'M' => 'М',
'n' => 'н', 'N' => 'Н',
$this->mTables = array(
'uz-cyrl' => new ReplacementArray( $this->toCyrillic ),
'uz-latn' => new ReplacementArray( $this->toLatin ),
- 'uz' => new ReplacementArray()
+ 'uz' => new ReplacementArray()
);
}
$variants = array( 'uz', 'uz-latn', 'uz-cyrl' );
$variantfallbacks = array(
- 'uz' => 'uz-latn',
+ 'uz' => 'uz-latn',
'uz-cyrl' => 'uz',
'uz-latn' => 'uz',
);
* @return string
*/
function convertPlural( $count, $forms ) {
- if ( !count( $forms ) ) { return ''; }
+ if ( !count( $forms ) ) {
+ return '';
+ }
$forms = $this->preConvertPlural( $forms, 2 );
return ( $count <= 1 ) ? $forms[0] : $forms[1];
#
# we also output this format for YMD (eg: 2001 January 15)
if ( $datePreference == 'ISO 8601' ) {
- $d = substr( $ts, 0, 4 ) . '-' . substr( $ts, 4, 2 ) . '-' . substr( $ts, 6, 2 );
- return $d;
+ $d = substr( $ts, 0, 4 ) . '-' . substr( $ts, 4, 2 ) . '-' . substr( $ts, 6, 2 );
+ return $d;
}
# dd/mm/YYYY format
if ( $datePreference == 'walloon short' ) {
- $d = substr( $ts, 6, 2 ) . '/' . substr( $ts, 4, 2 ) . '/' . substr( $ts, 0, 4 );
- return $d;
+ $d = substr( $ts, 6, 2 ) . '/' . substr( $ts, 4, 2 ) . '/' . substr( $ts, 0, 4 );
+ return $d;
}
# Walloon format
$m = substr( $ts, 4, 2 );
$n = substr( $ts, 6, 2 );
if ( $n == 1 ) {
- $d = "1î d' " . $this->getMonthName( $m ) .
- " " . substr( $ts, 0, 4 );
+ $d = "1î d' " . $this->getMonthName( $m ) .
+ " " . substr( $ts, 0, 4 );
} elseif ( $n == 2 || $n == 3 || $n == 20 || $n == 22 || $n == 23 ) {
- $d = ( 0 + $n ) . " d' " . $this->getMonthName( $m ) .
- " " . substr( $ts, 0, 4 );
+ $d = ( 0 + $n ) . " d' " . $this->getMonthName( $m ) .
+ " " . substr( $ts, 0, 4 );
} elseif ( $m == 4 || $m == 8 || $m == 10 ) {
- $d = ( 0 + $n ) . " d' " . $this->getMonthName( $m ) .
- " " . substr( $ts, 0, 4 );
+ $d = ( 0 + $n ) . " d' " . $this->getMonthName( $m ) .
+ " " . substr( $ts, 0, 4 );
} else {
- $d = ( 0 + $n ) . " di " . $this->getMonthName( $m ) .
- " " . substr( $ts, 0, 4 );
+ $d = ( 0 + $n ) . " di " . $this->getMonthName( $m ) .
+ " " . substr( $ts, 0, 4 );
}
return $d;
}
* @return string
*/
function timeanddate( $ts, $adj = false, $format = true, $tc = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts, $tc ); }
+ if ( $adj ) {
+ $ts = $this->userAdjust( $ts, $tc );
+ }
$datePreference = $this->dateFormat( $format );
if ( $datePreference == 'ISO 8601' ) {
return parent::timeanddate( $ts, $adj, $format, $tc );
$flags,
$manualLevel );
$names = array(
- 'zh' => '原文',
+ 'zh' => '原文',
'zh-hans' => '简体',
'zh-hant' => '繁體',
- 'zh-cn' => '大陆',
- 'zh-tw' => '台灣',
- 'zh-hk' => '香港',
- 'zh-mo' => '澳門',
- 'zh-sg' => '新加坡',
- 'zh-my' => '大马',
+ 'zh-cn' => '大陆',
+ 'zh-tw' => '台灣',
+ 'zh-hk' => '香港',
+ 'zh-mo' => '澳門',
+ 'zh-sg' => '新加坡',
+ 'zh-my' => '大马',
);
$this->mVariantNames = array_merge( $this->mVariantNames, $names );
}
$this->mTables = array(
'zh-hans' => new ReplacementArray( $zh2Hans ),
'zh-hant' => new ReplacementArray( $zh2Hant ),
- 'zh-cn' => new ReplacementArray( array_merge( $zh2Hans, $zh2CN ) ),
- 'zh-hk' => new ReplacementArray( array_merge( $zh2Hant, $zh2HK ) ),
- 'zh-mo' => new ReplacementArray( array_merge( $zh2Hant, $zh2HK ) ),
- 'zh-my' => new ReplacementArray( array_merge( $zh2Hans, $zh2SG ) ),
- 'zh-sg' => new ReplacementArray( array_merge( $zh2Hans, $zh2SG ) ),
- 'zh-tw' => new ReplacementArray( array_merge( $zh2Hant, $zh2TW ) ),
- 'zh' => new ReplacementArray
+ 'zh-cn' => new ReplacementArray( array_merge( $zh2Hans, $zh2CN ) ),
+ 'zh-hk' => new ReplacementArray( array_merge( $zh2Hant, $zh2HK ) ),
+ 'zh-mo' => new ReplacementArray( array_merge( $zh2Hant, $zh2HK ) ),
+ 'zh-my' => new ReplacementArray( array_merge( $zh2Hans, $zh2SG ) ),
+ 'zh-sg' => new ReplacementArray( array_merge( $zh2Hans, $zh2SG ) ),
+ 'zh-tw' => new ReplacementArray( array_merge( $zh2Hant, $zh2TW ) ),
+ 'zh' => new ReplacementArray
);
}
$variants = array( 'zh', 'zh-hans', 'zh-hant', 'zh-cn', 'zh-hk', 'zh-mo', 'zh-my', 'zh-sg', 'zh-tw' );
$variantfallbacks = array(
- 'zh' => array( 'zh-hans', 'zh-hant', 'zh-cn', 'zh-tw', 'zh-hk', 'zh-sg', 'zh-mo', 'zh-my' ),
+ 'zh' => array( 'zh-hans', 'zh-hant', 'zh-cn', 'zh-tw', 'zh-hk', 'zh-sg', 'zh-mo', 'zh-my' ),
'zh-hans' => array( 'zh-cn', 'zh-sg', 'zh-my' ),
'zh-hant' => array( 'zh-tw', 'zh-hk', 'zh-mo' ),
- 'zh-cn' => array( 'zh-hans', 'zh-sg', 'zh-my' ),
- 'zh-sg' => array( 'zh-hans', 'zh-cn', 'zh-my' ),
- 'zh-my' => array( 'zh-hans', 'zh-sg', 'zh-cn' ),
- 'zh-tw' => array( 'zh-hant', 'zh-hk', 'zh-mo' ),
- 'zh-hk' => array( 'zh-hant', 'zh-mo', 'zh-tw' ),
- 'zh-mo' => array( 'zh-hant', 'zh-hk', 'zh-tw' ),
+ 'zh-cn' => array( 'zh-hans', 'zh-sg', 'zh-my' ),
+ 'zh-sg' => array( 'zh-hans', 'zh-cn', 'zh-my' ),
+ 'zh-my' => array( 'zh-hans', 'zh-sg', 'zh-cn' ),
+ 'zh-tw' => array( 'zh-hant', 'zh-hk', 'zh-mo' ),
+ 'zh-hk' => array( 'zh-hant', 'zh-mo', 'zh-tw' ),
+ 'zh-mo' => array( 'zh-hant', 'zh-hk', 'zh-tw' ),
);
$ml = array(
- 'zh' => 'disable',
+ 'zh' => 'disable',
'zh-hans' => 'unidirectional',
'zh-hant' => 'unidirectional',
);
'tog-shownumberswatching' => 'اعرض عدد المستخدمين المراقبين',
'tog-oldsig' => 'التوقيع الحالي:',
'tog-fancysig' => 'عامل التوقيع كنص ويكي (بدون وصلة أوتوماتيكية)',
-'tog-externaleditor' => 'استخدم محررا خارجيا بشكل افتراضي (للخبراء فقط، يحتاج إعدادات خاصة على حاسوبك) ([//www.mediawiki.org/wiki/Manual:External_editors مزيد من المعلومات.])',
-'tog-externaldiff' => 'استخدم فرقا خارجيا بشكل افتراضي (للخبراء فقط، يحتاج إعدادات خاصة على حاسوبك) ([//www.mediawiki.org/wiki/Manual:External_editors للمزيد من المعلومات.])',
'tog-showjumplinks' => 'مكن وصلات "اذهب إلى" المساعدة',
'tog-uselivepreview' => 'استخدم الاستعراض السريع (جافاسكريبت) (تجريبي)',
'tog-forceeditsummary' => 'نبهني عند إدخال ملخص تعديل فارغ',
Tydelike wagwoord: $2',
'passwordreset-emailsent' => "'n E-pos is gestuur om u wagwoord te herstel.",
'passwordreset-emailsent-capture' => "'n E-pos vir die herstel van 'n wagwoord is gestuur. Dit word hieronder vertoon.",
-'passwordreset-emailerror-capture' => "'n E-pos vir die herstel van 'n wagwoord is saamgestel. Dit word hieronder vertoon. Die uitstuur daarvan het egter gefaal: $1",
+'passwordreset-emailerror-capture' => "'n E-pos vir die herstel van 'n wagwoord is saamgestel. Dit word hieronder vertoon. Die uitstuur daarvan na die {{GENDER:$2|gebruiker}} het egter gefaal: $1",
# Special:ChangeEmail
'changeemail' => 'Wysig E-posadres',
'previewnote' => "'''Onthou dat hierdie slegs 'n voorskou is.'''
U teks is nog nie gestoor nie!",
'continue-editing' => 'Wysig verder',
-'previewconflict' => 'Hierdie voorskou vertoon die teks in die boonste teksarea soos dit sou lyk indien u die bladsy stoor.',
+'previewconflict' => 'Hierdie voorskou vertoon die teks in die boonste teksarea soos dit sou lyk as u die bladsy stoor.',
'session_fail_preview' => "'''Jammer! Weens verlies aan sessie-inligting is die wysiging nie verwerk nie.
Probeer asseblief weer. As dit steeds nie werk nie, probeer om [[Special:UserLogout|af te teken]] en dan weer aan te meld.'''",
'session_fail_preview_html' => "'''Jammer! U wysigings is nie verwerk nie omdat sessie-data verlore gegaan het.'''
'prefs-help-gender' => 'Opsioneel: dit word gebruik om gebruikers korrek aan te spreek in die sagteware.
Die inligting is vir ander gebruikers sigbaar.',
'email' => 'E-pos',
-'prefs-help-realname' => 'Regte naam (opsioneel): as u hierdie verskaf, kan dit gebruik word om erkenning vir u werk te gee.',
+'prefs-help-realname' => 'Regte naam is opsioneel.
+As u dit verskaf, sal dit gebruik word om erkenning vir u werk te gee.',
'prefs-help-email' => 'E-posadres is opsioneel, maar is nodig om u wagwoord aan u te stuur sou u dit vergeet.',
'prefs-help-email-others' => 'U kan ook kies om ander toe te laat om u deur u gebruikers- en besprekingsbladsy te kontak sonder om u identiteit te openbaar.',
'prefs-help-email-required' => 'E-pos adres word benodig.',
'sp-deletedcontributions-contribs' => 'bydraes',
# Special:LinkSearch
-'linksearch' => 'Eksterne skakels soek',
+'linksearch' => 'Soek eksterne skakels',
'linksearch-pat' => 'Soekpatroon:',
'linksearch-ns' => 'Naamruimte:',
'linksearch-ok' => 'Soek',
# Email user
'mailnologin' => 'Geen versendadres beskikbaar',
-'mailnologintext' => "U moet [[Special:UserLogin|ingeteken]] wees en 'n geldige e-posadres in die [[Special:Preferences|voorkeure]] hê om e-pos aan ander gebruikers te stuur.",
+'mailnologintext' => "U moet [[Special:UserLogin|ingeteken]] wees en 'n geldige e-posadres in u [[Special:Preferences|voorkeure]] hê om e-pos aan ander gebruikers te kan stuur.",
'emailuser' => 'Stuur e-pos na hierdie gebruiker',
'emailuser-title-target' => 'E-pos die {{GENDER:$1|gebruiker}}',
'emailuser-title-notarget' => 'E-pos gebruiker',
'tog-shownumberswatching' => 'የሚከታተሉ ተጠቃሚዎችን ቁጥር አሳይ',
'tog-oldsig' => 'የቀድሞው ፊርማ ቅደመ እይታ',
'tog-fancysig' => 'ጥሬ ፊርማ (ያለራስገዝ ማያያዣ)',
-'tog-externaleditor' => 'በቀዳሚነት ውጪያዊ አራሚን ተጠቀም',
-'tog-externaldiff' => 'በቀዳሚነት የውጭ ልዩነት-ማሳያን ተጠቀም',
'tog-showjumplinks' => 'የ"ዝለል" አቅላይ መያያዣዎችን አስችል',
'tog-uselivepreview' => 'ቀጥታ ቅድመ-ዕይታን ይጠቀሙ (JavaScript) (የሙከራ)',
'tog-forceeditsummary' => 'ማጠቃለያው ባዶ ከሆነ ማስታወሻ ይስጠኝ',
'search-external' => 'አፍአዊ ፍለጋ',
'searchdisabled' => '{{SITENAME}} ፍለጋ አሁን እንዳይሠራ ተደርጓል። ለጊዜው ግን በGoogle ላይ መፈልግ ይችላሉ። የ{{SITENAME}} ይዞታ ማውጫ በዚያ እንዳልታደሰ ማቻሉ ያስታውሱ።',
-# Quickbar
-'qbsettings-none' => ' ምንም',
-'qbsettings-fixedleft' => 'በግራ የተለጠፈ',
-'qbsettings-fixedright' => 'በቀኝ የተለጠፈ',
-'qbsettings-floatingleft' => 'በግራ ተንሳፋፊ',
-'qbsettings-floatingright' => 'በቀኝ ተንሳፋፊ',
-
# Preferences page
'preferences' => 'ምርጫዎች፤',
'mypreferences' => 'ምርጫዎች፤',
'listusers-noresult' => 'ማንም ተጠቃሚ አልተገኘም።',
'listusers-blocked' => '(ታግዷል)',
-# Special:ActiveUsers
-'activeusers' => 'ተግባራዊ አባላት ዝርዝር',
-'activeusers-intro' => 'እነዚህ አባላት ባለፈው $1 ቀን ውስጥ ማናቸውንም አይነት ተግባር ፈጸሙ።',
-'activeusers-count' => '$1 {{PLURAL:$1|ለውጥ|ለውጦች}} ባለፈው $3 ቀን ውስጥ',
-'activeusers-hidebots' => 'ሎሌዎች ይደበቁ',
-'activeusers-hidesysops' => 'መጋቢዎች ይደበቁ',
-'activeusers-noresult' => 'ማንም ተጠቃሚ አልተገኘም።',
-
# Special:ListGroupRights
'listgrouprights' => 'የተጠቃሚ ስብስባ መብቶች',
'listgrouprights-group' => 'ስብስባ',
'tog-shownumberswatching' => "Amostrar o numero d'usuarios que cosiran un articlo",
'tog-oldsig' => 'Sinyadura actual',
'tog-fancysig' => 'Tratar as sinyaduras como wikitexto (sin de vinclo automatico)',
-'tog-externaleditor' => "Fer servir l'editor externo por defecto (nomás ta espiertos, cal que faiga achustes especials en o suyo ordenador. [//www.mediawiki.org/wiki/Manual:External_editors Mas información.])",
-'tog-externaldiff' => 'Fer servir o visualizador de diferencias externo por defecto (nomás ta expertos, cal que faiga achustes especials en o suyo ordenador. [//www.mediawiki.org/wiki/Manual:External_editors Mas información.])',
'tog-showjumplinks' => 'Activar vinclos d\'accesibilidat "blincar enta"',
'tog-uselivepreview' => 'Activar previsualización automatica (cal JavaScript) (Esperimental)',
'tog-forceeditsummary' => 'Avisar-me quan o campo de resumen siga buedo.',
'tog-showhiddencats' => 'Amostrar categorías amagatas',
'tog-noconvertlink' => 'Desactivar a conversión de titol de vinclo',
'tog-norollbackdiff' => 'No amostrar as diferencias dimpués de revertir',
+'tog-useeditwarning' => "Alvertir-me quan salga d'una pachina d'edición sin alzar os cambios",
'underline-always' => 'Siempre',
'underline-never' => 'Nunca',
'edit-no-change' => "S'ha ignorato a suya edición, pos no s'ha feito garra cambeo ta o texto.",
'edit-already-exists' => "No s'ha puesto creyar una pachina nueva.
Ya existe.",
+'editwarning-warning' => "Si sale d'ista pachina perderá totz os cambios que haiga feito. Si tiene una cuenta d'usuario, puet eliminar ista alvertencia en a sección «Caixa d'edición» d'as suyas preferencies.",
# Parser/template warnings
'expensive-parserfunction-warning' => 'Pare cuenta: Ista pachina tiene masiadas cridas ta funcions de preproceso (parser functions) costosas.
'search-external' => 'Busca externa',
'searchdisabled' => 'A busca en {{SITENAME}} ye temporalment desactivata. Entremistanto, puede mirar en {{SITENAME}} fendo servir buscadors externos, pero pare cuenta que os suyos endices de {{SITENAME}} puede no estar esviellatos.',
-# Quickbar
-'qbsettings' => 'Preferencias de "Quickbar"',
-'qbsettings-none' => 'Garra',
-'qbsettings-fixedleft' => 'Fixa a la zurda',
-'qbsettings-fixedright' => 'Fixa a la dreita',
-'qbsettings-floatingleft' => 'Flotant a la zurda',
-'qbsettings-floatingright' => 'Flotant a la dreita',
-'qbsettings-directionality' => "Fixato, pendendo en a direccionalidat d'o suyo script y o suyo luengache",
-
# Preferences page
'preferences' => 'Preferencias',
'mypreferences' => 'Preferencias',
'http-read-error' => 'Error de lectura HTTP.',
'http-timed-out' => 'A requesta HTTP ha circumducito.',
'http-curl-error' => 'Error en recuperar a URL: $1',
-'http-host-unreachable' => "No s'ha puesto acceder t'a URL.",
'http-bad-status' => 'Ha habiu un problema en a requesta HTTP: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => "No s'ha trobato ixe usuario.",
'listusers-blocked' => '({{GENDER:$1|bloqueyato|bloqueyata}})',
-# Special:ActiveUsers
-'activeusers' => "Lista d'usuarios activos",
-'activeusers-intro' => "Ista ye una lista d'usuarios que han teniu bella actividat en os zaguers $1 {{PLURAL:$1|diya|diyas}}.",
-'activeusers-count' => '$1 {{PLURAL:$1|edición|edicions}} en os zaguers {{PLURAL:$3|diya|$3 diyas}}',
-'activeusers-from' => "Amostrar nombres d'usuario que prencipien por:",
-'activeusers-hidebots' => 'Amagar robots',
-'activeusers-hidesysops' => 'Amagar administradors',
-'activeusers-noresult' => "No s'han trobato usuarios.",
-
# Special:ListGroupRights
'listgrouprights' => "Dreitos d'a colla d'usuarios",
'listgrouprights-summary' => "Contino trobará a lista de collas d'usuario definitas en iste wiki, con os suyos dreitos d'acceso asociatos. Tamién puet trobar aquí [[{{MediaWiki:Listgrouprights-helppage}}|información adicional]] sobre os dreitos individuals.",
# Stylesheets
'common.css' => '/* Os estilos CSS definius aquí aplicarán a todas as apariencias (skins) */',
-'standard.css' => "/* Os estilos CSS colocaus aquí s'aplicarán ta totz os usuarios que faigan servir l'apariencia Standard */",
-'nostalgia.css' => "/* Os estilos CSS colocaus aquí s'aplicarán ta totz os usuarios que faigan servir l'apariencia Nostalgia */",
'cologneblue.css' => "/* Os estilos CSS colocaus aquí s'aplicarán ta totz os usuarios que faigan servir l'apariencia Cologne Blue */",
'monobook.css' => "/* Os estilos CSS colocaus aquí s'aplicarán ta totz os usuarios que faigan servir l'apariencia Monobook */",
-'myskin.css' => "/* Os estilos CSS colocaus aquí s'aplicarán ta totz os usuarios que que faigan servir l'apariencia MySkin */",
-'chick.css' => "/* Os estilos CSS colocaus aquí s'aplicarán ta totz os usuarios que faigan servir l'apariencia Chick */",
-'simple.css' => "/* Os estilos CSS colocaus aquí s'aplicarán ta totz os usuarios que faigan servir l'apariencia Simpla */",
'modern.css' => "/* Os estilos CSS colocaus aquí s'aplicarán ta totz os usuarios que faigan servir l'apariencia Modern */",
'vector.css' => "/* Os estilos CSS colocaus aquí s'aplicarán ta totz os usuarios que faigan servir l'apariencia Vector */",
'print.css' => '/* Os estilos CSS colocaus aquí afectarán a la impresión */',
# Scripts
'common.js' => '/* Qualsiquier codigo Javascript escrito aquí se cargará ta totz os usuarios en cada carga de pachina */',
-'standard.js' => "/* Qualsiquier codigo Javascript escrito aquí se cargará ta totz os usuarios que faigan servir l'apariencia Estandar */",
-'nostalgia.js' => "/* Qualsiquier codigo Javascript escrito aquí se cargará ta totz os usuarios que faigan servir l'apariencia Nostalgia. */",
'cologneblue.js' => "/* Qualsiquier codigo Javascript escrito aquí se cargará ta totz os usuarios que faigan servir l'apariencia Colonia azul */",
'monobook.js' => "/* O codigo Javascript que se meta aquí será cargau por os usuarios faigan servir l'apariencia MonoBook */",
-'myskin.js' => "/* Qualsiquier codigo Javascript escrito aquí se cargará ta totz os usuarios que faigan servir l'apariencia MySkin */",
-'chick.js' => "/* Qualsiquier codigo Javascript escrito aquí se cargará ta totz os usuarios que faigan servir l'apariencia Chick */",
-'simple.js' => "/* Qualsiquier codigo Javascript escrito aquí se cargará ta totz os usuarios que faigan servir l'apariencia Simple */",
'modern.js' => "/* O codigo Javascript que se meta aquí será cargau por os usuarios faigan servir l'apariencia Modern */",
'vector.js' => '/* Qualsiquier codigo Javascript escrito aquí se cargará ta totz os usuarios que usen a piel Vector */',
'group-autoconfirmed.js' => '/* Qualsiquier codigo Javascript escrito aquí se cargará nomás ta os usuarios autoconfirmatos */',
'pageinfo-authors' => "Numero d'autors diferents",
# Skin names
-'skinname-standard' => 'Clasica (Classic)',
-'skinname-nostalgia' => 'Recosiros (Nostalgia)',
'skinname-cologneblue' => 'Colonia Azul (Cologne Blue)',
'skinname-monobook' => 'MonoBook',
-'skinname-myskin' => 'A mía aparencia (MySkin)',
-'skinname-chick' => 'Chick',
-'skinname-simple' => 'Simpla (Simple)',
'skinname-modern' => 'Moderna',
'skinname-vector' => 'Vector',
'gotaccountlink' => 'تسجيل الدخول',
'userlogin-resetlink' => 'نسيت تفاصيل الدخول؟',
'helplogin-url' => 'Help:تسجيل الدخول',
+'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|المساعدة في تسجيل الدخول]]',
'createaccountmail' => 'استخدم كلمة سر عشوائية مؤقتة وارسلها إلى عنوان البريد الإلكتروني المحدد أدناه',
'createaccountreason' => 'السبب:',
'badretype' => 'كلمات السر التي أدخلتها لا تتطابق.',
'passwordreset-text' => 'أكمل هذا النموذج لإعادة ضبط كلمة السر الخاصة بك.',
'passwordreset-legend' => 'إعادة تعيين كلمة السر',
'passwordreset-disabled' => 'عُطّلت إعادة تعيين كلمة السر على هذه الويكي.',
+'passwordreset-emaildisabled' => 'تم تعطيل ميزات البريد الإلكتروني على هذه الويكي.',
'passwordreset-pretext' => '{{PLURAL:$1||أدخل أحد أجزاء البيانات أدناه}}',
'passwordreset-username' => 'اسم المستخدم:',
'passwordreset-domain' => 'النطاق:',
يمكنك تسجيل الدخول واختيار كلمة سر جديدة. إذا كان هذا الطلب تم بواسطة شخص أخر، أو إذا تذكرت كلمة السر الأصلية الخاصة بك، ولم تعد ترغب في تغييرها، يمكنك تجاهل هذه الرسالة ومتابعة استخدام كلمة السر القديمة.',
'passwordreset-emailelement' => 'اسم {{GENDER:$1|المستخدم|المستخدمة}}: $1
كلمة السر المؤقتة: $2',
-'passwordreset-emailsent' => 'أرسل بريد إلكتروني تذكيري',
-'passwordreset-emailsent-capture' => 'أرسل بريد إلكتروني تذكيري وهو معروض بالأسفل.',
-'passwordreset-emailerror-capture' => 'ولّد بريد إلكتروني تذكيري وهو معروض بالأسفل لكن فشل إرساله للمستخدم: $1',
+'passwordreset-emailsent' => 'أُرسل بريد إلكتروني لإعادة ضبط كلمة السر.',
+'passwordreset-emailsent-capture' => 'أُرسل بريد إلكتروني لإعادة ضبط كلمة السر، وهو معروض بالأسفل.',
+'passwordreset-emailerror-capture' => 'ولّد بريد إلكتروني لإعادة ضبط كلمة السر وهو معروض بالأسفل لكن فشل إرساله للمستخدم: $1',
# Special:ChangeEmail
'changeemail' => 'تغيير عنوان البريد الإلكتروني',
'searchdisabled' => 'البحث في {{SITENAME}} معطل.
يمكنك البحث من خلال جوجل في الوقت الحالي.
لاحظ أن فهارسه لمحتوى {{SITENAME}} ربما تكون غير محدثة.',
+'search-error' => 'حدث خطأ ما أثناء البحث: $1',
# Preferences page
'preferences' => 'تفضيلات',
'htmlform-submit' => 'إرسال',
'htmlform-reset' => 'الرجوع عن التغييرات',
'htmlform-selectorother-other' => 'أخرى',
+'htmlform-no' => 'لا',
+'htmlform-yes' => 'نعم',
# SQLite database support
'sqlite-has-fts' => '$1 بدعم البحث في كامل النص',
'sqlite-no-fts' => '$1 بدون دعم البحث في كامل النص',
# New logging system
-'logentry-delete-delete' => '{{GENDER:$2|ØØ°Ù\81|ØØ°Ù\81ت}} $1 اÙ\84صÙ\81ØØ© $3',
-'logentry-delete-restore' => 'استعاد $1 صفحة $3',
-'logentry-delete-event' => '$1 غير خاصية العرض لـ {{PLURAL:$5|مدخل السجل|$5 مدخلات السجل}} في $3: $4',
+'logentry-delete-delete' => '{{GENDER:$2|حذف|حذفت}} $1 صفحة $3',
+'logentry-delete-restore' => '{{GENDER:$2|استعاد|استعادت}} $1 صفحة $3',
+'logentry-delete-event' => '{{GENDER:$2|غيّر|غيّرت}} $1 إمكانية مشاهدة {{PLURAL:$5||حدث|حدثين|$5 أحداث|$5 حدثًا|$5 حدث}} في سجل $3: $4',
'logentry-delete-revision' => 'غيّر{{GENDER:$2||ت}} $1 إمكانية مشاهدة {{PLURAL:$5||مراجعة واحدة|مراجعتين|$5 مراجعات|$5 مراجعة}} في صفحة $3: $4',
-'logentry-delete-event-legacy' => 'غيّر $1 إمكانية رؤية أحداث سجل $3',
-'logentry-delete-revision-legacy' => 'غيّر $1 إمكانية رؤية مراجعات صفحة $3',
-'logentry-suppress-delete' => '$1 suppressed صفحة $3',
+'logentry-delete-event-legacy' => '{{GENDER:$2|غيّر|غيّرت}} $1 إمكانية رؤية أحداث في سجل $3',
+'logentry-delete-revision-legacy' => '{{GENDER:$2|غيّر|غيّرت}} $1 إمكانية رؤية مراجعات من صفحة $3',
+'logentry-suppress-delete' => '{{GENDER:$2|أخفى|أخفت}} $1 صفحة $3',
'logentry-suppress-event' => 'غيّر{{GENDER:$2||ت}} $1 بسرية إمكانية مشاهدة {{PLURAL:$5||حدث|حدثين|$5 أحداث|$5 حدثًا|$5 حدث}} في سجل $3: $4',
'logentry-suppress-revision' => 'غيّر{{GENDER:$2||ت}} $1 سراً إمكانية مشاهدة {{PLURAL:$5||مراجعة واحدة|مراجعتين|$5 مراجعات|$5 مراجعة}} في صفحة $3: $4',
'logentry-suppress-event-legacy' => 'غيّر $1 بسرية إمكانية رؤية أحداث سجل $3',
<?php
-/** Assamese (à¦\85সমà§\80à§\9fা)
+/** Assamese (à¦\85সমà§\80য়া)
*
* See MessagesQqq.php for message documentation incl. usage of parameters
* To improve a translation please visit http://translatewiki.net
'tog-shownumberswatching' => 'লক্ষ্য কৰি থকা সদস্য সমূহৰ সংখ্যা দেখুৱাওক',
'tog-oldsig' => 'বৰ্তমানৰ স্বাক্ষৰ:',
'tog-fancysig' => 'স্বাক্ষৰ ৱিকিটেক্সট হিচাপে ব্যৱহাৰ কৰক (স্বয়ংক্ৰিয় সংযোগ অবিহনে)',
-'tog-externaleditor' => 'ডিফ’ল্ট ভাবে বাহ্যিক সম্পাদন-সঁজুলি ব্যৱহাৰ কৰক (দক্ষ জনৰ বাবেহে, আপোনাৰ কম্পিউটাৰত বিশেষ ব্যৱস্থা থাকিব লাগিব । [//www.mediawiki.org/wiki/Manual:External_editors সবিশেষ ।])',
-'tog-externaldiff' => 'ডিফ’ল্ট ভাবে বাহ্যিক তফাৎ (diff) ব্যৱহাৰ কৰক (দক্ষ জনৰ বাবেহে, আপোনাৰ কম্পিউটাৰত বিশেষ ব্যৱস্থা থাকিব লাগিব । [//www.mediawiki.org/wiki/Manual:External_editors সবিশেষ ।])',
'tog-showjumplinks' => '"জঁপিয়াই যাওক" সংযোগ সক্ৰিয় কৰক',
'tog-uselivepreview' => 'সম্পাদনাৰ লগে লগে খচৰা দেখুৱাওক (জাভাস্ক্ৰিপ্টৰ প্ৰয়োজন) (পৰীক্ষামূলক)',
'tog-forceeditsummary' => 'সম্পাদনাৰ সাৰাংশ নিদিলে মোক জনাব',
'tog-diffonly' => 'পার্থক্যৰ তলত পৃষ্ঠাৰ বিষয়বস্তু নেদেখুৱাব',
'tog-showhiddencats' => 'নিহিত শ্ৰেণী সমূহ দেখুৱাওক',
'tog-norollbackdiff' => 'পূৰ্বৱত কৰা পাছত পাৰ্থক্য নেদেখুৱাব',
+'tog-useeditwarning' => 'সালসলনি সংৰক্ষণ নকৰাকৈ সম্পাদনা পৃষ্ঠা ত্যাগৰ সময়ত মোক সাৱধান কৰক',
'underline-always' => 'সদায়',
'underline-never' => 'কেতিয়াও নহয়',
'nov' => 'নৱেম্বৰ:',
'dec' => 'ডিচেম্বৰ:',
+'monday-at' => 'সোমবাৰে $1ত',
+'tuesday-at' => 'মঙ্গলবাৰে $1’ত',
+'wednesday-at' => 'বুধবাৰে $1’ত',
+'thursday-at' => 'বৃহস্পতিবাৰে $1’ত',
+'friday-at' => 'শুক্ৰবাৰে $1’ত',
+'saturday-at' => 'শনিবাৰে $1’ত',
+'sunday-at' => 'দেওবাৰে $1’ত',
+'today-at' => '$1',
+'yesterday-at' => 'কালি $1’ত',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|শ্ৰেণী|শ্ৰেণীসমূহ}}',
'category_header' => '"$1" শ্ৰেণীৰ পৃষ্ঠাসমূহ',
'content-failed-to-parse' => '$1 মডেলৰ বাবে $2ৰ তথ্য নিকা কৰিব পৰা নগ’ল: $3',
'invalid-content-data' => 'অবৈধ সমল তথ্য',
'content-not-allowed-here' => '[[$2]] পৃষ্ঠাত "$1" সমল অনুমোদিত নহয়',
+'editwarning-warning' => 'এই পৃষ্ঠাটো এৰিলে আপুনি কৰা পৰিবৰ্তনসমূহ হেৰাব পাৰে। যদি আপুনি প্ৰৱেশ কৰা অৱস্থাত আছে, আপুনি এই সতৰ্কবাৰ্তাক আপোনাৰ পছন্দসমূহৰ "সম্পাদনা" অংশত অসামৰ্থবান কৰিব পাৰিব।',
# Content models
'content-model-wikitext' => 'ৱিকিপাঠ্য',
তেতিয়ালৈকে গুগলত অনুসন্ধান কৰক।
মনত ৰাখিব যে তেঁওলোকৰ {{SITENAME}}ৰ ইণ্ডেক্স পুৰণি হব পাৰে।',
-# Quickbar
-'qbsettings' => 'শীঘ্ৰদণ্ডিকা',
-'qbsettings-none' => 'একেবাৰে নহয়',
-'qbsettings-fixedleft' => 'বাঁওফাল স্থিৰ',
-'qbsettings-fixedright' => 'সোঁফাল স্থিৰ',
-'qbsettings-floatingleft' => 'বাঁওফাল অস্থিৰ',
-'qbsettings-floatingright' => 'সোঁফাল অস্থিৰ',
-'qbsettings-directionality' => 'আপোনাৰ ভাষাৰ আৰু লিপিৰ দিশৰ ওপৰত নিৰ্ভৰ কৰি ঠিক কৰা হ’ল',
-
# Preferences page
'preferences' => 'পছন্দসমূহ',
'mypreferences' => 'পছন্দসমূহ',
'http-read-error' => 'HTTP পঠন ত্ৰুটি ।',
'http-timed-out' => 'HTTP অনুৰোধৰ সময় পাৰ হৈছে ।',
'http-curl-error' => 'URL অনাত ত্ৰুটি হৈছে: $1',
-'http-host-unreachable' => 'URL পাব পৰা নগ’ল ।',
'http-bad-status' => 'HTTP অনুৰোধৰ সময়ত কোনো সমস্যা হৈছে: $1, $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => 'ব্যৱহাৰকাৰী বিচাৰি পোৱা নগ’ল',
'listusers-blocked' => '(বাৰণ কৰা)',
-# Special:ActiveUsers
-'activeusers' => 'সক্ৰিয় ব্যবহাৰকাৰীৰ তালিকা',
-'activeusers-intro' => 'যোৱা {{PLURAL:$1|দিন|দিন}}ৰ ভিতৰত অৱদান আগবঢ়োৱা ব্যৱহাৰকাৰীৰ তালিকা',
-'activeusers-count' => 'যোৱা {{PLURAL:$3|দিনত|$3 দিনত}} সৰ্বমুঠ {{PLURAL:$1|কামৰ|কামৰ}} সংখ্যা $1',
-'activeusers-from' => 'ইয়াৰে আৰম্ভ হোৱা ব্যৱহাৰকাৰী সকল দেখুৱাওক:',
-'activeusers-hidebots' => 'বট নেদেখুৱাব',
-'activeusers-hidesysops' => 'প্ৰশাসক নেদেখুৱাব',
-'activeusers-noresult' => "কোনো সদস্য পোৱা নগ'ল।",
-
# Special:ListGroupRights
'listgrouprights' => 'ব্যৱহাৰকাৰী গোটৰ অধিকাৰ',
'listgrouprights-summary' => 'এই ৱিকিত থকা গোটসমূহৰ তালিকা সেইবোৰৰ প্ৰৱেশাধিকাৰসহ তলত দিয়া হ’ল ।
'duration-centuries' => '$1 {{PLURAL:$1|শতাব্দী|শতাব্দী}}',
'duration-millennia' => '$1 {{PLURAL:$1|সহস্ৰাব্দ|সহস্ৰাব্দ}}',
+# Unknown messages
+'hours-ago' => '$1 {{PLURAL:$1|ঘন্টা}} আগেয়ে',
+'minutes-ago' => '$1 {{PLURAL:$1|মাহ}} আগেয়ে',
+'seconds-ago' => '$1 {{PLURAL:$1|ছেকেন্ড}} আগতে',
);
$messages = array(
# User preference toggles
'tog-underline' => 'Sorrayar enllaces:',
-'tog-justify' => 'Xustificar parágrafos',
+'tog-justify' => 'Xustificar párrafos',
'tog-hideminor' => 'Anubrir les ediciones menores nos cambeos recientes',
'tog-hidepatrolled' => 'Anubrir les ediciones vixilaes nos cambeos recientes',
'tog-newpageshidepatrolled' => 'Anubrir les páxines vixilaes na llista de páxines nueves',
<blockquote><code>$1</code></blockquote>
dende la función «<code>$2</code>».
La base datos dio'l fallu «<samp>$3: $4</samp>».",
-'dberrortextcl' => "Hebo un fallu de sintaxis nuna consulta a la base de datos.
-La postrer consulta de la base de datos que s'intentó foi:
+'dberrortextcl' => "Hebo un error de sintaxis nuna consulta a la base de datos.
+La última consulta a la base de datos que s'intentó foi:
«$1»
dende la función «$2».
-La base de datos dio'l fallu «$3: $4».",
+La base de datos devolvió l'error «$3: $4».",
'laggedslavemode' => "'''Avisu:''' Esta páxina pue que nun tenga actualizaciones recientes.",
'readonly' => 'Base de datos candada',
'enterlockreason' => 'Introduz un motivu pal candáu, amestando una estimación de cuándo va tener llugar el descandáu',
Si esti nun ye'l casu, seique tengas atopao un bug nel software.
Por favor informa d'esto a un [[Special:ListUsers/sysop|alministrador]], anotando la URL.",
'missingarticle-rev' => '(núm. revisión: $1)',
-'missingarticle-diff' => '(dif: $1, $2)',
+'missingarticle-diff' => '(Diff: $1, $2)',
'readonly_lag' => 'La base de datos candóse automáticamente mentes los sirvidores de la base de datos esclava se sincronicen cola maestra',
'internalerror' => 'Fallu internu',
'internalerror_info' => 'Fallu internu: $1',
'filedeleteerror' => 'Nun se pudo desaniciar el ficheru «$1».',
'directorycreateerror' => 'Nun se pudo crear el direutoriu «$1».',
'filenotfound' => 'Nun se pudo atopar el ficheru «$1».',
-'fileexistserror' => 'Nun se pue escribir nel archivu «$1»: yá esiste',
+'fileexistserror' => 'Nun se pue escribir nel ficheru «$1»: yá esiste',
'unexpected' => 'Valor inesperáu: «$1»=«$2».',
'formerror' => 'Fallu: Nun se pudo unviar el formulariu.',
'badarticleerror' => 'Esta aición nun pue facese nesta páxina.',
Función: $1<br />
Consulta: $2',
'viewsource' => 'Ver fonte',
-'viewsource-title' => 'Ver la fonte de «$1»',
+'viewsource-title' => 'Ver la fonte de $1',
'actionthrottled' => 'Aición llendada',
'actionthrottledtext' => 'Como midida anti-spam, nun se pue repetir esta aición munches vegaes en pocu tiempu, y trespasasti esi llímite.
Por favor vuelvi intentalo nunos minutos.',
Clave provisional: $2",
'passwordreset-emailsent' => 'Unvióse un corréu electrónicu pa reaniciar la contraseña.',
'passwordreset-emailsent-capture' => "Unvióse un corréu electrónicu pa reaniciar la contraseña, que s'amuesa abaxo.",
-'passwordreset-emailerror-capture' => "Unvióse un corréu electrónicu pa reaniciar la contraseña, que s'amuesa abaxo, pero falló l'unviu al usuariu: $1",
+'passwordreset-emailerror-capture' => "Unvióse un corréu electrónicu pa reaniciar la contraseña, que s'amuesa abaxo, pero falló l'unviu {{GENDER:$2|al usuariu|a la usuaria}}: $1",
# Special:ChangeEmail
'changeemail' => 'Camudar la direición de corréu electrónicu',
'tog-shownumberswatching' => 'ایزلهين ایستیفادهچیلرین سایینی گؤستر',
'tog-oldsig' => 'ایندیکی ایمضا:',
'tog-fancysig' => 'ویکی متن کیمی ایمضا (اوتوماتیک باغلانتیسیز)',
-'tog-externaleditor' => 'دَییشدیرمک اوچون ائشیک یازیلیم ایشلد (یالنیز چوخ باشارانلار اوچون، بیلگیسایارینیزدا مخصوص تنظیملر لازیمدیر. [//www.mediawiki.org/wiki/Manual:External_editors آرتیق بیلگیلر])',
-'tog-externaldiff' => 'موقاییسه ائتمک اوچون ائشیک یازیلیم ایشلد (یالنیز چوخ باشارانلار اوچون، بیلگیسایارینیزدا مخصوص تنظیملر لازیمدیر. [//www.mediawiki.org/wiki/Manual:External_editors آرتیق بیلگیلر])',
'tog-showjumplinks' => '«آتلان:» یاردیم باغلانتیلارینی آچ',
'tog-uselivepreview' => 'دیری اؤنگؤستریش ایشلد (جاوااسکریپت لازیمدیر)(تست مرحلهسینده)',
'tog-forceeditsummary' => 'دَییشیکلیک قیساسی بوش قالاندا منی بیلدیر',
'tog-shownumberswatching' => 'Битте күҙәтеү исемлегенә өҫтәгән ҡулланыусылар һанын күрһәтергә',
'tog-oldsig' => 'Хәҙерге имза:',
'tog-fancysig' => 'Имзаның үҙ вики-тамғаһы (автоматик һылтанмаһыҙ)',
-'tog-externaleditor' => 'Махсус билдәләнмәһә, тышҡы мөхәррирләүсе ҡулланырға (белгестәр өсөн генә, компьютер махсус көйләнгән булырға тейеш)',
-'tog-externaldiff' => 'Махсус билдәләнмәһә, версияларҙы сағыштырыу өсөн тышҡы программа ҡулланырға (белгестәр өсөн генә, компьютер махсус көйләнгән булырға тейеш)',
'tog-showjumplinks' => '«Күс» ярҙамсы һылтанмалары асылһын',
'tog-uselivepreview' => 'Тиҙ ҡарап алыуҙы ҡулланырға (JavaScript, эксперименталь)',
'tog-forceeditsummary' => 'Төҙәтеүҙе тасуирлау юлы тултырылмаһа, мине киҫәт',
'tog-diffonly' => 'Версия сағыштырыу аҫтында бит эстәлеге күрһәтелмәһен',
'tog-showhiddencats' => 'Йәшерен категорияларҙы күрһәтергә',
'tog-norollbackdiff' => 'Кире ҡайтарыуҙан һуң версия айырмалары күрһәтелмәһен',
+'tog-useeditwarning' => 'Мөхәррирләү битенән үҙгәртеүҙәрҙе һаҡламайынса сыҡҡан ваҡытта мине киҫәтергә',
'underline-always' => 'Һәр ваҡыт',
'underline-never' => 'Бер ҡасан да',
'content-failed-to-parse' => '$2 эстәлеге $1 төрөнә тура килмәй: $3.',
'invalid-content-data' => 'Ярамаған мәғлүмәт',
'content-not-allowed-here' => '"$1" эстәлеге [[$2]] бит өсөн ярамай',
+'editwarning-warning' => 'Икенсе биткә күсеү һеҙ индергән үҙгәрештәрҙең юғалыуына килтереүе мөмкин.
+Әгәр системала танылыу үтһәгеҙ, көйләүҙәрегеҙ битенең "Мөхәррирләү" бүлегендә был киҫәтеүҙе һүндерә алаһығыҙ.',
# Content models
'content-model-wikitext' => 'викияҙма',
Хәҙергә эҙләүҙе Google менән үтәй алаһығыҙ.
Тик унда {{SITENAME}} өсөн индекслауҙың иҫке булыуы мөмкинлеген онотмағыҙ.',
-# Quickbar
-'qbsettings' => 'Тиҙ күсеү',
-'qbsettings-none' => 'Һис бере',
-'qbsettings-fixedleft' => 'Һулда нығытылған',
-'qbsettings-fixedright' => 'Уңда нығытылған',
-'qbsettings-floatingleft' => 'Һулда күсеүсе',
-'qbsettings-floatingright' => 'Уңда күсеүсе',
-'qbsettings-directionality' => 'Беркетелгән, телегеҙҙең яҙыу йүнәлешенә бәйле',
-
# Preferences page
'preferences' => 'Көйләүҙәр',
'mypreferences' => 'Көйләүҙәр',
'http-read-error' => 'HTTP уҡыу хатаһы.',
'http-timed-out' => 'HTTP-һорауҙы көтөү ваҡыты үтте.',
'http-curl-error' => 'URL адрес буйынса мөрәжәғәт итеү хатаһы: $1',
-'http-host-unreachable' => 'URL адрес буйынса мөрәжәғәт итеү мөмкин түгел.',
'http-bad-status' => 'HTTP-һорауҙы эшкәрткән ваҡытта ҡыйынлыҡтар тыуҙы: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'pageinfo-protect-cascading-from' => 'Бынан башлап һикәлтәле һаҡлау',
# Skin names
-'skinname-standard' => 'Классик',
'skinname-cologneblue' => 'Кёльн һағышы',
-'skinname-myskin' => 'Шәхси',
-'skinname-chick' => 'Себеш',
-'skinname-simple' => 'Ябай',
'skinname-modern' => 'Заманса',
'skinname-vector' => 'Векторлы',
'gotaccount' => 'Igwa ka na tabi nin panindog? $1.',
'gotaccountlink' => 'Maglaog',
'userlogin-resetlink' => 'Nakalingaw ka sa panlaog mong detalye?',
-'helplogin-url' => 'Tabang:Paglalaog',
+'helplogin-url' => 'Help:Paglalaog',
'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Tabang sa paglalaog]]',
'createaccountmail' => 'Gumamit nin sarong random na temporaryong sekretong panlaog asin ipadara ini sa adres kan e-surat na pinaghaya sa ibaba',
'createaccountreason' => 'Rason:',
Temporaryong sekretong panlaog: $2',
'passwordreset-emailsent' => 'Sarong e-surat sa pagliliwat kan sekretong panlaog an ipinadara na.',
'passwordreset-emailsent-capture' => 'Sarong e-surat sa pagliliwat kan sekretong panlaog an ipinadara na, yaon ipinapahiling sa ibaba.',
-'passwordreset-emailerror-capture' => 'Sarong e-surat sa pagliliwat kan sekretong panlaog an pinaghimo na,yaon ipinapahiling sa ibaba, alagad sa pagpapadara kaini sa paragamit nagpalya: $1',
+'passwordreset-emailerror-capture' => 'Sarong e-surat sa pagliliwat kan sekretong panlaog an pinagpuyos na, yaon ipinapahiling sa ibaba, alagad sa pagpapadara kaini sa {{GENDER:$2|paragamit}} nagpalya: $1',
# Special:ChangeEmail
'changeemail' => 'Ribayan an e-koreong address',
'tog-shownumberswatching' => 'Паказваць колькасць назіральнікаў',
'tog-oldsig' => 'Існуючы подпіс:',
'tog-fancysig' => 'Апрацоўваць подпіс як вікі-тэкст (без аўтаматычнай спасылкі)',
-'tog-externaleditor' => "Карыстацца вонкавай праграмай для праўкі (edit); рэкамендуецца толькі для спецыялістаў, бо патрабуе адмысловых настаўленняў на камп'ютары; [//www.mediawiki.org/wiki/Manual:External_editors гл. падрабязна.]",
-'tog-externaldiff' => "Карыстацца вонкавай праграмай для параўнання (diff); рэкамендуецца толькі для спецыялістаў, бо патрабуе адмысловых настаўленняў на камп'ютары; [//www.mediawiki.org/wiki/Manual:External_editors гл. падрабязна.]",
'tog-showjumplinks' => 'Дазволіць дапаможныя спасылкі "jump to"',
'tog-uselivepreview' => 'Жывы перадпаказ (Яваскрыпт, эксперыментальн.)',
'tog-forceeditsummary' => 'Папярэджваць пра пустое поле тлумачэння праўкі',
'tog-diffonly' => 'Не паказваць рэшты старонкі пад розніцай',
'tog-showhiddencats' => 'Паказаць схаваныя катэгорыі',
'tog-norollbackdiff' => 'Не паказваць розніцу ў выніку адкату',
+'tog-useeditwarning' => 'Папярэдзіць мяне, калі я пакідаю старонку з незахаванымі праўкамі',
'underline-always' => 'Заўсёды',
'underline-never' => 'Ніколі',
'edit-no-change' => 'Вашая праўка была праігнараваная, таму што не мяняўся тэкст.',
'edit-already-exists' => 'Не ўдалося стварыць новую старонку.
Такая ўжо існуе.',
+'editwarning-warning' => 'Выхад з гэтай старонкі прывядзе да страты правак, якія вы зрабілі.
+Калі Вы зарэгістраваныя ў сістэме, Вы можаце адключыць гэта папярэджанне ў закладцы "Праца" Вашых настаўленняў.',
# Parser/template warnings
'expensive-parserfunction-warning' => "Увага: На старонцы занадта шмат працаёмістых зваротаў да парсера.
'search-external' => 'Вонкавы пошук',
'searchdisabled' => 'Функцыя пошуку {{SITENAME}} не працуе. Тымчасова можна шукаць з дапамогай Google. Заўважце, што тамтэйшыя індэксы зместу {{SITENAME}} могуць не быць актуальнымі.',
-# Quickbar
-'qbsettings' => 'Хуткая стужка',
-'qbsettings-none' => 'Няма',
-'qbsettings-fixedleft' => 'Прымацавана злева',
-'qbsettings-fixedright' => 'Прымацавана справа',
-'qbsettings-floatingleft' => 'Плавае злева',
-'qbsettings-floatingright' => 'Плавае справа',
-'qbsettings-directionality' => 'Фіксаваная, у залежнасці ад накіравання вашай мовы',
-
# Preferences page
'preferences' => 'Настаўленні',
'mypreferences' => 'Настáўленні',
'http-read-error' => 'Памылка чытання HTTP',
'http-timed-out' => 'Мінуў час чакання HTTP-запыту.',
'http-curl-error' => 'Памылка звароту да URL: $1',
-'http-host-unreachable' => 'Не ўдалося адкрыць URL',
'http-bad-status' => 'Пад час апрацоўкі HTTP-запыту выяўлена праблема: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => 'Удзельнікі не знойдзеныя.',
'listusers-blocked' => '(Заблакаваны)',
-# Special:ActiveUsers
-'activeusers' => 'Актыўныя ўдзельнікі',
-'activeusers-intro' => 'Гэта пералік удзельнікаў, якія нешта рабілі за апошнія $1 {{PLURAL:$1|дзень|дзён}}.',
-'activeusers-count' => '$1 {{PLURAL:$1|праўка|праўкі|правак}} за апошні{{PLURAL:$3| дзень|я $3 дзён}}',
-'activeusers-from' => 'Паказ, пачынаючы з:',
-'activeusers-hidebots' => 'Без робатаў',
-'activeusers-hidesysops' => 'Без адміністратараў',
-'activeusers-noresult' => 'Няма такіх удзельнікаў.',
-
# Special:ListGroupRights
'listgrouprights' => 'Дазволы для груп удзельнікаў',
'listgrouprights-summary' => 'Гэты пералік вызначаных у гэтай вікі груп удзельнікаў, разам з прыпісанымі ім дазволамі.
'pageinfo-authors' => 'Колькасць розных аўтараў',
# Skin names
-'skinname-standard' => 'Класіка',
-'skinname-nostalgia' => 'Настальгія',
'skinname-cologneblue' => 'Сіні Кёльн',
'skinname-monobook' => 'Манабук',
-'skinname-myskin' => 'Майскін',
-'skinname-chick' => 'Чык',
-'skinname-simple' => 'Проста',
'skinname-modern' => 'Сучаснасць',
# Patrolling
'nov' => 'ліс',
'dec' => 'сьн',
+'monday-at' => 'Панядзелак, $1',
+'tuesday-at' => 'Аўторак, $1',
+'wednesday-at' => 'Серада, $1',
+'thursday-at' => 'Чацьвер, $1',
+'friday-at' => 'Пятніца, $1',
+'saturday-at' => 'Субота, $1',
+'sunday-at' => 'Нядзеля, $1',
+'today-at' => '$1',
+'yesterday-at' => 'Учора, $1',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|Катэгорыя|Катэгорыі|Катэгорыі}}',
'category_header' => 'Старонкі ў катэгорыі «$1»',
'welcomecreation-msg' => 'Ваш рахунак быў створаны.
Не забудзьцеся зьмяніць Вашыя [[Special:Preferences|налады ў {{GRAMMAR:месны|{{SITENAME}}}}]].',
'yourname' => 'Імя ўдзельніка:',
+'userlogin-yourname' => 'Імя ўдзельніка',
+'userlogin-yourname-ph' => 'Увядзіце вашае імя ўдзельніка',
'yourpassword' => 'Пароль:',
+'userlogin-yourpassword' => 'Пароль',
+'userlogin-yourpassword-ph' => 'Увядзіце ваш пароль',
'yourpasswordagain' => 'Паўтарыце пароль:',
'remembermypassword' => 'Запомніць мяне на гэтым кампутары (ня больш за $1 {{PLURAL:$1|дзень|дні|дзён}})',
+'userlogin-remembermypassword' => 'Запамятаць мяне',
+'userlogin-signwithsecure' => 'Уваходзіць празь бясьпечны сэрвэр',
'securelogin-stick-https' => 'Утрымліваць злучэньне праз HTTPS пасьля ўваходу ў сыстэму',
'yourdomainname' => 'Ваш дамэн:',
'password-change-forbidden' => 'Вы ня можаце зьмяняць паролі ў гэтай вікі.',
'logout' => 'Выйсьці',
'userlogout' => 'Выйсьці',
'notloggedin' => 'Вы не ўвайшлі ў сыстэму',
+'userlogin-noaccount' => 'Ня маеце рахунку?',
+'userlogin-joinproject' => 'Далучайцеся да {{GRAMMAR:родны|{{SITENAME}}}}',
'nologin' => 'Ня маеце рахунку? $1.',
'nologinlink' => 'Стварыце рахунак',
'createaccount' => 'Стварэньне рахунку',
'gotaccount' => 'Ужо маеце рахунак? $1.',
'gotaccountlink' => 'Увайдзіце',
'userlogin-resetlink' => 'Забыліся на зьвесткі для ўваходу?',
+'helplogin-url' => 'Help:Уваход у сыстэму',
+'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Дапамога па ўваходзе ў сыстэму]]',
'createaccountmail' => 'Стварыць часовы адвольны пароль і даслаць яго на e-mail адрас, пазначаны ніжэй',
'createaccountreason' => 'Прычына:',
'badretype' => 'Уведзеныя Вамі паролі не супадаюць.',
Часовы пароль: $2',
'passwordreset-emailsent' => 'Ліст пра скіданьне паролю быў дасланы.',
'passwordreset-emailsent-capture' => 'Ліст пра скіданьне паролю быў дасланы, што паказана ніжэй.',
-'passwordreset-emailerror-capture' => 'Ліст пра скіданьне паролю быў створаны і паказаны ніжэй, але не ўдалося адправіць яго карыстальніку: $1',
+'passwordreset-emailerror-capture' => 'Ліст пра скіданьне паролю быў створаны і паказаны ніжэй, але не ўдалося адправіць яго {{GENDER:$2|ўдзельніку|ўдзельніцы}}: $1',
# Special:ChangeEmail
'changeemail' => 'Зьмяніць адрас электроннай пошты',
# Image rotation
'rotate-comment' => 'Выява павернутая на $1{{PLURAL:$1|°}} па гадзіньнікавай стрэлцы',
+# Unknown messages
+'hours-ago' => '$1 {{PLURAL:$1|гадзіну|гадзіны|гадзінаў}} таму',
+'minutes-ago' => '$1 {{PLURAL:$1|хвіліну|хвіліны|хвілінаў}} таму',
+'seconds-ago' => '$1 {{PLURAL:$1|сэкунду|сэкунды|сэкундаў}} таму',
);
'tog-shownumberswatching' => 'Показване на броя на потребителите, наблюдаващи дадена страница',
'tog-oldsig' => 'Текущ подпис:',
'tog-fancysig' => 'Без превръщане на подписа в препратка към потребителската страница',
-'tog-externaleditor' => 'Използване на външен редактор по подразбиране (само за експерти, необходими са специални настройки на компютъра.
-[//www.mediawiki.org/wiki/Manual:External_editors Повече информация.])',
-'tog-externaldiff' => 'Използване на външна програма за разлики по подразбиране (само за експерти, необходими са специални настройки на компютъра.
-[//www.mediawiki.org/wiki/Manual:External_editors Повече информация.])',
'tog-showjumplinks' => 'Показване на препратки за достъпност от типа „Към…“',
'tog-uselivepreview' => 'Използване на бърз предварителен преглед (изисква Джаваскрипт; експериментално)',
'tog-forceeditsummary' => 'Предупреждаване при празно поле за резюме на редакцията',
'tog-diffonly' => 'Без показване на съдържанието на страницата при преглед на разлики',
'tog-showhiddencats' => 'Показване на скритите категории',
'tog-norollbackdiff' => 'Пропускане на разликовата връзка след извършване на отмяна на редакции',
+'tog-useeditwarning' => 'Предупреждаване при опит за напускане на страница, отворена в режим на редактиране, без да са запазени промените',
'underline-always' => 'Винаги',
'underline-never' => 'Никога',
'invalid-content-data' => 'Невалидни данни за съдържание',
'content-not-allowed-here' => '
На страницата [[$2]] не е позволено използването на $1',
+'editwarning-warning' => 'Ако излезете от тази страница, може да загубите всички незапазени промени, които сте направили.
+Ако сте влезли в системата, можете да изключите това предупреждение през меню "Редактиране" във вашите лични настройки.',
# Content models
'content-model-wikitext' => 'уикитекст',
'yourpasswordagain' => 'শব্দচাবিটি (password) আবার লিখুন',
'remembermypassword' => 'একাধিক সেশনের জন্য শব্দচাবি মনে রাখা হোক (সর্বোচ্চ $1 {{PLURAL:$1|দিনের|দিনের}} জন্য)',
'userlogin-remembermypassword' => 'আমাকে মনে রাখো',
+'userlogin-signwithsecure' => 'নিরাপদ সার্ভারের মাধ্যমে লগইন করুন',
'securelogin-stick-https' => 'লগইনের পর এইচটিটিপিএস-এর সাথে সংযোগকৃত থাকুন',
'yourdomainname' => 'আপনার ডোমেইন',
'password-change-forbidden' => 'আপনি এই উইকিতে পাসওয়ার্ড পরিবর্তন করতে পারবেন না।',
'userlogout' => 'প্রস্থান',
'notloggedin' => 'আপনি সংযুক্ত নন',
'userlogin-noaccount' => 'কোনও অ্যাকাউন্ট নেই?',
+'userlogin-joinproject' => '{{SITENAME}}য় অংশগ্রহন করুন',
'nologin' => "আপনার কি উইকিপিডিয়াতে অ্যাকাউন্ট নেই? তাহলে '''$1'''।",
'nologinlink' => 'অ্যাকাউন্ট তৈরি করুন',
'createaccount' => 'নতুন অ্যাকাউন্ট খুলুন',
'gotaccountlink' => 'প্রবেশ',
'userlogin-resetlink' => 'আপনার লগইনের বিস্তারিত তথ্যাদি ভুলে গেছেন?',
'helplogin-url' => 'Help:প্রবেশ',
+'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|লগইন সংক্রান্ত সাহায্য]]',
'createaccountmail' => 'একটি র্যান্ডম পাসওয়ার্ড নির্বাচন করুন এবং নিচের নির্ধারিত ইমেইল ঠিকানায় পাঠিয়ে দিন',
'createaccountreason' => 'কারণ:',
'badretype' => "আপনার প্রবেশ করানো শব্দচাবি'টি মিলছেনা।",
'passwordreset-text' => 'আপনার শব্দচাবি বদলের জন্য নিচের ফর্মটি পূরণ করুন।',
'passwordreset-legend' => 'শব্দচাবি রিসেট',
'passwordreset-disabled' => 'এই উইকিতে শব্দচাবি রিসেটের সুবিধা নিষ্ক্রিয় রয়েছে।',
+'passwordreset-emaildisabled' => 'এই উইকিতে ইমেইল অপশনটি বন্ধ করা হয়েছে।',
'passwordreset-pretext' => '{{PLURAL:$1||নিচে উল্লেখিত ডেটাগুলোর কোনো একটি প্রবেশ করান}}',
'passwordreset-username' => 'ব্যবহারকারী নাম:',
'passwordreset-domain' => 'ডোমেইন:',
অস্থায়ী শব্দচাবি: $2',
'passwordreset-emailsent' => 'শব্দচাবি বদলের একটি ই-মেইল পাঠানো হয়েছে।',
'passwordreset-emailsent-capture' => 'স্মরণ করিয়ে দেয়ার জন্য একটি ইমেইল করা হয়েছে, যা নিচে দেখানো হচ্ছে।',
-'passwordreset-emailerror-capture' => 'স্মরণ করিয়ে দেয়ার জন্য একটি ইমেইল তৈরী করা হয়েছিল, যা নিচে দেখানো হচ্ছে, তবে $1 ব্যবহারকারীকে এটি পাঠানো যায়নি!',
+'passwordreset-emailerror-capture' => 'স্মরণ করিয়ে দেয়ার জন্য একটি ইমেইল তৈরী করা হয়েছিল, যা নিচে দেখানো হচ্ছে, তবে $1 {{GENDER:$2|ব্যবহারকারীকে}} এটি পাঠানো যায়নি!',
# Special:ChangeEmail
'changeemail' => 'ই-মেইল ঠিকানা পরিবর্তন',
'powersearch-togglenone' => 'কিছু নয়',
'search-external' => 'বহিঃস্থ অনুসন্ধান',
'searchdisabled' => '{{SITENAME}} অনুসন্ধান এখন নিষ্ক্রিয় আছে। আপনি গুগলের মাধ্যমে অনুসন্ধান চালাতে পারেন। লক্ষ্য করুন যে {{SITENAME}}-এর বিষয়বস্তুর উপর গুগলের ইন্ডেক্সগুলি হালনাগাদ না-ও করা থাকতে পারে।',
+'search-error' => 'অনুসন্ধানের সময় একটি ত্রুটি হয়েছে: $1',
# Preferences page
'preferences' => 'আমার পছন্দ',
'''সতর্কীকরণ!'''
কোন জনপ্রিয় পাতার ক্ষেত্রে এই পরিবর্তনটি খুবই আকস্মিক হতে পারে; অগ্রসর হবার আগে এই কাজটির ফলাফল কী হতে পারে, সে ব্যাপারে অনুগ্রহ করে নিশ্চিত হোন।",
+'movepagetext-noredirectfixer' => "নিচের ফর্মটি ব্যবহার করে একটি পাতার শিরোনাম পরিবর্তন করা যাবে, এবং সেই সাথে নতুন শিরোনামে এর সমগ্র ইতিহাস স্থানান্তর করা যাবে।
+পুরনো শিরোনামটি নতুন শিরোনামটির প্রতি একটি পুনর্নির্দেশনা ধারণ করবে।
+[[Special:DoubleRedirects|দ্বি-পুনর্নির্দেশনা]] বা [[Special:BrokenRedirects|অচল পুনর্নির্দেশনাগুলি]] পরীক্ষা করে দেখতে ভুলবেন না।
+সংযোগগুলি যাতে তাদের লক্ষ্যে পৌঁছায়, তা নিশ্চিত করার দায়িত্ব আপনার।
+
+লক্ষ্য করুন যে যদি নতুন শিরোনামে ইতিমধ্যেই একটি পাতা থেকে থাকে, তবে উৎস পাতাটি সেই শিরোনামে স্থানান্তর করা হবে '''না''', যদি না নতুন শিরোনামের পাতাটি খালি থাকে বা একটি পুননির্দেশনা হয় এবং এর কোন অতীত সম্পাদনা ইতিহাস না থাকে।
+অর্থাৎ আপনি ভুল করে নাম পরিবর্তন করলে সহজেই পুরনো নামে ফেরত যেতে পারবেন, কিন্তু ইতিমধ্যে বিদ্যমান কোন পাতার উপরে লিখতে পারবেন না।
+
+'''সতর্কীকরণ!'''
+কোন জনপ্রিয় পাতার ক্ষেত্রে এই পরিবর্তনটি খুবই আকস্মিক হতে পারে;
+অগ্রসর হবার আগে এই কাজটির ফলাফল কী হতে পারে, সে ব্যাপারে অনুগ্রহ করে নিশ্চিত হোন।",
'movepagetalktext' => "পাতাটির সাথে সাথে সংশ্লিষ্ট আলোচনা পাতাটিও স্বয়ংক্রিয়ভাবে সরানো হবে '''যদি না:'''
*খালি নয় এমন একটি আলাপ পাতা নতুন শিরোনামটির অধীনে ইতিমধ্যেই বিদ্যমান থাকে, অথবা
*আপনি নিচের বাক্সটি থেকে টিক সরিয়ে নিতে পারেন।
* @author Gemmaa
* @author Grondin
* @author Iradigalesc
+ * @author Jmarchn
* @author Jordi Roqué
* @author Juanpabl
* @author Kaganer
'about' => 'Quant a',
'article' => 'Pàgina de contingut',
'newwindow' => '(obre en una nova finestra)',
-'cancel' => 'Cancel·lar',
+'cancel' => 'Cancel·la',
'moredotdotdot' => 'Més...',
'morenotlisted' => 'Més no en la llista...',
'mypage' => 'Pàgina',
'welcomecreation-msg' => 'El vostre compte ha estat creat.
No oblideu de canviar les vostres [[Special:Preferences|preferències de {{SITENAME}}]].',
'yourname' => "Nom d'usuari",
+'userlogin-yourname' => "Nom d'usuari",
+'userlogin-yourname-ph' => "Introduïu el vostre nom d'usuari",
'yourpassword' => 'Contrasenya',
'userlogin-yourpassword' => 'Contrasenya',
'userlogin-yourpassword-ph' => 'Introduïu la vostra contrasenya',
'powersearch-togglenone' => 'Cap',
'search-external' => 'Cerca externa',
'searchdisabled' => 'La cerca dins el projecte {{SITENAME}} està inhabilitada. Mentrestant, podeu cercar a través de Google, però tingueu en compte que la seua base de dades no estarà actualitzada.',
+'search-error' => "S'ha produït un error durant la recerca: $1",
# Preferences page
'preferences' => 'Preferències',
# What links here
'whatlinkshere' => 'Què hi enllaça',
-'whatlinkshere-title' => 'Pàgines que enllacen amb $1',
+'whatlinkshere-title' => 'Pàgines que enllacen amb «$1»',
'whatlinkshere-page' => 'Pàgina:',
'linkshere' => "Les següents pàgines enllacen amb '''[[:$1]]''':",
'nolinkshere' => "Cap pàgina no enllaça amb '''[[:$1]]'''.",
'logentry-delete-revision' => "$1 ha canviat la visibilitat {{PLURAL:$5|d'una revisió|de $5 revisions}} a la pàgina $3: $4",
'logentry-delete-event-legacy' => "$1 ha canviat la visibilitat d'esdeveniments al registre de $3",
'logentry-delete-revision-legacy' => '$1 ha canviat la visibilitat de revisions a la pàgina $3',
-'logentry-suppress-delete' => '$1 ha suprimit $3',
+'logentry-suppress-delete' => '$1 {{GENDER:$2|ha suprimit}} la pàgina $3',
'logentry-suppress-event' => "$1 secretament ha canviat la visibilitat {{PLURAL:$5|d'un esdeveniment al registre|de $5 esdeveniments al registre}} de $3: $4",
'logentry-suppress-revision' => "$1 secretament ha canviat la visibilitat {{PLURAL:$5|d'una revisió|de $5 revisions}} a la pàgina $3: $4",
'logentry-suppress-event-legacy' => "$1 secretament ha canviat la visibilitat d'esdeveniments al registre de $3",
* @author Girdi
* @author Mega programmer
* @author Sasan700
+ * @author Умар
*/
$fallback = 'ru';
'tog-extendwatchlist' => 'Шорбина тlехьажарна могlам, ша беригге а хийцамаш чубогlуш, тlяхьабина боцурш а',
'tog-usenewrc' => 'Лелабе дика могlам керла чу хийцамашна (оьшу JavaScript)',
'tog-numberheadings' => 'Ша шех хlитто терахь корташна',
-'tog-showtoolbar' => 'Ð\93айÑ\82а лакÑ\85аÑ\80а гlиÑ\80Ñ\81ан дакÑ\8aа ниÑ\81йеÑ\88 аÑ\82Ñ\82он оÑ\86 Ñ\80едаккÑ\85ар чохь (JavaScript)',
+'tog-showtoolbar' => 'Ð\93айÑ\82а лакÑ\85аÑ\80а гlиÑ\80Ñ\81ан дакÑ\8aа ниÑ\81йеÑ\88 аÑ\82Ñ\82он оÑ\86 Ñ\82адар чохь (JavaScript)',
'tog-editondblclick' => 'Нисйе агlонаш шозза тlетаlийча (JavaScript)',
'tog-editsection' => 'Гайта хьажориг «нисйе» аьлла хlора агlона',
'tog-editsectiononrightclick' => 'Нисде дакъа шозза бакъехьар дахка тlетаlийча оцу кортан (JavaScript)',
'tog-shownumberswatching' => 'Гайта декъашхойн терахь, агlо латийна болу шай тергаме могlам юкъа',
'tog-oldsig' => 'Хьалххьажар долучу куьгтаlорна:',
'tog-fancysig' => 'Шен вики-къастаман куьгтаlдар (ша шех хьажориг йоцуш)',
-'tog-externaleditor' => 'Лелайан арахьара рéдаккхар (гlулкхдириг леррина нисйина хила йеза, [//www.mediawiki.org/wiki/Manual:External_editors кхин дlа.])',
-'tog-externaldiff' => 'Лелабан арахьара диллагlарам башхо тарйо гlирс (гlулкхдириг леррина нисйина хила йеза, [//www.mediawiki.org/wiki/Manual:External_editors кхин дlа.])',
'tog-showjumplinks' => 'Латайе гlодарна хьажоригаш «дехьа вала оцу»',
'tog-uselivepreview' => 'Лелайа чехка хьалха хьажа (JavaScript, муха ю хьажарна)',
'tog-forceeditsummary' => 'Дага даийта, нагахь нисйарх лаьцна чохь язъйина язахь',
'thu' => 'Еа',
'fri' => 'Пle',
'sat' => 'Шот',
-'january' => 'нажи бутт',
-'february' => 'мархи бутт',
-'march' => 'биÑ\8dкаÑ\80г бÑ\83Ñ\82т',
-'april' => 'тушоли бутт',
-'may_long' => 'сели бутт',
-'june' => 'мангал бÑ\83Ñ\82Ñ\82',
-'july' => 'мÑ\8fÑ\82Ñ\81ел бÑ\83Ñ\82Ñ\82',
-'august' => 'эгиш бутт',
-'september' => 'Ñ\82ав бÑ\83Ñ\82Ñ\82',
-'october' => 'аÑ\80даÑ\80 бÑ\83Ñ\82Ñ\82',
-'november' => 'эрх бутт',
-'december' => 'огой бÑ\83Ñ\82Ñ\82',
-'january-gen' => 'нажи бутт',
-'february-gen' => 'мархи бутт',
-'march-gen' => 'биÑ\8dкаÑ\80г бÑ\83Ñ\82т',
-'april-gen' => 'тушоли бутт',
-'may-gen' => 'сели бутт',
-'june-gen' => 'мангал бÑ\83Ñ\82Ñ\82',
-'july-gen' => 'мÑ\8fÑ\82Ñ\81ел бÑ\83Ñ\82Ñ\82',
-'august-gen' => 'эгиш бутт',
-'september-gen' => 'Ñ\82ав бÑ\83Ñ\82Ñ\82',
-'october-gen' => 'аÑ\80даÑ\80 бÑ\83Ñ\82Ñ\82',
-'november-gen' => 'эрх бутт',
-'december-gen' => 'огой бÑ\83Ñ\82Ñ\82',
-'jan' => 'нажи бутт',
-'feb' => 'мархи бутт',
-'mar' => 'биÑ\8dкаÑ\80г бÑ\83Ñ\82т',
-'apr' => 'тушоли бутт',
-'may' => 'сели бутт',
-'jun' => 'мангал бÑ\83Ñ\82Ñ\82',
-'jul' => 'мÑ\8fÑ\82Ñ\81ел бÑ\83Ñ\82Ñ\82',
-'aug' => 'эгиш бутт',
-'sep' => 'Ñ\82ав бÑ\83Ñ\82Ñ\82',
-'oct' => 'аÑ\80даÑ\80 бÑ\83Ñ\82Ñ\82',
-'nov' => 'эрх бутт',
-'dec' => 'огой бÑ\83Ñ\82Ñ\82',
+'january' => 'январь',
+'february' => 'февраль',
+'march' => 'маÑ\80т',
+'april' => 'апрель',
+'may_long' => 'май',
+'june' => 'иÑ\8eнÑ\8c',
+'july' => 'иÑ\8eлÑ\8c',
+'august' => 'август',
+'september' => 'Ñ\81енÑ\82Ñ\8fбÑ\80Ñ\8c',
+'october' => 'окÑ\82Ñ\8fбÑ\80Ñ\8c',
+'november' => 'ноябрь',
+'december' => 'декабÑ\80Ñ\8c',
+'january-gen' => 'январь',
+'february-gen' => 'февраль',
+'march-gen' => 'маÑ\80т',
+'april-gen' => 'апрель',
+'may-gen' => 'май',
+'june-gen' => 'иÑ\8eнÑ\8c',
+'july-gen' => 'иÑ\8eлÑ\8c',
+'august-gen' => 'август',
+'september-gen' => 'Ñ\81енÑ\82Ñ\8fбÑ\80Ñ\8c',
+'october-gen' => 'окÑ\82Ñ\8fбÑ\80Ñ\8c',
+'november-gen' => 'ноябрь',
+'december-gen' => 'декабÑ\80Ñ\8c',
+'jan' => 'январь',
+'feb' => 'февраль',
+'mar' => 'маÑ\80т',
+'apr' => 'апрель',
+'may' => 'май',
+'jun' => 'иÑ\8eнÑ\8c',
+'jul' => 'иÑ\8eлÑ\8c',
+'aug' => 'август',
+'sep' => 'Ñ\81енÑ\82Ñ\8fбÑ\80Ñ\8c',
+'oct' => 'окÑ\82Ñ\8fбÑ\80Ñ\8c',
+'nov' => 'ноябрь',
+'dec' => 'декабÑ\80Ñ\8c',
# Categories related messages
-'pagecategories' => '{{PLURAL:$1|Кадегар|Кадегарш}}',
-'category_header' => 'Агlонаш оц кадегаршчохь «$1»',
-'subcategories' => 'Бухаркадегарш',
-'category-media-header' => 'Хlумнаш оцу кадегар чохь «$1»',
-'category-empty' => "''Хlара кадегар хlинца йаьсса ю.''",
-'hidden-categories' => '{{PLURAL:$1|Къайлаха кадегар|Къайлаха йолу кадегарш}}',
-'hidden-category-category' => 'Къайлаха йолу кадегарш',
-'category-subcat-count' => '{{PLURAL:$2|Хlокх кадегар чохь ю хlокхуьна бухар кадегар.|{{PLURAL:$1|Гойташ $1 бухар кадегар|Гойту $1 бухар кадегар|Гойту $1 бухар кадегар}} оцу $2.}}',
-'category-subcat-count-limited' => 'Хlокх кадегар чохь {{PLURAL:$1|$1 бухар кадегар|$1 бухар кадегарша|$1 бухар кадегарш}}.',
-'category-article-count' => '{{PLURAL:$2|Хlокх кадегар чохь яц цхьа агlо бе.|{{PLURAL:$1|Гойташ $1 агlо|Гойту $1 агlонаш|Гойту $1 агlонаш}} хlокх кадегарца кху $2.}}',
-'category-article-count-limited' => 'Хlокх кадегар чохь {{PLURAL:$1|$1 агlо|$1 агlонаш|$1 агlонаш}}.',
-'category-file-count' => '{{PLURAL:$2|Хlокх кадегар чохь цхьа хlум бе яц.|{{PLURAL:$1|Гойта $1 хlум|Гойту $1 хlума|Гойту $1 хlумнаш}} хlокх кадегарца кху $2.}}',
-'category-file-count-limited' => 'Хlокх кадегар чохь {{PLURAL:$1|$1 хlум|$1 хlума|$1 хlумнаш}}.',
+'pagecategories' => '{{PLURAL:$1|Категори|Категореш}}',
+'category_header' => 'Агlонаш оц категоречохь «$1»',
+'subcategories' => 'Бухаркатегореш',
+'category-media-header' => 'ХӀумнаш оцу категори чохь «$1»',
+'category-empty' => "''ХӀара категори хӀинца йаьсса ю.''",
+'hidden-categories' => '{{PLURAL:$1|Къайлаха категори|Къайлаха йолу категореш}}',
+'hidden-category-category' => 'Къайлаха йолу категореш',
+'category-subcat-count' => '{{PLURAL:$2|ХӀокх категори чохь ю хӀокхуьна бухар категори.|{{PLURAL:$1|Гойташ $1 бухар категори|Гойту $1 бухар категори|Гойту $1 бухар категори}} оцу $2.}}',
+'category-subcat-count-limited' => 'Хlокх категори чохь {{PLURAL:$1|$1 бухар категори|$1 бухар категореша|$1 бухар категореш}}.',
+'category-article-count' => '{{PLURAL:$2|ХӀокх категори чохь яц цхьа агӀо бе.|{{PLURAL:$1|Гойташ $1 агlо|Гойту $1 агӀонаш|Гойту $1 агӀонаш}} хӀокх категорешца кху $2.}}',
+'category-article-count-limited' => 'Хlокх категори чохь {{PLURAL:$1|$1 агlо|$1 агlонаш|$1 агlонаш}}.',
+'category-file-count' => '{{PLURAL:$2|ХӀокх категори чохь цхьа хӀум бе яц.|{{PLURAL:$1|Гойта $1 хӀум|Гойту $1 хlума|Гойту $1 хlумнаш}} хlокх категорешца кху $2.}}',
+'category-file-count-limited' => 'ХӀокх категори чохь {{PLURAL:$1|$1 файл|$1 хӀума|$1 файлаш}}.',
'listingcontinuesabbrev' => '(кхин дlа)',
'index-category' => 'Меттигтерахьйо агlонаш',
-'noindex-category' => 'Дlахьушйоцу агlонаш',
+'noindex-category' => 'ДӀахьушйоцу агӀонаш',
'linkprefix' => '/^(.*?)([a-zA-Z\\x80-\\xff]+)$/sD',
'article' => 'Яззам',
'newwindow' => '(керлачу корехь)',
'cancel' => 'Цаоьшу',
-'moredotdotdot' => 'Кхин дlа…',
-'mypage' => 'Долахь йолу агlо',
-'mytalk' => 'Сан дийцаре агlо',
-'anontalk' => 'Дийцаре хlара IP-долуметтиг',
+'moredotdotdot' => 'Кхин дӀа…',
+'mypage' => 'Долахь йолу агӀо',
+'mytalk' => 'Сан дийцаре агӀо',
+'anontalk' => 'Дийцаре хӀара IP-долуметтиг',
'navigation' => 'Шавигар',
'and' => ' а',
'vector-simplesearch-preference' => 'Шуьйра лахаран хьехар лата де (декъа «Хьушйерг» кечйарца)',
'vector-view-create' => 'Кхоллар',
'vector-view-edit' => 'Нисйé',
-'vector-view-history' => 'Ð¥Ñ\8cажа иÑ\81Ñ\82оÑ\80е',
+'vector-view-history' => 'Ð¥Ñ\8cажа иÑ\81Ñ\82оÑ\80и',
'vector-view-view' => 'Éшар',
'vector-view-viewsource' => 'Билглонашка хьажа',
'actions' => 'Дийраш',
'searchbutton' => 'Лаха',
'go' => 'Дехьа вала',
'searcharticle' => 'Дехьа вала',
-'history' => 'Ð\98Ñ\81Ñ\82оÑ\80е',
-'history_short' => 'Ð\98Ñ\81Ñ\82оÑ\80е',
+'history' => 'Ð\98Ñ\81Ñ\82оÑ\80и',
+'history_short' => 'Ð\98Ñ\81Ñ\82оÑ\80и',
'updatedmarker' => 'Керла яккхина со чуваьллачултlаьхьа',
'printableversion' => 'Зорба туху варси',
'permalink' => 'Даиман йолу хьажориг',
'nstab-user' => 'Декъашхо',
'nstab-special' => 'Белха агlо',
'nstab-project' => 'Кхолламех',
-'nstab-image' => 'Ð¥lÑ\83м',
+'nstab-image' => 'Файл',
'nstab-mediawiki' => 'Хаам',
-'nstab-template' => 'Куцкеп',
+'nstab-template' => 'Кеп',
'nstab-help' => 'Нисвохаам',
-'nstab-category' => 'Кадегар',
+'nstab-category' => 'Категори',
# Main script and global functions
'nosuchaction' => 'Ишта дийриг дац',
'nowiki_sample' => 'Чудиллийша кхузе барамхlоттонза йоза.',
'nowiki_tip' => 'Тергал ца бо вики-бáрамхlоттор',
'image_sample' => 'Example.jpg',
-'image_tip' => 'ЧоÑ\85Ñ\8c йолÑ\83 Ñ\85lÑ\83м',
+'image_tip' => 'ЧоÑ\85Ñ\8c йолÑ\83 Ñ\84айл',
'media_sample' => 'Example.ogg',
'media_tip' => 'Хьажориг оцу медиа-хlуман',
'sig_tip' => 'Хьан куьгтаlор аъ хlоттина хан',
'preview' => 'Хьалха муха ю хьажа',
'showpreview' => 'Хьалха муха ю хьажар',
'showdiff' => 'Хlоттина болу хийцам',
-'anoneditwarning' => "'''ТеÑ\80гам бе''': Ð\90Ñ\85Ñ\8cа Ñ\85Ñ\8cо вовзиÑ\82ина ваÑ\86 гlиÑ\80Ñ\81ан. Ð¥Ñ\8cан IP-долÑ\83 меÑ\82Ñ\82иг дlаÑ\8fзйина Ñ\85иÑ\80а Ñ\8e Ñ\85lокÑ\85Ñ\83 агlон иÑ\81Ñ\82оÑ\80е чу.",
+'anoneditwarning' => "'''ТеÑ\80гам бе''': Ð\90Ñ\85Ñ\8cа Ñ\85Ñ\8cо вовзиÑ\82ина ваÑ\86 гlиÑ\80Ñ\81ан. Ð¥Ñ\8cан IP-долÑ\83 меÑ\82Ñ\82иг дlаÑ\8fзйина Ñ\85иÑ\80а Ñ\8e Ñ\85lокÑ\85Ñ\83 агlон иÑ\81Ñ\82оÑ\80и чу.",
'summary-preview' => 'Цуьнах лаьцна хирду:',
'blockedtitle' => 'Декъашхо сацийна',
'accmailtitle' => 'Ишар дlаяхьийтина.',
'updated' => '(Карла йаькхина)',
'note' => "'''Билгалдаккхар:'''",
'previewnote' => "'''Хlара хьалх хьажар ду, йоза хlинца язданза ду!'''",
-'editing' => 'РедаккÑ\85ар: $1',
-'editingsection' => 'РедаккÑ\85ар $1 (даакъа)',
-'editingcomment' => 'РедаккÑ\85ар $1 (керла даакъа)',
+'editing' => 'Тадар: $1',
+'editingsection' => 'Тадар $1 (даакъа)',
+'editingcomment' => 'Тадар $1 (керла даакъа)',
'editconflict' => 'Редаккхарна дойнаш: $1',
'yourtext' => 'Хьан йоза',
'yourdiff' => 'Башхаллаш',
'protectedpagewarning' => "'''Дlахьедар. Хlара агlо гlаролла дина ю хийцам цабайта, иза хийца йа нисйа а бакъо йолуш адаманкуьйгалла лелош болу декъашхой бе бац.'''
Лахахьа гойту хаамаш тlаьхьара бина болу хийцамна тептар чура:",
'cascadeprotectedwarning' => "'''Дlахьедар:''' Хlокху агlонна редаккха бакъо йолуш хlара тоба йу «Адаманкуьйгалхой», хlунда аьлча иза латийна {{PLURAL:$1|кхечу агlонца|кхечу агlонашца}} хlоттделлачу гlароллийца:",
-'templatesused' => '{{PLURAL:$1|Куцкеп, лелийна|Куцкепаш, лелош ду}} хlокху агlон башхонца:',
-'templatesusedpreview' => '{{PLURAL:$1|Куцкеп, лелошдолу|Куцкепаш, лелошдолу}} оцу хьалх хьожучу агlонца:',
+'templatesused' => '{{PLURAL:$1|Кеп, лелийна|Кепаш, лелош ду}} хlокху агlон башхонца:',
+'templatesusedpreview' => '{{PLURAL:$1|Кеп, лелошдолу|Кепаш, лелошдолу}} оцу хьалх хьожучу агlонца:',
'template-protected' => '(гlароллийца)',
'template-semiprotected' => '(дуьззина доцуш гlаролла)',
'hiddencategories' => 'Хlара агlо чуйогlуш ю оцу $1 {{PLURAL:$1|къайлаха кадегарчу|къайлаха кадегаршчу|къайлаха кадегаршчу}}:',
# Parser/template warnings
'parser-template-loop-warning' => 'Карийна куцкепаш юкъахь хилла шад: [[$1]]',
-'parser-template-recursion-depth-warning' => 'Дозанал хьалаваьлла кlоргенца йух йуха дина куцкеп ($1)',
+'parser-template-recursion-depth-warning' => 'Дозанал хьалаваьлла кlоргенца йух йуха дина кеп ($1)',
# "Undo" feature
'undo-success' => 'Нисйинарг а тlе цалаца мега. Дехар до, хьажа цхьатерра йуй башхо, тешна хила, баккъалла иза хийцам буйте хьуна безарг, тlакха тlе таlайе «дlайазйе агlо», хийцам хlотта ба.',
'page_last' => 'тlаьххьара',
'histlegend' => "Кхетор: (хlинцлера.) — йолучу башхон къастам; (хьалх.) — хьалхлерачу башхон къастам; '''ж''' — жимо бозалца болу хийцам.",
'history-fieldset-title' => 'Хьажа исцlарерачу',
-'histfirst' => 'къена',
-'histlast' => 'Ñ\85Ñ\8cалÑ\85о',
+'histfirst' => 'ширниш',
+'histlast' => 'Ñ\85Ñ\8cалÑ\85аÑ\80ниÑ\88',
'historyempty' => '(йаьсса)',
# Revision feed
'revertmerge' => 'Йекъа',
# Diffs
-'history-title' => '$1 â\80\94 Ñ\85ийÑ\86аман иÑ\81Ñ\82оÑ\80е',
+'history-title' => '$1 â\80\94 Ñ\85ийÑ\86аман иÑ\81Ñ\82оÑ\80и',
'lineno' => 'Могlа $1:',
'compareselectedversions' => 'Хаьржиначуьна башхо муха ю хьажа',
'showhideselectedversions' => 'Гайта/къайлайаха хаьржина башхонаш',
'prefs-resetpass' => 'Хийца ишар',
'prefs-rendering' => 'Арахьара хатl',
'saveprefs' => 'lалашдан',
-'prefs-editing' => 'РедаккÑ\85ар',
+'prefs-editing' => 'Тадар',
'searchresultshead' => 'Лаха',
'timezonelegend' => 'Сахьатан аса:',
'prefs-searchoptions' => 'Лахарна гlирс нисба',
'rcshowhidemine' => '$1 айхьа нисдинарш',
'rclinks' => 'Гайта тlаьхьара $1 хийцамаш оцу $2 ден<br />$3',
'diff' => 'тейп тайпнара',
-'hist' => 'иÑ\81Ñ\82оÑ\80е',
+'hist' => 'иÑ\81Ñ\82оÑ\80и',
'hide' => 'Къайлаяккха',
'show' => 'Гайта',
'minoreditletter' => 'ж',
'recentchangeslinked-to' => 'Кхечу агlор, гайта хийцамаш агlонашца, хlоттийначу агlонтlе хьажориг йолуш',
# Upload
-'upload' => 'ЧÑ\83йаккÑ\85а Ñ\85lÑ\83м',
-'uploadbtn' => 'ЧÑ\83йаккÑ\85а Ñ\85lÑ\83м',
+'upload' => 'ЧÑ\83йаккÑ\85а Ñ\84айл',
+'uploadbtn' => 'ЧÑ\83йаккÑ\85а Ñ\84айл',
'uploadlogpage' => 'Чуйахаран тéптар',
'uploadlogpagetext' => 'Лахахьа гойтуш бу могlам тlаьххьара чуяхна хlумнаши. Ишта хьажа. [[Special:ImageList|хlумнаши могlам]] йа [[Special:NewImages|галеларе хlумнаши]].',
'filename' => 'Хlуман цlе',
# Special:ListFiles
'listfiles_search_for' => 'Лаха хIуман цIарца:',
-'imgfile' => 'Ñ\85lÑ\83м',
+'imgfile' => 'Ñ\84айл',
'listfiles' => 'Хlумнаши могlам',
'listfiles_name' => 'Хlуман цlе',
'listfiles_user' => 'Декъашхо',
'listfiles_description' => 'Цуьнах лаьцна',
# File description page
-'file-anchor-link' => ' Хlум',
-'filehist' => 'Ð¥lÑ\83ман иÑ\81Ñ\82оÑ\80е',
-'filehist-help' => 'ТlеÑ\82аlаде Ñ\82еÑ\80аÑ\85Ñ\8c/Ñ\85ан, мÑ\83Ñ\85а Ñ\85илла Ñ\85Ñ\8cажаÑ\80на и Ñ\85lÑ\83м.',
+'file-anchor-link' => 'Файл',
+'filehist' => 'Файлан иÑ\81Ñ\82оÑ\80и',
+'filehist-help' => 'ТlеÑ\82аlаде Ñ\82еÑ\80аÑ\85Ñ\8c/Ñ\85ан, мÑ\83Ñ\85а Ñ\85илла Ñ\85Ñ\8cажаÑ\80на и Ñ\84айл.',
'filehist-deleteall' => 'дlадайá массо',
'filehist-deleteone' => 'дlадайá',
'filehist-current' => 'карара',
'filerevert-submit' => 'Юхаяккха',
# File deletion
-'filedelete-legend' => 'Ð\94lайайá и Ñ\85lÑ\83м',
+'filedelete-legend' => 'Ð\94lайайá и Ñ\84айл',
'filedelete-submit' => 'Дlадайá',
'filedelete-otherreason' => 'Кхин бахьан:',
'filedelete-reason-otherlist' => 'Кхин бахьан',
# Miscellaneous special pages
'nbytes' => '$1 {{PLURAL:$1|цlинцl|цlинцlа|цlинацl}}',
-'ncategories' => '$1 {{PLURAL:$1|кадегар|кадегарш|кадегарш}}',
-'nmembers' => '$1 {{PLURAL:$1|Ñ\85lÑ\83м|Ñ\85lÑ\83ма|Ñ\85lÑ\83мнаш}}',
+'ncategories' => '$1 {{PLURAL:$1|категори|категореш|категореш}}',
+'nmembers' => '$1 {{PLURAL:$1|Ñ\84айл|Ñ\84айлана|Ñ\84айлаш}}',
'specialpage-empty' => 'Дехаро хlумма ца елла.',
'lonelypages' => 'Байлахь йисина агIонаш',
-'uncategorizedpages' => 'Кадегар йоцу агIонаш',
-'uncategorizedcategories' => 'Кадегар йоцу кадегарш',
-'uncategorizedimages' => 'Кадегар йоцу хIумнаш',
-'uncategorizedtemplates' => 'Кадегар йоцу куцкепаш',
+'uncategorizedpages' => 'Категори йоцу агIонаш',
+'uncategorizedcategories' => 'Категори йоцу категореш',
+'uncategorizedimages' => 'Категори йоцу хIумнаш',
+'uncategorizedtemplates' => 'Категори йоцу кепаш',
'unusedcategories' => 'Йаьсса кадегарш',
'wantedcategories' => 'Оьшуш йолу кадегарш',
'wantedpages' => 'Оьшуш йолу агIонаш',
'listusers' => 'Декъашхой могlам',
'newpages' => 'Керла агlонаш',
'newpages-username' => 'Декъашхо:',
-'ancientpages' => 'ЯззамаÑ\88 оÑ\86Ñ\83 Ñ\82еÑ\80аÑ\85Ñ\8cÑ\86а Ñ\82Ñ\8fÑ\85Ñ\85Ñ\8cаÑ\80а Ñ\80едаккÑ\85ар дина долу',
+'ancientpages' => 'ЯззамаÑ\88 оÑ\86Ñ\83 Ñ\82еÑ\80аÑ\85Ñ\8cÑ\86а Ñ\82Ñ\8fÑ\85Ñ\85Ñ\8cаÑ\80а Ñ\82адар дина долу',
'move' => 'Цlе хийца',
'movethispage' => 'Хlокху агlон цlе хийца',
'unusedimagestext' => 'Дехар до, тидаме эца, кхин йолу дуьнана машан-меттигаш а лелош хила мега нисса йогlу хьажориг (URL) хlокху хlуман, хlокху могlаме йогlуш ялахь яцахь а иза хила мега жигара лелош.',
'pager-newer-n' => '{{PLURAL:$1|алсамо керла|алсамо керланаш|алсамо керлачарех}} $1',
-'pager-older-n' => '{{PLURAL:$1|алсамо къена|алсамо къенанаш|алсамо къеначарех}} $1',
+'pager-older-n' => '{{PLURAL:$1|алсамо шира|алсамо ширниш|алсамо ширачарех}} $1',
# Book sources
'booksources' => 'Жайнан хьосташ',
# Special:ListUsers
'listusers-submit' => 'Гайта',
-# Special:ActiveUsers
-'activeusers' => 'Жигар декъашхой могlам',
-
# Special:ListGroupRights
'listgrouprights' => 'Декъашхойн тобанаши бакъонаш',
'listgrouprights-group' => 'Тоба',
'listgrouprights-helppage' => 'Help:Тобан бакъонаш',
'listgrouprights-members' => '(тобан могlам)',
-# E-mail user
+# Email user
'emailuser' => 'Декъашхочун хааман кехат',
'defemailsubject' => 'Хаам {{grammar:genitive|{{SITENAME}}}} чура бу',
'emailmessage' => 'Хаам:',
'exbeforeblank' => 'чуьраниг дlацlанйале хьалха: «$1»',
'exblank' => 'агlо йаьсса йара',
'delete-legend' => 'Дlадайáр',
-'confirmdeletetext' => 'Ð¥Ñ\8cан деÑ\85аÑ\80 дÑ\83 Ñ\85lаÑ\80а агlо Ñ\88е бÑ\83Ñ\85Ñ\86и дlабайа аÑ\8cлла (йа Ñ\81Ñ\83Ñ\80Ñ\82) а маÑ\81Ñ\81о Ñ\86Ñ\83Ñ\8cнан иÑ\81Ñ\82оÑ\80е оцу бух чура. Дехар до, бакъде, билгала хьайна иза лаахь, кхеташ хира ву хьо тlаьхьа хир долу чун, иза деш ду ахьа бакъонца догlуш, вахьа дехкина долучу дакъанца [[{{MediaWiki:Policy-url}}]].',
+'confirmdeletetext' => 'Ð¥Ñ\8cан деÑ\85аÑ\80 дÑ\83 Ñ\85lаÑ\80а агlо Ñ\88е бÑ\83Ñ\85Ñ\86и дlабайа аÑ\8cлла (йа Ñ\81Ñ\83Ñ\80Ñ\82) а маÑ\81Ñ\81о Ñ\86Ñ\83Ñ\8cнан иÑ\81Ñ\82оÑ\80и оцу бух чура. Дехар до, бакъде, билгала хьайна иза лаахь, кхеташ хира ву хьо тlаьхьа хир долу чун, иза деш ду ахьа бакъонца догlуш, вахьа дехкина долучу дакъанца [[{{MediaWiki:Policy-url}}]].',
'actioncomplete' => 'Дешдерг кхочушди',
'deletedtext' => '«$1» дlаяккхина йара.
Хьажа. $2 хьажарна оцу тlаьхьара дlадайаран могlаме.',
Нагахь ахьа иза цадинехь, дехар до, хьажа йуйла [[Special:DoubleRedirects|шалгlа]] а [[Special:BrokenRedirects|хадийначу дlасахьажориш]].
Ахьа жоп лур ду кхин дlа а хьажориг хьажийна хилийта, хила йезаче.
-ТеÑ\80гамбеÑ\88 Ñ\85ила, иза агlо '''Ñ\85иÑ\80а Ñ\8fÑ\86''' Ñ\86lе Ñ\85ийÑ\86ина, нагаÑ\85Ñ\8c иза Ñ\86lе йолÑ\83Ñ\88 кеÑ\80ла агlо йалаÑ\85Ñ\8c, Ñ\86Ñ\85Ñ\8cа йолÑ\83 Ñ\85енаÑ\85Ñ\8c, нагаÑ\85Ñ\8c иза йалаÑ\85Ñ\8c Ñ\86Ñ\85Ñ\8cан Ñ\82lе Ñ\85Ñ\8cажийна йа йаÑ\8cÑ\81Ñ\81а а ниÑ\81йаÑ\80Ñ\86а иÑ\81Ñ\82оÑ\80е йоцуш.
+ТеÑ\80гамбеÑ\88 Ñ\85ила, иза агlо '''Ñ\85иÑ\80а Ñ\8fÑ\86''' Ñ\86lе Ñ\85ийÑ\86ина, нагаÑ\85Ñ\8c иза Ñ\86lе йолÑ\83Ñ\88 кеÑ\80ла агlо йалаÑ\85Ñ\8c, Ñ\86Ñ\85Ñ\8cа йолÑ\83 Ñ\85енаÑ\85Ñ\8c, нагаÑ\85Ñ\8c иза йалаÑ\85Ñ\8c Ñ\86Ñ\85Ñ\8cан Ñ\82lе Ñ\85Ñ\8cажийна йа йаÑ\8cÑ\81Ñ\81а а ниÑ\81йаÑ\80Ñ\86а иÑ\81Ñ\82оÑ\80и йоцуш.
Иза бохург ду, хьега хийцалур ю оцу агlон цlе оцу цlарца, хlинц цуьна хилла йолу, нагахь ахьа гlалатонца цlе хийцанехь, йолуш йолу агlо цахууш йа мега хьа.
'''ДlАХЬЕДАР!'''
'export' => 'Яззамаш кхечу меттиган арадахар',
'exporttext' => 'Шуьга далур ду кхечу меттера чудахарш, йоза а хийцаме тептарш билгалла йолу агlонаш йа гулдина йолу агlонаш хlокх XML барамца, йуха тlяхьа чура [[Special:Import|хьаэцалурдолш]] кхечу вики-хьалхен, болх беш йолу хlокху MediaWiki гlирсаца.
-Ð\9aÑ\85еÑ\87Ñ\83 меÑ\82Ñ\82еÑ\80а Ñ\8fззамаÑ\88 Ñ\87Ñ\83йаÑ\85а, Ñ\87Ñ\83Ñ\8fзйе Ñ\86lе Ñ\80едокÑ\85Ñ\87Ñ\83 меÑ\82Ñ\82е, Ñ\86lÑ\85Ñ\8cа могlан Ñ\86lе могlаÑ\80Ñ\88каÑ\85Ñ\8c, йÑ\83Ñ\85а Ñ\85аÑ\80жа лаÑ\8cи Ñ\88Ñ\83на Ð\9aÑ\85еÑ\87Ñ\83 меÑ\82Ñ\82еÑ\80 Ñ\87Ñ\83йаÑ\85а маÑ\81Ñ\81о Ñ\8fззамаÑ\88на иÑ\81Ñ\82оÑ\80е хийцамбарш йа тlяхьаралера яззамна башхо.
+Ð\9aÑ\85еÑ\87Ñ\83 меÑ\82Ñ\82еÑ\80а Ñ\8fззамаÑ\88 Ñ\87Ñ\83йаÑ\85а, Ñ\87Ñ\83Ñ\8fзйе Ñ\86lе Ñ\80едокÑ\85Ñ\87Ñ\83 меÑ\82Ñ\82е, Ñ\86lÑ\85Ñ\8cа могlан Ñ\86lе могlаÑ\80Ñ\88каÑ\85Ñ\8c, йÑ\83Ñ\85а Ñ\85аÑ\80жа лаÑ\8cи Ñ\88Ñ\83на Ð\9aÑ\85еÑ\87Ñ\83 меÑ\82Ñ\82еÑ\80 Ñ\87Ñ\83йаÑ\85а маÑ\81Ñ\81о Ñ\8fззамаÑ\88на иÑ\81Ñ\82оÑ\80и хийцамбарш йа тlяхьаралера яззамна башхо.
Шуьга кхи даландерг, лелаеш йолу меттиг къастаман машан хьажориг кхечу меттер чудаха тlяхьарлера башхон яззамаш. Массала оцу яззамна [[{{MediaWiki:Mainpage}}]] хlара хира йу хьажориг [[{{#Special:Export}}/{{MediaWiki:Mainpage}}]].',
'export-templates' => 'Латадé куцкепаш',
'tooltip-t-permalink' => 'Даимна йолу хьажориг хlокху башха агlонна',
'tooltip-ca-nstab-main' => 'Яззамна чулацам',
'tooltip-ca-nstab-user' => 'Хlора декъашхон долахь йолу агlо',
-'tooltip-ca-nstab-media' => 'Ð\9cедиа-Ñ\85lÑ\83м',
+'tooltip-ca-nstab-media' => 'Ð\9cедиа-Ñ\84айл',
'tooltip-ca-nstab-special' => 'Хlара белха агlо йу, хlара рéдаккхалуш яц',
'tooltip-ca-nstab-project' => 'Кхолламан дакъа',
'tooltip-ca-nstab-image' => 'Хlуман агlо',
# Spam protection
'spamprotectiontitle' => 'Совбиларна литтар',
-# Skin names
-'skinname-standard' => 'Лела ма ярра',
-
# Browsing diffs
'previousdiff' => '← Хьалхдоьда нисдинарг',
'nextdiff' => 'Тlяхьа догlа нисдинарг →',
# Special:FilePath
'filepath' => 'ХIуман тIе болу некъ',
-'filepath-page' => 'Ð¥lÑ\83м:',
+'filepath-page' => 'Файл:',
'filepath-submit' => 'Дехьавала',
# Special:FileDuplicateSearch
'hijri-calendar-m3' => 'ڕەبیعەلئەووەڵ',
'hijri-calendar-m4' => 'ڕەبیعەلئاخیر',
'hijri-calendar-m5' => 'جومادەلئوولا',
-'hijri-calendar-m6' => 'جومادەسسانی',
+'hijri-calendar-m6' => 'جومادەلئاخیر',
'hijri-calendar-m7' => 'ڕەجەب',
'hijri-calendar-m8' => 'شەعبان',
'hijri-calendar-m9' => 'ڕەمەزان',
'nov' => '11.',
'dec' => '12.',
+'monday-at' => 'v pondělí v $1',
+'tuesday-at' => 'v úterý v $1',
+'wednesday-at' => 've středu v $1',
+'thursday-at' => 've čtvrtek v $1',
+'friday-at' => 'v pátek v $1',
+'saturday-at' => 'v sobotu v $1',
+'sunday-at' => 'v neděli v $1',
+'today-at' => '$1',
+'yesterday-at' => 'včera v $1',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|Kategorie|Kategorie|Kategorie}}',
'category_header' => 'Stránky v kategorii „$1“',
'userlogin-yourpassword-ph' => 'Zadejte své heslo',
'yourpasswordagain' => 'Zopakujte heslo:',
'remembermypassword' => 'Zapamatovat si mé přihlášení na tomto počítači (maximálně $1 {{PLURAL:$1|den|dny|dní}})',
+'userlogin-remembermypassword' => 'Zapamatovat si mě',
'userlogin-signwithsecure' => 'Přihlášení na zabezpečený server',
'securelogin-stick-https' => 'Zůstat po přihlášení připojen přes HTTPS',
'yourdomainname' => 'Vaše doména',
'userlogout' => 'Odhlášení',
'notloggedin' => 'Nejste přihlášen(a)',
'userlogin-noaccount' => 'Nemáte účet?',
+'userlogin-joinproject' => 'Přidejte se k {{grammar:3sg|{{SITENAME}}}}',
'nologin' => "Dosud nemáte účet? '''$1'''.",
'nologinlink' => 'Zaregistrujte se',
'createaccount' => 'Vytvořit účet',
Dočasné heslo: $2',
'passwordreset-emailsent' => 'E-mail pro získání nového hesla byl odeslán.',
'passwordreset-emailsent-capture' => 'Byl odeslán e-mail pro získání nového hesla, který je zobrazen níže.',
-'passwordreset-emailerror-capture' => 'Byl vygenerován e-mail pro získání nového hesla, který je zobrazen níže, ale nepodařilo se ho odeslat uživateli: $1',
+'passwordreset-emailerror-capture' => 'Byl vygenerován e-mail pro získání nového hesla, který je zobrazen níže, ale nepodařilo se ho odeslat {{GENDER:$2|uživateli|uživatelce}}: $1',
# Special:ChangeEmail
'changeemail' => 'Změna e-mailové adresy',
'mergelogpagetext' => 'Níže je seznam nejnovějších sloučení historie jedné stránky s jinou.',
# Diffs
-'history-title' => '$1: Historie verzí',
+'history-title' => 'Historie verzí stránky „$1“',
'difference-title' => '$1: Porovnání verzí',
'difference-title-multipage' => '$1 a $2: Porovnání stránek',
'difference-multipage' => '(Rozdíly mezi stránkami)',
'ncategories' => '$1 {{PLURAL:$1|kategorie|kategorie|kategorií}}',
'ninterwikis' => '$1 {{PLURAL:$1|mezijazykový odkaz|mezijazykové odkazy|mezijazykových odkazů}}',
'nlinks' => '$1 {{PLURAL:$1|odkaz|odkazy|odkazů}}',
-'nmembers' => '$1 {{PLURAL:$1|stránka|stránky|stránek}}',
+'nmembers' => '$1 {{PLURAL:$1|položka|položky|položek}}',
'nrevisions' => '$1 {{PLURAL:$1|revize|revize|revizí}}',
'nviews' => '$1 {{PLURAL:$1|návšteva|návštevy|návštev}}',
'nimagelinks' => 'Použit na $1 {{PLURAL:$1|stránce|stránkách}}',
# Image rotation
'rotate-comment' => 'Obrázek otočen o $1 {{PLURAL:$1|stupeň|stupně|stupňů}} po směru hodinových ručiček',
+# Unknown messages
+'hours-ago' => 'před $1 {{PLURAL:$1|hodinou|hodinami}}',
+'minutes-ago' => 'před $1 {{PLURAL:$1|minutou|minutami}}',
+'seconds-ago' => 'před $1 {{PLURAL:$1|sekundou|sekundami}}',
);
Y cyfrinair dros dro: $2",
'passwordreset-emailsent' => 'Anfonwyd e-bost i ailosod eich cyfrinair atoch.',
'passwordreset-emailsent-capture' => "Anfonwyd e-bost i ailosod cyfrinair, ac fe'i ddangosir isod.",
-'passwordreset-emailerror-capture' => "Lluniwyd e-bost i ailosod cyfrinair fel ag a welir isod, ond ni lwyddwyd i'w anfon at y defnyddiwr: $1",
+'passwordreset-emailerror-capture' => "Lluniwyd e-bost i ailosod cyfrinair fel ag a welir isod, ond ni lwyddwyd i'w anfon at y {{GENDER:$2|defnyddiwr}}: $1",
# Special:ChangeEmail
'changeemail' => 'Newid y cyfeiriad e-bost',
# Short words for each namespace, by default used in the namespace tab in monobook
'nstab-main' => 'Side',
-'nstab-user' => 'brugerside',
-'nstab-media' => 'medie',
-'nstab-special' => 'speciel',
+'nstab-user' => 'Brugerside',
+'nstab-media' => 'Medieside',
+'nstab-special' => 'Specialside',
'nstab-project' => 'Projektside',
'nstab-image' => 'Fil',
'nstab-mediawiki' => 'Besked',
-'nstab-template' => 'skabelon',
-'nstab-help' => 'hjælp',
-'nstab-category' => 'kategori',
+'nstab-template' => 'Skabelon',
+'nstab-help' => 'Hjælp',
+'nstab-category' => 'Kategori',
# Main script and global functions
'nosuchaction' => 'Funktionen findes ikke',
'nov' => 'Nov.',
'dec' => 'Dez.',
+'monday-at' => 'Montag um $1',
+'tuesday-at' => 'Dienstag um $1',
+'wednesday-at' => 'Mittwoch um $1',
+'thursday-at' => 'Donnerstag um $1',
+'friday-at' => 'Freitag um $1',
+'saturday-at' => 'Samstag um $1',
+'sunday-at' => 'Sonntag um $1',
+'today-at' => '$1',
+'yesterday-at' => 'Gestern um $1',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|Kategorie|Kategorien}}',
'category_header' => 'Seiten in der Kategorie „$1“',
'yourpasswordagain' => 'Passwort wiederholen:',
'remembermypassword' => 'Mit diesem Browser dauerhaft angemeldet bleiben (maximal $1 {{PLURAL:$1|Tag|Tage}})',
'userlogin-remembermypassword' => 'Angemeldet bleiben',
-'userlogin-signwithsecure' => 'Mit dem sicheren Server anmelden',
+'userlogin-signwithsecure' => 'Über den sicheren Server anmelden',
'securelogin-stick-https' => 'Nach dem Anmelden mit HTTPS verbunden bleiben',
'yourdomainname' => 'Deine Domain:',
'password-change-forbidden' => 'Du kannst auf diesem Wiki keine Passwörter ändern.',
Temporäres Passwort: $2',
'passwordreset-emailsent' => 'Eine Passwortzurücksetzungs-E-Mail wurde versandt.',
'passwordreset-emailsent-capture' => 'Eine Passwortzurücksetzungs-E-Mail wurde versandt, die unten angezeigt wird.',
-'passwordreset-emailerror-capture' => 'Die unten angezeigte Passwortzurücksetzungs-E-Mail wurde generiert, allerdings ist der Versand an den Benutzer gescheitert: $1',
+'passwordreset-emailerror-capture' => 'Die unten angezeigte Passwortzurücksetzungs-E-Mail wurde generiert, allerdings ist der Versand an {{GENDER:$2|den Benutzer|die Benutzerin}} gescheitert: $1',
# Special:ChangeEmail
'changeemail' => 'E-Mail-Adresse ändern',
'action-rollback' => 'die Änderungen des letzten Bearbeiters einer bestimmten Seite schnell zurückzusetzen',
'action-import' => 'Seiten aus einem anderen Wiki zu importieren',
'action-importupload' => 'Seiten über das Hochladen einer Datei zu importieren',
-'action-patrol' => 'die Bearbeitungen anderer Benutzer zu kontrollieren',
+'action-patrol' => 'Bearbeitungen anderer Benutzer als kontrolliert zu markieren',
'action-autopatrol' => 'eigene Bearbeitungen als kontrolliert zu markieren',
'action-unwatchedpages' => 'die Liste der unbeobachteten Seiten einzusehen',
'action-mergehistory' => 'die Versionengeschichten von Seiten zu vereinen',
'notanarticle' => 'Keine Seite',
'notvisiblerev' => 'Version wurde gelöscht',
'watchnochange' => 'Keine der von dir beobachteten Seiten wurde während des angezeigten Zeitraums bearbeitet.',
-'watchlist-details' => 'Du beobachtest {{PLURAL:$1|eine Seite|$1 Seiten}}, ausschließlich Diskussionsseiten.',
+'watchlist-details' => 'Du beobachtest {{PLURAL:$1|eine Seite|$1 Seiten}}, ohne dass Diskussionsseiten gezählt werden.',
'wlheader-enotif' => '* Der E-Mail-Benachrichtigungsdienst ist aktiviert.',
'wlheader-showupdated' => "* Seiten mit noch nicht gesehenen Änderungen werden '''fett''' dargestellt.",
'watchmethod-recent' => 'Überprüfen der letzten Bearbeitungen für die Beobachtungsliste',
'minutes' => '{{PLURAL:$1|$1 Minute|$1 Minuten}}',
'hours' => '{{PLURAL:$1|1 Stunde|$1 Stunden}}',
'days' => '{{PLURAL:$1|$1 Tag|$1 Tage}}',
+'weeks' => '{{PLURAL:$1|$1 Woche|$1 Wochen}}',
'months' => '{{PLURAL:$1|1 Monat|$1 Monate}}',
'years' => '{{PLURAL:$1|1 Jahr|$1 Jahre}}',
'ago' => 'vor $1',
# Image rotation
'rotate-comment' => 'Bild um $1 {{PLURAL:$1|Grad}} im Uhrzeigersinn gedreht',
+# Unknown messages
+'hours-ago' => 'vor {{PLURAL:$1|einer Stunde|$1 Stunden}}',
+'minutes-ago' => 'vor {{PLURAL:$1|einer Minute|$1 Minuten}}',
+'seconds-ago' => 'vor {{PLURAL:$1|einer Sekunde|$1 Sekunden}}',
);
$messages = array(
# User preference toggles
-'tog-underline' => 'Bınê gırey de xete bıance:',
+'tog-underline' => 'Bınê gırey de xete bance:',
'tog-justify' => 'Paragrafan eyar ke',
'tog-hideminor' => 'Vurnayışanê şenıkan pela vurnayışanê peyênan de bınımne',
'tog-hidepatrolled' => 'Vurnayışanê qontrolkerdeyan pela vurnayışê peyêni de bınımne',
'tog-newpageshidepatrolled' => 'Pelanê qontrolkerdeyan lista pelanê neweyan de bınımne',
-'tog-extendwatchlist' => 'Lista seyrkerdışi hera bıke ke vurnayışi pêro bıasê, tenya tewr peyêni nê',
+'tog-extendwatchlist' => 'Lista seyrkerdışi hera bıke ke vurnayışi pêro basê, tenya tewr peyêni nê',
'tog-usenewrc' => 'Pele be vurnayışanê grube de vurnayışê peyêni u lista seyrkerdışi (JavaScript lazımo)',
'tog-numberheadings' => 'Sernuşteyan be xo numre cı şane',
'tog-showtoolbar' => 'Goceganê hacetanê vurnayışi bımocne (JavaScript lazımo)',
'tog-previewontop' => 'Verqayti pela nuştışi ser de bımocne',
'tog-previewonfirst' => 'Vurnayışo verên de verqayti tım bımocne',
'tog-nocache' => 'Pelanê cıgeyrayoği meya xo viri',
-'tog-enotifwatchlistpages' => 'Jû pele ya zi dosyaya ke lista mına seyrkerdışi de vurnayê mı rê e-poste bırışe',
+'tog-enotifwatchlistpages' => 'Yew pele ya zi dosyaya ke lista mına seyrkerdışi de vurnayê mı rê e-poste bırışe',
'tog-enotifusertalkpages' => 'Pela mına werênayışi ke vurnayê mı rê e-poste bırışe',
'tog-enotifminoredits' => 'Vurnayışanê qıckekanê pelan u dosyeyan de zi mı rê e-poste bırışe',
'tog-enotifrevealaddr' => 'Adresa e-posteyê mı posteyê xeberan de bımocne',
'tog-watchlisthideminor' => 'Vurnayışanê qıckekan lista mına seyrkerdışi de bınımne',
'tog-watchlisthideliu' => 'Lista seyrkerdışi ra vurnayışanê karberanê cıkewteyan bınımne',
'tog-watchlisthideanons' => 'Lista seyrkerdışi ra vurnayışanê karberanê anoniman bınımne',
-'tog-watchlisthidepatrolled' => 'Lista seyrkerdışi ra vurnayışanê qontrol kerdeyan bınımne',
+'tog-watchlisthidepatrolled' => 'Lista seyrkerdışi ra vurnayışanê qontrolkerdeyan bınımne',
'tog-ccmeonemails' => 'E-posteyanê ke ez karberanê binan rê rışenan, mı rê kopya inan bırışe',
'tog-diffonly' => 'Qıyasê versiyonan de tek ferqan bımocne, pela butıne nê',
-'tog-showhiddencats' => 'Kategoriyanê dızdine bımocne',
+'tog-showhiddencats' => 'Kategoriyanê dızdiye bımocne',
'tog-noconvertlink' => 'Greyê sernami çerx kerdışi bıqefılne',
'tog-norollbackdiff' => 'Peyserardışi ra dıme ferqi caverde',
-'tog-useeditwarning' => 'wexta ke ez pelo nêqeydbiyaye ra veciyaya mı hişyar bıker',
+'tog-useeditwarning' => 'Wexto ke mı yew pela nizami be vurnayışanê nêqeydbiyayeyan caverdê, hay be mı ser de',
'underline-always' => 'Tım',
'underline-never' => 'Qet',
-'underline-default' => 'Cild ya zi cıgeyrayoğo hesıbyaye',
+'underline-default' => 'Cild ya zi cıgeyrayoğo hesebiyaye',
# Font style option in Special:Preferences
'editfont-style' => 'Cayê vurnayışi de terzê nuştışi:',
'vector-view-view' => 'Bıwane',
'vector-view-viewsource' => 'Çımey bıvêne',
'actions' => 'Kerdışi',
-'namespaces' => 'Cayê namam',
+'namespaces' => 'Cayê namey',
'variants' => 'Varyanti',
'navigation-heading' => 'Menuya Navigasyoni',
'timezoneregion-pacific' => 'Okyanuso Pasifik',
'allowemail' => 'Karberê bini wa bışê mı rê e-posta bırışê.',
'prefs-searchoptions' => 'Cı geyre',
-'prefs-namespaces' => 'Cayê namam',
+'prefs-namespaces' => 'Cayê namey',
'defaultns' => 'Eke heni, enê cayanê namey de cı geyre (sae ke):',
'default' => 'qısur',
'prefs-files' => 'Dosyey',
# Special:LinkSearch
'linksearch' => 'Gıreyê teberi cı geyrê',
'linksearch-pat' => 'bıgêr motif:',
-'linksearch-ns' => 'Cayênameyî:',
+'linksearch-ns' => 'Cayê namey:',
'linksearch-ok' => 'Cı geyre',
'linksearch-text' => 'Jokeri ê zey "*.wikipedia.org"i benê ke bıgureniyê.
Tewr senık yew sewiya serêna cayê tesiri lazıma, mesela "*.org".<br />
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-hans' => 'hans',
'tog-shownumberswatching' => 'Licbu wobglědujucych wužywarjow pokazaś',
'tog-oldsig' => 'Eksistěrujuca signatura:',
'tog-fancysig' => 'Ze signaturu kaž z wikitekstom wobchadaś (bźez awtomatiskego wótkaza)',
-'tog-externaleditor' => 'Eksterny editor ako standard wužywaś (jano za ekspertow, pomina sebje specialne nastajenja na wašom licadle. [//www.mediawiki.org/wiki/Manual:External_editors Dalšne informacije.])',
-'tog-externaldiff' => 'Eksterny diff ako standard wužywaś (jano za ekspertow, pomina sebje specialne nastajenja na wašom licadle. [//www.mediawiki.org/wiki/Manual:External_editors Dalšne informacije.])',
'tog-showjumplinks' => 'Wótkaze typa „źi do” zmóžniś',
'tog-uselivepreview' => 'Live-pśeglěd wužywaś (JavaScript) (eksperimentelnje)',
'tog-forceeditsummary' => 'Warnowaś, gaž pśi składowanju zespominanje felujo',
'tog-diffonly' => 'Pśi pśirownowanju wersijow jano rozdźěle pokazaś',
'tog-showhiddencats' => 'Schowane kategorije pokazaś',
'tog-norollbackdiff' => 'Rozdźěl pó slědkstajenju zanjechaś',
+'tog-useeditwarning' => 'Warnowaś, gaž bok spušća se z njeskłaźonymi změnami',
'underline-always' => 'pśecej',
'underline-never' => 'žednje',
'content-failed-to-parse' => 'Parsowanje wopśimjeśa $2 za model $1 jo se njeraźiło: $3',
'invalid-content-data' => 'Njepłaśiwe wopśimjeśowe daty',
'content-not-allowed-here' => 'Wopśimjeśe "$1" njejo na boku [[$2]] dowólone',
+'editwarning-warning' => 'Gaž toś ten bok se spušća, mógu se změny zgubiś, kótarež sy pśewjadł. Jolic sy pśizjawjeny, móžoš toś to warnowanje we wótrězku {{int:prefs-editing}} swójich nastajenjow znjemóžniś.',
# Content models
'content-model-wikitext' => 'wikitekst',
'tog-shownumberswatching' => 'Pokitono ginumu do momomoguno minongintong',
'tog-oldsig' => 'Sain poinsandad:',
'tog-fancysig' => 'Pokitono sain sobaagi do tikwiki (ingaa oporian toput )',
-'tog-externaleditor' => 'Pomoguno pongigidit poinlabus sobaagi do pongoiso (montok di angasampin nopo, mongoguno do nuludan pointantu id kompiutonu. [//www.mediawiki.org/wiki/Manual:External_editors Lobi pomoilaan.])',
-'tog-externaldiff' => 'Pomoguno pongigidit poinlabus sobaagi do pongoiso (montok di angasampin nopo, mongoguno do nuludan pointantu id kompiutonu. [//www.mediawiki.org/wiki/Manual:External_editors Lobi pomoilaan.])',
'tog-showjumplinks' => 'Pasagao "tumopik hilo" noputan awayaan',
'tog-uselivepreview' => 'Momoguno pongingintong poimpasi (momoguno JawaSikrip) (pogumbalan)',
'tog-forceeditsummary' => 'Posoroho oku no nung awu nosuangan kutak koinibaan niditan',
Milo ko mogihum maya Googol do daamot.
Imurai no do indik suang diti {{SITENAME}} nopo nga nokolipas.',
-# Quickbar
-'qbsettings' => 'Barposikap',
-'qbsettings-none' => 'Ingaa',
-'qbsettings-fixedleft' => 'Pogolibango',
-'qbsettings-fixedright' => 'Pawanano',
-'qbsettings-floatingleft' => 'Posoibaho gibang',
-'qbsettings-floatingright' => 'Posoibaho wanan',
-
# Preferences page
'preferences' => 'Pipilion',
'mypreferences' => 'Pipilion',
'mdy time' => 'H:i',
'mdy date' => 'F j, Y',
'mdy both' => 'H:i, F j, Y',
+ 'mdy pretty' => 'F j',
'dmy time' => 'H:i',
'dmy date' => 'j F Y',
'dmy both' => 'H:i, j F Y',
+ 'dmy pretty' => 'j F',
'ymd time' => 'H:i',
'ymd date' => 'Y F j',
'ymd both' => 'H:i, Y F j',
+ 'ymd pretty' => 'F j',
'ISO 8601 time' => 'xnH:xni:xns',
'ISO 8601 date' => 'xnY-xnm-xnd',
'ISO 8601 both' => 'xnY-xnm-xnd"T"xnH:xni:xns',
+ 'ISO 8601 pretty' => 'xnm-xnd'
);
/**
'fullpagenamee' => array( 1, 'FULLPAGENAMEE' ),
'subpagename' => array( 1, 'SUBPAGENAME' ),
'subpagenamee' => array( 1, 'SUBPAGENAMEE' ),
+ 'rootpagename' => array( 1, 'ROOTPAGENAME' ),
+ 'rootpagenamee' => array( 1, 'ROOTPAGENAMEE' ),
'basepagename' => array( 1, 'BASEPAGENAME' ),
'basepagenamee' => array( 1, 'BASEPAGENAMEE' ),
'talkpagename' => array( 1, 'TALKPAGENAME' ),
'tog-showhiddencats' => 'Show hidden categories',
'tog-noconvertlink' => 'Disable link title conversion', # only translate this message to other languages if you have to change it
'tog-norollbackdiff' => 'Omit diff after performing a rollback',
-'tog-useeditwarning' => 'Warn me when I leave an edit page with unsaved changes',
+'tog-useeditwarning' => 'Warn me when I leave an edit page with unsaved changes',
'underline-always' => 'Always',
'underline-never' => 'Never',
'virus-unknownscanner' => 'unknown antivirus:',
# Login and logout pages
-'logouttext' => "'''You are now logged out.'''
+'logouttext' => "'''You are now logged out.'''
You can continue to use {{SITENAME}} anonymously, or you can <span class='plainlinks'>[$1 log in again]</span> as the same or as a different user.
Note that some pages may continue to be displayed as if you were still logged in, until you clear your browser cache.",
-'welcomeuser' => 'Welcome, $1!',
-'welcomecreation-msg' => 'Your account has been created.
+'welcomeuser' => 'Welcome, $1!',
+'welcomecreation-msg' => 'Your account has been created.
Do not forget to change your [[Special:Preferences|{{SITENAME}} preferences]].',
-'yourname' => 'Username:',
-'userlogin-yourname' => 'Username',
-'userlogin-yourname-ph' => 'Enter your username',
-'yourpassword' => 'Password:',
-'userlogin-yourpassword' => 'Password',
-'userlogin-yourpassword-ph' => 'Enter your password',
-'yourpasswordagain' => 'Retype password:',
-'remembermypassword' => 'Remember my login on this browser (for a maximum of $1 {{PLURAL:$1|day|days}})',
-'userlogin-remembermypassword' => 'Remember me',
-'userlogin-signwithsecure' => 'Sign in with secure server',
-'securelogin-stick-https' => 'Stay connected to HTTPS after login',
-'yourdomainname' => 'Your domain:',
-'password-change-forbidden' => 'You cannot change passwords on this wiki.',
-'externaldberror' => 'There was either an authentication database error or you are not allowed to update your external account.',
-'login' => 'Log in',
-'nav-login-createaccount' => 'Log in / create account',
-'loginprompt' => 'You must have cookies enabled to log in to {{SITENAME}}.',
-'userlogin' => 'Log in / create account',
-'userloginnocreate' => 'Log in',
-'logout' => 'Log out',
-'userlogout' => 'Log out',
-'userlogout-summary' => '', # do not translate or duplicate this message to other languages
-'notloggedin' => 'Not logged in',
-'userlogin-noaccount' => "Don't have an account?",
-'userlogin-joinproject' => 'Join {{SITENAME}}',
-'nologin' => "Don't have an account? $1.",
-'nologinlink' => 'Create an account',
-'createaccount' => 'Create account',
-'gotaccount' => 'Already have an account? $1.',
-'gotaccountlink' => 'Log in',
-'userlogin-resetlink' => 'Forgotten your login details?',
-'helplogin-url' => 'Help:Logging in',
-'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Help with logging in]]',
-'createaccountmail' => 'Use a temporary random password and send it to the email address specified below',
-'createaccountreason' => 'Reason:',
-'badretype' => 'The passwords you entered do not match.',
-'userexists' => 'Username entered already in use.
+'yourname' => 'Username:',
+'userlogin-yourname' => 'Username',
+'userlogin-yourname-ph' => 'Enter your username',
+'createacct-helpusername-url' => '{{ns:Project}}:Username_policy',
+'createacct-helpusername-link' => '[[{{MediaWiki:createacct-helpusername-url}}|(help me choose)]]',
+'yourpassword' => 'Password:',
+'userlogin-yourpassword' => 'Password',
+'userlogin-yourpassword-ph' => 'Enter your password',
+'createacct-yourpassword-ph' => 'Enter a password',
+'yourpasswordagain' => 'Retype password:',
+'createacct-yourpasswordagain' => 'Confirm password',
+'createacct-yourpasswordagain-ph' => 'Enter password again',
+'remembermypassword' => 'Remember my login on this browser (for a maximum of $1 {{PLURAL:$1|day|days}})',
+'userlogin-remembermypassword' => 'Remember me',
+'userlogin-signwithsecure' => 'Sign in with secure server',
+'securelogin-stick-https' => 'Stay connected to HTTPS after login',
+'yourdomainname' => 'Your domain:',
+'password-change-forbidden' => 'You cannot change passwords on this wiki.',
+'externaldberror' => 'There was either an authentication database error or you are not allowed to update your external account.',
+'login' => 'Log in',
+'nav-login-createaccount' => 'Log in / create account',
+'loginprompt' => 'You must have cookies enabled to log in to {{SITENAME}}.',
+'userlogin' => 'Log in / create account',
+'userloginnocreate' => 'Log in',
+'logout' => 'Log out',
+'userlogout' => 'Log out',
+'userlogout-summary' => '', # do not translate or duplicate this message to other languages
+'notloggedin' => 'Not logged in',
+'userlogin-noaccount' => "Don't have an account?",
+'userlogin-joinproject' => 'Join {{SITENAME}}',
+'nologin' => "Don't have an account? $1.",
+'nologinlink' => 'Create an account',
+'createaccount' => 'Create account',
+'gotaccount' => 'Already have an account? $1.',
+'gotaccountlink' => 'Log in',
+'userlogin-resetlink' => 'Forgotten your login details?',
+'helplogin-url' => 'Help:Logging in',
+'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Help with logging in]]',
+'createacct-join' => 'Enter your information below.',
+'createacct-emailrequired' => 'Email address',
+'createacct-emailoptional' => 'Email address (optional)',
+'createacct-email-ph' => 'Enter your email address',
+'createaccountmail' => 'Use a temporary random password and send it to the email address specified below',
+'createacct-realname' => 'Real name (optional)',
+'createaccountreason' => 'Reason:',
+'createacct-reason' => 'Reason',
+'createacct-captcha' => 'Security check',
+'createacct-captcha-help-url' => '{{ns:Project}}:Request an account',
+'createacct-imgcaptcha-help' => 'Can\'t see the image? [[{{MediaWiki:createacct-captcha-help-url}}|Request an account]]',
+'createacct-imgcaptcha-ph' => 'Enter the text you see above',
+'createacct-benefit-heading' => '{{SITENAME}} is made by people like you.',
+'createacct-benefit-icon1' => 'icon-edits',
+'createacct-benefit-head1' => '{{NUMBEROFEDITS}}',
+'createacct-benefit-body1' => 'edits',
+'createacct-benefit-icon2' => 'icon-pages',
+'createacct-benefit-head2' => '{{NUMBEROFARTICLES}}',
+'createacct-benefit-body2' => 'pages',
+'createacct-benefit-icon3' => 'icon-contributors',
+'createacct-benefit-head3' => '{{NUMBEROFUSERS}}',
+'createacct-benefit-body3' => 'contributors this month',
+'badretype' => 'The passwords you entered do not match.',
+'userexists' => 'Username entered already in use.
Please choose a different name.',
-'loginerror' => 'Login error',
-'createaccounterror' => 'Could not create account: $1',
-'nocookiesnew' => 'The user account was created, but you are not logged in.
+'loginerror' => 'Login error',
+'createaccounterror' => 'Could not create account: $1',
+'nocookiesnew' => 'The user account was created, but you are not logged in.
{{SITENAME}} uses cookies to log in users.
You have cookies disabled.
Please enable them, then log in with your new username and password.',
-'nocookieslogin' => '{{SITENAME}} uses cookies to log in users.
+'nocookieslogin' => '{{SITENAME}} uses cookies to log in users.
You have cookies disabled.
Please enable them and try again.',
-'nocookiesfornew' => 'The user account was not created, as we could not confirm its source.
+'nocookiesfornew' => 'The user account was not created, as we could not confirm its source.
Ensure you have cookies enabled, reload this page and try again.',
-'nocookiesforlogin' => '{{int:nocookieslogin}}', # only translate this message to other languages if you have to change it
-'noname' => 'You have not specified a valid username.',
-'loginsuccesstitle' => 'Login successful',
-'loginsuccess' => "'''You are now logged in to {{SITENAME}} as \"\$1\".'''",
-'nosuchuser' => 'There is no user by the name "$1".
+'nocookiesforlogin' => '{{int:nocookieslogin}}', # only translate this message to other languages if you have to change it
+'noname' => 'You have not specified a valid username.',
+'loginsuccesstitle' => 'Login successful',
+'loginsuccess' => "'''You are now logged in to {{SITENAME}} as \"\$1\".'''",
+'nosuchuser' => 'There is no user by the name "$1".
Usernames are case sensitive.
Check your spelling, or [[Special:UserLogin/signup|create a new account]].',
-'nosuchusershort' => 'There is no user by the name "$1".
+'nosuchusershort' => 'There is no user by the name "$1".
Check your spelling.',
-'nouserspecified' => 'You have to specify a username.',
-'login-userblocked' => 'This user is blocked. Login not allowed.',
-'wrongpassword' => 'Incorrect password entered.
+'nouserspecified' => 'You have to specify a username.',
+'login-userblocked' => 'This user is blocked. Login not allowed.',
+'wrongpassword' => 'Incorrect password entered.
Please try again.',
-'wrongpasswordempty' => 'Password entered was blank.
+'wrongpasswordempty' => 'Password entered was blank.
Please try again.',
-'passwordtooshort' => 'Passwords must be at least {{PLURAL:$1|1 character|$1 characters}}.',
-'password-name-match' => 'Your password must be different from your username.',
-'password-login-forbidden' => 'The use of this username and password has been forbidden.',
-'mailmypassword' => 'Email new password',
-'passwordremindertitle' => 'New temporary password for {{SITENAME}}',
-'passwordremindertext' => 'Someone (probably you, from IP address $1) requested a new
+'passwordtooshort' => 'Passwords must be at least {{PLURAL:$1|1 character|$1 characters}}.',
+'password-name-match' => 'Your password must be different from your username.',
+'password-login-forbidden' => 'The use of this username and password has been forbidden.',
+'mailmypassword' => 'Email new password',
+'passwordremindertitle' => 'New temporary password for {{SITENAME}}',
+'passwordremindertext' => 'Someone (probably you, from IP address $1) requested a new
password for {{SITENAME}} ($4). A temporary password for user
"$2" has been created and was set to "$3". If this was your
intent, you will need to log in and choose a new password now.
If someone else made this request, or if you have remembered your password,
and you no longer wish to change it, you may ignore this message and
continue using your old password.',
-'noemail' => 'There is no email address recorded for user "$1".',
-'noemailcreate' => 'You need to provide a valid email address.',
-'passwordsent' => 'A new password has been sent to the email address registered for "$1".
+'noemail' => 'There is no email address recorded for user "$1".',
+'noemailcreate' => 'You need to provide a valid email address.',
+'passwordsent' => 'A new password has been sent to the email address registered for "$1".
Please log in again after you receive it.',
-'blocked-mailpassword' => 'Your IP address is blocked from editing, and so is not allowed to use the password recovery function to prevent abuse.',
-'eauthentsent' => 'A confirmation email has been sent to the nominated email address.
+'blocked-mailpassword' => 'Your IP address is blocked from editing, and so is not allowed to use the password recovery function to prevent abuse.',
+'eauthentsent' => 'A confirmation email has been sent to the nominated email address.
Before any other email is sent to the account, you will have to follow the instructions in the email, to confirm that the account is actually yours.',
-'throttled-mailpassword' => 'A password reset email has already been sent, within the last {{PLURAL:$1|hour|$1 hours}}.
+'throttled-mailpassword' => 'A password reset email has already been sent, within the last {{PLURAL:$1|hour|$1 hours}}.
To prevent abuse, only one password reset email will be sent per {{PLURAL:$1|hour|$1 hours}}.',
-'loginstart' => '', # do not translate or duplicate this message to other languages
-'loginend' => '', # do not translate or duplicate this message to other languages
-'loginend-https' => '', # do not translate or duplicate this message to other languages
-'signupstart' => '{{int:loginstart}}', # do not translate or duplicate this message to other languages
-'signupend' => '{{int:loginend}}', # do not translate or duplicate this message to other languages
-'signupend-https' => '', # do not translate or duplicate this message to other languages
-'mailerror' => 'Error sending mail: $1',
-'acct_creation_throttle_hit' => 'Visitors to this wiki using your IP address have created {{PLURAL:$1|1 account|$1 accounts}} in the last day, which is the maximum allowed in this time period.
+'loginstart' => '', # do not translate or duplicate this message to other languages
+'loginend' => '', # do not translate or duplicate this message to other languages
+'loginend-https' => '', # do not translate or duplicate this message to other languages
+'signupstart' => '{{int:loginstart}}', # do not translate or duplicate this message to other languages
+'signupend' => '{{int:loginend}}', # do not translate or duplicate this message to other languages
+'signupend-https' => '', # do not translate or duplicate this message to other languages
+'mailerror' => 'Error sending mail: $1',
+'acct_creation_throttle_hit' => 'Visitors to this wiki using your IP address have created {{PLURAL:$1|1 account|$1 accounts}} in the last day, which is the maximum allowed in this time period.
As a result, visitors using this IP address cannot create any more accounts at the moment.',
-'emailauthenticated' => 'Your email address was authenticated on $2 at $3.',
-'emailnotauthenticated' => 'Your email address is not yet authenticated.
+'emailauthenticated' => 'Your email address was authenticated on $2 at $3.',
+'emailnotauthenticated' => 'Your email address is not yet authenticated.
No email will be sent for any of the following features.',
-'noemailprefs' => 'Specify an email address in your preferences for these features to work.',
-'emailconfirmlink' => 'Confirm your email address',
-'invalidemailaddress' => 'The email address cannot be accepted as it appears to have an invalid format.
+'noemailprefs' => 'Specify an email address in your preferences for these features to work.',
+'emailconfirmlink' => 'Confirm your email address',
+'invalidemailaddress' => 'The email address cannot be accepted as it appears to have an invalid format.
Please enter a well-formatted address or empty that field.',
-'cannotchangeemail' => 'Account email addresses cannot be changed on this wiki.',
-'emaildisabled' => 'This site cannot send emails.',
-'accountcreated' => 'Account created',
-'accountcreatedtext' => 'The user account for $1 has been created.',
-'createaccount-title' => 'Account creation for {{SITENAME}}',
-'createaccount-text' => 'Someone created an account for your email address on {{SITENAME}} ($4) named "$2", with password "$3".
+'cannotchangeemail' => 'Account email addresses cannot be changed on this wiki.',
+'emaildisabled' => 'This site cannot send emails.',
+'accountcreated' => 'Account created',
+'accountcreatedtext' => 'The user account for $1 has been created.',
+'createaccount-title' => 'Account creation for {{SITENAME}}',
+'createaccount-text' => 'Someone created an account for your email address on {{SITENAME}} ($4) named "$2", with password "$3".
You should log in and change your password now.
You may ignore this message, if this account was created in error.',
-'usernamehasherror' => 'Username cannot contain hash characters',
-'login-throttled' => 'You have made too many recent login attempts.
+'usernamehasherror' => 'Username cannot contain hash characters',
+'login-throttled' => 'You have made too many recent login attempts.
Please wait before trying again.',
-'login-abort-generic' => 'Your login was unsuccessful - Aborted',
-'loginlanguagelabel' => 'Language: $1',
-'loginlanguagelinks' => '* {{#language:de}}|de
+'login-abort-generic' => 'Your login was unsuccessful - Aborted',
+'loginlanguagelabel' => 'Language: $1',
+'loginlanguagelinks' => '* {{#language:de}}|de
* {{#language:en}}|en
* {{#language:eo}}|eo
* {{#language:fr}}|fr
* {{#language:es}}|es
* {{#language:it}}|it
* {{#language:nl}}|nl', # do not translate or duplicate this message to other languages
-'suspicious-userlogout' => 'Your request to log out was denied because it looks like it was sent by a broken browser or caching proxy.',
+'suspicious-userlogout' => 'Your request to log out was denied because it looks like it was sent by a broken browser or caching proxy.',
# Email sending
'pear-mail-error' => '$1', # do not translate or duplicate this message to other languages
Temporary password: $2',
'passwordreset-emailsent' => 'A password reset email has been sent.',
'passwordreset-emailsent-capture' => 'A password reset email has been sent, which is shown below.',
-'passwordreset-emailerror-capture' => 'A password reset email was generated, which is shown below, but sending it to the user failed: $1',
+'passwordreset-emailerror-capture' => 'A password reset email was generated, which is shown below, but sending it to the {{GENDER:$2|user}} failed: $1',
# Special:ChangeEmail
'changeemail' => 'Change email address',
<input type="radio" name="sitesearch" id="gWWW" value="" /><label for="gWWW">WWW</label>
</div>
</form>', # do not translate or duplicate this message to other languages
+'search-error' => 'An error has occurred while searching: $1',
# OpenSearch description
'opensearch-desc' => '{{SITENAME}} ({{CONTENTLANGUAGE}})', # do not translate or duplicate this message to other languages
-'search-error' => 'An error has occurred while searching: $1',
# Preferences page
'preferences' => 'Preferences',
'img-auth-bad-query-string' => 'The URL has an invalid query string.',
# HTTP errors
-'http-invalid-url' => 'Invalid URL: $1',
-'http-invalid-scheme' => 'URLs with the "$1" scheme are not supported.',
-'http-request-error' => 'HTTP request failed due to unknown error.',
-'http-read-error' => 'HTTP read error.',
-'http-timed-out' => 'HTTP request timed out.',
-'http-curl-error' => 'Error fetching URL: $1',
-'http-bad-status' => 'There was a problem during the HTTP request: $1 $2',
+'http-invalid-url' => 'Invalid URL: $1',
+'http-invalid-scheme' => 'URLs with the "$1" scheme are not supported.',
+'http-request-error' => 'HTTP request failed due to unknown error.',
+'http-read-error' => 'HTTP read error.',
+'http-timed-out' => 'HTTP request timed out.',
+'http-curl-error' => 'Error fetching URL: $1',
+'http-bad-status' => 'There was a problem during the HTTP request: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'upload-curl-error6' => 'Could not reach URL',
'minutes' => '{{PLURAL:$1|$1 minute|$1 minutes}}',
'hours' => '{{PLURAL:$1|$1 hour|$1 hours}}',
'days' => '{{PLURAL:$1|$1 day|$1 days}}',
+'weeks' => '{{PLURAL:$1|$1 week|$1 weeks}}',
'months' => '{{PLURAL:$1|$1 month|$1 months}}',
'years' => '{{PLURAL:$1|$1 year|$1 years}}',
'ago' => '$1 ago',
'just-now' => 'just now',
+'hours-ago' => '$1 {{PLURAL:$1|hour|hours}} ago',
+'minutes-ago' => '$1 {{PLURAL:$1|minute|minutes}} ago',
+'seconds-ago' => '$1 {{PLURAL:$1|seconds|seconds}} ago',
+
+'monday-at' => 'Monday at $1',
+'tuesday-at' => 'Tuesday at $1',
+'wednesday-at' => 'Wednesday at $1',
+'thursday-at' => 'Thursday at $1',
+'friday-at' => 'Friday at $1',
+'saturday-at' => 'Saturday at $1',
+'sunday-at' => 'Sunday at $1',
+
+'today-at' => '$1',
+'yesterday-at' => 'Yesterday at $1',
+
# Bad image list
'bad_image_list' => 'The format is as follows:
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-hans' => 'hans', # only translate this message to other languages if you have to change it
'tog-shownumberswatching' => 'Montri la nombron da priatentaj uzantoj',
'tog-oldsig' => 'Ekzistanta subskribo:',
'tog-fancysig' => 'Trakti subskribon kiel vikitekston (sen aŭtomata ligo)',
-'tog-externaleditor' => 'Defaŭlte uzi eksteran tekstprilaborilon (nur por ekspertoj, ĉar tio necesigas specialajn agordojn en via komputilo. [//www.mediawiki.org/wiki/Manual:External_editors Pliaj informoj.])',
-'tog-externaldiff' => 'Defaŭlte uzi eksteran ŝanĝmontrilon (nur por ekspertoj, ĉar tio necesigas specialajn agordojn en via komputilo. [//www.mediawiki.org/wiki/Manual:External_editors Pliaj informoj.])',
'tog-showjumplinks' => 'Ebligi alirligojn "salti al"
<!-- Bonvolu kontroli ĉu ĝustas la traduko de : Enable "jump to" accessibility links -->',
'tog-uselivepreview' => 'Uzi tujan antaŭrigardon (ĜavaSkripto) (Eksperimenta)',
'tog-diffonly' => 'Ne montri paĝan enhavon sub la ŝanĝoj',
'tog-showhiddencats' => 'Montri kaŝitajn kategoriojn',
'tog-norollbackdiff' => 'Preterlasi ŝanĝoelmontron post malfaro',
+'tog-useeditwarning' => 'Averti min kiam mi forlasas redaktan paĝon kun nekonservitaj ŝanĝoj',
'underline-always' => 'Ĉiam',
'underline-never' => 'Neniam',
'content-failed-to-parse' => 'Oni malsukcesis analizi $2-entenon laŭ la $1-modelo: $3',
'invalid-content-data' => 'Enhavo estas malvalida',
'content-not-allowed-here' => 'Enhavo de $1 ne estas permesita en paĝo [[$2]]',
+'editwarning-warning' => 'Forlasante ĉi tiun paĝon kaŭzos al vi perdi iun ajn ŝanĝojn kiujn vi faris.
+Se vi ensalutas, vi povas malŝalti ĉi tiun averton en la sekcio "{{int:prefs-editing}}" de viaj preferoj.',
# Content models
'content-model-wikitext' => 'vikiteksto',
'searchdisabled' => '<p>Oni provizore malŝaltis serĉadon per la plenteksta
indekso pro troŝarĝita servilo. Intertempe, vi povas serĉi per <i>guglo</i> aŭ per <i>jahu!</i>:</p>',
-# Quickbar
-'qbsettings' => 'Preferoj pri ilaro',
-'qbsettings-none' => 'Neniu',
-'qbsettings-fixedleft' => 'Fiksiĝas maldekstre',
-'qbsettings-fixedright' => 'Fiksiĝas dekstre',
-'qbsettings-floatingleft' => 'Ŝvebas maldekstre',
-'qbsettings-floatingright' => 'Ŝvebas dekstre',
-'qbsettings-directionality' => 'Fiksita, laŭ la teksto-direkteco de via lingvo',
-
# Preferences page
'preferences' => 'Preferoj',
'mypreferences' => 'Preferoj',
'http-read-error' => 'HTTP-legeraro.',
'http-timed-out' => 'HTTP-peto eltempiĝis.',
'http-curl-error' => 'Eraro venigante URL-on: $1',
-'http-host-unreachable' => 'URL-o ne estis atingebla.',
'http-bad-status' => 'Estis problemo dum la HTTP-peto: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => 'Neniu uzanto trovita.',
'listusers-blocked' => '(forbarita)',
-# Special:ActiveUsers
-'activeusers' => 'Listo de aktivaj uzantoj',
-'activeusers-intro' => 'Jen listo de uzantoj kiu faris iom da agoj dum la lastaj $1 {{PLURAL:$1|tago|tagoj}}.',
-'activeusers-count' => '$1 {{PLURAL:$1|redakto|redaktoj}} dum la {{PLURAL:$3|lasta tago|lastaj $3 tagoj}}',
-'activeusers-from' => 'Montri uzantojn ekde:',
-'activeusers-hidebots' => 'kaŝi robotojn',
-'activeusers-hidesysops' => 'Kaŝi administrantojn',
-'activeusers-noresult' => 'Neniuj uzantoj trovitaj.',
-
# Special:ListGroupRights
'listgrouprights' => 'Gruprajtoj de uzantoj',
'listgrouprights-summary' => 'Jen listo de uzanto-grupoj difinitaj en ĉi tiu vikio, kun ties asociaj atingrajtoj.
# Stylesheets
'common.css' => '/* La jena CSS influos la aspekton de ĉiaj temoj. */',
-'standard.css' => '/* La jena CSS influos la paĝaspekton por uzantoj de la Klasika temo. */',
-'nostalgia.css' => '/* La jena CSS influos la paĝaspekton por uzantoj de la Nostalgia temo. */',
'cologneblue.css' => '/* La jena CSS influos la paĝaspekton por uzantoj de la Kolonja Blua temo. */',
'monobook.css' => '/* La jena CSS influos la paĝaspekton por uzantoj de la Libreja temo. */',
-'myskin.css' => '/* La jena CSS influos la paĝaspekton por uzantoj de la Miŝela temo. */',
-'chick.css' => '/* La jena CSS influos la paĝaspekton por uzantoj de la Kokida temo. */',
-'simple.css' => '/* La jena CSS influos la paĝaspekton por uzantoj de la Simpla temo. */',
'modern.css' => '/* La jena CSS influos la paĝaspekton por uzantoj de la Moderna temo. */',
'vector.css' => '/* La jena CSS influos la paĝaspekton por uzantoj de la Vektora temo. */',
'print.css' => '/* La jena CSS influos la prezentadon de la presaĵo. */',
# Scripts
'common.js' => '/* La jena Ĝavaskripto ŝargiĝos por ĉiaj uzantoj ĉe ĉiu paĝoŝargado. */',
-'standard.js' => '/* La jena Ĝavaskripto ŝargiĝos por uzantoj de la Klasika temo. */',
-'nostalgia.js' => '/* La jena Ĝavaskripto ŝargiĝos por uzantoj de la Nostalgia temo. */',
'cologneblue.js' => '/* La jena Ĝavaskripto ŝargiĝos por uzantoj de la Kolonja Blua temo. */',
'monobook.js' => '/* La jena Ĝavaskripto ŝargiĝos por uzantoj de la Libreja temo. */',
-'myskin.js' => '/* La jena Ĝavaskripto ŝargiĝos por uzantoj de la Miŝela temo. */',
-'chick.js' => '/* La jena Ĝavaskripto ŝargiĝos por uzantoj de la Kokida temo. */',
-'simple.js' => '/* La jena Ĝavaskripto ŝargiĝos por uzantoj de la Simpla temo. */',
'modern.js' => '/* La jena Ĝavaskripto ŝargiĝos por uzantoj de la Moderna temo. */',
'vector.js' => '/* La jena Ĝavaskripto ŝargiĝos por uzantoj de la Vektora temo. */',
'group-autoconfirmed.js' => '/* La jena Ĝavaskripto sole ŝargiĝos por auxtokonfirmataj uzantoj. */',
'pageinfo-category-files' => 'Nombro de dosieroj',
# Skin names
-'skinname-standard' => 'Klasiko',
-'skinname-nostalgia' => 'Nostalgio',
'skinname-cologneblue' => 'Kolonja Bluo',
'skinname-monobook' => 'Librejo',
-'skinname-myskin' => 'Miŝelo',
-'skinname-chick' => 'Kokido',
-'skinname-simple' => 'Simplo',
'skinname-modern' => 'Moderno',
'skinname-vector' => 'Vektoro',
'nov' => 'nov',
'dec' => 'dic',
+'monday-at' => 'El lunes a las $1',
+'tuesday-at' => 'El martes a las $1',
+'wednesday-at' => 'El miércoles a las $1',
+'thursday-at' => 'El jueves a las $1',
+'friday-at' => 'El viernes a las $1',
+'saturday-at' => 'El sábado a las $1',
+'sunday-at' => 'El domingo a las $1',
+'today-at' => '$1',
+'yesterday-at' => 'Ayer a las $1',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|Categoría|Categorías}}',
'category_header' => 'Artículos en la categoría «$1»',
Contraseña temporal: $2',
'passwordreset-emailsent' => 'Se ha enviado un correo electrónico para el restablecimiento de tu contraseña.',
'passwordreset-emailsent-capture' => 'Se ha enviado un correo para el restablecimiento de la contraseña, el cual se muestra a continuación.',
-'passwordreset-emailerror-capture' => 'Se generó un correo electrónico de restablecimiento de contraseña, que se muestra a continuación, pero el envío al usuario falló: $1',
+'passwordreset-emailerror-capture' => 'Se generó un correo electrónico de restablecimiento de contraseña, que se muestra a continuación, pero el envío {{GENDER:$2|al usuario|a la usuaria}} falló. $1',
# Special:ChangeEmail
'changeemail' => 'Cambiar la dirección de correo electrónico',
'prefsnologin' => 'No has iniciado sesión',
'prefsnologintext' => 'Necesitas <span class="plainlinks">[{{fullurl:{{#Special:UserLogin}}|returnto=$1}} iniciar sesión]</span> para establecer las preferencias del usuario.',
'changepassword' => 'Cambiar contraseña',
-'prefs-skin' => 'Skin',
+'prefs-skin' => 'Apariencia',
'skin-preview' => 'Previsualizar',
'datedefault' => 'Sin preferencia',
'prefs-beta' => 'Características de prueba',
'tooltip-summary' => 'Introduce un breve resumen',
# Stylesheets
-'common.css' => '/* El CSS colocado en esta página sera aplicado a todas las pieles (skins) */',
+'common.css' => '/* El CSS colocado en esta página será aplicado a todas las apariencias */',
'cologneblue.css' => '/* El CSS colocado en esta página afectará a los usuarios que usen la piel "Cologne Blue" */',
'monobook.css' => '/* El CSS colocado en esta página afectará a los usuarios que usen la piel "MonoBook" */',
'modern.css' => '/* El CSS colocado en esta página afectará a los usuarios que usen la piel "Modern" */',
'version-parserhooks' => 'Extensiones del analizador sintáctico',
'version-variables' => 'Variables',
'version-antispam' => 'Prevención de spam',
-'version-skins' => 'Pieles',
+'version-skins' => 'Apariencias',
'version-other' => 'Otro',
'version-mediahandlers' => 'Manejadores multimedia',
'version-hooks' => 'Extensiones',
# Image rotation
'rotate-comment' => 'Imagen girada por $1 {{PLURAL:$1|grado|grados}} en el sentido de las agujas del reloj',
+# Unknown messages
+'hours-ago' => 'hace $1 {{PLURAL:$1|hora|horas}}',
+'minutes-ago' => 'hace {{PLURAL:$1|un minuto|$1 minutos}}',
+'seconds-ago' => 'hace $1 {{PLURAL:$1|segundo|segundos}}',
);
'nov' => 'نوامبر',
'dec' => 'دسامبر',
+'monday-at' => 'دوشنبهٔ $1',
+'tuesday-at' => 'سهشنبهٔ $1',
+'wednesday-at' => 'چهارشنبهٔ $1',
+'thursday-at' => 'پنجشنبهٔ $1',
+'friday-at' => 'جمعهٔ $1',
+'saturday-at' => 'شنبهٔ $1',
+'sunday-at' => 'یکشنبهٔ $1',
+'today-at' => '$1',
+'yesterday-at' => 'دیروز $1',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|رده|ردهها}}',
'category_header' => 'صفحههای ردهٔ «$1»',
# Image rotation
'rotate-comment' => 'تصویر به دست $1 {{PLURAL:$1|درجهٔ|درجهٔ}} ساعتگرد چرخانده شد',
+# Unknown messages
+'hours-ago' => '$1 {{PLURAL:$1|ساعت|ساعت}} قبل',
+'minutes-ago' => '$1 {{PLURAL:$1|دقیقه|دقیقه}} قبل',
+'seconds-ago' => '$1 {{PLURAL:$1|ثانیه|ثانیه}} قبل',
);
'tog-shownumberswatching' => 'Vís tal av brúkarum sum fylgja við',
'tog-oldsig' => 'Verandi undirskrift:',
'tog-fancysig' => 'Viðgerð undirskriftina sum wikitekstur (uttan sjálvvirkandi leinkju)',
-'tog-externaleditor' => 'Nýt útvortis ritil sum fyrimynd (bert fyri fólk við serkunnleika, tað er tørvur á serligum innstillingum á tínari teldu. [//www.mediawiki.org/wiki/Manual:External_editors More information.])',
-'tog-externaldiff' => 'Nýt útvortis diff sum fyrimynd (bert fyri serfrøðingar, tín telda tørvar serligar innstillingar. [//www.mediawiki.org/wiki/Manual:External_editors More information.])',
'tog-showjumplinks' => 'Ger "far til"-tilgongd virkna',
'tog-uselivepreview' => 'Nýt "live preview" (tørvar JavaScript) (á royndarstøði)',
'tog-forceeditsummary' => 'Gev mær boð, um eg ikki havi skrivað ein samandrátt um mína rætting',
Tú kanst leita via Google ímeðan.
Legg til merkis, at teirra innihaldsyvirlit av {{SITENAME}} kann vera gamalt og ikki dagført.',
-# Quickbar
-'qbsettings' => 'Skundfjøl innstillingar',
-'qbsettings-none' => 'Eingin',
-'qbsettings-fixedleft' => 'Fast vinstru',
-'qbsettings-fixedright' => 'Fast høgru',
-'qbsettings-floatingleft' => 'Flótandi vinstru',
-'qbsettings-floatingright' => 'Flótandi høgra',
-
# Preferences page
'preferences' => 'Innstillingar',
'mypreferences' => 'Innstillingar',
'http-read-error' => 'HTTP lesifeilur.',
'http-timed-out' => 'HTTP fyrispurningurin tók ov langa tíð.',
'http-curl-error' => 'Feilur meðan vit heintaðu URL: $1',
-'http-host-unreachable' => 'Internetadressan er ikki atkomulig.',
'http-bad-status' => 'Tað hendi ein feilur undir viðgerðini av HTTP fyrispurnininum: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'pageinfo-authors' => 'Tal av ymiskum høvundum',
# Skin names
-'skinname-standard' => 'Standardur',
-'skinname-nostalgia' => 'Nostalgiskur',
'skinname-cologneblue' => 'Cologne-bláur',
# Patrolling
'nov' => 'nov',
'dec' => 'déc',
+'monday-at' => 'Lundi à $1',
+'tuesday-at' => 'Mardi à $1',
+'wednesday-at' => 'Mercredi à $1',
+'thursday-at' => 'Jeudi à $1',
+'friday-at' => 'Vendredi à $1',
+'saturday-at' => 'Samedi à $1',
+'sunday-at' => 'Dimanche à $1',
+'today-at' => '$1',
+'yesterday-at' => 'Hier à $1',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|Catégorie|Catégories}}',
'category_header' => 'Pages dans la catégorie « $1 »',
Mot de passe temporaire : $2",
'passwordreset-emailsent' => 'Un courriel de réinitialisation de mot de passe a été envoyé.',
'passwordreset-emailsent-capture' => 'Un courriel de réinitialisation de mot de passe a été envoyé, qui est affiché ci-dessous.',
-'passwordreset-emailerror-capture' => "Un courriel de réinitialisation de mot de passe a été généré, qui est affiché ci-dessous, mais l'envoi à l'utilisateur a échoué : $1",
+'passwordreset-emailerror-capture' => "Un courriel de réinitialisation de mot de passe a été généré, qui est affiché ci-dessous, mais l'envoi à l'{{GENDER:$2|utilisateur}} a échoué : $1",
# Special:ChangeEmail
'changeemail' => "Changer l'adresse de courriel",
'minutes' => '{{PLURAL:$1|$1 minute|$1 minutes}}',
'hours' => '{{PLURAL:$1|$1 heure|$1 heures}}',
'days' => '{{PLURAL:$1|$1 jour|$1 jours}}',
+'weeks' => '{{PLURAL:$1|$1 semaine|$1 semaines}}',
'months' => '{{PLURAL:$1|$1 mois}}',
'years' => '{{PLURAL:$1|$1 an|$1 ans}}',
'ago' => 'Il y a $1',
# Image rotation
'rotate-comment' => 'Image pivotée de $1 {{PLURAL:$1|degré|degrés}} dans le sens des aiguilles d’une montre',
+# Unknown messages
+'hours-ago' => 'il y a $1 {{PLURAL:$1|heure|heures}}',
+'minutes-ago' => 'il y a $1 {{PLURAL:$1|minute|minutes}}',
+'seconds-ago' => 'il y a $1 {{PLURAL:$1|seconde|secondes}}',
);
'tog-shownumberswatching' => 'Montrar lo nombro d’utilisators que siuvont na pâge',
'tog-oldsig' => 'Signatura ègzistenta :',
'tog-fancysig' => 'Trètar la signatura coment de vouiquitèxto (sen lim ôtomatico)',
-'tog-externaleditor' => 'Empleyér per dèfôt un changior de tèxto de defôr (solament por los utilisators avanciês, at fôta d’una configuracion spèciâla sur voutron ordenator. [//www.mediawiki.org/wiki/Manual:External_editors Més d’enformacions.])',
-'tog-externaldiff' => 'Empleyér per dèfôt un comparator de defôr (solament por los utilisators avanciês, at fôta d’una configuracion spèciâla sur voutron ordenator. [//www.mediawiki.org/wiki/Manual:External_editors Més d’enformacions.])',
'tog-showjumplinks' => 'Activar los lims d’accèssibilitât « {{int:jumpto}} »',
'tog-uselivepreview' => 'Empleyér l’apèrçu rapido (at fôta de JavaScript) (èxpèrimentâl)',
'tog-forceeditsummary' => 'Mè balyér na semonce quand j’é pas buchiê de rèsumâ de changement',
'tog-showhiddencats' => 'Montrar les catègories cachiêes',
'tog-noconvertlink' => 'Dèsactivar la convèrsion des titros des lims',
'tog-norollbackdiff' => 'Pas fâre vêre la dif pendent na rèvocacion',
+'tog-useeditwarning' => 'M’avèrtir quand quito una pâge de changement sen sôvar los changements',
'underline-always' => 'Tojorn',
'underline-never' => 'Jamés',
'content-failed-to-parse' => 'Falyita de l’analisa du contegnu de $2 por lo modèlo $1 : $3',
'invalid-content-data' => 'Balyês du contegnu pas justes',
'content-not-allowed-here' => 'Lo contegnu « $1 » est pas ôtorisâ sur la pâge [[$2]]',
+'editwarning-warning' => 'Quitar ceta pâge vos farat pèrdre tôs los changements que vos éd fêts.
+Se vos éte branchiê, vos pouede enlevar ceti avèrtissement dens la sèccion « Fenétra d’èdicion » de voutres prèferences.',
# Content models
'content-model-wikitext' => 'vouiquitèxto',
Pendent cél temps, vos pouede fâre na rechèrche avouéc Google.
Notâd que lor endèxacion du contegnu de {{SITENAME}} pôt pas étre a jorn.',
-# Quickbar
-'qbsettings' => 'Bârra rapida',
-'qbsettings-none' => 'Pas yona',
-'qbsettings-fixedleft' => 'Fix’a gôche',
-'qbsettings-fixedright' => 'Fix’a drêta',
-'qbsettings-floatingleft' => 'Fllotent’a gôche',
-'qbsettings-floatingright' => 'Fllotent’a drêta',
-'qbsettings-directionality' => 'Fixa, d’aprés la dirèccionalitât d’ècritura de voutra lengoua',
-
# Preferences page
'preferences' => 'Prèferences',
'mypreferences' => 'Prèferences',
'http-read-error' => 'Fôta de lèctura HTTP.',
'http-timed-out' => 'La demanda HTTP at èxpirâ.',
'http-curl-error' => 'Fôta pendent la rècupèracion de l’URL : $1',
-'http-host-unreachable' => 'Y at pas moyen d’avengiér l’URL.',
'http-bad-status' => 'Y at avu un problèmo pendent la demanda HTTP : $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
# Stylesheets
'common.css' => '/* Lo code CSS betâ ique serat aplicâ a tôs los habelyâjos. */',
-'standard.css' => '/* Lo code CSS betâ ique afècterat los usanciérs de l’habelyâjo « Estandârd ». */',
-'nostalgia.css' => '/* Lo code CSS betâ ique afècterat los usanciérs de l’habelyâjo « Cafârd ». */',
'cologneblue.css' => '/* Lo code CSS betâ ique afècterat los usanciérs de l’habelyâjo « Blu de Cologne ». */',
'monobook.css' => '/* Lo code CSS betâ ique afècterat los usanciérs de l’habelyâjo « MonoBook ». */',
-'myskin.css' => '/* Lo code CSS betâ ique afècterat los usanciérs de l’habelyâjo « MonHabelyâjo ». */',
-'chick.css' => '/* Lo code CSS betâ ique afècterat los usanciérs de l’habelyâjo « Pugin ». */',
-'simple.css' => '/* Lo code CSS betâ ique afècterat los usanciérs de l’habelyâjo « Simplo ». */',
'modern.css' => '/* Lo code CSS betâ ique afècterat los usanciérs de l’habelyâjo « Modèrno ». */',
'vector.css' => '/* Lo code CSS betâ ique afècterat los usanciérs de l’habelyâjo « Vèctor ». */',
'print.css' => '/* Lo code CSS betâ ique afècterat les emprèssions. */',
# Scripts
'common.js' => '/* Tot code JavaScript betâ ique serat chargiê per tôs los usanciérs avouéc châque chargement de pâge. */',
-'standard.js' => '/* Tot code JavaScript betâ ique serat chargiê per los usanciérs de l’habelyâjo « Estandârd ». */',
-'nostalgia.js' => '/* Tot code JavaScript betâ ique serat chargiê per los usanciérs de l’habelyâjo « Cafârd ». */',
'cologneblue.js' => '/* Tot code JavaScript betâ ique serat chargiê per los usanciérs de l’habelyâjo « Blu de Cologne ». */',
'monobook.js' => '/* Tot code JavaScript betâ ique serat chargiê per los usanciérs de l’habelyâjo « MonoBook ». */',
-'myskin.js' => '/* Tot code JavaScript betâ ique serat chargiê per los usanciérs de l’habelyâjo « MonHabelyâjo ». */',
-'chick.js' => '/* Tot code JavaScript betâ ique serat chargiê per los usanciérs de l’habelyâjo « Pugin ». */',
-'simple.js' => '/* Tot code JavaScript betâ ique serat chargiê per los usanciérs de l’habelyâjo « Simplo ». */',
'modern.js' => '/* Tot code JavaScript betâ ique serat chargiê per los usanciérs de l’habelyâjo « Modèrno ». */',
'vector.js' => '/* Tot code JavaScript betâ ique serat chargiê per los usanciérs de l’habelyâjo « Vèctor ». */',
'group-autoconfirmed.js' => '/* Tot code JavaScript betâ ique serat chargiê ren que por los usanciérs encartâs. */',
'pageinfo-protect-cascading-yes' => 'Ouè',
# Skin names
-'skinname-standard' => 'Estandârd',
-'skinname-nostalgia' => 'Cafârd',
'skinname-cologneblue' => 'Blu de Cologne',
'skinname-monobook' => 'MonoBook',
-'skinname-myskin' => 'MonHabelyâjo',
-'skinname-chick' => 'Pugin',
-'skinname-simple' => 'Simplo',
'skinname-modern' => 'Modèrno',
'skinname-vector' => 'Vèctor',
'nologin' => 'Non está rexistrado? $1.',
'nologinlink' => 'Cree unha conta',
'createaccount' => 'Crear unha conta nova',
-'gotaccount' => "Xa ten unha conta? '''$1'''.",
+'gotaccount' => 'Xa ten unha conta? $1.',
'gotaccountlink' => 'Acceda ao sistema',
'userlogin-resetlink' => 'Esqueceu os seus datos de rexistro?',
'helplogin-url' => 'Help:Rexistro',
Contrasinal temporal: $2',
'passwordreset-emailsent' => 'Enviouse o correo electrónico de restablecemento do contrasinal.',
'passwordreset-emailsent-capture' => 'Enviouse un correo electrónico de restablecemento do contrasinal, mostrado a continuación.',
-'passwordreset-emailerror-capture' => 'Xerouse un correo electrónico de restablecemento do contrasinal, mostrado a continuación, pero o envío ao usuario fallou: $1',
+'passwordreset-emailerror-capture' => 'Xerouse un correo electrónico de restablecemento do contrasinal, mostrado a continuación, pero o envío {{GENDER:$2|ao usuario|á usuaria}} fallou: $1',
# Special:ChangeEmail
'changeemail' => 'Cambiar o enderezo de correo electrónico',
'tog-shownumberswatching' => 'Aazahl Benutzer aazeige, wo ne Syten am Aaluege sy (i den Artikelsyte, i de «letschten Änderigen» und i der Beobachtigslischte)',
'tog-oldsig' => 'Vorschau vu dr Unterschrift:',
'tog-fancysig' => 'Signatur as Wikitext behandle (ohni automatischi Vergleichig)',
-'tog-externaleditor' => 'Externe Editor als Standard bruche (nume fir Experte, doderzue brucht s speziälli Yystellige uf em Computer. [//www.mediawiki.org/wiki/Manual:External_editors Wyteri Informatione doderzue.])',
-'tog-externaldiff' => 'Extern Programm fir Versionsunterschid als Standard bruche (nume fir Experte, doderzue brucht s speziälli Yystellige uf em Computer. [//www.mediawiki.org/wiki/Manual:External_editors Wyteri Informatione doderzue.])',
'tog-showjumplinks' => '«Wächsle-zu»-Links ermügleche',
'tog-uselivepreview' => 'Live-Vorschau bruche (JavaScript) (experimentell)',
'tog-forceeditsummary' => 'Sag mer s, wänn i s Zämmefassigsfeld läär loss',
'tog-showhiddencats' => 'Zeig di versteckte Kategorie',
'tog-noconvertlink' => 'Konvertierig vum Titel deaktiviere',
'tog-norollbackdiff' => 'Unterschid noch em Zrucksetze unterdrucke',
+'tog-useeditwarning' => 'Warn mi, wänn I ne Syte verloss mit Bearbeitige, wu nonig gspycheret sin',
'underline-always' => 'immer',
'underline-never' => 'nie',
'content-failed-to-parse' => 'Parse vum Inhalt $2 fir Modell $1 fählgschlaa: $3',
'invalid-content-data' => 'Uugiltigi Inhaltsdate',
'content-not-allowed-here' => 'Dr Inhalt „$1“ isch uf dr Syte [[$2]] nit erlaubt',
+'editwarning-warning' => 'Wänn Du die Syte verlosch, cha s syy, ass Du alli Bearbeitige verliersch, wu Du do dra gmacht hesch.
+Wänn Du aagmäldet bisch, chasch s Anzeige vu däre Warnig im „{{int:prefs-editing}}“-Beryych vu Dyyne Yystelligen abstelle.',
# Content models
'content-model-wikitext' => 'Wikitext',
'search-external' => 'Externi Suech',
'searchdisabled' => 'D {{SITENAME}}-Suech isch deaktiviert. Du chasch mit Google sueche, s cha aber syy ass dr Suechindex vu Google fir {{SITENAME}} veraltet isch.',
-# Quickbar
-'qbsettings' => 'Syteleischte',
-'qbsettings-none' => 'Keini',
-'qbsettings-fixedleft' => 'Links, fescht',
-'qbsettings-fixedright' => 'Rächts, fescht',
-'qbsettings-floatingleft' => 'Links, in dr Schwebi',
-'qbsettings-floatingright' => 'Rächts, in dr Schwebi',
-'qbsettings-directionality' => 'Fescht, abhängig vu dr Schrybrichtig vu dr gwehlte Sproch',
-
# Preferences page
'preferences' => 'Yystellige',
'mypreferences' => 'Yystellige',
'http-read-error' => 'Fähler bim Läse vu HTTP.',
'http-timed-out' => 'Uuszyt bim HTTP-Versuech.',
'http-curl-error' => 'Fähler bim Ufsueche vu dr URL: $1',
-'http-host-unreachable' => 'URL isch nit z verwitsche',
'http-bad-status' => 'Bi dr HTTP-Aafrog isch e Fähler ufdrätte: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => 'Kei Benutzer gfunde.',
'listusers-blocked' => '(gsperrt)',
-# Special:ActiveUsers
-'activeusers' => 'Lischt vu dr aktive Benutzer',
-'activeusers-intro' => 'Des isch e Lischt vu Benutzer, wu irgedebis bearbeitet hän {{PLURAL:$1|am letschte Tag|in dr letschte $1 Täg}}.',
-'activeusers-count' => '$1 {{PLURAL:$1|Bearbeitig|Bearbeitige}} {{PLURAL:$3|am letschte Tag|in dr letschte $3 Täg}}',
-'activeusers-from' => 'Zeig Benutzer ab:',
-'activeusers-hidebots' => 'Bötli uusblände',
-'activeusers-hidesysops' => 'Ammanne (Administratore) uusblände',
-'activeusers-noresult' => 'Kei Benutzer gfunde.',
-
# Special:ListGroupRights
'listgrouprights' => 'Benutzergruppe-Rächt',
'listgrouprights-summary' => 'Des isch e Liste vu dr Benutzergruppe, wu in däm Wiki definiert sin, un dr Rächt, wu dermit verbunde sin.
'tog-watchlisthidepatrolled' => 'Follee arraghyn er nyn scrutaghey er my rolley arrey',
'tog-ccmeonemails' => 'Cur coip dou jeh dagh post-l verrym da ymmydeyr elley',
'tog-showhiddencats' => 'Taishbyn ny ronnaghyn follit',
+'tog-useeditwarning' => 'Cur raaue dou my ta mee faagail duillag reaghey gyn sauail yn obbyr jeant aym',
'underline-always' => 'Dagh keayrt',
'underline-never' => 'Ny jean eh arragh',
By chair dhyt smooinagh vel eh kiart goll er oai lesh reaghey yn duillag shoh.<br />
Ta lioar ny scryssaghyn magh kiarit ayns shoh rere dty chaays hene:",
+'editwarning-warning' => "My faagys oo y duillag, hed caghlaaghyn erbee er coayl, foddee.
+My t'ou uss loggalt stiagh, foddee oo lhiettal y raaue shoh 'sy tosheeaghtyn ayd, 'sy rheynn \"Reaghey\".",
# Account creation failure
'cantcreateaccounttitle' => 'Cha nod coontys y chroo',
'powersearch-field' => 'Ronsee er son',
'search-external' => 'Ronsaghey mooie',
-# Quickbar
-'qbsettings-none' => 'Veg',
-
# Preferences page
'preferences' => 'Tosheeaghtyn',
'mypreferences' => 'My hosheeaghtyn',
'tog-watchmoves' => 'מעקב אחרי דפים וקבצים שהעברתי',
'tog-watchdeletion' => 'מעקב אחרי דפים וקבצים שמחקתי',
'tog-minordefault' => 'הגדרת כל פעולת עריכה כמשנית אם לא צוין אחרת',
-'tog-previewontop' => 'הצגת תצוגה מקדימה לפני תיבת העריכה (או: אחריה)',
+'tog-previewontop' => 'הצגת תצוגה מקדימה לפני תיבת העריכה',
'tog-previewonfirst' => 'הצגת תצוגה מקדימה בעריכה ראשונה',
'tog-nocache' => 'מניעת אחסון הדפים בזיכרון המטמון בדפדפן',
'tog-enotifwatchlistpages' => 'לשלוח אליי דואר אלקטרוני כאשר משתנה דף או קובץ ברשימת המעקב שלי',
'tog-enotifusertalkpages' => 'לשלוח אליי דואר אלקטרוני כאשר נעשה שינוי בדף שיחת המשתמש שלי',
'tog-enotifminoredits' => 'לשלוח אליי דואר אלקטרוני גם על עריכות משניות של דפים וקבצים',
'tog-enotifrevealaddr' => 'חשיפת כתובת הדוא"ל שלך בהודעות דוא"ל',
-'tog-shownumberswatching' => 'הצגת מספר המשתמשים העוקבים אחרי הדף',
-'tog-oldsig' => '×\94×\97ת×\99×\9e×\94 ×\94ק×\99×\99×\9eת:',
+'tog-shownumberswatching' => 'הצגת מספר המשתמשים העוקבים',
+'tog-oldsig' => '×\94×\97ת×\99×\9e×\94 ×\94× ×\95×\9b×\97×\99ת:',
'tog-fancysig' => 'פירוש החתימה כקוד ויקי (ללא קישור אוטומטי)',
-'tog-showjumplinks' => 'הצגת קישורי נגישות מסוג "קפוץ אל"',
+'tog-showjumplinks' => 'הצגת קישורי נגישות מסוג "{{int:jumpto}}"',
'tog-uselivepreview' => 'שימוש בתצוגה מקדימה מהירה (דרוש JavaScript) (ניסיוני)',
'tog-forceeditsummary' => 'הצגת אזהרה בעת הכנסת תקציר עריכה ריק',
-'tog-watchlisthideown' => 'הסתרת עריכות שלי ברשימת המעקב',
-'tog-watchlisthidebots' => 'הסתרת בוטים ברשימת המעקב',
+'tog-watchlisthideown' => '×\94סתרת ×\94ער×\99×\9b×\95ת ש×\9c×\99 ×\91רש×\99×\9eת ×\94×\9eעק×\91',
+'tog-watchlisthidebots' => '×\94סתרת ער×\99×\9b×\95ת ש×\9c ×\91×\95×\98×\99×\9d ×\91רש×\99×\9eת ×\94×\9eעק×\91',
'tog-watchlisthideminor' => 'הסתרת עריכות משניות ברשימת המעקב',
'tog-watchlisthideliu' => 'הסתרת עריכות של משתמשים רשומים ברשימת המעקב',
'tog-watchlisthideanons' => 'הסתרת עריכות של משתמשים אנונימיים ברשימת המעקב',
'nov' => "נוב'",
'dec' => "דצמ'",
+'monday-at' => 'ביום שני בשעה $1',
+'tuesday-at' => 'ביום שלישי בשעה $1',
+'wednesday-at' => 'ביום רביעי בשעה $1',
+'thursday-at' => 'ביום חמישי בשעה $1',
+'friday-at' => 'ביום שישי בשעה $1',
+'saturday-at' => 'בשבת בשעה $1',
+'sunday-at' => 'ביום ראשון בשעה $1',
+'today-at' => '$1',
+'yesterday-at' => 'אתמול בשעה $1',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|קטגוריה|קטגוריות}}',
'category_header' => 'דפים בקטגוריה "$1"',
סיסמה זמנית: $2',
'passwordreset-emailsent' => 'נשלח דואר אלקטרוני לאיפוס הסיסמה.',
'passwordreset-emailsent-capture' => 'נשלח דואר אלקטרוני לאיפוס הסיסמה, והוא מוצג להלן.',
-'passwordreset-emailerror-capture' => 'נוצר דואר אלקטרוני לאיפוס הסיסמה, והוא מוצג להלן, אך שליחתו למשתמש נכשלה: $1',
+'passwordreset-emailerror-capture' => 'נוצר דואר אלקטרוני לאיפוס הסיסמה, והוא מוצג להלן, אך שליחתו ל{{GENDER:$2|משתמש|משתמשת}} נכשלה: $1',
# Special:ChangeEmail
'changeemail' => 'שינוי כתובת דוא"ל',
'minutes' => '{{PLURAL:$1|דקה|$1 דקות}}',
'hours' => '{{PLURAL:$1|שעה|שעתיים|$1 שעות}}',
'days' => '{{PLURAL:$1|יום|יומיים|$1 ימים}}',
+'weeks' => '{{PLURAL:$1|שבוע|שבועיים|$1 שבועות}}',
'months' => '{{PLURAL:$1|חודש|חודשיים|$1 חודשים}}',
'years' => '{{PLURAL:$1|שנה|שנתיים|$1 שנים}}',
'ago' => 'לפני $1',
# Image rotation
'rotate-comment' => 'התמונה סובבה {{PLURAL:$1|במעלה אחת|ב֫־$1 מעלות}} בכיוון השעון',
+# Unknown messages
+'hours-ago' => 'לפני {{PLURAL:$1|שעה|שעתיים|$1 שעות}}',
+'minutes-ago' => 'לפני {{PLURAL:$1|דקה|$1 דקות}}',
+'seconds-ago' => 'לפני {{PLURAL:$1|שנייה|$1 שניות}}',
);
'tog-shownumberswatching' => 'ध्यान रखने वाले सदस्यों की संख्या दिखाएँ',
'tog-oldsig' => 'वर्तमान हस्ताक्षर:',
'tog-fancysig' => 'हस्ताक्षर का विकिपाठ के समान उपयोग करें (बिना स्वचालित कड़ी के)',
-'tog-externaleditor' => 'डिफ़ॉल्ट रूप से बाह्य सम्पादक का उपयोग करें (केवल विशेषज्ञों के लिए, इसके लिए संगणक पर विशेष जमाव चाहिए होंगे। [//www.mediawiki.org/wiki/Manual:External_editors अधिक जानकारी।])',
-'tog-externaldiff' => 'डिफ़ॉल्ट रूप से बाह्य अन्तर का उपयोग करें (केवल विशेषज्ञों के लिए, इसके लिए संगणक पर विशेष जमाव चाहिए होंगे। [//www.mediawiki.org/wiki/Manual:External_editors अधिक जानकारी।])',
'tog-showjumplinks' => '"की ओर जाएं" कड़ियाँ उपलब्ध कराएँ',
'tog-uselivepreview' => 'सजीवन झलक का उपयोग करें (जावास्क्रिप्ट चाहिए) (प्रयोगक्षम)',
'tog-forceeditsummary' => 'यदि बदलाव सारांश ना दिया गया हो तो मुझे सूचित करें',
आप गूगल से खोज कर सकते हैं।
ध्यान रखें कि उनकी {{SITENAME}} सामग्री की सूची पुरानी हो सकती है।',
-# Quickbar
-'qbsettings' => 'शीघ्रपट',
-'qbsettings-none' => 'बिल्कुल नहीं',
-'qbsettings-fixedleft' => 'स्थिर बाईं ओर',
-'qbsettings-fixedright' => 'स्थिर दाहिनी ओर',
-'qbsettings-floatingleft' => 'अस्थिर बाईं ओर',
-'qbsettings-floatingright' => 'अस्थिर दाहिनी ओर',
-'qbsettings-directionality' => 'निश्चित, आपकी भाषा की लिपि की दिशात्मकता पर निर्भर',
-
# Preferences page
'preferences' => 'मेरी वरीयताएँ',
'mypreferences' => 'पसंद',
'http-read-error' => 'एच॰टी॰टी॰पी पढ़ने में त्रुटि।',
'http-timed-out' => 'एच॰टी॰टी॰पी अनुरोध का समय समाप्त (टाइम आउट)',
'http-curl-error' => 'यू॰आर॰एल $1 पाने में त्रुटि',
-'http-host-unreachable' => 'यू॰आर॰एल तक पहुँचा नहीं जा सका।',
'http-bad-status' => 'एच॰टी॰टी॰पी अनुरोध के दौरान समस्या थी: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => 'सदस्य नहीं मिला।',
'listusers-blocked' => '(अवरोधित)',
-# Special:ActiveUsers
-'activeusers' => 'सक्रिय सदस्यों की सूची',
-'activeusers-intro' => 'यह सक्रिय सदस्यों की सूची है जिन्होंने पिछले $1 {{PLURAL:$1|दिन|दिनों}} में कुछ गतिविधि करी है।',
-'activeusers-count' => '$1 {{PLURAL:$1|सम्पादन}} पिछले $3 {{PLURAL:$3|दिन|दिनों}} में',
-'activeusers-from' => 'इस अक्षर से शुरू होने वाले सदस्य दिखाएँ:',
-'activeusers-hidebots' => 'बॉट छुपाएँ',
-'activeusers-hidesysops' => 'प्रबंधक छुपाएँ',
-'activeusers-noresult' => 'कोई सदस्य नहीं मिले।',
-
# Special:ListGroupRights
'listgrouprights' => 'सदस्य समूह अधिकार',
'listgrouprights-summary' => 'नीचे इसे विकि के लिए परिभाषित सदस्य समूहों की सूची है, साथ में हर समूह से जुड़े अधिकार भी वर्णित हैं।
'tog-shownumberswatching' => 'Ketna sadasya dekhe hai ke number dekhao',
'tog-oldsig' => 'Abhi ke signature:',
'tog-fancysig' => 'Signature ke wikitext ke rakam dekho (binaa automatic jorr se)',
-'tog-externaleditor' => 'Apne se bahaari editor ke kaam me lao (khaali chalaak logan khatir, computer me special settings ke jaruri hai. [//www.mediawiki.org/wiki/Manual:External_editors More information.])',
-'tog-externaldiff' => ' Apne se bahaari editor ke kaam me lao (khaali chalaak logan khatir, computer me special settings ke jaruri hai. [//www.mediawiki.org/wiki/Manual:External_editors More information.])',
'tog-showjumplinks' => '"jump to" accessibility jorr ke laabu karo',
'tog-uselivepreview' => 'Jinda jhalak ke kaam me lao (JavaScript) (Experimental)',
'tog-forceeditsummary' => 'Ek khali badlao waala summary ke likhe ke time hamse puchho',
'tog-shownumberswatching' => 'Ipakita ang numero sang mga nagalantaw nga manug-gamit',
'tog-oldsig' => 'Nagapabilin nga pirma:',
'tog-fancysig' => 'Tratoha ang pirma bilang wikitext (wala sang tabid nga dayon)',
-'tog-externaleditor' => 'Gamiton dayon ang pang-guha nga manug-ilis (para sa mga sagad lamang, nagakinahanglan sang espesyal nga pagkay-o sa imo computer. [//www.mediawiki.org/wiki/Manual:External_editors Mas madamo pa nga impormasyon.])',
-'tog-externaldiff' => 'Gamiton dayon ang pang-guha nga diff (para sa mga sagad lamang, nagakinahanglan sang espesyal nga pagkay-o sa imo computer. [//www.mediawiki.org/wiki/Manual:External_editors Mas madamo pa nga impormasyon.])',
'tog-showjumplinks' => 'Sugtan ang "maglumpat sa" nga mga tabid sang paalagyan',
'tog-uselivepreview' => 'Gamiton ang preview nga live (nagakinahanglan sang JavaScript) (experimentohanon)',
'tog-forceeditsummary' => 'Sugidi ako kon magasulod ako sa blanko nga kabilogan sang pag-ilis',
Mahimo ka nga magpangita gamit ang Google sa sini nga tion.
Tandai nga ang ila nga palasulundan sang mga unod sang {{SITENAME}} mahimo nga madaan na.',
-# Quickbar
-'qbsettings' => 'Bar nga mahapos',
-'qbsettings-none' => 'Wala',
-'qbsettings-fixedleft' => 'Gintadlong sa wala',
-'qbsettings-fixedright' => 'Gintadlong sa too',
-'qbsettings-floatingleft' => 'Nagalutaw sa wala',
-'qbsettings-floatingright' => 'Nagalutaw sa too',
-'qbsettings-directionality' => 'Indi na maliwat, depende sa direksyon sang iskrip sang imo lenggwahe',
-
# Preferences page
'preferences' => 'Mga Ginabasehan',
'mypreferences' => 'Mga Ginabasehan',
'tog-shownumberswatching' => 'Prikaži broj suradnika koji prate stranicu (u nedavnim izmjenama, popisu praćenja i samim člancima)',
'tog-oldsig' => 'Pregled postojećeg potpisa:',
'tog-fancysig' => 'Običan potpis kao wikitekst (bez automatske poveznice)',
-'tog-externaleditor' => 'Uvijek koristi vanjski program za uređivanje (samo za napredne, potrebne su posebne postavke na računalu. [//www.mediawiki.org/wiki/Manual:External_editors Dodatne informacije.])',
-'tog-externaldiff' => 'Uvijek koristi vanjski program za usporedbu (samo za napredne, potrebne su posebne postavke na računalu. [//www.mediawiki.org/wiki/Manual:External_editors Dodatne informacije.])',
'tog-showjumplinks' => 'Uključi pomoćne poveznice "Skoči na"',
'tog-uselivepreview' => 'Uključi trenutačni pretpregled (JavaScript) (eksperimentalno)',
'tog-forceeditsummary' => 'Podsjeti me ako sažetak uređivanja ostavljam praznim',
'tog-diffonly' => 'Ne prikazuj sadržaj stranice prilikom usporedbe inačica',
'tog-showhiddencats' => 'Prikaži skrivene kategorije',
'tog-norollbackdiff' => 'Izostavi razliku nakon upotrebe ukloni',
+'tog-useeditwarning' => 'Upozori me kad napuštam stranicu za uređivanje bez spremanja izmjena',
'underline-always' => 'Uvijek',
'underline-never' => 'Nikad',
'category-empty' => "''U ovoj kategoriji trenutačno nema članaka ni medija.''",
'hidden-categories' => '{{PLURAL:$1|Skrivena kategorija|Skrivene kategorije|Skrivenih kategorija}}',
'hidden-category-category' => 'Skrivene kategorije',
-'category-subcat-count' => '{{PLURAL:$2|Ova kategorija ima samo sljedeću podkategoriju.|Ova kategorija ima {{PLURAL:$1|podkategoriju|$1 podkategorije|$1 podkategorija}}, od njih $2 ukupno.}}',
+'category-subcat-count' => 'Ova kategorija sadrži $2 {{PLURAL:$2|podkategoriju|podkategorije|podkategorija}}, ovaj popis prikazuje $1.',
'category-subcat-count-limited' => 'Ova kategorija ima {{PLURAL:$1|podkategoriju|$1 podkategorije|$1 podkategorija}}.',
'category-article-count' => '{{PLURAL:$2|Ova kategorija sadrži $2 članak.|{{PLURAL:$1|Prikazano je $1 članak|Prikazana su $1 članka|Prikazano je $1 članaka}} od njih $2 ukupno.}}',
'category-article-count-limited' => '{{PLURAL:$1|stranica je|$1 stranice su|$1 stranica je}} u ovoj kategoriji.',
'content-failed-to-parse' => "Obrada (''parsiranje'') formata $2 za model $1 nije uspjela: $3",
'invalid-content-data' => 'Nevaljani sadržaj',
'content-not-allowed-here' => 'Sadržaj napisan u obliku "$1"-a nije dozvoljen na stranici [[$2]]',
+'editwarning-warning' => 'Napuštanje ove stranice može uzrokovati gubitak svake izmjene koju ste napravili.
+Možete onemogućiti ovo upozorenje u odjeljku "{{int:prefs-editing}}" Vaših postavki.',
# Content models
'content-model-wikitext' => 'wikitekst',
'search-external' => 'Vanjski pretraživač',
'searchdisabled' => '<p>Oprostite! Pretraga po cjelokupnoj bazi je zbog bržeg rada projekta {{SITENAME}} trenutačno onemogućena. Možete se poslužiti tražilicom Google.</p>',
-# Quickbar
-'qbsettings' => 'Traka',
-'qbsettings-none' => 'Bez',
-'qbsettings-fixedleft' => 'Lijevo nepomično',
-'qbsettings-fixedright' => 'Desno nepomično',
-'qbsettings-floatingleft' => 'Lijevo leteće',
-'qbsettings-floatingright' => 'Desno leteće',
-'qbsettings-directionality' => 'Fiksno, ovisno o smjeru pisma Vašeg jezika',
-
# Preferences page
'preferences' => 'Postavke',
'mypreferences' => 'Moje postavke',
'http-read-error' => 'Pogrješka pri čitanju HTTP.',
'http-timed-out' => 'HTTP zahtjev je istekao.',
'http-curl-error' => 'Pogrješka pri otvaranju URL-a: $1',
-'http-host-unreachable' => 'URL nije dostupan.',
'http-bad-status' => 'Došlo je do problema tijekom HTTP zahtjeva: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'pageinfo-protect-cascading-from' => 'Prenosiva zaštita počinje od',
# Skin names
-'skinname-standard' => 'Standardna',
-'skinname-nostalgia' => 'Nostalgija',
'skinname-cologneblue' => 'Kölnska plava',
'skinname-monobook' => 'MonoBook',
-'skinname-myskin' => 'MySkin',
-'skinname-chick' => 'Chick',
# Patrolling
'markaspatrolleddiff' => 'Označi za pregledano',
'tog-shownumberswatching' => 'Ličbu wobkedźbowacych wužiwarjow pokazać',
'tog-oldsig' => 'Eksistowaca signatura:',
'tog-fancysig' => 'Ze signaturu kaž z wikitekstom wobchadźeć (bjez awtomatiskeho wotkaza)',
-'tog-externaleditor' => 'Eksterny editor jako standard wužiwać (jenož za ekspertow, žada sej specialne nastajenja na wašim ličaku. [//www.mediawiki.org/wiki/Manual:External_editors Dalše informacije.])',
-'tog-externaldiff' => 'Eksterny diff-program jako standard wužiwać (jenož za ekspertow, žada sej specialne nastajenja na wašim ličaku. [//www.mediawiki.org/wiki/Manual:External_editors Dalše informacije.])',
'tog-showjumplinks' => 'Wotkazy typa „dźi do” zmóžnić',
'tog-uselivepreview' => 'Live-přehlad wužiwać (wužaduje sej JavaScript) (eksperimentalny)',
'tog-forceeditsummary' => 'Mje skedźbnić, jeli zabudu zjeće',
'tog-diffonly' => 'Jenož rozdźěle pokazać (nic pak zbytny wobsah)',
'tog-showhiddencats' => 'Schowane kategorije pokazać',
'tog-norollbackdiff' => 'Rozdźěl po wróćostajenju zanjechać',
+'tog-useeditwarning' => 'Warnować, hdyž so wobdźěłowanska strona z njeskładowanymi změnami wopušća',
'underline-always' => 'Přeco',
'underline-never' => 'Ženje',
'content-failed-to-parse' => 'Parsowanje wobsaha $2 za model $1 je so njeporadźiło: $3',
'invalid-content-data' => 'Njepłaćiwe wobsahowe daty',
'content-not-allowed-here' => 'Wobsah "$1" njeje na stronje [[$2]] dowoleny',
+'editwarning-warning' => 'Hdyž so strona wopušća, móžeja so změny zhubić, kotrež sy přewjedł. Jeli sy přizjewjeny, móžeš tute warnowanje we wotrězku {{int:prefs-editing}} swojich nastajenjow znjemóžnić.',
# Content models
'content-model-wikitext' => 'wikitekst',
'tog-shownumberswatching' => 'A lapot figyelő szerkesztők számának megjelenítése',
'tog-oldsig' => 'A jelenlegi aláírás:',
'tog-fancysig' => 'Az aláírás wikiszöveg (nem lesz automatikusan hivatkozásba rakva)',
-'tog-externaleditor' => 'Külső szerkesztőprogram használata (Csak haladók számára, speciális beállításokra van szükség a számítógépen. [//www.mediawiki.org/wiki/Manual:External_editors További információ angolul.])',
-'tog-externaldiff' => 'Külső diff program használata (Csak haladók számára, speciális beállításokra van szükség a számítógépen. [//www.mediawiki.org/wiki/Manual:External_editors További információ angolul.])',
'tog-showjumplinks' => 'Helyezzen el hivatkozást („Ugrás”) a beépített eszköztárra',
'tog-uselivepreview' => 'Élő előnézet használata (JavaScript-alapú, kísérleti)',
'tog-forceeditsummary' => 'Figyelmeztessen, ha nem adok meg szerkesztési összefoglalót',
'tog-diffonly' => 'Ne mutassa a lap tartalmát a lapváltozatok közötti eltérések megtekintésekor',
'tog-showhiddencats' => 'Rejtett kategóriák megjelenítése',
'tog-norollbackdiff' => 'Ne jelenjenek meg az eltérések visszaállítás után',
+'tog-useeditwarning' => 'Figyelmeztessen, ha szerkesztéskor a módosítások mentése nélkül akarom elhagyni a lapot',
'underline-always' => 'mindig',
'underline-never' => 'soha',
'welcomecreation-msg' => 'A felhasználói fiókod elkészült.
Ne felejtsd el módosítani a [[Special:Preferences|{{SITENAME}} beállításaidat]].',
'yourname' => 'Szerkesztőneved:',
+'userlogin-yourname' => 'Felhasználónév',
'yourpassword' => 'Jelszavad:',
+'userlogin-yourpassword' => 'Jelszó',
'yourpasswordagain' => 'Jelszavad ismét:',
'remembermypassword' => 'Emlékezzen rám ezen a számítógépen (legfeljebb $1 napig)',
+'userlogin-remembermypassword' => 'Emlékezzen rám',
+'userlogin-signwithsecure' => 'Bejelentkezés a biztonságos kiszolgálón keresztül',
'securelogin-stick-https' => 'Kapcsolódás HTTPS-en keresztül bejelentkezés után is',
'yourdomainname' => 'A domainneved:',
'password-change-forbidden' => 'Nem módosíthatod a jelszót ezen a wikin.',
'logout' => 'Kijelentkezés',
'userlogout' => 'Kijelentkezés',
'notloggedin' => 'Nem vagy bejelentkezve',
+'userlogin-noaccount' => 'Nem rendelkezel még felhasználói fiókkal?',
+'userlogin-joinproject' => 'Csatlakozz a(z) {{SITENAME}} wikihez',
'nologin' => "Nem rendelkezel még felhasználói fiókkal? '''$1'''.",
'nologinlink' => 'Itt regisztrálhatsz',
'createaccount' => 'Regisztráció',
'gotaccount' => "Ha már korábban regisztráltál, '''$1'''.",
'gotaccountlink' => 'Bejelentkezés',
'userlogin-resetlink' => 'Elfelejtetted a bejelentkezési adataidat?',
+'helplogin-url' => 'Help:Bejelentkezés',
+'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Segítség a bejelentkezéshez]]',
'createaccountmail' => 'Átmeneti, véletlenszerű jelszó használata és kiküldése az alábbi e-mail címre',
'createaccountreason' => 'Indoklás:',
'badretype' => 'A megadott jelszavak nem egyeznek.',
# Special:PasswordReset
'passwordreset' => 'Jelszó törlése',
-'passwordreset-text' => 'Az alábbi űrlap kitöltése után egy értesítő e-mailt kapsz a fiókod adataival.',
+'passwordreset-text' => 'Az alábbi űrlap kitöltése után egy jelszóemlékeztető e-mailt kapsz a fiókod adataival.',
'passwordreset-legend' => 'Új jelszó kérése',
'passwordreset-disabled' => 'Új jelszó kérése nem engedélyezett ezen a wikin.',
+'passwordreset-emaildisabled' => 'Az e-mail funkció le van tiltva ezen a wikin.',
'passwordreset-pretext' => '{{PLURAL:$1||Írd be az alábbi adatok egyikét}}',
'passwordreset-username' => 'Felhasználónév:',
'passwordreset-domain' => 'Tartomány:',
'content-failed-to-parse' => 'Hiba történt a $2 tartalom $1 modellre történő konvertálása során: $3',
'invalid-content-data' => 'Érvénytelen tartalom adat',
'content-not-allowed-here' => '"$1" tartalom nem engedélyezett a [[$2]] oldalon',
+'editwarning-warning' => 'A lap elhagyásával az összes itt végzett változtatás elveszhet.
+Ha be vagy jelentkezve letilthatod ezt a figyelmeztetést a beállításaid „{{int:prefs-editing}}” szakaszában.',
# Content models
'content-model-wikitext' => 'wikiszöveg',
'search-external' => 'Külső kereső',
'searchdisabled' => 'Elnézésed kérjük, de a teljes szöveges keresés terhelési okok miatt átmenetileg nem használható. Ezidő alatt használhatod a lenti Google keresést, mely viszont lehetséges, hogy nem teljesen friss adatokkal dolgozik.',
-# Quickbar
-'qbsettings' => 'Gyorsmenü',
-'qbsettings-none' => 'Nincs',
-'qbsettings-fixedleft' => 'Fix baloldali',
-'qbsettings-fixedright' => 'Fix jobboldali',
-'qbsettings-floatingleft' => 'Lebegő baloldali',
-'qbsettings-floatingright' => 'Lebegő jobboldali',
-'qbsettings-directionality' => 'Rögzített, a nyelved írásának irányától függően',
-
# Preferences page
'preferences' => 'Beállítások',
'mypreferences' => 'Beállítások',
'http-read-error' => 'HTTP-olvasási hiba.',
'http-timed-out' => 'A HTTP-kérés túllépte a határidőt.',
'http-curl-error' => 'Hiba történt az URL lekérésekor: $1',
-'http-host-unreachable' => 'Nem sikerült elérni az URL-t.',
'http-bad-status' => 'Probléma történt a HTTP-kérés közben: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => 'Nem található szerkesztő.',
'listusers-blocked' => '(blokkolva)',
-# Special:ActiveUsers
-'activeusers' => 'Aktív szerkesztők listája',
-'activeusers-intro' => 'Ez a lap azon felhasználók listáját tartalmazza, akik csináltak valamilyen tevékenységet az elmúlt {{PLURAL:$1|egy|$1}} napban.',
-'activeusers-count' => '$1 szerkesztés az utolsó $3 napban',
-'activeusers-from' => 'Szerkesztők listázása a következő névtől kezdve:',
-'activeusers-hidebots' => 'Botok elrejtése',
-'activeusers-hidesysops' => 'Adminisztrátorok elrejtése',
-'activeusers-noresult' => 'Nem található ilyen szerkesztő.',
-
# Special:ListGroupRights
'listgrouprights' => 'Szerkesztői csoportok jogai',
'listgrouprights-summary' => 'Lenn láthatóak a wikiben létező szerkesztői csoportok, valamint az azokhoz tartozó jogok.
# Stylesheets
'common.css' => '/* Közös CSS az összes felületnek */',
-'standard.css' => '/* Az ide elhelyezett CSS hatással lesz a Klasszikus felület használóira */',
-'nostalgia.css' => '/* Az ide elhelyezett CSS hatással lesz a Nosztalgia felület használóira */',
'cologneblue.css' => '/* Az ide elhelyezett CSS hatással lesz a Kölni kék felület használóira */',
'monobook.css' => '/* Az ide elhelyezett CSS hatással lesz a Monobook felület használóira */',
-'myskin.css' => '/* Az ide elhelyezett CSS hatással lesz a MySkin felület használóira */',
-'chick.css' => '/* Az ide elhelyezett CSS hatással lesz a Chick felület használóira */',
-'simple.css' => '/* Az ide elhelyezett CSS hatással lesz a Egyszerű felület használóira */',
'modern.css' => '/* Az ide elhelyezett CSS hatással lesz a Modern felület használóira */',
'vector.css' => '/* Az ide elhelyezett CSS hatással lesz a Vector felület használóira */',
'print.css' => '/* Az ide elhelyezett CSS hatással lesz a nyomtatás kimenetelére */',
# Scripts
'common.js' => '/* Az ide elhelyezett JavaScript kód minden felhasználó számára lefut az oldalak betöltésekor. */',
-'standard.js' => '/* A Klasszikus felületet használó szerkesztők számára betöltendő JavaScriptek */',
-'nostalgia.js' => '/* A Nosztalgia felületet használó szerkesztők számára betöltendő JavaScriptek */',
'cologneblue.js' => '/* A Kölni kék felületet használó szerkesztők számára betöltendő JavaScriptek */',
'monobook.js' => '/* A Monobook felületet használó szerkesztők számára betöltendő JavaScriptek */',
-'myskin.js' => '/* A MySkin felületet használó szerkesztők számára betöltendő JavaScriptek */',
-'chick.js' => '/* A Chick felületet használó szerkesztők számára betöltendő JavaScriptek */',
-'simple.js' => '/* Az Egyszerű felületet használó szerkesztők számára betöltendő JavaScriptek */',
'modern.js' => '/* A Modern felületet használó szerkesztők számára betöltendő JavaScriptek */',
'vector.js' => '/* A Vector felületet használó szerkesztők számára betöltendő JavaScriptek */',
'group-autoconfirmed.js' => '/* Az ide elhelyezett JavaScript csak automatikusan megerősített felhasználóknak töltődik be */',
'pageinfo-category-files' => 'Fájlok száma',
# Skin names
-'skinname-standard' => 'Klasszikus',
-'skinname-nostalgia' => 'Nosztalgia',
'skinname-cologneblue' => 'Kölni kék',
'skinname-monobook' => 'MonoBook',
-'skinname-myskin' => 'MySkin',
-'skinname-chick' => 'Chick',
-'skinname-simple' => 'Egyszerű',
'skinname-modern' => 'Modern',
# Patrolling
# New logging system
'logentry-delete-delete' => '$1 törölte a következő lapot: $3',
'logentry-delete-restore' => '$1 helyreállította a következő lapot: $3',
-'logentry-delete-event' => '$1 megváltoztatta {{PLURAL:$5|egy napló bejegyzés|$5 napló bejegyzés}} láthatóságát $3 lapon: $4',
+'logentry-delete-event' => '$1 megváltoztatta {{PLURAL:$5|egy napló bejegyzés|$5 napló bejegyzés}} láthatóságát a(z) $3 című lapon: $4',
'logentry-delete-revision' => '$1 módosította a(z) $3 című lap {{PLURAL:$5|egy|$1}} lapváltozatának láthatóságát: $4',
'logentry-delete-event-legacy' => '$1 módosította a(z) $3 című lap naplóbejegyzéseinek láthatóságát',
'logentry-delete-revision-legacy' => '$1 módosította a(z) $3 című lap lapváltozatainak láthatóságát',
'logentry-suppress-delete' => '$1 elrejtette a következő lapot: $3',
-'logentry-suppress-event' => '$1 rejtetten megváltoztatta {{PLURAL:$5|egy napló bejegyzés|$5 napló bejegyzés}} láthatóságát $3 lapon: $4',
-'logentry-suppress-revision' => '$1 rejtetten megváltoztatta {{PLURAL:$5|egy változat|$5 változat}} láthatóságát $3 lapon: $4',
-'logentry-suppress-event-legacy' => '$1 rejtetten megváltoztatta napló bejegyzések láthatóságát a(z) $3 lapon',
+'logentry-suppress-event' => '$1 rejtetten megváltoztatta {{PLURAL:$5|egy napló bejegyzés|$5 napló bejegyzés}} láthatóságát a(z) $3 című lapon: $4',
+'logentry-suppress-revision' => '$1 rejtetten megváltoztatta {{PLURAL:$5|egy változat|$5 változat}} láthatóságát a(z) $3 című lapon: $4',
+'logentry-suppress-event-legacy' => '$1 rejtetten megváltoztatta napló bejegyzések láthatóságát a(z) $3 című lapon',
'logentry-suppress-revision-legacy' => '$1 rejtetten megváltoztatta változatok láthatóságát a(z) $3 lapon',
'revdelete-content-hid' => 'tartalom elrejtve',
'revdelete-summary-hid' => 'szerkesztési összefoglaló elrejtve',
'tog-shownumberswatching' => 'Ցույց տալ էջ հսկող մասնակիցների թիվը',
'tog-oldsig' => 'Ներկայիս ստորագրությունն է․',
'tog-fancysig' => 'Ստորագրությունը վիքիտեքստի տեսքով (առանց ավտոմատ հղման)',
-'tog-externaleditor' => 'Օգտագործել արտաքին խմբագրիչ ըստ լռության (պահանջում է հատուկ նախընտրություններ ձեր համակարգչում)',
-'tog-externaldiff' => 'Օգտագործել տարբերակների համեմատման արտաքին ծրագիր ըստ լռության (պահանջում է հատուկ նախընտրություններ ձեր համակարգչում)',
'tog-showjumplinks' => 'Միացնել «անցնել դեպի» օգնական հղումները',
'tog-uselivepreview' => 'Օգտագործել ուղիղ նախադիտում (JavaScript) (Փորձնական)',
'tog-forceeditsummary' => 'Նախազգուշացնել խմբագրման ամփոփումը դատարկ թողնելու դեպքում',
'tog-diffonly' => 'Չցուցադրել էջի պարունակությունը տարբերությունների ներքևից',
'tog-showhiddencats' => 'Ցուցադրել թաքնված կատեգորիաները',
'tog-norollbackdiff' => 'Չցուցադրել տարբերությունները հետ գլորելուց հետո',
+'tog-useeditwarning' => 'Զգուշացնել ինձ, երբ ես լքում եմ խմբագրման էջը առանց կատարած փոփոխությունները հիշելու։',
'underline-always' => 'Միշտ',
'underline-never' => 'Երբեք',
'edit-conflict' => 'Խմբագրման ընհարում։',
'edit-no-change' => 'Ձեր խմբագրումը անտեսվել է, քանի որ ոչ մի փոփոխություն չի կատարվել տեքստի մեջ։',
'defaultmessagetext' => 'Լռելյան տեքստը',
+'editwarning-warning' => 'Այս էջը լքելով դուք կարող եք կորցնել ձեր կատարած փոփոխությունները։
+Եթե դուք գրանցված եք համակարգում, կարող եք անջատել այս նախազգուշացումը ձեր նախընրությունների «{{int:prefs-editing}}» բաժնում։',
# Content models
'content-model-wikitext' => 'վիքիտեքստ',
'search-external' => 'Արտաքին որոնում',
'searchdisabled' => '{{SITENAME}} կայքի ներքին որոնումը անջատված է։ Դուք կարող եք որոնել կայքի պարունակությունը արտաքին որոնման շարժիչներով (Google, Yahoo...), սակայն, ի նկատի ունեցեք, որ կայքի իրենց ինդեքսները կարող են հնացած լինել։',
-# Quickbar
-'qbsettings' => 'Արագ անցման վահանակ',
-'qbsettings-none' => 'Չցուցադրել',
-'qbsettings-fixedleft' => 'Ձախից անշարժ',
-'qbsettings-fixedright' => 'Աջից անշարժ',
-'qbsettings-floatingleft' => 'Ձախից լողացող',
-'qbsettings-floatingright' => 'Աջից լողացող',
-
# Preferences page
'preferences' => 'Նախընտրություններ',
'mypreferences' => 'Նախընտրություններ',
'listusers-noresult' => 'Այդպիսի մասնակիցներ չգտնվեցին։',
'listusers-blocked' => '(արգելափակված)',
-# Special:ActiveUsers
-'activeusers' => 'Ակտիվ մասնակիցների ցանկ',
-'activeusers-noresult' => 'Այդպիսի մասնակիցներ չեն գտնվել։',
-
# Special:ListGroupRights
'listgrouprights-members' => '(անդամների ցանկ)',
'listgrouprights-addgroup' => 'Ավելացնեել {{PLURAL:$2|խումբ|խմբեր}}՝ $1',
'pageinfo-protect-cascading-yes' => 'Այո',
# Skin names
-'skinname-standard' => 'Դասական',
-'skinname-nostalgia' => 'Հայրենաբաղձություն',
'skinname-cologneblue' => 'Քյոլնի թախիծ',
'skinname-monobook' => 'ՄիաԳիրք',
-'skinname-myskin' => 'ԻմՏեսք',
-'skinname-chick' => 'Ծիտ',
-'skinname-simple' => 'Պարզ',
'skinname-modern' => 'Մոդերն',
'skinname-vector' => 'Սովորական',
'nov' => 'nov',
'dec' => 'dec',
+'monday-at' => 'Lunedi a $1',
+'tuesday-at' => 'Martedi a $1',
+'wednesday-at' => 'Mercuridi a $1',
+'thursday-at' => 'Jovedi a $1',
+'friday-at' => 'Venerdi a $1',
+'saturday-at' => 'Sabbato a $1',
+'sunday-at' => 'Dominica a $1',
+'today-at' => '$1',
+'yesterday-at' => 'Heri a $1',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|Categoria|Categorias}}',
'category_header' => 'Articulos in le categoria "$1"',
# Image rotation
'rotate-comment' => 'Imagine rotate de $1 {{PLURAL:$1|grado|grados}} in senso horologic',
+# Unknown messages
+'hours-ago' => '$1 {{PLURAL:$1|hora|horas}} retro',
+'minutes-ago' => '$1 {{PLURAL:$1|minuta|minutas}} retro',
+'seconds-ago' => '$1 {{PLURAL:$1|secunda|secundas}} retro',
);
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-hans' => 'hans',
'tog-shownumberswatching' => 'Ipakita ti bilang dagiti agbuybuya nga agar-aramat',
'tog-oldsig' => 'Ti adda a pirma:',
'tog-fancysig' => 'Tratuen ti pirma a kas wikitext (nga awan ti automatiko a panagsilpo)',
-'tog-externaleditor' => 'Isigud ti panag-usar iti ruar a pnag-urnos (para dagiti eksperto laeng, masapul ti nangruna a kasasaad a panagikabil idiay kompiutermo. [//www.mediawiki.org/wiki/Manual:External_editors Adu pay a pakaammo.])',
-'tog-externaldiff' => 'Isigud ti panag-usar iti ruar a sabali (para dagiti eksperto laeng, masapul ti nangruna a kasasaad a panagikabil idiay kompiutermo. [//www.mediawiki.org/wiki/Manual:External_editors Adu pay a pakaammo.])',
'tog-showjumplinks' => 'Pakabaelan a "lumaktaw kadagiti" naipalaka a pagserkan a silpo',
'tog-uselivepreview' => 'Usaren ti agdama a panagpadas (masapul ti JavaScript) (eksperimento)',
'tog-forceeditsummary' => 'Pakaammuannak no sumrek ti blanko a pakabuklan ti panag-urnos',
'tog-diffonly' => 'Saan nga iparang ti linaon ti panid dita baba dagiti pagiddiatan',
'tog-showhiddencats' => 'Ipakita dagiti nailemmeng a kategoria',
'tog-norollbackdiff' => 'Laksiden ti paggiddiatan kalpasan ti panagaramid ti panagisubli',
+'tog-useeditwarning' => 'Pakaunaannak no pumanawak ti pagurnosan a panid nga adda ti saan a naidulin a sinuksukatan',
'underline-always' => 'Kanayon',
'underline-never' => 'Saan uray kaanoman',
'content-failed-to-parse' => 'Napaay a nausig ti $2 a linaon para iti $1 a modelo: $3',
'invalid-content-data' => 'Imbalido a datos ti linaon',
'content-not-allowed-here' => 'Ti "$1" a linaon ket saan a maipalubos idiay [[$2]] a panid',
+'editwarning-warning' => 'Ti ipapanaw ti daytoy a panid ket makapataud ti panakapukaw kadagiti amiaman a binalbaliwam.
+No nakastrekka, mabalinmo nga ibaldado daytoy a ballaag idiay "Panagurnos" a paset kadagiti kakaykayatam.',
# Content models
'content-model-wikitext' => 'wikitext',
Mabalin mo ti agbiruk idiay Google tattan.
Laglagipem laeng a dagiti pagsurotan nagyan ti {{SITENAME}} ket baka baak.',
-# Quickbar
-'qbsettings' => 'Quickbar',
-'qbsettings-none' => 'Awan',
-'qbsettings-fixedleft' => 'Agyan latta iti kanigid',
-'qbsettings-fixedright' => 'Agyan latta iti kanawan',
-'qbsettings-floatingleft' => 'Tumpaw ti kanigid',
-'qbsettings-floatingright' => 'Tumpaw ti kanawan',
-'qbsettings-directionality' => 'Nasimpa, gapu laeng ti papanan ti panagsurat ti pagsasaom',
-
# Preferences page
'preferences' => 'Kakaykayatan',
'mypreferences' => 'Kakaykayatan',
* @author Reedy
* @author Sapral Mikail
* @author Tagir
+ * @author Умар
*/
$fallback = 'ru';
'tog-shownumberswatching' => 'Ший теркама дагарленгах оагӀув чулаьца бола дакъалаьцархой таьрах хьахьокха',
'tog-oldsig' => 'Дола кулгайоазув:',
'tog-fancysig' => 'Ший кулга яздара массахоамбаккхам (ший лоӀаме Ӏинка йоацаш)',
-'tog-externaleditor' => 'Арена гӀалатнийсдарца болх бе (ший болх ховш болачара мара мегаш дац, хьамлоархIара ший-тайпара оттам эша; [//www.mediawiki.org/wiki/Manual:External_editors хьажа эша])',
-'tog-externaldiff' => 'Арена бӀасакхосса болхоагӀувца болх бе (ший болх ховш болачара мара мегаш дац, хьамлоархIара ший-тайпара оттам эша; [//www.mediawiki.org/wiki/Manual:External_editors хьажа эша])',
'tog-showjumplinks' => '"Дехьадала" яха новкъостала Ӏинк хьахьокха',
'tog-uselivepreview' => 'Сиха бӀарахьажар (JavaScript) (Экспериментально)',
'tog-forceeditsummary' => 'Хоам бе, хувцамий лоацам белгал даь деце',
'powersearch-toggleall' => 'Деррига',
'powersearch-togglenone' => 'Цхьаккха',
-# Quickbar
-'qbsettings-none' => 'Цхьаккха',
-
# Preferences page
'preferences' => 'Оттамаш',
'mypreferences' => 'Оттамаш',
# Special:ListGroupRights
'listgrouprights-members' => '(тоабий дагарче)',
-# E-mail user
+# Email user
'emailuser' => 'Дакъалаьцархочоа д-хоамни:',
# Watchlist
'tog-shownumberswatching' => 'Sýna fjölda vaktandi notenda',
'tog-oldsig' => 'Núverandi undirskrift:',
'tog-fancysig' => 'Meðhöndla undirskrift sem wikimál (án sjálfvirks tengils)',
-'tog-externaleditor' => 'Nota utanaðkomandi ritil sjálfgefið (eingöngu fyrir reynda, þarfnast sérstakra stillinga á tölvunni þinni. [//www.mediawiki.org/wiki/Manual:External_editors Frekari upplýsingar.])',
-'tog-externaldiff' => 'Nota utanaðkomandi mismun sjálfgefið (eingöngu fyrir reynda, þarfnast sérstakra stillinga á tölvunni þinni. [//www.mediawiki.org/wiki/Manual:External_editors Frekari upplýsingar.])',
'tog-showjumplinks' => 'Virkja „stökkva á“ aðgengitengla',
'tog-uselivepreview' => 'Nota beina forskoðun (JavaScript) (Á tilraunastigi)',
'tog-forceeditsummary' => 'Birta áminningu þegar breytingarágripið er tómt',
'tog-diffonly' => 'Ekki sýna síðuefni undir mismunum',
'tog-showhiddencats' => 'Sýna falda flokka',
'tog-norollbackdiff' => 'Sleppa breytingu eftir að endurvakning síðu hefur verið gerð.',
+'tog-useeditwarning' => 'Vara mig við þegar ég fer frá breytingarsíðu með óvistaðar breytingar',
'underline-always' => 'Alltaf',
'underline-never' => 'Aldrei',
'content-failed-to-parse' => 'Gat ekki þáttað $2 efni samkvæmt $1 líkani: $3',
'invalid-content-data' => 'Ógild efnisgögn.',
'content-not-allowed-here' => '„$1“ efni er ekki leyfilegt á síðunni [[$2]]',
+'editwarning-warning' => 'Ef farið er frá þessari síðu gætu þær breytingar sem þú hefur gert tapast.
+Ef þú ert skráður inn, þá getur þú óvirkjað þessi skilaboð í „Breytingarflipanum" undir stillingum.',
# Content models
'content-model-wikitext' => 'wiki-texti',
'nov' => 'nov',
'dec' => 'dic',
+'monday-at' => 'Lunedì alle $1',
+'tuesday-at' => 'Martedì alle $1',
+'wednesday-at' => 'Mercoledì alle $1',
+'thursday-at' => 'Giovedì alle $1',
+'friday-at' => 'Venerdì alle $1',
+'saturday-at' => 'Sabato alle $1',
+'sunday-at' => 'Domenica alle $1',
+'yesterday-at' => 'Ieri alle $1',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|Categoria|Categorie}}',
'category_header' => 'Pagine nella categoria "$1"',
'site-atom-feed' => 'Feed Atom di $1',
'page-rss-feed' => 'Feed RSS per "$1"',
'page-atom-feed' => 'Feed Atom per "$1"',
-'feed-rss' => 'RSS',
'red-link-title' => '$1 (la pagina non esiste)',
'sort-descending' => 'Ordinamento decrescente',
'sort-ascending' => 'Ordinamento crescente',
Password temporanea: $2',
'passwordreset-emailsent' => 'È stata inviata una email di reimpostazione della password.',
'passwordreset-emailsent-capture' => 'È stata inviata una email di reimpostazione della password, il contenuto è riportato di seguito.',
-'passwordreset-emailerror-capture' => "È stata generata una email di reimpostazione della password riportata di seguito. L'invio all'utente non è riuscito: $1",
+'passwordreset-emailerror-capture' => "È stata generata una email di reimpostazione della password, riportata di seguito. L'invio {{GENDER:$2|all'utente}} non è riuscito: $1",
# Special:ChangeEmail
'changeemail' => "Modifica l'indirizzo e-mail",
'converter-manual-rule-error' => 'Rilevato errore nella regola manuale di conversione della lingua',
# "Undo" feature
-'undo-success' => 'Questa modifica può essere annullata. Verificare il confronto presentato di seguito per accertarsi che il contenuto corrisponda a quanto desiderato e quindi salvare le modifiche per completare la procedura di annullamento.',
+'undo-success' => 'Questa modifica può essere annullata.
+Controlla le differenze mostrate sotto fra le due versioni per essere certo che il contenuto corrisponda a quanto desiderato, e quindi salvare le modifiche per completare la procedura di annullamento.',
'undo-failure' => 'Impossibile annullare la modifica a causa di un conflitto con modifiche intermedie.',
'undo-norev' => 'La modifica non può essere annullata perché non esiste o è stata cancellata.',
'undo-summary' => 'Annullata la modifica $1 di [[Special:Contributions/$2|$2]] ([[User talk:$2|discussione]])',
'editinguser' => "Modifica diritti utente dell'utente '''[[User:$1|$1]]''' $2",
'userrights-editusergroup' => 'Modifica gruppi utente',
'saveusergroups' => 'Salva gruppi utente',
-'userrights-groupsmember' => 'Appartiene ai gruppi:',
+'userrights-groupsmember' => 'Appartiene {{PLURAL:$1|al gruppo|ai gruppi}}:',
'userrights-groupsmember-auto' => 'Membro implicito di:',
'userrights-groups-help' => "È possibile modificare i gruppi cui è assegnato l'utente.
* Una casella di spunta selezionata indica l'appartenenza dell'utente al gruppo
'savefile' => 'Salva file',
'uploadedimage' => 'ha caricato "[[$1]]"',
'overwroteimage' => 'ha caricato una nuova versione di "[[$1]]"',
-'uploaddisabled' => 'Il caricamento dei file è temporaneamente sospeso.',
+'uploaddisabled' => 'Il caricamento dei file è disabilitato.',
'copyuploaddisabled' => 'Il caricamento tramite URL è disabilitato.',
'uploadfromurl-queued' => 'Il caricamento è stato accodato.',
'uploaddisabledtext' => 'Il caricamento dei file non è attivo.',
'undeleteextrahelp' => "Per recuperare l'intera cronologia della pagina, lasciare tutte le caselle deselezionate e fare clic su '''''{{int:undeletebtn}}'''''.
Per effettuare un ripristino selettivo, selezionare le caselle corrispondenti alle revisioni da ripristinare e fare clic su '''''{{int:undeletebtn}}'''''.",
'undeleterevisions' => '{{PLURAL:$1|Una revisione|$1 revisioni}} in archivio',
-'undeletehistory' => 'Recuperando questa pagina, tutte le sue revisioni verranno ripristinate nella relativa cronologia. Se dopo la cancellazione è stata creata una nuova pagina con lo stesso titolo, le revisioni recuperate saranno inserite nella cronologia precedente.',
+'undeletehistory' => 'Recuperando questa pagina, tutte le sue versioni verranno ripristinate nella relativa cronologia.
+Se dopo la cancellazione è stata creata una nuova pagina con lo stesso titolo, le revisioni recuperate saranno inserite nella cronologia precedente.',
'undeleterevdel' => "Il ripristino non verrà effettuato se determina la cancellazione parziale della versione attuale della pagina o del file interessato. In tal caso, è necessario rimuovere il segno di spunta o l'oscuramento dalle revisioni cancellate più recenti.",
'undeletehistorynoadmin' => "Questa pagina è stata cancellata.
Il motivo della cancellazione è mostrato qui sotto, assieme ai dettagli dell'utente che ha modificato questa pagina prima della cancellazione.
Consultare il [[Special:Log/delete|log delle cancellazioni]] per vedere le cancellazioni e i recuperi più recenti.",
'undelete-header' => 'Consultare il [[Special:Log/delete|log delle cancellazioni]] per vedere le cancellazioni più recenti.',
'undelete-search-title' => 'Ricerca nelle pagine cancellate',
-'undelete-search-box' => 'Ricerca nelle pagine cancellate',
+'undelete-search-box' => 'Ricerca le pagine cancellate',
'undelete-search-prefix' => 'Mostra le pagine il cui titolo inizia con:',
'undelete-search-submit' => 'Cerca',
'undelete-no-results' => "Nessuna pagina corrispondente nell'archivio delle cancellazioni.",
# Image rotation
'rotate-comment' => 'Immagine ruotata di $1 {{PLURAL:$1|grado|gradi}} in senso orario',
+# Unknown messages
+'hours-ago' => '$1 {{PLURAL:$1|ora|ore}} fa',
+'minutes-ago' => '$1 {{PLURAL:$1|minuto|minuti}} fa',
+'seconds-ago' => '$1 {{PLURAL:$1|secondo|secondi}} fa',
);
'nov' => '11月',
'dec' => '12月',
+'monday-at' => '月曜日 $1',
+'tuesday-at' => '火曜日 $1',
+'wednesday-at' => '水曜日 $1',
+'thursday-at' => '木曜日 $1',
+'friday-at' => '金曜日 $1',
+'saturday-at' => '土曜日 $1',
+'sunday-at' => '日曜日 $1',
+'today-at' => '$1',
+'yesterday-at' => '昨日 $1',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|カテゴリ}}',
'category_header' => 'カテゴリ「$1」にあるページ',
仮パスワード: $2',
'passwordreset-emailsent' => 'パスワード再設定メールをお送りしました。',
'passwordreset-emailsent-capture' => '下記の内容の、パスワード再設定メールをお送りしました。',
-'passwordreset-emailerror-capture' => '以下の内容のパスワード再設定メールを生成しましたが、利用者への送信に失敗しました: $1',
+'passwordreset-emailerror-capture' => '以下の内容のパスワード再設定メールを生成しましたが、{{GENDER:$2|利用者}}への送信に失敗しました: $1',
# Special:ChangeEmail
'changeemail' => 'メールアドレスの変更',
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-hans' => '中国語 (簡体)',
# Image rotation
'rotate-comment' => '画像を時計回りに $1 {{PLURAL:$1|度}}回転',
+# Unknown messages
+'hours-ago' => '$1 {{PLURAL:$1|時間}}前',
+'minutes-ago' => '$1 {{PLURAL:$1|分}}前',
+'seconds-ago' => '$1 {{PLURAL:$1|秒}}前',
);
'tog-shownumberswatching' => 'მაკონტროლებელ მომხმარებელთა რიცხვის ჩვენება',
'tog-oldsig' => 'არსებული ხელმოწერა:',
'tog-fancysig' => 'საკუთარი ვიკიფორმატიანი ხელმოწერა (ავტომატური ბმულის გარეშე)',
-'tog-externaleditor' => 'გამოიყენეთ გარე რედაქტორი სტანდარტული ფორმით (მხოლოდ ექსპერტებისთვის, მოითხოვს სპეციალურ კონფიგურაციას თქვენს კომპიუტერში. [//www.mediawiki.org/wiki/Manual:External_editors ვრცლად.])',
-'tog-externaldiff' => 'გამოიყენეთ გარე განსხვავება სტანდარტული ფორმით (მხოლოდ ექსპერტთათვის, მოითხოვს სპეციალურ კონფიგურაციას თქვენს კომპიუტერში. [//www.mediawiki.org/wiki/Manual:External_editors ვრცლად.])',
'tog-showjumplinks' => 'დამხმარე ბმულების „გადასვლა-კენ“ ჩართვა',
'tog-uselivepreview' => 'გამოიყენეთ ახალი წინასწარი გადახედვა (ჯავასკრიპტი) (ექსპერიმენტული)',
'tog-forceeditsummary' => 'გამაფრთხილე ცარიელი რედაქტირების რეზიუმეს შემთხვევაში',
'tog-showhiddencats' => 'დამალული კატეგორიების ჩვენება',
'tog-noconvertlink' => 'სათაურის გარდაქმნის ბმულის გამორთვა',
'tog-norollbackdiff' => 'გამოტოვეთ ცვლილება გაუქმებისას',
+'tog-useeditwarning' => 'გამაფრთხილე, როდესაც დავტოვებ რედაქტირებად გვერდს, დაუმახსოვრებელი ცვლილებებით',
'underline-always' => 'მუდამ',
'underline-never' => 'არასდროს',
'content-failed-to-parse' => '$2-ის შინაარსი არ შეესაბამება $1-ის ტიპს: $3.',
'invalid-content-data' => 'დაუშვებელი მონაცემები',
'content-not-allowed-here' => '„$1“-ის შინაარსი დაუშვებელია [[$2]] გვერდზე',
+'editwarning-warning' => 'სხვა გვერდზე გადასვლა გამოიწვევს ცვლილებების დაკარგვას.',
# Content models
'content-model-wikitext' => 'ვიკიტექსტი',
'tog-shownumberswatching' => 'Ssken geddac yellan n yimseqdacen iɛessasen',
'tog-oldsig' => 'Azmul yellan :',
'tog-fancysig' => 'ǧǧ azmul am yettili (war azday awurman)',
-'tog-externaleditor' => 'Sseqdec ambeddel n berra d ameslugen',
-'tog-externaldiff' => 'Sseqdec ambeddel n berra iwakken ad ẓreɣ imgerraden',
'tog-showjumplinks' => 'Eǧǧ izdayen "neggez ar"',
'tog-uselivepreview' => 'Sseqdec pre-timeẓriwt taǧiḥbuṭ (JavaScript) (Experimental)',
'tog-forceeditsummary' => 'Ini-iyi-d mi sskecmeɣ agzul amecluc',
'nov' => 'Wam',
'dec' => 'Duj',
+'monday-at' => 'Arim af $1',
+'tuesday-at' => 'Aram af $1',
+'wednesday-at' => 'Ahad af $1',
+'thursday-at' => 'Amhad af $1',
+'friday-at' => 'Sem af $1',
+'saturday-at' => 'Sed af $1',
+'sunday-at' => 'Acer af $1',
+'today-at' => '$1',
+'yesterday-at' => 'Iḍelli af $1',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|Taggayt|Taggayin}}',
'category_header' => 'Imagraden deg taggayt "$1"',
'search-external' => 'Anadi yeffɣen',
'searchdisabled' => 'Anadi deg {{SITENAME}} yettwakkes. Tzemreḍ ad tnadiḍ s Google. Meɛna ur tettuḍ ara, tasmult n google taqdimt.',
-# Quickbar
-'qbsettings' => 'Tanuga taǧiḥbuṭ',
-'qbsettings-none' => 'Ulac',
-'qbsettings-fixedleft' => 'Aẓelmaḍ',
-'qbsettings-fixedright' => 'Ayeffus',
-'qbsettings-floatingleft' => 'Tufeg aẓelmaḍ',
-'qbsettings-floatingright' => 'Tufeg ayeffus',
-'qbsettings-directionality' => 'Usbiḍ, ɣef wayen n unamud n tira n tutlayt ik/im',
-
# Preferences page
'preferences' => 'Isemyifiyen',
'mypreferences' => 'Isemyifiyen inu',
'http-read-error' => 'Anezri n taɣuri HTTP.',
'http-timed-out' => 'Tuttra HTTP teneffeṛ.',
'http-curl-error' => 'Anezri deg tiririt n URL : $1',
-'http-host-unreachable' => 'Ulamek an siḍes URL',
'http-bad-status' => 'Yella ugur deg tuttra HTTP : $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => 'Ur yufi ḥedd (amseqdac).',
'listusers-blocked' => '(yekyef)',
-# Special:ActiveUsers
-'activeusers' => 'Umuɣ n iseqdacen urmiden',
-'activeusers-intro' => 'Wagi d umuɣ n iseqdacen yexedmen armud deg {{PLURAL:$1|ass agi aneggaru|$1 ussan agi ineggura}}.',
-'activeusers-count' => '$1 {{PLURAL:$1|abeddel n ussan agi ineggura|ibeddilen n ussan agi ineggura}} deg {{PLURAL:$3|ass aneggaru|$3 ussan ineggura}}',
-'activeusers-from' => 'Ssken iseqdacen seg :',
-'activeusers-hidebots' => 'Ffer iṛubuten',
-'activeusers-hidesysops' => 'Ffer inedbalen',
-'activeusers-noresult' => 'Ur yufi aseqdac.',
-
# Special:ListGroupRights
'listgrouprights' => 'Izerfan n igrawen n iseqdacen',
'listgrouprights-summary' => 'Asebter agi yesɛa yiwen umuɣ n igrawen i sengelen deg wiki agi dɣa izerfan n wadduf i qqenen.
'duration-centuries' => '$1 {{PLURAL:$1|timiḍi|timiḍa}}',
'duration-millennia' => '$1 {{PLURAL:$1|agimseggwas|agimseggwasen}}',
+# Unknown messages
+'hours-ago' => '$1 {{PLURAL:$1|asrag|isragen}} aya',
+'minutes-ago' => '$1 {{PLURAL:$1|tamrect|timercin}} aya',
+'seconds-ago' => '$1 {{PLURAL:$1|tasint|tisinin}} aya',
);
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-hans' => 'hans',
'tog-shownumberswatching' => 'Бақылап тұрған қатысушылардың санын көрсет',
'tog-oldsig' => 'Ағымдағы қолтаңбаңыз:',
'tog-fancysig' => 'Қолтаңбаны уикимәтін ретінде қарастыру (автоматты сілтеме қойылмайды)',
-'tog-externaleditor' => 'Шеттік өңдеуішті әдепкіден қолдан (тек сарапшылар үшін, компьютеріңізде арнаулы бапталымдар керек)',
-'tog-externaldiff' => 'Шеттік айырмағышты әдепкіден қолдан (тек сарапшылар үшін, компьютеріңізде арнаулы бапталымдар керек)',
'tog-showjumplinks' => '«Өтіп кету» қатынау сілтемелерін қос',
'tog-uselivepreview' => 'Тура қарап шығуды қолдану (JavaScript) (Сынақтама)',
'tog-forceeditsummary' => 'Өңдеменің қысқаша мазмұндамасы бос қалғанда маған ескерт',
'edit-already-exists' => 'Жаңа бет жасау мүмкін емес.
Ол әлдеқашан бар.',
'defaultmessagetext' => 'Әдепкі мәтіні',
+'editwarning-warning' => 'Басқа бетке өтсеңіз сіздің жазған соңғы өңдемелеріңіз жойылуы мүмкін.
+Егер сiз жүйеде тiркелсеңiз, онда сiз баптауларыңыздағы «{{int:prefs-editing}}» бөлігіне кіріп, бұл ескертуді өшіре аласыз.',
# Parser/template warnings
'expensive-parserfunction-warning' => 'Құлақтандыру: Бұл бетте тым көп шығыс алатын құрылым талдатқыш жетелерінің қоңырау шалулары бар.
Әзірше Google арқылы іздеуге болады.
Аңғартпа: {{SITENAME}} торабының мағлұмат тізбелері ескірген болуы мүмкін.',
-# Quickbar
-'qbsettings' => 'Мәзір',
-'qbsettings-none' => 'Ешқандай',
-'qbsettings-fixedleft' => 'Солға бекітілген',
-'qbsettings-fixedright' => 'Оңға бекітілген',
-'qbsettings-floatingleft' => 'Солға қалқыған',
-'qbsettings-floatingright' => 'Оңға қалқыған',
-
# Preferences page
'preferences' => 'Бапталымдар',
'mypreferences' => 'Баптауларым',
# Stylesheets
'common.css' => '/* Мында орналастырылған CSS барлық мәнерлерде қолданылады */',
-'standard.css' => '/* Мында орналастырылған CSS тек «Дағдылы» (standard) мәнерін пайдаланушыларына ықпал етеді */',
-'nostalgia.css' => '/* Мында орналастырылған CSS тек «Аңсау» (nostalgia) мәнерін пайдаланушыларына ықпал етеді */',
'cologneblue.css' => '/* Мында орналастырылған CSS тек «Көлн зеңгірлігі» (cologneblue) мәнерін пайдаланушыларына ықпал етеді skin */',
'monobook.css' => '/* Мында орналастырылған CSS тек «Дара кітап» (monobook) мәнерін пайдаланушыларына ықпал етеді */',
-'myskin.css' => '/* Мында орналастырылған CSS тек «Өз мәнерім» (myskin) мәнерін пайдаланушыларына ықпал етеді */',
-'chick.css' => '/* Мында орналастырылған CSS тек «Балапан» (chick) мәнерін пайдаланушыларына ықпал етеді */',
-'simple.css' => '/* Мында орналастырылған CSS тек «Кәдімгі» (simple) мәнерін пайдаланушыларына ықпал етеді */',
'modern.css' => '/* Мында орналастырылған CSS тек «Заманауи» (modern) мәнерін пайдаланушыларына ықпал етеді */',
# Scripts
'common.js' => '/* Мындағы әртүрлі JavaScript кез келген бет қотарылғанда барлық пайдаланушылар үшін жегіледі. */',
-'standard.js' => '/* Мындағы JavaScript тек «Дағдылы» (standard) мәнерін пайдаланушылар үшін жегіледі */',
-'nostalgia.js' => '/* Мындағы JavaScript тек «Аңсау» (nostalgia) мәнерін пайдаланушылар үшін жегіледі*/',
'cologneblue.js' => '/* Мындағы JavaScript тек «Көлн зеңгірлігі» (cologneblue) мәнерін пайдаланушылар үшін жегіледі */',
'monobook.js' => '/* Мындағы JavaScript тек «Дара кітап» (monobook) мәнерін пайдаланушылар үшін жегіледі */',
-'myskin.js' => '/* Мындағы JavaScript тек «Өз мәнерім» (myskin) мәнерін пайдаланушылар үшін жегіледі */',
-'chick.js' => '/* Мындағы JavaScript тек «Балапан» (chick) мәнерін пайдаланушылар үшін жегіледі */',
-'simple.js' => '/* Мындағы JavaScript тек «Кәдімгі» (simple) мәнерін пайдаланушылар үшін жегіледі */',
'modern.js' => '/* Мындағы JavaScript тек «Заманауи» (modern) мәнерін пайдаланушылар үшін жегіледі */',
# Metadata
'spam_blanking' => '$1 дегенге сілтемелері бар барлық түзетулер тазартылды',
# Skin names
-'skinname-standard' => 'Дағдылы (standard)',
-'skinname-nostalgia' => 'Аңсау (nostalgia)',
'skinname-cologneblue' => 'Көлн зеңгірлігі (cologneblue)',
'skinname-monobook' => 'Дара кітап (monobook)',
-'skinname-myskin' => 'Өз мәнерім (myskin)',
-'skinname-chick' => 'Балапан (chick)',
-'skinname-simple' => 'Кәдімгі (simple)',
'skinname-modern' => 'Заманауи (modern)',
# Patrolling
'tog-shownumberswatching' => 'បង្ហាញចំនួនអ្នកប្រើប្រាស់ដែលតាមដានទំព័រនេះ',
'tog-oldsig' => 'ហត្ថលេខាមានហើយ៖',
'tog-fancysig' => 'ចុះហត្ថលេខាជាអត្ថបទវិគី (ដោយគ្មានតំណភ្ជាប់ស្វ័យប្រវត្តិ)',
-'tog-externaleditor' => 'ប្រើប្រាស់ឧបករណ៍កែប្រែខាងក្រៅតាមលំនាំដើម (សម្រាប់តែអ្នកមានជំនាញប៉ុណ្ណោះនិងត្រូវការការកំណត់ពិសេសៗនៅលើកុំព្យូទ័ររបស់អ្នក។ [//www.mediawiki.org/wiki/Manual:External_editors ព័ត៌មានបន្ថែម]។)',
-'tog-externaldiff' => 'ប្រើប្រាស់ឧបករណ៍ប្រៀបធៀបខាងក្រៅតាមលំនាំដើម (សម្រាប់តែអ្នកមានជំនាញប៉ុណ្ណោះនិងត្រូវការការកំណត់ពិសេសៗនៅលើកុំព្យូទ័ររបស់អ្នក។ [//www.mediawiki.org/wiki/Manual:External_editors ព័ត៌មានបន្ថែម]។)',
'tog-showjumplinks' => 'ប្រើតំណភ្ជាប់ "លោតទៅ"',
'tog-uselivepreview' => 'ប្រើប្រាស់ការមើលមុនរហ័ស (តម្រូវអោយមាន JavaScript) (ស្ថិតក្រោមការពិសោធន៍នៅឡើយ)',
'tog-forceeditsummary' => 'សូមរំលឹកខ្ញុំកាលបើខ្ញុំទុកប្រអប់ចំណារពន្យល់ឱ្យនៅទំនេរ',
'tog-diffonly' => 'កុំបង្ហាញខ្លឹមសារទំព័រនៅពីក្រោមតារាងប្រៀបធៀបចំណុចខុសគ្នា',
'tog-showhiddencats' => 'បង្ហាញចំណាត់ថ្នាក់ក្រុមដែលត្រូវបានលាក់',
'tog-norollbackdiff' => 'បំភ្លេចភាពខុសគ្នាបន្ទាប់ពីអនុវត្តការស្ដារវិញ',
+'tog-useeditwarning' => 'សូមព្រមានខ្ញុំ ពេលដែលខ្ញុំចាកចេញពីទំព័រកែប្រែដោយមិនបានរក្សាទុកបំលាស់ប្ដូរនានា',
'underline-always' => 'ជានិច្ច',
'underline-never' => 'កុំអោយសោះ',
ទំព័រនេះមានរួចហើយ។',
'defaultmessagetext' => 'អត្ថបទសារតាមលំនាំដើម',
+'editwarning-warning' => 'ចាកចេញពីទំព័រនេះ នឹងធ្វើឲ្យអ្នកបាត់បង់កំណែប្រែដែលអ្នកបានធ្វើ។
+ប្រសិនបើអ្នកបានឡុកអ៊ីនរួចហើយ អ្នកអាចបិទបម្រាមនេះនៅក្នុងផ្នែក "{{int:prefs-editing}}" នៃចំណូលចិត្តរបស់អ្នក។',
# Content models
'content-model-wikitext' => 'អត្ថបទវិគី',
ក្នុងពេលឥឡូវនេះ អ្នកអាចស្វែងរកតាមរយៈ Google បាន។
សូមចងចាំថា លិបិក្រមនៃមាតិការរបស់{{SITENAME}} អាចហួសសម័យ។',
-# Quickbar
-'qbsettings' => 'របារទាន់ចិត្ត',
-'qbsettings-none' => 'ទទេ',
-'qbsettings-fixedleft' => 'ចុងខាងឆ្វេង',
-'qbsettings-fixedright' => 'ចុងខាងស្តាំ',
-'qbsettings-floatingleft' => 'អណ្តែតឆ្វេង',
-'qbsettings-floatingright' => 'អណ្តែតស្តាំ',
-'qbsettings-directionality' => 'នៅមួយកន្លែង, អាស្រ័យលើទិសដៅសរសេររបស់ភាសារបស់អ្នក',
-
# Preferences page
'preferences' => 'ចំណង់ចំណូលចិត្ត',
'mypreferences' => 'ចំណង់ចំណូលចិត្ត',
# HTTP errors
'http-invalid-url' => 'URLមិនត្រឹមត្រូវ៖ $1',
-'http-host-unreachable' => 'មិនអាចទៅកាន់URLបានទេ',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'upload-curl-error6' => 'មិនអាច ចូលទៅដល់ URL',
# Stylesheets
'common.css' => '/* CSS បានដាក់ទីនេះនឹងមានអនុភាពលើគ្រប់សំបកទាំងអស់ */',
-'standard.css' => '/* CSS បានដាក់ទីនេះនឹងមានអនុភាពលើអ្នកប្រើប្រាស់នៃសំបក Standard */',
-'nostalgia.css' => '/* CSS បានដាក់ទីនេះនឹងមានអនុភាពលើអ្នកប្រើប្រាស់នៃសំបក Nostalgia */',
'cologneblue.css' => '/* CSS បានដាក់ទីនេះនឹងមានអនុភាពលើអ្នកប្រើប្រាស់នៃសំបក Cologne Blue */',
'monobook.css' => '/* CSS បានដាក់ទីនេះនឹងមានអនុភាពលើអ្នកប្រើប្រាស់នៃសំបក Monobook */',
-'myskin.css' => '/* CSS បានដាក់ទីនេះនឹងមានអនុភាពលើអ្នកប្រើប្រាស់នៃសំបក MySkin */',
-'chick.css' => '/* CSS បានដាក់ទីនេះនឹងមានអនុភាពលើអ្នកប្រើប្រាស់នៃសំបក Chick */',
-'simple.css' => '/* CSS បានដាក់ទីនេះនឹងមានអនុភាពលើអ្នកប្រើប្រាស់នៃសំបក Simple */',
'modern.css' => '/* CSS បានដាក់ទីនេះនឹងមានអនុភាពលើអ្នកប្រើប្រាស់នៃសំបក Modern */',
'vector.css' => '/* CSS បានដាក់ទីនេះនឹងមានអនុភាពលើអ្នកប្រើប្រាស់នៃសំបក Vector */',
'pageinfo-protect-cascading-from' => 'ការការពារត្រូវបានដាក់ជាថ្នាក់ពី',
# Skin names
-'skinname-standard' => 'បុរាណ',
-'skinname-nostalgia' => 'អាឡោះអាល័យ',
'skinname-cologneblue' => 'ទឹកអប់ខៀវ',
'skinname-monobook' => 'សៀវភៅឯក',
-'skinname-myskin' => 'សំបកខ្ញុំ',
-'skinname-chick' => 'កូនមាន់',
-'skinname-simple' => 'សាមញ្ញ',
'skinname-modern' => 'ទំនើប',
'skinname-vector' => 'វ៉ិចទ័រ',
'nov' => '11',
'dec' => '12',
+'monday-at' => '월요일 $1',
+'tuesday-at' => '화요일 $1',
+'wednesday-at' => '수요일 $1',
+'thursday-at' => '목요일 $1',
+'friday-at' => '금요일 $1',
+'saturday-at' => '토요일 $1',
+'sunday-at' => '일요일 $1',
+'today-at' => '$1',
+'yesterday-at' => '어제 $1',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|분류}}',
'category_header' => '"$1" 분류에 속하는 문서',
'hidetoc' => '숨기기',
'collapsible-collapse' => '접기',
'collapsible-expand' => '펼치기',
-'thisisdeleted' => '$1을 보거나 되살리겠습니까?',
-'viewdeleted' => '$1을 보겠습니까?',
+'thisisdeleted' => '$1 문서를 보거나 되살리겠습니까?',
+'viewdeleted' => '$1 문서를 보겠습니까?',
'restorelink' => '{{PLURAL:$1|삭제된 편집 $1개}}',
'feedlinks' => '피드:',
'feed-invalid' => '잘못된 구독 피드 방식입니다.',
'delete-hook-aborted' => '훅에 의해 삭제가 중단되었습니다.
아무런 설명도 주어지지 않았습니다.',
'badtitle' => '잘못된 제목',
-'badtitletext' => '문서 제목이 잘못되었거나 비어있습니다. 또는 잘못된 인터위키 제목으로 링크했습니다.
+'badtitletext' => '요청한 문서 제목이 잘못되었거나, 비어있거나, 잘못된 인터위키 제목으로 링크했습니다.
문서 제목에 사용할 수 없는 문자를 사용했을 수 있습니다.',
'perfcached' => '다음 자료는 캐시된 것이므로 현재 상황을 반영하지 않을 수 있습니다. 캐시에 최대 {{PLURAL:$1|결과 $1개}}가 있습니다.',
'perfcachedts' => '다음 자료는 캐시된 것으로, $1에 마지막으로 새로 고쳐졌습니다. 캐시에 최대 {{PLURAL:$4|결과 $4개}}가 있습니다.',
'welcomecreation-msg' => '계정이 만들어졌습니다.
[[Special:Preferences|{{SITENAME}} 사용자 환경 설정]]을 바꿀 수 있습니다.',
'yourname' => '사용자 이름:',
-'userlogin-yourname' => '계정 이름',
-'userlogin-yourname-ph' => '계정 이름을 입력하십시오',
+'userlogin-yourname' => '사용자 이름',
+'userlogin-yourname-ph' => '사용자 이름을 입력하세요',
'yourpassword' => '비밀번호:',
'userlogin-yourpassword' => '비밀번호',
-'userlogin-yourpassword-ph' => 'ë¹\84ë°\80ë²\88í\98¸ë¥¼ ì\9e\85ë ¥í\95\98ì\8bì\8b\9cì\98¤',
+'userlogin-yourpassword-ph' => 'ë¹\84ë°\80ë²\88í\98¸ë¥¼ ì\9e\85ë ¥í\95\98ì\84¸ì\9a\94',
'yourpasswordagain' => '비밀번호 다시 입력:',
'remembermypassword' => '이 브라우저에서 로그인 상태를 저장하기 (최대 $1{{PLURAL:$1|일}})',
-'userlogin-remembermypassword' => 'ë\82´ ë¡\9cê·¸ì\9d¸ì\9d\84 기억하기',
+'userlogin-remembermypassword' => 'ë¡\9cê·¸ì\9d¸ ì\83\81í\83\9c를 기억하기',
'userlogin-signwithsecure' => '보안 서버로 로그인',
'securelogin-stick-https' => '로그인 후에도 HTTPS 연결 상태를 유지합니다',
'yourdomainname' => '도메인 이름:',
'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|로그인에 관한 도움말]]',
'createaccountmail' => '임시 임의 비밀번호를 아래에 지정한 이메일로 보내기',
'createaccountreason' => '이유:',
-'badretype' => 'ì\9e\85ë ¥í\95\9c ë¹\84ë°\80ë²\88í\98¸ê°\80 ì\84\9cë¡\9c ë\8b¤ë¦\85니다.',
+'badretype' => 'ì\9e\85ë ¥í\95\9c ë¹\84ë°\80ë²\88í\98¸ê°\80 ì\9d¼ì¹\98í\95\98ì§\80 ì\95\8aì\8aµ니다.',
'userexists' => '입력하신 사용자 이름이 이미 등록되어 있습니다.
다른 이름을 선택하세요.',
'loginerror' => '로그인 오류',
실수로 계정을 잘못 만들었다면 이 메시지는 무시해도 됩니다.',
'usernamehasherror' => '사용자 이름에는 해시 문자가 들어갈 수 없습니다',
'login-throttled' => '로그인에 연속으로 실패하였습니다.
-ì\9e ì\8b\9c í\9b\84ì\97\90 ë\8b¤ì\8b\9c ì\8b\9cë\8f\84í\95´ì£¼세요.',
+ì\9e ì\8b\9c í\9b\84ì\97\90 ë\8b¤ì\8b\9c ì\8b\9cë\8f\84í\95\98세요.',
'login-abort-generic' => '로그인에 실패했습니다 - 중지됨',
'loginlanguagelabel' => '언어: $1',
'suspicious-userlogout' => '브라우저에 이상이 있거나 캐싱 프록시에서 로그아웃을 요청했기 때문에 로그아웃이 거부되었습니다.',
임시 비밀번호: $2',
'passwordreset-emailsent' => '비밀번호 재설정 이메일을 보냈습니다.',
'passwordreset-emailsent-capture' => '비밀번호 재설정 이메일이 발송되었으며, 아래에 나타나 있습니다.',
-'passwordreset-emailerror-capture' => '비밀번호 재설정 이메일이 ë§\8cë\93¤ì\96´ì ¸ ì\95\84ë\9e\98ì\97\90 ë\82\98í\83\80ë\82¬ì§\80ë§\8c ë°\9cì\86¡í\95\98ë\8a\94 ë\8d°ì\97\90ë\8a\94 ì\8b¤í\8c¨í\96\88ì\8aµë\8b\88ë\8b¤: $1',
+'passwordreset-emailerror-capture' => '비밀번호 재설정 이메일이 ì\83\9dì\84±ë\90\98ì\96´ ì\95\84ë\9e\98ì\97\90 í\91\9cì\8b\9cë\90\98ì\96´ ì\9e\88ì§\80ë§\8c, {{GENDER:$2|ì\82¬ì\9a©ì\9e\90}}ì\97\90ê²\8c ë°\9cì\86¡í\95\98ë\8a\94 ë\8d°ì\97\90ë\8a\94 ì\8b¤í\8c¨í\96\88ì\8aµë\8b\88ë\8b¤: $1',
# Special:ChangeEmail
'changeemail' => '이메일 주소 바꾸기',
'loginreqlink' => '로그인',
'loginreqpagetext' => '다른 문서를 보기 위해서는 $1해야 합니다.',
'accmailtitle' => '비밀번호를 보냈습니다',
-'accmailtext' => '[[User talk:$1|$1]] 사용자의 비밀번호가 임의로 만들어져 $2ë¡\9c ì \84ì\86¡ë\90\98ì\97\88ì\8aµë\8b\88ë\8b¤.
+'accmailtext' => '[[User talk:$1|$1]] 사용자의 비밀번호가 임의로 만들어져 $2(ì\9c¼)ë¡\9c ë³´ë\83\88ì\8aµë\8b\88ë\8b¤.
새 비밀번호는 로그인한 후 [[Special:ChangePassword|비밀번호를 바꿀]] 수 있습니다.',
'newarticle' => '(새 문서)',
편집 되돌리기를 완료하려면 이 편집을 되돌리려면 아래의 바뀐 내용을 확인한 후 저장해주세요.',
'undo-failure' => '중간의 다른 편집과 충돌하여 이 편집을 되돌릴 수 없습니다.',
'undo-norev' => '문서가 없거나 삭제되었기 때문에 편집을 되돌릴 수 없습니다.',
-'undo-summary' => '[[Special:Contributions/$2|$2]] ([[User talk:$2|토론]]) 의 $1판 편집을 되돌림',
+'undo-summary' => '[[Special:Contributions/$2|$2]] ([[User talk:$2|토론]])의 $1판 편집을 되돌림',
# Account creation failure
'cantcreateaccounttitle' => '계정을 만들 수 없음',
'prefs-help-gender' => '선택 사항: 소프트웨어에서 성별에 따른 언어 문제를 해결하기 위해 사용됩니다.
이 정보는 공개됩니다.',
'email' => '이메일',
-'prefs-help-realname' => '실명 기입은 자유입니다.
-ì\8b¤ëª\85ì\9d\84 ì\9e\85ë ¥í\95 ê²½ì\9a° 문서 기여에 자신의 이름이 들어가게 됩니다.',
+'prefs-help-realname' => '실명은 선택 사항입니다.
+ì\8b¤ëª\85ì\9d\84 ì\9e\85ë ¥í\95\98ë©´ 문서 기여에 자신의 이름이 들어가게 됩니다.',
'prefs-help-email' => '이메일 주소 입력은 선택 사항입니다. 다만 비밀번호를 잊었을 때 비밀번호 바꾸기를 위해 필요합니다.',
'prefs-help-email-others' => '자신의 문서나 토론 문서에 있는 이메일 보내기 링크로 다른 사용자가 연락할 수 있게 할 수도 있습니다.
이 경우에도 이메일 주소는 다른 사용자가 연락할 때 공개되지 않습니다.',
# User preference: email validation using jQuery
'email-address-validity-valid' => '이메일 주소가 유효한 것으로 보입니다.',
-'email-address-validity-invalid' => 'ì\9c í\9a¨í\95\9c ì\9d´ë©\94ì\9d¼ 주ì\86\8c를 ì\9e\85ë ¥í\95´ì£¼ì\84¸ì\9a\94.',
+'email-address-validity-invalid' => 'ì\98¬ë°\94른 ì\9d´ë©\94ì\9d¼ 주ì\86\8c를 ì\9e\85ë ¥í\95\98ì\84¸ì\9a\94',
# User rights
'userrights' => '사용자 권한 관리',
[[Special:ListUsers/sysop|관리자]]에게 연락해주세요.',
'upload-misc-error' => '알 수 없는 파일 올리기 오류',
'upload-misc-error-text' => '파일을 올리는 중 알 수 없는 오류가 발생했습니다.
-URLì\9d´ ì\98¬ë°\94ë¥´ê³ ì \91ê·¼ ê°\80ë\8a¥í\95\9cì§\80를 í\99\95ì\9d¸í\95\98ê³ ë\8b¤ì\8b\9c ì\8b\9cë\8f\84í\95´ì£¼세요.
+URLì\9d´ ì\98¬ë°\94ë¥´ê³ ì \91ê·¼ ê°\80ë\8a¥í\95\9cì§\80를 í\99\95ì\9d¸í\95\98ê³ ë\8b¤ì\8b\9c ì\8b\9cë\8f\84í\95\98세요.
문제가 계속되면 [[Special:ListUsers/sysop|관리자]]에게 연락해주세요.',
'upload-too-many-redirects' => 'URL이 너무 많은 넘겨주기에 연결되어 있습니다.',
'upload-unknown-size' => '크기를 알 수 없음',
URL이 맞고 해당 웹사이트가 작동하는지 확인해주세요.',
'upload-curl-error28' => '업로드 시간 초과',
'upload-curl-error28-text' => '사이트에서 응답하는 시간이 너무 깁니다.
-ì\82¬ì\9d´í\8a¸ ì \91ì\86\8dì\9d´ ê°\80ë\8a¥í\95\9cì§\80 í\99\95ì\9d¸í\95\9c ë\8b¤ì\9d\8c ë\8b¤ì\8b\9c ì\8b\9cë\8f\84í\95´ì£¼세요.
-í\95´ë\8b¹ ì\82¬ì\9d´í\8a¸ì\97\90 ì \91ì\86\8dì\9d´ ë§\8eì\9d\84 ê²½ì\9a° ì \91ì\86\8dì\9d´ ì\9b\90í\99\9cí\95\9c ì\8b\9cê°\84ë\8c\80ì\97\90 ì\8b\9cë\8f\84í\95´ì£¼세요.',
+ì\82¬ì\9d´í\8a¸ ì \91ì\86\8dì\9d´ ê°\80ë\8a¥í\95\9cì§\80 í\99\95ì\9d¸í\95\9c ë\8b¤ì\9d\8c ë\8b¤ì\8b\9c ì\8b\9cë\8f\84í\95\98세요.
+í\95´ë\8b¹ ì\82¬ì\9d´í\8a¸ì\97\90 ì \91ì\86\8dì\9d´ ë§\8eì\9d\84 ê²½ì\9a° ì \91ì\86\8dì\9d´ ì\9b\90í\99\9cí\95\9c ì\8b\9cê°\84ë\8c\80ì\97\90 ì\8b\9cë\8f\84í\95\98세요.',
'license' => '라이선스:',
'license-header' => '라이선스',
# Special:ListFiles
'listfiles-summary' => '이 위키에 올라와 있는 모든 파일이 나열되어 있습니다.
-사용자별로 필터링했을 경우에는 사용자가 올린 가장 최신 버전만이 보여집니다.',
+사용자별로 필터링했을 경우에는 사용자가 올린 가장 최신 판만이 보여집니다.',
'listfiles_search_for' => '다음 이름을 가진 미디어 찾기:',
'imgfile' => '파일',
'listfiles' => '파일 목록',
그 링크는 다른 적절한 문서로 연결할 필요가 있습니다.<br />
[[MediaWiki:Disambiguationspage]]에서 링크된 틀을 사용하는 문서를 동음이의 문서로 간주합니다.",
-'pageswithprop' => '문ì\84\9c ì\86\8dì\84±ì\9c¼ë¡\9c ë\90\9c 문서',
-'pageswithprop-legend' => '문ì\84\9c ì\86\8dì\84±ì\9c¼ë¡\9c ë\90\9c 문서',
+'pageswithprop' => '문ì\84\9c ì\86\8dì\84±ì\9d´ ì\9e\88ë\8a\94 문서',
+'pageswithprop-legend' => '문ì\84\9c ì\86\8dì\84±ì\9d´ ì\9e\88ë\8a\94 문서',
'pageswithprop-text' => '이 문서는 특정 문서 속성을 사용한 문서를 나타냅니다.',
'pageswithprop-prop' => '속성 이름:',
'pageswithprop-submit' => '가기',
'uncategorizedtemplates' => '분류되지 않은 틀 목록',
'unusedcategories' => '사용하지 않는 분류 목록',
'unusedimages' => '사용하지 않는 파일 목록',
-'popularpages' => '인기있는 문서 목록',
+'popularpages' => '인기 있는 문서 목록',
'wantedcategories' => '필요한 분류 목록',
'wantedpages' => '필요한 문서 목록',
'wantedpages-badtitle' => '문서 제목이 잘못되었습니다: $1',
'unusedcategoriestext' => '사용하지 않는 분류 문서의 목록입니다.',
'notargettitle' => '해당하는 문서 없음',
'notargettext' => '기능을 수행할 대상 문서나 사용자를 지정하지 않았습니다.',
-'nopagetitle' => '해당 문서 없음',
+'nopagetitle' => '해당하는 문서 없음',
'nopagetext' => '찾는 문서가 존재하지 않습니다.',
'pager-newer-n' => '{{PLURAL:$1|다음 1개|다음 $1개}}',
'pager-older-n' => '{{PLURAL:$1|이전 1개|이전 $1개}}',
'allpagesnext' => '다음',
'allpagessubmit' => '보기',
'allpagesprefix' => '다음으로 시작하는 문서 보기:',
-'allpagesbadtitle' => '문서 제목이 잘못되었거나 다른 사이트로 연결되는 인터위키를 가지고 있습니다.
+'allpagesbadtitle' => '주어진 문서 제목이 잘못되었거나 다른 사이트로 연결되는 인터위키가 있습니다.
문서 제목에 사용할 수 없는 문자를 사용했을 수 있습니다.',
'allpages-bad-ns' => '{{SITENAME}}에서는 "$1" 이름공간을 사용하지 않습니다.',
'allpages-hide-redirects' => '넘겨주기 숨기기',
# Special:ListGroupRights
'listgrouprights' => '사용자 권한 목록',
-'listgrouprights-summary' => '다음은 이 위키에서 설정된 사용자 권한 그룹의 목록입니다.
-ê°\81ê°\81ì\9d\98 ê¶\8cí\95\9cì\97\90 ë\8c\80í\95´ì\84\9cë\8a\94 [[{{MediaWiki:Listgrouprights-helppage}}|ì\9d´ê³³]]ì\9d\84 참고하세요.',
+'listgrouprights-summary' => '다음은 이 위키에 있는 사용자 권한 그룹의 목록입니다.
+ê°\81ê°\81ì\9d\98 ê¶\8cí\95\9cì\97\90 ë\8c\80í\95´ì\84\9cë\8a\94 [[{{MediaWiki:Listgrouprights-helppage}}|ì¶\94ê°\80 ì \95ë³´]]를 참고하세요.',
'listgrouprights-key' => '* <span class="listgrouprights-granted">부여된 권한</span>
* <span class="listgrouprights-revoked">해제된 권한</span>',
'listgrouprights-group' => '그룹',
'listgrouprights-rights' => '권한',
-'listgrouprights-helppage' => 'Help:사용자 권한 그룹',
+'listgrouprights-helppage' => 'Help:사용자 권한',
'listgrouprights-members' => '(사용자 목록)',
'listgrouprights-addgroup' => '{{PLURAL:$2|권한}} 부여: $1',
'listgrouprights-removegroup' => '{{PLURAL:$2|권한}} 회수: $1',
'rollbacklinkcount-morethan' => '{{PLURAL:$1|편집}} $1회 이상 되돌리기',
'rollbackfailed' => '되돌리기 실패',
'cantrollback' => '편집을 되돌릴 수 없습니다.
-문서를 편집한 사용자가 한명뿐입니다.',
+문서를 편집한 사용자가 한 명뿐입니다.',
'alreadyrolled' => '[[:$1]]에서 [[User:$2|$2]] ([[User talk:$2|토론]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]])의 편집을 되돌릴 수 없습니다.
누군가가 이미 문서를 고치거나 되돌렸습니다.
'ipb_expiry_invalid' => '차단 기간이 잘못되었습니다.',
'ipb_expiry_temp' => '사용자 이름을 숨기는 차단은 반드시 무기한이어야 합니다.',
'ipb_hide_invalid' => '해당 계정은 막을 수 없습니다. 기여량이 너무 많습니다.',
-'ipb_already_blocked' => '"$1" ì\82¬ì\9a©ì\9e\90ë\8a\94 ì\9d´ë¯¸ ì°¨ë\8b¨ë\90¨',
+'ipb_already_blocked' => '"$1" ì\82¬ì\9a©ì\9e\90ë\8a\94 ì\9d´ë¯¸ ì°¨ë\8b¨ë\90\98ì\97\88ì\8aµë\8b\88ë\8b¤',
'ipb-needreblock' => '$1 사용자는 이미 차단되었습니다. 차단 설정을 바꾸시겠습니까?',
'ipb-otherblocks-header' => '다른 {{PLURAL:$1|차단}} 기록',
'unblock-hideuser' => '이 사용자 이름이 숨겨져 있기 때문에 이 사용자를 차단 해제할 수 없습니다.',
이 경우에는 문서를 직접 이동하거나 두 문서를 합쳐야 합니다.",
'movearticle' => '문서 이동하기',
-'moveuserpage-warning' => "'''ê²½ê³ :''' ì\82¬ì\9a©ì\9e\90 문ì\84\9c를 ì\98®ê¸°ë ¤ í\95\98ê³ ì\9e\88ì\8aµë\8b\88ë\8b¤. ì\82¬ì\9a©ì\9e\90 문ì\84\9cë§\8c ì\9d´ë\8f\99ë\90\98ë©° ì\82¬ì\9a©ì\9e\90 ì\9d´ë¦\84ì\9d´ ë°\94ë\80\8cì§\80 '''ì\95\8aë\8a\94ë\8b¤'''ë\8a\94 ì \90ì\9d\84 ì°¸ê³ í\95´ì£¼ì\8b\9c기 ë°\94ë\9e\8dë\8b\88ë\8b¤.",
+'moveuserpage-warning' => "'''ê²½ê³ :''' ì\82¬ì\9a©ì\9e\90 문ì\84\9c를 ì\98®ê¸°ë ¤ í\95\98ê³ ì\9e\88ì\8aµë\8b\88ë\8b¤. ì\82¬ì\9a©ì\9e\90 문ì\84\9cë§\8c ì\9d´ë\8f\99ë\90\98ë©° ì\82¬ì\9a©ì\9e\90 ì\9d´ë¦\84ì\9d´ ë°\94ë\80\8cì§\80 '''ì\95\8aë\8a\94ë\8b¤'''ë\8a\94 ì \90ì\9d\84 ì°¸ê³ í\95\98ì\84¸ì\9a\94.",
'movenologin' => '로그인하지 않음',
'movenologintext' => '문서를 이동하려면 [[Special:UserLogin|로그인]]해야 합니다.',
-'movenotallowed' => '문ì\84\9c를 ì\9d´ë\8f\99í\95 권한이 없습니다.',
-'movenotallowedfile' => 'í\8c\8cì\9d¼ì\9d\84 ì\9d´ë\8f\99í\95 권한이 없습니다.',
-'cant-move-user-page' => 'ì\82¬ì\9a©ì\9e\90 문ì\84\9c를 ì\9d´ë\8f\99í\95 권한이 없습니다(하위 문서는 예외).',
-'cant-move-to-user-page' => '문ì\84\9c를 ì\82¬ì\9a©ì\9e\90 문ì\84\9cë¡\9c ì\9d´ë\8f\99í\95 권한이 없습니다(하위 문서는 예외).',
+'movenotallowed' => '문ì\84\9c를 ì\98®ê¸¸ 권한이 없습니다.',
+'movenotallowedfile' => 'í\8c\8cì\9d¼ì\9d\84 ì\98®ê¸¸ 권한이 없습니다.',
+'cant-move-user-page' => 'ì\82¬ì\9a©ì\9e\90 문ì\84\9c를 ì\98®ê¸¸ 권한이 없습니다(하위 문서는 예외).',
+'cant-move-to-user-page' => '문ì\84\9c를 ì\82¬ì\9a©ì\9e\90 문ì\84\9cë¡\9c ì\98®ê¸¸ 권한이 없습니다(하위 문서는 예외).',
'newtitle' => '새 문서 이름',
'move-watch' => '문서 주시하기',
'movepagebtn' => '이동',
'movepage-moved-redirect' => '넘겨주기 문서를 만들었습니다.',
'movepage-moved-noredirect' => '넘겨주기 문서를 남기지 않았습니다.',
'articleexists' => '문서가 이미 존재하거나 이름이 올바르지 않습니다.
-ë\8b¤ë¥¸ ì \9c목ì\9c¼ë¡\9c ì\8b\9cë\8f\84í\95´ì£¼세요.',
-'cantmove-titleprotected' => 'ì\83\88ë¡\9cì\9a´ ì \9c목ì\9c¼ë¡\9c 문ì\84\9c를 ë§\8cë\93\9cë\8a\94 ê²\83ì\9d´ ê¸\88ì§\80ë\90\98ì\96´ ì\9e\88ì\96´ 문ì\84\9c를 ì\9d´ë\8f\99í\95 ì\88\98 ì\97\86ì\8aµë\8b\88ë\8b¤.',
+ë\8b¤ë¥¸ ì\9d´ë¦\84ì\9d\84 ì\84 í\83\9dí\95\98세요.',
+'cantmove-titleprotected' => 'ì\83\88ë¡\9cì\9a´ ì \9c목ì\9c¼ë¡\9c 문ì\84\9c를 ë§\8cë\93\9cë\8a\94 ê²\83ì\9d´ ê¸\88ì§\80ë\90\98ì\96´ ì\9e\88ì\96´ 문ì\84\9c를 ì\98®ê¸¸ ì\88\98 ì\97\86ì\8aµë\8b\88ë\8b¤',
'talkexists' => "'''문서는 이동되었습니다. 하지만 딸린 토론 문서의 새 이름으로 된 문서가 이미 있기 때문에 토론 문서는 옮기지 못했습니다. 직접 문서를 합쳐 주세요.'''",
'movedto' => '새 이름',
'movetalk' => '딸린 토론도 함께 이동합니다.',
'move-subpages' => '하위 문서도 함께 ($1개 이하) 이동합니다.',
'move-talk-subpages' => '토론 문서의 하위 문서도 ($1개까지) 함께 이동합니다.',
-'movepage-page-exists' => '이동할 수 없습니다. "$1" 문서가 이미 존재합니다.',
+'movepage-page-exists' => '$1 문서가 이미 존재하므로 자동으로 덮어쓸 수 없습니다.',
'movepage-page-moved' => '"$1" 문서를 "$2" 문서로 옮겼습니다.',
-'movepage-page-unmoved' => '"$1" 문서를 "$2" 문서로 이동할 수 없습니다.',
-'movepage-max-pages' => '{{PLURAL:$1|문ì\84\9c}}를 ìµ\9cë\8c\80 $1ê°\9c ì\9d´ë\8f\99í\96\88ì\8aµë\8b\88ë\8b¤. ë\82\98머ì§\80 문ì\84\9cë\8a\94 ì\9e\90ë\8f\99 ì\9d´ë\8f\99í\95\98지 않습니다.',
+'movepage-page-unmoved' => '$1 문서를 $2 문서로 옮길 수 없습니다.',
+'movepage-max-pages' => '{{PLURAL:$1|문ì\84\9c}}를 ìµ\9cë\8c\80 $1ê°\9c ì\98®ê²¼ì\9c¼ë©° ë\82\98머ì§\80 문ì\84\9cë\8a\94 ì\9e\90ë\8f\99ì\9c¼ë¡\9c ì\98®ê¸°지 않습니다.',
'movelogpage' => '이동 기록',
'movelogpagetext' => '아래는 이동한 문서의 목록입니다.',
'movesubpage' => '{{PLURAL:$1|하위 문서}}',
'delete_and_move_confirm' => '네. 문서를 삭제합니다',
'delete_and_move_reason' => '"[[$1]]"에서 문서를 이동하기 위해 삭제함',
'selfmove' => '이동하려는 제목이 원래 제목과 같습니다.
-이동할 수 없습니다.',
+같은 제목으로는 옮길 수 없습니다.',
'immobile-source-namespace' => '"$1" 이름공간에 속한 문서는 이동시킬 수 없습니다.',
'immobile-target-namespace' => '"$1" 이름공간에 속한 문서는 이동시킬 수 없습니다.',
-'immobile-target-namespace-iw' => 'ì\9d¸í\84°ì\9c\84í\82¤ ë§\81í\81¬ë¥¼ ë\84\98ì\96´ 문ì\84\9c를 ì\9d´ë\8f\99í\95 수 없습니다.',
-'immobile-source-page' => 'ì\9d´ 문ì\84\9cë\8a\94 ì\9d´ë\8f\99í\95 수 없습니다.',
+'immobile-target-namespace-iw' => 'ì\9d¸í\84°ì\9c\84í\82¤ ë§\81í\81¬ë¥¼ ë\84\98ì\96´ 문ì\84\9c를 ì\98®ê¸¸ 수 없습니다.',
+'immobile-source-page' => 'ì\9d´ 문ì\84\9cë\8a\94 ì\98®ê¸¸ 수 없습니다.',
'immobile-target-page' => '새 이름으로 옮길 수 없습니다.',
'bad-target-model' => '원하는 대상은 다른 내용 모델을 사용합니다. $1에서 $2로 변환할 수 없습니다.',
'imagenocrossnamespace' => '파일을 파일이 아닌 이름공간으로 옮길 수 없습니다.',
바깥 사이트로 연결하는 링크 중에 블랙리스트에 포함된 사이트가 있을 것입니다.',
'spamprotectionmatch' => '문제가 되는 부분은 다음과 같습니다: $1',
'spambot_username' => 'MediaWiki 스팸 제거',
-'spam_reverting' => '$1을 포함하지 않는 최신 버전으로 되돌림',
+'spam_reverting' => '$1(을)를 포함하지 않는 최신 버전으로 되돌림',
'spam_blanking' => '모든 버전에 $1 링크를 포함하고 있어 차단함',
'spam_deleting' => '모든 버전에 $1 링크를 포함하고 있어 삭제함',
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-hans' => '간체',
# Email address confirmation
'confirmemail' => '이메일 주소 확인',
-'confirmemail_noemail' => '[[Special:Preferences|환경 설정]]에 이메일을 설정하지 않았습니다.',
+'confirmemail_noemail' => '[[Special:Preferences|사용자 환경 설정]]에 올바른 이메일주소를 설정하지 않았습니다.',
'confirmemail_text' => '{{SITENAME}}에서는 이메일 기능을 사용하기 전에 이메일 인증을 받아야 합니다.
아래의 버튼을 누르면 인증 메일을 보냅니다.
메일에는 인증 코드가 들어있는 링크가 있습니다.
'dberr-header' => '이 위키에 문제가 있습니다.',
'dberr-problems' => '죄송합니다!
이 사이트는 기술적인 문제가 있습니다.',
-'dberr-again' => '잠시 후에 다시 시도해주세요.',
+'dberr-again' => '잠시 기다리고 나서 다시 불러오세요.',
'dberr-info' => '(데이터베이스에 접속할 수 없습니다: $1)',
'dberr-usegoogle' => '그 동안 구글을 통해 검색할 수도 있습니다.',
'dberr-outofdate' => '참고로 구글의 내용 개요는 오래된 것일 수도 있습니다.',
# Image rotation
'rotate-comment' => '그림을 시계 방향으로 $1{{PLURAL:$1|도}}로 회전함',
+# Unknown messages
+'hours-ago' => '$1{{PLURAL:$1|시간}} 전',
+'minutes-ago' => '$1{{PLURAL:$1|분}} 전',
+'seconds-ago' => '$1{{PLURAL:$1|초}} 전',
);
'tog-shownumberswatching' => 'Бетни, кёзде тургъан тизмелерине къошханланы санын кёргюз',
'tog-oldsig' => 'Бусагъатдагъы къол салыннган:',
'tog-fancysig' => 'Энчи вики-тексти къол салыуну (автомат джибериусюз)',
-'tog-externaleditor' => 'Тынгылау бла тыш редакторну хайырландырыу (къуру усталагъа, компьютерни энчи джарашдырылыуу керекди; [//www.mediawiki.org/wiki/Manual:External_editors толуракъ])',
-'tog-externaldiff' => 'Версияланы тенглешдириучу тыш программа хайырландырыу (къуру усталагъа, компьютерни энчи джарашдырылыуу керекди; [//www.mediawiki.org/wiki/Manual:External_editors толуракъ])',
'tog-showjumplinks' => '«Бар» болушлукъ джибериуню джандыр',
'tog-uselivepreview' => 'Терк ал къарауну хайырландыр (JavaScript, экспериментал халда)',
'tog-forceeditsummary' => 'Тюрлендириуню ачыкълау тизгини бош къалса, билдир',
'tog-diffonly' => 'Версия тенглешдириуню тюбю бла бетни ичиндегисин кёргюзме',
'tog-showhiddencats' => 'Джашыртын категорияланы кёргюз',
'tog-norollbackdiff' => 'Къайтарыудан сора версияланы башхалыкъларын кёргюзме',
+'tog-useeditwarning' => 'Тюрлендириулени сакълатмай редакторлау бетден кетген сагъатымда билдир',
'underline-always' => 'Хаманда',
'underline-never' => 'Бирзаманда да',
'content-failed-to-parse' => '$2 контент $1 типге келишмейди: $3',
'invalid-content-data' => 'Джаламагъан билгиле',
'content-not-allowed-here' => '[[$2]] бетни ичинде "$1" контент джарамайды',
+'editwarning-warning' => 'Башха бетге кёчсегиз, этген тюрлениулеригиз тас болургъа боллукъдула.
+Системада регистрацияны ётген эсегиз, бу билдириуню джарашдырыуларыгъызны «Тюрлендириу» деген бёлюмюнде джукълатыргъа боллукъсуз.',
# Content models
'content-model-wikitext' => 'вики-текст',
'search-external' => 'Тыш излеу',
'searchdisabled' => '{{SITENAME}} сайтда излеу талай заманнга тохтатылгъанды. Бусагъатда Google бла хайырланыб {{SITENAME}} ичинде излеу этерге боллукъсуз. Излеу сайтлада индекслери бир кесек эски болургъа боллугъун унутмагъыз.',
-# Quickbar
-'qbsettings' => 'Джюрютюуню панели',
-'qbsettings-none' => 'Кёргюзтме',
-'qbsettings-fixedleft' => 'Солу къатды',
-'qbsettings-fixedright' => 'Онгу къатды',
-'qbsettings-floatingleft' => 'Солгъа джюзеди',
-'qbsettings-floatingright' => 'Оннга джюзеди',
-'qbsettings-directionality' => 'Тилигизни джазмасыны онг/сол таба джазылгъанына кёре бегитилибди',
-
# Preferences page
'preferences' => 'Джарашдырыула',
'mypreferences' => 'Джарашдырыула',
'http-read-error' => 'HTTP окъууну халаты.',
'http-timed-out' => 'HTTP-сорууну сакълау заман ётдю.',
'http-curl-error' => 'Бу URL-гъа сорууну халаты: $1',
-'http-host-unreachable' => 'URL-ге джетелмеди',
'http-bad-status' => 'HTTP-соруу ишлеген заманында проблема чыкъгъанды: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'pageinfo-protect-cascading-yes' => 'Хоу',
# Skin names
-'skinname-standard' => 'Стандарт',
-'skinname-nostalgia' => 'Ностальгия',
'skinname-cologneblue' => 'Кёльн такъылыкъ',
'skinname-monobook' => 'Моно-китаб',
-'skinname-myskin' => 'Меники',
-'skinname-chick' => 'Шик',
-'skinname-simple' => 'Бош',
'skinname-modern' => 'Бусагъатдагъы',
'skinname-vector' => 'Вектор',
'userlogin-yourpassword-ph' => 'Donn Ding Paßwood enjävve',
'yourpasswordagain' => 'Noch ens dat Passwood',
'remembermypassword' => 'Op Duur aanmelde (hält {{PLURAL:$1|för eine Daach|bes op $1 Dääsch|bloß för hück}})',
+'userlogin-remembermypassword' => 'Op Duur enlogge',
+'userlogin-signwithsecure' => 'Verschlößeld enlogge',
'securelogin-stick-https' => 'Noh em Enlogge övver HTTPS verbonge blieve.',
'yourdomainname' => 'Ding Domain',
'password-change-forbidden' => 'Do kanns en heh däm Wiki kein Paßwööter ändere.',
'userlogout' => 'Ußlogge',
'notloggedin' => 'Nit enjelogg',
'userlogin-noaccount' => 'Do häß noch keine Zohjang?',
+'userlogin-joinproject' => 'Aanmälde zom Metmaache!',
'nologin' => "Wann De Dich noch nit aanjemeldt häs, dann dun Dich '''$1'''.",
'nologinlink' => 'neu aanmelde',
'createaccount' => 'Aanmelde als ene neue Metmaacher',
'passwordreset-text' => 'Donn dat Fommulaa heh ußfölle, öm e neu Paßwoot faßzelääje.',
'passwordreset-legend' => 'Et Paßwoot zeröck säze',
'passwordreset-disabled' => 'Et Paßwoot zeröck ze säze es heh em Wiki afjeschalldt.',
+'passwordreset-emaildisabled' => 'Heh dat Wiki määt nix met <i lang="en">e-mail</i>!',
'passwordreset-pretext' => '{{PLURAL:$1||Jiff ein vun dä Saache heh dronger enn|}}',
'passwordreset-username' => 'Metmaacher Name:',
'passwordreset-domain' => 'Domähn:',
Eijmohl-Paßwoot: $2',
'passwordreset-emailsent' => 'En <i lang="en">e-mail</i> met Aanjaabe zom neue Paßwoot för der Zohjang heh es verscheck.',
'passwordreset-emailsent-capture' => 'En <i lang="en">e-mail</i> met Aanjaabe zom neue Paßwoot för der Zohjang heh es verscheck woode. Heh dronger kanns De se lässe.',
-'passwordreset-emailerror-capture' => 'En <i lang="en">e-mail</i> met Aanjaabe zom neue Paßwoot för der Zohjang heh sullt verscheck wääde, ävver dat Verschecke hät nit jeflup: $1',
+'passwordreset-emailerror-capture' => 'En <i lang="en">e-mail</i> met Aanjaabe zom neue Paßwoot för der Zohjang heh sullt verscheck wääde, ävver dat Verschecke aan {{GENDER:$2|dä|dat|dä Metmaacher|de|dat}} $2 hät nit jeflup: $1',
# Special:ChangeEmail
'changeemail' => 'Donn Ding Address för de <i lang="en">e-mail</i> ändere',
'listfiles_user' => 'Metmaacher',
'listfiles_size' => 'Byte',
'listfiles_description' => 'Wat en dä Datei dren schtisch',
-'listfiles_count' => 'Versione',
+'listfiles_count' => 'Väsjohne',
# File description page
'file-anchor-link' => 'Datei',
Dä Shtanndat-Zoot-Schlößel „$1“ övverschriif dä älldere Zoot-Schlößel „$2“.",
# Special:Version
-'version' => 'Version vun de Wiki Soffwär zeije',
+'version' => 'Väsjohn vun de Wiki Soffwär zeije',
'version-extensions' => 'Installeete Erjänzunge un Zohsätz',
'version-specialpages' => '{{int:nstab-special}}e',
'version-parserhooks' => 'De Parser-Hooke',
'version-parser-function-hooks' => 'Parserfunktione',
'version-hook-name' => 'De Schnettstelle ier Name',
'version-hook-subscribedby' => 'Opjeroofe vun',
-'version-version' => '(Version $1)',
+'version-version' => '(Väsjohn $1)',
'version-license' => 'Lėzänz',
'version-poweredby-credits' => "Dat Wiki heh löp met '''[//www.mediawiki.org/ MediaWiki]''', copyright © 2001–$1 $2.",
'version-poweredby-others' => 'sönß wää',
Do sullts en [{{SERVER}}{{SCRIPTPATH}}/COPYING Kopie vun dä <i lang="en">GNU General Public License</i>] zosamme met däm Projramm krääje han, un wann nit, schrief aan de: <i lang="en">Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA </i> udder [//www.gnu.org/licenses/old-licenses/gpl-2.0.html liß se em Internet noh].',
'version-software' => 'Installeete Soffwäer',
'version-software-product' => 'Produk',
-'version-software-version' => 'Version',
+'version-software-version' => 'Väsjohn',
'version-entrypoints' => '<i lang="en>URLs</i> för enzeschteije',
'version-entrypoints-header-entrypoint' => 'Enschteesch',
'version-entrypoints-header-url' => '<i lang="en">URL</i>',
# External image whitelist
'external_image_whitelist' => '# Donn aan dä Reih heh nix ändere<pre>
-# Onge künne Brochstöck fun regular expressions aanjejovve wäde,
+# Onge künne Brochstöke fun rejolähre Ußdrök aanjejovve wäde,
# alsu dä Deil zwesche / und /
# Noh em Verjliische met däm URL vun ene Datei fun ußerhallef:
# Treffer: De Datei weed jezeich odder enjebonge.
'tog-shownumberswatching' => 'Көзөмөлдөп жаткан катышуучулардын санын көрсөтүү',
'tog-oldsig' => 'Кезектеги кол тамга:',
'tog-fancysig' => 'Кол тамганын өз уики-белгиси (автоматтык шилтемесиз)',
-'tog-externaleditor' => 'Тышкы редакторду жарыяланбасча колдонуу (адистер үчүн гана, компьютериңизде өзгөчө ырастоолор керек. [//www.mediawiki.org/wiki/Manual:External_editors кошумча маалымат.])',
-'tog-externaldiff' => 'Салыштыруу үчүн тышкы программаны жарыяланбасча колдонуу (адистер үчүн гана, компьютериңизде өзгөчө ырастоолор керек. [//www.mediawiki.org/wiki/Manual:External_editors кошумча маалымат.])',
'tog-showjumplinks' => '«өтүү» деген жардамчы шилтемелерди күйгүзүү',
'tog-uselivepreview' => 'Тез алдын ала көрсөтүүнү колдонуу (JavaScript талап кылынат) (эксперименталдык)',
'tog-forceeditsummary' => 'Оңдоо баяндоосунун талаасы бош болгон кезинде мага алдын ала эскертүү',
'powersearch-togglenone' => 'Эчтеке',
'search-external' => 'Тышкы издөө',
-# Quickbar
-'qbsettings' => 'Навигация панели',
-'qbsettings-none' => 'Көрсөтпөө',
-'qbsettings-fixedleft' => 'Жылбаган сол',
-'qbsettings-fixedright' => 'Жылбаган оң',
-'qbsettings-floatingleft' => 'Оома сол',
-'qbsettings-floatingright' => 'Оома оң',
-
# Preferences page
'preferences' => 'Ырастоолор',
'mypreferences' => 'Ырастоолор',
'listusers-noresult' => 'Катышуучу табылган жок.',
'listusers-blocked' => '(блокировкаланды)',
-# Special:ActiveUsers
-'activeusers' => 'Активдүү катышуучулардын тизмеси',
-'activeusers-hidebots' => 'Ботторду жашыруу',
-'activeusers-hidesysops' => 'Администраторлорду жашыруу',
-'activeusers-noresult' => 'Катышуучулар табылган жок.',
-
# Special:ListGroupRights
'listgrouprights-group' => 'Топ',
'listgrouprights-rights' => 'Укуктар',
Temporärt Passwuert: $2',
'passwordreset-emailsent' => "Eng Mail fir d'Passwuert zréckzesetze gouf geschéckt.",
'passwordreset-emailsent-capture' => "Eng Mail fir d'Passwuert zréckzesetze gouf geschéckt, Dir gesitt se hei drënner.",
-'passwordreset-emailerror-capture' => "Eng Mail fir d'Passwuert zréckzesetze gouf geschéckt, Dir gesitt se hei drënner, awer de Benotzer konnt se net kréien: $1",
+'passwordreset-emailerror-capture' => "Eng Mail fir d'Passwuert zréckzesetze gouf geschéckt, Dir gesitt se hei drënner, awer de {{GENDER:$2|Benotzer}} konnt se net kréien: $1",
# Special:ChangeEmail
'changeemail' => 'Mailadress änneren',
'enotif_subject_restored' => "D'{{SITENAME}}-Säit $1 gouf vum {{gender:$2|$2}} restauréiert",
'enotif_subject_changed' => "D'{{SITENAME}}-Säit $1 gouf vum {{gender:$2|$2}} geännert",
'enotif_body_intro_deleted' => 'D\'{{SITENAME}}-Säit $1 gouf de(n) $PAGEEDITDATE {{gender:$2|vum $2|vun der $2}} geläscht, kuckt $3.',
+'enotif_body_intro_created' => 'D\'{{SITENAME}}-Säit $1 gouf den $PAGEEDITDATE vum $2 {{GENDER:$2|ugeluecht}}, kuckt $3 fir déi aktuell Versioun.',
'enotif_lastvisited' => 'All Ännerungen op ee Bléck: $1',
'enotif_lastdiff' => 'Kuckt $1 fir dës Ännerung.',
'enotif_anon_editor' => 'Anonyme Benotzer $1',
'tog-shownumberswatching' => "'t Aantal gebroekers tuine die dees pagina volg",
'tog-oldsig' => 'Bestaonde ongerteikening:',
'tog-fancysig' => 'Es wikiteks behanjele (zonder autematische verwiezing)',
-'tog-externaleditor' => "Sjtanderd 'ne externe teksbewirker gebroeke (inkel veur experts, speciaal instellinge zien nudig. [//www.mediawiki.org/wiki/Manual:External_editors Mie infermasie])",
-'tog-externaldiff' => "Sjtanderd 'n extern vergeliekingsprogramma gebroeke (inkel veur experts, speciaal instellinge zien nudig [//www.mediawiki.org/wiki/Manual:External_editors Mie infermasie])",
'tog-showjumplinks' => '"gank nao"-toegankelikheidslinks mäögelik make',
'tog-uselivepreview' => '"live veurbesjouwing" gebroeke (vereis JavaScript - experimenteel)',
'tog-forceeditsummary' => "'n Melding gaeve bie 'n laeg samevatting",
'tog-diffonly' => 'Pagina-inhaud zónger verangeringe neet tuine',
'tog-showhiddencats' => 'Verbórge categorië tuine',
'tog-norollbackdiff' => 'Wieziginge eweglaote nao trökdrieje',
+'tog-useeditwarning' => "Waorssjoew mich es ich 'n bewerkdje pagina die nag neet is opgeslage wil verlaote",
'underline-always' => 'Altied',
'underline-never' => 'Noets',
'edit-already-exists' => 'De pagina is neet aangemaak.
Zie besjteit al.',
'defaultmessagetext' => 'Obligaten teks',
+'editwarning-warning' => "Es se dees pagina verleets verluus se meugelik wieziginge die se haes gemaak.
+Es se bös aangemeld, kins se dees waorsjoewing oetzètten in 't bewerkingstabblaad in dien veurkäöre.",
# Parser/template warnings
'expensive-parserfunction-warning' => "'''Waarschuwing:''' dees pagina gebroek te väöl kosbare parserfuncties.
Zoelang as de servers nog neet sjterk genog zunt kins e zeuke bie Google.
Mèrk op dat hun indexe van {{SITENAME}} content e bietje gedatierd kint zien.',
-# Quickbar
-'qbsettings' => 'Menubalkinsjtèllinge',
-'qbsettings-none' => 'Oetgesjakeld',
-'qbsettings-fixedleft' => 'Links vas',
-'qbsettings-fixedright' => 'Rechts vas',
-'qbsettings-floatingleft' => 'Links zjwevend',
-'qbsettings-floatingright' => 'Rechs zjwevend',
-'qbsettings-directionality' => 'Vas, aafhenkelik vanne sjrifrichting van dien sjpraok',
-
# Preferences page
'preferences' => 'Veurkäöre',
'mypreferences' => 'Mien veurkäöre',
'http-read-error' => 'HTTP-laezingsfout.',
'http-timed-out' => 'HTTP-verzeuktimeout',
'http-curl-error' => 'Óphaolingsfout URL: $1',
-'http-host-unreachable' => 'Kòs de URL neet bereike',
'http-bad-status' => "d'r Is e perbleem ópgetraoje bie 't HTTP-verzeuk: $1 $2",
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => 'Gein(e) gebroeker(s) gevonje.',
'listusers-blocked' => '(geblok)',
-# Special:ActiveUsers
-'activeusers' => 'Aktief gebroekers',
-'activeusers-intro' => "Dit is 'n lies mit gebroekers die aktief zeen gewaes in de aafgeloupe {{PLURAL:$1|daag|$1 daag}}.",
-'activeusers-count' => '$1 {{PLURAL:$1|bewèrking|bewèrkinger}} inne {{PLURAL:$3|lèsten daag|lès $3 daag}}',
-'activeusers-from' => 'Tuin gebroekers vanaaf:',
-'activeusers-hidebots' => 'Verberg bots',
-'activeusers-hidesysops' => 'Verberg admins',
-'activeusers-noresult' => 'Gein gebroekers gevónje.',
-
# Special:ListGroupRights
'listgrouprights' => 'Rechte van gebroekersgróppe',
'listgrouprights-summary' => 'Op dees pazjena sjtaon de gebroekersgróppe in deze wiki besjreve, mit zien biebehurende rechte.
'pageinfo-authors' => 'Aantal versjillende sjrievers',
# Skin names
-'skinname-standard' => 'Standaard',
-'skinname-nostalgia' => 'Nostalgie',
'skinname-cologneblue' => 'Keuls blauw',
# Patrolling
* @author Dario vet
* @author Dedee
* @author Gastaz
+ * @author Giromin Cangiaxo
* @author Malafaya
* @author Urhixidur
* @author ZeneizeForesto
'tog-underline' => 'Sottolineâ i collegamenti',
'tog-justify' => 'Alliniamento di paragrafi giustificòu',
'tog-hideminor' => 'asconde e modifiche minori inte ùrtime modifiche',
-'tog-hidepatrolled' => 'Ascondi e modifiche verifichè inte ùrtime modifiche',
-'tog-newpageshidepatrolled' => 'Ascondi e paggine verifiché da-o elenco de paggine ciù reçenti',
-'tog-extendwatchlist' => 'mostrâ tùtte e modifiche a-i òsserve speciali',
-'tog-usenewrc' => 'Usâ e ùrtime modifiche avansê (serve Javascript)',
+'tog-hidepatrolled' => 'Ascondi e modifiche verificæ inte ùrtime modifiche',
+'tog-newpageshidepatrolled' => "Ascondi e paggine verificæ da l'elenco de paggine ciù reçenti",
+'tog-extendwatchlist' => "mostra tùtte e modifiche a-i osservæ speciali, non solo l'urtima",
+'tog-usenewrc' => 'Ammuggia pe paggina e modifiche in urtime modifiche e sotta oservaçion (serve o Javascript)',
'tog-numberheadings' => 'Nùmeraçion aotomàtica di tìtoli de seçión',
-'tog-showtoolbar' => 'Fâ vedde a barra de strumenti de modìffica (con JavaScript)',
-'tog-editondblclick' => 'Modifica e paggine co-o dópio clic (serve Javascrpt)',
+'tog-showtoolbar' => 'Fanni vedde a barra di strumenti de modìffica (serve JavaScript)',
+'tog-editondblclick' => 'Modifica e paggine co-o doggio clic (serve Javascrpt)',
'tog-editsection' => 'Modifica e seçión co-o colegamento [modifica]',
-'tog-editsectiononrightclick' => 'Modifica e seçión co-o clic destro in sciô tìtolo (serve Javascipt)',
+'tog-editsectiononrightclick' => 'Modifica e seçión co-o clic drito in sciô tìtolo (serve Javascipt)',
'tog-showtoc' => "Fanni védde l'indiçe pe-e pàgine con ciù de 3 seçioìn",
'tog-rememberpassword' => "Arregorda a mæ paròlla d'ordine (a-o màscimo pe $1 {{PLURAL:$1|day|days}})",
-'tog-watchcreations' => 'Azónzi e pàgine a-i oservæ speciâli',
+'tog-watchcreations' => 'Azonzi e paggine che creo e i file che carrego a-i oservæ speciâli',
+'tog-watchdefault' => 'Azonzi e paggine e i files che modiffico a-i mæ sotta oservaçion',
+'tog-watchmoves' => 'Azonzi e paggine e i file che mescio a-i mæ sotta oservaçion',
+'tog-watchdeletion' => 'Azonzi e paggine e i files che scancello a-i mæ sotta oservaçion',
+'tog-minordefault' => 'Indica de longo comme menô e modiffiche',
'tog-previewontop' => "Veddi l'anteprimma de d'äto a-o spaçio pe cangiâ",
'tog-previewonfirst' => "Veddi l'anteprimma a-o primmo cangiamento",
-'tog-enotifwatchlistpages' => "Fammelo savéi via e-mail quande 'na paggina inta mæ lista in osservassion a va cangiaa.",
+'tog-nocache' => 'Disabilita a cache de pagine do navegatô',
+'tog-enotifwatchlistpages' => "Famme savéi via e-mail quande 'na paggina o in file inti mæ osservæ a ven cangiâ.",
'tog-enotifusertalkpages' => "Màndime un messaggio e-mail se gh'é de-e modìffiche inta pagina de discuscion da mæ pagina d'utente.",
+'tog-enotifminoredits' => 'Inviami una email pe e modifiche menoî ascì de pagine e di file',
+'tog-enotifrevealaddr' => 'Mostra o mæ indirizzo e-mail inti messaggi de notifica',
+'tog-shownumberswatching' => "Mostra o numero di utenti che tegnan d'oeuggio sta pagina",
+'tog-oldsig' => 'Firma attuale:',
+'tog-fancysig' => 'Tratta a firma comme wikitesto (sensa un collegamento aotomatico)',
+'tog-showjumplinks' => 'Attiva i collegamenti d\'accescibilitæ "sata a"',
+'tog-uselivepreview' => "Doeuvia l'anteprimma in diretta (ghe voeu o JavaScript)(sperimentâ)",
+'tog-watchlisthideown' => "Ascondi e mæ modiffiche da-a lista che tegno d'oeuggio",
+'tog-watchlisthidebots' => "Ascondi e modiffiche di bot da-a lista che tegno d'oeuggio",
+'tog-watchlisthideminor' => "Ascondi e modiffiche menoî da-a lista che tegno d'oeuggio",
+'tog-watchlisthideliu' => "Ascondi e modiffiche di utenti intræ da-a lista che tegno d'oeuggio",
+'tog-watchlisthideanons' => "Ascondi e modiffiche di utenti anonnimi da-a lista che tegno d'oeuggio",
+'tog-watchlisthidepatrolled' => "Ascondi e modiffiche za controllæ da-a lista che tegno d'oeuggio",
+'tog-ccmeonemails' => "Mandime 'na coppia de e-mail che mando a-i atri utenti",
+'tog-diffonly' => 'No mostrâ o contegnuo da paggina sotta o confronto tra verscioin',
'tog-showhiddencats' => 'Fa vedde e categorîe ascose',
+'tog-norollbackdiff' => "Ometti o confronto tra verscioin doppo ch'ho fæto o ripristino",
+'tog-useeditwarning' => "Avertime se lascio 'na paggina de modiffica sens'avei sarvou i cangi",
'underline-always' => 'Sempre',
'underline-never' => 'Mâi',
+# Font style option in Special:Preferences
+'editfont-style' => "Stile do carattere de l'aera de modiffica",
+
# Dates
'sunday' => 'Domenega',
'monday' => 'Lunedì',
'pagecategories' => '{{PLURAL:$1|Categorîa|Categorîe}}',
'category_header' => 'Pàgine inta categorîa "$1"',
'subcategories' => 'Sottocategorîe',
-'category-media-header' => 'Archivio inta categorîa "$1"',
-'category-empty' => "''Pe òua sta categorîa a no contegne nisciùnn-a pàgina ò archivio moltimedia.''",
+'category-media-header' => 'Media inta categorîa "$1"',
+'category-empty' => "''Pe òua sta categorîa a no contegne pàgine ò file murtimediæ.''",
'hidden-categories' => '{{PLURAL:$1|Categoria ascoza|Categorie ascoze}}',
'hidden-category-category' => 'Categorîe ascôse',
'category-subcat-count' => "{{PLURAL:$2|Sta categoria a contegne sôlo 'na sottocategoria, chi de segoito.|Sta categoria a contegne {{PLURAL:$1|a sottocategoria indicâ|e $1 sottocategorie indicæ}} di segoito, pe in totale de $2.}}",
'category-subcat-count-limited' => "'Sta categorîa a contegne {{PLURAL:$1|ûnn-a sottocategorîa, indicaa|$1 sottocategorîe, indicæ}} chì inzû.",
-'category-article-count' => "{{PLURAL:$2|Sta categoria a contegne sôlo inna pagina, chi de segoito.|Sta categoria a contegne {{PLURAL:$1|a pàgina a l'é|e $1 pàgine son}} de segoito, pe in totale de $2.}}",
+'category-article-count' => "{{PLURAL:$2|Questa categoria a contegne solo sta pagina chì.|Questa categoria a contegne {{PLURAL:$1|a pagina indicâ|e $1 pagine indicæ}} chì de sotta , insce 'n totale de $2.}}",
'category-article-count-limited' => "'Sta categorîa a contegne {{PLURAL:$1|'sta paggina|'ste $1 paggine}}.",
-'category-file-count' => "{{PLURAL:$2|Sta categoria a contegne sôlo in file, chi de segoito.|Sta categoria a contegne {{PLURAL:$1|o file o l'é|e $1 file son}} de segoito, pe in totale de $2.}}",
+'category-file-count' => "{{PLURAL:$2|Sta categoria a contegne sôlo sto file.|{{PLURAL:$1|Sto file o l'é|Sti $1 file son}} inte sta categoria, pe in totale de $2.}}",
+'category-file-count-limited' => 'Questa categoria a contegne {{PLURAL:$1|o file indicao|i $1 file indicæ}} chi de sotta.',
'listingcontinuesabbrev' => 'cont.',
+'index-category' => 'Paggine indiçizzæ',
'noindex-category' => 'Pàgine sénsa indiçe',
+'broken-file-category' => 'Paggine con di colegamenti a di file che no ghe son',
'about' => 'Informaçioìn',
'article' => 'Pagina de i contenùi',
'newwindow' => "(O s'arve inte 'n âtro barcon)",
'cancel' => 'Scancella',
'moredotdotdot' => 'De ciû...',
-'mypage' => 'A mea pagina',
-'mytalk' => 'Mæ discuscioin',
+'morenotlisted' => 'Atro...',
+'mypage' => 'Paggina',
+'mytalk' => 'Discuscioin',
'anontalk' => 'Discuscion pe questo indirisso IP',
'navigation' => 'Navegaçión',
'and' => ' e',
# Cologne Blue skin
'qbfind' => 'Attrêuva',
+'qbbrowse' => 'Navvega',
'qbedit' => 'Cangia',
'qbpageoptions' => "Opsioîn de 'sta paggina",
'qbmyoptions' => 'E mæ paggine',
'qbspecialpages' => 'Pagine speçiä',
'faq' => 'Domande frequenti',
+'faqpage' => 'Project:Domande frequente',
# Vector skin
'vector-action-addsection' => 'Azónzi discusción',
'vector-action-delete' => 'Scancella',
'vector-action-move' => 'Mescia',
-'vector-action-protect' => 'Protezzi',
+'vector-action-protect' => 'Protezi',
+'vector-action-undelete' => 'Recuppera',
+'vector-action-unprotect' => 'Cangia a proteçion',
'vector-view-create' => 'Crea',
'vector-view-edit' => 'Càngia',
'vector-view-history' => 'Fanni védde a Stöia',
'namespaces' => 'Namespaces',
'variants' => 'Diferense',
+'navigation-heading' => 'Menu de navegaçion',
'errorpagetitle' => 'Erô',
-'returnto' => 'Tornâ a $1.',
+'returnto' => 'Torna a $1.',
'tagline' => 'Da {{SITENAME}}',
'help' => 'Agiùtto',
'search' => 'Çerca',
'searcharticle' => 'Vanni',
'history' => 'Stöia da pàgina',
'history_short' => 'Stöia',
+'updatedmarker' => 'modificâ da-a mæ urtima vixita',
'printableversion' => 'Verscion da stanpâ',
-'permalink' => 'Inganso fisso',
+'permalink' => 'Ingancio fisso',
'print' => 'Stampa',
'edit' => 'Càngia',
'create' => 'Crea',
'create-this-page' => "Crea 'sta paggina",
'delete' => 'Scancella',
'deletethispage' => "Scassa 'sta paggina",
-'protect' => 'Proteze',
-'protect_change' => 'cangiâ',
+'undelete_short' => 'Recuppera {{PLURAL:$1|una revixon|$1 revixoin}}',
+'protect' => 'Protezi',
+'protect_change' => 'cangia',
'protectthispage' => "Proteze 'sta paggina.",
'unprotect' => 'Càngia proteçión',
'unprotectthispage' => 'Càngia a proteçión de sta paggina',
'newpage' => 'Nêuva pàgina',
-'talkpage' => 'Paggina de discûxon',
+'talkpage' => 'Paggina de discuscion',
'talkpagelinktext' => 'Ciæti',
'specialpage' => 'Pagina speçiâ',
'personaltools' => 'Strùmenti personâli',
+'postcomment' => 'Noeuva seçion',
'articlepage' => 'Veddi a voxe',
'talk' => 'Ciæti',
'views' => 'Vìxite',
'toolbox' => 'Arneixi',
+'userpage' => 'Veddi a paggina utente',
'projectpage' => 'Veddi a pagina de o progetto',
+'imagepage' => 'Vizualizza a paggina do file',
+'mediawikipage' => 'Vizualizza o messaggio',
+'templatepage' => 'Vizualizza o modello',
+'viewhelppage' => "Vizualizza a paggina d'agiutto",
+'categorypage' => 'Veddi a paggina da categoria',
'viewtalkpage' => 'Veddi o ciæto',
'otherlanguages' => 'In âtre lengóe',
-'redirectedfrom' => '(Rediritto da $1)',
+'redirectedfrom' => '(Rendirissou da $1)',
'redirectpagesub' => 'Paggina de rindirissamento',
'lastmodifiedat' => "Sta pagina a l'è stæta cangiâ l'urtima votta a e $2 do $1.",
'viewcount' => "'Sta paggina a l'è stæta vista {{PLURAL:$1|solo 'na vòtta|$1 vòtte}}.",
-'protectedpage' => 'Paggina protezûa',
+'protectedpage' => 'Paggina protetta',
'jumpto' => 'Vanni a:',
'jumptonavigation' => 'Navegaçión',
'jumptosearch' => 'çerca',
+'view-pool-error' => "Scuza ma a-o momento i server sono stracarreghi.
+Troppi utenti çercan d' amiâ sta paggina.
+Aspeta quarche menuto primma de çercâ torna d'accede a sta pagina.
+
+$1",
+'pool-errorunknown' => 'Aro sconosciuo',
# All link text and link target definitions of links into project namespace that get used by other message strings, with the exception of user group pages (see grouppage) and the disambiguation template definition (see disambiguations).
'aboutsite' => 'Informaçioìn in sciô {{SITENAME}}',
'aboutpage' => 'Project:Informaçioìn',
'copyright' => 'O contegnûo o se peu trovâ a $1.',
-'copyrightpage' => "{{ns:project}}:Diritti d'autô",
+'copyrightpage' => "{{ns:project}}:Driti d'autô",
'currentevents' => 'Atualitæ',
'currentevents-url' => 'Project:Atualitæ',
-'disclaimers' => 'Avértense',
+'disclaimers' => 'Avertense',
'disclaimerpage' => 'Project:Avertense generâli',
-'edithelp' => "Agiùtto pe l'ediçion",
+'edithelp' => 'Agiùtto',
'edithelppage' => 'Help:Modiffica',
'helppage' => 'Help:Contegnûi',
'mainpage' => 'Pàgina prinçipâ',
'portal' => 'Pòrtego da comunitæ',
'portal-url' => 'Project:Pòrtego da comunitæ',
'privacy' => 'Politica in sci dæti privæ',
-'privacypage' => 'Project:Leze in sci dæti privæ',
+'privacypage' => 'Project:Politica in scî dæti privæ',
'badaccess' => "No ti g'hæ o permisso",
'badaccess-group0' => "No ti g'hæ o permisso pe fâ quest'assion.",
-'badaccess-groups' => "L'assion che ti vêu fâ a l'è permissa solo a i ûtenti de ûn di grûppi $1.",
+'badaccess-groups' => "L'assion che ti vêu fâ a l'è permissa solo a i ûtenti {{PLURAL:$2|do gruppo|de un de sti gruppi}}: $1.",
+
+'versionrequired' => 'Ghe voeu a verscion $1 de MediaWiki',
+'versionrequiredtext' => "Pe doeuviâ sta paggina ghe voeu a verscion $1 do software MediaWiki. Amia [[Special:Version|l'appoxita paggina]].",
'ok' => "D'accòrdio",
'retrievedfrom' => 'Estræto da "$1"',
'youhavenewmessages' => "Ti gh'æ $1 ($2).",
'newmessageslink' => 'Nêuvi messaggi',
-'newmessagesdifflink' => 'Differensa co-a revixon preçedente',
+'newmessagesdifflink' => 'urtima modiffica',
+'youhavenewmessagesfromusers' => "Ti g'hæ $1 da {{PLURAL:$3|un atro utente|$3 utenti}} ($2).",
+'youhavenewmessagesmanyusers' => "Ti g'hæ $1 da tanti utenti ($2).",
+'newmessageslinkplural' => '{{PLURAL:$1|un noeuvo messaggio|noeuvi messaggi}}',
+'newmessagesdifflinkplural' => '{{PLURAL:$1|urtima modifica|urtime modifiche}}',
'youhavenewmessagesmulti' => "Ti t'æ neuvi messaggi in scia $1",
'editsection' => 'Càngia',
'editold' => 'càngia',
'toc' => 'Indiçe',
'showtoc' => 'Fâ vedde',
'hidetoc' => 'Asconde',
+'collapsible-collapse' => 'Comprimmi',
+'collapsible-expand' => 'Espandi',
+'thisisdeleted' => 'Amia o ripristina $1?',
'viewdeleted' => 'Vedde $1?',
+'restorelink' => '{{PLURAL:$1|una modifica scancelâ|$1 modifiche scancelæ}}',
+'feedlinks' => 'Feed:',
+'feed-invalid' => 'Modalitæ de sottoscriçion do feed non vallida.',
'site-rss-feed' => 'Feed RSS de $1',
'site-atom-feed' => 'Feed Atom de $1',
'page-rss-feed' => 'Feed RSS pe "$1"',
'page-atom-feed' => 'Feed Atom pe "$1"',
'red-link-title' => '$1 (ancon da scrîve)',
+'sort-descending' => 'Ordine decrescente',
+'sort-ascending' => 'Ordine crescente',
# Short words for each namespace, by default used in the namespace tab in monobook
'nstab-main' => 'Pàgina',
'nstab-user' => 'Utente',
+'nstab-media' => 'File murtimediâ',
'nstab-special' => 'Pàgina speçiâ',
'nstab-project' => 'Paggina de servissio',
'nstab-image' => 'Archivio',
+'nstab-mediawiki' => 'Messaggio',
'nstab-template' => 'Template',
'nstab-help' => 'Agiûtto',
'nstab-category' => 'Categorîa',
# Main script and global functions
-'nosuchactiontext' => "L'URL a no corisponde a 'n comando reconosciûo da-o software MediaWiki",
+'nosuchaction' => 'No se poeu',
+'nosuchactiontext' => "L'açion specificâ inta URL a no l'è vallida.
+O che t'hæ scrito mâ, o che donque l'ea sbaliou o colegamento.
+O magara gh'è 'na cammoa into software doeuviou da {{SITENAME}}.",
+'nosuchspecialpage' => "Sta paggina speciale a no gh'è",
# General errors
'error' => 'Errô',
'databaseerror' => 'Errô da a base de i dæti',
'readonly' => 'Database bloccòu',
+'enterlockreason' => "Scrivi o motivo do blocco, e 'na stimma de quande o saiâ rimosso",
'missing-article' => "O database o no l'à trovòu o testo di 'na pàgina che ghe saiêiva dovûa êse co-o nómme de \"\$1\" \$2.
Spésse vòtte questo o sucede quande a vegne riciamâ, da stöia ò dò-u confronto tra revixioìn, in colegaménto a 'na pàgina scancelâ, a in confronto tra revixioìn che no ghe son ciù ò a in confronto tra revixioìn sénsa ciù a stöia.
'badarticleerror' => "L'açion che ti te veu fâ a non l'è permissa in sta pagina.",
'cannotdelete' => 'Non çe peu scassâ a pagina o o papê. (o peu ese za stæto scassoö da quarchedun ätro).',
'badtitle' => "O tìtolo o no l'è corretto.",
-'badtitletext' => "O tittolo da paggina çercâa o l'è vêuo, sballiòu o con caratteri no accettæ, oppûre o deriva da 'n errô inti collegamenti tra scîti Wiki diversci o verscioîn in léngue diversce do mæximo scîto.",
+'badtitletext' => "O tittolo da paggina çercâ o l'è vêuo, sballiòu o con caratteri no accettæ, oppû o deriva da 'n errô inti collegamenti inter-lengoa o inter-wiki.",
'viewsource' => 'Veddi a fonte',
'protectedpagetext' => "'Sta paggina a l'è stæta protezûa pe impedîghe a modiffica.",
'viewsourcetext' => "O l'è poscibbile vedde e copiâ o còddice sorgente de 'sta paggina:",
+'customjsprotected' => "No ti gh'æ i permessi pe cangiâ sta pagina de JavaScript percose a contegne e impostaçioin personæ de 'n atro utente",
+'ns-specialprotected' => 'No se pœu modificâ e paggine speciali',
+'titleprotected' => "A creaçion de 'na paggina con sto tittolo a l'è stæta bloccâ da [[User:$1|$1]].
+A raxon a l'è: ''$2''.",
+'exception-nologin' => "No t'ê introu",
+'exception-nologin-text' => "Pe sta paggina ò sta açion ti gh'æ da effettuâ l'accesso inte sta wiki.",
+
+# Virus scanner
+'virus-scanfailed' => 'scansion fallia (codice $1)',
+'virus-unknownscanner' => 'antivirus sconosciuo:',
# Login and logout pages
'yourname' => 'Nomme',
'yourpassword' => 'Pòula segretta:',
-'yourpasswordagain' => 'Scrivi tórna a pòula segrétta:',
-'remembermypassword' => 'Aregòrda a mæ login in sto navegatô (pe in mascìmo de $1 {{PLURAL:$1|giórno|giórni}})',
+'yourpasswordagain' => 'Riscrivi a pòula segrétta:',
+'remembermypassword' => 'Aregòrda a mæ login in sto navegatô (pe in mascimo de $1 {{PLURAL:$1|giórno|giórni}})',
'yourdomainname' => 'Indirisso do scito:',
+'password-change-forbidden' => 'No ti peu cangiâ poula segretta in questa wiki.',
'login' => 'Intra',
'nav-login-createaccount' => 'Intra / Registrate',
-'loginprompt' => 'Ti devi avéi i cookie abilitæ into teu navigatô pe intrâ in {{SITENAME}}.',
-'userlogin' => 'Intra / Registrate',
+'loginprompt' => "Pe fâ l'accesso inte {{SITENAME}} ti g'hæ da abilitâ i cookie.",
+'userlogin' => 'Intra / Registrite',
+'userloginnocreate' => 'Intra',
'logout' => 'Sciorti',
'userlogout' => 'Sciorti',
-'nologin' => "No ti gh'æ ancon l'aceizo? '''$1'''.",
-'nologinlink' => "Creâ 'n account",
+'notloggedin' => "No t'ê introu",
+'nologin' => "No ti gh'æ ancon in acesso? '''$1'''.",
+'nologinlink' => "Creâ 'n' utensa",
'createaccount' => "Crea 'n nêuvo account",
-'gotaccount' => "Ti ghe l'æ za 'n conto d'aceizo? '''$1'''.",
+'gotaccount' => "Ti ghe l'æ za 'n' utensa? '''$1'''.",
'gotaccountlink' => 'Intra',
-'userlogin-resetlink' => "T'æ ascordòu i teu dæti de aceizo?",
+'userlogin-resetlink' => "T'æ ascordòu i teu dæti de acesso?",
+'createaccountreason' => 'Raxon:',
'badretype' => "E paròlle d'ordine che t'hæ scrîo son despægie.",
-'userexists' => "O nomme d'ûtente inserîo o l'è zà in ûso.<br />
-Pe piaxei prêuva a scellie 'n âtro.",
+'userexists' => "O nomme ûtente inserîo o l'è za doeuviao.<br />
+Çernine 'n âtro.",
'loginerror' => "Errô inte l'accesso",
+'createaccounterror' => "Imposcibbile creâ l'account: $1",
'noname' => "O nomme d'ûtente o l'è sballiòu.",
'loginsuccesstitle' => 'Accesso effettuòu',
'loginsuccess' => "'''O collegamento a-o server de {{SITENAME}} co-o nomme d'ûtente \"\$1\" o l'è attivo.'''",
'nosuchuser' => 'No gh\'è nisciûn ûtente con quello nomme "$1". Verificâ o nomme inserîo ò creâ \'n nêuvo accesso.',
'nosuchusershort' => 'No gh\'è nisciûn ûtente con quello nomme "$1". Verificâ o nomme inserîo.',
'nouserspecified' => "O se deive inserî 'n nomme d'ûtente.",
+'login-userblocked' => "St'utente o l'è bloccou. Accesso negou.",
'wrongpassword' => "Ti gh'æ scrîo 'na paròlla d'ordine sbaliâ. Tenta torna.",
'wrongpasswordempty' => "No ti g'hæ scrîo nisciûnn-a paròlla d'ordine. Tenta torna.",
-'passwordtooshort' => "A paròlla d'ordine che ti gh'æ misso a no serve òu a l'é tròppo cûrta.
-A dêve contegnî mìnimo $1 caratteri e esse diverza da-o teu nómme utente.",
+'passwordtooshort' => 'E password devan aveighe aomanco {{PLURAL:$1|1 carattere|$1 caratteri}}.',
+'password-name-match' => "A password a dev'ese despægia da-o nomme utente.",
+'password-login-forbidden' => "L'utilizzo de sto nomme utente e password o l'è stæto proibio.",
'mailmypassword' => "Invia 'na nêuva paròlla segrétta a-a mæ e-mail",
'passwordremindertitle' => "Servissio Password Reminder (nêuva paròlla d'ordine temporannia) de {{SITENAME}}",
-'passwordremindertext' => "Quarchedûn (probabilmente ti, con indirisso IP \$1) o g'ha domandòu l'invîo de 'na nêuva paròlla d'ordine pe l'accesso a {{SITENAME}} (\$4).
-A paròlla d'ordine pe l'ûtente \"\$2\" a l'è stæta impostâa a \"\$3\".
-O se conseggia de fâ l'accesso quanto primma e cangiâ a paròlla d'ordine immediatamente.
-Se no ti è stæto ti a fâ 'sta domanda, oppûre se ti g'hæ ritrovòu a têu paròlla d'ordine e no ti vêu cangiâla ciû, ti pêu ignorâ 'sto messaggio e andâ avanti ûsando a vegia paròlla d'ordine.",
+'passwordremindertext' => "Quarchedûn (probabilmente ti, con indirisso IP \$1) o l'ha domandòu l'invîo de 'na nêuva paròlla d'ordine pe l'accesso a {{SITENAME}} (\$4).
+A paròlla d'ordine pe l'ûtente \"\$2\" a l'è stæta impostâ a \"\$3\".
+Se conseggia de fâ l'accesso quanto primma e cangiâ a paròlla d'ordine immediatamente.
+Se no ti ê stæto ti a fâ 'sta domanda, oppûre se ti t'hæ ritrovòu a têu paròlla d'ordine e no ti vêu cangiâla ciû, ti pêu ignorâ 'sto messaggio e andâ avanti deuviando a vegia paròlla d'ordine.",
'noemail' => 'No gh\'è nisciûn indirisso e-mail registròu pe l\'ûtente "$1".',
+'noemailcreate' => 'Ti devi dâ un addresso e-mail vallido.',
'passwordsent' => "Ûnn-a nêuva paròlla d'ordine a l'è stæta inviâa a l'indirisso e-mail registròu pe l'ûtente \"\$1\".
Pe piaxei, fa 'n accesso appenn-a ti a ghe reçeivi.",
'blocked-mailpassword' => "O teu indirisso IP o l'è affirmoö, e pe sta razon o non se peu usâ a funscion de remandâ a pòula segretta.",
'eauthentsent' => "'N messaggio e-mail de confermassion o l'è stæto inviòu a l'indirisso indicòu.
Pe abilitâ l'invîo de messaggi e-mail pe quest'accesso, o se deive seguî l'istrûssioîn indicæ, coscì ti confermi che ti t'è o legittimo propietâjo de l'indirisso.",
-'acct_creation_throttle_hit' => 'O ne dispiâxe, ma ti hæ zà creòu $1 accesci. No ti pêu creâne de ciû!',
-'emailauthenticated' => "O teu indirisso de posta elettronega o l'è stæto autenticoö o $1.",
+'mailerror' => "Errô inte l'invio do messaggio: $1",
+'acct_creation_throttle_hit' => "Ne dispiâxe, ma t'hæ zà creòu $1 accesci. No ti pêu creâne ciû!",
+'emailauthenticated' => "O teu indirisso de posta elettronica o l'è stæto autenticou o $1.",
'emailconfirmlink' => 'Conferma o teu indirisso de posta elettronega',
'accountcreated' => 'Graçie pe esëte registroö!!!',
'accountcreatedtext' => "Utente $1, ti te guägno l'açeiso!",
+'createaccount-title' => "Creaçion de 'n conto pe {{SITENAME}}",
+'usernamehasherror' => 'O nomme utente o no poeu contegnî di caratteri hash',
+'login-abort-generic' => "O to accesso o no l'ha avuo successo - Abortio",
'loginlanguagelabel' => 'Lengoa: $1',
# Change password dialog
-'resetpass' => 'Reverti a pòula segretta',
-'resetpass_header' => 'Reverti a pòula segretta',
+'resetpass' => 'Cangia a pòula segretta',
+'resetpass_announce' => "T'ê introu co in codiçe temporanio de l'e-mail.Pe completâ l'accesso ti devi çerne 'na neuva poula segretta chì:",
+'resetpass_header' => 'Cangia a pòula segretta do conto',
+'oldpassword' => 'Vegia poula segretta',
+'newpassword' => 'Neuva poula segretta',
'retypenew' => "Ripette a nêuva paròlla d'ordine:",
+'resetpass_submit' => 'Çerni a poula segretta e intra',
'resetpass_forbidden' => "No l'é poscìbile cangiâ e paròlle segrétte",
# Edit page toolbar
'bold_sample' => 'Grascetto',
'bold_tip' => 'Grascetto',
-'italic_sample' => 'Testo in corsciva',
+'italic_sample' => 'Testo in corscivo',
'italic_tip' => 'Corscivo',
-'link_sample' => "Nomme de l'inganço",
-'link_tip' => 'Inganço interno',
-'extlink_sample' => "http://www.example.com Nomme de l'inganço",
+'link_sample' => "Nomme de l'ingancio",
+'link_tip' => 'Ingancio interno',
+'extlink_sample' => "http://www.example.com Nomme de l'ingancio",
'extlink_tip' => 'Colegaménto esterno (inclûdde o prefisso http:// )',
'headline_sample' => 'Tìtolo',
'headline_tip' => 'Tìtolo de 2° livello',
'nowiki_sample' => 'Inserî chì o testo sensa formattaçion',
'nowiki_tip' => 'Ignorâ a formattassion wiki',
'image_sample' => 'Exempio.jpg',
-'image_tip' => 'Inmàgine caregâ',
+'image_tip' => 'Incorpora file',
'media_sample' => 'Exempio.ogg',
-'media_tip' => 'Colegaménto a file moltimediale',
+'media_tip' => 'Colegaménto a file moltimediâ',
'sig_tip' => 'Firma con data e ôa',
-'hr_tip' => 'Linnia orissontâ',
+'hr_tip' => 'Linnia orizontâ',
# Edit pages
'summary' => 'Oggetto:',
'subject' => 'Argomento (tittolo):',
'minoredit' => 'Cangiamento minô (m)',
-'watchthis' => 'Azzonze a-i osservæ speçiâli',
+'watchthis' => 'Metti sotta oservaçion',
'savearticle' => 'Sarva a pàgina',
'preview' => 'Anteprìmma',
'showpreview' => "Veddi l'anteprimma",
'showdiff' => 'Veddi i cangiamenti',
-'anoneditwarning' => "'''Attension:''' No ti t'hæ registròu. O têu indirisso IP o sajà misso inta stöja di cangiamenti da paggina.",
+'anoneditwarning' => "'''Attension:''' No t'ê intròu. Inta stoia di cangiamenti da paggina ghe saiâ misso o têu adresso IP.",
'summary-preview' => 'Anteprimma oggetto:',
'blockedtitle' => "L'utente o l'é bloccòu",
'blockedtext' => "''''Sto nomme d'ûtente ou indirisso IP o l'è stæto bloccòu.'''
'accmailtitle' => 'Pòula segretta spedïa',
'accmailtext' => 'A pòula segretta pe-o utente "$1" a l\'è stæta spedïa a o indirisso $2.',
'newarticle' => '(Nêuvo)',
-'newarticletext' => "Sto colegaménto o corisponde a 'na pàgina che ancon a no l'existe.
+'newarticletext' => "Sto colegaménto o corisponde a 'na pàgina ch'a no l'existe ancon.
-Se o se vêu creâ a pàgina òua, o se pêu comensâ a scrive o testo into spàçio vêuo chì sotta.
-(fâ riferimento a-e [[{{MediaWiki:Helppage}}|paggine d'agiûtto]] pe ciû informaçioìn).
+Se se vêu creâ a pàgina òua, se pêu comensâ a scrive into spàçio chì sotta.
+(amia e [[{{MediaWiki:Helppage}}|paggine d'agiûtto]] pe ciû informaçioìn).
-Se t'ê intròu inte sto colegaménto pe sbàlio, o basta sciaccâ '''Inderê''' into navegatô.",
+Se t'ê intròu chì pe sballio, sciacca '''Inderê''' into navegatô.",
'noarticletext' => "Inte sto momento a pagina çercâ a l'è vêua. O l'è poscibbile [[Special:Search/{{PAGENAME}}|çercâ 'sto tittolo]] inte âtre pagine do scîto opû [{{fullurl:{{FULLPAGENAME}}|action=edit}} cangiâ a pagina òua].",
-'noarticletext-nopermission' => "Òua a pàgina çercâ a l'è vêua. O l'è poscìbile [[Special:Search/{{PAGENAME}}|çercâ sto tìtolo]] inte âtre pàgine do scîto opû [{{fullurl:{{FULLPAGENAME}}|action=edit}} cangiâ a pàgina òua].",
+'noarticletext-nopermission' => "Òua a pàgina çercâ a l'è vêua. L'è poscìbile [[Special:Search/{{PAGENAME}}|çercâ sto tìtolo]] inte di âtre pàgine do scîto o <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} çercâ inti registri corelæ]</span>, ma no ti gh'hæ i outorizzaçioin pe creâ sta paggina.",
'previewnote' => "'''Questa chì a l'è solo 'n'anteprimma; i cangiamenti no son ancon stæti sarvæ!'''",
'editing' => 'Modiffica de $1',
'editingsection' => 'Càngio de $1 (seçión)',
Se no ti veu che i testi teu pêuan esse modificæ da quarchedùn sensa limitaçioìn, no mandâli a {{SITENAME}}.<br />
Inviando o testo ti diciâri, sott'a teu responsabilitæ, ch'o l'é stæto scrîto da ti personalmente oppure ch'o l'é stæto piggiòu da 'na fonte de pùbrico domìnio òu anàlogamente lìbea.<br />
'''NO INVIÂ MATERIÂLE COVERTO DA DRÎTI D'AUTÔ SENSA OUTORIZAÇION!'''",
-'templatesused' => '{{PLURAL:$1|Template adêuviòu|Template adêuviæ}} in sta pàgina:',
+'templatesused' => '{{PLURAL:$1|Template dêuviòu|Template dêuviæ}} in sta pàgina:',
'templatesusedpreview' => "Template dêuviæ inte 'st'anteprimma:",
'template-protected' => '(protezûo)',
'template-semiprotected' => '(semiprotezûo)',
-'hiddencategories' => "Sta pàgina a l'é de {{PLURAL:$1|1 categoria ascoza|$1 categorie ascoze}}:",
+'hiddencategories' => 'Sta pàgina a fa parte de {{PLURAL:$1|1 categoria ascoza|$1 categorie ascoze}}:',
'nocreatetext' => "A poscibilitæ de creâ nêuve paggine insce {{SITENAME}} a l'è stæta limitâ solo a-i ûtenti registræ.
O se pêu tornâ inderê e modificâ 'na paggina escistente, oppûre [[Special:UserLogin|intrâ ò creâ 'n accesso nêuvo]].",
-'permissionserrorstext-withaction' => "No t'æ i permìssi pe $2 pe {{PLURAL:$1|sta raxon|ste raxoìn}}:",
-'recreate-moveddeleted-warn' => "Atençión: o se sta pe ricreâ 'na pàgina zà scancelâ into passòu.'''
+'permissionserrorstext-withaction' => "No ti g'hæ i permìssi pe $2 pe {{PLURAL:$1|sta raxon|ste raxoìn}}:",
+'recreate-moveddeleted-warn' => "Atençión: ti stæ pe ricreâ 'na pàgina zà scancelâ into passòu.'''
-O se deive consciderâ se o l'è davéi coretto continoâ a cangiâ 'sta pàgina.
-E cancellaçioìn e mesciaménti son publicæ chì sotta:",
-'moveddeleted-notice' => "Sta pàgina a l'é stæta cancelâ.
-E scancelaçioìn e mescaménti son riportæ chi pe informaçión.",
+Consciddera se l'è o caxo de continoâ a cangiâ 'sta pàgina.
+Pe comoditæ e cancellaçioìn e i stramui son pubricæ chì sotta:",
+'moveddeleted-notice' => "Sta pàgina a l'é stæta scancelâ.
+A lista de scancelaçioìn e di stramui son riportæ chi de sotta pe informaçión.",
# Parser/template warnings
-'post-expand-template-inclusion-warning' => "'''Atento:''' a dimensción di template che t'æ misso l'é tròppo grànde.
-Quàrcheùn di teu template no saiâ azónto.",
+'post-expand-template-inclusion-warning' => "'''Atento:''' a dimensción di template che t'æ misso a l'é tròppo grande.
+Quarchedun di teu template o no saiâ incluzo.",
'post-expand-template-inclusion-category' => "Pàgine con di template che gh'àn a dimensción ciù âta do limite mascimo",
'post-expand-template-argument-warning' => "'''Atençión:''' sta pàgina a contegne un ò ciù argomenti di template che son tròppo gràndi pe êse espansi. Sti argomenti no saiàn fæti védde.",
'post-expand-template-argument-category' => 'Pàgine con di template che ghe mancàn di argoménti',
'currentrev' => 'Verscion attuâle',
'currentrev-asof' => 'Ùrtima revixón de-e $1',
'revisionasof' => 'Verscion do $1',
-'revision-info' => 'Verscion do $1, outô: $2',
+'revision-info' => 'Verscion do $1 de $2',
'previousrevision' => '← Verscion meno recente',
'nextrevision' => 'Revixon ciù nêuva →',
'currentrevisionlink' => 'Ûrtima revixon',
'last' => 'Ûrtima',
'page_first' => 'primma',
'page_last' => 'ûrtima',
-'histlegend' => "Confronto tra verscioîn: selessionâ e cascette corispondenti a-e verscioîn descideræ e schissâ Inviâ oppûre o pomello lì sotta.
+'histlegend' => "Confronto tra verscioîn: selession-a e cascette corispondenti a-e verscioîn dexidiæ e schissa Invio oppû o pomello da basso.
-Leggenda: (corr) = differense co-a verscion corrente, (prec) = differense co-a verscion preçedente, '''m''' = modiffica minô",
+Legenda: (corr) = differense co-a verscion corrente, (prec) = differense co-a verscion precedente, '''m''' = modiffica minô",
'history-fieldset-title' => 'Véddi a stöia',
'history-show-deleted' => 'Sôlo scancelæ',
'histfirst' => 'Prìmmo',
'lineno' => 'Linia $1:',
'compareselectedversions' => 'Confronta e verscioîn selessionæ',
'editundo' => 'Anùlla',
-'diff-multi' => '({{PLURAL:$1|Inna revixión intermedia|$1 revixioìn intermedie}} de {{PLURAL:$2|un utente|$2 utenti}} no son mostræ)',
+'diff-multi' => '({{PLURAL:$1|Inna revixón intermedia|$1 de revixoìn intermedie}} de {{PLURAL:$2|un utente|$2 utenti}} no son mostræ)',
# Search results
'searchresults' => 'Resultati da reçerca',
'nextn-title' => 'Pròscimo $1 {{PLURAL:$1|rezoltato|rezoltati}}',
'shown-title' => 'Fanni védde {{PLURAL:$1|in rizoltato|$1 rizoltati}} pe pàgina',
'viewprevnext' => 'Veddi ($1 {{int:pipe-separator}} $2) ($3).',
-'searchmenu-exists' => "'''In sciô scîto l'existe za 'na pàgina co-o nómme \"[[:\$1]]\"'''",
-'searchmenu-new' => 'Crea la pagina "[[:$1]]" su questo sito',
+'searchmenu-exists' => "'''Inte questa wiki gh'è za 'na pàgina co-o nómme \"[[:\$1]]\"'''",
+'searchmenu-new' => 'Crea a pagina "[[:$1]]" insce questo scito',
'searchhelp-url' => 'Help:Contegnûi',
'searchprofile-articles' => 'Pàgina di contegnûi',
'searchprofile-project' => 'Pàgine de agiùtto e relative a-o progetto',
'search-redirect' => '(redirect $1)',
'search-section' => '(seçión $1)',
'search-suggest' => 'Fòscia ti voéivi: $1',
-'searchrelated' => 'relativi',
+'searchrelated' => 'corelæ',
'searchall' => 'tùtti',
'showingresultsheader' => "{{PLURAL:$5|Rizoltato '''$1''' di '''$3'''|Rizoltati '''$1 - $2''' de '''$3'''}} pe '''$4'''",
-'search-nonefound' => 'Mi no ò trovòu nìnte',
+'search-nonefound' => "Mi n'ho atrovòu ninte",
'powersearch' => 'Çerca',
# Preferences page
'preferences' => 'Preferençe',
-'mypreferences' => 'Mæ preferense',
+'mypreferences' => 'Preferençe',
'changepassword' => 'Cangiâ a pòula segretta',
'skin-preview' => 'Anteprimma',
'prefs-datetime' => 'Data e oùa',
'badsiglength' => "O nommeaggio o l'é tròppo lóngo; o dêve avéi meno de $1 caratteri.",
'email' => 'Posta elettronega',
'prefs-help-realname' => '* Nomme vëo (opsionâ): se o se scellie de scrivilo, o sajà dêuviòu pe ascrivighe a paternitæ di contegnûi inviæ.',
-'prefs-help-email' => "L'emal a no l'é obligatöia, ma a teu peu permette de reçéive a paròlla segrétta se ti t'ascòrdi.",
-'prefs-help-email-others' => 'Ti ti peu ascì scélie de lasciâ che i âtri te contâtino da-e teu pàgine utente ò de discoscioìn sénsa revelâ a teu indentitæ.',
+'prefs-help-email' => "L'email a no l'é obligatöia, ma a te permette de reçéive a paròlla segrétta se ti l'ascòrdi.",
+'prefs-help-email-others' => 'Ti ti peu scélie ascì de lasciâ che i âtri te contattan via e-mail co-in ingancio da-a to pàgina utente ò de discoscion sénsa rivelâ a to e-mail quande i atri utenti te contattan.',
# Groups
'group-user' => 'Ûtenti',
# Recent changes
'nchanges' => '$1 {{PLURAL:$1|modiffica|modiffiche}}',
'recentchanges' => 'Ùrtimi cangiamenti',
-'recentchanges-legend' => 'Inpostaçioìn de lìùrtimi cangiaménti',
+'recentchanges-legend' => 'Opçioin di ùrtimi cangiaménti',
'recentchanges-summary' => "Questa pàgina a g'ha di càngi ciù reçenti a-i contegnûi do scîto.",
'recentchanges-feed-description' => "Questo feed o g'ha di cangiaménti ciù reçenti a-i contegnûi do scîto.",
'recentchanges-label-newpage' => "Sto cangiaménto o l'à creòu 'na pàgina nêuva",
'recentchanges-label-minor' => 'Cangiamento minô (m)',
'recentchanges-label-bot' => "Sto cangiaménto o l'à fæto in bot",
'recentchanges-label-unpatrolled' => "Sto cangiaménto o no l'é stæto ancón verificòu",
-'rcnote' => "De segoito {{PLURAL:$1|l'é elencâ o cangiménto ciù reçente|son elencæ e '''$1''' cangiménti ciù reçenti}} a-o scîto {{PLURAL:$2|inte ùrtime 24 ôe|inti ùrtimi '''$2''' giórni}}; i dæti son agiornæ a-e $5 do $4.",
-'rcnotefrom' => "Chì sotta gh'è i cangiamenti fæti comensando da '''$2''' (scinn-a '''$1''').",
-'rclistfrom' => 'Fanni vedde e modiffiche apportæ partendo da $1',
+'rcnote' => "Chì sotta {{PLURAL:$1|l'é elencou o cangiaménto ciù reçente|son elencæ i '''$1''' cangiaménti ciù reçenti}} a-o scîto {{PLURAL:$2|inte ùrtime 24 ôe|inti ùrtimi '''$2''' giorni}}; i dæti son agiornæ a-e $5 do $4.",
+'rcnotefrom' => "Chì sotta gh'è i cangiamenti fæti comensando da '''$2''' (scin a '''$1''').",
+'rclistfrom' => 'Fanni vedde e modiffiche apportæ partindo da $1',
'rcshowhideminor' => '$1 cangiaménti minoi',
'rcshowhidebots' => '$1 bot',
'rcshowhideliu' => '$1 utenti registræ',
'rcshowhideanons' => '$1 utenti anonnimi',
'rcshowhidepatr' => '$1 i cangiaménti controllæ',
'rcshowhidemine' => '$1 i mæ cangiamenti',
-'rclinks' => 'Fâ vedde i $1 cangiménti ciù reçenti fæte inti ùrtimi $2 giorni<br />$3',
+'rclinks' => 'Fanni vedde i $1 cangiaménti ciù reçenti fæti inti ùrtimi $2 giorni<br />$3',
'diff' => 'diff',
'hist' => 'stö',
'hide' => 'Ascondi',
'newpageletter' => 'N',
'boteditletter' => 'b',
'rc_categories_any' => 'Quarsevêuggia',
-'rc-enhanced-expand' => 'Fanni védde detàli (con JavaScript)',
-'rc-enhanced-hide' => 'Ascondi detàli',
+'rc-enhanced-expand' => 'Fanni védde detaggi (serve JavaScript)',
+'rc-enhanced-hide' => 'Ascondi detaggi',
# Recent changes linked
'recentchangeslinked' => 'Cangiamenti correlæ',
'recentchangeslinked-toolbox' => 'Cangiaménti corelæ',
'recentchangeslinked-title' => 'Modiffiche correlæ a "$1"',
'recentchangeslinked-noresult' => 'Nisciûn cangiamento a-e paggine collegæ into periodo speçificòu.',
-'recentchangeslinked-summary' => "Sta pàgina a fa védde i cangiaménti ciù reçenti a-e pàgine colegæ a quésta.
+'recentchangeslinked-summary' => "Sta pàgina a fa védde i cangiaménti ciù reçenti a-e pàgine colegæ a questa.
E pàgine che t'æ in oservaçion inti [[Special:Watchlist|oservæ speciâli]] son in '''grascetto'''.",
'recentchangeslinked-page' => 'Nómme da pàgina:',
'recentchangeslinked-to' => 'Fanni védde sôlo i cangiaménti a-e pàgine colegæ a-a pàgina specificâ',
# Upload
-'upload' => "Caregâ 'n archivio",
+'upload' => "Carrega 'n file",
'uploadbtn' => "Carega 'n archivvio",
-'uploadlogpage' => 'Log di archivi caregæ',
+'uploadlogpage' => 'Log di file caregæ',
'filename' => 'Nomme do papê',
-'filedesc' => 'Detàli',
+'filedesc' => 'Detaggi',
'filesource' => 'Reixe:',
'uploadedfiles' => 'Papê caregæ',
'badfilename' => 'O nomme do papê o l\'è stæto cangioö in "$1".',
[[$1|thumb]]",
'fileexists-forbidden' => 'Un papê co sto nomme o existe de zà, pe piaxei vanni in derrê e carega sto papê co un ätro nomme. [[File:$1|thumb|center|$1]]',
'savefile' => 'Sarva o papê',
-'uploadedimage' => 'O s\'ha caregòu "[[$1]]"',
+'uploadedimage' => 'O l\'ha caregòu "[[$1]]"',
'uploaddisabledtext' => 'In {{SITENAME}} non se peu caregâ de papê.',
'uploadvirus' => 'O papê gha un virus!! Dettaggi: $1',
'sourcefilename' => "Nomme do papê d'origine:",
'listfiles_date' => 'Dæta',
# File description page
-'file-anchor-link' => 'Archivio',
+'file-anchor-link' => 'file',
'filehist' => "Stöia de l'archivio",
-'filehist-help' => "Sciacca inscie 'n grûppo data/ôa pe vedde l'archivio comme o se presentâva into momento indicòu.",
-'filehist-revert' => 'Repìggia',
+'filehist-help' => "Sciacca insce data/ôa pe amiâ o file comm'o s'apresentâva into momento indicòu.",
+'filehist-revert' => 'Ripristina',
'filehist-current' => 'Corrente',
'filehist-datetime' => 'Dæta/Ôa',
-'filehist-thumb' => 'Miniatora',
-'filehist-thumbtext' => 'Miniatora de versción de $1',
+'filehist-thumb' => 'Miniatua',
+'filehist-thumbtext' => 'Miniatua da versción de $1',
'filehist-user' => 'Utente',
-'filehist-dimensions' => 'Dimensioîn',
+'filehist-dimensions' => 'Dimenscioin',
'filehist-filesize' => "Dimension de l'archivvio",
'filehist-comment' => 'Coménti',
'imagelinks' => "Ûzo de l'archivio",
'linkstoimage' => '{{PLURAL:$1|A segoente pàgina a contegne|E segoenti $1 pàgine contegnan}} colegaménti a-o file:',
-'nolinkstoimage' => "No gh'è nisciûnn-a pàgina collegâa con 'st'archivvio.",
+'nolinkstoimage' => "No gh'è nisciûnn-a pàgina collegâ con 'sto file.",
'sharedupload' => "'St'archivvio o l'è condiviso; sajeiva a dî c'o pêu ese dêuviòu da ciû progetti wiki.",
-'sharedupload-desc-here' => 'Sto file o vegne da $1 e o peu êse adêuviòu inti âtri progetti.
-Chi de segoito ti peu védde a descriçión inta [$2 pàgina de descriçión do file].',
+'sharedupload-desc-here' => 'Sto file o vegne da $1 e o peu êse dêuviòu inti âtri progetti.
+Chì apreuvo ti peu védde a descriçión inta [$2 pàgina de descriçión do file].',
'uploadnewversion-linktext' => "Carega 'na nêuva verscion de 'st'archivvio chì",
# File deletion
'statistics' => 'Statistiche',
'disambiguations' => 'Paggine de desambiguassion',
-'disambiguationspage' => 'Template:Dizanbigoa',
+'disambiguationspage' => 'Template:Omonimia',
'doubleredirects' => 'Rindirissamenti doggi',
'mostcategories' => 'Voxi con ciû categorîe',
'mostimages' => 'Immaggini con ciû collegamenti',
'mostrevisions' => 'Voxi con ciû revixoîn',
-'prefixindex' => 'Indiçe de voxi pe létie inçiâ',
+'prefixindex' => 'Indiçe arfabetico de voxe',
'shortpages' => 'Paggine ciû cûrte',
'longpages' => 'Paggine ciû longhe',
'deadendpages' => 'Paggine sensa sciortîa',
'pager-older-n' => '{{PLURAL:$1|1 ciù vêgio|$1 ciù vêgi}}',
# Book sources
-'booksources' => 'Fonti',
+'booksources' => 'Fonte libraie',
'booksources-search-legend' => 'Çerca e fonti',
'booksources-isbn' => 'Codice ISBN:',
'booksources-go' => 'Vànni',
# Special:ListGroupRights
'listgrouprights-members' => '(Elenco di membri)',
-# E-mail user
+# Email user
'emailuser' => "Invia 'na email a st'utente chi",
'emailpage' => "Mandighe 'na léttia elettronega",
'defemailsubject' => '{{SITENAME}} posta elettronega',
'emailsenttext' => "A teua lettìa elettronega a l'è stæta spèdïa.",
# Watchlist
-'watchlist' => 'A mæ lista in osservassion',
-'mywatchlist' => 'Lista in oservaçion',
+'watchlist' => 'Sotta osservassion',
+'mywatchlist' => 'Sotta oservaçion',
'watchlistfor2' => 'Pe $1 $2',
'watchnologin' => "Non ti t'æ entroö",
'watchnologintext' => 'Devvi [[Special:UserLogin|entrâ]] pe cangiâ a toa lista in osservaçion.',
'addedwatchtext' => "A paggina \"[[:\$1]]\" a l'è stæta azzonta a-a pròpia [[Special:Watchlist|lista in osservaçion]]. De chì in avanti, i cangiamenti fæti a-a paggina e a-a sêu discûxon sajàn missi in lista lì; o tittolo da paggina o sajà scrîo in '''grascietto''' inta paggina di [[Special:RecentChanges|ûrtimi cangiamenti]] coscì ti o veddi megio. Se ti vêu eliminâla da-a lista in osservaçion ciû târdi, sciacca \"no seguî\" inscia barra de d'âto.",
'removedwatchtext' => 'A paggina "[[:$1]]" a l\'è stæta scassâa da-a têu lista in osservaçion.',
-'watch' => 'Inta lista in oservaçion',
+'watch' => 'Metti sotta oservaçion',
'watchthispage' => "Vigilâ 'sta paggina",
-'unwatch' => 'No seguî',
-'watchlist-details' => "A lista d'oservaçión speçiâle a contegne {{PLURAL:$1|inna pàgina (co-a seu pàgina de discusción)|$1 pàgine (co-e lòro pàgine de discusción)}}.",
+'unwatch' => "Leva da sott'oservaçion",
+'watchlist-details' => "A lista d'oservaçión speçiâle a contegne {{PLURAL:$1|ina pàgina (co-a seu pàgina de discusción)|$1 de pàgine (co-e so pàgine de discusción)}}.",
'watchlistcontains' => "A lista in osservaçion g'ha $1 {{PLURAL:$1|pagine|pagina}}.",
'wlshowlast' => 'Famme vedde e ûrtime $1 ôe $2 giorni $3',
'watchlist-options' => 'Inpostaçioìn di oservæ speciâli',
'delete-legend' => 'Scassa',
'historywarning' => "Attension: A paggina c'a se sta pe scassâ a g'ha 'na cronologîa:",
'confirmdeletetext' => "Ti stæ pe scassâ pe sempre da-o database 'na paggina ò 'n'immaggine, assemme a tûtta a sêu cronologîa. Pe cortexia, conferma che davvei ti vêu andâ avanti con quella cancellassion, che ti capisci perfettamente e conseguense de 'st'assion e che a s'adatta a-e linnie guidda stabilîe in [[{{MediaWiki:Policy-url}}]].",
-'actioncomplete' => 'Açion finïa',
+'actioncomplete' => 'Açion completâ',
'actionfailed' => 'Açión falîa',
'deletedtext' => 'A paggina "$1" a l\'è stæta scassâa. Consûltâ o $2 pe \'na lista de-e paggine scassæ de reçente.',
-'dellogpage' => 'Registro de-e cose scassæ',
+'dellogpage' => 'Registro de cose scassæ',
'deletecomment' => 'Raxon:',
'deleteotherreason' => 'Ûn âtro motivo',
'deletereasonotherlist' => "Ûnn'âtra raxon",
'revertpage' => 'E modificaçioin de [[Special:Contributions/$2|$2]] ([[User talk:$2|Ciæti]]) son stæte eliminæ; riportæ a verscion de primma de [[User:$1|$1]]',
# Protect
-'protectlogpage' => 'Protessioîn',
-'protectedarticle' => 'l\'à protetto "[[$1]]"',
+'protectlogpage' => 'Protessioin',
+'protectedarticle' => 'o l\'à protetto "[[$1]]"',
'prot_1movedto2' => '[[$1]] mesciòu a [[$2]]',
'protect-legend' => 'Confermâ protession',
'protectcomment' => 'Raxon:',
'blanknamespace' => '(Prinçipâ)',
# Contributions
-'contributions' => "Contribussioìn de l'utente",
+'contributions' => 'Contribuçioin {{GENDER:$1|utente}}',
'contributions-title' => 'Contribuçioìn de $1',
-'mycontris' => 'Mæ contribuçioin',
+'mycontris' => 'Contribuçioin',
'contribsub2' => 'Pe $1 ($2)',
'uctop' => '(ûrtima pe-a paggina)',
-'month' => 'Partendo da-o méize (e precedénti):',
-'year' => "Partendo da l'anno (e preçedenti):",
+'month' => 'Partindo da-o meize (e precedénti):',
+'year' => "Partindo da l'anno (e precedenti):",
'sp-contributions-newbies' => 'Fanni védde sôlo e contribuçioìn di nêuvi utenti',
'sp-contributions-newbies-sub' => 'Pe i nêuvi ûtenti',
'sp-contributions-talk' => 'Ciæti',
'sp-contributions-search' => 'Riçerca contribuçioìn',
'sp-contributions-username' => 'Indirìsso IP ò nómme utente:',
-'sp-contributions-toponly' => "Fanni védde sôlo i ùrtimi cangiaménti che son inte l'ùrtime revixioìn da pàgina",
+'sp-contributions-toponly' => "Fanni védde sôlo i cangiaménti ch'en i ùrtime revixoìn da pàgina",
'sp-contributions-submit' => 'Çerca',
# What links here
-'whatlinkshere' => 'Cöse o se colega chì',
+'whatlinkshere' => 'Cöse se colega chì',
'whatlinkshere-title' => "Pàgine c'apontàn a $1",
'whatlinkshere-page' => 'Pàgina:',
'linkshere' => "E pàgine segoenti apontan a '''[[:$1]]''':",
'nolinkshere' => "Nisciùnn-a pàgina a se collega con '''[[:$1]]'''.",
-'isredirect' => 'redirect',
+'isredirect' => 'Paggina de rindirissamento',
'istemplate' => 'Incluxon',
'isimage' => 'Colegamento a file',
-'whatlinkshere-prev' => '{{PLURAL:$1|preçedente|preçedenti $1}}',
+'whatlinkshere-prev' => '{{PLURAL:$1|precedente|precedenti $1}}',
'whatlinkshere-next' => '{{PLURAL:$1|sûccescivo|sûccescivi $1}}',
'whatlinkshere-links' => '← colegaménti',
-'whatlinkshere-hideredirs' => '$1 redirect',
+'whatlinkshere-hideredirs' => '$1 i rendirissamenti',
'whatlinkshere-hidetrans' => '$1 Incluxon',
'whatlinkshere-hidelinks' => '$1 colegaménti',
-'whatlinkshere-hideimages' => '$1 colegaménti da inmàgini',
+'whatlinkshere-hideimages' => '$1 colegaménti di file',
'whatlinkshere-filters' => 'Filtri',
# Block/unblock
'anononlyblock' => 'Non ti tè registroö. Non ti peu fanni de i cangiamenti! (Registräse o non vegne ninte!)',
'emailblock' => 'posta elettronega affermaä',
'ipblocklist-empty' => "A lista de e affermaçioin a l'è veua.",
-'blocklink' => 'Afermaçion',
+'blocklink' => 'Blocca',
'unblocklink' => 'sblòcca',
'change-blocklink' => 'càngia blòcco',
'contribslink' => 'Contribuçioìn',
'autoblocker' => 'Affermoö automaticamente perchè o teu indirisso IP o l\'è stæto usöo da "[[User:$1|$1]]" neuvamente. A razon dæta pe affermâ $1 a l\'è stæta:
"$2"',
'blocklogpage' => 'Blòcchi',
-'blocklogentry' => "l'a blocòu [[$1]] pe in periodo de $2 $3",
+'blocklogentry' => 'blocòu [[$1]] pe in periodo de $2 $3',
'blocklogtext' => "Sta chie a l'è unn-a lista de affermaçioin fæte e levæ.
I indirissi IP affermæ automaticamente non son consideræ.
Veddi a [[Special:BlockList|Lista de i indirissi IP affermæ]] pe e informaçioin neuve.",
'talkexists' => "'''A paggina a l'è stæta stramûâa correttamente, ma o no l'è stæto poscibbile stramûâ a paggina de discûxon perché ghe n'è zà 'n'âtra co-o nêuvo tittolo. O se deive inserî manualmente i contegnûi de tûtte e doe.'''",
'movedto' => 'Stramûâa a',
'movetalk' => 'Stramûâ anche a paggina de discûxon',
-'movelogpage' => 'Lista di remesci',
+'movelogpage' => 'Lista di stramûi',
'movereason' => 'Raxon',
'revertmove' => 'Ristorâ',
'delete_and_move' => 'Scassa e mescia',
# Namespace 8 related
'allmessages' => 'Messaggi do scistemma',
'allmessagesname' => 'Nomme',
-'allmessagesdefault' => 'Testo di default',
+'allmessagesdefault' => 'Testo predefinio',
'allmessagescurrent' => 'Testo corrente',
'allmessagestext' => "Sta chie a l'è unn-a lista de messaggi do scistema in ta MediaWiki.",
'allmessagesnotsupportedDB' => "'''{{ns:special}}:Allmessages''' o non ti te peu vedde, perchè '''\$wgUseDatabaseMessages''' o non l'è attivo.",
'tooltip-pt-preferences' => 'E mæ preferense',
'tooltip-pt-watchlist' => 'A lista de-e pagine che ti æ sotta osservaçion',
'tooltip-pt-mycontris' => 'E mæ contribuçioìn',
-'tooltip-pt-login' => "Consegiêmo a registraçión, scibén a no l'è d'òbligo.",
+'tooltip-pt-login' => "Consegemmo a registraçión, ma a no l'è obrigatoia.",
'tooltip-pt-logout' => 'Sciortîa (logout)',
-'tooltip-ca-talk' => 'Fanni védde e discuscioìn in sca pagina.',
-'tooltip-ca-edit' => "O se pêu modificâ sta pagina. Pe piaxei scia dêuvie o pommello d'anteprìmma primma de sarvâla.",
-'tooltip-ca-addsection' => "Iniçia 'na nêuva seçión",
+'tooltip-ca-talk' => 'Discuscion riguardo a sta paggina.',
+'tooltip-ca-edit' => "Ti pêu modificâ sta paggina. Pe piaxei dêuvia o pomello d'anteprimma primma de sarvâla.",
+'tooltip-ca-addsection' => "Inça 'na seçión nêuva",
'tooltip-ca-viewsource' => "'Sta pagina a l'è protetta, ma ti peu védde o sêu còdice sorgente.",
'tooltip-ca-history' => 'Verscioìn précedenti da pàgina',
-'tooltip-ca-protect' => "Proteze 'sta paggina",
+'tooltip-ca-protect' => "Protezi 'sta paggina",
'tooltip-ca-delete' => 'Scancella sta pàgina',
-'tooltip-ca-move' => "Sposta 'sta paggina (cangia tittolo)",
+'tooltip-ca-move' => "Mescia 'sta paggina (cangia tittolo)",
'tooltip-ca-watch' => "Azónzi 'sta pagina a-a teu lista d'oservaçion",
-'tooltip-ca-unwatch' => "Levâ sta pàgina d'inta têu lista d'oservaçion speçiâ",
+'tooltip-ca-unwatch' => "Leva sta pàgina da sott'oservaçion.",
'tooltip-search' => 'Çerca {{SITENAME}}',
-'tooltip-search-go' => "Vànni inte 'na pàgina co-o sto tìtolo, se a l'existe",
+'tooltip-search-go' => "Vànni inte 'na pàgina con sto tìtolo, s'a l'existe",
'tooltip-search-fulltext' => 'Çerca sto testo in scie pàgine',
'tooltip-p-logo' => 'Vìxita a pàgina prinçipâ',
'tooltip-n-mainpage' => 'Vìxita a pagina prinçipâ',
'tooltip-t-whatlinkshere' => 'Lista de tùtte e pagine che son colegæ a sta chì.',
'tooltip-t-recentchangeslinked' => 'Ùrtimi càngi de pàgine colegæ a quésta',
'tooltip-feed-atom' => 'Feed Atom pe sta pàgina',
-'tooltip-t-contributions' => "Lista de-e contribûssioîn de quest'utente",
-'tooltip-t-emailuser' => "Inviâ 'n messaggio e-mail a quest'utente",
+'tooltip-t-contributions' => "Lista de contribûssioîn de quest'utente",
+'tooltip-t-emailuser' => "Invia 'n messaggio e-mail a quest'utente",
'tooltip-t-upload' => 'Carega inmàgini ò archivi moltimedia',
'tooltip-t-specialpages' => 'Lista de tùtte e pagine speçiâli',
'tooltip-t-print' => 'Versción da stànpa pe sta pàgina',
'tooltip-ca-nstab-template' => 'Veddi o template',
'tooltip-ca-nstab-help' => "Veddi a paggina d'agiûtto",
'tooltip-ca-nstab-category' => 'Veddi a paggina da categorîa',
-'tooltip-minoredit' => 'Segnalâ comme cangiaménto minô',
+'tooltip-minoredit' => 'Marchilo comme cangiaménto minô',
'tooltip-save' => 'Sarva i cangiaménti',
-'tooltip-preview' => 'Anteprimma de-e modiffiche (conseggiâa, primma de sarvâ!)',
-'tooltip-diff' => "Ammîa e modiffiche che ti ti gh'æ fæto a-o testo.",
+'tooltip-preview' => 'Anteprimma de modiffiche (fannila, primma de sarvâ!)',
+'tooltip-diff' => "Ammîa e modiffiche che t'æ fæto a-o testo.",
'tooltip-compareselectedversions' => 'Amia e diferense tra e doê verscioìn seleçionæ de sta paggina chì.',
'tooltip-watch' => "Azónzi sta pàgina a-a têu lista d'osservæ speçiâli",
'tooltip-rollback' => "\"Rollback\" scancella i cangiaménti de sta pàgina de l'ùrtimo ch'o l'à fæto 'n càngio co-in click do ràtto",
-'tooltip-undo' => '"Anùlla" o pérmette de anulâ sto cangiaménto e arve il modolo de cangiaménto into mòddo anteprìmma. Ti peu ascì métte a raxón inte l\'ògétto do cangiaménto.',
-'tooltip-summary' => "Scrîvi 'na scintezi",
+'tooltip-undo' => '"Anùlla" o permette de anulâ sto cangiaménto e o l\'arve o modolo de cangiaménto into modalitæ anteprìmma. Ti peu ascì métte a raxón inte l\'ogetto do cangiaménto.',
+'tooltip-summary' => "Scrîvi 'na scintexi",
# Stylesheets
'common.css' => '/** o codiçe css scrïo chie o vegne azzounto in tutte e pagine */',
'thumbsize' => 'Dimescion da a imàginetta:',
'file-info-size' => '$1 × $2 pixel, dimenscioîn: $3, tippo MIME: $4',
'file-nohires' => 'No ghe son verscioìn a rezoluçion ciù âta.',
-'svg-long-desc' => "archivio in formato SVG, dimenscioìn nominâli $1 × $2 pixel, dimenscioìn de l'archivio: $3",
-'show-big-image' => "Verscion d'ærta resolûxon",
+'svg-long-desc' => 'file in formato SVG, dimenscioìn nominâli $1 × $2 pixel, dimenscioin do file: $3',
+'show-big-image' => 'Verscion a ata resolûçion',
# Special:NewFiles
'newimages' => 'Gallerîa de nêuvi archivvi',
# Bad image list
'bad_image_list' => "O formato o l'è coscì:
Van conscideræ sôlo e righe che comensan co-o càratere *.
-O primmo inganso in sce ògni riga o deiv'ese 'n inganso ch'o no fonçionn-a
-L'ingansi sucescivi, in scia mæxima riga, van conscideræ comme eceçioìn (pagine donde o file o pêu ese reciamòu normalmente).",
+O primmo ingancio in sce ògni riga o dev'ese 'n ingancio ch'o no fonçionn-a
+I inganci sucescivi, in scia mæxima riga, van conscideræ comme eceçioìn (pagine donde o file o pêu ese reciamòu normalmente).",
# Metadata
'metadata' => 'Metadati',
-'metadata-help' => "St'archivio o contegne informaçioìn in ciù, fòscia missa da-a fotocamera ò dò-u scanner adêuviòu pe creâla ò digitalissâla. Se l'archivio o l'è stæto cangiòu, çerti detàli porieivan no corisponde a-i cangi aportæ.",
+'metadata-help' => "Sto file o contegne de informaçioìn in ciù, fòscia misse da-a fotocamera ò dò-u scansô dêuviòu pe creâla ò digitalizâla. Se o file o l'è stæto cangiòu, çerti detàggi porieivan no corisponde a-i cangi aportæ.",
'metadata-expand' => 'Fâ vedde dettaggi',
'metadata-collapse' => 'Asconde dettaggi',
'metadata-fields' => "I cànpi relativi a-i metadati EXIF elencæ inte 'sto messaggio saiàn in sciâ pàgina de l'inmàgine quande a tabella di metadati a saiâ inta forma cùrta. Cómme predefinîo, i âtri cànpi saiàn ascozi.
'exif-filesource' => 'Reixe do papê',
# External editor support
-'edit-externally' => "Càngia st'archivio con 'na applicaçión esterna",
+'edit-externally' => 'Càngia sto file co-in programma esterno',
'edit-externally-help' => 'Pe avéi ciù informaçioìn amia e [//www.mediawiki.org/wiki/Manual:External_editors istruçioìn] (in ingléize)',
# 'all' in various places, this might be different for inflected languages
'watchlistall2' => 'Tùtti',
'namespacesall' => 'Tùtti',
-'monthsall' => 'tùtti',
+'monthsall' => 'tutti',
# Multipage image navigation
'imgmultipageprev' => '← Pagina de primma',
'watchlisttools-raw' => 'Modiffica a lista in formato testo',
# Core parser functions
-'duplicate-defaultsort' => 'Atençión: a ciâve de ordinaménto predefinîa "$2" va in çimma a quella de prìmma "$1".',
+'duplicate-defaultsort' => 'Atençión: a ciâve de ordinaménto predefinîa "$2" a sostitoisce quella de primma "$1".',
# Special:Version
'version' => 'Verscion',
'specialpages' => 'Pagine speçiâli',
# External image whitelist
-'external_image_whitelist' => " #Lasciâ sta rîga cómme a l'é<pre>
-#Inserî i pessi de esprescioìn regolari (sôlo a pàrte che va fra //) di segoito
+'external_image_whitelist' => " #Lascia sta riga comm'a l'é<pre>
+#Inseisci i pessi de esprescioìn regolari (sôlo a pàrte ch'a va fra e //) chì sotta
#Ste chi saiàn misse a confronto co-i indirìssi URL de inmàgini esterne (hotlinked)
-#E corispondense saiàn mostrate cómme inmàgini, âtriménti saiâ mostròu sôlo in colegaménto
-#E righe che iniçian con # son consideræ coménti
-#A diferensa tra maioscole e minoscole a no l'è significatîva
+#E corispondense saiàn mostræ cómme inmàgini, donca saiâ mostròu sôlo in colegaménto
+#E righe che començan con # son conscideræ coménti
+#A diferensa tra maioscole e minoscole a no l'è scignificatîva
-#Inserî sovia sta rîga tùtti i frammenti de regex. Lasciâ sta rîga cómme a l'é</pre>",
+#Inseisci sovia sta rîga tùtti i frammenti de regex. Lascia sta rîga ezattamente comm'a l'é</pre>",
# Special:Tags
'tag-filter' => 'Filtra pe [[Special:Tags|etichetta]]:',
'tog-shownumberswatching' => 'Rodyti stebinčių naudotojų skaičių',
'tog-oldsig' => 'Esamo parašo peržiūra:',
'tog-fancysig' => 'Laikyti parašą vikitekstu (be automatinių nuorodų)',
-'tog-externaleditor' => 'Pagal nutylėjimą naudoti išorinį redaktorių (skirta tik ekspertams, nes reikia atitinkamai paruošti jūsų kompiuterį. [//www.mediawiki.org/wiki/Manual:External_editors More information.])',
-'tog-externaldiff' => 'Pagal nutylėjimą naudoti išorinę skirtumų rodymo programą (tik ekspertams, nes reikia atitinkamai paruošti jūsų kompiuterį. [//www.mediawiki.org/wiki/Manual:External_editors More information.])',
'tog-showjumplinks' => 'Įjungti „peršokti į“ pasiekiamumo nuorodas',
'tog-uselivepreview' => 'Naudoti tiesioginę peržiūrą (JavaScript) (Eksperimentinis)',
'tog-forceeditsummary' => 'Klausti, kai palieku tuščią keitimo komentarą',
'tog-diffonly' => 'Nerodyti puslapio turinio po skirtumais',
'tog-showhiddencats' => 'Rodyti paslėptas kategorijas',
'tog-norollbackdiff' => 'Nepaisyti skirtumo atlikus atmetimą',
+'tog-useeditwarning' => 'Perspėti mane, kai palieku redagavimo puslapį, o jame yra neišsaugotų pakeitimų',
'underline-always' => 'Visada',
'underline-never' => 'Niekada',
'defaultmessagetext' => 'Numatytasis pranešimo tekstas',
'invalid-content-data' => 'Neleistinas turinys.',
'content-not-allowed-here' => 'Turinys "$1" puslapyje [[$2]] nėra leistinas.',
+'editwarning-warning' => 'Palikdamas šį puslapį jūs prarasite visus padarytus pakeitimus.',
# Content models
'content-model-wikitext' => 'wikitekstas',
'search-external' => 'Išorinė paieška',
'searchdisabled' => 'Projekto {{SITENAME}} paieška yra uždrausta. Galite pamėginti ieškoti Google paieškos sistemoje. Paieškos sistemoje projekto {{SITENAME}} duomenys gali būti pasenę.',
-# Quickbar
-'qbsettings' => 'Greitasis pasirinkimas',
-'qbsettings-none' => 'Nerodyti',
-'qbsettings-fixedleft' => 'Fiksuoti kairėje',
-'qbsettings-fixedright' => 'Fiksuoti dešinėje',
-'qbsettings-floatingleft' => 'Plaukiojantis kairėje',
-'qbsettings-floatingright' => 'Plaukiojantis dešinėje',
-'qbsettings-directionality' => 'Pataisyta, priklausomai nuo jūsų rašybos ir kalbos krypties',
-
# Preferences page
'preferences' => 'Nustatymai',
'mypreferences' => 'Mano nustatymai',
'http-read-error' => 'HTTP skaitymo klaida.',
'http-timed-out' => 'HTTP užklausos laikas baigėsi.',
'http-curl-error' => 'Klaida siunčiantis URL: $1',
-'http-host-unreachable' => 'Nepavyko pasiekti URL.',
'http-bad-status' => 'Iškilo problemų vykdant HTTP užklausą: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'pageinfo-category-files' => 'Failų skaičius',
# Skin names
-'skinname-standard' => 'Klasikinė',
-'skinname-nostalgia' => 'Nostalgija',
'skinname-cologneblue' => 'Kelno mėlyna',
'skinname-monobook' => 'MonoBook',
-'skinname-myskin' => 'Mano išvaizda',
-'skinname-chick' => 'Chick',
-'skinname-simple' => 'Paprasta',
'skinname-modern' => 'Moderni',
'skinname-vector' => 'Vektorinė',
'tog-hidepatrolled' => 'Siamţhat venhim tihdanglam thar zingah tilang suh',
'tog-newpageshidepatrolled' => 'Phêk venhim phêk thar tlarah tilang suh',
'tog-extendwatchlist' => 'A thar chauh ni lo, tihdanglamna zawng zawng tilang tùrin ralvèn kapparh rawh',
-'tog-usenewrc' => 'Tihdanglam thar belhchhan hmang rawh (JavaScript a ngai)',
+'tog-usenewrc' => 'Tihdanglam tharte leh ralvente a phêk azir zëlin tlar rawh (JavaScript a ngai)',
'tog-numberheadings' => 'A thupuite amahin nambar inpêktir rawh',
-'tog-showtoolbar' => 'Siamţhatna hmanraw-liang tilang rawh (JavaScript a ngai)',
-'tog-editondblclick' => 'Hmehphìrin phêk siamţha rawh (JavaScript a ngai)',
-'tog-editsection' => 'Hlawm hrang siamţhatna [siamţhatna] zawmna hmangin awmtir rawh',
+'tog-showtoolbar' => 'Siamṭhatna hmanraw-liang tilang rawh (JavaScript a ngai)',
+'tog-editondblclick' => 'Hmehphìrin phêk siamṭha rawh (JavaScript a ngai)',
+'tog-editsection' => 'Hlawm hrang siamṭhatna [siamṭhatna] zawmna hmangin awmtir rawh',
'tog-editsectiononrightclick' => 'Hlawm thupui ding-hmeh hmangin hlawm siamţhat theihna awmtir rawh (JavaScript a ngai)',
'tog-showtoc' => 'A chhunga thu awm te tilang rawh (thupui 3 aia tam phêk tan)',
'tog-rememberpassword' => 'He ka rangpuifannaah hian min hre reng rawh (a rei berah ni $1 {{PLURAL:$1}})',
'tog-shownumberswatching' => 'Ralvèngtu zât tilang rawh',
'tog-oldsig' => 'Khàrna hming hman mék:',
'tog-fancysig' => 'Khàrna hming wikithu angah ngai rawh (zawmna insiam ţül lovin)',
-'tog-externaleditor' => 'Sawi ngai lovin pawnlam siamţhatu hmang rawh (mithiam tan chauh, i khawlthluakneiah setting bîk a ngai. [//www.mediawiki.org/wiki/Manual:External_editors More information.])',
-'tog-externaldiff' => 'Sawi ngai lovin pawnlam diff hmang rawh (mithiam tan chauh, i khawlthluakneiah setting bîk a ngai. [//www.mediawiki.org/wiki/Manual:External_editors More information.])',
'tog-showjumplinks' => '"Zuan kahlên rawh" tih zawmna awmtir rawh',
'tog-uselivepreview' => 'Endikna nung hmang rawh (JavaScript a ngai) (hei hi chhinna chauh a la ni)',
'tog-forceeditsummary' => 'Siamţhatna ruak ka dahluh palhin min hrilh rawh',
'tog-diffonly' => 'Dnglmn hnuaiah phêk chhúng tilang suh',
'tog-showhiddencats' => 'Pawl thuhrûkho tilang rawh',
'tog-norollbackdiff' => 'Lumlêt hnuah dnglmn kalkan rawh',
+'tog-useeditwarning' => 'Ka phêk siam danglamna ka dahţhat theihnghilh palh chuan min hrilh rawh',
'underline-always' => 'Ziah/ngei ngei',
'underline-never' => 'Ngai lo',
'friday' => 'Zirtawpni',
'saturday' => 'Inrinni',
'sun' => 'Ptn',
-'mon' => 'Thţ',
+'mon' => 'Thṭ',
'tue' => 'Thl',
'wed' => 'Nil',
'thu' => 'Nng',
'jan' => 'Pkt',
'feb' => 'Rtk',
'mar' => 'Vau',
-'apr' => 'Ţau',
-'may' => 'Ţmr',
+'apr' => 'Ṭau',
+'may' => 'Ṭmr',
'jun' => 'Nkr',
'jul' => 'Vhz',
'aug' => 'Tţn',
'tog-shownumberswatching' => 'ध्यान राखैबला प्रयोक्ताक संख्या',
'tog-oldsig' => 'अखुनका दस्खत',
'tog-fancysig' => 'हस्ताक्षरकें विकिटेक्सटक रूपमे देखू (स्वचालित श्रृंखला हीन)',
-'tog-externaleditor' => "↓पूर्वनिर्धारित रूपेँ बाह्य सम्पादक क' उपयोग करू (केवल विशेषज्ञसभक लेल, एकरा लेल संगणक पर विशेष सेटिंग चाही। [//www.mediawiki.org/wiki/Manual:External_editors आओर जानकारी।])",
-'tog-externaldiff' => 'पुरान संस्करणमे अंतर देखेबाक हेतु पूर्वनिविष्ट रूपमे बाहरक परिवर्तनक प्रयोग करू',
'tog-showjumplinks' => 'करू "तड़पान" भेटैबला लिंक सभ',
'tog-uselivepreview' => 'करू चल पूर्वावलोकन (जावास्क्रिप्ट चाही) (प्रायोगिक)',
'tog-forceeditsummary' => 'हमरा सचेत करू जखन हम खाली सम्पादम सारांशमे जाइ',
अहाँक गूगलक माध्यमसँ ऐ बीच ताकि सकै छी।
मोन राखू जे तकर विवरणी {{अन्तर्जाल}} सामिग्री समयातीत भऽ सकैए।',
-# Quickbar
-'qbsettings' => 'त्वरित दृश्य',
-'qbsettings-none' => 'कोनो नै',
-'qbsettings-fixedleft' => 'वाम कात सटल',
-'qbsettings-fixedright' => 'दहिन दिस सटल',
-'qbsettings-floatingleft' => 'वाम कात घुमैत',
-'qbsettings-floatingright' => 'दहिन कात घुमैत',
-'qbsettings-directionality' => 'कीलित, अहाँक भाषाक लिपि दिशा-निर्देशपर आधारित',
-
# Preferences page
'preferences' => 'विकल्प',
'mypreferences' => 'खासमखास',
'http-read-error' => 'परिसंविद पठन भ्रम',
'http-timed-out' => 'परिसंविद आग्रह कालातीत',
'http-curl-error' => 'भ्रम निकालैबला सार्वत्रिक विभव संकेत:$1',
-'http-host-unreachable' => 'सार्वत्रिक विभव संकेत नै पाबि सकल',
'http-bad-status' => 'परिसंविद आग्रह काल एकटा समस्या छल: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => 'कोनो प्रयोक्ता नै',
'listusers-blocked' => '(प्रतिबन्धित)',
-# Special:ActiveUsers
-'activeusers' => 'सक्रिय प्रयोक्ता सभक सूची',
-'activeusers-intro' => 'ई ओहेन प्रयोक्ता सभक सूची अछि जे पछिला $1 {{PLURAL:$1|दिन|दिन}} मे किछु सक्रियता देखेने छथि।',
-'activeusers-count' => '$1 {{PLURAL:$1|सम्पादन|सम्पादन सभ}} paChilaa {{PLURAL:$3|दिन|$3 दिन}}',
-'activeusers-from' => 'प्रयोक्ता प्रदर्शन प्रारम्भ भेल:',
-'activeusers-hidebots' => 'स्वचालन नुकाउ',
-'activeusers-hidesysops' => 'संचालक नुकाउ',
-'activeusers-noresult' => 'कोनो प्रयोक्ता नै भेटल',
-
# Special:ListGroupRights
'listgrouprights' => 'प्रयोक्ता संवर्ग अधिकार',
'listgrouprights-summary' => 'ई सभ प्रयोक्ता संवर्गक एकटा सूची अछि जे ऐ विकीपरपरिभाषित अछि ओकर संसर्गित प्रवेश अधिकारक संग।
'pageinfo-authors' => 'भिन्न लेखक संख्या',
# Skin names
-'skinname-standard' => 'प्राचीन',
-'skinname-nostalgia' => 'गामसँ प्रेम',
-'skinname-simple' => 'साधारण',
'skinname-modern' => 'आधुनिक',
'skinname-vector' => 'सदिश',
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-cn' => 'cn',
# All link text and link target definitions of links into project namespace that get used by other message strings, with the exception of user group pages (see grouppage) and the disambiguation template definition (see disambiguations).
'aboutsite' => 'Tantang {{SITENAME}}',
'aboutpage' => 'Project:Tantang',
-'copyright' => 'Kandungan tasadio dalam $1',
+'copyright' => 'Isi tasadio dalam $1',
'copyrightpage' => '{{ns:project}}:Hak cipta',
'currentevents' => 'Kajadian kini ko',
'currentevents-url' => 'Project:Kajadian kini ko',
'policy-url' => 'Project:Kabijakan',
'portal' => 'Portal komunitas',
'portal-url' => 'Project:Portal komunitas',
-'privacy' => 'Kecipehan privasi',
-'privacypage' => 'Project:Kecipehan privasi',
+'privacy' => 'Kacipehan privasi',
+'privacypage' => 'Project:Kacipehan privasi',
'badaccess' => 'Kasalahan hak akses',
'badaccess-group0' => 'Sanak indak diizinkan untuak malakuan tindakan ko.',
'badaccess-groups' => 'Tindakan nan Sanak nio babateh untuak pangguno dalam {{PLURAL:$2|kalompok}}: $1.',
'versionrequired' => 'Dibutuahan MediaWiki versi $1',
-'versionrequiredtext' => 'MediaWiki versi $1 dibutuahan untuak manggunoan laman ko. Lihek [[Special:Version|versi laman]]',
+'versionrequiredtext' => 'MediaWiki versi $1 dibutuahan untuak manggunoan laman ko. Caliak [[Special:Version|versi laman]]',
'ok' => 'OK',
'pagetitle' => '$1 - {{SITENAME}} bahaso Minang',
'editsectionhint' => 'Suntiang bagian: $1',
'toc' => 'Dafta isi',
'showtoc' => 'tampilkan',
-'hidetoc' => 'suruakkan',
+'hidetoc' => 'suruakan',
'collapsible-collapse' => 'Ketekan',
'collapsible-expand' => 'Kambangan',
'thisisdeleted' => 'Caliak atau kambalian $1?',
'userrights-groupsmember' => 'Anggota dari:',
'userrights-groupsmember-auto' => 'Anggota implisit dari:',
'userrights-groups-help' => 'Sanak dapek mangubah kalompok pangguno ko:
-* Kotak jo tando cek marupoan kalompok pangguno tasabuik
-* Kotak tanpa tando cek bararti pangguno ko bukan anggota kalompok tasabuik
-* Tando * manandoi Sanak indak dapek mambatalan kalompok tasabuik bilo Sanak alah manambahannyo, atau sabaliaknyo.',
+* Kotak jo tando centang marupoan kalompok pangguno tasabuik
+* Kotak indak ado tando centang bararti pangguno ko bukan anggota kalompok tasabuik
+* Tando * manandoan Sanak indak dapek mambatalan kalompok tasabuik bilo Sanak alah manambahannyo, ataupun sabaliaknyo.',
'userrights-reason' => 'Alasan:',
'userrights-no-interwiki' => 'Sanak indak bahak untuak mangubah hak pangguno di wiki lain.',
'userrights-nodatabase' => 'Basis data $1 indak ado atau bukan disiko.',
# What links here
'whatlinkshere' => 'Pautan baliak',
-'whatlinkshere-title' => 'Laman yang bakaik ka "$1"',
+'whatlinkshere-title' => 'Laman nan takaik ka "$1"',
'whatlinkshere-page' => 'Laman:',
'linkshere' => "Laman-laman ko bakaik ka '''[[:$1]]''':",
'nolinkshere' => "Indak ado laman nan punyo tautan ka '''[[:$1]]'''.",
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-hans' => 'hans',
'nov' => 'ное',
'dec' => 'дек',
+'monday-at' => 'понеделникот во $1',
+'tuesday-at' => 'вторникот во $1',
+'wednesday-at' => 'средата во $1',
+'thursday-at' => 'четвртокот во $1',
+'friday-at' => 'петокот во $1',
+'saturday-at' => 'саботата во $1',
+'sunday-at' => 'неделата во $1',
+'today-at' => '$1',
+'yesterday-at' => 'вчера во $1',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|Категорија|Категории}}',
'category_header' => 'Статии во категоријата „$1“',
'viewhelppage' => 'Погледајте ја страницата за помош',
'categorypage' => 'Погледајте ја страницата за категоријата',
'viewtalkpage' => 'Видете го разговорот',
-'otherlanguages' => 'Ð\94руги јазици',
+'otherlanguages' => 'Ð\9dа други јазици',
'redirectedfrom' => '(Пренасочено од $1)',
'redirectpagesub' => 'Страница за пренасочување',
'lastmodifiedat' => 'Оваа страница последен пат е изменета на $1 во $2 ч.',
'protectedpagetext' => 'Оваа страница е заклучена за уредувања и други дејства.',
'viewsourcetext' => 'Можете да го погледнете и копирате кодот на оваа страница:',
'viewyourtext' => "Можете да го погледнете и копирате кодот на '''вашите уредувања''' на оваа страница:",
-'protectedinterface' => 'Оваа страница содржи текст од посредникот на софтверот на ова вики и е превентивно заштитена поради можна злоупотреба.
+'protectedinterface' => 'Оваа страница содржи текст од посредникот на програмот на ова вики и е превентивно заштитена поради можна злоупотреба.
За да додавате или менувате преводи на сите викија, појдете на [//translatewiki.net/wiki/Main_Page?uselang=mk translatewiki.net] - проектот за локализација на МедијаВики.',
-'editinginterface' => "'''Ð\9fÑ\80едÑ\83пÑ\80едÑ\83ваÑ\9aе:''' УÑ\80едÑ\83ваÑ\82е Ñ\81Ñ\82Ñ\80аниÑ\86а коÑ\98а е дел од коÑ\80иÑ\81ниÑ\87киоÑ\82 поÑ\81Ñ\80едник на Ð\9cедиÑ\98аÐ\92ики Ñ\81оÑ\84Ñ\82веÑ\80оÑ\82.
+'editinginterface' => "'''Ð\9fÑ\80едÑ\83пÑ\80едÑ\83ваÑ\9aе:''' УÑ\80едÑ\83ваÑ\82е Ñ\81Ñ\82Ñ\80аниÑ\86а коÑ\98а е дел од коÑ\80иÑ\81ниÑ\87киоÑ\82 поÑ\81Ñ\80едник на пÑ\80огÑ\80амоÑ\82 Ð\9cедиÑ\98аÐ\92ики.
Промените на оваа страница ќе предизвикаат промени во корисничкиот посредник кај другите корисници на ова вики.
За да додадете или измените превод на сите викија, појдете на [//translatewiki.net/wiki/Main_Page?setlang=mk translatewiki.net] - проектот за локализација на МедијаВики.",
'sqlhidden' => '(Барањето до SQL е скриено)',
Привремена лозинка: $2',
'passwordreset-emailsent' => 'Испратено е писмо за измена на лозинката.',
'passwordreset-emailsent-capture' => 'Испратено е писмо за измена на лозинката (прикажано подолу).',
-'passwordreset-emailerror-capture' => 'Создадено е писмо за измена на лозинката (прикажано подолу), но не успеав да го испратам на корисникот: $1',
+'passwordreset-emailerror-capture' => 'Создадено е писмо за измена на лозинката (прикажано подолу), но не успеав да го испратам на {{GENDER:$2|корисникот}}: $1',
# Special:ChangeEmail
'changeemail' => 'Смени е-пошта',
'newuserlogpagetext' => 'Ова е дневник на регистрирани корисници.',
# User rights log
-'rightslog' => 'Ð\94невник на менÑ\83ваÑ\9aа на коÑ\80иÑ\81ниÑ\87ки права',
+'rightslog' => 'Ð\94невник на коÑ\80иÑ\81ниÑ\87киÑ\82е права',
'rightslogtext' => 'Ова е дневник на промени на кориснички права.',
# Associated actions - in the sentence "You do not have permission to X"
'uploaddisabledtext' => 'Подигањето на податотеки е оневозможено.',
'php-uploaddisabledtext' => 'Подигањето на податотеки е оневозможено во PHP.
Проверете го нагодувањето file_uploads.',
-'uploadscripted' => 'Податотеката содржи HTML или скриптен код што може да биде погрешно протолкуван од прелистувач.',
+'uploadscripted' => 'Податотеката содржи HTML-код или сценарио што може погрешно да се протолкува во прелистувачот.',
'uploadvirus' => 'Оваа податотека содржи вирус! Повеќе подробности: $1',
'uploadjava' => 'Податотеката е од типот ZIP што содржи податотека со наставка .class за Java.
Подигањето на податотеки за Java не е дозволено, бидејќи со нив можат да се заобиколуваат безбедносните ограничувања.',
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-hans' => 'hans',
# Image rotation
'rotate-comment' => 'Сликата е завртена за $1 {{PLURAL:$1|степен|степени}} вдесно',
+# Unknown messages
+'hours-ago' => 'пред $1 {{PLURAL:$1|час|часа}}',
+'minutes-ago' => 'пред $1 {{PLURAL:$1|минута|минути}}',
+'seconds-ago' => 'пред $1 {{PLURAL:$1|секунда|секунди}}',
);
'nov' => 'നവം.',
'dec' => 'ഡിസം.',
+'monday-at' => 'തിങ്കളാഴ്ച്ച $1-നു്',
+'tuesday-at' => 'ചൊവ്വാഴ്ച്ച $1-നു്',
+'wednesday-at' => 'ബുധനാഴ്ച്ച $1-നു്',
+'thursday-at' => 'വ്യാഴാഴ്ച്ച $1-നു്',
+'friday-at' => 'വെള്ളിയാഴ്ച്ച $1-നു്',
+'saturday-at' => 'ശനിയാഴ്ച്ച $1-നു്',
+'sunday-at' => 'ഞായറാഴ്ച്ച $1-നു്',
+'today-at' => 'ഇന്ന് $1-നു്',
+'yesterday-at' => 'ഇന്നലെ $1-നു്',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|വർഗ്ഗം|വർഗ്ഗങ്ങൾ}}',
'category_header' => '"$1" എന്ന വർഗ്ഗത്തിലെ താളുകൾ',
# Image rotation
'rotate-comment' => 'ചിത്രം പ്രദക്ഷിണദിശയിൽ {{PLURAL:$1|ഒരു ഡിഗ്രി|$1 ഡിഗ്രി}} തിരിച്ചു',
+# Unknown messages
+'hours-ago' => '{{PLURAL:$1|ഒരു മണിക്കൂർ|$1 മണിക്കൂർ}} മുൻപ്',
+'minutes-ago' => '{{PLURAL:$1|ഒരു മിനിറ്റ്|$1 മിനിറ്റ്}} മുൻപ്',
+'seconds-ago' => '{{PLURAL:$1|ഒരു സെക്കന്റ്|$1 സെക്കന്റ്}} മുൻപ്',
);
'tog-shownumberswatching' => 'Харж буй хэрэглэгчдийн тоог үзүүлэх',
'tog-oldsig' => 'Одоогийн гарын үсэг:',
'tog-fancysig' => 'Түүхий гарын үсэг (автомат холбоосгүй)',
-'tog-externaleditor' => 'Үндсэн горимд нэмэлт засварлах багаж хэрэглэх(экспертүүдэд зориулагдсан, таны компьютерт тусгай тохиргоо шаардлагатай)',
-'tog-externaldiff' => 'Үндсэн горим гадаад харьцуулагч программ ашиглах (экспертүүдэд зориулав, таны компьютерт тусгай тохиргоо шаардлагатай)',
'tog-showjumplinks' => '"Шууд очих" хялбар линкүүдийг ажиллагаатай болгох',
'tog-uselivepreview' => 'Шууд байдлаар урьдчилж харах (ЖаваСкрипт) (Туршилт)',
'tog-forceeditsummary' => 'Товч агуулгын талбарыг хоосон үлдээхэд надад мэдэгдэх',
Та одоохондоо Google-г ашиглан хайх боломжтой.
Анхааруулж хэлэхэд, тэдний {{SITENAME}}-н агуулгын индексүүд хоцрогдсон байж магадгүй.',
-# Quickbar
-'qbsettings' => 'Шуурхай тавцан',
-'qbsettings-none' => 'Байхгүй',
-'qbsettings-fixedleft' => 'Зүүн талд бэхжүүлсэн',
-'qbsettings-fixedright' => 'Баруун талд бэхжүүлсэн',
-'qbsettings-floatingleft' => 'Зүүн талд хөвсөн',
-'qbsettings-floatingright' => 'Баруун талд хөвсөн',
-'qbsettings-directionality' => 'Тухай хэлний барилаас хамаарч хэлбэрийг бий болгох',
-
# Preferences page
'preferences' => 'Хэрэглэгчийн тохиргоо',
'mypreferences' => 'Миний тохиргоо',
'http-read-error' => 'HTTP-г унших алдаа.',
'http-timed-out' => 'HTTP хүсэлтийн хугацаа дуусав.',
'http-curl-error' => 'Дараах URL-г авчрахад алдаа гарав: $1',
-'http-host-unreachable' => 'URL-д хүрч чадсангүй.',
'http-bad-status' => 'HTTP хандалтын үед асуудал үүсэв: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => 'Хэрэглэгч олдсонгүй.',
'listusers-blocked' => '(түгжигдсэн)',
-# Special:ActiveUsers
-'activeusers' => 'Идэвхитэй хэрэглэгчдийн жагсаалт',
-'activeusers-intro' => 'Энэ нь сүүлийн $1 {{PLURAL:$1|өдөрт|өдөрт}} ямар нэг байдлаар үйлдэл хийсэн хэрэглэгчдийн жагсаалт юм.',
-'activeusers-count' => 'Сүүлийн {{PLURAL:$3|нэг өдөрт|$3 өдөрт}} $1 {{PLURAL:$1|засвар|засвар}}',
-'activeusers-from' => 'Хамгийн эхэлж харуулах хэрэглэгч:',
-'activeusers-hidebots' => 'Ботуудыг нуух',
-'activeusers-hidesysops' => 'Администраторуудыг нуух',
-'activeusers-noresult' => 'Хэрэглэгч олдсонгүй.',
-
# Special:ListGroupRights
'listgrouprights' => 'Хэрэглэгчийн бүлгийн эрхүүд',
'listgrouprights-summary' => 'Дараах нь энэ вики дээрх хэрэглэгчийн бүлгүүд болон тэдгээрийн эрх, зөвшөөрлүүдийн жагсаалт юм.
'tog-shownumberswatching' => 'पहारा दिलेले सदस्य दाखवा',
'tog-oldsig' => 'सध्याची सही:',
'tog-fancysig' => 'सही विकिसंज्ञा म्हणून वापरा (आपोआप दुव्याशिवाय)',
-'tog-externaleditor' => 'कायम बाह्य संपादक वापरा (फक्त प्रशिक्षित सदस्यांसाठीच, संगणकावर विशेष प्रणाली लागते) ([//www.mediawiki.org/wiki/Manual:External_editors अधिक माहिती])',
-'tog-externaldiff' => 'इतिहास पानावर निवडलेल्या आवृत्त्यांमधील बदल दाखविण्यासाठी बाह्य प्रणाली वापरा (फक्त प्रशिक्षित सदस्यांसाठीच, संगणकावर विशेष प्रणाली लागते) ([//www.mediawiki.org/wiki/Manual:External_editors अधिक माहिती])',
'tog-showjumplinks' => '"कडे जा" सुगम दुवे, उपलब्ध करा.',
'tog-uselivepreview' => 'संपादन करता करताच झलक दाखवा (जावास्क्रीप्ट)(प्रयोगक्षम)',
'tog-forceeditsummary' => 'जर ’बदलांचा आढावा’ दिला नसेल तर मला सूचित करा',
'tog-diffonly' => 'निवडलेल्या आवृत्त्यांमधील बदल दाखवताना जुनी आवृत्ती दाखवू नका.',
'tog-showhiddencats' => 'लपविलेले वर्ग दाखवा',
'tog-norollbackdiff' => 'द्रुतमाघार घेतल्यास बदल वगळा',
+'tog-useeditwarning' => 'जर मी संपादित करीत असलेल्या पानावरील माझे संपादिलेले बदल जतन न केल्यास मला इशारा द्या',
'underline-always' => 'नेहेमी',
'underline-never' => 'कधीच नाही',
या नावाचे पान आधीच अस्तित्वात आहे.',
'defaultmessagetext' => 'कसूर पाठ्य मजकूर',
'invalid-content-data' => 'अवैध माहिती',
+'editwarning-warning' => "या पानावरुन दुसर्या पानावर गेल्यास, तुम्ही येथे केलेले बदल जतन होणार नाहीत.
+ही सूचना घालवण्यासाठी ''माझ्या पसंती'' मधील संपादनपसंतीत बदल करा.",
# Content models
'content-model-wikitext' => 'विकिमजकूर',
'search-external' => 'बाह्य शोध',
'searchdisabled' => '{{SITENAME}} शोध अनुपलब्ध केला आहे.तो पर्यंत गूगलवरून शोध घ्या.{{SITENAME}}च्या मजकुराची त्यांची सूचिबद्धता शिळी असण्याची शक्यता असू शकते हे लक्षात घ्या.',
-# Quickbar
-'qbsettings' => 'शीघ्रपट',
-'qbsettings-none' => 'नाही',
-'qbsettings-fixedleft' => 'स्थिर डावे',
-'qbsettings-fixedright' => 'स्थिर ऊजवे',
-'qbsettings-floatingleft' => 'तरंगते डावे',
-'qbsettings-floatingright' => 'तरंगते ऊजवे',
-'qbsettings-directionality' => 'तुमच्या भाशा ची पद्धत दिशात्मक असली पाहिजे.',
-
# Preferences page
'preferences' => 'माझ्या पसंती',
'mypreferences' => 'माझ्या पसंती',
'underline-always' => 'Sentiasa',
'underline-never' => 'Jangan',
-'underline-default' => 'Tetapan azali kulit/pelayar',
+'underline-default' => 'Tetapan lalai kulit/pelayar',
# Font style option in Special:Preferences
'editfont-style' => 'Gaya fon ruang sunting:',
-'editfont-default' => 'Pelayar web utama',
+'editfont-default' => 'Lalaian pelayar web',
'editfont-monospace' => 'Fon monospace',
'editfont-sansserif' => 'Fon sans-serif',
'editfont-serif' => 'Fon serif',
'about' => 'Perihal',
'article' => 'Laman kandungan',
'newwindow' => '(dibuka di tetingkap baru)',
-'cancel' => 'Batalkan',
+'cancel' => 'Batal',
'moredotdotdot' => 'Lagi...',
'morenotlisted' => 'Lain-lain yang tidak tersenarai...',
'mypage' => 'Halaman',
Kata laluan sementara: $2',
'passwordreset-emailsent' => 'E-mel set semula kata laluan telah dihantar.',
'passwordreset-emailsent-capture' => 'E-mel set semula kata laluan telah dihantar, seperti yang dipaparkan di bawah.',
-'passwordreset-emailerror-capture' => 'E-mel set semula kata laluan telah dihasilkan, seperti yang dipaparkan di bawah, tetapi tidak berjaya dihantar kepada pengguna: $1',
+'passwordreset-emailerror-capture' => 'E-mel set semula kata laluan telah dihasilkan, seperti yang dipaparkan di bawah, tetapi tidak berjaya dihantar kepada {{GENDER:$2|pengguna}} berkenaan: $1',
# Special:ChangeEmail
'changeemail' => 'Tukar alamat e-mel',
'content-failed-to-parse' => 'Kandungan $2 tidak dapat dihuraikan untuk model $1: $3',
'invalid-content-data' => 'Data kandungan tidak sah',
'content-not-allowed-here' => 'Kandungan "$1" tidak dibenarkan di halaman [[$2]]',
-'editwarning-warning' => 'Meninggalkan laman ini mungkin akan menyebabkan anda kehilangan sebarang perubahan yang telah anda lakukan.
-Anda boleh melumpuhkan amaran in di bahagian "Menyunting" dalam keutamaan anda.',
+'editwarning-warning' => 'Meninggalkan laman ini mungkin akan menyebabkan sebarang perubahan yang telah anda lakukan hilang.
+Jika anda sudah log masuk, anda boleh melumpuhkan amaran ini di bahagian "Menyunting" dalam keutamaan anda.',
# Content models
'content-model-wikitext' => 'wikiteks',
'tog-shownumberswatching' => "Uri n-numru ta' utenti li qegħdin isegwu din il-paġna",
'tog-oldsig' => 'Firma attwali:',
'tog-fancysig' => 'Interpreta l-firma bħala test tal-wiki (mingħajr ħolqa awtomatika)',
-'tog-externaleditor' => 'Uża awtomatikament editur estern (għal utenti esperti biss, hemm bżonn preferenzi speċjali fuq il-komputer tiegħek. [//www.mediawiki.org/wiki/Manual:External_editors Iktar informazzjoni.])',
-'tog-externaldiff' => 'Uża awtomatikament diff estern (għal utenti esperti biss, hemm bżonn preferenzi speċjali fuq il-komputer tiegħek. [//www.mediawiki.org/wiki/Manual:External_editors Iktar informazzjoni.])',
'tog-showjumplinks' => 'Attiva l-ħoloq aċċessibbli "aqbeż għal"',
'tog-uselivepreview' => "Attiva l-funzjoni ''Live preview'' (bżonn tal-JavaScript; sperimentali)",
'tog-forceeditsummary' => 'Nebbaħni meta ndaħħal taqsira tal-modifika vojta',
'tog-diffonly' => 'Turiex kontenut tal-paġni wara li tkun għamilt paragun bejn il-verżjonijiet',
'tog-showhiddencats' => 'Uri kategoriji moħbija',
'tog-norollbackdiff' => "Turix il-paragun bejn il-verżjonijiet wara li tkun effettwajt ir-''rollback''",
+'tog-useeditwarning' => "Avżani kull meta nħalli paġna ta' modifika b'modifiki li għadhom ma ġewx salvati",
'underline-always' => 'Dejjem',
'underline-never' => 'Qatt',
'edit-no-change' => 'Il-modifika li għamilt ġiet injorata, minħabba li ebda bidla ma saret lejn it-test.',
'edit-already-exists' => 'Ma tistax tinħoloq din il-paġna.
Din teżisti diġà.',
+'editwarning-warning' => 'Jekk tħalli din il-paġna jista\' jwassal sabiex titlef kwalunkwe tibdil li tkun għamilt. Jekk int tinsab fil-kont tiegħek, tista\' tneħħi dan l-avviż fis-sezzjoni "Modifiki" tal-preferenzi tiegħek.',
# Content models
'content-model-wikitext' => 'test tal-wiki',
Sadanittant, tista' tipprova tfittex bil-Google.
Innota però li l-werreja tal-kontenut ta' {{SITENAME}} f'dawn is-siti, jistgħu ma jkunux aġġornati.",
-# Quickbar
-'qbsettings' => "''Quickbar''",
-'qbsettings-none' => 'Xejn',
-'qbsettings-fixedleft' => 'Mehmuż fix-xellug',
-'qbsettings-fixedright' => 'Mehmuż fil-lemin',
-'qbsettings-floatingleft' => "''Floating'' lejn ix-xellug",
-'qbsettings-floatingright' => "''Floating'' lejn il-lemin",
-'qbsettings-directionality' => 'Fiss, skont id-direzzjoni tat-test fil-lingwa tiegħek',
-
# Preferences page
'preferences' => 'Preferenzi',
'mypreferences' => 'Preferenzi',
'http-read-error' => 'Żball fil-qari HTTP.',
'http-timed-out' => 'Rikjesta HTTP skaduta.',
'http-curl-error' => 'Żball fil-kisba tal-URL: $1',
-'http-host-unreachable' => 'Il-URL ma setgħetx tintlaħaq.',
'http-bad-status' => 'Kien hemm problema matul ir-rikjesta HTTP: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => 'L-ebda utent ma nstab.',
'listusers-blocked' => '(imblukkat)',
-# Special:ActiveUsers
-'activeusers' => 'Lista tal-utenti attivi',
-'activeusers-intro' => "Din hija lista ta' utenti li kellhom xi tip ta' attività f'dawn l-aħħar $1 {{PLURAL:$1|ġurnata|ġurnata}}.",
-'activeusers-count' => '$1 {{PLURAL:$1|modifika|modifika}} fl-aħħar {{PLURAL:$3|jum|$3 jum}}',
-'activeusers-from' => 'Uri utenti li jibdew minn:',
-'activeusers-hidebots' => 'Aħbi l-bots',
-'activeusers-hidesysops' => 'Aħbi amministraturi',
-'activeusers-noresult' => 'L-ebda utent ma nstab.',
-
# Special:ListGroupRights
'listgrouprights' => 'Drittijiet tal-grupp tal-utenti',
'listgrouprights-summary' => "Hawn taħt hawn elenkati l-gruppi tal-utenti għal din il-wiki, bid-drittijiet ta' aċċess rispettiv.
# Stylesheets
'common.css' => '/* CSS li tpoġġa hawnhekk irrid jiġi applikat fl-iskins kollha */',
-'standard.css' => '/* CSS li tpoġġa hawnhekk se jaffetwa l-utenti li jagħmlu użu mill-iskin Standard */',
-'nostalgia.css' => '/* CSS li tpoġġa hawnhekk se jaffetwa l-utenti li jagħmlu użu mill-aspett grafiku Nostalgia */',
'cologneblue.css' => '/* CSS li tpoġġa hawnhekk se jaffetwa dawk l-utenti li jagħmlu użu mill-aspett grafiku Cologne Blue */',
'monobook.css' => "/* CSS li tpoġġa hawnhekk se jaffetwa dawk l-utenti li jagħmlu użu mill-iskin ''Monobook'' */",
-'myskin.css' => "/* CSS li tpoġġa hawnhekk se jaffetwa dawk l-utenti li jagħmlu użu mill-iskin ''L-Iskin tiegħi'' */",
-'chick.css' => '/* CSS li tpoġġa hawnhekk se jaffetwa dawk l-utenti li jagħmlu użu mill-aspett grafiku Ckick */',
-'simple.css' => '/* CSS li tpoġġa hawnhekk se jaffetwa dawk l-utenti li jagħmlu użu mill-aspett grafiku Simple */',
'modern.css' => '/* CSS li tpoġġa hawnhekk se jaffetwa dawk l-utenti li jagħmlu użu mill-aspett grafiku Modern */',
# Scripts
'common.js' => "/* Kull ''JavaScript'' hawnhekk jiġi mniżżel għal kull utent f'kull tniżżil ta' paġna. */",
-'standard.js' => "/* Kull ''JavaScript'' hawnhekk jiġi mniżżel għal dawk l-utenti li qegħdin jagħmlu użu mill-iskin ''Standard'' */",
-'nostalgia.js' => "/* Kull ''JavaScript'' hawnhekk jiġi mniżżel għal dawk l-utenti li qegħdin jagħmlu użu mill-iskin ''Nostalgia'' */",
'cologneblue.js' => "/* Kull ''JavaScript'' hawnhekk jiġi mniżżel għal dawk l-utenti li qegħdin jagħmlu użu mill-iskin ''Cologne Blue'' */",
'monobook.js' => "/* Kull ''JavaScript'' hawnhekk jiġi mniżżel għal dawk l-utenti li qegħdin jagħmlu użu mill-iskin ''Monobook'' */",
-'myskin.js' => "/* Kull ''JavaScript'' hawnhekk jiġi mniżżel għal dawk l-utenti li qegħdin jagħmlu użu mill-iskin ''MySkin'' */",
-'chick.js' => "/* Kull ''JavaScript'' hawnhekk jiġi mniżżel għal dawk l-utenti li qegħdin jagħmlu użu mill-iskin ''Chick'' */",
-'simple.js' => "/* Kull ''JavaScript'' hawnhekk jiġi mniżżel għal dawk l-utenti li qegħdin jagħmlu użu mill-iskin ''Simple'' */",
'modern.js' => "/* Kull ''JavaScript'' hawnhekk jiġi mniżżel għal dawk l-utenti li qegħdin jagħmlu użu mill-iskin ''Modern''*/",
# Metadata
'pageinfo-protect-cascading-from' => 'Protezzjoni li tintiret minn',
# Skin names
-'skinname-standard' => 'Classic',
-'skinname-nostalgia' => 'Nostalgia',
'skinname-cologneblue' => 'Cologne Blue',
'skinname-monobook' => 'Monobook',
-'skinname-myskin' => 'MySkin',
-'skinname-chick' => 'Chick',
-'skinname-simple' => 'Simple',
'skinname-modern' => 'Modern',
# Patrolling
Midlertidig passord: $2',
'passwordreset-emailsent' => 'En passordtilbakestillingslenke har blitt sendt per e-post.',
'passwordreset-emailsent-capture' => 'Passordtilbakestillingseposten vist under har blitt sendt ut.',
-'passwordreset-emailerror-capture' => 'En passordtilbakestillingsepost ble laget, men det lyktes ikke å sende denne til brukeren: $1',
+'passwordreset-emailerror-capture' => 'En passordtilbakestillingsepost ble laget, men det lyktes ikke å sende denne til {{GENDER:$2|brukeren}}: $1',
# Special:ChangeEmail
'changeemail' => 'Endre e-postadresse',
'tog-shownumberswatching' => 't Antal gebrukers bekieken die disse zied volgt',
'tog-oldsig' => 'Bestaonde haandtekening:',
'tog-fancysig' => 'Ondertekening zien as wikitekste (zonder automatiese verwiezing)',
-'tog-externaleditor' => 'Standard n externe tekstbewarker gebruken (allinnig veur gevorderden - veur disse funksie bin spesiale instellingen neudig. [//www.mediawiki.org/wiki/Manual:External_editors Meer informasie]).',
-'tog-externaldiff' => 'Standard n extern vergeliekingsprogramma gebruken (allinnig veur gevorderden - veur disse funksie bin spesiale instellingen neudig. [//www.mediawiki.org/wiki/Manual:External_editors Meer informasie]).',
'tog-showjumplinks' => '"Gao naor"-verwiezingen toelaoten',
'tog-uselivepreview' => 'Gebruuk "rechtstreeks naokieken" (mu\'j JavaScript veur hebben - experimenteel)',
'tog-forceeditsummary' => 'Geef n melding bie n lege samenvatting',
'tog-showhiddencats' => 'Laot verbörgen kategorieën zien',
'tog-noconvertlink' => 'Ziednaamkonversie uutschakelen',
'tog-norollbackdiff' => 'Wiezigingen vortlaoten nao t weerummedreien',
+'tog-useeditwarning' => "Waorschuw mien a'k n bewörken zied aof wil sluten die nog niet op-esleugen is",
'underline-always' => 'Altied',
'underline-never' => 'Nooit',
-'underline-default' => 'Standardinstelling',
+'underline-default' => 'Standard in joew vormgeving of webkieker',
# Font style option in Special:Preferences
'editfont-style' => 'Lettertype veur de tekste t bewarkingsveld:',
'nov' => 'nov',
'dec' => 'des',
+'today-at' => '$1',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|Kategorie|Kategorieën}}',
'category_header' => 'Artikels in kategorie $1',
'newwindow' => '(niej vienster)',
'cancel' => 'Aofbreken',
'moredotdotdot' => 'Meer...',
-'mypage' => 'Mien gebrukerszied',
+'morenotlisted' => 'Meer niet in de lieste...',
+'mypage' => 'Gebrukerszied',
'mytalk' => 'Mien overleg',
'anontalk' => 'Overlegzied veur dit IP-adres',
'navigation' => 'Navigasie',
'vector-action-protect' => 'Beveiligen',
'vector-action-undelete' => 'Weerummeplaotsen',
'vector-action-unprotect' => 'Beveiliging wiezigen',
-'vector-simplesearch-preference' => 'Verbeterde zeuksuggesties anzetten (allinnig mit Vector-vormgeving)',
+'vector-simplesearch-preference' => 'Vereenvoudigd zeuken anzetten (allinnig mit Vector-vormgeving)',
'vector-view-create' => 'Anmaken',
'vector-view-edit' => 'Bewarken',
'vector-view-history' => 'Geschiedenisse bekieken',
'namespaces' => 'Naamruumtes',
'variants' => 'Variaanten',
+'navigation-heading' => 'Navigasiemenu',
'errorpagetitle' => 'Foutmelding',
'returnto' => 'Weerumme naor $1.',
'tagline' => 'Van {{SITENAME}}',
'viewsource-title' => 'Bron bekieken van $1',
'actionthrottled' => 'Haandeling tegenehöllen',
'actionthrottledtext' => "As maotregel tegen t plaotsen van ongewunste verwiezingen, is t antal keren da'j disse haandeling in n korte tied uutvoeren kunnen beteund. Je hebben de limiet overschrejen. Probeer t over n antal minuten weer.",
-'protectedpagetext' => 'Disse zied is beveiligd um bewarkingen te veurkoemen.',
+'protectedpagetext' => 'Disse zied is beveiligd. Bewarken of aandere haandelingen bin niet meugelik.',
'viewsourcetext' => 'Je kunnen de brontekste van disse zied bewarken en bekieken:',
'viewyourtext' => "Je kunnen '''joew bewarkingen''' an de brontekste van disse zied bekieken en kopiëren:",
'protectedinterface' => "Op disse zied steet tekste die gebruukt wörden veur systeemteksten van disse wiki. Allinnig beheerders kunnen disse zied bewarken.
Je kunnen {{SITENAME}} noen anoniem gebruken of je eigen <span class='plainlinks'>[$1 opniej anmelden]</span> onder disse of n aandere gebrukersnaam.
t Kan ween dat der wat ziejen bin die weeregeven wörden asof je an-emeld bin totda'j t tussengeheugen van joew webkieker leegmaken.",
+'welcomeuser' => 'Welkom, $1!',
'yourname' => 'Gebrukersnaam',
+'userlogin-yourname' => 'Gebrukersnaam',
+'userlogin-yourname-ph' => 'Geef joew gebrukersnaam op',
'yourpassword' => 'Wachtwoord',
+'userlogin-yourpassword' => 'Wachtwoord',
+'userlogin-yourpassword-ph' => 'Geef joew wachtwoord op',
'yourpasswordagain' => 'Opniej invoeren',
'remembermypassword' => 'Vanzelf anmelden (hooguut $1 {{PLURAL:$1|dag|dagen}})',
+'userlogin-remembermypassword' => 'Vanzelf anmelden',
'securelogin-stick-https' => "Verbunnen blieven via HTTPS naoda'j an-emeld bin",
'yourdomainname' => 'Joew domein',
'password-change-forbidden' => 'Je kunnen joew wachtwoord niet wiezigen op disse wiki.',
'logout' => 'Aofmelden',
'userlogout' => 'Aofmelden',
'notloggedin' => 'Niet an-emeld',
+'userlogin-noaccount' => "He'j nog gien gebrukersnaam?",
+'userlogin-joinproject' => 'Over {{SITENAME}}',
'nologin' => "He'j nog gien gebrukersnaam? '''$1'''.",
'nologinlink' => 'Maak n gebrukersprofiel an',
'createaccount' => 'Niej gebrukersprofiel anmaken',
'gotaccount' => "Stao'j al in-eschreven? '''$1'''.",
'gotaccountlink' => 'Anmelden',
'userlogin-resetlink' => "Bi'j de anmeldgegevens kwiet?",
-'createaccountmail' => 'per netpost',
+'createaccountmail' => 'Gebruuk n tiejelik wachtwoord dat joe netzelde is en stuur t naor t netpostadres dat hieronder steet',
'createaccountreason' => 'Reden:',
'badretype' => "De wachtwoorden die'j in-etikt hebben bin niet liek alleens.",
'userexists' => 'Disse gebrukersnaam is al gebruuk.
'edit-already-exists' => 'De zied kon niet an-emaakt wörden.
t Besteet al.',
'defaultmessagetext' => 'Standardtekste',
+'editwarning-warning' => "A'j disse zied aofsluten dan kan t ween dat der wieziging die'j emaakt hebben kwiet raken.
+A'j an-emeld bin, dan ku'j disse waorschuwing uutzetten in t tabblad \"Bewarken\" in joew veurkeuren.",
+
+# Content models
+'content-model-wikitext' => 'wikitekste',
+'content-model-text' => 'tekste zonder opmaak',
+'content-model-javascript' => 'JavaScript',
+'content-model-css' => 'CSS',
# Parser/template warnings
'expensive-parserfunction-warning' => 'Waorschuwing: disse zied gebruukt te veule kostbaore parserfunksies.
'search-interwiki-default' => '$1 resultaoten:',
'search-interwiki-more' => '(meer)',
'search-relatedarticle' => 'Verwaant',
-'mwsuggest-disable' => 'Anbevelingen via AJAX uutschakelen',
+'mwsuggest-disable' => 'Zeuksuggesties uutzetten',
'searcheverything-enable' => 'In alle naamruumten zeuken',
'searchrelated' => 'verwaant',
'searchall' => 'alles',
'search-external' => 'Extern zeuken',
'searchdisabled' => 'Zeuken in {{SITENAME}} is niet meugelik. Je kunnen gebruukmaken van Google. De gegevens over {{SITENAME}} bin misschien niet bie-ewörken.',
-# Quickbar
-'qbsettings' => 'Lieste mit ziejen',
-'qbsettings-none' => 'Gien',
-'qbsettings-fixedleft' => 'Links, vaste',
-'qbsettings-fixedright' => 'Rechts, vaste',
-'qbsettings-floatingleft' => 'Links, zweven',
-'qbsettings-floatingright' => 'Rechts, zweven',
-'qbsettings-directionality' => 'Vaste, aofhankelik van de schriefrichtige van joew taal',
-
# Preferences page
'preferences' => 'Veurkeuren',
'mypreferences' => 'Mien veurkeuren',
'prefs-emailconfirm-label' => 'Netpostbevestiging:',
'prefs-textboxsize' => 'Aofmetingen bewarkingsscharm',
'youremail' => 'Netpostadres (niet verplicht) *',
-'username' => 'Gebrukersnaam:',
-'uid' => 'Gebrukersnummer:',
+'username' => '{{GENDER:$1|Gebrukersnaam}}:',
+'uid' => '{{GENDER:$1|Gebrukersnummer}}:',
'prefs-memberingroups' => 'Lid van {{PLURAL:$1|groep|groepen}}:',
'prefs-registration' => 'Registrasiedaotum:',
'yourrealname' => 'Echte naam (niet verplicht)',
'http-read-error' => 'Fout bie t lezen van HTTP',
'http-timed-out' => 'Wachttied bie t HTTP verzeuk',
'http-curl-error' => 'Fout bie t ophaolen van t webadres: $1',
-'http-host-unreachable' => 'Kon webadres niet bereiken.',
'http-bad-status' => 'Der is n probleem mit t HTTP-verzeuk: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
Feitelik mutten ze rechtstreeks verwiezen naor t juuste onderwarp.<br />
Ziejen wörden ezien as n deurverwieszied, as de mal gebruukt wörden die vermeld steet op [[MediaWiki:Disambiguationspage]].",
+'pageswithprop-submit' => 'Zeuk',
+
'doubleredirects' => 'Dubbele deurverwiezingen',
'doubleredirectstext' => 'Op disse lieste staon alle ziejen die deurverwiezen naor aandere deurverwiezingen.
Op elke regel steet de eerste en de tweede deurverwiezing, daorachter steet de doelzied van de tweede deurverwiezing.
'listusers-noresult' => 'Gien gebrukers evunnen. Zeuk oek naor variaanten mit kleine letters of heufdletters.',
'listusers-blocked' => '(eblokkeerd)',
-# Special:ActiveUsers
-'activeusers' => 'Aktieve gebrukers',
-'activeusers-intro' => 'Dit is n lieste van gebrukers die de aofgeleupen $1 {{PLURAL:$1|dag|dagen}} enigszins aktief ewest hebben.',
-'activeusers-count' => '$1 leste {{PLURAL:$1|bewarking|bewarkingen}} in de aofgeleupen {{PLURAL:$3|dag|$3 dagen}}',
-'activeusers-from' => 'Laot gebrukers zien vanaof:',
-'activeusers-hidebots' => 'Bots verbargen',
-'activeusers-hidesysops' => 'Beheerders verbargen',
-'activeusers-noresult' => 'Gien aktieve gebrukers evunnen.',
-
# Special:ListGroupRights
'listgrouprights' => 'Rechten van gebrukersgroepen',
'listgrouprights-summary' => "Op disse zied staon de gebrukersgroepen van disse wiki beschreven, mit de biebeheurende rechten.
'blanknamespace' => '(Heufdnaamruumte)',
# Contributions
-'contributions' => 'Biedragen van disse gebruker',
+'contributions' => '{{GENDER:$1|Biedragen van disse gebruker}}',
'contributions-title' => 'Biedragen van $1',
'mycontris' => 'Mien biedragen',
'contribsub2' => 'Veur $1 ($2)',
'pageinfo-magic-words' => '{{PLURAL:$1|Magies woord|Magiese woorden}} ($1)',
'pageinfo-hidden-categories' => 'Verbörgen {{PLURAL:$1|kategorie|kategorieën}} ($1)',
'pageinfo-templates' => '{{PLURAL:$1|Gebruukten mal|Gebruukten mallen}} ($1)',
+'pageinfo-toolboxlink' => 'Informasie over disse zied',
+'pageinfo-redirectsto' => 'Verwis deur naor',
+'pageinfo-redirectsto-info' => 'informasie',
+'pageinfo-contentpage' => 'Eteld as zied mit inhoud',
+'pageinfo-contentpage-yes' => 'Ja',
# Skin names
-'skinname-standard' => 'Klassiek',
-'skinname-nostalgia' => 'Nostalgie',
'skinname-cologneblue' => 'Keuls blauw',
'skinname-monobook' => 'Monobook',
-'skinname-myskin' => 'MienSkin',
-'skinname-chick' => 'Deftig',
-'skinname-simple' => 'Eenvoudig',
'skinname-modern' => 'Niejmoeds',
# Patrolling
'hours' => '{{PLURAL:$1|$1 ure|$1 uren}}',
'days' => '{{PLURAL:$1|$1 dag|$1 dagen}}',
'ago' => '$1 eleen',
+'just-now' => 'onderlest',
# Bad image list
'bad_image_list' => 'De opmaak is as volgt:
'htmlform-submit' => 'Opslaon',
'htmlform-reset' => 'Wiezigingen ongedaonmaken',
'htmlform-selectorother-other' => 'Aanders',
+'htmlform-no' => 'Nee',
+'htmlform-yes' => 'Ja',
# SQLite database support
'sqlite-has-fts' => 'Versie $1 mit ondersteuning veur "full-text" zeuken',
'nov' => 'nov',
'dec' => 'dec',
+'monday-at' => 'Maandag om $1',
+'tuesday-at' => 'Dinsdag om $1',
+'wednesday-at' => 'Woensdag om $1',
+'thursday-at' => 'Donderdag om $1',
+'friday-at' => 'Vrijdag om $1',
+'saturday-at' => 'Zaterdag om $1',
+'sunday-at' => 'Zondag om $1',
+'today-at' => '$1',
+'yesterday-at' => 'Gisteren om $1',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|Categorie|Categorieën}}',
'category_header' => 'Pagina’s in categorie "$1"',
# Image rotation
'rotate-comment' => 'Afbeelding gedraaid, $1 {{PLURAL:$1|graad|graden}} met de klok mee',
+# Unknown messages
+'hours-ago' => '$1 {{PLURAL:$1|uur}} geleden',
+'minutes-ago' => '$1 {{PLURAL:$1|minuut|minuten}} geleden',
+'seconds-ago' => '$1 {{PLURAL:$1|seconde|seconden}} geleden',
);
<?php
-/** Oriya (à¬\93à\9cିଆ)
+/** Oriya (à¬\93ଡ଼ିଆ)
*
* See MessagesQqq.php for message documentation incl. usage of parameters
* To improve a translation please visit http://translatewiki.net
'tog-editsectiononrightclick' => 'ବିଭାଗ ନାମରେ ଡାହାଣ କ୍ଲିକ କରି ବିଭାଗ ସମ୍ପାଦନାକୁ ସଚଳ କରିବେ (ଜାଭାସ୍କ୍ରିପ୍ଟ ଲୋଡ଼ା)',
'tog-showtoc' => 'ସୂଚୀପତ୍ର ଦେଖାଇବେ (୩ରୁ ଅଧିକ ମୁଖ୍ୟ ନାମ ଥିଲେ)',
'tog-rememberpassword' => 'ଏହି ବ୍ରାଉଜରରେ (ସବୁଠୁ ଅଧିକ ହେଲେ $1 {{PLURAL:$1|day|ଦିନ}}) ପାଇଁ ମୋ ଲଗଇନ ମନେ ରଖିଥିବେ',
-'tog-watchcreations' => 'ମà\8b ତିà¬\86ରି ପà\83ଷà\8dଠାସବà\81à¬\95à\81 à¬\8fବà¬\82 ମà\8b à¬\85ପଲà\8bଡà¬\97à\81ଡିà¬\95à\81 ମà\8bର ଦà\87à¬\96ଣାତାଲିà¬\95ାରà\87 ଯà\8bଡନ୍ତୁ',
-'tog-watchdefault' => 'ମà\81à¬\81 ବଦଳà\87à¬\87ଥିବା ପà\83ଷà\8dଠା à¬\8fବà¬\82 ଫାà¬\87ଲà¬\97à\81ଡିà¬\95à\81 ମà\8bର ଦà\87à¬\96ଣାତାଲିà¬\95ାରà\87 ଯà\8bଡନ୍ତୁ',
-'tog-watchmoves' => 'ମà\81à¬\81 à¬\98à\81à¬\9eà\8dà¬\9aାà¬\87ଥିବା ପà\83ଷà\8dଠା à¬\8fବà¬\82 ଫାà¬\87ଲà¬\97à\81ଡିà¬\95à\81 ମà\8bର ଦà\87à¬\96ଣାତାଲିà¬\95ାରà\87 ଯà\8bଡନ୍ତୁ',
-'tog-watchdeletion' => 'ମà\81à¬\81 ଲିà¬à¬¾à¬\87ଥିବା ପà\83ଷà\8dଠା à¬\8fବà¬\82 ଫାà¬\87ଲà¬\97à\81ଡିà¬\95à\81 ମà\8bର ଦà\87à¬\96ଣାତାଲିà¬\95ାରà\87 ଯà\8bଡନ୍ତୁ',
-'tog-minordefault' => 'ସବà\81ଯାà¬\95 ସମà\8dପାଦନାà¬\95à\81 à¬\9bାà¬\8fà¬\81 à¬\9fିà¬\95à\87 ବଦଳ ଭାବରେ ସୂଚିତ କରିବେ',
+'tog-watchcreations' => 'ମà\8b ତିà¬\86ରି ପà\83ଷà\8dଠାସବà\81à¬\95à\81 à¬\8fବà¬\82 ମà\8b à¬\85ପଲà\8bଡ଼à¬\97à\81ଡ଼ିà¬\95à\81 ମà\8bର ଦà\87à¬\96ଣାତାଲିà¬\95ାରà\87 ଯà\8bଡ଼ନ୍ତୁ',
+'tog-watchdefault' => 'ମà\81à¬\81 ବଦଳà\87à¬\87ଥିବା ପà\83ଷà\8dଠା à¬\8fବà¬\82 ଫାà¬\87ଲà¬\97à\81ଡ଼ିà¬\95à\81 ମà\8bର ଦà\87à¬\96ଣାତାଲିà¬\95ାରà\87 ଯà\8bଡ଼ନ୍ତୁ',
+'tog-watchmoves' => 'ମà\81à¬\81 à¬\98à\81à¬\9eà\8dà¬\9aାà¬\87ଥିବା ପà\83ଷà\8dଠା à¬\8fବà¬\82 ଫାà¬\87ଲà¬\97à\81ଡ଼ିà¬\95à\81 ମà\8bର ଦà\87à¬\96ଣାତାଲିà¬\95ାରà\87 ଯà\8bଡ଼ନ୍ତୁ',
+'tog-watchdeletion' => 'ମà\81à¬\81 ଲିà¬à¬¾à¬\87ଥିବା ପà\83ଷà\8dଠା à¬\8fବà¬\82 ଫାà¬\87ଲà¬\97à\81ଡ଼ିà¬\95à\81 ମà\8bର ଦà\87à¬\96ଣାତାଲିà¬\95ାରà\87 ଯà\8bଡ଼ନ୍ତୁ',
+'tog-minordefault' => 'ସବà\81ଯାà¬\95 ସମà\8dପାଦନାà¬\95à\81 à¬\9bାà¬\8fà¬\81 à¬\9bà\8bà¬\9f ବଦଳ ଭାବରେ ସୂଚିତ କରିବେ',
'tog-previewontop' => 'ଏଡ଼ିଟ ବାକ୍ସ ଆଗରୁ ଦେଖଣା ଦେଖାଇବେ',
'tog-previewonfirst' => 'ପ୍ରଥମ ବଦଳର ଦେଖଣା ଦେଖାଇବେ',
'tog-nocache' => 'ବ୍ରାଉଜର ପୃଷ୍ଠା ସଂରକ୍ଷଣକୁ ଅଚଳ କରିବେ',
-'tog-enotifwatchlistpages' => 'ମୋ ଦେଖଣାତାଲିକାରେ ଥିବା ପୃଷ୍ଠା ବା ଫାଇଲରେ କିଛି ବଦଳ ହେଲେ ମୋତେ ଇ-ମେଲ କରିବେ',
+'tog-enotifwatchlistpages' => 'ମୋ ଦେଖଣାତାଲିକାରେ ଥିବା ପୃଷ୍ଠା ବା ଫାଇଲରେ କିଛି ବଦଳ ହେଲେ ମୋତେ ଇମେଲ କରିବେ',
'tog-enotifusertalkpages' => 'ମୋର ଆଲୋଚନା ପୃଷ୍ଠାରେ କିଛି ବଦଳ ହେଲେ ମୋତେ ଇ-ମେଲ କରିବେ',
'tog-enotifminoredits' => 'ପୃଷ୍ଠାରେ ଏବଂ ଫାଇଲଗୁଡିକରେ ଛୋଟ ଛୋଟ ବଦଳ ହେଲେ ବି ମୋତେ ଇ-ମେଲ କରିବେ',
-'tog-enotifrevealaddr' => 'ସୂଚନା ଇ-ମେଲ ରେ ମୋର ଇ-ମେଲ ଠିକଣା ଦେଖାଇବେ',
+'tog-enotifrevealaddr' => 'ସୂଚନା ଇମେଲ ରେ ମୋର ଇମେଲ ଠିକଣା ଦେଖାଇବେ',
'tog-shownumberswatching' => 'ଦେଖୁଥିବା ବ୍ୟବହାରକାରୀଙ୍କ ସଂଖ୍ୟା ଦେଖାଇବେ',
'tog-oldsig' => 'ଏବେ ଥିବା ନାମ:',
'tog-fancysig' => 'ଦସ୍ତଖତକୁ ଉଇକିଟେକ୍ସଟ ଭାବରେ ଗଣିବେ (ଆପେଆପେ ଥିବା ଲିଙ୍କ ବିନା)',
-'tog-externaleditor' => 'ବାହାର ସମ୍ପାଦକଟି ଆପଣାଛାଏଁ ବ୍ୟବହାର କରିବେ (କେବଳ ପଟୁ ସଭ୍ୟଙ୍କ ପାଇଁ, ଏଥି ନିମନ୍ତେ ଆପଣଙ୍କ କମ୍ପୁଟରରେ ବିଶେଷ ସଜାଣି ଲୋଡ଼ା । [//www.mediawiki.org/wiki/Manual:External_editors ଅଧିକ ସୂଚନା])',
-'tog-externaldiff' => 'ବାହାର ବାଛିବା (external diff) ଆପଣାଛାଏଁ ବ୍ୟବହାର କରିବେ (କେବଳ ପଟୁ ସଭ୍ୟଙ୍କ ପାଇଁ, ଏଥି ନିମନ୍ତେ ଆପଣଙ୍କ କମ୍ପୁଟରରେ ବିଶେଷ ସଜାଣି ଲୋଡ଼ା । [//www.mediawiki.org/wiki/Manual:External_editors ଅଧିକ ସୂଚନା])',
'tog-showjumplinks' => '"ଡେଇଁଯିବେ" ଲିଙ୍କସବୁକୁ ସଚଳ କରିବେ',
'tog-uselivepreview' => 'ସାଥେ ସାଥେ ଚାଲିଥିବା ଦେଖଣା ବ୍ୟବହାର କରିବେ (ଜାଭାସ୍କ୍ରିପ୍ଟ ଲୋଡ଼ା)',
'tog-forceeditsummary' => 'ଖାଲି ସମ୍ପାଦନା ସାରକଥାକୁ ଯିବା ବେଳେ ମୋତେ ଜଣାଇବେ',
'tog-diffonly' => 'ତୁଳନା ତଳେ ପୃଷ୍ଠାର ଭିତର ଭାଗ ଦେଖାନ୍ତୁ ନାହିଁ',
'tog-showhiddencats' => 'ଲୁଚାଯାଇଥିବା ଶ୍ରେଣୀଗୁଡ଼ିକ ଦେଖାଇବେ',
'tog-norollbackdiff' => 'ରୋଲବ୍ୟାକ କଲାପରେ ତୁଳନା ଦେଖାନ୍ତୁ ନାହିଁ',
+'tog-useeditwarning' => 'ଯେତେବେଳେ ମୁଁ ଗୋଟିଏ ସାଇତାଯାଇନଥିବା ପୃଷ୍ଠାକୁ ବନ୍ଦ କରିଦିଏ ମୋତେ ଚେତାବନୀ ଦେବେ',
'underline-always' => 'ସବୁବେଳେ',
'underline-never' => 'କେବେନୁହେଁ',
'viewhelppage' => 'ସହଯୋଗ ପୃଷ୍ଠାଗୁଡ଼ିକ ଦେଖନ୍ତୁ',
'categorypage' => 'ଶ୍ରେଣୀ ପୃଷ୍ଠାଟିକୁ ଦେଖାଇବେ',
'viewtalkpage' => 'ଆଲୋଚନାଗୁଡ଼ିକୁ ଦେଖନ୍ତୁ',
-'otherlanguages' => 'ଅଲଗା ଭାଷା',
+'otherlanguages' => 'ଅଲଗା ଭାଷାରେ',
'redirectedfrom' => '($1 ରୁ ଲେଉଟି ଆସିଛି)',
'redirectpagesub' => 'ଆଉଥରେ ଫେରିବା ପୃଷ୍ଠା',
'lastmodifiedat' => 'ଏହି ପୃଷ୍ଠାଟି $1 ତାରିଖ $2 ବେଳେ ବଦଳାଯାଇଥିଲା ।',
ନିଜର [[Special:Preferences|{{SITENAME}} ପସନ୍ଦସବୁକୁ]] ବଦଳାଇବାକୁ ଭୁଲିବେ ନାହିଁ ।',
'yourname' => 'ବ୍ୟବହାରକାରୀଙ୍କ ନାମ:',
'yourpassword' => 'ପାସୱାର୍ଡ଼',
+'userlogin-yourpassword' => 'ପାସୱାର୍ଡ଼',
+'userlogin-yourpassword-ph' => 'ଆପଣଙ୍କ ପାସୱାର୍ଡ଼ ନିବେଶ କରନ୍ତୁ',
'yourpasswordagain' => 'ପାସୱାର୍ଡ଼ ଆଉଥରେ:',
'remembermypassword' => 'ଏହି ବ୍ରାଉଜରରେ (ସବୁଠୁ ଅଧିକ ହେଲେ $1 {{PLURAL:$1|day|ଦିନ}}) ପାଇଁ ମୋ ଲଗଇନ ମନେ ରଖିଥିବେ',
'securelogin-stick-https' => 'ଲଗ ଇନ କଲାପରେ HTTPS ସହ ଯୋଡ଼ି ହୋଇ ରହନ୍ତୁ',
'logout' => 'ଲଗଆଉଟ',
'userlogout' => 'ଲଗ ଆଉଟ',
'notloggedin' => 'ଲଗ ଇନ କରିନାହାନ୍ତି',
+'userlogin-noaccount' => 'ଖାତାଟିଏ ନାହିଁ?',
'nologin' => 'ଖାତାଟିଏ ନାହିଁ? $1।',
'nologinlink' => 'ନୂଆ ଖାତାଟିଏ ଖୋଲନ୍ତୁ',
'createaccount' => 'ନୂଆ ଖାତାଟିଏ ଖୋଲନ୍ତୁ',
'blocked-mailpassword' => 'ଆପଣଙ୍କ IP ଠିକଣାଟି ସମ୍ପାଦନାରେ ଭାଗ ନେବାରୁ ଅଟକାଯାଇଛି, ତେଣୁ ପାସୱାର୍ଡ଼ ଫେରନ୍ତା କାମ ବ୍ୟବହାର କରି ଅବ୍ୟବହାରକୁ ରୋକିବା ଅନୁମୋଦିତ ନୁହେଁ ।',
'eauthentsent' => 'ଆପଣଙ୍କ ବଛା ଇ-ମେଲ ଠିକଣାକୁ ଏକ ଥୟ କରିବା ଇ-ମେଲଟିଏ ପଠାଇଦିଆଗଲା ।
ଖାତାଟି ଆପଣଙ୍କର ବୋଲି ଥୟ କରିବା ନିମନ୍ତେ ଆଉ କେଉଁ ଇ-ମେଲ ଆପଣଙ୍କ ଖାତାକୁ ପଠାହେବା ଆଗରୁ ଆପଣଙ୍କୁ ସେହି ଇ-ମେଲରେ ଥିବା ସୂଚନା ଅନୁସରଣ କରିବାକୁ ପଡ଼ିବ ।',
-'throttled-mailpassword' => 'à¬\97ତ {{PLURAL:$1|à¬\8fà¬\95 à¬\98ଣà\8dà¬\9fାରà\87|$1 à¬\98ଣà\8dà¬\9fାରà\87}} à¬\86ପଣà¬\99à\8dà¬\95à\81 à¬\8fà¬\95 ପାସà±à¬¾à¬°à\8dଡ଼ ମନà\87à¬\95ରିବା ସà\82à¬\9aନାଟିଏ ପଠାଯାଇଛି ।
-à¬\85ବà\8dà\9fବହାରà¬\95à\81 ରà\8bà¬\95ିବା ନିମନà\8dତà\87, {{PLURAL:$1|à¬\8fà¬\95 à¬\98ଣà\8dà¬\9fାରà\87|$1 à¬\98ଣà\8dà¬\9fାରà\87}} à¬\95à\87ବଳ à¬\97à\8bà¬\9fିà¬\8f ପାସà±à¬¾à¬°à\8dଡ଼ ହିଁ ପଠାହେବ ।',
+'throttled-mailpassword' => 'à¬\97ତ {{PLURAL:$1|à¬\8fà¬\95 à¬\98ଣà\8dà¬\9fାରà\87|$1 à¬\98ଣà\8dà¬\9fାରà\87}} à¬\86ପଣà¬\99à\8dà¬\95à\81 à¬\8fà¬\95 ପà\81ନà¬\83ସà\8dଥାପନ à¬\87ମà\87ଲଟିଏ ପଠାଯାଇଛି ।
+à¬\85ବà\8dà\9fବହାରà¬\95à\81 ରà\8bà¬\95ିବା ନିମନà\8dତà\87, {{PLURAL:$1|à¬\8fà¬\95 à¬\98ଣà\8dà¬\9fାରà\87|$1 à¬\98ଣà\8dà¬\9fାରà\87}} à¬\95à\87ବଳ à¬\97à\8bà¬\9fିà¬\8f à¬\87ମà\87ଲ ହିଁ ପଠାହେବ ।',
'mailerror' => 'ମେଲ ପଠାଇବାରେ ଭୁଲ : $1',
'acct_creation_throttle_hit' => 'ଏହି ଉଇକିର ଦେଖଣାହାରୀ ମାନେ ଆପଣଙ୍କ IP ଠିକଣା ବ୍ୟବହାର କରି ବିଗତ ଦିନରେ {{PLURAL:$1|ଖାତାଟିଏ|$1 ଗୋଟି ଖାତା}} ତିଆରି କରିଛନ୍ତି ଯାହା ସେହି ସମୟସୀମା ଭିତରେ ସବୁଠାରୁ ଅଧିକ ଥିଲା ।
ତେଣୁ, ଏହି IP ଠିକଣାର ଦେଖଣାହାରୀ ଗଣ ଏବେ ଆଉ ଅଧିକ ଖାତା ଖୋଲିପାରିବେ ନାହିଁ ।',
# Special:PasswordReset
'passwordreset' => 'ପାସୱାର୍ଡ଼ ପୁନସ୍ଥାପନ କରନ୍ତୁ',
-'passwordreset-text' => 'ନିà¬\9c à¬\96ାତାର ସବିଶà\87ଷ ବିବରଣà\80 à¬\8fà¬\95 à¬\87-ମà\87ଲରà\87 ପାà¬\87ବା ପାଇଁ ଏହି ଆବେଦନ ପତ୍ରଟି ପୂରଣ କରନ୍ତୁ ।',
+'passwordreset-text' => 'ନିà¬\9c ପାସà±à¬¾à¬°à\8dଡ଼à¬\95à\81 ପà\81ନà¬\83ସà\8dଥାପନ à¬\95ରିବା ପାଇଁ ଏହି ଆବେଦନ ପତ୍ରଟି ପୂରଣ କରନ୍ତୁ ।',
'passwordreset-legend' => 'ପାସୱାର୍ଡ଼ ପୁନସ୍ଥାପନ କରନ୍ତୁ',
'passwordreset-disabled' => 'ପାସୱାର୍ଡ଼କୁ ପୁରାପୁରି ମୂଳକୁ ଫେରାଇବା ଏହି ଉଇକିରେ ଅଚଳ କରାଯାଇଅଛି ।',
+'passwordreset-emaildisabled' => 'ଏହି ଉଇକିରେ ଇମେଲ ସୁବିଧା ଅଚଳ କରାଯାଇଅଛି ।',
'passwordreset-pretext' => '{{PLURAL:$1||ତଳେ ଥିବା ତଥ୍ୟସମୂହରୁ କୌଣସି ଗୋଟିଏ ଦିଅନ୍ତୁ}}',
'passwordreset-username' => 'ବ୍ୟବହାରକାରୀଙ୍କ ନାମ:',
'passwordreset-domain' => 'ଡୋମେନ:',
ଆପଣ ନିଜ ପୁରୁଣା ପାସୱାର୍ଡ଼ଟି ଆଗପରି ବ୍ୟବହାର କରିପାରନ୍ତି ।',
'passwordreset-emailelement' => 'ଇଉଜର ନାମ: $1
ଅସ୍ଥାୟୀ ପାସୱାର୍ଡ଼: $2',
-'passwordreset-emailsent' => 'à¬\8fà¬\95 ମନà\87ପà¬\95ାà¬\87ବା à¬\87-ମେଲ ପଠାଇଦିଆଯାଇଅଛି ।',
-'passwordreset-emailsent-capture' => 'ତଳà\87 ଦିà¬\86ଯାà¬\87ଥିବା à¬à¬³à¬¿ ମନà\87ପà¬\95ାà¬\87ବା à¬\87-ମà\87ଲà¬\9fିà¬\8f ପଠାଦିà¬\86à¬\97ଲା ।',
+'passwordreset-emailsent' => 'à¬\8fà¬\95 ପାସà±à¬¾à¬°à\8dଡ଼ ପà\81ନà¬\83ସà\8dଥାପନ à¬\87ମେଲ ପଠାଇଦିଆଯାଇଅଛି ।',
+'passwordreset-emailsent-capture' => 'ତଳà\87 ଦà\87à¬\96ାଯାà¬\89ଥିବା à¬à¬³à¬¿, ପାସà±à¬¾à¬°à\8dଡ଼ ପà\81ନà¬\83ସà\8dଥାପନ à¬\87ମà\87ଲà¬\9fିà¬\8f ପଠାà¬\87ଦିà¬\86ଯାà¬\87à¬\9bି ।',
'passwordreset-emailerror-capture' => 'ଗୋଟିଏ ମନେପକାଇବା ଇ-ମେଲ ତିଆରି କରାଯାଇଥିଲା, ଯାହାକି ତଳେ ଅଛି, କିନ୍ତୁ ଏହାକୁ ବ୍ୟବହାରକାରୀକୁ ପଠାଇବାରେ ଅସଫଳ ହେଲା :$1',
# Special:ChangeEmail
'content-failed-to-parse' => '$1 ପ୍ରକାର ପାଇଁ $2 ଲେଖାକୁ ବର୍ଣ୍ଣନା କରିପାରିଲା ନାହିଁ: $3',
'invalid-content-data' => 'ଅବୈଧ ଆଧାର ତଥ୍ୟ',
'content-not-allowed-here' => '"$1" ବିଷୟଗୁଡିକ [[$2]]ପୃଷ୍ଠାରେ ରହିପାରିବ ନାହିଁ',
+'editwarning-warning' => 'ଏହି ପୃଷ୍ଠାକୁ ଛାଡ଼ି ଚାଲିଗଲେ ହୁଏ ତ ଆପଣ କରିଥିବା କିଛି ସମ୍ପାଦନା ହରାଇ ପାରନ୍ତି ।
+ଯଦି ଆପଣ ଲଗ ଇନ କରିଥାନ୍ତି ତେବେ ଆପଣଙ୍କ ପସନ୍ଦର "ସମ୍ପାଦନା" ଭାଗରେ ଏହି ଚେତାବନୀଟିକୁ ଅଚଳ କରିପାରିବେ ।',
# Content models
'content-model-wikitext' => 'ଉଇକିଟେକ୍ସଟ',
ଆପଣ ଏହି ଭିତରେ ଗୁଗଲ ଦେଖିପାରନ୍ତି ।
ଜାଣିରଖନ୍ତୁ ଯେ {{SITENAME}}ର ବିଷୟ ସୂଚି ପୁରାତନ ହୋଇଥାଇପାରେ ।',
-# Quickbar
-'qbsettings' => 'ସହଳ ପଟି (Quickbar)',
-'qbsettings-none' => 'କିଛି ନାହିଁ',
-'qbsettings-fixedleft' => 'ବାମକୁ ଥୟ କରାଗଲା',
-'qbsettings-fixedright' => 'ଡାହାଣକୁ ଥୟ କରାଗଲା',
-'qbsettings-floatingleft' => 'ବାମରେ ଭାସନ୍ତା',
-'qbsettings-floatingright' => 'ଡାହାଣରେ ଭାସନ୍ତା',
-'qbsettings-directionality' => 'ଆପଣଙ୍କ ଭାଷାର ବାମ-ଡାହାଣ ଲିଖନ ଶୈଳୀ ଅନୁସାରେ ସଜାଡ଼ି ଦିଆଗଲା',
-
# Preferences page
'preferences' => 'ପସନ୍ଦ',
'mypreferences' => 'ପସନ୍ଦ',
'http-read-error' => 'HTTP ପଢ଼ିବା ଭୁଲ ।',
'http-timed-out' => 'HTTP ଅନୁରୋଧ ମିଆଦ ପୁରିଗଲା ।',
'http-curl-error' => '$1 URL କୁ ପାଇବାରେ ବିଫଳ',
-'http-host-unreachable' => 'URLଟି ପାଇଲୁ ନାହିଁ ।',
'http-bad-status' => 'HTTP ଅନୁରୋଧ ବେଳେ କିଛି ଅସୁବିଧା ହେଲା : $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
ସେସବୁ ଅଧିକ ଉପଯୁକ୍ତ ପ୍ରସଙ୍ଗ ସହ ଯୋଡ଼ାହେବା ଉଚିତ ।<br />
[[MediaWiki:Disambiguationspage]] ସହ ଯୋଡ଼ାଥିବା ଛାଞ୍ଚ ବ୍ୟବହାର କରୁଥିଲେ ପୃଷ୍ଠାଟିଏକୁ ବହୁବିକଳ୍ପ ପୃଷ୍ଠା ବୋଲି କୁହାଯାଏ",
+'pageswithprop-submit' => 'ଯିବା',
+
'doubleredirects' => 'ଯୋଡ଼ା ପୁନପ୍ରେରଣ',
'doubleredirectstext' => 'ଏହି ପୃଷ୍ଠା ବାକି ବହୁବିକଳ୍ପ ପୃଷ୍ଠାମାନଙ୍କ ସହ ଯୋଡ଼ିଥାଏ ।
ପ୍ରତ୍ୟେକ ଧାଡ଼ିରେ ପ୍ରଥମ ଓ ଶେଷ ପୁନପ୍ରେରଣ ସହ ଯୋଡ଼ିବା ଲିଙ୍କ ରହିଥାଏ, ଆହୁରି ମଧ୍ୟ ଏଥିରେ ଦ୍ଵିତୀୟ ପୁନପ୍ରେରଣର ଲକ୍ଷ ସହ ଯୋଡ଼ିବାର ଲିଙ୍କ ଥାଏ , ଯାହାକି ସାଧାରଣତ "ପ୍ରକୃତ" ଲକ୍ଷ ପୃଷ୍ଠା ହୋଇଥାଏ, ଯାହାକୁ ପ୍ରଥମ ପୁନପ୍ରେରଣ ପୃଷ୍ଠା ଯୋଡ଼ିଥାଏ ।
'htmlform-submit' => 'ଦାଖଲକରିବା',
'htmlform-reset' => 'କରାଯାଇଥିବା ବଦଳ ପଛକୁ ଫେରାଇବେ',
'htmlform-selectorother-other' => 'ବାକି',
+'htmlform-no' => 'ନାହିଁ',
+'htmlform-yes' => 'ହଁ',
# SQLite database support
'sqlite-has-fts' => 'ପୁରା ଟେକ୍ସ୍ଟ ଖୋଜା ସହଯୋଗ ସହିତ $1',
'duration-centuries' => '$1 {{PLURAL:$1|century|centuries}}',
'duration-millennia' => '$1 {{PLURAL:$1|millennium|millennia}}',
+# Unknown messages
+'hours-ago' => '$1 {{PLURAL:$1|ଘଣ୍ଟା}} ଆଗରୁ',
+'minutes-ago' => '$1 {{PLURAL:$1|ମିନିଟ|ମିନିଟ}} ଆଗରୁ',
+'seconds-ago' => '$1 {{PLURAL:$1|ସେକେଣ୍ଡ|ସେକେଣ୍ଡ}} ଆଗରୁ',
);
'tog-shownumberswatching' => 'Цал архайæджы фарсмæ сæ цæст дарынц, уый равдис',
'tog-oldsig' => 'Ныры къухæрфыст:',
'tog-fancysig' => 'Сæвæрын къухæрфыст викитекстæй (æнæ хæдæвзæргæ æрвитæнæй)',
-'tog-externaleditor' => 'Архайын æддаг ивæнæй (æрмæст эксперттæн, домы сæрмагонд æвæрдтытæ компьютерыл. [//www.mediawiki.org/wiki/Manual:External_editors Лæмбынæг.])',
-'tog-externaldiff' => 'Архайын æндæр иртасæнæй (æрмæст эксперттæн, домы сæрмагонд æвæрдтытæ компьютерыл. [//www.mediawiki.org/wiki/Manual:External_editors Лæмбынæг.])',
'tog-showjumplinks' => 'Тагъд æрвитæнтæй пайда кæн',
'tog-uselivepreview' => 'Архайын тагъд разбакастæй (домы JavaScript) (эксперименталон)',
'tog-forceeditsummary' => 'Фæдзæхсæд иу мæ, кæд ивды афыст афтид уа',
'powersearch-field' => 'Агуырд',
'powersearch-toggleall' => 'Иууылдæр',
-# Quickbar
-'qbsettings' => 'Навигацион таг',
-'qbsettings-none' => 'Ма равдис',
-'qbsettings-fixedleft' => 'Галиуырдыгæй',
-'qbsettings-fixedright' => 'Рахизырдыгæй',
-'qbsettings-floatingleft' => 'Рахизырдыгæй ленккæнгæ',
-
# Preferences page
'preferences' => 'Уагæвæрдтæ',
'mypreferences' => 'Уагæвæрдтæ',
'spamprotectiontitle' => 'Спамы ныхмæ фильтр',
# Skin names
-'skinname-standard' => 'Стандартон',
-'skinname-nostalgia' => 'Æнкъард',
'skinname-cologneblue' => 'Кёльны æрхæндæг',
'skinname-monobook' => 'Моно-чиныг',
-'skinname-myskin' => 'Мæхи',
-'skinname-chick' => 'Карк',
# Browsing diffs
'previousdiff' => '← Зæронддæр ивд',
$messages = array(
# User preference toggles
-'tog-underline' => 'ਲਿੰà¨\95 ਹà©\87ਠਾà¨\82-ਲਾà¨\88ਨ:',
-'tog-justify' => 'ਪà©\88ਰਾà¨\97ਰਾਫ਼ à¨\87à¨\95ਸਾਰ',
-'tog-hideminor' => 'ਤਾà¨\9c਼ਾ ਬਦਲਾà¨\85 ਵਿੱà¨\9a à¨\9bà©\8bà¨\9fà©\80à¨\86à¨\82 ਸà©\8bਧਾà¨\82 à¨\93ਹਲà©\87',
+'tog-underline' => 'à¨\95à©\9cà©\80à¨\86à¨\82 à¨\85ਧà©\8bਰà©\87à¨\96ਨ:',
+'tog-justify' => 'ਪਰਿੱà¨\9bà©\87ਦ ਸਮਾਨ à¨\95ਰà©\8b',
+'tog-hideminor' => 'ਹਾਲ â\80\99à¨\9a ਹà©\8bà¨\8f ਬਦਲਾà¨\85 ਵਿੱà¨\9a à¨\9bà©\8bà¨\9fà©\87 ਬਦਲਾà¨\85 à¨\9bà©\81ਪਾà¨\93',
'tog-hidepatrolled' => 'ਤਾਜ਼ਾ ਬਦਲਾਅ ਵਿੱਚ ਜਾਂਚ ਕੀਤੀਆਂ ਸੋਧਾਂ ਓਹਲੇ',
'tog-newpageshidepatrolled' => 'ਨਵੀਂ ਸਫ਼ਾ ਸੂਚੀ ਵਿੱਚੋਂ ਨਿਗਰਾਨੀ ਸਫ਼ੇ ਓਹਲੇ ਕਰੋ',
'tog-extendwatchlist' => 'ਕੇਵਲ ਹਾਲਿਆ ਹੀ ਨਹੀਂ, ਸਗੋਂ ਸਾਰੇ ਪਰਿਵਰਤਨਾਂ ਨੂੰ ਵਿਖਾਉਣ ਲਈ ਧਿਆਨਸੂਚੀ ਨੂੰ ਵਿਸਥਾਰਿਤ ਕਰੋ',
'tog-showtoolbar' => 'ਸੋਧ ਟੂਲਬਾਰ ਵੇਖੋ (JavaScript ਚਾਹੀਦੀ ਹੈ)',
'tog-editondblclick' => 'ਦੋ ਵਾਰ ਕਲਿੱਕ ਕਰਨ ਨਾਲ ਸਫ਼ੇ ਸੋਧੋ (ਜਾਵਾਸਕ੍ਰਿਪਟ ਚਾਹੀਦੀ ਹੈ)',
'tog-editsection' => '[ਸੋਧ] ਲਿੰਕ ਰਾਹੀਂ ਭਾਗ ਸੋਧ ਕਰਨਾ ਚਾਲੂ',
-'tog-editsectiononrightclick' => 'à¨à¨¾à¨\97 à¨\9fਾà¨\88à¨\9fਲ à¨\89ੱਤà©\87 ਸੱà¨\9cà©\87 à¨\95ਲਿੱà¨\95 ਨਾਲ à¨à¨¾à¨\97 ਸà©\8bਧ à¨\95ਰਨਾ ਯà©\8bà¨\97 (à¨\9cਾਵਾਸà¨\95à©\8dਰਿਪà¨\9f à¨\9aਾਹà©\80ਦੀ ਹੈ)',
-'tog-showtoc' => 'ਤਤà¨\95ਰਾ ਵà©\87à¨\96ਾà¨\93 (3 ਤà©\8bà¨\82 ਵੱਧ ਸਿਰਲà©\87à¨\96ਾà¨\82 ਵਾਲà©\87 ਸਫ਼ਿਆਂ ਲਈ)',
+'tog-editsectiononrightclick' => 'à¨à¨¾à¨\97 ਸਿਰਲà©\87à¨\96ਾà¨\82 ਤà©\87 ਸੱà¨\9cà©\80 à¨\95ਲਿੱà¨\95 ਦà©\81à¨\86ਰਾ ਸà©\8bਧ ਯà©\8bà¨\97 à¨\95ਰà©\8b (à¨\9cਾਵਾ ਸà¨\95à©\8dਰਿਪà¨\9f ਲà©\8bà©\9cà©\80à¨\82ਦੀ ਹੈ)',
+'tog-showtoc' => 'ਤਤà¨\95ਰਾ ਵà©\87à¨\96ਾà¨\93 (3 ਤà©\8bà¨\82 ਵੱਧ ਸਿਰਲà©\87à¨\96ਾà¨\82 ਵਾਲà©\87 ਪੰਨਿਆਂ ਲਈ)',
'tog-rememberpassword' => 'ਇਸ ਬਰਾਊਜ਼ਰ ਉੱਤੇ ਮੇਰਾ ਲਾਗਇਨ ਯਾਦ ਰੱਖੋ ($1 {{PLURAL:$1|ਦਿਨ|ਦਿਨਾਂ}} ਲਈ ਵੱਧ ਤੋਂ ਵੱਧ)',
-'tog-watchcreations' => 'ਮà©\87ਰà©\87 ਵਲà©\8bà¨\82 ਬਣਾà¨\8f à¨\97à¨\8f ਸਫ਼ਿà¨\86à¨\82 à¨\85ਤà©\87 à¨\85ੱਪਲà©\8bਡ à¨\95à©\80ਤà©\80à¨\86à¨\82 ਫਾà¨\88ਲਾà¨\82 ਮà©\87ਰà©\80 ਨਿà¨\97ਰਾਨ-ਸੂਚੀ ਵਿੱਚ ਪਾਓ',
-'tog-watchdefault' => 'ਮà©\87ਰà©\87 ਵੱਲà©\8bà¨\82 ਸà©\8bਧà©\87 à¨\97à¨\8f ਸਫ਼ਿà¨\86à¨\82 à¨\85ਤà©\87 ਫਾà¨\87ਲਾà¨\82 ਮà©\87ਰà©\80 ਨਿà¨\97ਰਾਨ-ਸੂਚੀ ਵਿੱਚ ਪਾਓ',
-'tog-watchmoves' => 'ਮà©\87ਰà©\87 ਵੱਲà©\8bà¨\82 ਹਿਲਾà¨\8f à¨\97à¨\8f ਪੰਨà©\87 à¨\85ਤà©\87 ਫਾà¨\87ਲਾà¨\82 ਮà©\87ਰà©\80 ਨਿà¨\97ਰਾਨ-ਸੂਚੀ ਵਿੱਚ ਪਾਓ',
-'tog-watchdeletion' => 'ਮà©\87ਰà©\87 ਵਲà©\8bà¨\82 ਹà¨\9fਾà¨\8f à¨\97à¨\8f ਸਫ਼à©\87 à¨\85ਤà©\87 ਫਾà¨\87ਲਾà¨\82 ਮà©\87ਰà©\80 ਨਿà¨\97ਰਾਨ-ਸà©\82à¨\9aà©\80 ਵਿਚ ਪਾਓ',
-'tog-minordefault' => 'ਸਾਰà©\80à¨\86à¨\82 ਸà©\8bਧਾà¨\82 ਨà©\82à©° ਮà©\82ਲ ਰà©\82ਪ ਵਿੱà¨\9a à¨\9bà©\8bà¨\9fà©\80à¨\86à¨\82 ਮੰਨà©\8b',
+'tog-watchcreations' => 'ਮà©\87ਰà©\87 ਵਲà©\8bà¨\82 ਬਣਾà¨\8f à¨\97à¨\8f ਪੰਨà©\87 à¨\85ਤà©\87 à¨\85ੱਪਲà©\8bਡ à¨\95à©\80ਤà©\80à¨\86à¨\82 ਫਾà¨\88ਲਾà¨\82 ਮà©\87ਰà©\80 ਧਿà¨\86ਨਸੂਚੀ ਵਿੱਚ ਪਾਓ',
+'tog-watchdefault' => 'ਮà©\87ਰà©\87 ਵੱਲà©\8bà¨\82 ਸੰਪਾਦਤ à¨\97à¨\8f ਪੰਨà©\87 à¨\85ਤà©\87 ਫਾà¨\88ਲਾà¨\82 ਮà©\87ਰà©\80 ਧਿà¨\86ਨਸੂਚੀ ਵਿੱਚ ਪਾਓ',
+'tog-watchmoves' => 'ਮà©\87ਰà©\87 ਵੱਲà©\8bà¨\82 ਸਥਾਨਾà¨\82ਤਰਤ ਪੰਨà©\87 à¨\85ਤà©\87 ਫਾà¨\88ਲਾà¨\82 ਮà©\87ਰà©\80 ਧਿà¨\86ਨਸੂਚੀ ਵਿੱਚ ਪਾਓ',
+'tog-watchdeletion' => 'ਮà©\87ਰà©\87 ਵਲà©\8bà¨\82 ਹà¨\9fਾà¨\8f à¨\97à¨\8f ਪੰਨà©\87 à¨\85ਤà©\87 ਫਾà¨\88ਲਾà¨\82 ਮà©\87ਰà©\80 ਧਿà¨\86ਨਸà©\82à¨\9aà©\80 ਵਿੱਚ ਪਾਓ',
+'tog-minordefault' => 'ਮà©\87ਰà©\87 ਸਾਰà©\87 ਸੰਪਾਦਨ à¨\9bà©\8bà¨\9fà©\87 ਬਦਲਾà¨\85 ਹਨ',
'tog-previewontop' => 'ਸੋਧ ਬਾਕਸ ਤੋਂ ਪਹਿਲਾਂ ਝਲਕ ਵੇਖਾਓ',
'tog-previewonfirst' => 'ਪਹਿਲੀ ਸੋਧ ਉੱਤੇ ਝਲਕ ਵੇਖਾਓ',
'tog-nocache' => 'ਬਰਾਊਜ਼ਰ ਸਫ਼ਾ ਕੈਸ਼ ਕਰਨਾ ਬੰਦ ਕਰੋ',
'january' => 'ਜਨਵਰੀ',
'february' => 'ਫਰਵਰੀ',
'march' => 'ਮਾਰਚ',
-'april' => 'ਅਪਰੈਲ',
+'april' => 'à¨\85ਪà©\8dਰà©\88ਲ',
'may_long' => 'ਮਈ',
'june' => 'ਜੂਨ',
'july' => 'ਜੁਲਾਈ',
'january-gen' => 'ਜਨਵਰੀ',
'february-gen' => 'ਫ਼ਰਵਰੀ',
'march-gen' => 'ਮਾਰਚ',
-'april-gen' => 'ਅਪਰੈਲ',
+'april-gen' => 'à¨\85ਪà©\8dਰà©\88ਲ',
'may-gen' => 'ਮਈ',
'june-gen' => 'ਜੂਨ',
'july-gen' => 'ਜੁਲਾਈ',
'jan' => 'ਜਨ',
'feb' => 'ਫ਼ਰ',
'mar' => 'ਮਾਰ',
-'apr' => 'ਅਪ',
+'apr' => 'ਅਪ੍ਰੈ॰',
'may' => 'ਮਈ',
'jun' => 'ਜੂਨ',
'jul' => 'ਜੁਲਾ',
'cancel' => 'ਰੱਦ ਕਰੋ',
'moredotdotdot' => '...ਹੋਰ',
'morenotlisted' => '....ਹੋਰ ਸੂਚੀਬੱਧ ਨਹੀਂ',
-'mypage' => 'ਸਫ਼ਾ',
+'mypage' => 'ਮà©\87ਰਾ ਪੰਨਾ',
'mytalk' => 'ਚਰਚਾ',
'anontalk' => 'ਇਸ IP ਲਈ ਗੱਲ-ਬਾਤ',
'navigation' => 'ਨੇਵੀਗੇਸ਼ਨ',
# Cologne Blue skin
'qbfind' => 'ਖੋਜ',
'qbbrowse' => 'ਝਲਕ',
-'qbedit' => 'ਸà©\8bਧ',
-'qbpageoptions' => 'à¨\87ਹ ਸਫ਼ਾ',
-'qbmyoptions' => 'ਮà©\87ਰà©\87 ਸਫ਼ੇ',
-'qbspecialpages' => 'à¨\96ਾਸ ਸਫ਼ੇ',
-'faq' => 'ਸਵਾਲ-à¨\9cਵਾਬ',
-'faqpage' => 'Project:ਸਵਾਲ-à¨\9cਵਾਬ',
+'qbedit' => 'ਸੰਪਾਦਨ',
+'qbpageoptions' => 'à¨\87ਹ ਪੰਨਾ',
+'qbmyoptions' => 'ਮà©\87ਰà©\87 ਪੰਨੇ',
+'qbspecialpages' => 'ਵਿਸ਼à©\87ਸ਼ ਪੰਨੇ',
+'faq' => 'à¨\85à¨\95ਸਰ ਪà©\81ੱà¨\9bà©\87 à¨\9cਾਣ ਵਾਲà©\87 ਪà©\8dਰਸ਼ਨ',
+'faqpage' => 'Project:ਪà©\8dਰਸ਼ਨ-à¨\89ੱਤਰ',
# Vector skin
'vector-action-addsection' => 'ਵਿਸ਼ਾ ਜੋੜੋ',
'vector-action-delete' => 'ਹਟਾਓ',
-'vector-action-move' => 'à¨à©\87à¨\9cà©\8b',
+'vector-action-move' => 'ਸਥਾਨਾà¨\82ਤਰਨ',
'vector-action-protect' => 'ਸੁਰੱਖਿਆ',
'vector-action-undelete' => 'ਹਟਾਉਣਾ-ਵਾਪਸ',
'vector-action-unprotect' => 'ਸੁਰੱਖਿਆ ਬਦਲੋ',
'vector-view-view' => 'ਪੜ੍ਹੋ',
'vector-view-viewsource' => 'ਸਰੋਤ ਵੇਖੋ',
'actions' => 'ਕਾਰਵਾਈਆਂ',
-'namespaces' => 'ਨਾà¨\82-ਥਾà¨\82',
+'namespaces' => 'ਨਾਮਸਥਾਨ',
'variants' => 'ਬਦਲ',
-'navigation-heading' => 'ਨà©\87ਵà©\80à¨\97à©\87ਸ਼ਨ ਮà©\87ਨà©\82',
+'navigation-heading' => 'ਦਿà¨\95à¨\9aਾਲਨ ਸà©\82à¨\9aà©\80',
'errorpagetitle' => 'ਗਲਤੀ',
'returnto' => '$1 ’ਤੇ ਵਾਪਸ ਜਾਓ।',
'tagline' => '{{SITENAME}} ਤੋਂ',
-'help' => 'ਮੱਦਦ',
+'help' => 'ਮਦਦ',
'search' => 'ਖੋਜ',
'searchbutton' => 'ਖੋਜ',
'go' => 'ਜਾਓ',
'talk' => 'ਚਰਚਾ',
'views' => 'ਵੇਖੋ',
'toolbox' => 'ਸੰਦ ਬਕਸਾ',
-'userpage' => 'ਯà©\82à¨\9c਼ਰ ਸਫ਼ਾ ਵੇਖੋ',
+'userpage' => 'ਵਰਤà©\8bà¨\82à¨\95ਾਰ ਪੰਨਾ ਵੇਖੋ',
'projectpage' => 'ਪ੍ਰੋਜੈਕਟ ਸਫ਼ਾ ਵੇਖੋ',
'imagepage' => 'ਫਾਇਲ ਸਫ਼ਾ ਵੇਖੋ',
-'mediawikipage' => 'ਸà©\81ਨà©\87ਹਾ ਸਫ਼ਾ ਵੇਖੋ',
-'templatepage' => 'à¨\9fà©\88ਪਲà©\87à¨\9f ਸਫ਼ਾ ਵੇਖੋ',
+'mediawikipage' => 'ਸà©\81ਨà©\87ਹਾ ਪà©\87à¨\9c ਵੇਖੋ',
+'templatepage' => 'ਸਾà¨\82à¨\9aਾ ਪੰਨਾ ਵੇਖੋ',
'viewhelppage' => 'ਮੱਦਦ ਸਫ਼ਾ ਵੇਖੋ',
'categorypage' => 'ਕੈਟੈਗਰੀ ਸਫ਼ਾ ਵੇਖੋ',
'viewtalkpage' => 'ਚਰਚਾ ਵੇਖੋ',
# Edit pages
'summary' => 'ਸਾਰ:',
'subject' => 'ਵਿਸ਼ਾ/ਹੈੱਡਲਾਈਨ:',
-'minoredit' => 'à¨\87ਹ à¨\9bà©\8bà¨\9fà©\80 ਸà©\8bਧ ਹੈ',
-'watchthis' => 'à¨\87ਹ ਸਫ਼à©\87 ਦà©\80 ਨਿà¨\97ਰਾਨà©\80 à¨\95ਰੋ',
+'minoredit' => 'à¨\87ਹ à¨\87ੱà¨\95 à¨\9bà©\8bà¨\9fਾ ਬਦਲਾà¨\85 ਹੈ',
+'watchthis' => 'à¨\87ਸ ਪੰਨà©\87 â\80\99ਤà©\87 ਧਿà¨\86ਨ ਰੱà¨\96ੋ',
'savearticle' => 'ਸਫ਼ਾ ਸੰਭਾਲੋ',
'preview' => 'ਝਲਕ',
'showpreview' => 'ਝਲਕ ਵੇਖਾਓ',
'note' => "'''ਨੋਟ:'''",
'previewnote' => "'''ਯਾਦ ਰੱਖੋ, ਇਹ ਕੇਵਲ ਇੱਕ ਝਲਕ ਹੈ।'''
ਤੁਹਾਡੇ ਬਦਲਾਵ ਹੁਣੇ ਤੱਕ ਸਾਂਭੇ ਨਹੀਂ ਗਏ ਹਨ!",
-'continue-editing' => 'ਸà©\8bਧ à¨\96à©\87ਤਰ à¨\89ੱਤà©\87 ਜਾਓ',
+'continue-editing' => 'ਸੰਪਾਦਨ à¨\96à©\87ਤਰ ਨà©\82à©° ਜਾਓ',
'previewconflict' => 'ਇਹ ਝਲਕ ਲਿਖਤ ਦਾ ਓਹ ਅਕਸ ਪੇਸ਼ ਕਰਦੀ ਹੈ ਜਿਵੇਂ ਓਹ ਤੁਹਾਡੇ ਸਾਂਭੇ ਜਾਣ ਤੋਂ ਬਾਅਦ ਦਿੱਸੇਗਾ।',
'editing' => '$1 ਸੋਧ ਜਾਰੀ',
'creating' => '$1 ਬਣਾਇਆ ਜਾ ਰਿਹਾ ਹੈ',
$3|'''1''' ਨਤੀਜਾ|'''$3''' ਨਤੀਜੇ}} ਵਖਾਓ।",
'showingresultsheader' => "'''$4''' ਵਾਸਤੇ {{PLURAL:$5|'''$3''' ਵਿੱਚੋਂ '''$1''' ਨਤੀਜੇ|'''$3''' ਵਿੱਚੋਂ '''$1 - $2''' ਨਤੀਜੇ}}",
'search-nonefound' => 'ਤੁਹਾਡੀ ਖੋਜ ਨਾਲ ਮੇਲ ਖਾਂਦੇ ਕੋਈ ਨਤੀਜੇ ਨਹੀਂ ਮਿਲੇ।',
-'powersearch' => 'ਤà¨\95ਨà©\80à¨\95à©\80 à¨\96à©\8bà¨\9c',
+'powersearch' => 'ਖੋਜ',
'powersearch-legend' => 'ਤਕਨੀਕੀ ਖੋਜ',
'powersearch-ns' => 'ਨੇਮ-ਸਪੇਸ ਵਿੱਚ ਖੋਜ:',
'powersearch-redir' => 'ਰੀ-ਡਿਰੈਕਟ ਲਿਸਟ',
'prefs-beta' => 'ਬੀਟਾ ਫੀਚਰ',
'prefs-datetime' => 'ਮਿਤੀ ਅਤੇ ਸਮਾਂ',
'prefs-labs' => 'ਲੈਬ ਫੀਚਰ',
-'prefs-user-pages' => 'ਯà©\82à¨\9c਼ਰ ਸਫ਼à©\87',
+'prefs-user-pages' => 'ਵਰਤà©\8bà¨\82à¨\95ਾਰ ਪੰਨਾ',
'prefs-personal' => 'ਯੂਜ਼ਰ ਪਰੋਫਾਇਲ',
'prefs-rc' => 'ਤਾਜ਼ਾ ਬਦਲਾਅ',
'prefs-watchlist' => 'ਨਿਗਰਾਨ-ਸੂਚੀ',
'prefs-watchlist-token' => 'ਨਿਗਰਾਨੀ-ਲਿਸਟ ਟੋਕਨ:',
'prefs-misc' => 'ਫੁਟਕਲ',
'prefs-resetpass' => 'ਪਾਸਵਰਡ ਬਦਲੋ',
-'prefs-changeemail' => 'à¨\88-ਮà©\87ਲ ਸਿਰਨਾਵਾà¨\82 ਬਦਲੋ',
-'prefs-setemail' => 'à¨\88-ਮà©\87ਲ ਸਿਰਨਾਵਾà¨\82 ਸੈੱਟ ਕਰੋ',
+'prefs-changeemail' => 'à¨\88-ਮà©\87ਲ ਪਤਾ ਬਦਲੋ',
+'prefs-setemail' => 'à¨\88-ਮà©\87ਲ ਪਤਾ ਸੈੱਟ ਕਰੋ',
'prefs-email' => 'ਈਮੇਲ ਚੋਣਾਂ',
'prefs-rendering' => 'ਦਿੱਖ',
'saveprefs' => 'ਸੰਭਾਲੋ',
'resetprefs' => 'ਰੀ-ਸੈੱਟ',
'restoreprefs' => 'ਸਭ ਮੂਲ ਸੈਟਿੰਗ ਮੁੜ-ਸਟੋਰ ਕਰੋ',
-'prefs-editing' => 'ਸà©\8bਧ',
+'prefs-editing' => 'ਸੰਪਾਦਨ',
'prefs-edit-boxsize' => 'ਸੋਧ ਖਿੜਕੀ ਦਾ ਅਕਾਰ',
'rows' => 'ਕਤਾਰਾਂ:',
'columns' => 'ਕਾਲਮ:',
'timezoneregion-arctic' => 'ਆਰਕਟਿਕ',
'timezoneregion-asia' => 'ਏਸ਼ੀਆ',
'timezoneregion-atlantic' => 'ਅੰਧ ਮਹਾਂਸਾਗਰ',
-'timezoneregion-australia' => 'ਆਸਟਰੇਲੀਆ',
+'timezoneregion-australia' => 'à¨\86ਸà¨\9fà©\8dਰà©\87ਲà©\80à¨\86',
'timezoneregion-europe' => 'ਯੂਰਪ',
'timezoneregion-indian' => 'ਹਿੰਦ ਮਹਾਂਸਾਗਰ',
'timezoneregion-pacific' => 'ਪ੍ਰਸ਼ਾਂਤ ਮਹਾਂਸਾਗਰ',
'yourrealname' => 'ਅਸਲੀ ਨਾਮ:',
'yourlanguage' => 'ਭਾਸ਼ਾ:',
'yourvariant' => 'ਸਮੱਗਰੀ ਭਾਸ਼ਾ ਰੂਪ:',
-'yournick' => 'ਨਵà©\87à¨\82 ਦਸਤà¨\96ਤ:',
+'yournick' => 'à¨\9bà©\8bà¨\9fਾ ਨਾà¨\82:',
'prefs-help-signature' => 'ਗੱਲ-ਬਾਤ ਸਫ਼ਿਆਂ ਉੱਤੇ ਟਿੱਪਣੀਆਂ ਦੇ ਆਖ਼ਰ ਵਿਚ "<nowiki>~~~~</nowiki>" ਲਾਓ ਜੋ ਤੁਹਾਡੇ ਦਸਤਖ਼ਤ ਅਤੇ ਵਕਤ ਦੀ ਮੋਹਰ ਵਿਚ ਤਬਦੀਲ ਹੋ ਜਾਵੇਗਾ।',
'badsiglength' => 'ਦਸਤਖ਼ਤ ਬਹੁਤ ਲੰਬਾ ਹੋ ਗਿਆ ਹੈ। ਇਹ {{PLURAL:$1|ਅੱਖਰ|ਅੱਖਰਾਂ}} ਤੋਂ ਲੰਬਾ ਨਹੀਂ ਹੋਣਾ ਚਾਹੀਦਾ।',
'yourgender' => 'ਲਿੰਗ:',
'prefs-help-email' => 'ਤੁਹਾਡੀ ਮਰਜੀ ਹੈ ਈਮੇਲ ਪਤਾ ਦਿਓ ਜਾਂ ਨਾ ਦਿਓ ਪਰ ਪਾਸਵਰਡ ਭੁੱਲ ਜਾਣ ਤੇ ਨਵਾਂ ਪਾਸਵਰਡ ਹਾਸਲ ਕਰਨ ਲਈ ਇਹ ਜਰੂਰੀ ਹੈ।',
'prefs-help-email-others' => 'ਤੁਸੀਂ ਇਹ ਵੀ ਚੁਣ ਸਕਦੇ ਹੋ ਕਿ ਤੁਹਾਡੇ ਵਰਤੋਂਕਾਰ ਜਾਂ ਚਰਚਾ ਪੰਨੇ ਤੋਂ ਹੋਰ ਵਰਤੋਂਕਾਰ ਤੁਹਾਨੂੰ ਈ-ਮੇਲ ਭੇਜ ਸਕਣ?
ਜਦੋਂ ਹੋਰ ਵਰਤੋਂਕਾਰ ਤੁਹਾਨੂੰ ਈ-ਮੇਲ ਭੇਜਦੇ ਹਨ ਤਾਂ ਤੁਹਾਡਾ ਈ-ਮੇਲ ਪਤਾ ਜ਼ਾਹਰ ਨਹੀਂ ਕੀਤਾ ਜਾਂਦਾ।',
-'prefs-help-email-required' => 'à¨\88-ਮà©\87ਲ ਸਿਰਨਾਵਾà¨\82 ਚਾਹੀਦਾ ਹੈ।',
+'prefs-help-email-required' => 'à¨\88-ਮà©\87ਲ ਪਤਾ ਚਾਹੀਦਾ ਹੈ।',
'prefs-info' => 'ਮੁੱਢਲੀ ਜਾਣਕਾਰੀ',
'prefs-i18n' => 'ਅੰਤਰਰਾਸ਼ਟਰੀਕਰਨ',
'prefs-signature' => 'ਦਸਤਖ਼ਤ',
-'prefs-dateformat' => 'ਮਿਤà©\80 à¨\85ੰਦਾà¨\9c਼',
+'prefs-dateformat' => 'ਮਿਤà©\80 ਸ਼à©\88ਲà©\80',
'prefs-advancedediting' => 'ਤਕਨੀਕੀ ਚੋਣਾਂ',
'prefs-advancedrc' => 'ਤਕਨੀਕੀ ਚੋਣਾਂ',
'prefs-advancedrendering' => 'ਤਕਨੀਕੀ ਚੋਣਾਂ',
'prefs-diffs' => 'ਫ਼ਰਕ',
# User preference: email validation using jQuery
-'email-address-validity-valid' => 'à¨\88-ਮà©\87ਲ ਸਿਰਨਾਵਾà¨\82 ਸਹੀ ਲਗਦਾ ਹੈ',
+'email-address-validity-valid' => 'à¨\88-ਮà©\87ਲ ਪਤਾ ਸਹੀ ਲਗਦਾ ਹੈ',
'email-address-validity-invalid' => 'ਸਹੀ ਈ-ਮੇਲ ਪਤਾ ਦਾਖ਼ਲ ਕਰੋ',
# User rights
# Groups
'group' => 'ਗਰੁੱਪ:',
-'group-user' => 'ਯà©\82à¨\9c਼ਰ',
+'group-user' => 'ਵਰਤà©\8bà¨\82à¨\95ਾਰ',
'group-autoconfirmed' => 'ਖ਼ੁਦ-ਤਸਦੀਕਸ਼ੁਦਾ ਮੈਂਬਰ',
'group-bot' => 'ਬੋਟ',
'group-sysop' => 'ਪਰਸ਼ਾਸ਼ਕ',
'group-all' => '(ਸਭ)',
-'group-user-member' => '{{GENDER:$1|ਯà©\82à¨\9c਼ਰ}}',
+'group-user-member' => '{{GENDER:$1|ਵਰਤà©\8bà¨\82à¨\95ਾਰ}}',
'group-bot-member' => 'ਬੋਟ',
-'grouppage-user' => '{{ns:project}}:ਯà©\82à¨\9c਼ਰ',
+'grouppage-user' => '{{ns:project}}:ਵਰਤà©\8bà¨\82à¨\95ਾਰ',
# Rights
'right-read' => 'ਸਫ਼ੇ ਪੜ੍ਹਨਾ',
'right-upload_by_url' => 'URL ਤੋਂ ਫਾਇਲਾਂ ਅੱਪਲੋਡ ਕਰੋ',
'right-autoconfirmed' => 'ਨੀਮ-ਸੁਰੱਖਿਅਤ ਸਫ਼ਿਆਂ ਨੂੰ ਸੋਧਣਾ',
'right-delete' => 'ਸਫ਼ੇ ਹਟਾਓ',
-'right-bigdelete' => 'ਵੱਡà©\87 à¨\85ਤà©\80ਤਾà¨\82 ਵਾਲ਼à©\87 ਸਫ਼ੇ ਹਟਾਉਣੇ',
-'right-browsearchive' => 'ਹà¨\9fਾà¨\8f à¨\97à¨\8f ਸਫ਼ੇ ਖੋਜਣਾ',
+'right-bigdelete' => 'ਵੱਡà©\87 à¨\87ਤਿਹਾਸ ਵਾਲà©\87 ਪੰਨੇ ਹਟਾਉਣੇ',
+'right-browsearchive' => 'ਹà¨\9fਾà¨\8f à¨\97à¨\8f ਪੰਨੇ ਖੋਜਣਾ',
'right-undelete' => 'ਸਫ਼ੇ ਨੂੰ ਅਣ-ਮਿਟਾਇਆ ਕਰਨਾ',
'right-suppressionlog' => 'ਪ੍ਰਾਈਵੇਟ ਚਿੱਠੇ ਵੇਖਣਾ',
'right-block' => 'ਦੂਜੇ ਮੈਂਬਰਾਂ ਦੇ ਸੋਧ ਕਰਨ ਤੇ ਪਾਬੰਦੀ ਲਾਉਣੀ',
'rightslogtext' => 'ਇਹ ਮੈਂਬਰ ਹੱਕਾਂ ਵਿਚ ਹੋਈਆਂ ਤਬਦੀਲੀਆਂ ਦਾ ਚਿੱਠਾ ਹੈ।',
# Associated actions - in the sentence "You do not have permission to X"
-'action-read' => 'à¨\87ਹ ਸਫ਼ਾ ਪà©\9cà©\8dਹà©\8b',
+'action-read' => 'à¨\87ਹ ਪੰਨਾ ਪà©\9cà©\8dਹਨ',
'action-edit' => 'ਇਹ ਪੰਨੇ ਨੂੰ ਸੰਪਾਦਿਤ ਕਰਨ',
-'action-createpage' => 'ਸਫ਼à©\87 ਬਣਾà¨\93',
+'action-createpage' => 'ਪੰਨà©\87 ਬਣਾà¨\89ਣ',
'action-createtalk' => 'ਚਰਚਾ ਸਫ਼ੇ ਬਣਾਉਣ',
-'action-createaccount' => 'à¨\87ਹ ਯà©\82à¨\9c਼ਰ à¨\96ਾਤਾ ਬਣਾà¨\93',
+'action-createaccount' => 'ਵਰਤà©\8bà¨\82à¨\95ਾਰ à¨\96ਾਤਾ ਬਣਾà¨\89ਣ',
'action-minoredit' => 'ਇਹ ਸੋਧ ਨੂੰ ਛੋਟੀ ਤੌਰ ਉੱਤੇ ਮੰਨੋ',
'action-move' => 'ਇਹ ਸਫ਼ਾ ਭੇਜੋ',
'action-move-subpages' => 'ਇਹ ਸਫ਼ਾ ਤੇ ਇਸ ਦੇ ਅਧੀਨ-ਸਫ਼ਿਆਂ ਨੂੰ ਭੇਜੋ',
'action-reupload-shared' => 'ਇਹ ਫਾਇਲ ਨੂੰ ਸਾਂਝੀ ਕੀਤੀ ਰਿਪੋਜ਼ਟਰੀ ਉੱਤੇ ਲਿਖੋ',
'action-upload_by_url' => 'ਇਹ ਫਾਇਲ ਨੂੰ URL ਤੋਂ ਅੱਪਲੋਡ ਕਰੋ',
'action-writeapi' => 'ਲਿਖਣ API ਵਰਤੋਂ',
-'action-delete' => 'à¨\87ਹ ਸਫ਼ਾ ਹਟਾਓ',
-'action-deleterevision' => 'à¨\87ਹ ਰà©\80ਵਿà¨\9c਼ਨ ਹà¨\9fਾà¨\93',
+'action-delete' => 'à¨\87ਹ ਪੰਨਾ ਹਟਾਓ',
+'action-deleterevision' => 'ਇਹ ਰੀਵਿਜਨ ਹਟਾਓ',
'action-deletedhistory' => 'ਇਸ ਸਫ਼ੇ ਦਾ ਮਿਟਾਇਆ ਅਤੀਤ ਵੇਖਣ',
'action-browsearchive' => 'ਮਿਟਾਏ ਸਫ਼ੇ ਖੋਜਣ',
'action-undelete' => 'ਇਹ ਸਫ਼ਾ ਅਣ-ਮਿਟਿਆ ਕਰਨ',
# Recent changes
'nchanges' => '$1 {{PLURAL:$1|ਬਦਲਾਅ}}',
-'recentchanges' => 'ਤਾà¨\9c਼ਾ ਬਦਲਾਅ',
-'recentchanges-legend' => 'ਤਾà¨\9c਼ਾ ਬਦਲਾà¨\85 à¨\9aà©\8bਣਾà¨\82',
+'recentchanges' => 'ਹਾਲ â\80\99à¨\9a ਹà©\8bà¨\8f ਬਦਲਾਅ',
+'recentchanges-legend' => 'ਹਾਲ ਦà©\87 ਪਰਿਵਰਤਨ ਸਬੰਧà©\80 ਵਿà¨\95ਲਪ',
'recentchanges-summary' => 'ਇਸ ਵਿਕੀ ’ਤੇ ਹੋਈਆਂ ਸਭ ਤੋਂ ਨਵੀਆਂ ਤਬਦੀਲੀਆਂ ਇਸ ਸਫ਼ੇ ’ਤੇ ਵੇਖੋ।',
'recentchanges-feed-description' => 'ਇਸ ਵਿਕੀ ’ਤੇ ਹਾਲ ‘ਚ ਹੋਏ ਬਦਲਾਵ ਇਸ ਫ਼ੀਡ ’ਚ ਵੇਖੀਆਂ ਜਾ ਸਕਦੀਆਂ ਹਨ।',
-'recentchanges-label-newpage' => 'à¨\87ਹ ਸà©\8bਧ ਨਾਲ ਨਵਾà¨\82 ਸਫ਼ਾ ਬਣਾਇਆ ਗਿਆ',
-'recentchanges-label-minor' => 'à¨\87ਹ à¨\9bà©\8bà¨\9fà©\80 ਸà©\8bਧ ਹੈ',
-'recentchanges-label-bot' => 'à¨\87ਹ ਸà©\8bਧ ਬà©\8bà¨\9f ਵਲà©\8bà¨\82 à¨\95à©\80ਤà©\80 à¨\97à¨\88 ਹà©\88',
+'recentchanges-label-newpage' => 'à¨\87ਹ ਸੰਪਾਦਨ ਨਾਲ ਨਵਾà¨\82 ਪੰਨਾ ਬਣਾਇਆ ਗਿਆ',
+'recentchanges-label-minor' => 'à¨\87ਹ à¨\87ੱà¨\95 à¨\9bà©\8bà¨\9fਾ ਸੰਪਾਦਨ ਹੈ',
+'recentchanges-label-bot' => 'à¨\87ਹ ਸੰਪਾਦਨ à¨\87ੱà¨\95 ਬà©\8bà¨\9fਾ ਦà©\81à¨\86ਰਾ à¨\95à©\80ਤਾ à¨\97ਿà¨\86 ਸà©\80',
'recentchanges-label-unpatrolled' => 'ਇਹ ਫੇਰ-ਬਦਲ ਹਾਲੇ ਵੇਖਿਆ ਨਹੀਂ ਗਿਆ',
'rcnote' => "$4, $5 ਤੱਕ ਆਖਰੀ {{PLURAL:$2|ਦਿਨ|'''$2''' ਦਿਨਾਂ}} ਵਿੱਚ {{PLURAL:$1|'''1''' ਬਦਲੀ ਹੋਈ ਹੈ।|'''$1''' ਬਦਲੀਆਂ ਹੋਈਆਂ ਹਨ।}}",
'rcnotefrom' => "'''$2''' ਤੱਕ ('''$1''' ਤੱਕ ਦਿੱਸਦੇ) ਬਦਲਾਵ ਹੇਠ ਦਿੱਤੀਆਂ ਹਨ।",
-'rclistfrom' => '$1 ਤà©\8bà¨\82 ਸ਼à©\81ਰà©\82 à¨\95ਰà¨\95à©\87 ਨਵà©\80à¨\86à¨\82 ਸà©\8bਧਾà¨\82 ਵੇਖਾਓ',
-'rcshowhideminor' => '$1 à¨\9bà©\8bà¨\9fà©\80à¨\86à¨\82 ਸà©\8bਧਾà¨\82',
+'rclistfrom' => '$1 ਤà©\8bà¨\82 ਸ਼à©\81ਰà©\82 à¨\95ਰà¨\95à©\87 ਨਵà©\87à¨\82 ਬਦਲਾà¨\85 ਵੇਖਾਓ',
+'rcshowhideminor' => '$1 à¨\9bà©\8bà¨\9fà©\87 ਬਦਲਾà¨\85',
'rcshowhidebots' => '$1 ਬੋਟ',
-'rcshowhideliu' => '$1 ਲਾà¨\97à¨\87ਨ ਹà©\8bà¨\8f ਯà©\82à¨\9c਼ਰ',
-'rcshowhideanons' => '$1 à¨\85à¨\97ਿà¨\86ਤ ਯà©\82à¨\9c਼ਰ',
-'rcshowhidepatr' => 'ਜਾਂਚ ਕੀਤੀਆਂ $1 ਸੋਧਾਂ',
-'rcshowhidemine' => '$1 ਮੇਰੀਆਂ ਸੋਧਾਂ',
-'rclinks' => 'ਪਿà¨\9bਲà©\87 $2 ਦਿਨਾà¨\82 à¨\95à©\80ਤà©\80à¨\86à¨\82 $1 ਸà©\8bਧਾà¨\82 ਵੇਖਾਓ<br /> $3',
+'rcshowhideliu' => '$1 ਲਾà¨\97à¨\87ਨ ਹà©\8bà¨\8f ਵਰਤà©\8bà¨\82à¨\95ਾਰਾà¨\82',
+'rcshowhideanons' => '$1 à¨\86à¨\88॰ਪà©\80 ਵਰਤà©\8bà¨\82à¨\95ਾਰਾà¨\82 ਦà©\87 ਬਦਲਾà¨\85',
+'rcshowhidepatr' => 'ਜਾਂਚੇ ਹੋਏ ਸੰਪਾਦਨ $1',
+'rcshowhidemine' => 'ਮੇਰੇ ਬਦਲਾਅ $1',
+'rclinks' => 'ਪਿੱà¨\9bਲà©\87 $2 ਦਿਨਾà¨\82 ਵਿੱà¨\9a ਹà©\8bà¨\8f $1 ਬਦਲਾà¨\85 ਵੇਖਾਓ<br /> $3',
'diff' => 'ਅੰਤਰ',
-'hist' => 'à¨\85ਤà©\80ਤ',
-'hide' => 'à¨\93ਹਲà©\87',
+'hist' => 'à¨\87ਤਿਹਾਸ',
+'hide' => 'à¨\9bà©\81ਪਾà¨\93',
'show' => 'ਵੇਖਾਓ',
'minoreditletter' => 'ਛੋ',
'newpageletter' => 'ਨ',
'rc_categories_any' => 'ਕੋਈ ਵੀ',
'newsectionsummary' => '/* $1 */ ਨਵਾਂ ਭਾਗ',
'rc-enhanced-expand' => 'ਵੇਰਵਾ ਵੇਖਾਓ (ਜਾਵਾਸਕ੍ਰਿਪਟ ਲੋੜੀਂਦੀ ਹੈ)',
-'rc-enhanced-hide' => 'ਵà©\87ਰਵਾ à¨\93ਹਲà©\87',
+'rc-enhanced-hide' => 'ਵà©\87ਰਵਾ à¨\9bà©\81ਪਾà¨\93',
'rc-old-title' => 'ਅਸਲ ਵਿੱਚ "$1" ਵਜੋਂ ਬਣਾਇਆ',
# Recent changes linked
'recentchangeslinked-title' => '"$1" ਨਾਲ ਸਬੰਧਿਤ ਬਦਲਾਵ',
'recentchangeslinked-noresult' => 'ਜੁੜੇ ਪੰਨਿਆਂ ’ਤੇ, ਦਿੱਤੇ ਸਮੇਂ ’ਚ ਕੋਈ ਬਦਲਾਵ ਨਹੀਂ ਹੋਈ।',
'recentchangeslinked-summary' => 'ਇਹ ਸੂਚੀ ਇੱਕ ਵਿਸ਼ੇਸ਼ ਪੰਨੇ ਨਾਲ ਸਬੰਧਿਤ ਪੰਨਿਆਂ ਜਾਂ ਕਿਸੇ ਵਿਸ਼ੇਸ਼ ਸ਼੍ਰੇਣੀ ਦੇ ਮੈਂਬਰਾਂ ਦੇ ਹਾਲ ‘ਚ ਹੋਏ ਬਦਲਾਵਾਂ ਨੂੰ ਦਰਸਾਂਉਦੀ ਹੈ। [[Special:Watchlist|ਤੁਹਾਡੀ ਧਿਆਨਸੂਚੀ]] ਵਿੱਚ ਮੌਜੂਦ ਪੰਨੇ ਮੋਟੇ ਅੱਖਰਾਂ ਵਿੱਚ ਦਿਖਾਈ ਦੇਣਗੇ।',
-'recentchangeslinked-page' => 'ਸਫ਼ਾ ਨਾà¨\82:',
+'recentchangeslinked-page' => 'ਪੰਨà©\87 ਦਾ ਨਾਮ:',
'recentchangeslinked-to' => 'ਇਸਦੇ ਬਦਲੇ ਇਸ ਪੰਨੇ ਨਾਲ ਜੁੜੇ ਪੰਨਿਆਂ ਵਿੱਚ ਹੋਏ ਬਦਲਾਅ ਵਿਖਾਓ',
# Upload
-'upload' => 'ਫਾà¨\87ਲ à¨\85ੱਪਲੋਡ ਕਰੋ',
+'upload' => 'ਫਾà¨\88ਲ à¨\85ਪਲੋਡ ਕਰੋ',
'uploadbtn' => 'ਫਾਇਲ ਅੱਪਲੋਡ ਕਰੋ',
'reuploaddesc' => 'ਅੱਪਲੋਡ ਫਾਰਮ ਉੱਤੇ ਜਾਓ।',
'uploadnologin' => 'ਲਾਗਇਨ ਨਹੀਂ ਹੋ',
'upload-recreate-warning' => "'''ਖ਼ਬਰਦਾਰ: ਇਸ ਨਾਮ ਦੀ ਫ਼ਾਈਲ ਮਿਟਾਈ ਜਾਂ ਹੋਰ ਨਾਮ ਤੇ ਭੇਜੀ ਜਾ ਚੁੱਕੀ ਹੈ।'''
ਮਿਟਾਉਣ ਅਤੇ ਭੇਜੇ ਜਾਣ ਦਾ ਚਿੱਠਾ ਸਹੂਲਤ ਲਈ ਇੱਥੇ ਦਿੱਤਾ ਗਿਆ ਹੈ:",
'uploadlog' => 'ਅੱਪਲੋਡ ਲਾਗ',
-'uploadlogpage' => 'à¨\85ੱਪਲà©\8bਡ ਲਾà¨\97',
+'uploadlogpage' => 'à¨\85ਪਲà©\8bਡਾà¨\82 ਦਾ à¨\9aਿੱਠਾ',
'filename' => 'ਫਾਇਲ ਨਾਂ',
'filedesc' => 'ਸਾਰ',
'fileuploadsummary' => 'ਸੰਖੇਪ:',
'filereuploadsummary' => 'ਫਾਇਲ ਬਦਲਾਅ',
'filestatus' => 'ਕਾਪੀਰਾਈਟ ਹਾਲਤ:',
-'filesource' => 'ਸਰà©\8bਤ:',
+'filesource' => 'ਸà©\8bਰਸ:',
'uploadedfiles' => 'ਅੱਪਲੋਡ ਕੀਤੀਆਂ ਫਾਇਲਾਂ',
'ignorewarning' => 'ਚੇਤਾਵਨੀ ਅਣਡਿੱਠੀ ਕਰਕੇ ਕਿਵੇਂ ਵੀ ਫਾਇਲ ਸੰਭਾਲੋ।',
'ignorewarnings' => 'ਕੋਈ ਚੇਤਾਵਨੀ ਹੋਈ ਤਾਂ ਨਜ਼ਰਅੰਦਾਜ਼ ਕਰੋ',
'filetype-missing' => 'ਫਾਇਲ ਦੀ ਕੋਈ ਐਕਸ਼ਟੇਸ਼ਨ ਨਹੀਂ ਹੈ (ਜਿਵੇਂ ".jpg").',
'empty-file' => 'ਤੁਹਾਡੇ ਵਲੋਂ ਦਿੱਤੀ ਫਾਇਲ ਖਾਲੀ ਸੀ।',
'file-too-large' => 'ਤੁਹਾਡੇ ਵਲੋਂ ਦਿੱਤੀ ਫਾਇਲ ਬਹੁਤ ਵੱਡੀ ਸੀ।',
-'filename-tooshort' => 'ਫਾà¨\87ਲ ਬਹੁਤ ਛੋਟੀ ਹੈ।',
-'filetype-banned' => 'à¨\87ਸ à¨\95ਿਸਮ ਦà©\80 ਫਾà¨\87ਲ ਦੀ ਮਨਾਹੀ ਹੈ।',
+'filename-tooshort' => 'ਫਾà¨\88ਲ ਬਹੁਤ ਛੋਟੀ ਹੈ।',
+'filetype-banned' => 'à¨\87ਸ à¨\95ਿਸਮ ਦà©\80 ਫਾà¨\88ਲ ਦੀ ਮਨਾਹੀ ਹੈ।',
'verification-error' => 'ਇਹ ਫਾਇਲ ਫਾਇਲ ਜਾਂਚ ਪੂਰੀ ਨਹੀਂ ਕਰਦੀ ਹੈ।',
-'illegal-filename' => 'à¨\87ਸ ਫਾà¨\87ਲ-ਨਾਮ ਦà©\80 à¨\87à¨\9cਾà¨\9c਼ਤ ਨਹੀਂ ਹੈ।',
+'illegal-filename' => 'à¨\87ਸ ਫਾà¨\88ਲ-ਨਾਮ ਦà©\80 à¨\85ਨà©\81ਮਤà©\80 ਨਹੀਂ ਹੈ।',
'unknown-error' => 'ਅਣਜਾਣ ਗਲਤੀ ਆਈ ਹੈ।',
'tmp-create-error' => 'ਆਰਜ਼ੀ ਫਾਇਲ ਬਣਾਉਣ ਲਈ ਅਸਮਰੱਥ ਹੈ।',
'tmp-write-error' => 'ਆਰਜ਼ੀ ਫਾਇਲ ਲਿਖਣ ਲਈ ਗਲਤੀ ਹੈ।',
'sourcefilename' => 'ਸੋਰਸ ਫਾਇਲ ਨਾਂ:',
'sourceurl' => 'ਸਰੋਤ URL:',
'destfilename' => 'ਟਿਕਾਣਾ ਫਾਇਲ-ਨਾਂ:',
-'upload-maxfilesize' => 'ਫਾà¨\87ਲ ਦਾ ਵੱਧ ਤੋਂ ਵੱਧ ਅਕਾਰ: $1',
-'upload-description' => 'ਫਾà¨\87ਲ ਵੇਰਵਾ',
+'upload-maxfilesize' => 'ਫਾà¨\88ਲ ਦਾ ਵੱਧ ਤੋਂ ਵੱਧ ਅਕਾਰ: $1',
+'upload-description' => 'ਫਾà¨\88ਲ ਵੇਰਵਾ',
'upload-options' => 'ਅੱਪਲੋਡ ਚੋਣਾਂ',
'watchthisupload' => 'ਇਸ ਫ਼ਾਈਲ ’ਤੇ ਨਜ਼ਰ ਰੱਖੋ',
'upload-success-subj' => 'ਠੀਕ ਤਰ੍ਹਾਂ ਅੱਪਲੋਡ',
'backend-fail-store' => 'ਫ਼ਾਈਲ "$1", "$2" ਵਿਚ ਸਾਂਭੀ ਨਹੀਂ ਜਾ ਸਕੀ।',
'backend-fail-copy' => 'ਫ਼ਾਈਲ "$1", "$2" ਵਿਚ ਨਕਲ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕੀ।',
'backend-fail-move' => 'ਫ਼ਾਈਲ "$1", "$2" ਤੇ ਭੇਜੀ ਨਹੀਂ ਜਾ ਸਕੀ।',
-'backend-fail-opentemp' => 'à¨\86ਰà¨\9c਼à©\80 ਫਾà¨\87ਲ ਖੋਲ੍ਹੀ ਨਹੀਂ ਜਾ ਸਕੀ।',
+'backend-fail-opentemp' => 'à¨\85ਸਥਾà¨\88 ਫਾà¨\88ਲ ਖੋਲ੍ਹੀ ਨਹੀਂ ਜਾ ਸਕੀ।',
# Special:UploadStash
'uploadstash-refresh' => 'ਫ਼ਾਈਲਾਂ ਦੀ ਲਿਸਟ ਨੂੰ ਤਾਜ਼ਾ ਕਰੋ',
'listfiles_count' => 'ਵਰਜਨ',
# File description page
-'file-anchor-link' => 'ਫਾà¨\87ਲ',
-'filehist' => 'ਫਾà¨\87ਲ à¨\85ਤà©\80ਤ',
+'file-anchor-link' => 'ਫਾà¨\88ਲ',
+'filehist' => 'ਫਾà¨\88ਲ ਦਾ à¨\87ਤਿਹਾਸ',
'filehist-help' => 'ਤਾਰੀਖ/ਸਮੇਂ ’ਤੇ ਕਲਿੱਕ ਕਰੋ ਤਾਂ ਉਸ ਸਮੇਂ ਦੀ ਫਾਈਲ ਪੇਸ਼ ਹੋ ਜਾਵੇਗੀ।',
'filehist-deleteall' => 'ਸਭ ਹਟਾਓ',
'filehist-deleteone' => 'ਇਹ ਹਟਾਓ',
'filehist-thumb' => 'ਨਮੂਨਾ',
'filehist-thumbtext' => '$1 ਦੇ ਸਮੇਂ ਦੇ ਸੰਸਕਰਨ ਦਾ ਅੰਗੂਠਾਕਾਰ ਪ੍ਰਤੀਰੂਪ',
'filehist-nothumb' => 'ਕੋਈ ਨਮੂਨਾ-ਤਸਵੀਰ ਨਹੀਂ',
-'filehist-user' => 'ਯà©\82à¨\9c਼ਰ',
+'filehist-user' => 'ਵਰਤà©\8bà¨\82à¨\95ਾਰ',
'filehist-dimensions' => 'ਨਾਪ',
'filehist-filesize' => 'ਫਾਇਲ ਆਕਾਰ',
'filehist-comment' => 'ਟਿੱਪਣੀ',
-'filehist-missing' => 'ਫਾà¨\87ਲ à¨\97à©\81ੰਮ ਹà©\88',
-'imagelinks' => 'ਫਾà¨\87ਲ ਵਰਤੋਂ',
+'filehist-missing' => 'ਫਾà¨\88ਲ à¨\97à©\81ੰਮ',
+'imagelinks' => 'ਫਾà¨\88ਲ ਵਰਤੋਂ',
'linkstoimage' => 'ਇਹ {{PLURAL:$1|ਪੰਨੇ ਦੇ ਲਿੰਕ|$1 ਪੰਨੇ}} ਇਸ ਫ਼ਾਈਲ ਨਾਲ ਜੋੜਦੇ ਹਨੇ:',
'nolinkstoimage' => 'ਕੋਈ ਵੀ ਪੰਨਾ ਇਸ ਫ਼ਾਈਲ ਨਾਲ ਨਹੀਂ ਜੋੜਦਾ।',
'morelinkstoimage' => 'ਇਸ ਫ਼ਾਈਲ ਨਾਲ਼ ਜੋੜਦੇ [[Special:WhatLinksHere/$1|ਹੋਰ ਲਿੰਕ]] ਵੇਖੋ।',
'statistics-articles' => 'ਸਮੱਗਰੀ ਸਫ਼ੇ',
'statistics-pages' => 'ਸਫ਼ੇ',
'statistics-pages-desc' => 'ਇਸ ਵਿਕੀ ਦੇ ਸਾਰੇ ਸਫ਼ੇ, ਗੱਲ-ਬਾਤ ਸਫ਼ਿਆਂ, ਰੀਡਾਇਰੈਕਟਾਂ ਇਤਿਆਦਿ ਨੂੰ ਸ਼ਾਮਲ ਕਰਦੇ ਹੋਏ',
-'statistics-files' => 'à¨\85ੱਪਲà©\8bਡ à¨\95à©\80ਤà©\80à¨\86à¨\82 ਫਾà¨\87ਲਾਂ',
+'statistics-files' => 'à¨\85ਪਲà©\8bਡ à¨\95à©\80ਤà©\80à¨\86à¨\82 à¨\97à¨\88à¨\86à¨\82 ਫਾà¨\88ਲਾਂ',
'statistics-edits-average' => 'ਪ੍ਰਤੀ ਸਫ਼ਾ ਔਸਤਨ ਸੋਧਾਂ',
-'statistics-users' => 'ਰà¨\9cਿਸà¨\9fਰ ਹà©\8bà¨\8f [[Special:ListUsers|ਯà©\82à¨\9c਼ਰ]]',
+'statistics-users' => 'ਪੰà¨\9cà©\80à¨\95ਰਿਤ [[Special:ListUsers|ਵਰਤà©\8bà¨\82à¨\95ਾਰਾà¨\82]]',
'statistics-users-active' => 'ਸਰਗਰਮ ਯੂਜ਼ਰ',
'statistics-users-active-desc' => 'ਮੈਂਬਰ, ਜਿੰਨ੍ਹਾ ਨੇ ਆਖ਼ਰੀ {{PLURAL:$1|ਦਿਨ|$1 ਦਿਨਾਂ}} ਵਿਚ ਕੋਈ ਕੰਮ ਕੀਤਾ ਹੈ।',
'statistics-mostpopular' => 'ਸਭ ਤੋਂ ਵੱਧ ਵੇਖੇ ਸਫ਼ੇ',
'newpages' => 'ਨਵੇਂ ਸਫ਼ੇ',
'newpages-username' => 'ਯੂਜ਼ਰ-ਨਾਂ:',
'ancientpages' => 'ਸਭ ਤੋਂ ਪੁਰਾਣੇ ਪੇਜ',
-'move' => 'à¨à©\87à¨\9cà©\8b',
+'move' => 'ਸਥਾਨਾà¨\82ਤਰਨ',
'movethispage' => 'ਇਹ ਸਫ਼ਾ ਭੇਜੋ',
'unusedcategoriestext' => 'ਇਹ ਕੈਟੇਗਰੀ ਸਫ਼ੇ ਮੌਜੂਦ ਹਨ ਹਾਲਾਂਕਿ ਕਿਸੇ ਵੀ ਸਫ਼ੇ ਜਾਂ ਕੈਟੇਗਰੀ ਨੇ ਇਹਨਾਂ ਦੀ ਵਰਤੋਂ ਨਹੀਂ ਕੀਤੀ।',
'notargettitle' => 'ਟਾਰਗੇਟ ਨਹੀਂ',
'cachedspecial-refresh-now' => 'ਸਭ ਤੋਂ ਨਵਾਂ ਵੇਖੋ।',
# Special:Categories
-'categories' => 'à¨\95à©\88à¨\9fਾà¨\97ਰੀਆਂ',
+'categories' => 'ਸ਼à©\8dਰà©\87ਣੀਆਂ',
'categoriesfrom' => 'ਇਸਤੋਂ ਸ਼ੁਰੂ ਹੋਣ ਵਾਲ਼ੀਆਂ ਕੈਟੇਗਰੀਆਂ ਵਖਾਓ:',
'special-categories-sort-count' => 'ਗਿਣਤੀ ਮੁਤਾਬਕ ਤਰਤੀਬ ਦੇਵੋ',
'special-categories-sort-abc' => 'ਅੱਖਰਾਂ ਮੁਤਾਬਕ ਤਰਤੀਬ ਦੇਵੋ',
# What links here
'whatlinkshere' => 'ਕਿਹੜੇ (ਪੰਨੇ) ਇੱਥੇ ਜੋੜਦੇ ਹਨ',
'whatlinkshere-title' => '$1 ਨਾਲ ਜੋੜਨ ਵਾਲੇ ਪੰਨੇ',
-'whatlinkshere-page' => 'ਸਫ਼ਾ:',
+'whatlinkshere-page' => 'ਪੰਨਾ:',
'linkshere' => "ਇਹ ਪੰਨੇ '''[[:$1]]''' ਨਾਲ ਜੋੜਦੇ ਹਨ:",
'nolinkshere' => "ਕੋਈ ਵੀ ਪੰਨਾ '''[[:$1]]''' ਨਾਲ ਨਹੀਂ ਜੋੜਦਾ।",
'isredirect' => 'ਰੀਡਿਰੈਕਟ ਪੰਨਾ',
'istemplate' => 'ਟਾਕਰਾ ਕਰੋ',
-'isimage' => 'ਫਾà¨\87ਲ ਲਿੰਕ',
+'isimage' => 'ਫਾà¨\88ਲ ਲਿੰਕ',
'whatlinkshere-prev' => '{{PLURAL:$1|ਪਿਛਲਾ|ਪਿਛਲੇ $1}}',
'whatlinkshere-next' => '{{PLURAL:$1|ਅਗਲਾ|ਅਗਲੇ $1}}',
'whatlinkshere-links' => '← ਲਿੰਕ',
'whatlinkshere-hideredirs' => 'ਅਸਿੱਧੇ ਰਾਹ $1',
'whatlinkshere-hidetrans' => '$1 ਇੱਥੇ ਕੀ ਕੀ ਜੁੜਦਾ ਹੈ।',
'whatlinkshere-hidelinks' => '$1 ਲਿੰਕ',
-'whatlinkshere-hideimages' => 'ਫਾà¨\87ਲ ਲਿੰਕ $1',
+'whatlinkshere-hideimages' => 'ਫਾà¨\88ਲ ਲਿੰਕ $1',
'whatlinkshere-filters' => 'ਫਿਲਟਰ',
# Block/unblock
-'blockip' => 'ਯà©\82à¨\9c਼ਰ ਪਾਬੰਦà©\80',
+'blockip' => 'à¨\85ਵਰà©\8bਧਤ à¨\95ਰà©\8b',
'ipadressorusername' => 'IP ਐਡਰੈਸ ਜਾਂ ਯੂਜ਼ਰ ਨਾਂ:',
'ipbexpiry' => 'ਮਿਆਦ:',
'ipbreason' => 'ਕਾਰਨ:',
'lockdb' => 'ਡਾਟਾਬੇਸ ਲਾਕ',
# Move page
-'move-page-legend' => 'ਸਫ਼ਾ à¨à©\87à¨\9cà©\8b',
+'move-page-legend' => 'ਪੰਨਾ ਸਥਾਨਾà¨\82ਤਰਨ',
'movearticle' => 'ਸਫ਼ਾ ਭੇਜੋ:',
'movenologin' => 'ਲਾਗਇਨ ਨਹੀਂ ਹੋ',
'movenologintext' => 'ਇਕ ਸਫ਼ੇ ਦਾ ਸਿਰਲੇਖ ਬਦਲਣ ਲਈ ਤੁਸੀਂ ਰਜਿਸਟਰਡ ਮੈਂਬਰ ਹੋਣੇ ਚਾਹੀਦੇ ਹੋ ਅਤੇ [[Special:UserLogin|ਲਾਗਇਨ]] ਕੀਤਾ ਹੋਣਾ ਚਾਹੀਦਾ ਹੈ।',
'movepage-moved-redirect' => 'ਇੱਕ ਰੀਡਿਰੈਕਟ ਬਣਾ ਦਿੱਤਾ ਗਿਆ।',
'articleexists' => 'ਇਸ ਨਾਮ ਦਾ ਸਫ਼ਾ ਪਹਿਲਾਂ ਹੀ ਮੌਜੂਦ ਹੈ ਜਾਂ ਤੁਹਾਡਾ ਚੁਣਿਆ ਹੋਇਆ ਨਾਮ ਸਹੀ ਨਹੀਂ ਹੈ।
ਮਿਹਰਬਾਨੀ ਕਰਕੇ ਕੋਈ ਹੋਰ ਨਾਮ ਚੁਣੋ।',
-'movedto' => 'à¨à©\87à¨\9cਿà¨\86',
+'movedto' => 'ਮà©\82ਵ à¨\95à©\80ਤਾ',
'movepage-page-moved' => 'ਸਫ਼ਾ $1 ਨੂੰ $2 ’ਤੇ ਭੇਜਿਆ ਜਾ ਚੁੱਕਾ ਹੈ।',
'movelogpage' => 'ਸਥਾਨਾਂਤਰਣ ਦਾ ਚਿੱਠਾ',
'movereason' => 'ਕਾਰਨ:',
# Namespace 8 related
'allmessages' => 'ਸਿਸਟਮ ਸੁਨੇਹੇ',
-'allmessagesname' => 'ਨਾà¨\82',
+'allmessagesname' => 'ਨਾਮ',
'allmessagesdefault' => 'ਡਿਫਾਲਟ ਪਾਠ',
'allmessagescurrent' => 'ਮੌਜੂਦਾ ਟੈਕਸਟ',
'allmessages-filter-legend' => 'ਫਿਲਟਰ',
# Tooltip help for the actions
'tooltip-pt-userpage' => 'ਤੁਹਾਡਾ ਵਰਤੋਂਕਾਰ ਪੰਨਾ',
'tooltip-pt-mytalk' => 'ਤੁਹਾਡਾ ਚਰਚਾ ਪੰਨਾ',
-'tooltip-pt-preferences' => 'ਤੁਹਾਡੀ ਪਸੰਦ',
+'tooltip-pt-preferences' => 'ਤੁਹਾਡੀਆਂ ਪਸੰਦਾਂ',
'tooltip-pt-watchlist' => 'ਓਹਨਾਂ ਪੰਨਿਆਂ ਦੀ ਸੂਚੀ ਜੋ ਤੁਸੀਂ ਤਬਦੀਲੀਆਂ ਲਈ ਵੇਖ ਰਹੇ ਹੋ',
'tooltip-pt-mycontris' => 'ਤੁਹਾਡੇ ਯੋਗਦਾਨਾਂ ਦੀ ਲਿਸਟ',
'tooltip-pt-login' => 'ਤੁਹਾਨੂੰ ਲਾਗਇਨ ਕਰਨ ਲਈ ਉਤਸ਼ਾਹਿਤ ਕੀਤਾ ਜਾਂਦਾ ਹੈ; ਪਰ ਇਹ ਕੋਈ ਲਾਜ਼ਮੀ ਨਹੀਂ',
'tooltip-search' => '{{SITENAME}} ’ਤੇ ਖੋਜੋ',
'tooltip-search-go' => 'ਠੀਕ ਇਸ ਨਾਮ ਵਾਲੇ ਪੰਨੇ ’ਤੇ ਜਾਉ, ਜੇ ਮੌਜੂਦ ਹੈ ਤਾਂ',
'tooltip-search-fulltext' => 'ਇਸ ਲਿਖਤ ਲਈ ਪੰਨੇ ਲੱਭੋ',
-'tooltip-p-logo' => 'ਮà©\81ੱà¨\96 ਸਫ਼ੇ ’ਤੇ ਜਾਓ',
-'tooltip-n-mainpage' => 'ਮà©\81ੱà¨\96 ਸਫ਼ੇ ’ਤੇ ਜਾਓ',
+'tooltip-p-logo' => 'ਮà©\81ੱà¨\96 ਪੰਨੇ ’ਤੇ ਜਾਓ',
+'tooltip-n-mainpage' => 'ਮà©\81ੱà¨\96 ਪੰਨੇ ’ਤੇ ਜਾਓ',
'tooltip-n-mainpage-description' => 'ਮੁੱਖ ਪੰਨੇ ’ਤੇ ਜਾਓ',
-'tooltip-n-portal' => 'ਪਰà©\8bà¨\9cà©\88à¨\95à¨\9f ਬਾਰੇ, ਤੁਸੀਂ ਕੀ ਕਰ ਸਕਦੇ ਹੋ, ਕਿੱਥੇ ਕੁਝ ਲੱਭਣਾ ਹੈ',
+'tooltip-n-portal' => 'ਪਰਯà©\8bà¨\9cਨਾ ਬਾਰੇ, ਤੁਸੀਂ ਕੀ ਕਰ ਸਕਦੇ ਹੋ, ਕਿੱਥੇ ਕੁਝ ਲੱਭਣਾ ਹੈ',
'tooltip-n-currentevents' => 'ਮੌਜੂਦਾ ਸਮਾਗਮ ਬਾਰੇ ਪਿਛਲੀ ਜਾਣਕਾਰੀ ਲੱਭੋ',
'tooltip-n-recentchanges' => 'ਵਿਕੀ ਵਿੱਚ ਹਾਲ ’ਚ ਹੋਈਆਂ ਬਦਲੀਆਂ ਦੀ ਸੂਚੀ',
'tooltip-n-randompage' => 'ਇੱਕ ਰਲਵਾਂ ਪੰਨਾ ਲੋਡ ਕਰੋ',
'tooltip-feed-atom' => 'ਇਸ ਪੰਨੇ ਦੀ ਐਟਮ ਫ਼ੀਡ',
'tooltip-t-contributions' => 'ਇਸ ਵਰਤੋਂਕਾਰ ਦੇ ਯੋਗਦਾਨ ਦੀ ਸੂਚੀ',
'tooltip-t-emailuser' => 'ਇਸ ਵਰਤੋਂਕਾਰ ਨੂੰ ਈ-ਮੇਲ ਭੇਜੋ',
-'tooltip-t-upload' => 'ਫਾà¨\87ਲਾà¨\82 à¨\85ੱਪਲੋਡ ਕਰੋ',
-'tooltip-t-specialpages' => 'ਸਠà¨\96ਾਸ ਸਫ਼ਿਆਂ ਦੀ ਸੂਚੀ',
+'tooltip-t-upload' => 'à¨\9aਿੱਤਰ à¨\9cਾà¨\82 ਮà©\80ਡà©\80à¨\86 ਫਾà¨\88ਲਾà¨\82 à¨\85ਪਲੋਡ ਕਰੋ',
+'tooltip-t-specialpages' => 'ਸਾਰà©\87 ਵਿਸ਼à©\87ਸ਼ ਪੰਨਿਆਂ ਦੀ ਸੂਚੀ',
'tooltip-t-print' => 'ਇਹ ਪੰਨੇ ਦਾ ਛਪਣਯੋਗ ਵਰਜਨ',
'tooltip-t-permalink' => 'ਪੰਨੇ ਦੇ ਇਸ ਰੀਵਿਜਨ ਲਈ ਪੱਕਾ ਲਿੰਕ',
'tooltip-ca-nstab-main' => 'ਸਮੱਗਰੀ ਪੰਨਾ ਵੇਖੋ',
'tooltip-ca-nstab-user' => 'ਵਰਤੋਂਕਾਰ ਪੰਨਾ ਵੇਖੋ',
'tooltip-ca-nstab-media' => 'ਮੀਡਿਆ ਪੇਜ ਵੇਖੋ',
'tooltip-ca-nstab-special' => 'ਇਹ ਵਿਸ਼ੇਸ਼ ਪੰਨਾ ਹੈ, ਤੁਸੀਂ ਇਸ ਪੰਨੇ ਨੂੰ ਬਦਲ ਨਹੀਂ ਸਕਦੇ।',
-'tooltip-ca-nstab-project' => 'ਪਰà©\8bà¨\9cà©\88à¨\95à¨\9f ਸਫ਼ਾ ਵੇਖੋ',
-'tooltip-ca-nstab-image' => 'ਫਾà¨\87ਲ ਸਫ਼ਾ ਵà©\87à¨\96ਾà¨\93',
+'tooltip-ca-nstab-project' => 'ਪਰਯà©\8bà¨\9cਨਾ ਪੰਨਾ ਵੇਖੋ',
+'tooltip-ca-nstab-image' => 'ਫਾà¨\88ਲ ਪੰਨਾ ਵà©\87à¨\96à©\8b',
'tooltip-ca-nstab-mediawiki' => 'ਸਿਸਟਮ ਸੁਨੇਹੇ ਵੇਖੋ',
'tooltip-ca-nstab-template' => 'ਸਾਂਚਾ ਵੇਖੋ',
-'tooltip-ca-nstab-help' => 'ਮੱਦਦ ਸਫ਼ਾ ਵੇਖੋ',
+'tooltip-ca-nstab-help' => 'ਮਦਦ ਪੰਨਾ ਵੇਖੋ',
'tooltip-ca-nstab-category' => 'ਸ਼੍ਰੇਣੀ ਪੰਨਾ ਵੇਖੋ',
'tooltip-minoredit' => 'ਇਸ ’ਤੇ ਬਤੌਰ ਛੋਟਾ ਬਦਲਾਵ ਨਿਸ਼ਾਨ ਲਾਓ',
'tooltip-save' => 'ਆਪਣੀਆਂ ਤਬਦੀਲੀਆਂ ਸਾਂਭੋ',
'tooltip-compareselectedversions' => 'ਇਸ ਪੰਨੇ ਦੇ ਦੋ ਚੁਣੇ ਹੋਏ ਸੋਧਾਂ ਵਿੱਚ ਫ਼ਰਕ ਵੇਖੋ',
'tooltip-watch' => 'ਇਸ ਪੰਨੇ ਨੂੰ ਆਪਣੀ ਧਿਆਨਸੂਚੀ ਵਿੱਚ ਪਾਓ',
'tooltip-watchlistedit-normal-submit' => 'ਸਿਰਲੇਖ ਹਟਾਓ',
-'tooltip-watchlistedit-raw-submit' => 'ਨਿà¨\97ਰਾਨà©\80-ਸà©\82à¨\9aà©\80 à¨\85ੱਪਡੇਟ ਕਰੋ',
-'tooltip-upload' => 'à¨\85ੱਪਲà©\8bਡ ਸ਼à©\81ਰà©\82 à¨\95ਰà©\8b',
+'tooltip-watchlistedit-raw-submit' => 'ਧਿà¨\86ਨਸà©\82à¨\9aà©\80 à¨\85ਪਡੇਟ ਕਰੋ',
+'tooltip-upload' => 'ਅਪਲੋਡ ਸ਼ੁਰੂ ਕਰੋ',
'tooltip-rollback' => "''ਵਾਪਸ ਮੋੜੋ'' ਇੱਕ ਹੀ ਕਲਿੱਕ ਨਾਲ ਆਖਰੀ ਯੋਗਦਾਨ ਨੂੰ ਰੱਦ ਕਰ ਦਿੰਦਾ ਹੈ",
'tooltip-undo' => '"ਉਧੇੜਨਾ" ਇਸ ਬਦਲਾਵ ਨੂੰ ਰੱਦ ਕਰਕੇ ਸੋਧ ਫ਼ਾਰਮ ਨੂੰ ਝਲਕ ਦੇ ਸ਼ੈਲੀ ਵਿੱਚ ਦਿਖਾਉਂਦਾ ਹੈ।
ਇੰਝ "ਸਾਰ" ਵਿੱਚ ਬਦਲਾਵ ਨਕਾਰਨ ਦਾ ਕਾਰਨ ਲਿਖਿਆ ਜਾ ਸਕਦਾ ਹੈ।',
'lastmodifiedatby' => 'ਇਹ ਸਫ਼ਾ ਆਖ਼ਰੀ ਵਾਰ $1 ਨੂੰ $2 ’ਤੇ $3 ਨੇ ਸੋਧਿਆ ਸੀ।',
'others' => 'ਹੋਰ',
'siteusers' => '{{SITENAME}} {{PLURAL:$2|ਵਰਤੋਂਕਾਰ|ਵਰਤੋਂਕਾਰਾਂ}} $1',
-'creditspage' => 'ਸਫ਼ਾ ਮਾਣ',
+'creditspage' => 'ਪੰਨਾ ਮਾਣ',
# Spam protection
'spamprotectiontitle' => 'Spam ਸੁਰੱਖਿਆ ਫਿਲਟਰ',
'skinname-monobook' => 'ਮੋਨੋਬੁੱਕ',
# Browsing diffs
-'previousdiff' => 'â\86\90 ਪਿà¨\9bਲà©\80 ਸà©\8bਧ',
-'nextdiff' => 'ਨਵà©\80à¨\82 ਸà©\8bਧ →',
+'previousdiff' => 'â\86\90 à¨\87ਸ ਤà©\8bà¨\82 ਪà©\81ਰਾਣਾ ਬਦਲਾà¨\85',
+'nextdiff' => 'ਤਾà¨\9cਾ ਸੰਪਾਦਨ →',
# Media information
'thumbsize' => 'ਥੰਮਨੇਲ ਆਕਾਰ:',
ਲਾਈਨ ਵਿਚ ਪਹਿਲੀ ਕੜੀ ਗ਼ਲਤ ਫ਼ਾਈਲ ਦੀ ਕੜੀ ਹੋਣੀ ਚਾਹੀਦੀ ਹੈ। ਉਸ ਲਾਈਨ ’ਚ ਅੱਗੇ ਦਿਤੀਆਂ ਕੜੀਆਂ ਨੂੰ ਇਤਰਾਜ਼ਯੋਗ ਮੰਨਿਆ ਜਾਵੇਗਾ, ਭਾਵ ਉਹ ਪੰਨੇ ਜਿਨ੍ਹਾਂ ਵਿਚ ਫ਼ਾਈਲ ਕਿਸੇ ਲਾਈਨ ਵਿਚ ਸਥਿਤ ਹੋ ਸਕਦੀ ਹੈ।',
# Metadata
-'metadata' => 'ਮà©\87ਟਾਡਾਟਾ',
+'metadata' => 'ਮà©\80ਟਾਡਾਟਾ',
'metadata-help' => 'ਇਸ ਫ਼ਾਈਲ ਵਿੱਚ ਵਾਧੂ ਜਾਣਕਾਰੀਆਂ ਹਨ, ਜੋ ਸ਼ਾਇਦ ਉਸ ਕੈਮਰੇ ਜਾਂ ਸਕੈਨਰ ਦੀ ਦੇਣ ਹਨ ਜੋ ਇਸਨੂੰ ਬਣਾਉਣ ਲਈ ਵਰਤਿਆ ਗਿਆ। ਜੇ ਇਸ ਫ਼ਾਈਲ ਵਿੱਚ ਕੋਈ ਤਬਦੀਲੀ ਕੀਤੀ ਗਈ ਹੈ ਤਾਂ ਹੋ ਸਕਦਾ ਹੈ ਕੁਝ ਵੇਰਵੇ ਬਦਲੀ ਫ਼ਾਈਲ ਦਾ ਸਹੀ ਰੂਪਮਾਨ ਨਾ ਹੋਣ।',
'metadata-fields' => 'ਇਸ ਸੁਨੇਹੇ ਵਿੱਚ ਸੂਚੀਬੱਧ ਖੇਤਰ ਚਿੱਤਰ ਪੰਨੇ ’ਚ ਸ਼ਾਮਲ ਕੀਤੇ ਜਾਣਗੇ ਜੋ ਉਦੋਂ ਦਿੱਸਦੇ ਹਨ ਜਦੋ ਮੈਟਾਡੈਟਾ ਖਾਕਾ ਬੰਦ ਹੋਵੇ। ਬਾਕੀ ਉਂਞ ਹੀ ਲੁਕੇ ਹੋਣਗੇ।',
'exif-subjectdistancerange-0' => 'ਅਣਜਾਣ',
'exif-subjectdistancerange-1' => 'ਮਾਈਕਰੋ',
-'exif-subjectdistancerange-2' => 'ਨà©\87à©\9cà¨\95à©\80 ਠà¨\95à¨\9c',
+'exif-subjectdistancerange-2' => 'à¨\9dਲà¨\95 ਬੰਦ à¨\95ਰà©\8b',
# Pseudotags used for GPSSpeedRef
'exif-gpsspeed-k' => 'ਕਿਲੋਮੀਟਰ ਪ੍ਰਤੀ ਘੰਟਾ',
'exif-urgency-normal' => 'ਸਧਾਰਨ ($1)',
# External editor support
-'edit-externally' => 'à¨\87ਹ ਫਾà¨\87ਲ ਨà©\82à©° ਬਾਹਰà©\80 à¨\90ਪਲà©\80à¨\95à©\87ਸ਼ਨ ਨਾਲ ਸà©\8bਧà©\8b',
+'edit-externally' => 'ਬਾਹਰà©\80 à¨\90ਪਲà©\80à¨\95à©\87ਸ਼ਨ ਵਰਤਦà©\87 ਹà©\8bà¨\8f à¨\87ਸ ਫਾà¨\88ਲ ਨà©\82à©° ਸੰਪਾਦਨ à¨\95ਰà©\8b।',
'edit-externally-help' => '(ਹੋਰ ਜਾਣਕਾਰੀ ਲਈ [//www.mediawiki.org/wiki/Manual:External_editors setup instructions] ਵੇਖੋ)',
# 'all' in various places, this might be different for inflected languages
'limitall' => 'ਸਭ',
# Email address confirmation
-'confirmemail' => 'à¨\88ਮà©\87ਲ ਸਿਰਨਾਵਾà¨\82 ਪੁਸ਼ਟੀ',
+'confirmemail' => 'à¨\88ਮà©\87ਲ à¨\90ਡਰà©\88ੱਸ ਪੁਸ਼ਟੀ',
'confirmemail_send' => 'ਇੱਕ ਪੁਸ਼ਟੀ ਕੋਡ ਭੇਜੋ',
'confirmemail_sent' => 'ਪੁਸ਼ਟੀ ਈਮੇਲ ਭੇਜੀ ਗਈ।',
'confirmemail_invalid' => 'ਗਲਤ ਪੁਸ਼ਟੀ ਕੋਡ ਹੈ। ਕੋਡ ਦੀ ਮਿਆਦ ਪੁੱਗੀ ਹੋ ਸਕਦੀ ਹੈ।',
'confirmemail_loggedin' => 'ਤੁਹਾਡਾ ਈ-ਮੇਲ ਪਤਾ ਹੁਣ ਤਸਦੀਕ ਹੋ ਚੁੱਕਾ ਹੈ।',
-'confirmemail_subject' => '{{SITENAME}} à¨\88ਮà©\87ਲ ਸਿਰਨਾਵਾà¨\82 ਪੁਸ਼ਟੀ',
+'confirmemail_subject' => '{{SITENAME}} à¨\88ਮà©\87ਲ à¨\90ਡਰà©\88ੱਸ ਪੁਸ਼ਟੀ',
# Scary transclusion
'scarytranscludetoolong' => '[URL ਬਹੁਤ ਲੰਬਾ ਹੈ]',
'confirm_purge_button' => 'ਠੀਕ ਹੈ',
# Multipage image navigation
-'imgmultipageprev' => 'â\86\90 ਪਿà¨\9bਲਾ ਸਫ਼ਾ',
-'imgmultipagenext' => 'à¨\85à¨\97ਲਾ ਸਫ਼ਾ →',
+'imgmultipageprev' => 'â\86\90 ਪਿੱà¨\9bਲਾ ਪੰਨਾ',
+'imgmultipagenext' => 'à¨\85à¨\97ਲਾ ਪੰਨਾ →',
'imgmultigo' => 'ਜਾਓ!',
'imgmultigoto' => '$1 ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ',
# Table pager
-'table_pager_next' => 'à¨\85à¨\97ਲਾ ਸਫ਼ਾ',
-'table_pager_prev' => 'ਪਿà¨\9bਲਾ ਸਫ਼ਾ',
-'table_pager_first' => 'ਪਹਿਲਾ ਸਫ਼ਾ',
-'table_pager_last' => 'à¨\86à¨\96ਰà©\80 ਸਫ਼ਾ',
+'table_pager_next' => 'à¨\85à¨\97ਲਾ ਪੰਨਾ',
+'table_pager_prev' => 'ਪਿੱà¨\9bਲਾ ਪੰਨਾ',
+'table_pager_first' => 'ਪਹਿਲਾ ਪੰਨਾ',
+'table_pager_last' => 'à¨\86à¨\96ਰà©\80 ਪੰਨਾ',
'table_pager_limit' => 'ਹਰੇਕ ਪੇਜ ਲਈ $1 ਆਈਟਮਾਂ',
'table_pager_limit_label' => 'ਪ੍ਰਤੀ ਸਫ਼ਾ ਆਈਟਮਾਂ:',
'table_pager_limit_submit' => 'ਜਾਓ',
'livepreview-ready' => '…ਲੋਡ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ। ਤਿਆਰ!',
# Watchlist editor
-'watchlistedit-normal-title' => 'ਨਿà¨\97ਰਾਨ-ਸੂਚੀ ਬਦਲੋ',
+'watchlistedit-normal-title' => 'ਧਿà¨\86ਨਸੂਚੀ ਬਦਲੋ',
'watchlistedit-raw-titles' => 'ਟਾਇਟਲ:',
-'watchlistedit-raw-submit' => 'ਨਿà¨\97ਰਾਨ-ਸà©\82à¨\9aà©\80 à¨\85ੱਪਡੇਟ ਕਰੋ',
+'watchlistedit-raw-submit' => 'ਧਿà¨\86ਨਸà©\82à¨\9aà©\80 ਨà©\82à©° à¨\85ਪਡੇਟ ਕਰੋ',
'watchlistedit-raw-added' => '{{PLURAL:$1|1 title was|$1 titles were}} ਸ਼ਾਮਲ:',
'watchlistedit-raw-removed' => '{{PLURAL:$1|1 title was|$1 titles were}} ਹਟਾਓ:',
# Watchlist editing tools
-'watchlisttools-view' => 'ਸਬੰਧਿਤ ਬਦਲਾਅ ਵੇਖੋ',
+'watchlisttools-view' => 'à¨\86ਧਾਰਿਤ ਬਦਲਾਅ ਵੇਖੋ',
'watchlisttools-edit' => 'ਧਿਆਨਸੂਚੀ ਵੇਖੋ ’ਤੇ ਸੰਪਾਦਨ ਕਰੋ',
'watchlisttools-raw' => 'ਕੱਚੀ ਧਿਆਨਸੂਚੀ ਸੰਪਾਦਨ ਕਰੋ',
'version-other' => 'ਹੋਰ',
# Special:FilePath
-'filepath-page' => 'ਫਾà¨\87ਲ:',
+'filepath-page' => 'ਫਾà¨\88ਲ:',
'filepath-submit' => 'ਜਾਓ',
# Special:SpecialPages
-'specialpages' => 'à¨\96ਾਸ ਸਫ਼ੇ',
+'specialpages' => 'ਵਿਸ਼à©\87ਸ਼ ਪੰਨੇ',
'specialpages-group-login' => 'ਲਾਗਇਨ / ਖਾਤਾ ਬਣਾਓ',
-'specialpages-group-users' => 'ਯà©\82à¨\9c਼ਰ ਤੇ ਅਧਿਕਾਰ',
+'specialpages-group-users' => 'ਵਰਤà©\8bà¨\82à¨\95ਾਰਾà¨\82 à¨\85ਤੇ ਅਧਿਕਾਰ',
# Special:BlankPage
'blankpage' => 'ਖ਼ਾਲੀ ਸਫ਼ਾ',
# Special:Tags
'tag-filter' => '[[Special:Tags|ਟੈਗ]] ਫਿਲਟਰ:',
-'tags-tag' => 'à¨\9fà©\88à¨\97 ਨਾà¨\82',
-'tags-edit' => 'ਸà©\8bਧ',
+'tags-tag' => 'à¨\9fà©\88à¨\97 ਦਾ ਨਾਮ',
+'tags-edit' => 'ਸੰਪਾਦਨ',
# HTML forms
'htmlform-submit' => 'ਭੇਜੋ',
'powersearch-field' => 'Suche noch',
'powersearch-togglenone' => 'Kään',
-# Quickbar
-'qbsettings-none' => 'Kään',
-
# Preferences page
'preferences' => 'Optione',
'mypreferences' => 'Oistellunge',
# Special:ListGroupRights
'listgrouprights-members' => '(Midgliederlischd)',
-# E-mail user
+# Email user
'emailuser' => 'E-Mail on de Benutzer',
'emailsend' => 'Abschigge',
'file-info-size' => '$1 × $2 Pixels, Dateigreß: $3, MIME-Type: $4',
'file-nohires' => 'Ke hechere Ufflesung verfiechbar.',
'svg-long-desc' => 'SVG-Datei, Basisgreß $1 × $2 Pixels, Dateigreß: $3',
-'show-big-image' => 'Gsamte Ergebnis',
+'show-big-image' => 'Volli Uflesung',
# Special:NewFiles
'showhidebots' => '(Bots $1)',
'nov' => 'lis',
'dec' => 'gru',
+'monday-at' => 'poniedziałek, $1',
+'tuesday-at' => 'wtorek, $1',
+'wednesday-at' => 'środa, $1',
+'thursday-at' => 'czwartek, $1',
+'friday-at' => 'piątek, $1',
+'saturday-at' => 'sobota, $1',
+'sunday-at' => 'niedziela, $1',
+'today-at' => '$1',
+'yesterday-at' => 'wczoraj, $1',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|Kategoria|Kategorie}}',
'category_header' => 'Strony w kategorii „$1”',
Jeśli jesteś anonimowym użytkownikiem i uważasz, że zamieszczone tu komentarze nie są skierowane do Ciebie, [[Special:UserLogin/signup|utwórz konto]] lub [[Special:UserLogin|zaloguj się]] – dzięki temu unikniesz w przyszłości podobnych nieporozumień.''",
'noarticletext' => 'Brak strony o tym tytule.
Możesz [[Special:Search/{{PAGENAME}}|poszukać „{{PAGENAME}}” na innych stronach]],
-<span class="plainlinks">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} przeszukać log] lub [{{fullurl:{{FULLPAGENAME}}|action=edit}} utworzyć tę stronę]</span>.',
+<span class="plainlinks">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} przeszukać rejestr] lub [{{fullurl:{{FULLPAGENAME}}|action=edit}} utworzyć tę stronę]</span>.',
'noarticletext-nopermission' => 'Ta strona nie posiada jeszcze zawartości.
Możesz [[Special:Search/{{PAGENAME}}|wyszukać ten tytuł]] w treści innych stron
lub <span class="plainlinks">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} przeszukać powiązane dzienniki]</span>, ale nie masz uprawnień do utworzenia tej strony',
'minutes' => '{{PLURAL:$1|$1 minuta|$1 minuty|$1 minut}}',
'hours' => '{{PLURAL:$1|$1 godzina|$1 godziny|$1 godzin}}',
'days' => '{{PLURAL:$1|$1 dzień|$1 dni}}',
+'weeks' => '{{PLURAL:$1|$1 tydzień|$1 tygodnie|$1 tygodni}}',
'months' => '{{PLURAL:$1|$1 miesiąc|$1 miesiące|$1 miesięcy}}',
'years' => '{{PLURAL:$1|$1 rok|$1 lata|$1 lat}}',
'ago' => '$1 temu',
# Image rotation
'rotate-comment' => 'Obraz został odwrócony o $1 {{PLURAL:$1|stopień|stopnie|stopni}} (w kierunku zgodnym z ruchem wskazówek zegara)',
+# Unknown messages
+'hours-ago' => '{{PLURAL:$1|przed godziną|$1 godziny temu|$1 godzin temu}}',
+'minutes-ago' => '{{PLURAL:$1|przed minutą|$1 minuty temu|$1 minut temu}}',
+'seconds-ago' => '{{PLURAL:$1|przed sekundą|$1 sekundy temu|$1 sekund temu}}',
);
'tog-watchlisthideliu' => "Stërmé le modìfiche fàite da j'utent registrà ant la lista dle ròbe che im ten-o sot-euj",
'tog-watchlisthideanons' => "Stërmé le modìfiche fàite da j'utent anònim da 'nt lòn che im ten-o sot-euj",
'tog-watchlisthidepatrolled' => "Stërmé le modìfiche dzorvejà da 'nt la ròba che im ten-o sot-euj",
-'tog-ccmeonemails' => "Mand-me còpia dij messagi ëd pòsta eletrònica che i-j mando a j'àotri utent",
-'tog-diffonly' => 'Smon pa ël contnù dla pàgina dapress a le diferense',
-'tog-showhiddencats' => 'Smon le categorìe stërmà',
+'tog-ccmeonemails' => "Mandeme na còpia dij mëssagi ëd pòsta eletrònica che i-j mando a j'àotri utent",
+'tog-diffonly' => 'Smon-e pa ël contnù dle pàgine sota le diferense',
+'tog-showhiddencats' => 'Smon-e le categorìe stërmà',
'tog-noconvertlink' => "Disativé la conversion dij tìtoj ant j'anliure",
-'tog-norollbackdiff' => "Fa nen vëdde le diferense apress d'avèj ripristinà",
-'tog-useeditwarning' => 'Avisme quand che i lasso na pàgina ëd modìfiche con modìfiche nen salvà',
+'tog-norollbackdiff' => "Fé nen vëdde le diferense apress d'avèj ripristinà",
+'tog-useeditwarning' => 'Aviseme quand che i chito na pàgina ëd modìfiche con dle modìfiche nen salvà',
'underline-always' => 'Sempe',
'underline-never' => 'Mai',
-'underline-default' => 'Stàndard dël navigator',
+'underline-default' => 'Stàndard dël navigator o dël tema',
# Font style option in Special:Preferences
-'editfont-style' => "Stil dël font ëd l'àrea ëd modìfica:",
+'editfont-style' => "Stil dij caràter ëd l'àrea ëd modìfica:",
'editfont-default' => 'Stàndard dël navigator',
-'editfont-monospace' => 'Font mono-spassià',
-'editfont-sansserif' => 'Font sans-serif',
-'editfont-serif' => 'Font serif',
+'editfont-monospace' => 'Caràter mono-spassià',
+'editfont-sansserif' => 'Caràter sensa piòte',
+'editfont-serif' => 'Caràter con piòte',
# Dates
-'sunday' => 'Dumìnica',
-'monday' => 'Lùn-es',
-'tuesday' => 'Màrtes',
+'sunday' => 'dumìnica',
+'monday' => 'lùn-es',
+'tuesday' => 'màrtes',
'wednesday' => 'Merco',
'thursday' => 'Giòbia',
'friday' => 'Vënner',
'tog-shownumberswatching' => 'ویکھن آلے لوکاں دی گنتی وکھاؤ۔',
'tog-oldsig' => 'ہن والے دسخط:',
'tog-fancysig' => 'دستخط نوں وکی ٹیکسڈ ونگوں؎ ورتو(without an automatic link)',
-'tog-externaleditor' => 'ہمیشہ بارلا لکھن والا ورتو (ماہر لوکاں واسطے، اس واسطے تواڑے کمپیوٹر تے خاص تبدیلیاں چائیدیاں نیں۔ [//www.mediawiki.org/wiki/Manual:External_editors مزید معلومات.])',
-'tog-externaldiff' => '
-ہمیشہ بارلا تبدیلی کرن والا ورتو (ماہر لوکاں واسطے، اس واسطے تواڑے کمپیوٹر تے خاص تبدیلیاں چائیدیاں نیں۔ [//www.mediawiki.org/wiki/Manual:External_editors مزید معلومات۔])',
'tog-showjumplinks' => '"ایدر چلو" نوں رلن والے جوڑان نال جوڑو',
'tog-uselivepreview' => 'لائیو پریویو ورتو',
'tog-forceeditsummary' => 'مینون اوسے ویلے دسو جدوں خالی سمری تے آؤ۔',
'tog-diffonly' => 'تبدیلی توں علاوہ صفحہ نا وکھاؤ',
'tog-showhiddencats' => 'لکیاں کیٹاگریاں وکھاؤ',
'tog-norollbackdiff' => 'صفحے دی واپسی تے تبدیلی کڈ دو',
+'tog-useeditwarning' => 'جدوں میں کوئی صفحہ تبدیلی کر کے بچاۓ بغیر چھڈن لگاں تے منوں دس دیو',
'underline-always' => 'ہمیشہ',
'underline-never' => 'کدی وی نئیں',
'edit-no-change' => 'تواڈی تبدیلی ول کوئی توجہ نئیں، کیوں جے لکھت چ کوئی تبدیلی نئیں۔',
'edit-already-exists' => 'نواں صفہ نئیں بن سکدا۔
ایہ پہلے ای ہیگا اے۔',
+'editwarning-warning' => 'اے صفے توں جان تے ہو سکدا اوہ ساریاں تبدیلیاں مک جان جیہڑیاں تساں بناياں نیں۔
+اگر تسیں لاکان او، تسیں ایڈیٹنگ سیکشن چ اپنی پسنداں چ ایس خبرداری نوں پعلے ناں۔',
# Parser/template warnings
'expensive-parserfunction-warning' => "'''خبردار:''' ایس صفے تے چوکھیاں ساریاں پارسر کلز نیں۔
تسیں گوگل تے کھوج کرو۔
اے گل یاد رکھنا جے انڈیکس {{SITENAME}} دے پرانے ہون۔',
-# Quickbar
-'qbsettings' => 'کوئکبار',
-'qbsettings-none' => 'کوئی نئیں',
-'qbsettings-fixedleft' => 'فکسڈ کھبے',
-'qbsettings-fixedright' => 'فکسڈ سجے',
-'qbsettings-floatingleft' => 'ہلدا کھبے',
-'qbsettings-floatingright' => 'ہلدا سجے',
-'qbsettings-directionality' => '!!!!فکسڈ، تھاڈی بولی تے لپی نال',
-
# Preferences page
'preferences' => 'تانگاں',
'mypreferences' => 'میریاں تانگاں',
'http-read-error' => 'ایچ ٹی ٹی پی غلطی پڑھدی اے۔',
'http-timed-out' => 'ایچ ٹی ٹی پی دی مانگ ویلیوں بار۔',
'http-curl-error' => 'ایچ ٹی ٹی پی : $1 لیان چ غلطی۔',
-'http-host-unreachable' => 'ایچ ٹی ٹی پی تک ناں پونچ سکیا۔',
'http-bad-status' => 'ایچ ٹی ٹی پی : $1 $2 دی مانگ ویلے رپھڑ',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => 'ورتن آلا نئیں لبیا۔',
'listusers-blocked' => '(روکیا گیا)',
-# Special:ActiveUsers
-'activeusers' => 'کم کرن والیاں دی لسٹ',
-'activeusers-intro' => 'اے اوناں ورتن والیاں دی لسٹ اے جنان پچھلے $1 {{PLURAL:$1|دن|دناں}} چ کم کیتا اے۔',
-'activeusers-count' => '$1 {{PLURAL:$1|تبدیلی|تبدیلیاں}} پچھلے{{PLURAL:$3|دن|$3 دن}} چ',
-'activeusers-from' => 'ورتن والے ایس توں شروع ہون والے دسو:',
-'activeusers-hidebots' => 'بوٹ چھپاؤ',
-'activeusers-hidesysops' => 'مکھۓ لکاؤ',
-'activeusers-noresult' => 'کوئی ورتن والا نئیں لبیا۔',
-
# Special:ListGroupRights
'listgrouprights' => 'ورتن ٹرلی حق',
'listgrouprights-summary' => 'تھلے اک لسٹ اے ورتن ٹولیاں دی ای وکی تے، اپنے رلدے حقاں نال۔
'action-suppressionlog' => 'دا شخصي يادښت کتل',
'action-block' => 'پر دې کارن د سمون د آسانتياوؤ بنديز لګول',
'action-protect' => 'د دې مخ د ژغورنې کچه بدلول',
+'action-mergehistory' => 'د دې مخ پېښليک سره اخږل',
'action-userrights' => 'د کارن ټولې رښتې سمول',
+'action-userrights-interwiki' => 'په نورو ويکي ګانو د کارنانو رښتې سمول',
+'action-siteadmin' => 'توکبنسټ کولپول يا نه کولپول',
'action-sendemail' => 'برېښليکونه لېږل',
# Recent changes
'boteditletter' => 'روباټ',
'number_of_watching_users_pageview' => '[$1 {{PLURAL:$1|کارن|کارنان}} يې ګوري]',
'rc_categories_any' => 'هر يو',
+'rc-change-size-new' => '$1 {{PLURAL:$1|بايټ|بايټونه}} د بدلون وروسته',
'newsectionsummary' => '/* $1 */ نوې برخه',
'rc-enhanced-expand' => 'تفصيل ښکاره کول (د دې لپاره د JavaScript اړتيا ده)',
'rc-enhanced-hide' => 'تفصيل پټول',
+'rc-old-title' => 'اصلاً د "$1" په توګه جوړ شو',
# Recent changes linked
'recentchangeslinked' => 'اړونده بدلونونه',
# Upload
'upload' => 'دوتنه پورته کول',
'uploadbtn' => 'دوتنه پورته کول',
+'reuploaddesc' => 'پورته کېدنه ناګارل او بېرته د پورته کېدنې فورمې ته ورګرځېدل',
+'upload-tryagain' => 'د بدلون موندلې دوتنې څرګندونې سپارل',
'uploadnologin' => 'غونډال کې نه ياست ننوتي',
'uploadnologintext' => 'ددې لپاره چې دوتنې پورته کړای شۍ، نو لومړی غونډال کې [[Special:UserLogin|ورننوځۍ]].',
'uploaderror' => 'د پورته کولو ستونزه',
'disambiguations' => 'د مبهمو مخونو سره تړلي مخونه',
'disambiguationspage' => 'Template:ناجوت',
+'pageswithprop-submit' => 'ورځه',
+
'doubleredirects' => 'دوه ځلي ورګرځېدنې',
'brokenredirects' => 'ماتې ورګرځېدنې',
'tog-shownumberswatching' => 'Mostrar o número de utilizadores a vigiar',
'tog-oldsig' => 'Assinatura existente:',
'tog-fancysig' => 'Tratar assinatura como texto wiki (sem link automático)',
-'tog-externaleditor' => 'Por omissão, utilizar um editor externo (só para utilizadores avançados, exige configurações adicionais no seu computador. [//www.mediawiki.org/wiki/Manual:External_editors Mais informações.])',
-'tog-externaldiff' => 'Por omissão, utilizar diferenças externas (só para utilizadores avançados, exige configurações adicionais no seu computador. [//www.mediawiki.org/wiki/Manual:External_editors Mais informações.])',
'tog-showjumplinks' => 'Possibilitar links de acessibilidade "{{int:jumpto}}"',
'tog-uselivepreview' => 'Usar a antevisão ao vivo (requer JavaScript; é experimental)',
'tog-forceeditsummary' => 'Avisar-me se deixar o resumo da edição vazio',
'tog-showhiddencats' => 'Mostrar categorias ocultas',
'tog-noconvertlink' => 'Impossibilitar a conversão dos títulos de links',
'tog-norollbackdiff' => 'Omitir diferenças depois de reverter edições em bloco',
+'tog-useeditwarning' => 'Avisar-me ao abandonar uma página editada sem gravar as alterações.',
'underline-always' => 'Sempre',
'underline-never' => 'Nunca',
Ela já existia.',
'defaultmessagetext' => 'Texto da mensagem padrão',
'content-not-allowed-here' => 'Conteúdo do tipo "$1" não é permitido na página [[$2]]',
+'editwarning-warning' => 'Sair desta página fará com que você perca todas as alterações feitas por você.
+Se você fez login, pode desabilitar este aviso na seção "{{int:prefs-editing}}" das suas preferências.',
# Content models
'content-model-wikitext' => 'wikitexto',
Entretanto, pode realizar pesquisas através do Google.
Note, no entanto, que a indexação da {{SITENAME}} neste motor de busca pode estar desactualizada.',
-# Quickbar
-'qbsettings' => 'Barra Rápida',
-'qbsettings-none' => 'Nenhuma',
-'qbsettings-fixedleft' => 'Fixa à esquerda',
-'qbsettings-fixedright' => 'Fixa à direita',
-'qbsettings-floatingleft' => 'Flutuante à esquerda',
-'qbsettings-floatingright' => 'Flutuante à direita',
-'qbsettings-directionality' => 'Fixa, conforme a direccionalidade da escrita na sua língua',
-
# Preferences page
'preferences' => 'Preferências',
'mypreferences' => 'Preferências',
'http-read-error' => 'Erro de leitura HTTP.',
'http-timed-out' => 'O pedido HTTP expirou.',
'http-curl-error' => 'Ocorreu um erro ao aceder à URL: $1',
-'http-host-unreachable' => 'Não foi possível aceder à URL',
'http-bad-status' => 'Ocorreu um problema durante o pedido HTTP: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
# Stylesheets
'common.css' => '/* Código CSS colocado aqui será aplicado a todos os temas */',
-'standard.css' => '/* Código CSS colocado aqui afectará os utilizadores do tema Clássico */',
-'nostalgia.css' => '/* Código CSS colocado aqui afectará os utilizadores do tema Nostalgia */',
'cologneblue.css' => '/* Código CSS colocado aqui afectará os utilizadores do tema Azul colonial */',
'monobook.css' => '/* Código CSS colocado aqui afectará os utilizadores do tema Monobook */',
-'myskin.css' => '/* Código CSS colocado aqui afectará os utilizadores do tema MySkin */',
-'chick.css' => '/* Código CSS colocado aqui afectará os utilizadores do tema Chique */',
-'simple.css' => '/* Código CSS colocado aqui afectará os utilizadores do tema Simples */',
'modern.css' => '/* Código CSS colocado aqui afectará os utilizadores do tema Moderno */',
'vector.css' => '/* Código CSS colocado aqui afectará os utilizadores do tema Vector */',
'print.css' => '/* Código CSS colocado aqui afectará as impressões */',
# Scripts
'common.js' => '/* Código Javascript colocado aqui será carregado para todos os utilizadores em cada carregamento de página */',
-'standard.js' => '/* Código Javascript colocado aqui será carregado para utilizadores do tema Clássico */',
-'nostalgia.js' => '/* Código Javascript colocado aqui será carregado para utilizadores do tema Nostalgia */',
'cologneblue.js' => '/* Código Javascript colocado aqui será carregado para utilizadores do tema Azul colonial */',
'monobook.js' => '/* Código Javascript colocado aqui será carregado para utilizadores do tema Monobook */',
-'myskin.js' => '/* Código Javascript colocado aqui será carregado para utilizadores do tema MySkin */',
-'chick.js' => '/* Código Javascript colocado aqui será carregado para utilizadores do tema Chick */',
-'simple.js' => '/* Código Javascript colocado aqui será carregado para utilizadores do tema Simples */',
'modern.js' => '/* Código Javascript colocado aqui será carregado para utilizadores do tema Moderno */',
'vector.js' => '/* Código Javascript colocado aqui será carregado para utilizadores do tema Vector */',
'pageinfo-category-files' => 'Número de ficheiros',
# Skin names
-'skinname-standard' => 'Clássico',
-'skinname-nostalgia' => 'Nostalgia',
'skinname-cologneblue' => 'Azul colonial',
'skinname-monobook' => 'MonoBook',
-'skinname-myskin' => 'MySkin',
-'skinname-chick' => 'Chique',
-'skinname-simple' => 'Simples',
'skinname-modern' => 'Moderno',
'skinname-vector' => 'Vector',
* @author Teles
* @author TheGabrielZaum
* @author Urhixidur
+ * @author Vivaelcelta
* @author Vuln
* @author Waldir
* @author Yves Marques Junqueira
'nov' => 'Abbreviation of November, the eleventh month of the Gregorian calendar',
'dec' => 'Abbreviation of December, the twelfth month of the Gregorian calendar',
+'monday-at' => 'Phrase for indicating that something occurred at a particular time on the most recent Monday. $1 is the time.',
+'tuesday-at' => 'Phrase for indicating that something occurred at a particular time on the most recent Tuesday. $1 is the time.',
+'wednesday-at' => 'Phrase for indicating that something occurred at a particular time on the most recent Wednesday. $1 is the time.',
+'thursday-at' => 'Phrase for indicating that something occurred at a particular time on the most recent Thursday. $1 is the time.',
+'friday-at' => 'Phrase for indicating that something occurred at a particular time on the most recent Friday. $1 is the time.',
+'saturday-at' => 'Phrase for indicating that something occurred at a particular time on the most recent Saturday. $1 is the time.',
+'sunday-at' => 'Phrase for indicating that something occurred at a particular time on the most recent Sunday. $1 is the time.',
+'today-at' => 'Phrase for indicating that something occurred at a particular time today. $1 is the time.',
+'yesterday-at' => 'Phrase for indicating that something occurred at a particular time yesterday. $1 is the time.',
+
# Categories related messages
'pagecategories' => 'Used in the categories section of pages. Is followed by a colon and a list of categories.',
'category_header' => 'In category description page',
'userlogin-yourpassword' => 'In new vertical user login & create account forms, label for password field.
{{Identical|Password}}',
'userlogin-yourpassword-ph' => 'Placeholder text in new userlogin form for password field.',
+'createacct-helpusername-url' => 'The URL of a page providing username guidance for the wiki.',
+'createacct-helpusername-link' => 'Message in new create account form providing guidance for username.',
+'createacct-yourpassword-ph' => 'Placeholder text in new create account form for password field.',
'yourpasswordagain' => 'In user preferences',
+'createacct-yourpasswordagain' => 'In new create account form, label for field to re-enter password',
+'createacct-yourpasswordagain-ph' => 'Placeholder text in new create account form for re-enter password field.',
'remembermypassword' => 'A check box in [[Special:UserLogin]]
{{Identical|Remember my login on this computer}}',
'gotaccountlink' => 'Text of the link to the log in form. Before that link, the message {{msg-mw|Gotaccount}} appears.
{{Identical|Log in}}',
'userlogin-resetlink' => 'Used on the login page.',
-'helplogin-url' => 'Used as name of the page that provides information about logging into the wiki.
-"Help" is the namespace name and should not be translated.
+'helplogin-url' => '{{doc-important|Do not translate the namespace name <code>Help</code>.}}
+Used as name of the page that provides information about logging into the wiki.
Used as a link target in the message {{msg-mw|Userlogin-helplink}}.',
'userlogin-helplink' => '{{doc-important|Do not change <code><nowiki>{{MediaWiki:helplogin-url}}</nowiki></code>.}}
See also:
* {{msg-mw|Helplogin-url}}',
+'createacct-join' => 'Subheading of vertical-layout create account form encouraging user to join the wiki.',
+'createacct-emailrequired' => 'Label in vertical-layout create account form for email field when it is required.',
+'createacct-emailoptional' => 'Label in vertical-layout create account form for email field when it is optional.',
+'createacct-email-ph' => 'Placeholder in vertical-layout create account form for email field.',
'createaccountmail' => 'Button text for creating a new account and sending the new password to the specified e-mail address directly, as used on [[Special:UserLogin/signup]] if creating accounts by e-mail is allowed.',
+'createacct-realname' => 'In vertical-layout create account form, label for field to enter optional real name.',
'createaccountreason' => '{{Identical|Reason}}',
+'createacct-reason' => 'In vertical-layout create account form, label for field to enter reason to create an account when already logged-in.',
+'createacct-captcha' => 'Label in vertical-layout create account form for CAPTCHA input field when repositioned by JavaScript.',
+'createacct-captcha-help-url' => 'The URL of a page providing CAPTCHA assistance for the wiki.',
+'createacct-imgcaptcha-help' => 'Help text in vertical-layout create account form for image CAPTCHA input field when repositioned by JavaScript.',
+'createacct-imgcaptcha-ph' => 'Placehodler text in vertical-layout create account form for image CAPTCHA input field when repositioned by JavaScript.',
+'createacct-benefit-heading' => 'In vertical-layout create account form, the heading for the section describing the benefits of creating an account.',
+'createacct-benefit-icon1' => 'In vertical-layout create account form, the CSS style for the div next to the first benefit. If you replace this you will need probably need to adjust CSS.',
+'createacct-benefit-head1' => 'In vertical-layout create account form, the text in the heading for the first benefit. Do not edit the magic word; if you replace it you will probably need to adjust CSS.',
+'createacct-benefit-body1' => 'In vertical-layout create account form, the text for the first benefit.',
+'createacct-benefit-icon2' => 'In vertical-layout create account form, the CSS style for the div next to the second benefit. If you replace this you will need probably need to adjust CSS.',
+'createacct-benefit-head2' => 'In vertical-layout create account form, the text in the heading for the second benefit. Do not edit the magic word; if you replace it you will probably need to adjust CSS.',
+'createacct-benefit-body2' => 'In vertical-layout create account form, the text for the second benefit.',
+'createacct-benefit-icon3' => 'In vertical-layout create account form, the CSS style for the div next to the third benefit. If you replace this you will need probably need to adjust CSS.',
+'createacct-benefit-head3' => 'In vertical-layout create account form, the text in the heading for the third benefit. Do not edit the magic word; if you replace it you will probably need to adjust CSS.',
+'createacct-benefit-body3' => 'In vertical-layout create account form, the text for the third benefit.',
'badretype' => 'Used as error message when the new password and its retype do not match.',
'userexists' => 'Used as error message in creating a user account.',
'loginerror' => 'Used as title of error message.
Parameters:
* $1 is a user name. This parameter can be used with GENDER.',
-'noemailcreate' => 'Used as error message in [[Special:UserLogin]].',
+'noemailcreate' => 'Used as error message when one user creates an account for another and there is no email.',
'passwordsent' => '* $1 - username',
'blocked-mailpassword' => 'Used as error message in password recovery.',
'eauthentsent' => "This message appears after entering an e-mail address in [[Special:Preferences]] > {{int:prefs-personal}} > {{int:email}}, then clicking on '{{int:saveprefs}}'.",
See also:
* {{msg-mw|Passwordreset-emailsent}}
* {{msg-mw|Passwordreset-emailerror-capture}}',
-'passwordreset-emailerror-capture' => 'Error message displayed in [[Special:PasswordReset]] when sending an e-mail fails. Parameters:
+'passwordreset-emailerror-capture' => 'Error message displayed in [[Special:PasswordReset]] when sending an email fails. Parameters:
* $1 - error message
+* $2 - username, used for GENDER
See also:
* {{msg-mw|Passwordreset-emailsent}}
* {{msg-mw|Passwordreset-emailsent-capture}}',
See also:
* {{msg-mw|Searchprofile-images|message}}
-* {{msg-mw|Searchprofile-images-tooltip|tooltip}}',
+* {{msg-mw|Searchprofile-images-tooltip|tooltip}}
+{{Identical|Muitimedia}}',
'searchprofile-everything' => 'Used as an option in [[Special:Search]].
See also:
'contribsub2' => 'Contributions for "user" (links)
{{Identical|For $1}}',
'nocontribs' => 'Optional parameter: $1 is the user name',
-'uctop' => 'This message is used in [[Special:Contributions]]. It is used to show that a particular edit was the last made to a page. Example: 09:57, 11 February 2008 (hist) (diff) Pagename (edit summary) (top)',
+'uctop' => 'This message is used in [[Special:Contributions]]. It is used to show that a particular edit was the last made to a page. Example: 09:57, 11 February 2008 (hist) (diff) Pagename (edit summary) (top)
+{{Identical|Top}}',
'month' => 'Used in [[Special:Contributions]] and history pages ([{{fullurl:Sandbox|action=history}} example]), as label for a dropdown box to select a specific month to view the edits made in that month, and the earlier months. See also {{msg-mw|year}}.',
'year' => 'Used in [[Special:Contributions]] and history pages ([{{fullurl:Sandbox|action=history}} example]), as label for an input box to select a specific year to view the edits made in that year, and the earlier years.
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-hans' => '{{Optional}}
This contains how the information in the picture is stored. This is most commonly Y, Cr, Cb to specify luma, red, blue. RGB is also possible to specify Red, Green, Blue.
{{Related|Exif-componentsconfiguration}}',
'exif-compressedbitsperpixel' => 'Exif is a format for storing metadata in image files. See this [[w:Exchangeable_image_file_format|Wikipedia article]] and the example at the bottom of [[commons:File:Phalacrocorax-auritus-020.jpg|this page on Commons]]. The tags are explained [http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html briefly] and [http://www.kodak.com/global/plugins/acrobat/en/service/digCam/exifStandard2.pdf in further detail].',
-'exif-pixelydimension' => 'Exif is a format for storing metadata in image files. See this [[w:Exchangeable_image_file_format|Wikipedia article]] and the example at the bottom of [[commons:File:Phalacrocorax-auritus-020.jpg|this page on Commons]]. The tags are explained [http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html briefly] and [http://www.kodak.com/global/plugins/acrobat/en/service/digCam/exifStandard2.pdf in further detail].',
+'exif-pixelydimension' => 'Exif is a format for storing metadata in image files. See this [[w:Exchangeable_image_file_format|Wikipedia article]] and the example at the bottom of [[commons:File:Phalacrocorax-auritus-020.jpg|this page on Commons]]. The tags are explained [http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html briefly] and [http://www.kodak.com/global/plugins/acrobat/en/service/digCam/exifStandard2.pdf in further detail].
+{{Identical|Image width}}',
'exif-pixelxdimension' => 'Exif is a format for storing metadata in image files. See this [[w:Exchangeable_image_file_format|Wikipedia article]] and the example at the bottom of [[commons:File:Phalacrocorax-auritus-020.jpg|this page on Commons]]. The tags are explained [http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html briefly] and [http://www.kodak.com/global/plugins/acrobat/en/service/digCam/exifStandard2.pdf in further detail].',
'exif-usercomment' => "Exif is a format for storing metadata in image files. See this [[w:Exchangeable_image_file_format|Wikipedia article]] and the example at the bottom of [[commons:File:Phalacrocorax-auritus-020.jpg|this page on Commons]]. The tags are explained [http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html briefly] and [http://www.kodak.com/global/plugins/acrobat/en/service/digCam/exifStandard2.pdf in further detail].
# Image rotation
'rotate-comment' => 'Edit summary for the act of rotating an image.',
+# Unknown messages
+'hours-ago' => 'Phrase for indicating that something occurred a certain number of hours ago',
+'minutes-ago' => 'Phrase for indicating that something occurred a certain number of minutes ago',
+'seconds-ago' => 'Phrase for indicating that something occurred a certain number of seconds ago',
);
'tog-shownumberswatching' => "Rikuchiy hayk'a watiqaq ruraqkuna",
'tog-oldsig' => "Kachkaqña silq'uy:",
'tog-fancysig' => "Silq'uyta wiki qillqa hinata llamk'achiy (mana kikinmanta t'inkichaq silq'uy)",
-'tog-externaleditor' => "Kikinmanta hawa llamk'apunata llamk'achiy (kamayuqkunallapaq, antañiqiqniykipi sapaq allinkachinakuna kananmi. [//www.mediawiki.org/wiki/Manual:External_editors Astawan ñawiriy.])",
-'tog-externaldiff' => "Kikinmanta hawa ''diff'' (wakin kay) nisqata llamk'achiy (kamayuqkunallapaq, antañiqiqniykipi sapaq allinkachinakuna kananmi. [//www.mediawiki.org/wiki/Manual:External_editors Astawan ñawiriy.])",
'tog-showjumplinks' => "«Chayman phinkiy» aypanalla t'inkikunata saqillay",
'tog-uselivepreview' => "''Live preview'' nisqa ñawpaq qhawayta llamk'achiy (JavaScript) (llamiy aknaraq)",
'tog-forceeditsummary' => "Ch'usaq llamk'apuy waqaychasqa kachkaptinqa ch'itiyay.",
'tog-showhiddencats' => 'Pakasqa katiguriyakunata rikuchiy',
'tog-noconvertlink' => "T'inki suti t'ikrayman ama niy",
'tog-norollbackdiff' => 'Ruraqpa hukchasqankunata kutichispa ama wakin kayta willaychu',
+'tog-useeditwarning' => "Yuyampaway p'anqata saqiptiy manaraq rurarqusqay hukchasqakunata waqaychaspay.",
'underline-always' => "Hayk'appas",
'underline-never' => "Mana hayk'appas",
'defaultmessagetext' => 'Ñawpaq qillqa',
'invalid-content-data' => 'Samiqmanta willaykunaqa manam allinchu',
'content-not-allowed-here' => '"$1" nisqa samiqqa [[$2]] sutiyuq p\'anqapi manam saqillasqachu',
+'editwarning-warning' => "Kay p'anqata saqispaykiqa lliw rurarqusqayki hukchasqakunatachá chinkachiykiman.
+Yaykusqa kaspaykiqa, kay yuyampayta hark'ayta atinki allinkachinaykikunapi \"Llamk'apusqa\" rakipi.",
# Content models
'content-model-wikitext' => 'wiki qillqa',
'search-external' => 'Hawapi maskay',
'searchdisabled' => "{{SITENAME}} nisqapi maskaymanqa ama nisqam. Hinachkaptinqa, maskariy google nisqawan icha huk hawa maskanakunawan, ichataq yuyariy, {{SITENAME}}manta hallch'asqankunaqa manañachá musuqllachu.",
-# Quickbar
-'qbsettings' => 'Utqaytawna ("Quickbar") allinkachinakuna',
-'qbsettings-none' => 'Mana imapas',
-'qbsettings-fixedleft' => "Lluq'iman watay",
-'qbsettings-fixedright' => 'Pañaman watay',
-'qbsettings-floatingleft' => "Lluq'iman tuytuy",
-'qbsettings-floatingright' => 'Pañaman tuytuy',
-'qbsettings-directionality' => 'Watasqa, rimayniykip qillqa puririyninmanta wachariq',
-
# Preferences page
'preferences' => 'Allinkachinakuna',
'mypreferences' => 'Allinkachinaykuna',
'http-read-error' => 'HTTP ñawiriy pantasqa.',
'http-timed-out' => "HTTP mañakuypa mit'anqa lluqsikusqañam.",
'http-curl-error' => 'URL apamuypi pantasqa: $1',
-'http-host-unreachable' => 'Manam aypanichu URL-ta.',
'http-bad-status' => 'HTTP mañakuypi sasachakuymi tukukurqan: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
# Stylesheets
'common.css' => "/* Churamusqa CSS chantakunaqa tukuy qarakunapim llamk'anqa */",
-'standard.css' => "/* Churamusqa CSS chantakunaqa ''Standard skin'' nisqa qarata llamk'achiq ruraqkunapaq llamk'anqa */",
-'nostalgia.css' => "/* Churamusqa CSS chantakunaqa ''Nostalgia skin'' nisqa qarata llamk'achiq ruraqkunapaq llamk'anqa */",
'cologneblue.css' => "/* Churamusqa CSS chantakunaqa ''Cologne Blue skin'' nisqa qarata llamk'achiq ruraqkunapaq llamk'anqa */",
'monobook.css' => '/* Kayman churasqa CSS nisqaqa Monobook qaratam hukchanqa tukuy internet tiyanapaq */',
-'myskin.css' => "/* Churamusqa CSS chantakunaqa ''MySkin'' nisqa qarata llamk'achiq ruraqkunapaq llamk'anqa */",
-'chick.css' => "/* Churamusqa CSS chantakunaqa ''Chick skin'' nisqa qarata llamk'achiq ruraqkunapaq llamk'anqa */",
-'simple.css' => "/* Churamusqa CSS chantakunaqa ''Simple skin'' nisqa qarata llamk'achiq ruraqkunapaq llamk'anqa */",
'modern.css' => "/* Churamusqa CSS chantakunaqa ''Modern skin'' nisqa qarata llamk'achiq ruraqkunapaq llamk'anqa */",
'print.css' => "/* Churamusqa CSS chantakunaqa ch'ipachinap rikch'akuynintam hukchanqa */",
'handheld.css' => "/* Churamusqa CSS chantakunaqa makiwan hap'isqa qarapi tiksisqa \$wgHandheldStyle nisqapi allichasqa antakunap llamk'aynintam hukchanqa */",
# Scripts
'common.js' => "/* Ima kaypi kaq JavaScript qillqapas tukuy ruraqkunapaq tukuy p'anqakunap tukuy chaqnankunapi chaqnamusqa kanqa. */",
-'standard.js' => "/* Ima kaypi qillqamusqa JavaScript nisqa wakichi qillqapas ''Standard skin'' nisqa sapsi qarata llamk'achiq ruraqkunapaq chaqnasqa kanqa */",
-'nostalgia.js' => "/* Ima kaypi qillqamusqa JavaScript nisqa wakichi qillqapas ''Nostalgia skin'' nisqa qarata llamk'achiq ruraqkunapaq chaqnasqa kanqa */",
'cologneblue.js' => "/* Ima kaypi qillqamusqa JavaScript nisqa wakichi qillqapas ''Cologne Blue skin'' nisqa qarata llamk'achiq ruraqkunapaq chaqnasqa kanqa */",
'monobook.js' => "/* Ima kaypi qillqamusqa JavaScript nisqa wakichi qillqapas MonoBook nisqata llamk'achiq ruraqkunapaq chaqnasqa kanqa */",
-'myskin.js' => "/* Ima kaypi qillqamusqa JavaScript nisqa wakichi qillqapas ''MySkin'' nisqa qarata llamk'achiq ruraqkunapaq chaqnasqa kanqa */",
-'chick.js' => "/* Ima kaypi qillqamusqa JavaScript nisqa wakichi qillqapas ''Chick skin'' nisqa qarata llamk'achiq ruraqkunapaq chaqnasqa kanqa */",
-'simple.js' => "/* Ima kaypi qillqamusqa JavaScript nisqa wakichi qillqapas ''Simple skin'' nisqa qarata llamk'achiq ruraqkunapaq chaqnasqa kanqa */",
'modern.js' => "/* Ima kaypi qillqamusqa JavaScript nisqa wakichi qillqapas ''Modern skin'' nisqa qarata llamk'achiq ruraqkunapaq chaqnasqa kanqa */",
# Metadata
'tog-shownumberswatching' => "Mussar il dumber d'utilisaders che obervan questa pagina",
'tog-oldsig' => 'Signatura actuala:',
'tog-fancysig' => "Suttascripziun senza link automatic tar la pagina da l'utilisader.",
-'tog-externaleditor' => 'Utilisar sco standard in editur extern (be per experts, basegna ina configuraziun speziala da des computer. [//www.mediawiki.org/wiki/Manual:External_editors Dapli infurmaziuns.])',
-'tog-externaldiff' => 'Utilisar sco standard in program extern per visualisar differenzas tranter versiuns (be per experts, basegna ina configuraziun speziala da des computer. [//www.mediawiki.org/wiki/Manual:External_editors Dapli infurmaziuns.])',
'tog-showjumplinks' => 'Activar las colliaziuns "seglir a"',
'tog-uselivepreview' => 'Utilisar la prevista dinamica (basegna JavaScript) (experiment!)',
'tog-forceeditsummary' => 'Avertir durant memoriar sche la resumaziun manca',
Ti pos tschertgar en il fratemp cun Google.
Considerescha che lur index da {{SITENAME}} po cuntegnair datas ch'èn betg pli actualas.",
-# Quickbar
-'qbsettings' => 'Glista laterala',
-'qbsettings-none' => 'Nagins',
-'qbsettings-fixedleft' => 'Sanester, fixà',
-'qbsettings-fixedright' => 'Dretg, fixà',
-'qbsettings-floatingleft' => 'Sanester, flottand',
-'qbsettings-floatingright' => 'Dretg, flottand',
-'qbsettings-directionality' => 'Fixà, dependent da la direcziun da scriver da tia lingua',
-
# Preferences page
'preferences' => 'Preferenzas',
'mypreferences' => 'Preferenzas',
'http-read-error' => 'Sbagl da leger HTTP.',
'http-timed-out' => 'Surpassà il temp durant la dumonda HTTP.',
'http-curl-error' => "Errur cun recuperar l'URL: $1",
-'http-host-unreachable' => "Impussibel da cuntanscher l'URL.",
'http-bad-status' => 'Durant la dumonda HTTP è ina errur capitada: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => 'Betg chattà in utilisader.',
'listusers-blocked' => '(bloccà)',
-# Special:ActiveUsers
-'activeusers' => 'Glista dals utilisaders activs',
-'activeusers-intro' => "Quai è ina glista dals utilisaders che han gì activitads {{PLURAL:$1|l'ultim di|en ils ultims $1 dis}}.",
-'activeusers-count' => "$1 {{PLURAL:$1|modificaziun|modificaziuns}} {{PLURAL:$3|l'ultim di|ils ultims $3 dis}}",
-'activeusers-from' => 'Mussar utilisaders davent da:',
-'activeusers-hidebots' => 'Zuppentar bots',
-'activeusers-hidesysops' => 'Zuppentar administraturs',
-'activeusers-noresult' => 'Chattà nagins utilisaders.',
-
# Special:ListGroupRights
'listgrouprights' => "Dretgs da las gruppas d'utilisaders",
'listgrouprights-summary' => "Sutvart vegn mussada ina glista da las gruppas d'utilisaders sin questa wiki cun ils dretgs d'access associads.
'nov' => 'nov',
'dec' => 'dec',
+'monday-at' => 'Luni, la $1',
+'tuesday-at' => 'Marți, la $1',
+'wednesday-at' => 'Miercuri, la $1',
+'thursday-at' => 'Joi,la $1',
+'friday-at' => 'Vineri, la $1',
+'saturday-at' => 'Sâmbătă, la $1',
+'sunday-at' => 'Duminică, la $1',
+'today-at' => '$1',
+'yesterday-at' => 'Ieri, la $1',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|Categorie|Categorii}}',
'category_header' => 'Pagini din categoria „$1”',
Parolă temporară: $2',
'passwordreset-emailsent' => 'A fost trimis un e-mail de resetare a parolei.',
'passwordreset-emailsent-capture' => 'Un mesaj de resetare a parolei a fost trimis, fiind afișat mai jos.',
-'passwordreset-emailerror-capture' => 'Un mesaj de resetare a parolei a fost generat (fiind afișat mai jos), dar trimiterea sa către utilizator a eșuat: $1',
+'passwordreset-emailerror-capture' => 'Un mesaj de resetare a parolei a fost generat (fiind afișat mai jos), dar trimiterea sa către {{GENDER:$2|utilizator}} a eșuat: $1',
# Special:ChangeEmail
'changeemail' => 'Modificare adresă de e-mail',
# Image rotation
'rotate-comment' => 'Imagine rotită în sensul acelor de ceasornic cu $1 {{PLURAL:$1|grad|grade|de grade}}',
+# Unknown messages
+'hours-ago' => 'acum $1 {{PLURAL:$1|oră|ore|de ore}}',
+'minutes-ago' => 'acum $1 {{PLURAL:$1|minut|minute|de minute}}',
+'seconds-ago' => 'acum {{PLURAL:$1|o secundă|$1 secunde|$1 de secunde}}',
);
Passuord temboranèe: $2',
'passwordreset-emailsent' => "'N'e-mail pe arrecurdarte ha state mannate.",
'passwordreset-emailsent-capture' => "'Na e-mail pe azzeramende d'a passuord ha state mannate, ca jè fatte vedè aqquà sotte.",
-'passwordreset-emailerror-capture' => "'Na e-mail de azzeramende d'a passuord ha state generate, ca jè fatte vedè aqquà sotte, ma 'u 'nvie a l'utende ha fallite: $1",
+'passwordreset-emailerror-capture' => "'Na e-mail de azzeramende d'a passuord ha state generate, ca jè fatte vedè aqquà sotte, ma 'u 'nvie a {{GENDER:$2|l'utende}} ha fallite: $1",
# Special:ChangeEmail
'changeemail' => "Cange 'u 'ndirizze e-mail",
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-hans' => 'hans',
'tog-shownumberswatching' => 'निरीक्षमाणानां योजकानां संख्या दर्श्यताम्',
'tog-oldsig' => 'विद्यमानं हस्ताङ्कनम्:',
'tog-fancysig' => 'हस्ताक्षराणि विकिपाठवत् सन्तु (स्वचालित-संबंधनेभ्यः रहितानि)।',
-'tog-externaleditor' => 'Use external editor by default (for experts only, needs special settings on your computer. [//www.mediawiki.org/wiki/Manual:External_editors More information.])',
-'tog-externaldiff' => 'अकथिते (बाइ डिफाल्ट् इति), बाह्य अंतरक्रमादेशं प्रयोजयतु (केवलेभ्यः निपुणेभ्यः, भवतः संगणके विशेषाः न्यासाः आवश्यकाः)।',
'tog-showjumplinks' => '"इत्येतत् प्रति कूर्दयतु" इति संबंधनानि समर्थयतु।',
'tog-uselivepreview' => 'संपादनेन सहैव प्राग्दृश्यं दर्शयतु (जावालिपिः अपेक्ष्यते) (प्रयोगात्मकम्)।',
'tog-forceeditsummary' => 'सम्पादनसारांशः न ददामि चेत् तदा मां ज्ञापयतु।',
'tog-diffonly' => 'आवृत्तिसु अंतरं दर्शयन् पुरातनाः आवृत्तयः मा दर्शयतु।',
'tog-showhiddencats' => 'निगूढाः वर्गाः दर्श्यन्ताम्',
'tog-norollbackdiff' => 'पूर्णप्रतिगमने कृते मा दर्शयतु तद् अंतरम्।',
+'tog-useeditwarning' => 'सम्पादनानन्तरं रक्षणेन विना पृष्ठत्यागावसरे स्मार्यताम्',
'underline-always' => 'सर्वदा',
'underline-never' => 'कदापि न',
'defaultmessagetext' => 'सन्देशपाठं स्थिरयतु ।',
'invalid-content-data' => 'अमान्यः सामग्रीदत्तांशः',
'content-not-allowed-here' => '[[$2]] इति पृष्ठे "$1" सामग्री अनुमता नास्ति।',
+'editwarning-warning' => 'अस्मात् पृष्ठात् गमनेन अत्र भवता कृतानि परिवर्तनानि निष्फलानि भवेयुः ।
+भवता यदि प्रविष्टं तर्हि मम इष्टतमानि इत्यत्र अस्मिन् विभागे सम्पादनेन एषः प्रबोधः यथा न आगच्छेत् तथा कर्तुं शक्यते ।',
# Content models
'content-model-wikitext' => 'विकिपाठः',
अश्मिन् समये भवान् गूगल माध्यमेन अन्वेषणं कर्तुं शक्नोति
स्मरयतु यत् {{SITENAME}} इति स्थलस्य क्रमाङ्का नैव अद्यातना इति सोच्यते।',
-# Quickbar
-'qbsettings' => 'शीघ्रपट',
-'qbsettings-none' => 'नास्ति',
-'qbsettings-fixedleft' => 'बामे स्थापितः',
-'qbsettings-fixedright' => 'दक्षिणे स्थापितः',
-'qbsettings-floatingleft' => 'वामप्लवनम् ।',
-'qbsettings-floatingright' => 'दक्षिणे प्लवनम् ।',
-'qbsettings-directionality' => 'निश्चितम् । ते भाषालिप्याः दिशात्मकतानुसारं भवति ।',
-
# Preferences page
'preferences' => 'इष्टतमानि',
'mypreferences' => 'मम इष्टतमानि',
'welcomecreation-msg' => 'Аатыҥ бэлиэтэннэ.
{{SITENAME}} ситим-сиргэ үлэлииргэ табыгастаах буоллун диэн [[Special:Preferences|тус туруорууларгын]] уларытыаххын сөп.',
'yourname' => 'Кыттааччы аатыҥ:',
+'userlogin-yourname' => 'Бэлиэ-аат',
+'userlogin-yourname-ph' => 'Бэлиэ-ааккын киллэр',
'yourpassword' => 'Киирии тыла:',
+'userlogin-yourpassword' => 'Киирии тыл',
+'userlogin-yourpassword-ph' => 'Киирии тылгын суруй',
'yourpasswordagain' => 'Киирии тылгын хатылаа:',
'remembermypassword' => 'Миигин бу көмпүүтэргэ сигээ ($1 {{PLURAL:$1|күн|күнтэн ордуга суох}})',
+'userlogin-remembermypassword' => 'Долоҕойгор хатаа',
+'userlogin-signwithsecure' => 'Бигэ сиэрбэри туһанан киирии',
'securelogin-stick-https' => 'Киирэн баран HTTPS нөҥүө холбонууну салгыырга',
'yourdomainname' => 'Эн дөмүөнүҥ:',
'password-change-forbidden' => 'Бу биикигэ киирии тылы уоарытар табыллыбат.',
'logout' => 'Тахсыы',
'userlogout' => 'Тахсыы',
'notloggedin' => 'Ааккын эппэтиҥ',
+'userlogin-noaccount' => 'Бэлиэтэнэ иликкин дуо?',
+'userlogin-joinproject' => '{{SITENAME}} ситим-сиргэ киирии',
'nologin' => "Бэлиэтэнэ иликкин дуо? '''$1'''.",
'nologinlink' => 'Бэлиэтэнии',
'createaccount' => 'Бэлиэтэнии',
'gotaccount' => "Бэлиэтэммитиҥ дуо? '''$1'''.",
'gotaccountlink' => 'Аатыҥ',
'userlogin-resetlink' => 'Киирэр тылгын умнубуккун дуо?',
+'helplogin-url' => 'Help:Бэлиэ-ааты киллэрии',
+'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Бэлиэтэниигэ көмө]]',
'createaccountmail' => 'Быстах киирии тылы туһаныы уонна ону email-ынан ыытыы',
'createaccountreason' => 'Төрүөтэ:',
'badretype' => 'Киирии тылларыҥ сөп түбэспэтилэр.',
'revdelete-uname-unhid' => 'кыттааччы аата көстөр буолбут',
'revdelete-restricted' => 'хааччахтааһын администраатардарга сыһыаннаах',
'revdelete-unrestricted' => 'хааччахтааһын админстраатардартан уһулунна',
-'logentry-move-move' => '$3 сирэй аатын $1 манныкка $4 уларыппыт',
+'logentry-move-move' => '$1 $3 сирэй аатын маннык $4 уларыппыт',
'logentry-move-move-noredirect' => '$3 сирэй аатын $1 маннык $4 уларыппыт, утаарыы-сирэй хаалларбатах',
'logentry-move-move_redir' => '$3 сирэйи $1 диэн кыттааччы манныкка $4 уларыппыт (утаарыы үрдүнэн)',
'logentry-move-move_redir-noredirect' => '$1 $3 сирэй аатын утаарыы үрдүнэн маннык $4 уларыппыт, утаарыы-сирэй хаалларбатах',
'tog-shownumberswatching' => 'Ńelok laṛcaṛkoaḱ songkha uduḱme',
'tog-oldsig' => 'Menaḱ signạtar',
'tog-fancysig' => 'Signạcar do wikiṭesk hisạbte moneyemẽ (jahan acte hoyoḱ joṛao bạgikate)',
-'tog-externaleditor' => 'Etohoṕre bahre reaḱ sompadonićaḱ beohar hoyoḱma (khali sẽṛa beoharić lạgit́te, kompeuṭare asokae seṭing jạruṛa. [//www.mediawiki.org/wiki/manual:External_editors More information.])',
-'tog-externaldiff' => 'Etohoṕre bahre reaḱ sompadonićaḱ beohar hoyoḱma (khali sẽṛa beoharić lạgit́te, kompeuṭare asokae seṭing jạruṛa. [//www.mediawiki.org/wiki/manual:External_editors More information.])',
'tog-showjumplinks' => '"Calaḱmẽ" beohar joṛao ehop hoyoḱma',
'tog-uselivepreview' => 'Jewet́ ńeloḱ beoharme (JavaScript jaruṛ menaḱa)',
'tog-forceeditsummary' => 'Khạli sompadon guṭkatha em oktere iń baḍae ocoyiń hoyoḱma',
'powersearch-toggleall' => 'Sanamaḱ',
'powersearch-togglenone' => 'Okaṭaḱ hõ baṅ',
-# Quickbar
-'qbsettings-none' => 'Okaṭaḱ hõ baṅ',
-
# Preferences page
'preferences' => 'Pạsindko',
'mypreferences' => 'Iñaḱ pạsindko',
'tog-shownumberswatching' => 'Prikaži broj korisnika koji prate',
'tog-oldsig' => 'Postojeći potpis:',
'tog-fancysig' => 'Smatraj potpis kao wikitekst (bez automatskog linka)',
-'tog-externaleditor' => 'Redovno koristite eksterni editor (samo za naprednije korisnike, potrebne su posebne postavke na vašem računaru)',
-'tog-externaldiff' => 'Redovno koristi vanjski (diff) program za prikaz razlika (samo za naprednije korisnike, potrebne posebne postavke na vašem računaru [//www.mediawiki.org/wiki/Manual:External_editors Više informacija.])',
'tog-showjumplinks' => 'Omogući opciju "skoči na" linkove',
'tog-uselivepreview' => 'Koristite pretpregled uživo (potreban JavaScript) (eksperimentalno)',
'tog-forceeditsummary' => 'Opomeni me pri unosu praznog sažetka',
U međuvremenu možete pretraživati preko Googlea.
Uzmite u obzir da njegovi indeksi za ovu Wiki ne moraju biti ažurirani.',
-# Quickbar
-'qbsettings' => 'Podešavanja brze palete',
-'qbsettings-none' => 'Nikakva',
-'qbsettings-fixedleft' => 'Fiksirana lijevo',
-'qbsettings-fixedright' => 'Fiksirana desno',
-'qbsettings-floatingleft' => 'Plutajuća lijevo',
-'qbsettings-floatingright' => 'Plutajuća desno',
-'qbsettings-directionality' => 'Fiksno, ovisno o smjeru pisma Vašeg jezika',
-
# Preferences page
'preferences' => 'Postavke',
'mypreferences' => 'Postavke',
'http-read-error' => 'Greška pri čitanju HTTP.',
'http-timed-out' => 'Istekao HTTP zahtjev.',
'http-curl-error' => 'Greška pri otvaranju URLa: $1',
-'http-host-unreachable' => 'Ovaj URL nije bilo moguće otvoriti',
'http-bad-status' => 'Nastao je problem tokom HTTP zahtjeva: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => 'Nije pronađen korisnik.',
'listusers-blocked' => '(blokiran)',
-# Special:ActiveUsers
-'activeusers' => 'Spisak aktivnih korisnika',
-'activeusers-intro' => 'Ovo je spisak korisnika koji su napravili neku aktivnost u {{PLURAL:$1|zadnji $1 dan|zadnja $1 dana|zadnjih $1 dana}}.',
-'activeusers-count' => '{{PLURAL:$1|$1 izmjena|$1 izmjene|$1 izmjena}} u {{PLURAL:$3|posljednji $3 dan|posljednja $3 dana|posljednjih $3 dana}}',
-'activeusers-from' => 'Prikaži korisnike koji počinju sa:',
-'activeusers-hidebots' => 'Sakrij botove',
-'activeusers-hidesysops' => 'Sakrij administratore',
-'activeusers-noresult' => 'Nije pronađen korisnik.',
-
# Special:ListGroupRights
'listgrouprights' => 'Prava korisničkih grupa',
'listgrouprights-summary' => 'Slijedi spisak korisničkih grupa na ovoj wiki, s njihovim pravima pristupa.
'tog-shownumberswatching' => 'මුර කරනු ලබන පරිශීලකයන් සංඛ්යාව පෙන්වන්න',
'tog-oldsig' => 'පවතින අත්සන:',
'tog-fancysig' => 'අත්සන විකිපෙළ (ස්වයංක්රීය සබැඳියක් විරහිතව) ලෙසින් සලකන්න',
-'tog-externaleditor' => 'බාහිර සම්පාදකයක් භාවිත කරන්න (ප්රවීණයන් සඳහා පමණි, ඔබගේ පරිගණකයේ විශේෂිත වූ සැකසුම් අවශ්ය වේ. [//www.mediawiki.org/wiki/Manual:External_editors තවත් තොරතුරු.])',
-'tog-externaldiff' => 'බාහිර ප්රභේදයක් භාවිත කරන්න (ප්රවීණයන් සඳහා පමණි, ඔබගේ පරිගණකයේ විශේෂිත වූ සැකසුම් අවශ්ය වේ. [//www.mediawiki.org/wiki/Manual:External_editors තවත් තොරතුරු.])',
'tog-showjumplinks' => '"වෙත පනින්න" යන ප්රවේශතා සබැඳියන් සක්රීය කරන්න',
'tog-uselivepreview' => 'තත්කාල පෙර-දසුන භාවිතා කරන්න (ජාවාස්ක්රිප්ට්) (පරීක්ෂණාත්මක)',
'tog-forceeditsummary' => 'හිස් සංස්කරණ සාරාංශයකට මා ඇතුළු වන විට මාහට ඉඟි කරන්න',
'tog-showhiddencats' => 'සැඟවුනු ප්රවර්ග පෙන්වන්න',
'tog-noconvertlink' => 'සබැඳියන්ගේ ශීර්ෂ පෙරැළීම අක්රීය කරන්න',
'tog-norollbackdiff' => 'පුනරාවර්තනයක් කිරීමෙන් පසු වෙනස්වීම් අත්හරින්න',
+'tog-useeditwarning' => 'මා සංස්කරණ පිටුවක් සුරකිනු නොලැබූ වෙනස්කිරීම් සමඟ අතහැර යන විට අවවාද කරන්න',
'underline-always' => 'සැමවිටම කරන්න',
'underline-never' => 'කිසිවිටෙක නොකරන්න',
එය දැනටමත් පවතියි.',
'defaultmessagetext' => 'සාමාන්ය පණිවුඩ පෙළ',
'invalid-content-data' => 'වලංගු නොවන අන්තර්ගත දත්ත',
+'editwarning-warning' => 'අවධානයට: මෙම පිටුවෙන් නික්ම යාම ඔබ සිදු කළ වෙනස්කම් නැතිවී යෑමට හේතු විය හැක.
+ඔබ ප්රවිෂ්ටවී ඇත්නම්, ඔබගේ වරණයන්වල "සංසකරණය කිරීම්" කොටසේ ඇති මෙම අනතුරු ඇඟවීම අක්රීය කළ හැක.',
# Content models
'content-model-wikitext' => 'විකිපෙළ',
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-hans' => 'hans',
'tog-shownumberswatching' => 'Zobraziť počet používateľov sledujúcich stránku',
'tog-oldsig' => 'Súčasný podpis:',
'tog-fancysig' => 'Považovať podpisy za wikitext (bez automatických odkazov)',
-'tog-externaleditor' => 'Používať štandardne externý editor (iba pre expertov, vyžaduje špeciálne nastavenie vášho počítača. [//www.mediawiki.org/wiki/Manual:External_editors Ďalšie informácie.])',
-'tog-externaldiff' => 'Používať štandardne externý diff (iba pre expertov, vyžaduje špeciálne nastavenie vášho počítača. [//www.mediawiki.org/wiki/Manual:External_editors Ďalšie informácie.])',
'tog-showjumplinks' => 'Používať odkazy „skočiť na“ pre lepšiu dostupnosť',
'tog-uselivepreview' => 'Používať živý náhľad (JavaScript) (experimentálna funkcia)',
'tog-forceeditsummary' => 'Upozoriť ma, keď nevyplním zhrnutie úprav',
'tog-showhiddencats' => 'Zobraziť skryté kategórie',
'tog-noconvertlink' => 'Vypnúť konverziu názvov odkazov',
'tog-norollbackdiff' => 'Vynechať rozdiel po vykonaní rollbacku',
+'tog-useeditwarning' => 'Upozorniť ma, keď opúšťam upravovaciu stránku s neuloženými zmenami',
'underline-always' => 'Vždy',
'underline-never' => 'Nikdy',
'nov' => 'nov',
'dec' => 'dec',
+'monday-at' => 'v pondelok o $1',
+'tuesday-at' => 'v utorok o $1',
+'wednesday-at' => 'v stredu o $1',
+'thursday-at' => 'vo štvrtok o $1',
+'friday-at' => 'v piatok o $1',
+'saturday-at' => 'v sobotu o $1',
+'sunday-at' => 'v nedeľu o $1',
+'today-at' => '$1',
+'yesterday-at' => 'včera o $1',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|Kategória|Kategórie|Kategórie}}',
'category_header' => 'Stránky v kategórii „$1“',
'newwindow' => '(otvorí v novom okne)',
'cancel' => 'Zrušiť',
'moredotdotdot' => 'Viac...',
+'morenotlisted' => 'Ďalšie neuvedené...',
'mypage' => 'Stránka',
'mytalk' => 'Diskusia',
'anontalk' => 'Diskusia k tejto IP adrese',
'namespaces' => 'Menné priestory',
'variants' => 'Varianty',
+'navigation-heading' => 'Navigačné menu',
'errorpagetitle' => 'Chyba',
'returnto' => 'Späť na $1.',
'tagline' => 'Z {{GRAMMAR:genitív|{{SITENAME}}}}',
Odteraz môžete používať {{GRAMMAR:akuzatív|{{SITENAME}}}} ako anonymný používateľ alebo sa môžete opäť <span class='plainlinks'>[$1 prihlásiť]</span> pod rovnakým alebo odlišným používateľským menom.
Uvedomte si, že niektoré stránky sa môžu naďalej zobrazovať ako keby ste boli prihlásený, až kým nevymažete vyrovnávaciu pamäť vášho prehliadača.",
+'welcomeuser' => 'Vitajte, $1 !',
+'welcomecreation-msg' => 'Váš účet bol vytvorený.
+Nezabudnite zmeniť svoje [[Special:Preferences|Predvoľby {{GRAMMAR:genitív|{{SITENAME}}}}]].',
'yourname' => 'Používateľské meno:',
+'userlogin-yourname' => 'Používateľské meno',
+'userlogin-yourname-ph' => 'Zadajte svoje používateľské meno',
'yourpassword' => 'Heslo:',
+'userlogin-yourpassword' => 'Heslo',
+'userlogin-yourpassword-ph' => 'Zadajte svoje heslo',
'yourpasswordagain' => 'Zopakujte heslo:',
'remembermypassword' => 'Pamätať si prihlásenie na tomto počítači (naviac $1 {{PLURAL:$1|deň|dni|dní}})',
+'userlogin-remembermypassword' => 'Zapamätať si ma',
+'userlogin-signwithsecure' => 'Prihlásiť sa na zabezpečený server',
'securelogin-stick-https' => 'Zostať pripojený cez HTTPS po prihlásení',
'yourdomainname' => 'Vaša doména:',
'password-change-forbidden' => 'Na tejto wiki si nemôžete zmeniť heslo.',
'logout' => 'Odhlásiť',
'userlogout' => 'Odhlásiť',
'notloggedin' => 'Neprihlásený/á',
+'userlogin-noaccount' => 'Nemáte ešte účet?',
+'userlogin-joinproject' => 'Pridajte sa k {{GRAMMAR:lokál|{{SITENAME}}}}',
'nologin' => "Nemáte ešte účet? '''$1'''.",
'nologinlink' => 'Vytvoriť nový účet',
'createaccount' => 'Vytvoriť nový účet',
'gotaccount' => "Máte už vytvorený účet? '''$1'''.",
'gotaccountlink' => 'Prihlásiť',
'userlogin-resetlink' => 'Zabudli ste svoje prihlasovacie údaje?',
-'createaccountmail' => 'e-mailom',
+'helplogin-url' => 'Pomoc:Prihlasovanie',
+'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Pomoc s prihlásením]]',
+'createaccountmail' => 'Použiť dočasné náhodné heslo a poslať ho na nižšie uvedenú emailovú adresu',
'createaccountreason' => 'Dôvod:',
'badretype' => 'Zadané heslá nie sú rovnaké.',
'userexists' => 'Zadané používateľské meno sa už používa.
'blocked-mailpassword' => 'Boli zablokované úpravy z vašej IP adresy, a tak nie je dovolené použiť funkciu znovuvyžiadania hesla, aby sa zabránilo zneužitiu.',
'eauthentsent' => 'Email s potvrdením bol zaslaný na uvedenú emailovú adresu.
Predtým ako sa na účet pošle akákoľvek ďalšia pošta, musíte splniť inštrukcie v emaili, aby sa potvrdilo, že účet je skutočne váš.',
-'throttled-mailpassword' => 'V priebehu {{PLURAL:$1|poslednej $1 hodiny|posledných $1 hodín}} už došlo k vyžiadaniu hesla.
-Aby sa zabránilo zneužitiu, vyžiadanie hesla je možné vykonať iba raz za {{PLURAL:$1|$1 hodinu|$1 hodiny|$1 hodín}}.',
+'throttled-mailpassword' => 'E-mail na obnovenie hesla už bol odoslaný v priebehu {{PLURAL:$1|poslednej $1 hodiny|posledných $1 hodín}}.
+Aby sa zabránilo zneužitiu, obnovenie hesla emailom je možné vykonať iba raz za {{PLURAL:$1|$1 hodinu|$1 hodiny|$1 hodín}}.',
'mailerror' => 'Chyba pri posielaní e-mailu: $1',
'acct_creation_throttle_hit' => 'Návštevníci tejto wiki z vašej IP adresy už za posledný deň vytvorili {{PLURAL:$1|$1 účet|$1 účty|$1 účtov}}, čo je maximálny počet povolený za toto časové obdobie.
Z tohto dôvodu nemôžu návštevníci z tejto IP adresy momentálne vytvoriť ďalšie účty.',
# Email sending
'php-mail-error-unknown' => 'Neznáma chyba vo funkcii PHP mail()',
'user-mail-no-addy' => 'Pokus o odoslanie e-mailu bez e-mailovej adresy.',
+'user-mail-no-body' => 'Sa pokúsil poslať email s prázdnym alebo neprimerane krátkym telom správy.',
# Change password dialog
'resetpass' => 'Zmeniť heslo',
# Special:PasswordReset
'passwordreset' => 'Reset hesla',
-'passwordreset-text' => 'Po vyplnení tohto formulára dostanete emailom podrobnosti o vašom účte.',
+'passwordreset-text' => 'Vyplnením tohto formulára si vytvoríte nové heslo.',
'passwordreset-legend' => 'Obnoviť heslo',
'passwordreset-disabled' => 'Obnovenie hesla bolo na tejto wiki zakázané.',
+'passwordreset-emaildisabled' => 'E-mailové funkcie boli na tejto wiki vypnuté.',
'passwordreset-pretext' => '{{PLURAL:$1|Zadajte nižšie uvedený údaj|Zadajte jeden z nižšie uvedených údajov}}',
'passwordreset-username' => 'Používateľské meno:',
'passwordreset-domain' => 'Doména:',
'passwordreset-capture-help' => 'Ak označíte toto políčko, bude e-mail (s dočasným heslom) okrem zaslania používateľovi zobrazený aj vám.',
'passwordreset-email' => 'Emailová adresa:',
'passwordreset-emailtitle' => 'Podrobnosti o účte na {{GRAMMAR:lokál|{{SITENAME}}}}',
-'passwordreset-emailtext-ip' => 'Niekto (pravdepodobne vy z IP adresy $1) požiadal pripomenutie podrobností o vašom
-účtu na {{GRAMMAR:genitív|{{SITENAME}}}} ($4). {{PLURAL:$3|Nasledujúci používateľský účet je spojený|Nasledujúce používateľské účty sú spojené}}
+'passwordreset-emailtext-ip' => 'Niekto (pravdepodobne vy z IP adresy $1) požiadal o obnovenie vášho hesla na {{GRAMMAR:genitív|{{SITENAME}}}} ($4). {{PLURAL:$3|Nasledujúci používateľský účet je spojený|Nasledujúce používateľské účty sú spojené}}
s touto emailovou adresou:
$2
Mali by ste sa prihlásiť teraz a zvoliť nové heslo. Ak túto žiadosť podal niekto iný alebo
ak ste si spomenuli svoje pôvodné heslo a už ho chcete zmeniť, môžete túto správu
ignorovať a ďalej používať vaše staré heslo.',
-'passwordreset-emailtext-user' => 'Používateľ $1 na {{GRAMMAR:genitív|{{SITENAME}}}} požiadal pripomenutie podrobností o vašom
-účtu na {{GRAMMAR:genitív|{{SITENAME}}}} ($4). {{PLURAL:$3|Nasledujúci používateľský účet je spojený|Nasledujúce používateľské účty sú spojené}}
+'passwordreset-emailtext-user' => 'Používateľ $1 na {{GRAMMAR:genitív|{{SITENAME}}}} požiadal o obnovenie vášho hesla na na {{GRAMMAR:genitív|{{SITENAME}}}} ($4). {{PLURAL:$3|Nasledujúci používateľský účet je spojený|Nasledujúce používateľské účty sú spojené}}
s touto emailovou adresou:
$2
ignorovať a ďalej používať vaše staré heslo.',
'passwordreset-emailelement' => 'Používateľské meno: $1
Dočasné heslo:$2',
-'passwordreset-emailsent' => 'Email s heslom bol odoslaný.',
-'passwordreset-emailsent-capture' => 'Bol vytvorený pripomienkový e-mail, ktorý je zobrazený nižšie.',
-'passwordreset-emailerror-capture' => 'Bol vytvorený pripomienkový e-mail, ktorý je zobrazený nižšie, ale nepodarilo sa ho odoslať používateľovi: $1',
+'passwordreset-emailsent' => 'Email s novým heslom bol odoslaný.',
+'passwordreset-emailsent-capture' => 'Bol odoslaný email s novým heslom, ktorý je zobrazený nižšie.',
+'passwordreset-emailerror-capture' => 'Bol odoslaný email s novým heslom, ktorý je zobrazený nižšie, ale nepodarilo sa ho odoslať používateľovi: $1',
# Special:ChangeEmail
'changeemail' => 'Zmeniť emailovú adresu',
'changeemail-oldemail' => 'Súčasná e-mailová adresa:',
'changeemail-newemail' => 'Nová e-mailová adresa:',
'changeemail-none' => '(žiadna)',
+'changeemail-password' => 'Vaše heslo k {{GRAMMAR:lokál|{{SITENAME}}}}:',
'changeemail-submit' => 'Zmeniť e-mail',
'changeemail-cancel' => 'Zrušiť',
'''NEUMIESTŇUJTE SEM BEZ POVOLENIA DIELA CHRÁNENÉ AUTORSKÝM PRÁVOM!'''",
'longpageerror' => "'''Chyba: Text, ktorý ste poslali má {{PLURAL:$1|jeden kilobajt|$1 kilobajty|$1 kilobajtov}}, čo je viac ako maximum {{PLURAL:$2|jeden kilobajt|$2 kilobajty|$2 kilobajtov}}.'''",
'readonlywarning' => "'''UPOZORNENIE: Databáza bola počas upravovania stránky zamknutá z dôvodu údržby,
-takže stránku momentálne nemôžete uložiť. Môžete skopírovať a vložiť
-text do textového súboru a uložiť si ho na neskôr.'''
+takže svoje úpravy momentálne nemôžete uložiť.'''
+Môžete skopírovať a vložiť text do textového súboru a uložiť si ho na neskôr.
Správca, ktorý ju zamkol, uviedol nasledovné vysvetlenie: $1",
'protectedpagewarning' => "'''Upozornenie: Táto stránka bola zamknutá, takže ju môžu upravovať iba používatelia s oprávnením správcu.''' Dolu je pre informáciu posledná položka zo záznamu:",
'content-failed-to-parse' => 'Nepodarilo sa spracovať obsah $2 pre model $1: $3',
'invalid-content-data' => 'Neplatné dáta obsahu',
'content-not-allowed-here' => 'Obsah „$1“ nie je povolený na stránke [[$2]]',
+'editwarning-warning' => 'Ak opustíte túto stránku, môžete tým stratiť všetky vykonané zmeny.
+Ak ste prihlásený, toto upozornenie môžete vypnúť v sekcii „{{int:prefs-editing}}“ svojich nastavení.',
# Content models
'content-model-wikitext' => 'wikitext',
'search-interwiki-default' => '$1 výsledkov:',
'search-interwiki-more' => '(viac)',
'search-relatedarticle' => 'Súvisiace',
-'mwsuggest-disable' => 'Vypnúť AJAX návrhy',
+'mwsuggest-disable' => 'Vypnúť návrhy vyhľadávania',
'searcheverything-enable' => 'Vyhľadať vo všetkých menných priestoroch',
'searchrelated' => 'súvisiace',
'searchall' => 'všetko',
'powersearch-togglenone' => 'Žiadne',
'search-external' => 'Externé vyhľadávanie',
'searchdisabled' => 'Prepáčte! Fulltextové vyhľadávanie bolo dočasne vypnuté z dôvodu preťaženia. Zatiaľ môžete použiť hľadanie pomocou Google, ktoré však nemusí byť aktuálne.',
-
-# Quickbar
-'qbsettings' => 'Navigačný panel',
-'qbsettings-none' => 'Žiadne',
-'qbsettings-fixedleft' => 'Ukotvené vľavo',
-'qbsettings-fixedright' => 'Ukotvené vpravo',
-'qbsettings-floatingleft' => 'Plávajúce vľavo',
-'qbsettings-floatingright' => 'Plávajúce vpravo',
-'qbsettings-directionality' => 'Pevný, v závislosti na smerovosti písma vášho jazyka',
+'search-error' => 'Pri hľadaní sa vyskytla chyba:$1',
# Preferences page
'preferences' => 'Nastavenia',
'youremail' => 'Váš e-mail²',
'username' => 'Používateľské meno:',
'uid' => 'ID používateľa:',
-'prefs-memberingroups' => 'Člen {{PLURAL:$1|skupiny|skupín}}:',
+'prefs-memberingroups' => '{{GENDER:$2|Člen|Členovia}} {{PLURAL:$1|skupiny|skupín}}:',
'prefs-registration' => 'Čas registrácie:',
'yourrealname' => 'Skutočné meno *:',
'yourlanguage' => 'Jazyk:',
'backend-fail-notsame' => 'Nerovnaký súbor už existuje v $1 .',
'backend-fail-invalidpath' => '„$1“ nie je platná cesta úložiska.',
'backend-fail-delete' => 'Nebolo možné vymazať súbor „$1“.',
+'backend-fail-describe' => 'Nie je možné zmeniť metadáta súboru „$1“.',
'backend-fail-alreadyexists' => 'Súbor „$1“ už existuje.',
'backend-fail-store' => 'Nebolo možné uložiť súbor „$1“ na „$2“.',
'backend-fail-copy' => 'Nebolo možné skopírovať súbor „$1“ na „$2“.',
'http-read-error' => 'Chyba čítania HTTP.',
'http-timed-out' => 'Vyhradený čas požiadavky HTTP vypršal.',
'http-curl-error' => 'Chyba pri sťahovaní URL: $1',
-'http-host-unreachable' => 'URL nie je dostupný',
'http-bad-status' => 'Počas požiadavky HTTP nastal problém: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
Mali by však odkazovať priamo na príslušnú tému.<br />
Stránka sa považuje za rozlišovaciu, keď používa šablónu, na ktorú odkazuje [[MediaWiki:Disambiguationspage]].",
+'pageswithprop' => 'Stránky s vlastnosťou stránky',
+'pageswithprop-legend' => 'Stránky s vlastnosťou stránky',
+'pageswithprop-text' => 'Táto stránka obsahuje stránky, ktoré používajú konkrétnu vlastnosť stránky.',
+'pageswithprop-prop' => 'Názov vlastnosti:',
+'pageswithprop-submit' => 'Vykonať',
+
'doubleredirects' => 'Dvojité presmerovania',
'doubleredirectstext' => 'Táto stránka obsahuje zoznam stránok, ktoré presmerovávajú na iné presmerovacie stránky.
Každý riadok obsahuje odkaz na prvé a druhé presmerovanie a tiež prvý riadok z textu na ktorý odkazuje druhé presmerovanie, ktoré zvyčajne odkazuje na „skutočný“ cieľ, na ktorý má odkazovať prvé presmerovanie.
'linksearch-ns' => 'Menný priestor:',
'linksearch-ok' => 'Hľadať',
'linksearch-text' => 'Je možné používať zástupné znaky, napr. „*.wikipedia.org“.
-Povinná je minimálne doména najvyššej úrovne, napr.. „*.org“.<br />
-Podporované protokoly: <code>$1</code> (ak protokol nie je uvedený, použije sa <code>http://</code>).',
+Povinná je minimálne doména najvyššej úrovne, napr. „*.org“.<br />
+{{PLURAL:$2|Podporovaný protokol|Podporované protokoly}}: <code>$1</code> (ak protokol nie je uvedený, použije sa http://).',
'linksearch-line' => 'Na $1 odkazuje $2',
'linksearch-error' => 'Zástupné znaky je možné použiť iba na začiatku názvu domény.',
'listusers-noresult' => 'Neboli nájdení používatelia. Prosím, skontrolujte aj varianty s veľkými/malými písmenami.',
'listusers-blocked' => '(zablokovaný)',
-# Special:ActiveUsers
-'activeusers' => 'Zoznam aktívnych používateľov',
-'activeusers-intro' => 'Toto je zoznam používateľov, ktorí $1 {{PLURAL:$1|za posledný 1 deň|za posledné $1 dni|za posledných $1 dní}} vykonali nejakú aktivitu.',
-'activeusers-count' => '$1 {{PLURAL:$1|úprava|úpravy|úprav}} za {{PLURAL:$3|posledný deň|posledné $3 dni|posledných $3 dní}}',
-'activeusers-from' => 'Zobraziť používateľov počínajúc:',
-'activeusers-hidebots' => 'Skryť robotov',
-'activeusers-hidesysops' => 'Skryť správcov',
-'activeusers-noresult' => 'Neboli nájdení žiadni používatelia.',
-
# Special:ListGroupRights
'listgrouprights' => 'Práva skupiny používateľov',
'listgrouprights-summary' => 'Toto je zoznam skupín používateľov definovaných na tejto wiki a ich prístupových práv.
'watchnologin' => 'Nie ste prihlásený/á',
'watchnologintext' => 'Musíte byť [[Special:UserLogin|prihlásený/á]], aby ste mohli modifikovať vaše sledované stránky.',
'addwatch' => 'Pridať do zoznamu sledovaných stránok',
-'addedwatchtext' => "Stránka [[:$1]] bola pridaná do zoznamu [[Special:Watchlist|sledovaných stránok]]. Budú tam uvedené ďalšie úpravy tejto stránky a jej diskusie a stránka bude zobrazená '''tučne''' v [[Special:RecentChanges|zozname posledných úprav]], aby ste ju ľahšie našli.",
+'addedwatchtext' => 'Stránka „[[:$1]]“ bola pridaná do vášho zoznamu [[Special:Watchlist|sledovaných stránok]].
+Budú tam uvedené aj budúce úpravy tejto stránky a jej diskusie.',
'removewatch' => 'Odstrániť zo zoznamu sledovaných',
'removedwatchtext' => 'Stránka „[[:$1]]“ bola odstránená z vášho [[Special:Watchlist|zoznamu sledovaných stránok]].',
'watch' => 'Sledovať',
'enotif_mailer' => 'Upozorňovač {{GRAMMAR:genitív|{{SITENAME}}}}',
'enotif_reset' => 'Označiť všetky stránky ako „navštívené“',
'enotif_impersonal_salutation' => 'používateľ {{GRAMMAR:genitív|{{SITENAME}}}}',
+'enotif_subject_deleted' => 'Stránku {{GENDER:genitív|{{SITENAME}}}} „$1“ odstránil používateľ $2',
+'enotif_subject_created' => 'Stránku {{GENDER:genitív|{{SITENAME}}}} „$1“ vytvoril používateľ $2',
+'enotif_subject_moved' => 'Stránku {{GENDER:genitív|{{SITENAME}}}} „$1“ presunul používateľ $2',
+'enotif_subject_restored' => 'Stránku {{GENDER:genitív|{{SITENAME}}}} „$1“ obnovil používateľ $2',
+'enotif_subject_changed' => 'Stránku {{GENDER:genitív|{{SITENAME}}}} „$1“ zmenil používateľ $2',
+'enotif_body_intro_deleted' => 'Stránka {{GENDER:genitív|{{SITENAME}}}} „$1“ zmazal $PAGEEDITDATE používateľ $2, pozri $3.',
+'enotif_body_intro_created' => 'Stránka {{GENDER:genitív|{{SITENAME}}}} „$1“ vytvoril $PAGEEDITDATE používateľ $2, pozri aktuálnu verziu $3.',
+'enotif_body_intro_moved' => 'Stránka {{GENDER:genitív|{{SITENAME}}}} „$1“ presunul $PAGEEDITDATE používateľ $2, pozri aktuálnu verziu $3.',
+'enotif_body_intro_restored' => 'Stránka {{GENDER:genitív|{{SITENAME}}}} „$1“ obnovil $PAGEEDITDATE používateľ $2, pozri aktuálnu verziu $3.',
+'enotif_body_intro_changed' => 'Stránka {{GENDER:genitív|{{SITENAME}}}} „$1“ zmenil $PAGEEDITDATE používateľ $2, pozri aktuálnu verziu $3.',
'enotif_lastvisited' => 'Všetky zmeny od vašej poslednej návštevy uvidíte na $1.',
'enotif_lastdiff' => 'Zmenu uvidíte v $1.',
'enotif_anon_editor' => 'anonymný používateľ $1',
'enotif_body' => 'Drahý $WATCHINGUSERNAME,
-na {{GRAMMAR:lokál|{{SITENAME}}}} $CHANGEDORCREATED používateľ $PAGEEDITOR stránku $PAGETITLE, pozrite si aktuálnu verziu $PAGETITLE_URL .
-
-$NEWPAGE
+$PAGEINTRO $NEWPAGE
Zhrnutie redaktora: $PAGESUMMARY $PAGEMINOREDIT
Kontaktujte používateľa:
mail: $PAGEEDITOR_EMAIL
wiki: $PAGEEDITOR_WIKI
-Nedostanete ďalšie upozornenia, aj ak bude stránka znovu upravovaná, kým nenavštívite túto stránku.
+Nedostanete ďalšie upozornenia ani v prípade ďalších aktivít na strínke, kým túto stránku nenavštívite.
Možete tiež vynulovať upozornenia pre všetky vaše sledované stránky.
Váš upozorňovací systém {{GRAMMAR:genitív|{{SITENAME}}}}
'prot_1movedto2' => '[[$1]] premiestnená na [[$2]]',
'protect-badnamespace-title' => 'Nezamykateľný menný priestor',
'protect-badnamespace-text' => 'Stránky v tomto mennom priestore nie je možné zamykať.',
+'protect-norestrictiontypes-text' => 'Túto stránku nie je možné chrániť, pretože nie sú k dispozícii žiadne typy obmedzení.',
+'protect-norestrictiontypes-title' => 'Neochrániteľná stránka',
'protect-legend' => 'Potvrďte zamknutie',
'protectcomment' => 'Dôvod:',
'protectexpiry' => 'Zamknuté do:',
Tu sú aktuálne nastavenia stránky '''$1''':",
'protect-cascadeon' => 'Táto stránka je momentálne zamknutá, lebo je použitá na {{PLURAL:$1|nasledovnej stránke, ktorá má|nasledovných stránkach, ktoré majú}} zapnutú kaskádovú ochranu. Môžete zmeniť úroveň ochrany tejto stránky, ale neovplyvní to kaskádovú ochranu.',
'protect-default' => 'Povoliť všetkých používateľov',
-'protect-fallback' => 'Vyžadovať povolenie „$1“',
-'protect-level-autoconfirmed' => 'Zablokovať nových a nezaregistrovaných používateľov',
-'protect-level-sysop' => 'Len pre správcov',
+'protect-fallback' => 'Povoliť iba používateľov s oprávnením „$1“',
+'protect-level-autoconfirmed' => 'Povoliť iba používateľov s potvrdeným emailom',
+'protect-level-sysop' => 'Povoliť iba správcov',
'protect-summary-cascade' => 'kaskáda',
'protect-expiring' => 'vyprší o $1 (UTC)',
'protect-expiring-local' => 'vyprší $1',
# Stylesheets
'common.css' => '/* Tu umiestnené CSS bude ovplyvňovať všetky štýly */',
-'standard.css' => '/* Tu umiestnené CSS bude ovplyvňovať používateľov štýlu Klasický */',
-'nostalgia.css' => '/* Tu umiestnené CSS bude ovplyvňovať používateľov štýlu Nostalgia */',
'cologneblue.css' => '/* Tu umiestnené CSS bude ovplyvňovať používateľov štýlu Kolínska modrá */',
'monobook.css' => '/* Tu umiestnené CSS bude ovplyvňovať používateľov štýlu Monobook */',
-'myskin.css' => '/* Tu umiestnené CSS bude ovplyvňovať používateľov štýlu Môjvzhľad */',
-'chick.css' => '/* Tu umiestnené CSS bude ovplyvňovať používateľov štýlu Kuriatko */',
-'simple.css' => '/* Tu umiestnené CSS bude ovplyvňovať používateľov štýlu Jednoduchý */',
'modern.css' => '/* Tu umiestnené CSS bude ovplyvňovať používateľov štýlu Moderný */',
'vector.css' => '/* Tu umiestnené CSS bude ovplyvňovať používateľov štýlu Vector */',
'print.css' => '/* Tu umiestnené CSS bude ovplyvňovať tlačový výstup */',
# Scripts
'common.js' => '/* Tu uvedený JavaScript sa nahrá všetkým používateľom pri každom nahraní stránky. */',
-'standard.js' => '/* Tu sa nachádzajúci JavaScript sa načíta používateľom vzhľadu Klasický */',
-'nostalgia.js' => '/* Tu sa nachádzajúci JavaScript sa načíta používateľom vzhľadu Nostalgia */',
'cologneblue.js' => '/* Tu sa nachádzajúci JavaScript sa načíta používateľom vzhľadu Kolínska modrá */',
'monobook.js' => '/* Tu sa nachádzajúci JavaScript sa načíta používateľom vzhľadu Monobook */',
-'myskin.js' => '/* Tu sa nachádzajúci JavaScript sa načíta používateľom vzhľadu Môjvzhľad */',
-'chick.js' => '/* Tu sa nachádzajúci JavaScript sa načíta používateľom vzhľadu Kuriatko */',
-'simple.js' => '/* Tu sa nachádzajúci JavaScript sa načíta používateľom vzhľadu Jednoduchý */',
'modern.js' => '/* Tu sa nachádzajúci JavaScript sa načíta používateľom vzhľadu Moderný */',
'vector.js' => '/* Tu sa nachádzajúci JavaScript sa načíta používateľom vzhľadu Vector */',
'group-autoconfirmed.js' => '/* Tu sa nachádzajúci JavaScript sa načíta používateľom s potvrdenou emailovou adresou */',
'pageinfo-protect-cascading-from' => 'Zámky pochádzajú z kaskádových zamknutí',
# Skin names
-'skinname-standard' => 'Klasický',
-'skinname-nostalgia' => 'Nostalgia',
'skinname-cologneblue' => 'Kolínska modrá',
'skinname-monobook' => 'MonoBook',
-'skinname-myskin' => 'Môj vzhľad',
-'skinname-chick' => 'Kuriatko',
-'skinname-simple' => 'Jednoduchý',
'skinname-modern' => 'Moderný',
'skinname-vector' => 'Vector',
'file-nohires' => 'Nie je dostupné vyššie rozlíšenie.',
'svg-long-desc' => 'SVG súbor, $1 × $2 pixelov, veľkosť súboru: $3',
'svg-long-desc-animated' => 'Animovaný súbor SVG, nominálne $1 × $2 pixlov, veľkosť súboru: $3',
+'svg-long-error' => 'Neplatný súbor SVG: $1',
'show-big-image' => 'Obrázok vo vyššom rozlíšení',
'show-big-image-preview' => 'Veľkosť tohto náhľadu: $1.',
'show-big-image-other' => 'Iné {{PLURAL:$2|rozlíšenie|rozlíšenia}}: $1 .',
'minutes' => '{{PLURAL:$1|$1 minúta|$1 minúty|$1 minút}}',
'hours' => '{{PLURAL:$1|$1 hodina|$1 hodiny|$1 hodín}}',
'days' => '{{PLURAL:$1|$1 deň|$1 dni|$1 dní}}',
+'months' => '{{PLURAL:$1|$1 mesiac|$1 mesiace|$1 mesiacov}}',
+'years' => '{{PLURAL:$1|$1 rok|$1 rok|$1 rokov}}',
'ago' => 'pred: $1',
'just-now' => 'Pred chvíľkou',
'specialpages-group-highuse' => 'Často používané stránky',
'specialpages-group-pages' => 'Zoznamy stránok',
'specialpages-group-pagetools' => 'Nástroje stránky',
-'specialpages-group-wiki' => 'Wiki údaje a nástroje',
+'specialpages-group-wiki' => 'Údaje a nástroje',
'specialpages-group-redirects' => 'Špeciálne stránky, ktoré sú presmerovania',
'specialpages-group-spam' => 'Nástroje proti spamu',
'htmlform-submit' => 'Odoslať',
'htmlform-reset' => 'Vrátiť zmeny',
'htmlform-selectorother-other' => 'Iné',
+'htmlform-no' => 'Nie',
+'htmlform-yes' => 'Áno',
# SQLite database support
'sqlite-has-fts' => '$1 s podporou vyhľadávania v plnom texte',
'sqlite-no-fts' => '$1 bez podpory vyhľadávania v plnom texte',
# New logging system
-'logentry-delete-delete' => '$1 zmazal(a) stránku $3',
-'logentry-delete-restore' => '$1 obnovil(a) stránku $3',
-'logentry-delete-event' => '$1 zmenil viditeľnosť {{PLURAL:$5|protokolovacieho záznamu|$5 protokolovacích záznamov}} k stránke $3: $4',
+'logentry-delete-delete' => '$1 zmazal stránku $3',
+'logentry-delete-restore' => '$1 obnovil stránku $3',
+'logentry-delete-event' => '$1 zmenil viditeľnosť {{PLURAL:$5|záznamu udalostí|$5 záznamov udalostí}} k stránke $3: $4',
'logentry-delete-revision' => '$1 zmenil viditeľnosť {{PLURAL:$5|revízie|$5 revízií}} na stránke $3: $4',
-'logentry-delete-event-legacy' => '$1 zmenil viditeľnosť protokolovacích záznamov k stránke $3',
+'logentry-delete-event-legacy' => '$1 zmenil viditeľnosť záznamov udalostí k stránke $3',
'logentry-delete-revision-legacy' => '$1 zmenil viditeľnosť revízií na stránke $3',
'logentry-suppress-delete' => '$1 utajil stránku $3',
-'logentry-suppress-event' => '$1 utajene zmenil viditeľnosť {{PLURAL:$5|protokolovacieho záznamu|$5 protokolovacích záznamov}} k stránke $3: $4',
+'logentry-suppress-event' => '$1 utajene zmenil viditeľnosť {{PLURAL:$5|záznamu udalostí|$5 záznamov udalostí}} k stránke $3: $4',
'logentry-suppress-revision' => '$1 utajene zmenil viditeľnosť {{PLURAL:$5|revízie|$5 revízií}} na stránke $3: $4',
-'logentry-suppress-event-legacy' => '$1 utajene zmenil viditeľnosť protokolovacích záznamov k stránke $3',
+'logentry-suppress-event-legacy' => '$1 utajene zmenil viditeľnosť záznamov udalostí k stránke $3',
'logentry-suppress-revision-legacy' => '$1 utajene zmenil viditeľnosť revízií na stránke $3',
'revdelete-content-hid' => 'obsah skrytý',
'revdelete-summary-hid' => 'zhrnutie editácie skryté',
'logentry-move-move' => '$1 premiestnil stránku $3 na $4',
'logentry-move-move-noredirect' => '$1 premiestnil stránku $3 na $4, ale neponechal presmerovanie',
'logentry-move-move_redir' => '$1 premiestnil stránku $3 na $4 prostredníctvom presmerovania',
-'logentry-move-move_redir-noredirect' => '$1 premiestnil stránku $3 na $4 prostredníctvom presmerovania, ale neponechal presmerovanie',
-'logentry-patrol-patrol' => '$1 označil revíziu $4 stránky $3 ako overenú',
-'logentry-patrol-patrol-auto' => '$1 automaticky označil revíziu $4 stránky $3 ako overenú',
+'logentry-move-move_redir-noredirect' => '$1 premiestnil stránku $3 na $4 prostredníctvom presmerovania, ale neponechal presmerovanie',
+'logentry-patrol-patrol' => '$1 označil revíziu $4 stránky $3 ako stráženú',
+'logentry-patrol-patrol-auto' => '$1 automaticky označil revíziu $4 stránky $3 ako stráženú',
'logentry-newusers-newusers' => 'Bol vytvorený používateľský účet $1',
'logentry-newusers-create' => 'Bol vytvorený používateľský účet $1',
'logentry-newusers-create2' => '$1 vytvoril používateľský účet $3',
-'logentry-newusers-autocreate' => 'Automaticky bol založený účet $1',
-'logentry-rights-rights' => '$1 {{GENDER:$2|zmenil|zmenila}} členstvo $3 v skupinách z $4 na $5',
-'logentry-rights-rights-legacy' => '$1 {{GENDER:$2|zmenil|zmenila}} členstvo $3 v skupinách',
-'logentry-rights-autopromote' => '$1 {{GENDER:$2|bol automaticky povýšený|bola automaticky povýšená}} z $4 na $5',
+'logentry-newusers-byemail' => '$1 vytvoril používateľský účet $3 a heslo bolo poslané emailom',
+'logentry-newusers-autocreate' => 'Používateľský účet $1 bol vytvorený automaticky',
+'logentry-rights-rights' => '$1 zmenil členstvo $3 v skupinách z $4 na $5',
+'logentry-rights-rights-legacy' => '$1 zmenil členstvo $3 v skupinách',
+'logentry-rights-autopromote' => '$1 bol automaticky povýšený z $4 na $5',
'rightsnone' => '(žiadne)',
# Feedback
'api-error-ok-but-empty' => 'Vnútorná chyba: Žiadna odpoveď zo servera.',
'api-error-overwrite' => 'Prepísanie existujúceho súboru nie je povolené.',
'api-error-stashfailed' => 'Vnútorná chyba: Serveru sa nepodarilo uložiť dočasný súbor.',
+'api-error-publishfailed' => 'Vnútorná chyba: Serveru sa nepodarilo publikovať dočasný súbor.',
'api-error-timeout' => 'Server neodpovedal v očakávanom čase.',
'api-error-unclassified' => 'Vyskytla sa neznáma chyba.',
'api-error-unknown-code' => 'Neznáma chyba: „$1“',
'duration-centuries' => '$1 {{PLURAL:$1|storočie|storočia|storočí}}',
'duration-millennia' => '$1 {{PLURAL:$1|tisícročie|tisícročia|tisícročí}}',
+# Image rotation
+'rotate-comment' => 'Obrázok otočený o $1 {{PLURAL:$1|stupeň|stupne|stupňov}} v smere hodinových ručičiek',
+
+# Unknown messages
+'hours-ago' => 'pred $1 {{PLURAL:$1|hodinou|hodinami}}',
+'minutes-ago' => 'pred $1 {{PLURAL:$1|minútou|minútami}}',
+'seconds-ago' => 'pred $1 {{PLURAL:$1|sekundou|sekundami}}',
);
'nov' => 'nov.',
'dec' => 'dec.',
+'monday-at' => 'Ponedeljek ob $1',
+'tuesday-at' => 'Torek ob $1',
+'wednesday-at' => 'Sreda ob $1',
+'thursday-at' => 'Četrtek ob $1',
+'friday-at' => 'Petek ob $1',
+'saturday-at' => 'Sobota ob $1',
+'sunday-at' => 'Nedelja ob $1',
+'today-at' => '$1',
+'yesterday-at' => 'Včeraj ob $1',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|Kategorija|Kategoriji|Kategorije}}',
'category_header' => 'Strani v kategoriji »$1«',
Začasno geslo: $2',
'passwordreset-emailsent' => 'Poslali smo e-pošto za postavitev gesla.',
'passwordreset-emailsent-capture' => 'Poslali smo e-pošto za ponastavitev gesla, ki je prikazana spodaj.',
-'passwordreset-emailerror-capture' => 'Ustvarili smo e-pošto za ponastavitev gesla, ki je prikazana spodaj, vendar pa pošiljanje uporabniku ni uspelo: $1',
+'passwordreset-emailerror-capture' => 'Ustvarili smo e-pošto za ponastavitev gesla, ki je prikazana spodaj, vendar pa pošiljanje {{GENDER:$2|uporabniku|uporabnici}} ni uspelo: $1',
# Special:ChangeEmail
'changeemail' => 'Sprememba e-poštnega naslova',
'minutes' => '$1 {{PLURAL:$1|minuta|minuti|minute|minut}}',
'hours' => '$1 {{PLURAL:$1|ura|uri|ure|ur}}',
'days' => '$1 {{PLURAL:$1|dan|dneva|dnevi|dni}}',
+'weeks' => '$1 {{PLURAL:$1|teden|tedna|tedni|tednov}}',
'months' => '$1 {{PLURAL:$1|mesec|meseca|mesece|mesecev}}',
'years' => '$1 {{PLURAL:$1|leto|leti|leta|let}}',
'ago' => 'pred $1',
# Image rotation
'rotate-comment' => 'Slika zavrti s $1 {{PLURAL:$1| degree|degrees}} v smeri urinega kazalca',
+# Unknown messages
+'hours-ago' => 'pred $1 {{PLURAL:$1|uro|urama|urami}}',
+'minutes-ago' => 'pred $1 {{PLURAL:$1|minuto|minutama|minutami}}',
+'seconds-ago' => 'pred $1 {{PLURAL:$1|sekundo|sekundama|sekundami}}',
);
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-hans' => 'hans',
'tog-shownumberswatching' => 'Prikaži broj korisnika koji nadgledaju',
'tog-oldsig' => 'Tekući potpis:',
'tog-fancysig' => 'Smatraj potpis kao vikitekst (bez samopovezivanja)',
-'tog-externaleditor' => 'Uvek koristi spoljni uređivač (samo za napredne — potrebne su posebne postavke na računaru)',
-'tog-externaldiff' => 'Uvek koristi spoljni program za upoređivanje (samo za napredne — potrebne su posebne postavke na računaru)',
'tog-showjumplinks' => 'Omogući pomoćne veze „Idi na“',
'tog-uselivepreview' => 'Koristi trenutan pregled (javaskript, probna mogućnost)',
'tog-forceeditsummary' => 'Opomeni me pri unosu praznog opisa',
'tog-showhiddencats' => 'Prikaži skrivene kategorije',
'tog-noconvertlink' => 'Onemogući pretvaranje naslova veza',
'tog-norollbackdiff' => 'Izostavi razliku nakon izvršenog vraćanja',
+'tog-useeditwarning' => 'Upozori me kada napustim stranicu sa nesačuvanim promenama',
'underline-always' => 'uvek podvlači',
'underline-never' => 'nikad ne podvlači',
'content-failed-to-parse' => 'Ne mogu da raščlanim sadržaj tipa $2 za model $1: $3',
'invalid-content-data' => 'Neispravni podaci sadržaja',
'content-not-allowed-here' => 'Sadržaj modela „$1“ nije dozvoljen na stranici [[$2]]',
+'editwarning-warning' => 'Ako napustite ovu stranicu, izgubićete sve izmene koje ste napravili.
+Ako ste prijavljeni, možete onemogućiti ovo upozorenje u svojim podešavanjima, u odeljku „Uređivanje“.',
# Content models
'content-model-wikitext' => 'vikitekst',
U međuvremenu možete tražiti preko Gugla.
Upamtite da njegovi popisi ovog vikija mogu biti zastareli.',
-# Quickbar
-'qbsettings' => 'Bočna paleta',
-'qbsettings-none' => 'Ništa',
-'qbsettings-fixedleft' => 'Pričvršćena levo',
-'qbsettings-fixedright' => 'Pričvršćena desno',
-'qbsettings-floatingleft' => 'Plutajuća levo',
-'qbsettings-floatingright' => 'Plutajuća desno',
-'qbsettings-directionality' => 'Fiksno, u zavisnosti od smera pisanja vašeg jezika',
-
# Preferences page
'preferences' => 'Podešavanja',
'mypreferences' => 'Podešavanja',
'http-read-error' => 'HTTP greška pri čitanju.',
'http-timed-out' => 'Zahtev HTTP je istekao.',
'http-curl-error' => 'Greška pri otvaranju adrese: $1',
-'http-host-unreachable' => 'Ne mogu da pristupim adresi.',
'http-bad-status' => 'Došlo je do problema tokom zahteva HTTP: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => 'Korisnik nije pronađen.',
'listusers-blocked' => '({{GENDER:$1|blokiran|blokirana|blokiran}})',
-# Special:ActiveUsers
-'activeusers' => 'Spisak aktivnih korisnika',
-'activeusers-intro' => 'Ovo je spisak korisnika koji su bili aktivni {{PLURAL:$1|prethodni dan|u poslednja $1 dana|u poslednjih $1 dana}}.',
-'activeusers-count' => '$1 {{PLURAL:$1|izmena|izmene|izmena}} {{PLURAL:$3|prethodni dan|u poslednja $3 dana|u poslednjih $3 dana}}',
-'activeusers-from' => 'Prikaži korisnike počev od:',
-'activeusers-hidebots' => 'Sakrij botove',
-'activeusers-hidesysops' => 'Sakrij administratore',
-'activeusers-noresult' => 'Korisnik nije pronađen.',
-
# Special:ListGroupRights
'listgrouprights' => 'Prava korisničkih grupa',
'listgrouprights-summary' => 'Sledi spisak korisničkih grupa na ovom vikiju, zajedno s pravima pristupa.
# Stylesheets
'common.css' => '/** CSS postavljen ovde će se odraziti na sve teme */',
-'standard.css' => '/* CSS postavljen ovde će uticati na sve korisnike teme „Standardno“ */',
-'nostalgia.css' => '/* CSS postavljen ovde će uticati na sve korisnike teme „Nostalgija“ */',
'cologneblue.css' => '/* CSS postavljen ovde će uticati na sve korisnike teme „Kelnsko plava“ */',
'monobook.css' => '/* CSS postavljen ovde će uticati na sve korisnike teme „Monobuk“ */',
-'myskin.css' => '/* CSS postavljen ovde će uticati na sve korisnike teme „Moja tema“ */',
-'chick.css' => '/* CSS postavljen ovde će uticati na sve korisnike teme „Šik“ */',
-'simple.css' => '/* CSS postavljen ovde će uticati na sve korisnike teme „Prosto“ */',
'modern.css' => '/* CSS postavljen ovde će uticati na sve korisnike teme „Savremeno“ */',
'vector.css' => '/* CSS postavljen ovde će uticati na sve korisnike teme „Vektorsko“ */',
'print.css' => '/* CSS postavljen ovde će uticati na izdanje za štampu */',
# Scripts
'common.js' => '/* Javaskript postavljen ovde će se koristiti za sve korisnike pri otvaranju svake stranice. */',
-'standard.js' => '/* Javaskript postavljen ovde će se učitati za sve one koji koriste temu „Standardno“ */',
-'nostalgia.js' => '/* Javaskript postavljen ovde će se učitati za sve one koji koriste temu „Nostalgija“ */',
'cologneblue.js' => '/* Javaskript postavljen ovde će se učitati za sve one koji koriste temu „Kelnsko plava“ */',
'monobook.js' => '/* Javaskript postavljen ovde će se učitati za sve one koji koriste temu „Monobuk“ */',
-'myskin.js' => '/* Javaskript postavljen ovde će se učitati za sve one koji koriste „Moju temu“ */',
-'chick.js' => '/* Javaskript postavljen ovde će se učitati za sve one koji koriste temu „Šik“ */',
-'simple.js' => '/* Javaskript postavljen ovde će se učitati za sve one koji koriste temu „Prosto“ */',
'modern.js' => '/* Javaskript postavljen ovde će se učitati za sve one koji koriste temu „Savremeno“ */',
'vector.js' => '/* Javaskript postavljen ovde će se učitati za sve one koji koriste temu „Vektorsko“ */',
'group-autoconfirmed.js' => '/* Javaskript postavljen ovde će se učitati za samopotvrđene korisnike */',
'pageinfo-protect-cascading-from' => 'Stranice sa prenosivom zaštitom od',
# Skin names
-'skinname-standard' => 'Klasično',
-'skinname-nostalgia' => 'Nostalgija',
'skinname-cologneblue' => 'Kelnsko plava',
'skinname-monobook' => 'Monobuk',
-'skinname-myskin' => 'Moja tema',
-'skinname-chick' => 'Šik',
-'skinname-simple' => 'Prosto',
'skinname-modern' => 'Savremeno',
'skinname-vector' => 'Vektorsko',
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-hans' => 'hans',
Tillfälligt lösenord: $2',
'passwordreset-emailsent' => 'En lösenordsåterställning via e-post har skickats.',
'passwordreset-emailsent-capture' => 'En lösenordsåterställning via e-post har skickats, som visas nedan.',
-'passwordreset-emailerror-capture' => 'En lösenordsåterställning via e-post har skapats, som visas nedan, men det gick inte att skicka den till användaren: $1',
+'passwordreset-emailerror-capture' => 'En lösenordsåterställning via e-post har skapats, som visas nedan, men det gick inte att skicka den till {{GENDER:$2|användaren}}: $1',
# Special:ChangeEmail
'changeemail' => 'Ändra e-postadress',
'tog-shownumberswatching' => 'Pokoż, wjela sprowjorzy dowo pozůr',
'tog-oldsig' => 'Teroźni wyglůnd Twojygo szrajbowańo',
'tog-fancysig' => 'Szrajbńij s kodůma wiki (bez autůmatycznygo linka)',
-'tog-externaleditor' => 'Sztandardowo używej zewnyntrzny edytor (jyno do ekspertůw, trza mjyć ekstra sztalowańy we systymje)',
-'tog-externaldiff' => 'Sztandardowo używej zewnyntrzny program do filowańo we pomjyńańach (jyno do ekspertůw, trza mjyć ekstra sztalowańy we systymje)',
'tog-showjumplinks' => 'Zapńij cajchnůndzki "przyńdź do"',
'tog-uselivepreview' => 'Używej dynamiczne uobźyrańy (JavaScript) (eksperymentalny)',
'tog-forceeditsummary' => 'Pedź, kejbych ńic ńy naszkryfloł we uopiśe pomjyńań',
'search-external' => 'Šnupańy zewnyntřne',
'searchdisabled' => 'Šnupańy we {{GRAMMAR:MS.lp|{{SITENAME}}}} zostouo zawarte. Zańim go zouůnčům, možeš sprůbować šnupańo bez Google. Ino zauwaž, co informacyje uo treśći {{GRAMMAR:MS.lp|{{SITENAME}}}} můgům być we Google ńyakuratne.',
-# Quickbar
-'qbsettings' => 'Gurt šybkigo dostympu',
-'qbsettings-none' => 'Brak',
-'qbsettings-fixedleft' => 'Stouy, s lewyj',
-'qbsettings-fixedright' => 'Stouy, s prawyj',
-'qbsettings-floatingleft' => 'Unošůncy śe, s lewyj',
-'qbsettings-floatingright' => 'Unošůncy śe, s prawyj',
-
# Preferences page
'preferences' => 'Preferyncyje',
'mypreferences' => 'Moje preferyncyje',
'listusers-submit' => 'Pokož',
'listusers-noresult' => 'Ńy znejdźůno žodnygo užytkowńika.',
-# Special:ActiveUsers
-'activeusers-hidebots' => 'Schrůń boty',
-'activeusers-hidesysops' => 'Schrůń adminy',
-'activeusers-noresult' => 'Ńy sům używacze.',
-
# Special:ListGroupRights
'listgrouprights' => 'Uprawńyńo grup użytkowńikůw',
'listgrouprights-summary' => 'Půńiży znojdowo śe spis grup użytkowńikůw zdefińjowanych na tyj wiki, s wyszczygůlńyńym przidźelůnych im prow dostympu.
'tog-shownumberswatching' => 'వీక్షకుల సంఖ్యను చూపించు',
'tog-oldsig' => 'ప్రస్తుత సంతకం:',
'tog-fancysig' => 'సంతకాన్ని వికీపాఠ్యంగా తీసుకో (ఆటోమెటిక్ లింకు లేకుండా)',
-'tog-externaleditor' => 'మామూలుగా బయటి ఎడిటరును వాడు (నిపుణులకు మాత్రమే. మీ కంప్యూటర్లో ప్రత్యేక అమరికలు అవసరమవుతాయి. [//www.mediawiki.org/wiki/Manual:External_editors మరింత సమాచారం.])',
-'tog-externaldiff' => 'మార్పులను చూడటానికి బయటి సాఫ్టువేరును వాడు (నిపుణులకు మాత్రమే, మీ కంప్యూటర్లో ప్రత్యేక అమరికలు అవసరమవుతాయి. [//www.mediawiki.org/wiki/Manual:External_editors మరింత సమాచారం.])',
'tog-showjumplinks' => '"ఇక్కడికి గెంతు" లింకులను చూపించు',
'tog-uselivepreview' => 'రాస్తున్నదానిని ఎప్పటికప్పుడు సరిచూడండి (జావాస్క్రిప్టు) (పరీక్షాదశలో ఉంది)',
'tog-forceeditsummary' => 'దిద్దుబాటు సారాంశం ఖాళీగా ఉంటే ఆ విషయాన్ని నాకు సూచించు',
'tog-diffonly' => 'తేడాలను చూపిస్తున్నపుడు, కింద చూపించే పేజీలోని సమాచారాన్ని చూపించొద్దు',
'tog-showhiddencats' => 'దాచిన వర్గాలను చూపించు',
'tog-norollbackdiff' => 'రద్దు చేసాక తేడాలు చూపించవద్దు',
+'tog-useeditwarning' => 'ఏదైనా పేజీని నేను వదిలివెళ్తున్నప్పుడు దానిలో భద్రపరచని మార్పులు ఉంటే నన్ను హెచ్చరించు',
'underline-always' => 'ఎల్లప్పుడూ',
'underline-never' => 'ఎప్పటికీ వద్దు',
*వికీని త్వరగా అర్థం చేసుకునేందుకు [[వికీపీడియా:5 నిమిషాల్లో వికీ|5 నిమిషాల్లో వికీ]] పేజీని చూడండి.
*తెలుగులో రాసేందుకు ఇంగ్లీషు అక్షరాల ఉచ్ఛారణతో తెలుగు టైపు చేసే [[వికీపీడియా:టైపింగు సహాయం| టైపింగ్ సహాయం]] వాడవచ్చు. మరిన్ని ఉపకరణాల కొరకు [[కీ బోర్డు]] మరియు తెరపై తెలుగు సరిగా లేకపోతే[[వికీపీడియా:Setting up your browser for Indic scripts|ఈ పేజీ]] చూడండి.',
'yourname' => 'వాడుకరి పేరు:',
+'userlogin-yourname' => 'వాడుకరి పేరు',
+'userlogin-yourname-ph' => 'మీ వాడుకరి పేరును ఇవ్వండి',
'yourpassword' => 'సంకేతపదం:',
+'userlogin-yourpassword' => 'సంకేతపదం',
+'userlogin-yourpassword-ph' => 'మీ సంకేతపదాన్ని ఇవ్వండి',
'yourpasswordagain' => 'సంకేతపదాన్ని మళ్ళీ ఇవ్వండి:',
'remembermypassword' => 'ఈ కంప్యూటరులో నా ప్రవేశాన్ని గుర్తుంచుకో (గరిష్ఠంగా $1 {{PLURAL:$1|రోజు|రోజుల}}కి)',
+'userlogin-remembermypassword' => 'నన్ను గుర్తుంచుకో',
'securelogin-stick-https' => 'ప్రవేశం తర్వాత కూడా HTTPSకి అనుసంధానమై ఉండు',
'yourdomainname' => 'మీ డోమైను',
'password-change-forbidden' => 'ఈ వికీలో మీరు సంకేతపదాలను మార్చలేరు.',
'logout' => 'నిష్క్రమించు',
'userlogout' => 'నిష్క్రమించు',
'notloggedin' => 'లోనికి ప్రవేశించి లేరు',
+'userlogin-noaccount' => 'మీకు ఖాతా లేదా?',
+'userlogin-joinproject' => '{{SITENAME}}లో చేరండి',
'nologin' => "ఖాతా లేదా? '''$1'''.",
'nologinlink' => 'ఖాతాని సృష్టించుకోండి',
'createaccount' => 'ఖాతాని సృష్టించు',
'changeemail-oldemail' => 'ప్రస్తుత ఈ-మెయిలు చిరునామా:',
'changeemail-newemail' => 'కొత్త ఈ-మెయిలు చిరునామా:',
'changeemail-none' => '(ఏమీలేదు)',
+'changeemail-password' => 'మీ {{SITENAME}} సంకేతపదం:',
'changeemail-submit' => 'ఈ-మెయిల్ మార్చు',
'changeemail-cancel' => 'రద్దుచేయి',
అది ఇప్పటికే ఉంది.',
'defaultmessagetext' => 'అప్రమేయ సందేశపు పాఠ్యం',
'invalid-content-data' => 'తప్పుడు విషయం',
+'editwarning-warning' => 'ఈ పేజీని వదిలివెళ్ళడం వల్ల మీరు చేసిన మార్పులను కోల్పోయే అవకాశం ఉంది.
+మీరు ప్రవేశించివుంటే, ఈ హెచ్చరికని మీ అభిరుచులలో "మరపులు" అనే విభాగంలో అచేతనం చేసుకోవచ్చు.',
# Content models
'content-model-wikitext' => 'వికీపాఠ్యం',
'search-external' => 'బయటి అన్వేషణ',
'searchdisabled' => '{{SITENAME}} అన్వేషణ తాత్కాలికంగా పని చెయ్యడం లేదు. ఈలోగా మీరు గూగుల్ ఉపయోగించి అన్వేషించవచ్చు. ఒక గమనిక: గూగుల్ ద్వారా కాలదోషం పట్టిన ఫలితాలు రావడానికి అవకాశం ఉంది.',
-# Quickbar
-'qbsettings' => 'క్విక్బార్',
-'qbsettings-none' => 'ఏదీకాదు',
-'qbsettings-fixedleft' => 'స్థిర ఎడమ',
-'qbsettings-fixedright' => 'స్థిర కుడి',
-'qbsettings-floatingleft' => 'ఎడమకు ఒదిగి',
-'qbsettings-floatingright' => 'కుడికి ఒదిగి',
-'qbsettings-directionality' => 'స్థిరం, మీ లిపి మరియు భాషల యొక్క దిశ ఆధారంగా',
-
# Preferences page
'preferences' => 'అభిరుచులు',
'mypreferences' => 'అభిరుచులు',
'currentrevisionlink' => 'Versaun atuál',
'cur' => 'atuál',
'next' => 'oinmai',
-'last' => 'ikus',
+'last' => 'molok',
'page_first' => 'uluk',
'page_last' => 'ikus',
'histfirst' => 'sedu liu hotu',
'nextn' => 'oinmai {{PLURAL:$1|$1}}',
'shown-title' => 'Hatudu {{PLURAL:$1|rezultadu|rezultadu}} $1 kada pájina',
'viewprevnext' => 'Haree ($1 {{int:pipe-separator}} $2) ($3)',
+'searchmenu-exists' => "'''Iha pájina ho naran \"[[:\$1]]\".'''",
'searchmenu-new' => "'''Kria pájina \"[[:\$1]]\" iha wiki ne'e!'''",
'searchprofile-everything' => 'Hotu',
'searchprofile-articles-tooltip' => 'Buka iha $1',
'searchprofile-project-tooltip' => 'Buka iha $1',
'search-result-size' => '$1 ({{PLURAL:$2|liafuan ida|liafuan $2}})',
'search-section' => '(seksaun $1)',
+'search-suggest' => 'Parese Ita buka: $1',
'search-interwiki-caption' => 'Projetu seluseluk sira',
'searchall' => 'hotu',
'powersearch' => 'Buka',
'emailsend' => 'Haruka',
# Watchlist
-'watchlist' => "Ha'u-nia lista hateke",
+'watchlist' => 'Lista hateke',
'mywatchlist' => 'Lista hateke',
'removedwatchtext' => 'La hateke pájina "[[:$1]]" ona (haree [[Special:Watchlist|"lista hateke"]]).',
'watch' => 'Hateke',
'exblank' => 'pájina mamuk',
'delete-legend' => 'Halakon',
'actioncomplete' => 'operasaun remata',
+'actionfailed' => 'Asaun la konsege',
'deletedtext' => 'Ita foin halakon pájina "$1". Haree $2 ba "operasaun halakon" seluk.',
'dellogpage' => 'Lista halakon',
'deletionlog' => 'lista halakon',
'blanknamespace' => '(Prinsipál)',
# Contributions
-'contributions' => "Kontribuisaun uza-na'in",
+'contributions' => "{{GENDER:$1|Kontribuisaun uza-na'in}}",
'contributions-title' => 'Kontribuisaun "$1" nian',
'mycontris' => 'Kontribuisaun',
'contribsub2' => 'Ba $1 ($2)',
'siteusers' => "{{PLURAL:$2|uza-na'in|uza-na'in}} {{SITENAME}} nian $1",
# Skin names
-'skinname-standard' => 'Klásiku',
'skinname-cologneblue' => 'Kolónia azúl',
-'skinname-myskin' => 'MySkin',
-'skinname-chick' => 'Manu',
# Browsing diffs
'previousdiff' => '←Versaun molok',
'welcomecreation-msg' => 'บัญชีของคุณถูกสร้างขึ้นแล้ว
อย่าลืมเปลี่ยนแปลง[[Special:Preferences|การตั้งค่าใน {{SITENAME}}]] ของคุณ',
'yourname' => 'ชื่อผู้ใช้',
+'userlogin-yourname' => 'ชื่อผู้ใช้',
+'userlogin-yourname-ph' => 'กรอกชื่อผู้ใช้',
'yourpassword' => 'รหัสผ่าน',
+'userlogin-yourpassword' => 'รหัสผ่าน',
+'userlogin-yourpassword-ph' => 'กรอกรหัสผ่าน',
'yourpasswordagain' => 'พิมพ์รหัสผ่านอีกครั้ง:',
'remembermypassword' => 'จำการล็อกอินของฉันบนเบราเซอร์นี้ (นานสุด $1 วัน)',
+'userlogin-remembermypassword' => 'จำฉัน',
+'userlogin-signwithsecure' => 'ล็อกอินในเซิร์ฟเวอร์ปลอดภัย',
'securelogin-stick-https' => 'ยังคงเชื่อมต่อกับ HTTPS หลังจากล็อกอิน',
'yourdomainname' => 'โดเมนของคุณ:',
'password-change-forbidden' => 'คุณไม่สามารถเปลี่ยนรหัสผ่านบนวิกินี้',
'logout' => 'ล็อกเอาต์',
'userlogout' => 'ล็อกเอาต์',
'notloggedin' => 'ไม่ได้ล็อกอิน',
+'userlogin-noaccount' => 'ไม่มีบัญชีหรือ',
+'userlogin-joinproject' => 'เข้าร่วม {{SITENAME}}',
'nologin' => 'ไม่มีบัญชีหรือ $1',
'nologinlink' => 'สร้างบัญชี',
'createaccount' => 'สร้างบัญชี',
'gotaccount' => "มีบัญชีแล้วใช่ไหม '''$1'''",
'gotaccountlink' => 'ล็อกอิน',
'userlogin-resetlink' => 'ลืมรายละเอียดล็อกอินของคุณหรือ',
+'helplogin-url' => 'Help:การล็อกอิน',
+'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|คำอธิบายเรื่องการล็อกอิน]]',
'createaccountmail' => 'ใช้รหัสผ่านสุ่มชั่วคราวและส่งไปยังที่อยู่อีเมลที่ระบุด้านล่าง',
'createaccountreason' => 'เหตุผล:',
'badretype' => 'รหัสผ่านที่ใส่ไม่ตรงกัน',
'passwordreset-text' => 'กรอกแบบฟอร์มนี้เพื่อตั้งรหัสผ่านใหม่',
'passwordreset-legend' => 'เปลี่ยนรหัสผ่าน',
'passwordreset-disabled' => 'การตั้งรหัสผ่านใหม่ปิดใช้งานบนวิกินี้',
+'passwordreset-emaildisabled' => 'คุณลักษณะอีเมลถูกปิดใช้งานบนวิกินี้',
'passwordreset-username' => 'ชื่อผู้ใช้:',
'passwordreset-domain' => 'โดเมน:',
+'passwordreset-capture' => 'ดูอีเมลที่ได้หรือไม่',
+'passwordreset-capture-help' => 'หากคุณเลือกกล่องนี้ อีเมลดังกล่าว (พร้อมรหัสผ่านชั่วคราว) จะแสดงแก่คุณ เช่นเดียวกับส่งไปยังผู้ใช้',
'passwordreset-email' => 'ที่อยู่อีเมล:',
'passwordreset-emailtitle' => 'รายละเอียดบัญชีบน {{SITENAME}}',
'passwordreset-emailtext-ip' => 'ใครบางคน (ซึ่งอาจเป็นคุณ ที่ใช้เลขที่อยู่ไอพี $1) ขอตัวเตือนรายละเอียดบัญชีของคุณบน {{SITENAME}} ($4) บัญชีผู้ใช้ดังกล่าวเกี่ยวข้องกับที่อยู่อีเมลนี้:
ตอนนี้คุณควรล็อกอินและเลือกรหัสผ่านใหม่ หากบุคคลอื่นขอตัวเตือนรายละเอียดบัญชี หรือคุณจำรหัสผ่านเดิมของคุณได้แล้ว และคุณไม่ต้องการเปลี่ยนรหัสผ่านอีกต่อไป คุณอาจละเลยข้อความนี้และใช้รหัสผ่านเก่าของคุณต่อไป',
'passwordreset-emailelement' => 'ชื่อผู้ใช้: $1
รหัสผ่านชั่วคราว: $2',
-'passwordreset-emailsent' => 'à¸à¸µà¹\80มลà¹\81à¸\88à¹\89à¸\87à¹\80à¸\95ืà¸à¸\99à¹\84à¸\94à¹\89ถูกส่งไปแล้ว',
-'passwordreset-emailsent-capture' => 'à¸à¸µà¹\80มลà¹\81à¸\88à¹\89à¸\87à¹\80à¸\95ืà¸à¸\99à¹\84à¸\94à¹\89ถูกส่งไปแล้ว ซึ่งแสดงด้านล่าง',
-'passwordreset-emailerror-capture' => 'à¸à¸µà¹\80มลà¹\81à¸\88à¹\89à¸\87à¹\80à¸\95ืà¸à¸\99ถูกสร้างขึ้นแล้ว ซึ่งแสดงข้างล่าง แต่การส่งไปยังผู้ใช้ล้มเหลว: $1',
+'passwordreset-emailsent' => 'à¸à¸µà¹\80มลà¸\95ัà¹\89à¸\87รหัสà¸\9cà¹\88าà¸\99à¹\83หมà¹\88ถูกส่งไปแล้ว',
+'passwordreset-emailsent-capture' => 'à¸à¸µà¹\80มลà¸\95ัà¹\89à¸\87รหัสà¸\9cà¹\88าà¸\99à¹\83หมà¹\88ถูกส่งไปแล้ว ซึ่งแสดงด้านล่าง',
+'passwordreset-emailerror-capture' => 'à¸à¸µà¹\80มลà¸\95ัà¹\89à¸\87รหัสà¸\9cà¹\88าà¸\99à¹\83หมà¹\88ถูกสร้างขึ้นแล้ว ซึ่งแสดงข้างล่าง แต่การส่งไปยังผู้ใช้ล้มเหลว: $1',
# Special:ChangeEmail
'changeemail' => 'เปลี่ยนที่อยู่อีเมล',
'edit-already-exists' => 'ไม่สามารถสร้างหน้าใหม่ได้
เพราะมีหน้านี้แล้ว',
'defaultmessagetext' => 'ข้อความสารโดยปริยาย',
+'invalid-content-data' => 'ข้อมูลเนื้อหาไม่ถูกต้อง',
+'content-not-allowed-here' => 'เนื้อหา "$1" ไม่อนุญาตในหน้า [[$2]]',
'editwarning-warning' => 'การออกจากหน้านี้อาจทำให้ความเปลี่ยนแปลงที่คุณกระทำสูญหาย
ถ้าคุณล็อกอินแล้ว คุณสามารถปิดคำเตือนนี้ได้ที่ส่วน "การแก้ไข" ในการตั้งค่าของคุณ',
'import-token-mismatch' => 'ข้อมูลเซชชันสูญหาย ให้ลองใหม่อีกครั้ง',
'import-invalid-interwiki' => 'ไม่สามารถนำข้อมูลเข้าจากวิกิที่กำหนดได้',
'import-error-create' => 'หน้า "$1" ยังไม่ได้ถูกนำเข้า เนื่องจากคุณไม่ได้รับอนุญาตให้สามารถสร้างได้',
+'import-options-wrong' => '{{PLURAL:$2|ตัวเลือก|ตัวเลือก}}ผิด:<nowiki>$1</nowiki>',
+'import-rootpage-invalid' => 'หน้าต้นทางที่กำหนดมีชื่อเรื่องไม่ถูกต้อง',
+'import-rootpage-nosubpage' => 'เนมสเปซ "$1" ของหน้าต้นทางไม่อนุญาตหน้าย่อย',
# Import log
'importlogpage' => 'ปูมการนำเข้า',
# JavaScriptTest
'javascripttest' => 'การทดสอบจาวาสคริปต์',
+'javascripttest-title' => 'กำลังดำเนินงานทดสอบ $1',
+'javascripttest-pagetext-noframework' => 'หน้านี้สงวนไว้สำหรับดำเนินงานการทดสอบจาวาสคริปต์',
+'javascripttest-pagetext-skins' => 'เลือกสกินที่จะดำเนินงานการทดสอบ:',
+'javascripttest-qunit-intro' => 'ดู[$1 เอกสารกำกับการทดสอบ]บน mediawiki.org',
# Tooltip help for the actions
'tooltip-pt-userpage' => 'หน้าผู้ใช้ของคุณ',
'markedaspatrollederror' => 'ไม่สามารถทำเครื่องหมายว่าตรวจสอบแล้ว',
'markedaspatrollederrortext' => 'คุณจำเป็นต้องระบุรุ่นการแก้ไขที่กำหนดว่าตรวจสอบแล้ว',
'markedaspatrollederror-noautopatrol' => 'คุณไม่สามารถทำเครื่องหมายการแก้ไขของคุณเองว่าตรวจสอบแล้ว',
+'markedaspatrollednotify' => 'การเปลี่ยนแปลงไปยัง $1 ถูกทำเครื่องหมายว่าตรวจสอบแล้ว',
+'markedaspatrollederrornotify' => 'การทำเครื่องหมายว่าตรวจสอบแล้วล้มเหลว',
# Patrol log
'patrol-log-page' => 'ปูมการตรวจสอบ',
'exif-gpsareainformation' => 'ชื่อของพื้นที่จีพีเอส',
'exif-gpsdatestamp' => 'วันที่จีพีเอส',
'exif-gpsdifferential' => 'การปรับแค่ข้อแตกต่างจีพีเอส',
+'exif-jpegfilecomment' => 'ความเห็นไฟล์ JPEG',
'exif-keywords' => 'คำสำคัญ',
'exif-objectname' => 'ชื่อเรื่องสั้น',
'exif-headline' => 'พาดหัวข่าว',
'htmlform-submit' => 'ส่งข้อมูล',
'htmlform-reset' => 'ยกเลิกการเปลื่ยนแปลง',
'htmlform-selectorother-other' => 'อื่น ๆ',
+'htmlform-no' => 'ไม่',
+'htmlform-yes' => 'ใช่',
# SQLite database support
'sqlite-has-fts' => 'รุ่น $1 พร้อมการสนับสนุนการค้นหาข้อความแบบเต็ม',
'rightsnone' => '(ไม่มี)',
# Feedback
+'feedback-bugornote' => 'หากคุณได้อธิบายปัญหาทางเทคนิคในรายละเอียดแล้ว โปรด[$1 รายงานจุดบกพร่อง]
+มิฉะนั้น คุณสามารถแบบอย่างง่ายด้านล่าง ความเห็นของคุณจะถูกเพิ่มเข้าสู่ "[$3 $2]" ร่วมกับชื่อผู้ใช้ของคุณ',
+'feedback-subject' => 'เรื่อง:',
'feedback-message' => 'ข้อความ:',
'feedback-cancel' => 'ยกเลิก',
'feedback-submit' => 'ส่งคำติชม',
'feedback-adding' => 'เพิ่มคำติชมเข้าไปที่หน้า...',
+'feedback-thanks' => 'ขอบคุณ! ผลป้อนกลับของคุณถูกโพสต์ไปยังหน้า "[$2 $1]" แล้ว',
'feedback-close' => 'เสร็จสิ้น',
+'feedback-bugcheck' => 'ยอดเยี่ยม! เพียงตรวจสอบว่าจุดบกพร่องนั้นมิใช่หนึ่งใน[$1 จุดบกพร่องที่ทราบแล้ว]',
+'feedback-bugnew' => 'ฉันตรวจสอบแล้ว รายงานจุดบกพร่องใหม่',
# Search suggestions
'searchsuggest-search' => 'ค้นหา',
'searchsuggest-containing' => 'ประกอบไปด้วย...',
# API errors
+'api-error-badaccess-groups' => 'คุณไม่ได้รับอนุญาตให้อัปโหลดไฟล์มายังวิกินี้',
'api-error-empty-file' => 'ไฟล์ที่คุณส่งมานั้นว่าง',
'api-error-emptypage' => 'ไม่อนุญาตให้สร้างหน้าใหม่ที่ว่าง',
'api-error-file-too-large' => 'ไฟล์ที่คุณส่งมาใหญ่เกินไป',
'api-error-filename-tooshort' => 'ชื่อไฟล์สั้นเกินไป',
'api-error-filetype-banned' => 'ไฟล์ประเภทนี้ถูกห้าม',
'api-error-mustbeloggedin' => 'กรุณาลงชื่อเข้าใช้เพื่ออัปโหลดไฟล์',
+'api-error-uploaddisabled' => 'การอัปโหลดถูกปิดใช้งานบนวิกินี้',
# Durations
'duration-seconds' => '$1 วินาที',
'tog-shownumberswatching' => 'Ipakita ang bilang ng mga nagbabantay na tagagamit',
'tog-oldsig' => 'Umiiral na lagda:',
'tog-fancysig' => 'Ituring ang lagda bilang teksto ng wiki (walang automatikong pagkawing)',
-'tog-externaleditor' => 'Gumamit ng nakatakdang panlabas na pampatnugot ayon sa likas na pagkakatakda (para sa mga dalubhasa lamang, kailangan ng natatanging mga pagtatakda sa iyong kompyuter. [//www.mediawiki.org/wiki/Manual:External_editors Marami pang kabatiran.])',
-'tog-externaldiff' => 'Gumamit ng likas na nakatakdang panlabas na pagkakaiba (para sa mga dalubhasa lamang, kailangan ng natatanging mga pagtatakda sa iyong kompyuter. [//www.mediawiki.org/wiki/Manual:External_editors Mas marami pang kabatiran.])',
'tog-showjumplinks' => 'Payagan ang mga "tumalon sa" na kawing pampagamit',
'tog-uselivepreview' => 'Gamitin ang buhay na paunang tingin (JavaScript) (Eksperimental)',
'tog-forceeditsummary' => 'Pagsabihan ako kapag nagpapasok ng walang-lamang buod ng pagbabago',
'tog-showhiddencats' => 'Ipakita ang mga nakatagong kategorya',
'tog-noconvertlink' => 'Huwag paganahin ang pagpapalit ng pamagat na pangkawing',
'tog-norollbackdiff' => 'Alisin ang mga pagkakaiba pagkatapos isagawa ang pagpapagulong na pabalik sa dati',
+'tog-useeditwarning' => 'Magbabala sa akin kapag umalis ako sa isang pahina ng pampatnugot na hindi pa nasasagip ang mga pagbabago',
'underline-always' => 'Palagi',
'underline-never' => 'Hindi magpakailanman',
'edit-already-exists' => 'Hindi makalikha ng isang bagong pahina.
Umiiral na ito.',
'defaultmessagetext' => 'Nakatakdang teksto ng mensahe',
+'editwarning-warning' => 'Ang paglisan mula sa pahinang ito ay maaaring makasanhi sa iyo ng pagkawala ng anumang mga pagbabagong ginawa mo.
+Kung nakalagda ka, maaari mong huwag paganahin ang babalang ito sa loob ng seksyong "May binabago" ng mga nais mo.',
# Content models
'content-model-wikitext' => 'wikiteksto',
'search-external' => 'Panlabas na paghahanap',
'searchdisabled' => 'Nakapatay ang paghahanap sa {{SITENAME}}. Maaari kang pansamantalang maghanap sa pamamagitan ng Google. Tandaan na maaaring luma na ang kanilang mga indeks sa nilalaman ng {{SITENAME}}.',
-# Quickbar
-'qbsettings' => 'Quickbar',
-'qbsettings-none' => 'Wala',
-'qbsettings-fixedleft' => 'Inayos ang kaliwa',
-'qbsettings-fixedright' => 'Inayos ang kanan',
-'qbsettings-floatingleft' => 'Kaliwa lumulutang',
-'qbsettings-floatingright' => 'Kanan lumulutang',
-'qbsettings-directionality' => 'Naayos na, ayon sa kapupuntahan ng panitik ng wika mo',
-
# Preferences page
'preferences' => 'Mga kagustuhan',
'mypreferences' => 'Mga nais',
'http-read-error' => 'Kamalian sa pagbasa ng HTTP.',
'http-timed-out' => 'Huminto ang kahilingang HTTP.',
'http-curl-error' => 'Kamalian sa pagsalok ng URL: $1',
-'http-host-unreachable' => 'Hindi marating ang URL.',
'http-bad-status' => 'Nagkaroon ng suliranin habang hinihiling ang HTTP na: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => 'Walang nahanap na tagagamit.',
'listusers-blocked' => '(hinarang)',
-# Special:ActiveUsers
-'activeusers' => 'Tala ng mga aktibong tagagamit',
-'activeusers-intro' => 'Isa itong talaan ng mga tagagamit na nagkaroon ng ilang uri ng galaw sa loob ng huling $1 {{PLURAL:$1|araw|mga araw}}.',
-'activeusers-count' => '$1 {{PLURAL:$1|pagbabago|mga pagbabago}} sa loob ng huling {{PLURAL:$3|araw|$3 mga araw}}',
-'activeusers-from' => 'Ipakita ang mga tagagamit simula sa:',
-'activeusers-hidebots' => 'Itago ang mga bots',
-'activeusers-hidesysops' => 'Itago ang mga tagapangasiwa',
-'activeusers-noresult' => 'Walang natagpuang mga tagagamit.',
-
# Special:ListGroupRights
'listgrouprights' => 'Mga uri ng tagagamit',
'listgrouprights-summary' => 'Ang sumusunod ay isang talaan ng mga pangkat ng tagagamit na binigyang kahulugang sa wiking ito, kasama ang kanilang mga kaugnay na mga karapatan.
# Stylesheets
'common.css' => '/* Ang inilagay na CSS dito ay gagamitin para sa lahat ng mga pabalat */',
-'standard.css' => '/* Ang inilagay na CSS dito ay makakaapekto sa mga tagagamit ng Karaniwang pabalat */',
-'nostalgia.css' => '/* Ang CSS na inilagay dito ay makakaapekto sa mga tagagamit ng pabalat na Nostalgia */',
'cologneblue.css' => "/* Ang Cascading Style Sheets na inilagay dito ay makakaapekto sa mga tagagamit ng pabalat na Bughaw na Kolown (''Cologne Blue'') */",
'monobook.css' => '/* Ang CSS na inilagay dito ay makakaapekto sa mga tagagamit ng pabalat na Monobook */',
-'myskin.css' => "/* Ang CSS na inilagay dito ay makakaapekto sa lahat ng mga tagagamit ng pabalat na Balatko (''MySkin'') */",
-'chick.css' => "/* Ang CSS na inilagay dito ay makakaapekto sa mga tagagamit ng pabalat na ''Chick'' */",
-'simple.css' => "/* Ang CSS na iniligay dito ay makakaapekto sa mga tagagamit ng Payak (''Simple'') na pabalat */",
'modern.css' => "/* Ang CSS na iniligay dito ay makakaapekto sa tagagamit ng Makabagong (''Modern'') pabalat */",
'vector.css' => '/* Ang inilagay na CSS dito ay makakaapekto sa mga tagagamit ng pabalat na Vector */',
'print.css' => '/* Ang CSS na inilagay dito ay makakaapekto sa kalalabasan o resulta ng paglilimbag */',
# Scripts
'common.js' => '/* Ang anumang JavaScript dito ay ikakarga para sa lahat ng mga tagagamit ng bawat pahinang ikinarga. */',
-'standard.js' => '/* Ang anumang JavaScript dito ay ikakarga para sa mga tagagamit na gumagamit ng Karaniwang pabalat */',
-'nostalgia.js' => '/* Ang anumang JavaScript dito ay ikakarga para sa mga tagagamit na gumagamit ng pabalat na Nostalgia */',
'cologneblue.js' => '/* Ang anumang JavaScript dito ay ikakarga para sa mga tagagamit ng pabalat na Cologne Blue o Bughaw na Kolown */',
'monobook.js' => '/* Ang anumang JavaScript dito ay ikakarga para sa mga tagagamit na gumagamit ng pabalat na MonoBook */',
-'myskin.js' => '/* Ang anumang JavaScript dito ay ikakarga para sa tagagamit na gumagamit ng pabalat na MySkin o Balat Ko */',
-'chick.js' => '/* Ang anumang JavaScript dito ay ikakarga para sa mga tagagamit na gumagamit ng pabalat na Chick */',
-'simple.js' => '/* Ang anumang JavaScript dito ay ikakarga para sa mga tagagamit na gumagamit ng Payak na pabalat */',
'modern.js' => '/* Ang anumang JavaScript dito ay ikakarga para sa mga tagagamit na gumagamit ng Modernong pabalat */',
'vector.js' => '/* Ang anumang JavaScript dito ay ikakarga para sa mga tagagamit na gumagamit ng pabalat na Vector */',
'group-autoconfirmed.js' => '/* Ang anumang JavaScript dito ay ikakarga para sa mga tagagamit na kusang natiyak lamang */',
'pageinfo-templates' => '{{PLURAL:$1|Suleras|Mga suleras}} ($1) na nasa transklusyon (kasama sa maraming mga lugar)',
# Skin names
-'skinname-standard' => 'Klasiko',
-'skinname-nostalgia' => 'Nostalhiya',
'skinname-cologneblue' => 'Bughaw na Kolown',
'skinname-monobook' => 'MonoAklat ("isang aklat")',
-'skinname-myskin' => 'PabalatKo',
-'skinname-chick' => "\"Pambabae\" (''Chick'')",
-'skinname-simple' => 'Payak',
'skinname-modern' => 'Makabago (Moderno)',
'skinname-vector' => 'Vector',
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-hans' => 'hans',
'tog-shownumberswatching' => 'İzleyen kullanıcı sayısını göster',
'tog-oldsig' => 'Mevcut imza:',
'tog-fancysig' => 'İmzaya vikimetin muamelesi yap (otomatik bir bağlantı olmadan)',
-'tog-externaleditor' => 'Varsayılan olarak harici düzenleyici kullan (deneyimli kullanıcılar içindir ve bilgisayarınızda özel ayarlar gerektirir. [//www.mediawiki.org/wiki/Manual:External_editors Ayrıntılı bilgi için tıklayın.])',
-'tog-externaldiff' => 'Varsayılan olarak harici karşılaştırıcı kullan (deneyimli kullanıcılar içindir ve bilgisayarınızda özel ayarlar gerektirir. [//www.mediawiki.org/wiki/Manual:External_editors Ayrıntılı bilgi için tıklayın.])',
'tog-showjumplinks' => '"{{int:jumpto}}" erişilebilirlik bağlantısı etkinleştir',
'tog-uselivepreview' => 'Canlı ön izlemeyi kullan (JavaScript gerektirir ve özellik deneme aşamasındadır)',
'tog-forceeditsummary' => 'Özeti boş bıraktığımda beni uyar',
'tog-showhiddencats' => 'Gizli kategorileri göster',
'tog-noconvertlink' => 'Bağlantı başlığı dönüştürmesini devre dışı bırakma',
'tog-norollbackdiff' => 'Geridönüş uygulandıktan sonra değişikliği atla',
+'tog-useeditwarning' => 'Kaydedilmemiş değişikliğe sahip bir değişiklik sayfasından çıkarken beni uyar',
'underline-always' => 'Daima',
'underline-never' => 'Asla',
'nov' => 'Kas',
'dec' => 'Ara',
+'monday-at' => '$1 Pazartesi günü',
+'tuesday-at' => '$1 Salı günü',
+'wednesday-at' => '$1 Çarşamba günü',
+'thursday-at' => '$1 Perşembe günü',
+'friday-at' => '$1 Cuma günü',
+'saturday-at' => '$1 Cumartesi günü',
+'sunday-at' => '$1 Pazar günü',
+'today-at' => '$1',
+'yesterday-at' => '$1 dün itibariyle',
+
# Categories related messages
'pagecategories' => '{{PLURAL:$1|Kategori|Kategoriler}}',
'category_header' => '"$1" kategorisindeki sayfalar',
'defaultmessagetext' => 'Varsayılan mesaj metni',
'invalid-content-data' => 'Geçersiz içerik verisi',
'content-not-allowed-here' => '"$1" içeriğine, [[$2]] sayfasında izin verilmemekte.',
+'editwarning-warning' => 'Bu sayfadan ayrılmak yaptığınız herhangi bir değişikliği kaybetmenize sebep olabilir.
+Eğer giriş yaptıysanız, bu uyarıyı, tercihlerinizin "{{int:prefs-editing}}" bölümünde devre dışı bırakabilirsiniz.',
# Content models
'content-model-wikitext' => 'vikimetin',
'search-external' => 'Dış arama',
'searchdisabled' => '{{SITENAME}} sitesinde arama yapma geçici olarak durdurulmuştur. Bu arada Google kullanarak {{SITENAME}} içinde arama yapabilirsiniz. Arama sitelerinde dizinlerin biraz eski kalmış olabileceğini göz önünde bulundurunuz.',
-# Quickbar
-'qbsettings' => 'Hızlı erişim sütun ayarları',
-'qbsettings-none' => 'Hiçbiri',
-'qbsettings-fixedleft' => 'Sola sabitlendi',
-'qbsettings-fixedright' => 'Sağa sabitlendi',
-'qbsettings-floatingleft' => 'Sola yaslanıyor',
-'qbsettings-floatingright' => 'Sağa yaslanıyor',
-'qbsettings-directionality' => 'Sabit, dilinizin komut dosyasının yönüne bağlı',
-
# Preferences page
'preferences' => 'Tercihler',
'mypreferences' => 'Tercihler',
'http-read-error' => 'HTTP okuma hatası.',
'http-timed-out' => 'HTTP isteği zaman aşımına uğradı.',
'http-curl-error' => 'URL alınırken hata: $1',
-'http-host-unreachable' => "URL'ye ulaşılamıyor.",
'http-bad-status' => 'HTTP isteği sırasında bir sorun oluştu: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => 'Kullanıcı bulunamadı.',
'listusers-blocked' => '(engellenmiş)',
-# Special:ActiveUsers
-'activeusers' => 'Aktif kullanıcı listesi',
-'activeusers-intro' => 'Bu, son $1 {{PLURAL:$1|günde|günde}} bir çeşit etkinlik göstermiş kullanıcıların listesidir.',
-'activeusers-count' => 'Son {{PLURAL:$3|günde|$3 günde}} $1 {{PLURAL:$1|eylem|eylem}}',
-'activeusers-from' => 'Şununla başlayan kullanıcıları görüntüle:',
-'activeusers-hidebots' => 'Botları gizle',
-'activeusers-hidesysops' => 'Yöneticileri gizle',
-'activeusers-noresult' => 'Kullanıcı bulunamadı.',
-
# Special:ListGroupRights
'listgrouprights' => 'Kullanıcı grubu hakları',
'listgrouprights-summary' => 'Aşağıdaki bu vikide tanımlanan kullanıcı gruplarının, ilgili erişim haklarıyla birlikte listesidir.
'pageinfo-category-files' => 'Dosya sayısı',
# Skin names
-'skinname-standard' => 'Klasik',
-'skinname-nostalgia' => 'Nostaljik',
-'skinname-chick' => 'Şık',
-'skinname-simple' => 'Basit',
'skinname-modern' => 'Modern',
# Patrolling
'duration-centuries' => '$1 {{PLURAL:$1|yüzyıl|yüzyıl}}',
'duration-millennia' => '$1 {{PLURAL:$1|bin yıl|bin yıl}}',
+# Unknown messages
+'hours-ago' => '$1 {{PLURAL:$1|saat|saat}} önce',
+'minutes-ago' => '$1 {{PLURAL:$1|dakika|dakika}} önce',
+'seconds-ago' => '$1 {{PLURAL:$1|saniye|saniye}} önce',
);
* @author Haqmar
* @author Himiq Dzyu
* @author KhayR
+ * @author MF-Warburg
* @author Marat Vildanov
* @author Reedy
* @author Rinatus
'tog-shownumberswatching' => 'Битне күзәтү исемлекләренә өстәгән кулланучылар санын күрсәтелсен',
'tog-oldsig' => 'Хәзерге имза:',
'tog-fancysig' => 'Имзаның шәхси вики-билгеләмәсе (автоматик сылтамасыз)',
-'tog-externaleditor' => 'Тышкы редактор куллану (бары тик белгечләргә генә һәм санак махсус көйләнгән булу зарур; [//www.mediawiki.org/wiki/Manual:External_editors тулырак...])',
-'tog-externaldiff' => 'Тышкы версия чагыштыру программасын куллану (бары тик белгечләр өчен һшм санак махсус көйләнгән булу зарур; [//www.mediawiki.org/wiki/Manual:External_editors тулырак...])',
'tog-showjumplinks' => '«Күчү» ярдәмче сылтамалары ялгансын',
'tog-uselivepreview' => 'Тиз карап алу кулланылсын (JavaScript, эксперименталь)',
'tog-forceeditsummary' => 'Үзгәртүләрне тасвирлау юлы тутырылмаган булса, кисәтү',
'tog-diffonly' => 'Юрама чагыштыру астында бит эчтәлеге күрсәтелмәсен',
'tog-showhiddencats' => 'Яшерен төркемнәр күрсәтелсен',
'tog-norollbackdiff' => 'Кире кайтару ясагач юрамалар аермасы күрсәтелмәсен',
+'tog-useeditwarning' => 'Битне сакламыйча китү вакытында мине кисәтергә',
'underline-always' => 'Һәрвакыт',
'underline-never' => 'Бервакытта да',
'edit-no-change' => 'Текстта үзгәешләр ясалмау сәбәпле, сезнең үзгәртү кире кагыла.',
'edit-already-exists' => 'Яңа бит төзеп булмый.
Ул инде бар.',
+'editwarning-warning' => 'Башка биткә күчү вакытында бу мәкаләгә керткән үзгәрешләр югалырга мөмкин.
+Әгәрдә сез теркәлгән булсагыз, бу искәрмәне сез «Көйләнмәләрем» өлешендә үзгәртә аласыз.',
# Parser/template warnings
'expensive-parserfunction-warning' => "'''Игътибар:''' бу биттә хәтерне еш кулланучы функцияләр артык күп.
'powersearch-togglenone' => 'Бирни дә юк',
'search-external' => 'Тышкы эзләү',
-# Quickbar
-'qbsettings' => 'Күчешләр аслыгы',
-'qbsettings-none' => 'Күрсәтмәү',
-'qbsettings-fixedleft' => 'Сулда күчерелмәс',
-'qbsettings-fixedright' => 'Уңда күчерелмәс',
-'qbsettings-floatingleft' => 'Сулда йөзмә',
-'qbsettings-floatingright' => 'Уңда йөзмә',
-
# Preferences page
'preferences' => 'Көйләнмәләр',
'mypreferences' => 'Көйләнмәләр',
'listusers-noresult' => 'Кулланучыларны табылмады.',
'listusers-blocked' => '(тыелган)',
-# Special:ActiveUsers
-'activeusers' => 'Актив кулланучылар исемлеге',
-'activeusers-hidebots' => 'Ботларны яшер',
-'activeusers-hidesysops' => 'Идарәчеләрне яшер',
-'activeusers-noresult' => 'Кулланучылар табылмады.',
-
# Special:ListGroupRights
'listgrouprights' => 'Кулланучы төркемнәренең хокуклары',
'listgrouprights-group' => 'Төркем',
'blanknamespace' => '(Төп)',
# Contributions
-'contributions' => '{{GENDER:$1|Кулланучының} кертеме',
+'contributions' => '{{GENDER:$1|Кулланучының}} кертеме',
'contributions-title' => '$1 исемле кулланучының кертеме',
'mycontris' => 'Кертем',
'contribsub2' => '$1 ($2) өчен',
# Spam protection
'spamprotectiontitle' => 'Спам фильтры',
+# Info page
+'pageinfo-toolboxlink' => 'Бит турында мәгълүмат',
+
# Skin names
-'skinname-standard' => 'Классик',
-'skinname-nostalgia' => 'Искә алу',
'skinname-cologneblue' => 'Зәңгәр сагыш',
'skinname-monobook' => 'Китап',
-'skinname-myskin' => 'Үзем',
-'skinname-chick' => 'Чеби',
-'skinname-simple' => 'Гади',
'skinname-modern' => 'Замана',
'skinname-vector' => 'Сызымлы',
'tog-shownumberswatching' => 'بۇ بەتنى كۆزىتىۋاتقان ئىشلەتكۈچى سانىنى كۆرسەت',
'tog-oldsig' => 'نۆۋەتتىكى ئىمزا:',
'tog-fancysig' => 'ئىمزاغا wiki تېكستى سۈپىتىدە مۇئامىلە قىل (ئۆزلۈكىدىن ئۇلانما ھاسىل بولمايدۇ)',
-'tog-externaleditor' => 'كۆڭۈلدىكى ئەھۋالدا سىرتقى تەھرىرلىگۈچ ئىشلىتىدۇ (ئالىي ئىشلەتكۈچىگە تەمىنلىنىدۇ، كومپيۇتېرىڭىزدا بىر قىسىم ئالاھىدە تەڭشەش ئېلىپ بېرىشىڭىز لازىم
-[//www.mediawiki.org/wiki/Manual:External_editors تېخىمۇ كۆپ ئۇچۇر.])',
-'tog-externaldiff' => 'كۆڭۈلدىكى ئەھۋالدا سىرتقى پەرق تەھلىلى ئىشلىتىدۇ (ئالىي ئىشلەتكۈچىگە تەمىنلىنىدۇ، كومپيۇتېرىڭىزدا بىر قىسىم ئالاھىدە تەڭشەش ئېلىپ بېرىشىڭىز لازىم. [//www.mediawiki.org/wiki/Manual:External_editors تېخىمۇ كۆپ ئۇچۇر.])',
'tog-showjumplinks' => '"ئاتلا" زىيارەت ئۇلانمىسىنى قوزغات',
'tog-uselivepreview' => 'رىئال ۋاقىتلىق ئالدىن كۆزىتىشنى ئىشلەت (JavaScript زۆرۈر) (سىناق)',
'tog-forceeditsummary' => 'ئۈزۈندە كىرگۈزمىگەندە مېنى ئەسكەرت',
'searchdisabled' => '{{SITENAME}} نىڭ ئىزدىشى چەكلەنگەن. سىز ھازىرچە Google ئىشلىتىپ ئىزدەپ تۇرۇڭ،.
دىققەت ئۇلار ئىندېكسلىغان {{SITENAME}} مەزمۇنىنىڭ ۋاقتى ئۆتكەن بولۇشى مۇمكىن.',
-# Quickbar
-'qbsettings' => 'تېز يولباشچى ستونى',
-'qbsettings-none' => 'يوق',
-'qbsettings-fixedleft' => 'سول تەرەپ مۇقىم',
-'qbsettings-fixedright' => 'ئوڭ تەرەپ مۇقىم',
-'qbsettings-floatingleft' => 'سول تەرەپ لەيلىمە',
-'qbsettings-floatingright' => 'ئوڭ تەرەپ لەيلىمە',
-'qbsettings-directionality' => 'تىلىڭىزدىكى تېكىست ۋە قوليازمىنىڭ يۆنىلىشىگە ئاساسەن مۇقىملاشتۇرىدۇ.',
-
# Preferences page
'preferences' => 'مايىللىق',
'mypreferences' => 'مايىللىق',
'http-read-error' => 'HTTP ئوقۇش خاتالىقى.',
'http-timed-out' => 'HTTP ئىلتىماسى ۋاقىت ھالقىدى.',
'http-curl-error' => 'URL ئاجراتقاندا خاتالىق كۆرۈلدى: $1',
-'http-host-unreachable' => 'URL غا ئۇلىشالمىدى.',
'http-bad-status' => 'HTTP ئىلتىماس قىلغاندا مەسىلە كۆرۈلدى: $1 $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => 'ئىشلەتكۈچى تېپىلمىدى.',
'listusers-blocked' => '(چەكلەنگەن)',
-# Special:ActiveUsers
-'activeusers' => 'ئاكتىپ ئەزالار تىزىملىكى',
-'activeusers-intro' => 'بۇ يېقىنقى $1 {{PLURAL:$1| كۈن|كۈن}}دىكى مەشغۇلات قىلغان ئىشلەتكۈچىلەر تىزىملىكى.',
-'activeusers-count' => 'يېقىنقى {{PLURAL:$3|كۈن|$3 كۈن}}دىكى {{PLURAL:$1|مەشغۇلات}} قېتىم سانى $1',
-'activeusers-from' => 'باشلانغان ئىشلەتكۈچىنى كۆرسەت:',
-'activeusers-hidebots' => 'ماشىنا ئادەمنى يوشۇر',
-'activeusers-hidesysops' => 'باشقۇرغۇچىنى يوشۇر',
-'activeusers-noresult' => 'ئىشلەتكۈچى تېپىلمىدى.',
-
# Special:ListGroupRights
'listgrouprights' => 'ئىشلەتكۈچى گۇرۇپپا ھوقۇقى',
'listgrouprights-summary' => 'تۆۋەندىكىسى بۇ wiki دا ئېنىقلىما بېرىلگەن ئىشلەتكۈچى ھوقۇق چېكى تىزىملىكى ۋە ئۇلارنىڭ زىيارەت ھوقۇق چېكى.
# Stylesheets
'common.css' => '/* CSS placed here will be applied to all skins */',
-'standard.css' => '/* CSS placed here will affect users of the Standard skin */',
-'nostalgia.css' => '/* CSS placed here will affect users of the Nostalgia skin */',
'cologneblue.css' => '/* CSS placed here will affect users of the Cologne Blue skin */',
'monobook.css' => '/* CSS placed here will affect users of the Monobook skin */',
-'myskin.css' => '/* CSS placed here will affect users of the MySkin skin */',
-'chick.css' => '/* CSS placed here will affect users of the Chick skin */',
-'simple.css' => '/* CSS placed here will affect users of the Simple skin */',
'modern.css' => '/* CSS placed here will affect users of the Modern skin */',
'vector.css' => '/* CSS placed here will affect users of the Vector skin */',
'print.css' => '/* CSS placed here will affect the print output */',
# Scripts
'common.js' => '/* Any JavaScript here will be loaded for all users on every page load. */',
-'standard.js' => '/* Any JavaScript here will be loaded for users using the Standard skin */',
-'nostalgia.js' => '/* Any JavaScript here will be loaded for users using the Nostalgia skin */',
'cologneblue.js' => '/* Any JavaScript here will be loaded for users using the Cologne Blue skin */',
'monobook.js' => '/* Any JavaScript here will be loaded for users using the MonoBook skin */',
-'myskin.js' => '/* Any JavaScript here will be loaded for users using the MySkin skin */',
-'chick.js' => '/* Any JavaScript here will be loaded for users using the Chick skin */',
-'simple.js' => '/* Any JavaScript here will be loaded for users using the Simple skin */',
'modern.js' => '/* Any JavaScript here will be loaded for users using the Modern skin */',
'vector.js' => '/* Any JavaScript here will be loaded for users using the Vector skin */',
'group-autoconfirmed.js' => '/* Any JavaScript here will be loaded for autoconfirmed users only */',
'pageinfo-category-files' => 'ھۆججەت سانى',
# Skin names
-'skinname-standard' => 'Classic',
-'skinname-nostalgia' => 'Nostalgia',
'skinname-cologneblue' => 'Cologne Blue',
'skinname-monobook' => 'MonoBook',
-'skinname-myskin' => 'MySkin',
-'skinname-chick' => 'Chick',
-'skinname-simple' => 'Simple',
'skinname-modern' => 'Modern',
'skinname-vector' => 'Vector',
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-hans' => 'hans',
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-hans' => 'hans',
'gotaccount' => "Sito zà iscrito? '''$1'''.",
'gotaccountlink' => 'Entra',
'userlogin-resetlink' => "Desmentegà i to dati d'aceso?",
+'helplogin-url' => 'Help:Login',
'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Ajuto col login]]',
'createaccountmail' => 'Dopara na password caxuałe tenporanea e inviała al indiriso e-mail spesifegà cuà soto',
'createaccountreason' => 'Motivassion:',
'passwordreset-text' => 'Conpleta sto moduło par riçevare i detaji del to account via posta ełetronega.',
'passwordreset-legend' => 'Rinposta ła password',
'passwordreset-disabled' => 'Ła rinpostasion deła password xe stà dixabiłità so sto projeto wiki.',
+'passwordreset-emaildisabled' => 'Le funsionalità de posta eletrònega le xe stà disabilità su sta wiki.',
'passwordreset-pretext' => '{{PLURAL:$1|| Inserisi una dełe porsion de dati cua soto}}',
'passwordreset-username' => 'Nome utente:',
'passwordreset-domain' => 'Dominio',
'powersearch-togglenone' => 'Nissun',
'search-external' => 'Riserca esterna',
'searchdisabled' => 'La riserca interna de {{SITENAME}} no la xe ativa; par intanto te pol proár a doparar un motore de riserca esterno come Google. (Nota però che i contenuti de {{SITENAME}} presenti in sti motori i podarìa èssar mìà agiornà.)',
+'search-error' => 'Se gà verifegà un eror durante la riserca: $1',
# Preferences page
'preferences' => 'Prefarense',
'pageswithprop' => 'Pagine co na proprietà de pagina',
'pageswithprop-legend' => 'Pagine co na proprietà de pagina',
+'pageswithprop-text' => 'Sta pagina la elenca le pagine che dòpara na particolare proprietà de pagina.',
'pageswithprop-prop' => 'Nome proprietà:',
'pageswithprop-submit' => 'Và',
'proxyblocksuccess' => 'Fatto.',
'sorbsreason' => 'Sto indirizo IP el xe elencà come proxy verto ne la lista nera DNSBL doparà da {{SITENAME}}.',
'sorbs_create_account_reason' => 'No se pol crear acessi novi da sto indirizo IP parché el xe elencà come proxy verto ne la lista nera DNSBL doparà da {{SITENAME}}.',
+'xffblockreason' => "Un indiriso IP presente ne l'intestasion X-Forwarded-For, tuo o del server proxy che te sì drio doparar, el xe stà blocà. La motivasion originale del bloco la xe: $1",
'cant-block-while-blocked' => 'No se pode blocar altri utenti finché se xe blocài.',
'cant-see-hidden-user' => "L'utente che te vol blocar el xe zà stà blocà e sconto. Sicome a no te ghè mia i diriti de hideuser, no te pol mia védar o canbiar el bloco de l'utente.",
'ipbblocked' => 'No te pui blocare o sblocare altri utenti, parché ti steso te si blocà',
'pageinfo-robot-noindex' => 'Mia indicizabile',
'pageinfo-views' => 'Nùmaro de visite',
'pageinfo-watchers' => "Nùmaro de utenti che tien d'ocio sta pagina",
+'pageinfo-few-watchers' => 'Manco de $1 {{PLURAL:$1|oservador|oservadori}}',
'pageinfo-redirects-name' => 'Rimandi verso sta pagina',
'pageinfo-subpages-name' => 'Sotopagine de sta pagina',
'pageinfo-subpages-value' => '$1 ($2 {{PLURAL:$2|rimandi}}; $3 {{PLURAL:$3|no rimandi}})',
Mật khẩu tạm: $2',
'passwordreset-emailsent' => 'Đã gửi thư điện tử để tái tạo mật khẩu.',
'passwordreset-emailsent-capture' => 'Thư điện tử để tái tạo mật khẩu đã được gửi, nội dung như sau.',
-'passwordreset-emailerror-capture' => 'Chúng tôi đã tạo thư tái tạo mật khẩu dưới đây, nhưng không thể gửi đến người dùng: $1',
+'passwordreset-emailerror-capture' => 'Chúng tôi đã tạo thư tái tạo mật khẩu dưới đây, nhưng không thể gửi đến {{GENDER:$2}}người dùng: $1',
# Special:ChangeEmail
'changeemail' => 'Đổi địa chỉ thư điện tử',
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-hans' => 'Giản thể',
* @file
*
* @author Altaileopard
+ * @author Matma Rex
* @author Silvicola
*/
'tog-shownumberswatching' => 'Dii andsôôl dr beoobachdâr ôôdsajchn',
'tog-oldsig' => 'foorschau fon dr agduäln signaduur:',
'tog-fancysig' => 'Signaduur is dhägsd in wighi-sindhags (alsâ ned audomaadisch â lingg)',
-'tog-externaleditor' => 'Schdandardwäässich an ägsdhärnân eedidhâr neemn (nôr for di sich ausghenn, dâdsuu
-mus mr ufm ajchnen rächnâr was ajrichdn gehnn)',
-'tog-externaldiff' => 'Â ägsdhärns Brogram dsum ôôdsjachn fon dâ wärsjoons-undârschiid neemn (nôr fir dii sich
-ausghenn, mr mus dâdsuu ufm ajchnen rächnâr was âjrichdn ghenn)',
'tog-uselivepreview' => 'Schnäl-foorschau benudsn (brauchd JavaScript) (ärschd ân fârsuuch)',
'tog-forceeditsummary' => 'Sich erinärn lasn, wemmâr ghâ dsusamnfasung gschriiwn had',
'tog-watchlisthideown' => 'Ajchne bearbajdungn ned in dr beoobachdungs-lischdn uffiirn',
'search-external' => 'Ägsdärne suach',
'searchdisabled' => 'Diâ {{SITENAME}}-suâch ist ausgschald. Duu ghâusch so lang mid Google suâchn. Dengg drâu, des was mr dôô fir {{SITENAME}} find, ghâu iwârhoold saj.',
-# Quickbar
-'qbsettings' => 'Sajdn-lajsdn',
-'qbsettings-none' => 'Ghane',
-'qbsettings-fixedleft' => 'Lings, feschd',
-'qbsettings-fixedright' => 'Rächds, feschd',
-'qbsettings-floatingleft' => 'Lings, schwääbnd',
-'qbsettings-floatingright' => 'Rächds, schwääbnd',
-
# Preferences page
'preferences' => 'ajschdelunga',
'mypreferences' => 'Maj ajschdelunga',
# Special:ListGroupRights
'listgrouprights-members' => '(Lisdn fon dâ midgliidâr)',
-# E-mail user
+# Email user
'emailuser' => 'Dem ôôgmeldn â iimejl schign',
# Watchlist
# Stylesheets
'common.css' => '/* CSS hiir beâjflusd ale schelfn */',
-'standard.css' => "/* CSS hiir beâjflusd nôr dii Klassik-schelfn. Wen'd ale uf ôômôôl beâjflusn wilsch, muâsch an [[MediaWiki:Common.css]] was ändârn. */",
-'nostalgia.css' => "/* CSS hiir beâjflusd nôr dii Nostalgia-schelfn. Wen'd ale uf ôômôôl beâjflusn wilsch, muâsch an MediaWiki:Common.css was ändârn. */",
'cologneblue.css' => "/* CSS hiir beâjflusd nôr dii Kölnisch-Blau-schelfn. Wen'd ale uf ôômôôl beâjflusn wilsch, muâsch an MediaWiki:Common.css was ändârn. */",
'monobook.css' => "/* CSS hiir beâjflusd nôr dii Monobook-schelfn. Wen'd ale uf ôômôôl beâjflusn wilsch, muâsch an MediaWiki:Common.css was ändârn. */",
-'myskin.css' => "/* CSS hiir beâjflusd nôr dii MySkin-schelfn. Wen'd ale uf ôômôôl beâjflusn wilsch, muâsch an MediaWiki:Common.css was ändârn. */",
-'chick.css' => "/* CSS hiir beâjflusd nôr dii Küken-schelfn. Wen'd ale uf ôômôôl beâjflusn wilsch, muâsch an MediaWiki:Common.css was ändârn. */",
-'simple.css' => "/* CSS hiir beâjflusd nôr dii Simple-schelfn. Wen'd ale uf ôômôôl beâjflusn wilsch, muâsch an MediaWiki:Common.css was ändârn. */",
-'modern.css' => "/* CSS hiir beâjflusd nôr dii Modern-schelfn. Wen'd ale uf ôômôôl beâjflusn wilsch, muâsch an MediaWiki:Common.css was ändârn. */
-
-/* Dii glôôschrajwung im nawigadsjoonsberajch fârhindârd des: */
-.portlet h5,
-.portlet h6,
-#p-personal ul,
-#p-cactions li a,
-#preftoc a {
- text-transform: none;
-}",
+'modern.css' => "/* CSS hiir beâjflusd nôr dii Modern-schelfn. Wen'd ale uf ôômôôl beâjflusn wilsch, muâsch an MediaWiki:Common.css was ändârn. */",
'vector.css' => "/* CSS hiir beâjflusd nôr dii Vector-schelfn. Wen'd ale uf ôômôôl beâjflusn wilsch, muâsch an MediaWiki:Common.css was ändârn. */",
'print.css' => '/* CSS hiir beâjflusd nôr dii drugausgaawe. */',
'handheld.css' => '/* CSS hiir beâjflusd nôr dii handgerääde, jee nachdeem, welche schelfn in $wgHandheldStyle âjgeschdeld is. */',
'tog-shownumberswatching' => 'Igpakita an ihap han mga nangingita nga mga nagamit',
'tog-oldsig' => 'Aada nga pirma:',
'tog-fancysig' => 'Tratuha it pirma komo uska wikitext (nga waray automatiko nga sumpay)',
-'tog-externaleditor' => 'Gamit hin ha-gawas nga pagliwat ha default (ha mga experto la ini, nakinahanglan hin mga pinaurog nga mga seting ha imo kompyuter. [//www.mediawiki.org/wiki/Manual:External_editors More information.] )',
-'tog-externaldiff' => 'Gamit hin ha-gawas nga diff ha default (ha mga experto la, nakinahanglan hin mga pinaurog nga mga seting ha imo kompyuter. [//www.mediawiki.org/wiki/Manual:External_editors More information.])',
'tog-showjumplinks' => 'Enable "jump to" accessibility links',
'tog-uselivepreview' => 'Gamita an buhi nga pahiuna nga pagawas (nagkikinahanglan hin JavaScript) (eksperimental)',
'tog-forceeditsummary' => 'Pasabti ako kun waray ko ginsurat ha dalikyat-nga-tigaman han pagliwat (edit summary)',
Pamilnga la anay pinaagi ha Google ha pagkayana.
Ginpapasabot nga an sulod han mga panudlok han {{SITENAME}} in bangin daan an.',
-# Quickbar
-'qbsettings' => 'Quickbar',
-'qbsettings-none' => 'Waray',
-'qbsettings-fixedleft' => 'Ginayad an wala',
-'qbsettings-fixedright' => 'Gin-ayad an to-o',
-'qbsettings-floatingleft' => 'Nalutaw pawala',
-'qbsettings-floatingright' => 'Nalutaw pato-o',
-
# Preferences page
'preferences' => 'Mga karuyag',
'mypreferences' => 'Mga akon karuyag',
'http-read-error' => 'HTTP maysayop ha pagbasa.',
'http-timed-out' => 'Naubosan hin oras ha pagpaalayon ha HTTP.',
'http-curl-error' => 'May sayop ha pagkuha hin URL: $1',
-'http-host-unreachable' => 'Diri nakakaabot ha URL.',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'upload-curl-error6' => 'Diri nakakaabot ha URL',
'tog-shownumberswatching' => 'ווייזן דעם נומער פון בלאט אויפֿפאסערס',
'tog-oldsig' => 'איצטיגער אונטערשריפֿט:',
'tog-fancysig' => 'באַהאַנדלן אונטערשריפט אַלס וויקיטעקסט (אָן אויטאמאטישן לינק)',
-'tog-externaleditor' => 'ניצן א דרויסנדיגן רעדאקטירער גרונטלעך (נאר פֿאר מומחים, דאס פֿאדערט באזונדערע קאמפיוטער שטעלונגען).
-[//www.mediawiki.org/wiki/Manual:External_editors ווײַטערע אינפֿארמאַציע.]',
-'tog-externaldiff' => 'ניצן א דרויסנדיגן פֿאַרגלײַכער גרונטלעך (נאר פֿאר מומחים, דאס פֿאדערט באזונדערע קאמפיוטער שטעלונגען)
-[//www.mediawiki.org/wiki/Manual:External_editors ווײַטערע אינפֿארמאַציע.]',
'tog-showjumplinks' => 'באמעגלעך צוטריט לינקס פון "שפרינג צו"',
'tog-uselivepreview' => 'באנוצט זיך מיט לייוו פאראויסדיגע ווייזונג (JavaScript) (עקספירענמעטל)',
'tog-forceeditsummary' => 'ווארן מיך ווען איך לייג א ליידיג קורץ ווארט ענדערונג',
'tog-diffonly' => 'ווייז נישט אינהאלט אונטער די דיפערענץ',
'tog-showhiddencats' => 'ווײַז באהאלטענע קאטעגאריעס',
'tog-norollbackdiff' => 'היפט איבער ווײַזן אונטערשייד נאכן אויספֿירן א צוריקדריי',
+'tog-useeditwarning' => 'שטעלן א ווארענונג ווען איך לאז איבער א רעדאקטירונג בלאט מיט נישט אויפגעהיטענע ענדערונגען',
'underline-always' => 'אייביג',
'underline-never' => 'קיינמאל',
'welcomecreation-msg' => "מ'האט געשאפן אייער קאנטע.
פארגעסט נישט צו ענדערן אייערע [[Special:Preferences|{{SITENAME}} פרעפערענצן]].",
'yourname' => 'באַניצער נאָמען:',
+'userlogin-yourname' => 'באַניצער נאָמען',
+'userlogin-yourname-ph' => 'גיט אריין אייער באניצער נאמען',
'yourpassword' => 'פאסווארט',
+'userlogin-yourpassword' => 'פאַסווארט',
+'userlogin-yourpassword-ph' => 'אַרײַנגעבן אײַער פאַסווארט',
'yourpasswordagain' => 'ווידער אריינקלאפן פאסווארט',
'remembermypassword' => 'געדיינק מײַן אַרײַנלאגירן אויף דעם קאמפיוטער (ביז $1 {{PLURAL:$1|טאָג|טעג}})',
+'userlogin-remembermypassword' => 'געדענק מיך',
+'userlogin-signwithsecure' => 'איינשרייבן מיט זיכערן סארווער',
'securelogin-stick-https' => 'בלייַבן פארבונדן צו HTTPS נאָכן ארײַנלאָגירן',
'yourdomainname' => 'אײַער געביט:',
'password-change-forbidden' => 'איר קען נישט ענדערן פאסווערטער אויף דער וויקי.',
'logout' => 'אַרױסלאָגירן',
'userlogout' => 'אַרױסלאָגירן',
'notloggedin' => 'נישט איינגעשריבן',
+'userlogin-noaccount' => 'איר האט נישט קיין קאנטע?',
+'userlogin-joinproject' => 'איינטרעטן ביי {{SITENAME}}',
'nologin' => "איר האט נישט קיין קאנטע? '''$1'''.",
'nologinlink' => 'שאַפֿן אַ קאנטע',
'createaccount' => 'שאַפֿן אַ נײַע קאנטע',
'gotaccount' => "האסטו שוין א קאנטע? '''$1'''.",
'gotaccountlink' => 'אַרײַנלאגירן',
'userlogin-resetlink' => 'פארגעסן אײַערע אַרײַנלאָגירן פרטים?',
+'helplogin-url' => 'Help:אריינלאגירן',
+'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|הילף מיט אריינלאגירן]]',
'createaccountmail' => 'ניצן א פראוויזאריש פאסווארט און שיקן צום ע-פאסט אדרעס געצייכנט אונטן',
'createaccountreason' => 'אורזאַך:',
'badretype' => 'די פאסווערטער וואס איר האט אריינגעלייגט זענען נישט אייניג.',
'passwordreset-text' => 'דערגאַנצט די פאָרעם צוריקצושטעלן אײַער פאַסווארט.',
'passwordreset-legend' => 'צוריקשטעלן פאַסווארט',
'passwordreset-disabled' => 'מען האט אומאַקטיוויטר צוריקשטעלן פאַסווערטער אויף דער וויקי.',
+'passwordreset-emaildisabled' => 'ע-פאסט דינסטן זענען געווארן אומאקטיווירט אויף דער דאזיקער וויקי.',
'passwordreset-pretext' => '{{PLURAL:$1| | קלאַפט אַרײַן איינע פֿון די דאַטן אונטן}}',
'passwordreset-username' => 'באַניצער נאָמען:',
'passwordreset-domain' => 'דאמען:',
פראוויזארישער פּאַראָל: $2',
'passwordreset-emailsent' => "מ'האט געשיקט א פאסווארט צוריקשטעלן ע-פּאָסט.",
'passwordreset-emailsent-capture' => 'מען האט געשיקט א פאסווארט צוריקשטעלן בליצבריוו, וואס ווערט געוויזן אונטן.',
-'passwordreset-emailerror-capture' => 'מען האט געשאפן א פאסווארט צוריקשטעלן בליצבריוו, וואס ווערט געוויזן אונטן, אבער שיקן צום באניצער איז דורכגעפאלן: $1',
+'passwordreset-emailerror-capture' => 'מען האט געשאפן א פאסווארט צוריקשטעלן בליצבריוו, וואס ווערט געוויזן אונטן, אבער שיקן צום {{GENDER:$2|באניצער}}איז דורכגעפאלן: $1',
# Special:ChangeEmail
'changeemail' => 'ענדערן ע-פּאָסט אַדרעס',
'content-failed-to-parse' => 'פארזן $2 אינהאלט פאר $1 מאדעל דורכגעפאלן: $3',
'invalid-content-data' => 'אומגילטיקע אינהאלט דאטן',
'content-not-allowed-here' => '"$1" אינהאלט נישט דערלויבט אויף בלאט [[$2]]',
+'editwarning-warning' => 'איבערלאזן דעם בלאט קען גורם זײַן פֿארלירן אײַערע ענדערונגען.
+אויב איר זענט ארײַנלאגירט, קענט איר מבטל זײַן די דאזיגע ווארענונג אין דער "{{int:prefs-editing}}" אפטיילונג פון אײַערע פרעפערענצן.',
# Content models
'content-model-wikitext' => 'וויקיטעקסט',
צווישנצײַט קענט איר זוכן מיט גוגל.
געב אכט אז ס'איז מעגלעך אַז זייער אינדעקס פֿון {{SITENAME}} אינהאַלט איז אפשר פֿאַרעלטערט.",
-# Quickbar
-'qbsettings' => 'גיכפאַס',
-'qbsettings-none' => 'גארנישט',
-'qbsettings-fixedleft' => 'קבוע לינקס',
-'qbsettings-fixedright' => 'קבוע רעכטס',
-'qbsettings-floatingleft' => 'שווימנדיג לינקס',
-'qbsettings-floatingright' => 'שווימנדיג רעכטס',
-'qbsettings-directionality' => 'פֿעסט, אפהענגיק אויף דער שריפֿט ריכטונג פֿון אײַער שפראַך.',
-
# Preferences page
'preferences' => 'פרעפֿערענצן',
'mypreferences' => 'פּרעפֿערענצן',
'http-read-error' => 'HTTP לייענען גרײַז.',
'http-timed-out' => 'HTTP בקשה אויסגעגאַנגען.',
'http-curl-error' => 'גרײַז בײַם ברענגען URL: $1',
-'http-host-unreachable' => "מ'קען נישט דערגרייכן דעם URL",
'http-bad-status' => "ס'איז געווען א פראבלעם ביים HTTP פֿאַרלאַנג: $1 $2",
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'version-version' => '(ווערסיע $1)',
'version-license' => 'ליצענץ',
'version-poweredby-others' => 'אַנדערע',
+'version-credits-summary' => 'מיר ווילן אנערקענען די פֿאלגנדע מענטשן פֿאר זייער בײַשטײַערוג צו [[Special:Version|מעדיעוויקי]].',
'version-software' => 'אינסטאַלירט ווייכוואַרג',
'version-software-product' => 'פראדוקט',
'version-software-version' => 'ווערסיע',
'htmlform-submit' => 'אײַנגעבן',
'htmlform-reset' => 'צוריקשטעלן ענדערונגען',
'htmlform-selectorother-other' => 'אַנדער',
+'htmlform-no' => 'ניין',
+'htmlform-yes' => 'יא',
# SQLite database support
'sqlite-has-fts' => '$1 מיט פולן-טעקסט זוכן שטיץ',
'tog-shownumberswatching' => "S'àfihàn iye àwọn oníṣe tí wọn tẹjú mọ́ọ",
'tog-oldsig' => 'Ìtọwọ́bọ̀wé tówà:',
'tog-fancysig' => 'Ṣe ìtọwọ́bọ̀wé bíi ìkọ wiki (láìní ìjápọ̀ fúnrararẹ̀)',
-'tog-externaleditor' => 'Lo aláàtúnṣe ọ̀tọ̀ látìbẹ̀rẹ̀ (fún àwọn tó mọ̀ nìkan, ìtò ọ̀tọ̀ọ̀tọ̀ pọndandan lórí kọ̀mpútà yín. [//www.mediawiki.org/wiki/Manual:External_editors More information.])',
-'tog-externaldiff' => 'Lo awoìyàtò ọ̀tọ̀ látìbẹ̀rẹ̀ (fún àwọn tó mọ̀ nìkan, ìtò ọ̀tọ̀ọ̀tọ̀ pọndandan lórí kọ̀mpútà yín. [//www.mediawiki.org/wiki/Manual:External_editors Ìfọ̀rọ̀tónilétí mìhínhìn.])',
'tog-showjumplinks' => 'Ìgbàláyè "fò lọ sí" àwọn ìjápọ̀ ìṣeégbà',
'tog-uselivepreview' => 'Ìlo àkọ́kọ́yẹ̀wò lẹ́ṣẹ̀kẹṣẹ̀ (JavaScript pọndandan) (aládànhánwò)',
'tog-forceeditsummary' => 'Kìlọ̀ fún mi tí àkótán àtúnṣe bá jẹ́ òfo',
'tog-diffonly' => 'Kò gbọdọ̀ ṣàfihàn àkóónú ojúewé lábẹ́ àwọn ìyàtọ̀',
'tog-showhiddencats' => "Ṣ'àfihàn àwọn ẹ̀ka pípamọ́",
'tog-norollbackdiff' => 'Fo ìyàtọ̀ lẹ́yín síṣe ìyísẹ́yìn',
+'tog-useeditwarning' => 'Kìlọ̀ fún mi tí mo bá únkúrò ní ojúewé àtúnṣe láì tíì mupamọ́',
'underline-always' => 'Nígbà gbogbo',
'underline-never' => 'Rárá',
'content-failed-to-parse' => 'Ìkùnà láti ṣàtúwò àkóónú $2 fún àfijúwe $1: $3',
'invalid-content-data' => 'Àkóónú dátà tí kò yẹ',
'content-not-allowed-here' => 'Àkóónú "$1" kò ní ìyọ̀nda lórí ojúewé [[$2]]',
+'editwarning-warning' => 'Kíkúrò ní ojúewé yìí yíò jẹ́ kí ẹ pòfo àwọn àtúnṣe tí ẹ ti ṣe.
+Tó bá jẹ́ pé ẹ ti wọlé, ẹ lè dẹ́kun ìkìlọ̀ yìí nínù abala "Àtúnṣe ṣíṣe" ti àwọn ìfẹ́ràn yín.',
# Content models
'content-model-wikitext' => 'ìkọ̀rọ̀ wiki',
Ní báyìí ná ẹ le ṣàwárí lọ́dọ̀ Google.
Àkíyèsí pé àwọn atọ́ka wọn fún àkóónú {{SITENAME}} le mọ́ jẹ́ tuntun.',
-# Quickbar
-'qbsettings' => 'Pẹpẹ ìṣárémúlò',
-'qbsettings-none' => 'Ìkankan',
-'qbsettings-fixedleft' => 'Kíkàn sí òsì',
-'qbsettings-fixedright' => 'Kíkàn sí ọ̀tún',
-'qbsettings-floatingleft' => 'Léfòó sí òsì',
-'qbsettings-floatingright' => 'Léfòó sí ọ̀tún',
-'qbsettings-directionality' => 'Fi sí ẹ̀gbẹ́, gẹ́gẹ́ bí ìdojúkọ lẹ́tà-ọ̀rọ̀ èdè yín bá ṣe rí',
-
# Preferences page
'preferences' => 'Àwọn ìfẹ́ràn',
'mypreferences' => 'Àwọn ìfẹ́ràn',
'http-read-error' => 'Àṣìṣe kíkà HTTP.',
'http-timed-out' => 'Àsìkò ìtọrọ HTTP ti tán.',
'http-curl-error' => 'Àsìṣe ìmúwá URL: $1',
-'http-host-unreachable' => 'Kò le dé ibi URL.',
'http-bad-status' => 'Ìṣòro kan ṣẹlẹ̀ nìgbà ìtọrọ HTTP: $1, $2',
# Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
'listusers-noresult' => 'Kò rí oníṣe kankan.',
'listusers-blocked' => '(dídínà)',
-# Special:ActiveUsers
-'activeusers' => 'Àtòjọ àwọn oníṣe aláàgbéṣe',
-'activeusers-intro' => 'Èyí ni àtòjọ àwọn oníṣe tí wọ́n ní irú àgbéṣe kan láàrin {{PLURAL:$1|ọjọ́|ọjọ́}} $1 sẹ́yìn.',
-'activeusers-count' => '{{PLURAL:$1|Àtúnṣe|Àwọn àtúnṣe}} $1 ní {{PLURAL:$3|ọjọ́|ọjọ́}} $3 sẹ́yìn',
-'activeusers-from' => 'Ìfihàn àwọn oníṣe nípa bíbẹ̀rẹ̀ láti:',
-'activeusers-hidebots' => 'Ìbòmọ́lẹ̀ àwọn bọt',
-'activeusers-hidesysops' => 'Ìbòmọ́lẹ̀ àwọn olùmójútó',
-'activeusers-noresult' => 'Kò rí oníṣe kankan.',
-
# Special:ListGroupRights
'listgrouprights' => 'Àwọn ẹ̀tọ́ ẹgbẹ́ oníṣe',
'listgrouprights-summary' => 'Nísàlẹ̀ ni àtòjọ àwọn ẹgbẹ́ oníṣe tó nítumọ̀ lórí wiki yìí, pẹ̀lú àwọn ẹ̀tọ́ lílò wọn.
'tog-enotifrevealaddr' => '在通知电子邮件中显示我的电子邮件地址',
'tog-shownumberswatching' => '显示监视用户数',
'tog-oldsig' => '当前签名:',
-'tog-fancysig' => '将签名以wiki文本对待(不产生自动链接)',
+'tog-fancysig' => '将签名视为wiki代码(不自动生成链接)',
'tog-showjumplinks' => '启用“跳转到”访问链接',
'tog-uselivepreview' => '使用实时预览(需要JavaScript)(实验功能)',
'tog-forceeditsummary' => '未输入编辑摘要时提醒我',
'navigation-heading' => '导航菜单',
'errorpagetitle' => '错误',
-'returnto' => '返回到$1。',
+'returnto' => '返回$1。',
'tagline' => '来自{{SITENAME}}',
'help' => '帮助',
'search' => '搜索',
'mainpage' => '首页',
'mainpage-description' => '首页',
'policy-url' => 'Project:方针',
-'portal' => '社å\8cºä¸\93页',
-'portal-url' => 'Project:社å\8cºä¸\93页',
+'portal' => '社å\8cºä¸»页',
+'portal-url' => 'Project:社å\8cºä¸»页',
'privacy' => '隐私政策',
'privacypage' => 'Project:隐私权政策',
临时密码:$2',
'passwordreset-emailsent' => '密码重置邮件已发送。',
'passwordreset-emailsent-capture' => '密码重设电子邮件已发送,并在下面显示。',
-'passwordreset-emailerror-capture' => '生成的密码重设电子邮件如下所示,但发送失败:$1',
+'passwordreset-emailerror-capture' => '重置密码邮件已生成,但是无法向下列用户发送:$1',
# Special:ChangeEmail
'changeemail' => '更改电子邮件地址',
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-hans' => '简体',
'nov' => '11月',
'dec' => '12月',
+'monday-at' => '於星期一$1',
+'tuesday-at' => '於星期二$1',
+'wednesday-at' => '於星期三$1',
+'thursday-at' => '於星期四$1',
+'friday-at' => '於星期五$1',
+'saturday-at' => '於星期六$1',
+'sunday-at' => '於星期日$1',
+'today-at' => '$1',
+'yesterday-at' => '昨天$1',
+
# Categories related messages
'pagecategories' => '$1個分類',
'category_header' => '「$1」分類中的頁面',
臨時密碼:$2',
'passwordreset-emailsent' => '已發送重置密碼電郵。',
'passwordreset-emailsent-capture' => '重置密碼電子郵件已發送,並在下面顯示。',
-'passwordreset-emailerror-capture' => '生成的重置密碼電子郵件如下所示,但發送失敗:$1',
+'passwordreset-emailerror-capture' => '生成的重置密碼電子郵件如下所示,但發送給{{GENDER:$2|用戶}}失敗:$1',
# Special:ChangeEmail
'changeemail' => '更改電郵地址',
'protect-summary-cascade' => '連鎖',
'protect-expiring' => '終止於 $1 (UTC)',
'protect-expiring-local' => '$1到期',
-'protect-expiry-indefinite' => '永久',
+'protect-expiry-indefinite' => '無限期',
'protect-cascade' => '保護本頁中包含的頁面 (連鎖保護)',
'protect-cantedit' => '您無法更改這個頁面的保護等級,因為您沒有權限去編輯它。',
'protect-othertime' => '其它時間:',
'ipbenableautoblock' => '自動查封此用戶最後所用的IP位址,以及後來試圖編輯所用的所有位址',
'ipbsubmit' => '查封該地址',
'ipbother' => '其它時間:',
-'ipboptions' => '2小時:2 hours,1天:1 day,3天:3 days,1周:1 week,2周:2 weeks,1個月:1 month,3個月:3 months,6個月:6 months,1年:1 year,永久:infinite',
+'ipboptions' => '2小時:2 hours,1天:1 day,3天:3 days,1周:1 week,2周:2 weeks,1個月:1 month,3個月:3 months,6個月:6 months,1年:1 year,無限期:infinite',
'ipbotheroption' => '其他',
'ipbotherreason' => '其它/附帶原因:',
'ipbhidename' => '在編輯及列表中隱藏用戶名',
'ipblocklist-submit' => '搜尋',
'ipblocklist-localblock' => '本地封鎖',
'ipblocklist-otherblocks' => '其他{{PLURAL:$1|封鎖|封鎖}}',
-'infiniteblock' => '永久',
+'infiniteblock' => '無限期',
'expiringblock' => '$1 $2 到期',
'anononlyblock' => '僅限匿名用戶',
'noautoblockblock' => '禁用自動查封',
'minutes' => '$1分鍾',
'hours' => '$1小時',
'days' => '$1天',
+'weeks' => '{{PLURAL:$1|$1周|$1周}}',
'months' => '{{PLURAL:$1|$1個月|$1個月}}',
'years' => '{{PLURAL:$1|$1年|$1年}}',
'ago' => '$1前',
/*
Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language
*/
'variantname-zh-hans' => '中文(简体)',
# Image rotation
'rotate-comment' => '順時針旋轉圖像$1{{PLURAL:$1|度|度}}',
+# Unknown messages
+'hours-ago' => '$1小時前',
+'minutes-ago' => '$1分鐘前',
+'seconds-ago' => '$1秒前',
);
continue;
} else {
// Operator
- if ( !$expectOperator ) {
+ if ( !$expectOperator ) {
$token->error( 'unexpected operator' );
}
// Resolve higher precedence levels
// Word
if ( !preg_match( self::WORD_REGEX, $this->rule, $m, 0, $this->pos ) ) {
- $this->error( 'unexpected character "' . $this->rule[$this->pos] . '"' );
+ $this->error( 'unexpected character "' . $this->rule[$this->pos] . '"' );
}
$word1 = strtolower( $m[0] );
$word2 = '';
* Constants for DB access type
* @see Maintenance::getDbType()
*/
- const DB_NONE = 0;
- const DB_STD = 1;
+ const DB_NONE = 0;
+ const DB_STD = 1;
const DB_ADMIN = 2;
// Const for getStdin()
return false; // last call should be to this function
}
$includeFuncs = array( 'require_once', 'require', 'include', 'include_once' );
- for( $i = 1; $i < $count; $i++ ) {
+ for ( $i = 1; $i < $count; $i++ ) {
if ( !in_array( $bt[$i]['function'], $includeFuncs ) ) {
return false; // previous calls should all be "requires"
}
"server name detection may fail in command line scripts.", false, true );
# Save generic options to display them separately in help
- $this->mGenericParameters = $this->mParams ;
+ $this->mGenericParameters = $this->mParams;
# Script dependant options:
$wgCommandLineMode = true;
# Turn off output buffering if it's on
- while( ob_get_level() > 0 ) {
+ while ( ob_get_level() > 0 ) {
ob_end_flush();
}
} elseif ( substr( $arg, 0, 1 ) == '-' ) {
# Short options
for ( $p = 1; $p < strlen( $arg ); $p++ ) {
- $option = $arg { $p } ;
+ $option = $arg { $p };
if ( !isset( $this->mParams[$option] ) && isset( $this->mShortParamsMap[$option] ) ) {
$option = $this->mShortParamsMap[$option];
}
* @param $force boolean Whether to force the help to show, default false
*/
protected function maybeHelp( $force = false ) {
- if( !$force && !$this->hasOption( 'help' ) ) {
+ if ( !$force && !$this->hasOption( 'help' ) ) {
return;
}
} else {
$output .= '[' . $arg['name'] . ']';
}
- if ( $k < count( $this->mArgList ) - 1 )
+ if ( $k < count( $this->mArgList ) - 1 ) {
$output .= ' ';
+ }
}
}
$this->output( "$output\n\n" );
$this->output( "\n" );
$scriptDependantParams = $this->mDependantParameters;
- if( count($scriptDependantParams) > 0 ) {
+ if ( count($scriptDependantParams) > 0 ) {
$this->output( "Script dependant parameters:\n" );
// Parameters description
foreach ( $scriptDependantParams as $par => $info ) {
$this->mGenericParameters,
$this->mDependantParameters
);
- if( count($scriptSpecificParams) > 0 ) {
+ if ( count($scriptSpecificParams) > 0 ) {
$this->output( "Script specific parameters:\n" );
// Parameters description
foreach ( $scriptSpecificParams as $par => $info ) {
}
// Print arguments
- if( count( $this->mArgList ) > 0 ) {
+ if ( count( $this->mArgList ) > 0 ) {
$this->output( "Arguments:\n" );
// Arguments description
foreach ( $this->mArgList as $info ) {
$wgCommandLineMode = true;
# Override $wgServer
- if( $this->hasOption( 'server') ) {
+ if ( $this->hasOption( 'server' ) ) {
$wgServer = $this->getOption( 'server', $wgServer );
}
if ( isset( $this->mOptions['conf'] ) ) {
$settingsFile = $this->mOptions['conf'];
- } elseif ( defined("MW_CONFIG_FILE") ) {
+ } elseif ( defined( "MW_CONFIG_FILE" ) ) {
$settingsFile = MW_CONFIG_FILE;
} else {
$settingsFile = "$IP/LocalSettings.php";
$st = fgets( STDIN, 1024 );
}
}
- if ( $st === false ) return false;
+ if ( $st === false ) {
+ return false;
+ }
$resp = trim( $st );
return $resp;
}
var $reportingInterval = 100;
var $reporting = true;
var $pageCount = 0;
- var $revCount = 0;
- var $server = null; // use default
- var $pages = null; // all pages
+ var $revCount = 0;
+ var $server = null; // use default
+ var $pages = null; // all pages
var $skipHeader = false; // don't output <mediawiki> and <siteinfo>
var $skipFooter = false; // don't output </mediawiki>
- var $startId = 0;
- var $endId = 0;
+ var $startId = 0;
+ var $endId = 0;
var $revStartId = 0;
- var $revEndId = 0;
- var $sink = null; // Output filters
- var $stubText = false; // include rev_text_id instead of text; for 2-pass dump
+ var $revEndId = 0;
+ var $sink = null; // Output filters
+ var $stubText = false; // include rev_text_id instead of text; for 2-pass dump
var $dumpUploads = false;
var $dumpUploadFileContents = false;
var $lastTime = 0;
function dump( $history, $text = WikiExporter::TEXT ) {
# Notice messages will foul up your XML output even if they're
# relatively harmless.
- if ( ini_get( 'display_errors' ) )
+ if ( ini_get( 'display_errors' ) ) {
ini_set( 'display_errors', 'stderr' );
+ }
$this->initProgress( $history );
$wrapper = new ExportProgressFilter( $this->sink, $this );
$exporter->setOutputSink( $wrapper );
- if ( !$this->skipHeader )
+ if ( !$this->skipHeader ) {
$exporter->openStream();
+ }
# Log item dumps: all or by range
if ( $history & WikiExporter::LOGS ) {
if ( $this->startId || $this->endId ) {
$exporter->allLogs();
}
# Page dumps: all or by page ID range
- } else if ( is_null( $this->pages ) ) {
+ } elseif ( is_null( $this->pages ) ) {
if ( $this->startId || $this->endId ) {
$exporter->pagesByRange( $this->startId, $this->endId );
} elseif ( $this->revStartId || $this->revEndId ) {
$exporter->pagesByName( $this->pages );
}
- if ( !$this->skipFooter )
+ if ( !$this->skipFooter ) {
$exporter->closeStream();
+ }
$this->report( true );
}
function dump( $history, $text = WikiExporter::TEXT ) {
// Notice messages will foul up your XML output even if they're
// relatively harmless.
- if ( ini_get( 'display_errors' ) )
+ if ( ini_get( 'display_errors' ) ) {
ini_set( 'display_errors', 'stderr' );
+ }
$this->initProgress( $this->history );
private function closeSpawn() {
wfSuppressWarnings();
- if ( $this->spawnRead )
+ if ( $this->spawnRead ) {
fclose( $this->spawnRead );
+ }
$this->spawnRead = false;
- if ( $this->spawnWrite )
+ if ( $this->spawnWrite ) {
fclose( $this->spawnWrite );
+ }
$this->spawnWrite = false;
- if ( $this->spawnErr )
+ if ( $this->spawnErr ) {
fclose( $this->spawnErr );
+ }
$this->spawnErr = false;
- if ( $this->spawnProc )
+ if ( $this->spawnProc ) {
pclose( $this->spawnProc );
+ }
$this->spawnProc = false;
wfRestoreWarnings();
}
$ok = fwrite( $this->spawnWrite, "$id\n" );
// $this->progress( ">> $id" );
- if ( !$ok ) return false;
+ if ( !$ok ) {
+ return false;
+ }
$ok = fflush( $this->spawnWrite );
// $this->progress( ">> [flush]" );
- if ( !$ok ) return false;
+ if ( !$ok ) {
+ return false;
+ }
// check that the text id they are sending is the one we asked for
// this avoids out of sync revision text errors we have encountered in the past
$len = fgets( $this->spawnRead );
// $this->progress( "<< " . trim( $len ) );
- if ( $len === false ) return false;
+ if ( $len === false ) {
+ return false;
+ }
$nbytes = intval( $len );
// actual error, not zero-length text
- if ( $nbytes < 0 ) return false;
+ if ( $nbytes < 0 ) {
+ return false;
+ }
$text = "";
// Subprocess may not send everything at once, we have to loop.
while ( $nbytes > strlen( $text ) ) {
$buffer = fread( $this->spawnRead, $nbytes - strlen( $text ) );
- if ( $buffer === false ) break;
+ if ( $buffer === false ) {
+ break;
+ }
$text .= $buffer;
}
function cdbShowHelp( $command ) {
$commandList = array(
'load' => 'load a cdb file for reading',
- 'get' => 'get a value for a key',
+ 'get' => 'get a value for a key',
'exit' => 'exit cdb',
'quit' => 'exit cdb',
'help' => 'help about a command',
static $fileHandle;
$line = Maintenance::readconsole();
- if ( $line === false ) exit;
+ if ( $line === false ) {
+ exit;
+ }
$args = explode( ' ', $line );
$command = array_shift( $args );
cdbShowHelp( array_shift( $args ) );
break;
case 'load':
- if( !isset( $args[0] ) ) {
+ if ( !isset( $args[0] ) ) {
print "Need a filename there buddy\n";
break;
}
$file = $args[0];
print "Loading cdb file $file...";
$fileHandle = CdbReader::open( $file );
- if( !$fileHandle ) {
+ if ( !$fileHandle ) {
print "not a cdb file or unable to read it\n";
} else {
print "ok\n";
}
break;
case 'get':
- if( !$fileHandle ) {
+ if ( !$fileHandle ) {
print "Need to load a cdb file first\n";
break;
}
- if( !isset( $args[0] ) ) {
+ if ( !isset( $args[0] ) ) {
print "Need to specify a key, Luke\n";
break;
}
private function isSuitableFile( $file ) {
$file = str_replace( '\\', '/', $file );
$ext = pathinfo( $file, PATHINFO_EXTENSION );
- if ( $ext != 'php' && $ext != 'inc' && $ext != 'php5' )
+ if ( $ext != 'php' && $ext != 'inc' && $ext != 'php5' ) {
return false;
+ }
foreach ( $this->mIgnorePaths as $regex ) {
$m = array();
- if ( preg_match( "~{$regex}~", $file, $m ) )
+ if ( preg_match( "~{$regex}~", $file, $m ) ) {
return false;
+ }
}
return true;
}
private function checkForMistakes( $file ) {
foreach ( $this->mNoStyleCheckPaths as $regex ) {
$m = array();
- if ( preg_match( "~{$regex}~", $file, $m ) )
+ if ( preg_match( "~{$regex}~", $file, $m ) ) {
return;
+ }
}
$text = file_get_contents( $file );
$tokens = token_get_all( $text );
- $this->checkEvilToken( $file, $tokens, '@', 'Error supression operator (@)');
+ $this->checkEvilToken( $file, $tokens, '@', 'Error supression operator (@)' );
$this->checkRegex( $file, $text, '/^[\s\r\n]+<\?/', 'leading whitespace' );
$this->checkRegex( $file, $text, '/\?>[\s\r\n]*$/', 'trailing ?>' );
$this->checkRegex( $file, $text, '/^[\xFF\xFE\xEF]/', 'byte-order mark' );
}
public function execute() {
- if( !$this->hasOption( 'force' ) ) {
+ if ( !$this->hasOption( 'force' ) ) {
$this->error( "This maintenance script will remove old columns and indexes.\n"
. "It is recommended to backup your database first, and ensure all your data has been migrated to newer tables\n"
. "If you want to continue, run this script again with the --force \n"
'validate', // 1.6
);
- foreach( $ancientTables as $table ) {
+ foreach ( $ancientTables as $table ) {
if ( $db->tableExists( $table, __METHOD__ ) ) {
$this->output( "Dropping table $table..." );
$db->dropTable( $table, __METHOD__ );
'user_timestamp',
'usertext_timestamp',
);
- foreach( $oldIndexes as $index ) {
+ foreach ( $oldIndexes as $index ) {
if ( $db->indexExists( 'text', $index, __METHOD__ ) ) {
$this->output( "Dropping index $index from the text table..." );
$db->query( "DROP INDEX " . $db->addIdentifierQuotes( $index )
'old_minor_edit',
'inverse_timestamp',
);
- foreach( $oldFields as $field ) {
+ foreach ( $oldFields as $field ) {
if ( $db->fieldExists( 'text', $field, __METHOD__ ) ) {
$this->output( "Dropping the $field field from the text table..." );
$db->query( "ALTER TABLE " . $db->tableName( 'text' )
$dbw = wfGetDB( DB_MASTER );
$dbw->begin( __METHOD__ );
- foreach( $wgHiddenPrefs as $item ) {
+ foreach ( $wgHiddenPrefs as $item ) {
$dbw->delete(
'user_properties',
array( 'up_property' => $item ),
$this->output( "Batch $i: $numRows rows\n" );
$i++;
wfWaitForSlaves( $maxlag );
- } while( $numRows > 0 );
+ } while ( $numRows > 0 );
$this->output( "done\n" );
$this->output( "Cleaning up msg_resource table...\n" );
$this->output( "Batch $i: $numRows rows\n" );
$i++;
wfWaitForSlaves( $maxlag );
- } while( $numRows > 0 );
+ } while ( $numRows > 0 );
$this->output( "done\n" );
$this->output( "Cleaning up msg_resource_links table...\n" );
$this->output( "Batch $i: $numRows rows\n" );
$i++;
wfWaitForSlaves( $maxlag );
- } while( $numRows > 0 );
+ } while ( $numRows > 0 );
$this->output( "done\n" );
}
}
$legalized = preg_replace_callback( "!([^$legal])!",
array( &$this, 'hexChar' ),
$row->page_title );
- if ( $legalized == '.' ) $legalized = '(dot)';
- if ( $legalized == '_' ) $legalized = '(space)';
+ if ( $legalized == '.' ) {
+ $legalized = '(dot)';
+ }
+ if ( $legalized == '_' ) {
+ $legalized = '(space)';
+ }
$legalized = 'Broken/' . $legalized;
$title = Title::newFromText( $legalized );
# Old cleanupTitles could move articles there. See bug 23147.
$ns = $row->page_namespace;
- if ( $ns < 0 ) $ns = 0;
+ if ( $ns < 0 ) {
+ $ns = 0;
+ }
$clean = 'Broken/' . $prior;
$verified = Title::makeTitleSafe( $ns, $clean );
} else {
// finish the read before starting writes.
$keys = array();
- foreach( $res as $row ) {
+ foreach ( $res as $row ) {
array_push( $keys, $row->us_key );
}
$stash = new UploadStash( $repo );
$i = 0;
- foreach( $keys as $key ) {
+ foreach ( $keys as $key ) {
$i++;
try {
$stash->getFile( $key, true );
}
// Delete all the corresponding thumbnails...
- $dir = $tempRepo->getZonePath( 'thumb' );
+ $dir = $tempRepo->getZonePath( 'thumb' );
$iterator = $tempRepo->getBackend()->getFileList( array( 'dir' => $dir ) );
$this->output( "Deleting old thumbnails...\n" );
$i = 0;
$this->output( "$i done\n" );
// Apparently lots of stash files are not registered in the DB...
- $dir = $tempRepo->getZonePath( 'public' );
+ $dir = $tempRepo->getZonePath( 'public' );
$iterator = $tempRepo->getBackend()->getFileList( array( 'dir' => $dir ) );
$this->output( "Deleting orphaned temp files...\n" );
if ( strpos( $dir, '/local-temp' ) === false ) { // sanity check
if ( !$this->dryrun && $this->hasOption( 'fix' ) ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->delete( 'watchlist', array(
- 'wl_user' => $row->wl_user,
+ 'wl_user' => $row->wl_user,
'wl_namespace' => $row->wl_namespace,
- 'wl_title' => $row->wl_title ),
+ 'wl_title' => $row->wl_title ),
__METHOD__ );
$this->output( "- removed\n" );
return 1;
}
public function checkOptions() {
- if ( $this->hasOption('save-failed') ) {
- $this->saveFailed = $this->getOption('save-failed');
+ if ( $this->hasOption( 'save-failed' ) ) {
+ $this->saveFailed = $this->getOption( 'save-failed' );
}
$this->stripParametersEnabled = $this->hasOption( 'strip-parameters' );
public function conclusions() {
$this->error( "{$this->failed} failed revisions out of {$this->count}" );
- if ($this->count > 0)
+ if ( $this->count > 0 ) {
$this->output( " (" . ( $this->failed / $this->count ) . "%)\n" );
+ }
}
function stripParameters( $text ) {
list ( $cur, $links, $links_temp, $links_backup ) = $dbw->tableNamesN( 'cur', 'links', 'links_temp', 'links_backup' );
- if( $dbw->tableExists( 'pagelinks' ) ) {
+ if ( $dbw->tableExists( 'pagelinks' ) ) {
$this->output( "...have pagelinks; skipping old links table updates\n" );
return;
}
}
$dbw->query( implode( "", $sqlWrite ) );
$totalTuplesInserted += $tuplesAdded;
- if ( $reportLinksConvProgress )
+ if ( $reportLinksConvProgress ) {
$this->output( " done. Total $totalTuplesInserted tuples inserted.\n" );
- $this->performanceLog( $fh, $totalTuplesInserted . " " . ( $this->getMicroTime() - $baseTime ) . "\n" );
+ $this->performanceLog( $fh, $totalTuplesInserted . " " . ( $this->getMicroTime() - $baseTime ) . "\n" );
+ }
}
}
$this->output( "$totalTuplesInserted valid titles and $numBadLinks invalid titles were processed.\n\n" );
parent::__construct();
$this->mDescription = "Create a new user account and/or grant it additional rights";
$this->addOption( "force", "If acccount exists already, just grant it rights or change password." );
- foreach( self::$permitRoles as $role ) {
+ foreach ( self::$permitRoles as $role ) {
$this->addOption( $role, "Add the account to the {$role} group" );
}
$this->addArg( "username", "Username of new user" );
if ( $exists && !$force ) {
$this->error( "Account exists. Perhaps you want the --force option?", true );
- } else if ( !$exists && !$password ) {
+ } elseif ( !$exists && !$password ) {
$this->error( "Argument <password> required!", false );
$this->maybeHelp( true );
- } else if ( $exists ) {
+ } elseif ( $exists ) {
$inGroups = $user->getGroups();
}
if ( $exists && !$password && count( $promotions ) === 0 ) {
$this->output( "Account exists and nothing to do.\n" );
return;
- } else if ( count( $promotions ) !== 0 ) {
+ } elseif ( count( $promotions ) !== 0 ) {
$promoText = "User:{$username} into " . implode( ', ', $promotions ) . "...\n";
if ( $exists ) {
$this->output( wfWikiID() . ": Promoting $promoText" );
$group = $row->fa_storage_group;
$id = $row->fa_id;
$path = $repo->getZonePath( 'deleted' ) . '/' . $repo->getDeletedHashPath( $key ) . $key;
- if( isset( $row->fa_sha1 ) ) {
+ if ( isset( $row->fa_sha1 ) ) {
$sha1 = $row->fa_sha1;
} else {
// old row, populate from key
)
);
- if( $dbr->numRows( $res ) == 0 ) {
+ if ( $dbr->numRows( $res ) == 0 ) {
# No more messages left
$this->output( "done.\n" );
return;
$total = $this->getImageCount();
foreach ( $res as $row ) {
- if ( $i % $this->report == 0 )
+ if ( $i % $this->report == 0 ) {
$this->output( sprintf( "%s: %13s done (%s)\n", wfWikiID(), "$i/$total", wfPercent( $i / $total * 100 ) ) );
+ }
$md5 = md5( $row->img_name );
$wgMemc->delete( wfMemcKey( 'Image', $md5 ) );
- if ( $sleep != 0 )
+ if ( $sleep != 0 ) {
usleep( $sleep );
+ }
++$i;
}
# Stash 'em all up for deletion (if needed)
$revisions = array();
- foreach ( $res as $row )
+ foreach ( $res as $row ) {
$revisions[] = $row->rev_id;
+ }
$count = count( $revisions );
$this->output( "found {$count}.\n" );
* @param $dbw DatabaseBase class (needs to be a master)
*/
private function deleteRevs( $id, &$dbw ) {
- if ( !is_array( $id ) )
+ if ( !is_array( $id ) ) {
$id = array( $id );
+ }
$dbw->delete( 'revision', array( 'rev_id' => $id ), __METHOD__ );
}
}
. $db->buildLike( $wgServer . '/', $db->anyString() ), $this->mBatchSize );
$this->output( "Deleting a batch\n" );
$db->query( $q );
- if ( !$db->affectedRows() ) return;
+ if ( !$db->affectedRows() ) {
+ return;
+ }
}
}
}
die( "This script can only be run by php's cli-server sapi." );
}
-ini_set('display_errors', 1);
-error_reporting(E_ALL);
+ini_set( 'display_errors', 1 );
+error_reporting( E_ALL );
if ( isset( $_SERVER["SCRIPT_FILENAME"] ) ) {
# Known resource, sometimes a script sometimes a file
# This way we can serve things like .svg files that the built-in
# PHP webserver doesn't understand.
# ;) Nicely enough we just happen to bundle a mime.types file
- $f = fopen($file, 'rb');
+ $f = fopen( $file, 'rb' );
if ( preg_match( '#^text/#', $mime ) ) {
# Text should have a charset=UTF-8 (php's webserver does this too)
- header("Content-Type: $mime; charset=UTF-8");
+ header( "Content-Type: $mime; charset=UTF-8" );
} else {
- header("Content-Type: $mime");
+ header( "Content-Type: $mime" );
}
- header("Content-Length: " . filesize($file));
+ header( "Content-Length: " . filesize( $file ) );
// Stream that out to the browser
- fpassthru($f);
+ fpassthru( $f );
return true;
}
// Wasn't included from the file scope, halt execution (probably wanted the class)
// If a class is using commandLine.inc (old school maintenance), they definitely
// cannot be included and will proceed with execution
-if( !Maintenance::shouldExecute() && $maintClass != 'CommandLineInc' ) {
+if ( !Maintenance::shouldExecute() && $maintClass != 'CommandLineInc' ) {
return;
}
# Get the MWInit class
require_once( "$IP/includes/Init.php" );
require_once( "$IP/includes/AutoLoader.php" );
+ # Stub the profiler
+ require_once( "$IP/includes/profiler/Profiler.php" );
}
-# Stub the profiler
-require_once( MWInit::compiledPath( 'includes/profiler/Profiler.php' ) );
+# Start the profiler
+$wgProfiler = array();
+if ( file_exists( "$IP/StartProfiler.php" ) ) {
+ require( "$IP/StartProfiler.php" );
+}
// Some other requires
if ( !defined( 'MW_COMPILED' ) ) {
}
if ( $maintenance->getDbType() === Maintenance::DB_NONE ) {
- if ( $wgLocalisationCacheConf['storeClass'] === false && ( $wgLocalisationCacheConf['store'] == 'db' || ( $wgLocalisationCacheConf['store'] == 'detect' && !$wgCacheDirectory ) ) )
+ if ( $wgLocalisationCacheConf['storeClass'] === false && ( $wgLocalisationCacheConf['store'] == 'db' || ( $wgLocalisationCacheConf['store'] == 'detect' && !$wgCacheDirectory ) ) ) {
$wgLocalisationCacheConf['storeClass'] = 'LCStore_Null';
+ }
}
$maintenance->finalSetup();
// Some last includes
$originalDir = getcwd();
-$optionsWithArgs = array( 'pagelist', 'start', 'end', 'revstart', 'revend');
+$optionsWithArgs = array( 'pagelist', 'start', 'end', 'revstart', 'revend' );
require_once( __DIR__ . '/commandLine.inc' );
require_once( __DIR__ . '/backup.inc' );
}
public function execute() {
- if ( !( $this->hasOption('file') ^ $this->hasOption('dump') ) ) {
- $this->error("You must provide a file or dump", true);
+ if ( !( $this->hasOption( 'file' ) ^ $this->hasOption( 'dump' ) ) ) {
+ $this->error( "You must provide a file or dump", true );
}
$this->checkOptions();
- if ( $this->hasOption('file') ) {
+ if ( $this->hasOption( 'file' ) ) {
$revision = new WikiRevision;
$revision->setText( file_get_contents( $this->getOption( 'file' ) ) );
$this->startTime = microtime( true );
- if ( $this->getOption('dump') == '-' ) {
+ if ( $this->getOption( 'dump' ) == '-' ) {
$source = new ImportStreamSource( $this->getStdin() );
} else {
- $this->error("Sorry, I don't support dump filenames yet. Use - and provide it on stdin on the meantime.", true);
+ $this->error( "Sorry, I don't support dump filenames yet. Use - and provide it on stdin on the meantime.", true );
}
$importer = new WikiImporter( $source );
$delta = microtime( true ) - $this->startTime;
$this->error( "Done {$this->count} revisions in " . round($delta, 2) . " seconds " );
- if ($delta > 0)
+ if ( $delta > 0 ) {
$this->error( round($this->count / $delta, 2) . " pages/sec" );
+ }
# Perform the memory_get_peak_usage() when all the other data has been output so there's no damage if it dies.
# It is only available since 5.2.0 (since 5.2.1 if you haven't compiled with --enable-memory-limit)
$this->count++;
if ( isset( $this->from ) ) {
- if ( $this->from != $title )
+ if ( $this->from != $title ) {
return;
+ }
$this->output( "Skipped " . ($this->count - 1) . " pages\n" );
$this->count = 1;
$link = Title::makeTitle( $row->pl_namespace, $row->pl_title );
$this->output( " " . $link->getPrefixedURL() );
}
- if ( isset( $lastPage ) )
+ if ( isset( $lastPage ) ) {
$this->output( "\n" );
+ }
}
}
$dbr->bufferResults( false );
$result = $dbr->select( 'page',
array( 'page_namespace', 'page_title' ),
- array( 'page_namespace' => NS_MAIN,
- 'page_is_redirect' => 0,
+ array(
+ 'page_namespace' => NS_MAIN,
+ 'page_is_redirect' => 0,
),
__METHOD__ );
*
* note that that the text string itself is *not* followed by newline
*/
- public function execute() {
+ public function execute() {
$db = wfGetDB( DB_SLAVE );
$stdin = $this->getStdin();
while ( !feof( $stdin ) ) {
$db = wfGetDB( $i );
/*
if ( !$db->masterPosWait( $masterFile, $masterPos, 10 ) ) {
- $this->output( "Slave is too lagged, aborting\n" );
- $dbw->commit( __METHOD__ );
- sleep(10);
- return;
+ $this->output( "Slave is too lagged, aborting\n" );
+ $dbw->commit( __METHOD__ );
+ sleep(10);
+ return;
}*/
$latest = $db->selectField( 'page', 'page_latest', array( 'page_id' => $pageID ), __METHOD__ );
$max = $db->selectField( 'revision', 'MAX(rev_id)', false, __METHOD__ );
"}}",
"{{INT:googlesearch|",
"}}",
+ "{{ROOTPAGENAME}}",
"{{BASEPAGENAME}}",
"{{CONTENTLANGUAGE}}",
"{{PAGESINNAMESPACE:}}",
}
$this->identifier = $this->getOption( 'identifier', wfWikiID() );
$this->compress = $this->getOption( 'compress', 'yes' ) !== 'no';
- $this->skipRedirects = $this->getOption( 'skip-redirects', false ) !== false ;
+ $this->skipRedirects = $this->getOption( 'skip-redirects', false ) !== false;
$this->dbr = wfGetDB( DB_SLAVE );
$this->generateNamespaces();
$this->timestamp = wfTimestamp( TS_ISO_8601, wfTimestampNow() );
wfMkdirParents( $fspath, null, __METHOD__ ) or die( "Can not create directory $fspath.\n" );
}
- return realpath( $fspath ) . DIRECTORY_SEPARATOR ;
+ return realpath( $fspath ) . DIRECTORY_SEPARATOR;
}
/**
)
);
- foreach ( $res as $row )
+ foreach ( $res as $row ) {
$this->namespaces[] = $row->page_namespace;
+ }
}
/**
if ( $wgContLang->hasVariants() ) {
$variants = $wgContLang->getVariants();
foreach ( $variants as $vCode ) {
- if ( $vCode == $wgContLang->getCode() ) continue; // we don't want default variant
+ if ( $vCode == $wgContLang->getCode() ) {
+ continue; // we don't want default variant
+ }
$entry = $this->fileEntry( $title->getCanonicalURL( '', $vCode ), $date, $this->priority( $namespace ) );
$length += strlen( $entry );
$this->write( $this->file, $entry );
*/
function open( $file, $flags ) {
$resource = $this->compress ? gzopen( $file, $flags ) : fopen( $file, $flags );
- if( $resource === false ) {
+ if ( $resource === false ) {
wfDebugDieBacktrace( __METHOD__ . " error opening file $file with flags $flags. Check permissions?" );
}
return $resource;
* gzwrite() / fwrite() wrapper
*/
function write( &$handle, $str ) {
- if( $handle === true || $handle === false ) {
+ if ( $handle === true || $handle === false ) {
wfDebugDieBacktrace( __METHOD__ . " was passed a boolean as a file handle.\n" );
}
- if ( $this->compress )
+ if ( $this->compress ) {
gzwrite( $handle, $str );
- else
+ } else {
fwrite( $handle, $str );
+ }
}
/**
* gzclose() / fclose() wrapper
*/
function close( &$handle ) {
- if ( $this->compress )
+ if ( $this->compress ) {
gzclose( $handle );
- else
+ } else {
fclose( $handle );
+ }
}
/**
if ( $lb->getServerCount() == 1 ) {
$this->error( "This script dumps replication lag times, but you don't seem to have\n"
- . "a multi-host db server configuration." );
+ . "a multi-host db server configuration." );
} else {
$lags = $lb->getLagTimes();
foreach ( $lags as $n => $lag ) {
class BackupReader extends Maintenance {
public $reportingInterval = 100;
public $pageCount = 0;
- public $revCount = 0;
- public $dryRun = false;
- public $uploads = false;
+ public $revCount = 0;
+ public $dryRun = false;
+ public $uploads = false;
public $imageBasePath = false;
- public $nsFilter = false;
+ public $nsFilter = false;
function __construct() {
parent::__construct();
- $gz = in_array('compress.zlib', stream_get_wrappers()) ? 'ok' : '(disabled; requires PHP zlib module)';
- $bz2 = in_array('compress.bzip2', stream_get_wrappers()) ? 'ok' : '(disabled; requires PHP bzip2 module)';
+ $gz = in_array( 'compress.zlib', stream_get_wrappers() ) ? 'ok' : '(disabled; requires PHP zlib module)';
+ $bz2 = in_array( 'compress.bzip2', stream_get_wrappers() ) ? 'ok' : '(disabled; requires PHP bzip2 module)';
$this->mDescription = <<<TEXT
This script reads pages from an XML file as produced from Special:Export or
}
public function execute() {
- if( wfReadOnly() ) {
+ if ( wfReadOnly() ) {
$this->error( "Wiki is in read-only mode; you'll need to disable it for import to work.", true );
}
$this->setNsfilter( explode( '|', $this->getOption( 'namespaces' ) ) );
}
- if( $this->hasArg() ) {
+ if ( $this->hasArg() ) {
$this->importFromFile( $this->getArg() );
} else {
$this->importFromStdin();
function importFromStdin() {
$file = fopen( 'php://stdin', 'rt' );
- if( self::posix_isatty( $file ) ) {
+ if ( self::posix_isatty( $file ) ) {
$this->maybeHelp( true );
}
return $this->importFromHandle( $file );
$source = new ImportStreamSource( $handle );
$importer = new WikiImporter( $source );
- if( $this->hasOption( 'debug' ) ) {
+ if ( $this->hasOption( 'debug' ) ) {
$importer->setDebug( true );
}
if ( $this->hasOption( 'no-updates' ) ) {
}
$idx = strrpos( $n, '.' );
- if ( !$idx ) break;
+ if ( !$idx ) {
+ break;
+ }
$n = substr( $n, 0, $idx );
$maxStrip -= 1;
if ( isset( $options['source-wiki-url'] ) ) {
/* find comment text directly from source wiki, through MW's API */
$real_comment = getFileCommentFromSourceWiki( $options['source-wiki-url'], $base );
- if ( $real_comment === false )
+ if ( $real_comment === false ) {
$commentText = $comment;
- else
+ } else {
$commentText = $real_comment;
+ }
/* find user directly from source wiki, through MW's API */
$real_user = getFileUserFromSourceWiki( $options['source-wiki-url'], $base );
$cascade = false;
$restrictions = array();
- foreach( $title->getRestrictionTypes() as $type ) {
+ foreach ( $title->getRestrictionTypes() as $type ) {
$restrictions[$type] = $protectLevel;
}
foreach ( array( 'count' => 'Found', 'limit' => 'Limit', 'ignored' => 'Ignored',
'added' => 'Added', 'skipped' => 'Skipped', 'overwritten' => 'Overwritten',
'failed' => 'Failed' ) as $var => $desc ) {
- if ( $$var > 0 )
+ if ( $$var > 0 ) {
echo( "{$desc}: {$$var}\n" );
+ }
}
} else {
$edits = $counter->edits();
$this->output( "{$edits}\nCounting number of articles..." );
- $good = $counter->articles();
+ $good = $counter->articles();
$this->output( "{$good}\nCounting total pages..." );
$pages = $counter->pages();
InstallerOverrides::getCliInstaller( $siteName, $adminName, $this->mOptions );
$status = $installer->doEnvironmentChecks();
- if( $status->isGood() ) {
+ if ( $status->isGood() ) {
$installer->showMessage( 'config-env-good' );
} else {
$installer->showStatusMessage( $status );
return;
}
- if( !$this->hasOption( 'env-checks' ) ) {
+ if ( !$this->hasOption( 'env-checks' ) ) {
$installer->execute();
$installer->writeConfigurationFile( $this->getOption( 'confpath', $IP ) );
}
<?php
-if ( !defined( 'MEDIAWIKI' ) ) die();
+if ( !defined( 'MEDIAWIKI' ) ) {
+ die();
+}
/**
* Statistic output classes.
*
echo "'''Note:''' These statistics can be generated by running <code>php maintenance/language/transstat.php</code>.\n\n";
echo "For additional information on specific languages (the message names, the actual problems, etc.), run <code>php maintenance/language/checkLanguage.php --lang=foo</code>.\n\n";
echo 'English (en) is excluded because it is the default localization';
- if( is_array( $wgDummyLanguageCodes ) ) {
+ if ( is_array( $wgDummyLanguageCodes ) ) {
$dummyCodes = array();
- foreach( $wgDummyLanguageCodes as $dummyCode => $correctCode ) {
+ foreach ( $wgDummyLanguageCodes as $dummyCode => $correctCode ) {
$dummyCodes[] = Language::fetchLanguageName( $dummyCode ) . ' (' . $dummyCode . ')';
}
echo ', as well as the following languages that are not intended for system message translations, usually because they redirect to other language codes: ' . implode( ', ', $dummyCodes );
# Weigh reverse with factor 20 so coloring takes effect more quickly as
# this option is used solely for reporting 'bad' percentages.
$v = $v * 20;
- if ( $v > 255 ) $v = 255;
+ if ( $v > 255 ) {
+ $v = 255;
+ }
$v = 255 - $v;
}
if ( $v < 128 ) {
}
include( $messagesFile );
$messageExist = isset( $messages );
- if ( $messageExist )
+ if ( $messageExist ) {
$wgMessages[$langCode] = $messages;
+ }
include( $messagesFileC );
$messageCExist = isset( $messages );
- if ( $messageCExist )
+ if ( $messageCExist ) {
$wgMessages[$langCodeC] = $messages;
+ }
$count = 0;
if ( ( $messageExist ) && ( $messageCExist ) ) {
}
}
} else {
- if ( !$messageExist )
+ if ( !$messageExist ) {
echo "There are no messages defined in $langCode.\n";
- if ( !$messageCExist )
+ }
+ if ( !$messageCExist ) {
echo "There are no messages defined in $langCodeC.\n";
+ }
}
}
echo "[messages are hidden]\n";
} else {
foreach ( $messages as $key => $value ) {
- if( !in_array( $check, $this->nonMessageChecks() ) ) {
+ if ( !in_array( $check, $this->nonMessageChecks() ) ) {
$key = $this->formatKey( $key, $code );
}
if ( $this->level == 2 || empty( $value ) ) {
$problems = 0;
$detailTextForLangChecks = array();
foreach ( $results as $check => $messages ) {
- if( in_array( $check, $this->nonMessageChecks() ) ) {
+ if ( in_array( $check, $this->nonMessageChecks() ) ) {
continue;
}
$count = count( $messages );
* @return bool True if there are any results, false if not.
*/
protected function isEmpty() {
- foreach( $this->results as $results ) {
- foreach( $results as $messages ) {
- if( !empty( $messages ) ) {
+ foreach ( $this->results as $results ) {
+ foreach ( $results as $messages ) {
+ if ( !empty( $messages ) ) {
return false;
}
}
* @throws MWException
*/
protected function checkLanguage( $code ) {
- foreach( $this->extensions as $extension ) {
+ foreach ( $this->extensions as $extension ) {
$this->L = $extension;
$this->results = array();
$this->results[$code] = parent::checkLanguage( $code );
- if( !$this->isEmpty() ) {
+ if ( !$this->isEmpty() ) {
echo $extension->name() . ":\n";
- if( $this->level > 0 ) {
+ if ( $this->level > 0 ) {
switch( $this->output ) {
case 'plain':
$this->outputText();
}
public function execute() {
- if ( !function_exists( 'memory_get_usage' ) )
+ if ( !function_exists( 'memory_get_usage' ) ) {
$this->error( "You must compile PHP with --enable-memory-limit", true );
+ }
$langtool = new languages();
$memlast = $memstart = memory_get_usage();
if ( isset( $this->mGeneralMessages['required'][$key] ) ) {
$this->mMessages[$code]['required'][$key] = $value;
$this->mMessages[$code]['translated'][$key] = $value;
- } else if ( isset( $this->mGeneralMessages['optional'][$key] ) ) {
+ } elseif ( isset( $this->mGeneralMessages['optional'][$key] ) ) {
$this->mMessages[$code]['optional'][$key] = $value;
$this->mMessages[$code]['translated'][$key] = $value;
} else {
foreach ( $this->mGeneralMessages['all'] as $key => $value ) {
if ( in_array( $key, $this->mIgnoredMessages ) ) {
$this->mGeneralMessages['ignored'][$key] = $value;
- } else if ( in_array( $key, $this->mOptionalMessages ) ) {
+ } elseif ( in_array( $key, $this->mOptionalMessages ) ) {
$this->mGeneralMessages['optional'][$key] = $value;
$this->mGeneralMessages['translatable'][$key] = $value;
} else {
'[POP]' => "\xE2\x80\xAC",
'[LRO]' => "\xE2\x80\xAD",
'[RLO]' => "\xE2\x80\xAB",
- '[ZWSP]'=> "\xE2\x80\x8B",
- '[NBSP]'=> "\xC2\xA0",
- '[WJ]' => "\xE2\x81\xA0",
+ '[ZWSP]' => "\xE2\x80\x8B",
+ '[NBSP]' => "\xC2\xA0",
+ '[WJ]' => "\xE2\x81\xA0",
'[BOM]' => "\xEF\xBB\xBF",
- '[FFFD]'=> "\xEF\xBF\xBD",
+ '[FFFD]' => "\xEF\xBF\xBD",
);
$wrongRegExp = '/(' . implode( '|', array_values( $wrongChars ) ) . ')/sDu';
$wrongCharsMessages = array();
foreach ( $this->mMessages[$code]['translated'] as $key => $value ) {
$matches = array();
preg_match_all( "/\[\[([{$tc}]+)(?:\\|(.+?))?]]/sDu", $value, $matches );
- for ($i = 0; $i < count($matches[0]); $i++ ) {
- if ( preg_match( "/.*project.*/isDu", $matches[1][$i] ) ) {
+ for ( $i = 0; $i < count( $matches[0] ); $i++ ) {
+ if ( preg_match( "/.*project.*/isDu", $matches[1][$i] ) ) {
$messages[$key][] = $matches[0][$i];
}
}
$this->loadFile( 'en' );
$this->loadFile( $code );
$namespacesDiff = array_diff_key( $this->mNamespaceNames['en'], $this->mNamespaceNames[$code] );
- if ( isset( $namespacesDiff[NS_MAIN] ) ) unset( $namespacesDiff[NS_MAIN] );
+ if ( isset( $namespacesDiff[NS_MAIN] ) ) {
+ unset( $namespacesDiff[NS_MAIN] );
+ }
return $namespacesDiff;
}
$namespaces = array();
# Check default namespace name
- if( isset( $this->mNamespaceNames[$code][NS_PROJECT_TALK] ) ) {
+ if ( isset( $this->mNamespaceNames[$code][NS_PROJECT_TALK] ) ) {
$default = $this->mNamespaceNames[$code][NS_PROJECT_TALK];
if ( strpos( $default, '$1' ) === false ) {
$namespaces[$default] = 'default';
}
# Check namespace aliases
- foreach( $this->mNamespaceAliases[$code] as $key => $value ) {
+ foreach ( $this->mNamespaceAliases[$code] as $key => $value ) {
if ( $value == NS_PROJECT_TALK && strpos( $key, '$1' ) === false ) {
$namespaces[$key] = '';
}
* @param $code string The language code.
*/
protected function loadFile( $code ) {
- if( !isset( $this->mRawMessages[$code] ) ) {
+ if ( !isset( $this->mRawMessages[$code] ) ) {
$this->mRawMessages[$code] = $this->mMessageGroup->load( $code );
- if( empty( $this->mRawMessages[$code] ) ) {
+ if ( empty( $this->mRawMessages[$code] ) ) {
$this->mRawMessages[$code] = array();
}
}
'nov',
'dec',
),
+ 'human-timestamps' => array(
+ 'monday-at',
+ 'tuesday-at',
+ 'wednesday-at',
+ 'thursday-at',
+ 'friday-at',
+ 'saturday-at',
+ 'sunday-at',
+ 'today-at',
+ 'yesterday-at',
+ ),
'categorypages' => array(
'pagecategories',
'pagecategorieslink',
'yourname',
'userlogin-yourname',
'userlogin-yourname-ph',
+ 'createacct-helpusername-url',
+ 'createacct-helpusername-link',
'yourpassword',
'userlogin-yourpassword',
'userlogin-yourpassword-ph',
+ 'createacct-yourpassword-ph',
'yourpasswordagain',
+ 'createacct-yourpasswordagain',
+ 'createacct-yourpasswordagain-ph',
'remembermypassword',
'userlogin-remembermypassword',
'userlogin-signwithsecure',
'userlogin-resetlink',
'helplogin-url',
'userlogin-helplink',
+ 'createacct-join',
+ 'createacct-emailrequired',
+ 'createacct-emailoptional',
+ 'createacct-email-ph',
'createaccountmail',
+ 'createacct-realname',
'createaccountreason',
+ 'createacct-reason',
+ 'createacct-captcha',
+ 'createacct-captcha-help-url',
+ 'createacct-imgcaptcha-help',
+ 'createacct-imgcaptcha-ph',
+ 'createacct-benefit-heading',
+ 'createacct-benefit-icon1',
+ 'createacct-benefit-head1',
+ 'createacct-benefit-body1',
+ 'createacct-benefit-icon2',
+ 'createacct-benefit-head2',
+ 'createacct-benefit-body2',
+ 'createacct-benefit-icon3',
+ 'createacct-benefit-head3',
+ 'createacct-benefit-body3',
'badretype',
'userexists',
'loginerror',
'javascripttest-pagetext-noframework',
'javascripttest-pagetext-unknownframework',
'javascripttest-pagetext-frameworks',
- 'javascripttest-pagetext-skins' ,
+ 'javascripttest-pagetext-skins',
'javascripttest-qunit-name',
'javascripttest-qunit-intro',
'javascripttest-qunit-heading',
'minutes',
'hours',
'days',
+ 'weeks',
'months',
'years',
'ago',
'exif-lightsource-255',
),
'exif-flash' => array(
- 'exif-flash-fired-0' ,
- 'exif-flash-fired-1' ,
- 'exif-flash-return-0' ,
- 'exif-flash-return-2' ,
- 'exif-flash-return-3' ,
- 'exif-flash-mode-1' ,
- 'exif-flash-mode-2' ,
- 'exif-flash-mode-3' ,
- 'exif-flash-function-1' ,
- 'exif-flash-redeye-1' ,
+ 'exif-flash-fired-0',
+ 'exif-flash-fired-1',
+ 'exif-flash-return-0',
+ 'exif-flash-return-2',
+ 'exif-flash-return-3',
+ 'exif-flash-mode-1',
+ 'exif-flash-mode-2',
+ 'exif-flash-mode-3',
+ 'exif-flash-function-1',
+ 'exif-flash-redeye-1',
),
'exif-focalplaneresolutionunit' => array(
'exif-focalplaneresolutionunit-2',
'video-info' => 'Video information, used by Language::formatTimePeriod() to format lengths in the above messages',
'badimagelist' => 'Bad image list',
'variantname-zh' => "Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language",
'variantname-gan' => 'Variants for Gan language',
'variantname-sr' => 'Variants for Serbian language',
$sortedMessages = $messages[1];
# Write to the file
- if ( $messagesFolder )
+ if ( $messagesFolder ) {
$filename = Language::getFileName( "$messagesFolder/Messages", $code );
- else
+ } else {
$filename = Language::getMessagesFileName( $code );
+ }
- if ( file_exists( $filename ) )
+ if ( file_exists( $filename ) ) {
$contents = file_get_contents( $filename );
- else
+ } else {
$contents = '<?php
$messages = array(
);
';
+ }
- if( strpos( $contents, '$messages' ) !== false ) {
+ if ( strpos( $contents, '$messages' ) !== false ) {
$contents = explode( '$messages', $contents );
- if( $messagesText == '$messages' . $contents[1] ) {
+ if ( $messagesText == '$messages' . $contents[1] ) {
echo "Generated messages for language $code. Same as the current file.\n";
} else {
- if( $write ) {
+ if ( $write ) {
$new = $contents[0];
$new .= $messagesText;
file_put_contents( $filename, $new );
echo "Generated messages for language $code. Please run the script again (without the parameter \"dry-run\") to write the array to the file.\n";
}
}
- if( $listUnknown && isset( $sortedMessages['unknown'] ) && !empty( $sortedMessages['unknown'] ) ) {
- if ( $removeUnknown )
+ if ( $listUnknown && isset( $sortedMessages['unknown'] ) && !empty( $sortedMessages['unknown'] ) ) {
+ if ( $removeUnknown ) {
echo "\nThe following " . count( $sortedMessages['unknown'] ) . " unknown messages have been removed:\n";
- else
+ } else {
echo "\nThere are " . count( $sortedMessages['unknown'] ) . " unknown messages, please check them:\n";
- foreach( $sortedMessages['unknown'] as $key => $value ) {
+ }
+ foreach ( $sortedMessages['unknown'] as $key => $value ) {
echo "* " . $key . "\n";
}
}
# Sort messages to blocks
$sortedMessages['unknown'] = $messages;
- foreach( self::$messageStructure as $blockName => $block ) {
+ foreach ( self::$messageStructure as $blockName => $block ) {
/**
* @var $block array
*/
- foreach( $block as $key ) {
- if( array_key_exists( $key, $sortedMessages['unknown'] ) ) {
+ foreach ( $block as $key ) {
+ if ( array_key_exists( $key, $sortedMessages['unknown'] ) ) {
$sortedMessages[$blockName][$key] = $sortedMessages['unknown'][$key];
unset( $sortedMessages['unknown'][$key] );
}
# Write all the messages
$messagesText = "\$messages = array(
";
- foreach( $sortedMessages as $block => $messages ) {
+ foreach ( $sortedMessages as $block => $messages ) {
# Skip if it's the block of unknown messages - handle that in the end of file
- if( $block == 'unknown' ) {
+ if ( $block == 'unknown' ) {
continue;
}
- if( $ignoredComments ) {
+ if ( $ignoredComments ) {
$ignored = self::$ignoredMessages;
$optional = self::$optionalMessages;
} else {
$commentArray = array();
# List of keys only
- foreach( $messages as $key ) {
- if( in_array( $key, $ignored ) ) {
+ foreach ( $messages as $key ) {
+ if ( in_array( $key, $ignored ) ) {
$commentArray[$key] = ' # ' . self::$ignoredComment;
- } elseif( in_array( $key, $optional ) ) {
+ } elseif ( in_array( $key, $optional ) ) {
$commentArray[$key] = ' # ' . self::$optionalComment;
}
}
$blockText = '';
# Skip the block if it includes no messages
- if( empty( $messages ) ) {
+ if ( empty( $messages ) ) {
return '';
}
# Format the block comment (if exists); check for multiple lines comments
- if( !empty( $blockComment ) ) {
- if( strpos( $blockComment, "\n" ) === false ) {
+ if ( !empty( $blockComment ) ) {
+ if ( strpos( $blockComment, "\n" ) === false ) {
$blockText .= "$prefix# $blockComment
";
} else {
$maxKeyLength = max( array_map( 'strlen', array_keys( $messages ) ) );
# Format the messages
- foreach( $messages as $key => $value ) {
+ foreach ( $messages as $key => $value ) {
# Add the key name
$blockText .= "$prefix'$key'";
$single = "'";
$double = '"';
- if( strpos( $value, $single ) === false ) {
+ if ( strpos( $value, $single ) === false ) {
# Nothing ugly, just use '
$blockText .= $single . $value . $single;
- } elseif( strpos( $value, $double ) === false && !preg_match('/\$[a-zA-Z_\x7f-\xff]/', $value) ) {
+ } elseif ( strpos( $value, $double ) === false && !preg_match( '/\$[a-zA-Z_\x7f-\xff]/', $value ) ) {
# No "-quotes, no variables that need quoting, use "
$blockText .= $double . $value . $double;
} else {
# Something needs quoting, pick the quote which causes less quoting
$quote = substr_count( $value, $double ) + substr_count( $value, '$' ) >= substr_count( $value, $single ) ? $single : $double;
- if( $quote === $double ) {
+ if ( $quote === $double ) {
$extra = '$';
} else {
$extra = '';
$blockText .= ',';
# Add comments, if there is any
- if( array_key_exists( $key, $messageComments ) ) {
+ if ( array_key_exists( $key, $messageComments ) ) {
$blockText .= $messageComments[$key];
}
$servers = $wgObjectCaches[$cache]['servers'];
} elseif ( $wgMainCacheType === CACHE_MEMCACHED ) {
$mcc->set_servers( $wgMemCachedServers );
-} elseif( isset( $wgObjectCaches[$wgMainCacheType]['servers'] ) ) {
+} elseif ( isset( $wgObjectCaches[$wgMainCacheType]['servers'] ) ) {
$mcc->set_servers( $wgObjectCaches[$wgMainCacheType]['servers'] );
} else {
print "MediaWiki isn't configured for Memcached usage\n";
$quit = false;
$line = Maintenance::readconsole();
- if ( $line === false ) exit;
+ if ( $line === false ) {
+ exit;
+ }
$args = explode( ' ', $line );
$command = array_shift( $args );
public function __construct() {
parent::__construct();
$this->mDescription = "Makes several 'set', 'incr' and 'get' requests on every"
- . " memcached server and shows a report";
+ . " memcached server and shows a report";
$this->addOption( 'i', 'Number of iterations', false, true );
$this->addOption( 'cache', 'Use servers from this $wgObjectCaches store', false, true );
$this->addArg( 'server[:port]', 'Memcached server to test, with optional port', false );
$servers = array( $this->getArg() );
} elseif ( $wgMainCacheType === CACHE_MEMCACHED ) {
global $wgMemCachedServers;
- $servers = $wgMemCachedServers ;
+ $servers = $wgMemCachedServers;
} elseif ( isset( $wgObjectCaches[$wgMainCacheType]['servers'] ) ) {
$servers = $wgObjectCaches[$wgMainCacheType]['servers'];
} else {
if ( $this->hasOption( 'extensions-dir' ) ) {
$extdir = $this->getOption( 'extensions-dir' );
$entries = scandir( $extdir );
- foreach( $entries as $extname ) {
+ foreach ( $entries as $extname ) {
if ( $extname == '.' || $extname == '..' || !is_dir( "$extdir/$extname" ) ) {
continue;
}
$doxygenInputFilter = "php {$mwPath}maintenance/mwdoc-filter.php";
/** where Phpdoc should output documentation */
-$doxyOutput = $mwPath . 'docs' . DIRECTORY_SEPARATOR ;
+$doxyOutput = $mwPath . 'docs' . DIRECTORY_SEPARATOR;
$doxyVersion = 'master';
// Replace template placeholders by correct values.
$replacements = array(
'{{OUTPUT_DIRECTORY}}' => $outputDirectory,
- '{{STRIP_FROM_PATH}}' => $stripFromPath,
- '{{CURRENT_VERSION}}' => $currentVersion,
- '{{INPUT}}' => $input,
- '{{EXCLUDE}}' => $exclude,
+ '{{STRIP_FROM_PATH}}' => $stripFromPath,
+ '{{CURRENT_VERSION}}' => $currentVersion,
+ '{{INPUT}}' => $input,
+ '{{EXCLUDE}}' => $exclude,
'{{EXCLUDE_PATTERNS}}' => $excludePatterns,
- '{{HAVE_DOT}}' => `which dot` ? 'YES' : 'NO',
- '{{GENERATE_MAN}}' => $doxyGenerateMan ? 'YES' : 'NO',
- '{{INPUT_FILTER}}' => $doxygenInputFilter,
+ '{{HAVE_DOT}}' => `which dot` ? 'YES' : 'NO',
+ '{{GENERATE_MAN}}' => $doxyGenerateMan ? 'YES' : 'NO',
+ '{{INPUT_FILTER}}' => $doxygenInputFilter,
);
$tmpCfg = str_replace( array_keys( $replacements ), array_values( $replacements ), $template );
$tmpFileName = tempnam( wfTempDir(), 'mwdocgen-' );
if ( is_array( $argv ) ) {
for ($i = 0; $i < count($argv); $i++ ) {
switch( $argv[$i] ) {
- case '--all': $input = 0; break;
- case '--includes': $input = 1; break;
- case '--languages': $input = 2; break;
- case '--maintenance': $input = 3; break;
- case '--skins': $input = 4; break;
+ case '--all':
+ $input = 0;
+ break;
+ case '--includes':
+ $input = 1;
+ break;
+ case '--languages':
+ $input = 2;
+ break;
+ case '--maintenance':
+ $input = 3;
+ break;
+ case '--skins':
+ $input = 4;
+ break;
case '--file':
$input = 5;
$i++;
$file = $argv[$i];
}
break;
- case '--no-extensions': $input = 6; break;
+ case '--no-extensions':
+ $input = 6;
+ break;
case '--output':
$i++;
if ( isset( $argv[$i] ) ) {
5 : only a given file
6 : all but the extensions directory
OPTIONS;
- while ( !is_numeric( $input ) )
- {
+ while ( !is_numeric( $input ) ) {
$input = readaline( "\nEnter your choice [0]:" );
if ( $input == '' ) {
$input = 0;
}
switch ( $input ) {
-case 0: $input = $mwPath; break;
-case 1: $input = $mwPathI; break;
-case 2: $input = $mwPathL; break;
-case 3: $input = $mwPathM; break;
-case 4: $input = $mwPathS; break;
+case 0:
+ $input = $mwPath;
+ break;
+case 1:
+ $input = $mwPathI;
+ break;
+case 2:
+ $input = $mwPathL;
+ break;
+case 3:
+ $input = $mwPathM;
+ break;
+case 4:
+ $input = $mwPathS;
+ break;
case 5:
if ( !isset( $file ) ) {
$file = readaline( "Enter file name $mwPath" );
* @return array
*/
private function getConflicts( $ns, $name ) {
- $page = 'page';
+ $page = 'page';
$table = $this->db->tableName( $page );
- $prefix = $this->db->strencode( $name );
+ $prefix = $this->db->strencode( $name );
$encNamespace = $this->db->addQuotes( $ns );
$titleSql = "TRIM(LEADING '$prefix:' FROM {$page}_title)";
$this->db->update( $table,
array(
"{$prefix}_namespace" => $newTitle->getNamespace(),
- "{$prefix}_title" => $newTitle->getDBkey(),
+ "{$prefix}_title" => $newTitle->getDBkey(),
),
array(
// "{$prefix}_namespace" => 0,
- // "{$prefix}_title" => $row->oldtitle,
- "{$prefix}_id" => $row->id,
+ // "{$prefix}_title" => $row->oldtitle,
+ "{$prefix}_id" => $row->id,
),
__METHOD__ );
$this->output( "ok.\n" );
foreach ( $res as $row ) {
// echo "$ns_name:".$row->page_title, "\n";
$title = Title::makeTitle( $ns, $row->page_title );
- $id = $title->getArticleID();
+ $id = $title->getArticleID();
// Get corresponding revisions
$res2 = $dbw->query( "SELECT rev_id FROM $tbl_rev WHERE rev_page = $id" );
$n_deleted ++;
}
} else {
- $this->output( "skip: " . $title->getPrefixedText() . "\n" );
+ $this->output( "skip: " . $title->getPrefixedText() . "\n" );
}
}
$dbw->commit( __METHOD__ );
$this->output( "Searching for \"$name\"..." );
$title = Title::newFromText( $name );
if ( $title ) {
- $id = $title->getArticleID();
+ $id = $title->getArticleID();
$real = $title->getPrefixedText();
$isGoodArticle = $title->isContentPage();
$this->output( "found \"$real\" with ID $id.\n" );
if ( $wgSharedPrefix != null ) {
$ltable = preg_replace( "/^$wgSharedPrefix(.*)/i", "$wgDBprefix\\1", $stable );
} else {
- $ltable = "{$wgDBprefix}{$stable}" ;
+ $ltable = "{$wgDBprefix}{$stable}";
}
$result = $dbw->query( "SELECT uc.constraint_name, uc.table_name, ucc.column_name, uccpk.table_name pk_table_name, uccpk.column_name pk_column_name, uc.delete_rule, uc.deferrable, uc.deferred
*/
private function checkSeparation( $fix ) {
$dbw = wfGetDB( DB_MASTER );
- $page = $dbw->tableName( 'page' );
+ $page = $dbw->tableName( 'page' );
$revision = $dbw->tableName( 'revision' );
if ( $fix ) {
'revision',
'rev_id',
array(
- 'rev_page' => $row->page_id,
+ 'rev_page' => $row->page_id,
'rev_timestamp' => $row2->max_timestamp ) );
$this->output( "... updating to revision $maxId\n" );
$maxRev = Revision::newFromId( $maxId );
*/
protected function Wikitext() {
- $php_stdin = 'php://stdin';
+ $php_stdin = 'php://stdin';
$input_file = $this->getArg( 0, $php_stdin );
- if( $input_file === $php_stdin ) {
+ if ( $input_file === $php_stdin ) {
$ctrl = wfIsWindows() ? 'CTRL+Z' : 'CTRL+D';
$this->error( basename(__FILE__) . ": warning: reading wikitext from STDIN. Press $ctrl to parse.\n" );
}
$title =
$this->getOption( 'title' )
? $this->getOption( 'title' )
- : 'CLIParser' ;
+ : 'CLIParser';
return Title::newFromText( $title );
}
}
$done += $i;
- if( $i !== $batchSize ) {
+ if ( $i !== $batchSize ) {
break;
}
$this->output( sprintf(
"id %d done (up to %d), %5.3f%% \r", $lastId, $endId, $lastId / $endId * 100 ) );
wfWaitForSlaves();
- } while( true );
+ } while ( true );
$processingTime = microtime( true ) - $startTime;
$this->output( sprintf( "\nDone %d files in %.1f seconds\n", $done, $processingTime ) );
if ( LogEventsList::typeAction( $row, $delTypes, 'revision' ) ) {
$params = LogPage::extractParams( $row->log_params );
// Param format: <urlparam> <item CSV> [<ofield> <nfield>]
- if ( count( $params ) < 2 ) continue; // bad row?
+ if ( count( $params ) < 2 ) {
+ continue; // bad row?
+ }
$field = RevisionDeleter::getRelationType( $params[0] );
// B/C, the params may start with a title key (<title> <urlparam> <CSV>)
if ( $field == null ) {
$log->addRelations( $field, $items, $row->log_id );
// Determine what table to query...
$prefix = substr( $field, 0, strpos( $field, '_' ) ); // db prefix
- if ( !isset( self::$tableMap[$prefix] ) )
+ if ( !isset( self::$tableMap[$prefix] ) ) {
continue; // bad row?
+ }
$table = self::$tableMap[$prefix];
$userField = $prefix . '_user';
$userTextField = $prefix . '_user_text';
array( $field => $items )
);
foreach ( $sres as $srow ) {
- if ( $srow->$userField > 0 )
+ if ( $srow->$userField > 0 ) {
$userIds[] = intval( $srow->$userField );
- elseif ( $srow->$userTextField != '' )
+ } elseif ( $srow->$userTextField != '' ) {
$userIPs[] = $srow->$userTextField;
+ }
}
// Add item author relations...
$log->addRelations( 'target_author_id', $userIds, $row->log_id );
} elseif ( LogEventsList::typeAction( $row, $delTypes, 'event' ) ) {
$params = LogPage::extractParams( $row->log_params );
// Param format: <item CSV> [<ofield> <nfield>]
- if ( count( $params ) < 1 ) continue; // bad row
+ if ( count( $params ) < 1 ) {
+ continue; // bad row
+ }
$items = explode( ',', $params[0] );
$log = new LogPage( $row->log_type );
// Add item relations...
array( 'log_id' => $items )
);
foreach ( $sres as $srow ) {
- if ( $srow->log_user > 0 )
+ if ( $srow->log_user > 0 ) {
$userIds[] = intval( $srow->log_user );
- elseif ( IP::isIPAddress( $srow->log_user_text ) )
+ } elseif ( IP::isIPAddress( $srow->log_user_text ) ) {
$userIPs[] = $srow->log_user_text;
+ }
}
$log->addRelations( 'target_author_id', $userIds, $row->log_id );
$log->addRelations( 'target_author_ip', $userIPs, $row->log_id );
}
}
$previousID = intval( $previousID );
- if ( $previousID != $row->rev_parent_id )
+ if ( $previousID != $row->rev_parent_id ) {
$changed++;
+ }
# Update the row...
$db->update( 'revision',
array( 'rev_parent_id' => $previousID ),
$db = $this->getDB( DB_MASTER );
if ( !$db->tableExists( 'revision' ) ) {
$this->error( "revision table does not exist", true );
- } else if ( !$db->fieldExists( 'revision', 'rev_len', __METHOD__ ) ) {
+ } elseif ( !$db->fieldExists( 'revision', 'rev_len', __METHOD__ ) ) {
$this->output( "rev_len column does not exist\n\n", true );
return false;
}
$fields = Revision::selectFields();
while ( $blockStart <= $end ) {
$this->output( "...doing rev_id from $blockStart to $blockEnd\n" );
- $res = $db->select( 'revision',
- $fields,
- array( "rev_id >= $blockStart",
- "rev_id <= $blockEnd",
- "rev_len IS NULL" ),
- __METHOD__ );
+ $res = $db->select(
+ 'revision',
+ $fields,
+ array(
+ "rev_id >= $blockStart",
+ "rev_id <= $blockEnd",
+ "rev_len IS NULL"
+ ),
+ __METHOD__
+ );
# Go through and update rev_len from these rows.
foreach ( $res as $row ) {
$rev = new Revision( $row );
$this->error( "revision table does not exist", true );
} elseif ( !$db->tableExists( 'archive' ) ) {
$this->error( "archive table does not exist", true );
- } else if ( !$db->fieldExists( 'revision', 'rev_sha1', __METHOD__ ) ) {
+ } elseif ( !$db->fieldExists( 'revision', 'rev_sha1', __METHOD__ ) ) {
$this->output( "rev_sha1 column does not exist\n\n", true );
return false;
}
array( 'ar_sha1' => Revision::base36Sha1( $text ) ),
array(
'ar_namespace' => $row->ar_namespace,
- 'ar_title' => $row->ar_title,
+ 'ar_title' => $row->ar_title,
'ar_timestamp' => $row->ar_timestamp,
- 'ar_len' => $row->ar_len // extra sanity
+ 'ar_len' => $row->ar_len // extra sanity
),
__METHOD__
);
try {
$this->mPreprocessor->preprocessToObj( strval( $content->getNativeData() ), 0 );
- }
- catch(Exception $e) {
- $this->error("Caught exception " . $e->getMessage() . " in " . $rev->getTitle()->getPrefixedText() );
+ } catch ( Exception $e ) {
+ $this->error( "Caught exception " . $e->getMessage() . " in " . $rev->getTitle()->getPrefixedText() );
}
}
}
public $hairs = array(
'[[', ']]', '{{', '{{', '}}', '}}', '{{{', '}}}',
'<', '>', '<nowiki', '<gallery', '</nowiki>', '</gallery>', '<nOwIkI>', '</NoWiKi>',
- '<!--' , '-->',
+ '<!--', '-->',
"\n==", "==\n",
'|', '=', "\n", ' ', "\t", "\x7f",
'~~', '~~~', '~~~~', 'subst:',
}
$restrictions = array();
- foreach( $t->getRestrictionTypes() as $type ) {
+ foreach ( $t->getRestrictionTypes() as $type ) {
$restrictions[$type] = $protection;
}
* @ingroup Maintenance
*/
-if( PHP_SAPI != 'cli' ) {
+if ( PHP_SAPI != 'cli' ) {
die( 1 );
}
$ip = $argv[1];
$port = $argv[2];
$url = $argv[3];
- $host = trim(`hostname`);
+ $host = trim( `hostname` );
$output = "Connecting to $ip:$port, target $url, this hostname $host\n";
# Open socket
$conds = array(
'log_namespace' => NS_FILE,
- 'log_type' => $logType,
- 'log_action' => array( 'delete', 'revision' )
+ 'log_type' => $logType,
+ 'log_action' => array( 'delete', 'revision' )
);
$start = $this->getOption( 'starttime' );
if ( $start ) {
if ( $this->hasOption( 'all' ) ) {
$this->purgeNamespace( false );
} elseif ( $this->hasOption( 'namespace' ) ) {
- $this->purgeNamespace( intval( $this->getOption( 'namespace') ) );
+ $this->purgeNamespace( intval( $this->getOption( 'namespace' ) ) );
} else {
$this->doPurge();
}
}
} else {
if ( $this->hasOption( 'verbose' ) ) {
- $this->output( implode( "\n", $urls ) . "\n" );
+ $this->output( implode( "\n", $urls ) . "\n" );
}
$u = new SquidUpdate( $urls );
$u->doUpdate();
if ( $this->hasArg( 0 ) && $this->hasArg( 1 ) ) {
# Set up the users involved
$from = $this->initialiseUser( $this->getArg( 0 ) );
- $to = $this->initialiseUser( $this->getArg( 1 ) );
+ $to = $this->initialiseUser( $this->getArg( 1 ) );
# If the target doesn't exist, and --force is not set, stop here
if ( $to->getId() || $this->hasOption( 'force' ) ) {
$this->output( "Done!\n" );
// Remove these to be safe
- if ( isset( $wgTitle ) )
+ if ( isset( $wgTitle ) ) {
unset( $wgTitle );
+ }
}
}
foreach ( $databases as $db ) {
$this->output( "Deleting message cache for {$db}... " );
$messageMemc->delete( "{$db}:messages" );
- if ( $wgEnableSidebarCache )
+ if ( $wgEnableSidebarCache ) {
$messageMemc->delete( "{$db}:sidebar" );
+ }
$this->output( "Deleted\n" );
}
}
# Fill in the rc_last_oldid field, which points to the previous edit
$sql = "SELECT rc_cur_id,rc_this_oldid,rc_timestamp FROM $recentchanges " .
- "ORDER BY rc_cur_id,rc_timestamp";
+ "ORDER BY rc_cur_id,rc_timestamp";
$res = $dbw->query( $sql, DB_MASTER );
$lastCurId = 0;
$dbw->update( 'recentchanges',
array(
'rc_last_oldid' => $lastOldId,
- 'rc_new' => $new,
- 'rc_type' => $new,
- 'rc_old_len' => $lastSize,
- 'rc_new_len' => $size,
+ 'rc_new' => $new,
+ 'rc_type' => $new,
+ 'rc_old_len' => $lastSize,
+ 'rc_new_len' => $size,
), array(
- 'rc_cur_id' => $lastCurId,
+ 'rc_cur_id' => $lastCurId,
'rc_this_oldid' => $obj->rc_this_oldid,
),
__METHOD__
$searchindex = $this->db->tableName( 'searchindex' );
$this->output( "\nRebuild the index...\n" );
$sql = "ALTER TABLE $searchindex ADD FULLTEXT si_title (si_title), " .
- "ADD FULLTEXT si_text (si_text)";
+ "ADD FULLTEXT si_text (si_text)";
$this->db->query( $sql, __METHOD__ );
}
}
$conds2 = array( 'img_name > ' . $dbw->addQuotes( $row->img_name ) );
wfWaitForSlaves();
- } while( $res->numRows() === $this->mBatchSize );
+ } while ( $res->numRows() === $this->mBatchSize );
$total = $upgraded + $leftAlone;
if ( $force ) {
$like = $this->getOption( 'metadata-contains', false );
if ( $end !== false ) {
- $conds[] = 'img_name <= ' . $dbw->addQuotes( $end ) ;
+ $conds[] = 'img_name <= ' . $dbw->addQuotes( $end );
}
if ( $mime !== false ) {
list( $major, $minor ) = File::splitMime( $mime );
$this->output( "Retrieving illegal entries from $table... " );
// SELECT DISTINCT( $field ) FROM $table LEFT JOIN page ON $field=page_id WHERE page_id IS NULL;
- $results = $dbr->select( array( $table, 'page' ),
- $field,
- array( 'page_id' => null ),
- __METHOD__,
- 'DISTINCT',
- array( 'page' => array( 'LEFT JOIN', "$field=page_id" ) )
+ $results = $dbr->select(
+ array( $table, 'page' ),
+ $field,
+ array( 'page_id' => null ),
+ __METHOD__,
+ 'DISTINCT',
+ array( 'page' => array( 'LEFT JOIN', "$field=page_id" ) )
);
$counter = 0;
$delta = microtime( true ) - $this->startTime;
$this->error( "Rendered {$this->count} pages in " . round($delta, 2) . " seconds " );
- if ($delta > 0)
+ if ( $delta > 0 ) {
$this->error( round($this->count / $delta, 2) . " pages/sec" );
+ }
$this->error( "\n" );
}
}
public function execute() {
- if ( !$this->hasArg() )
+ if ( !$this->hasArg() ) {
$this->error( "No query specified. Specify the query as a command line parameter.", true );
+ }
$query = $this->getArg();
$n = 1;
$procs = intval( $this->getOption( 'procs' ) );
if ( $procs < 1 || $procs > 1000 ) {
$this->error( "Invalid argument to --procs", true );
- }
- $fc = new ForkController( $procs );
- if ( $fc->start() != 'child' ) {
- exit( 0 );
+ } elseif ( $procs != 1 ) {
+ $fc = new ForkController( $procs );
+ if ( $fc->start() != 'child' ) {
+ exit( 0 );
+ }
}
}
$maxJobs = $this->getOption( 'maxjobs', false );
// Run the job...
$t = microtime( true );
+ wfProfileIn( __METHOD__ . '-' . get_class( $job ) );
try {
$status = $job->run();
$error = $job->getLastError();
$status = false;
$error = get_class( $e ) . ': ' . $e->getMessage();
}
+ wfProfileOut( __METHOD__ . '-' . get_class( $job ) );
$timeMs = intval( ( microtime( true ) - $t ) * 1000 );
// Mark the job as done on success or when the job cannot be retried
$group = JobQueueGroup::singleton();
if ( $this->hasOption( 'group' ) ) {
foreach ( $group->getQueueTypes() as $type ) {
- $queue = $group->get( $type );
+ $queue = $group->get( $type );
$pending = $queue->getSize();
$claimed = $queue->getAcquiredCount();
$abandoned = $queue->getAbandonedCount();
$max_length_value = $max_length_desc = 0;
foreach ( $fields as $field => $desc ) {
$max_length_value = max( $max_length_value, strlen( $stats->$field ) );
- $max_length_desc = max( $max_length_desc, strlen( $desc ) ) ;
+ $max_length_desc = max( $max_length_desc, strlen( $desc ) );
}
// Show them
$wholeLine = '';
$newPrompt = '> ';
- $prompt = $newPrompt;
+ $prompt = $newPrompt;
while ( ( $line = Maintenance::readconsole( $prompt ) ) !== false ) {
- if( !$line ) {
+ if ( !$line ) {
# User simply pressed return key
continue;
}
try{
$res = $dbw->query( $wholeLine );
$this->sqlPrintResult( $res, $dbw );
- $prompt = $newPrompt;
+ $prompt = $newPrompt;
$wholeLine = '';
- } catch (DBQueryError $e) {
+ } catch ( DBQueryError $e ) {
$doDie = ! Maintenance::posix_isatty( 0 );
$this->error( $e, $doDie );
}
$tables = $db->query( "SELECT name FROM sqlite_master WHERE type='table'", __METHOD__ );
foreach ( $tables as $table ) {
- if ( strpos( $table->name, 'sqlite_' ) === 0 ) continue;
+ if ( strpos( $table->name, 'sqlite_' ) === 0 ) {
+ continue;
+ }
$columns = $db->query( "PRAGMA table_info({$table->name})", __METHOD__ );
foreach ( $columns as $col ) {
$db->close();
return true;
}
- };
+};
'fixable' => array(),
);
- for ( $chunkStart = 1 ; $chunkStart < $maxRevId; $chunkStart += $chunkSize ) {
+ for ( $chunkStart = 1; $chunkStart < $maxRevId; $chunkStart += $chunkSize ) {
$chunkEnd = $chunkStart + $chunkSize - 1;
// print "$chunkStart of $maxRevId\n";
do {
$res = $dbw->select( 'text', array( 'old_id', 'old_flags', 'old_text' ),
"old_id>=$start", __METHOD__, array( 'ORDER BY' => 'old_id', 'LIMIT' => $chunksize, 'FOR UPDATE' ) );
- if( $res->numRows() == 0 ) {
+ if ( $res->numRows() == 0 ) {
break;
}
$last = $start;
}
$start = $last + 1; # Deletion may leave long empty stretches
$this->output( "$start...\n" );
- } while( true );
+ } while ( true );
}
/**
# Move blob objects to External Storage
$stored = $storeObj->store( $extdb, serialize( $chunk ));
if ($stored === false) {
- $this->error( "Unable to store object" );
+ $this->error( "Unable to store object" );
return false;
}
# Store External Storage URLs instead of Stub placeholders
foreach ($stubs as $stub) {
- if ( $stub === false )
+ if ( $stub === false ) {
continue;
+ }
# $stored should provide base path to a BLOB
$url = $stored . "/" . $stub->getHash();
$dbw->update( 'text',
$this->error( "Row not found", true );
}
- $flags = explode( ',', $row->old_flags );
+ $flags = explode( ',', $row->old_flags );
$text = $row->old_text;
if ( in_array( 'external', $flags ) ) {
$this->output( "External $text\n" );
*/
function dispatchToSlave( $slaveId, $args ) {
$args = (array)$args;
- $cmd = implode( ' ', $args );
+ $cmd = implode( ' ', $args );
fwrite( $this->slavePipes[$slaveId], "$cmd\n" );
}
function execute() {
global $wgVersion, $wgTitle, $wgLang, $wgAllowSchemaUpdates;
- if( !$wgAllowSchemaUpdates && !( $this->hasOption( 'force' ) || $this->hasOption( 'schema' ) || $this->hasOption( 'noschema' ) ) ) {
+ if ( !$wgAllowSchemaUpdates && !( $this->hasOption( 'force' ) || $this->hasOption( 'schema' ) || $this->hasOption( 'noschema' ) ) ) {
$this->error( "Do not run update.php on this wiki. If you're seeing this you should\n"
. "probably ask for some help in performing your schema updates or use\n"
. "the --noschema and --schema options to get an SQL file for someone\n"
}
$this->fileHandle = null;
- if( substr( $this->getOption( 'schema' ), 0, 2 ) === "--" ) {
+ if ( substr( $this->getOption( 'schema' ), 0, 2 ) === "--" ) {
$this->error( "The --schema option requires a file as an argument.\n", true );
- } else if( $this->hasOption( 'schema' ) ) {
+ } elseif ( $this->hasOption( 'schema' ) ) {
$file = $this->getOption( 'schema' );
$this->fileHandle = fopen( $file, "w" );
- if( $this->fileHandle === false ) {
+ if ( $this->fileHandle === false ) {
$err = error_get_last();
$this->error( "Problem opening the schema file for writing: $file\n\t{$err['message']}", true );
}
$db = wfGetDB( DB_MASTER );
$this->output( "Going to run database updates for " . wfWikiID() . "\n" );
- if( $db->getType() === 'sqlite' ) {
+ if ( $db->getType() === 'sqlite' ) {
$this->output( "Using SQLite file: '{$db->mDatabaseFile}'\n" );
}
$this->output( "Depending on the size of your database this may take a while!\n" );
$shared = $this->hasOption( 'doshared' );
$updates = array( 'core', 'extensions' );
- if( !$this->hasOption('schema') ) {
- if( $this->hasOption('noschema') ) {
+ if ( !$this->hasOption( 'schema' ) ) {
+ if ( $this->hasOption( 'noschema' ) ) {
$updates[] = 'noschema';
}
$updates[] = 'stats';
- if( !$this->hasOption('nopurge') ) {
+ if ( !$this->hasOption( 'nopurge' ) ) {
$updates[] = 'purge';
}
}
$updater = DatabaseUpdater::newForDb( $db, $shared, $this );
$updater->doUpdates( $updates );
- foreach( $updater->getPostDatabaseUpdateMaintenance() as $maint ) {
+ foreach ( $updater->getPostDatabaseUpdateMaintenance() as $maint ) {
$child = $this->runChild( $maint );
// LoggedUpdateMaintenance is checking the updatelog itself
}
}
- if( !$this->hasOption('nopurge') ) {
+ if ( !$this->hasOption( 'nopurge' ) ) {
$updater->purgeCache();
}
# We can safely delete the file when we're done though.
$start = file_get_contents( 'searchUpdate.pos' );
unlink( 'searchUpdate.pos' );
- } elseif( is_readable( $posFile ) ) {
+ } elseif ( is_readable( $posFile ) ) {
$start = file_get_contents( $posFile );
} else {
$start = wfTimestamp( TS_MW, time() - 86400 );
$page = $dbw->tableName( 'page' );
$sql = "SELECT rc_cur_id FROM $recentchanges
- JOIN $page ON rc_cur_id=page_id AND rc_this_oldid=page_latest
- WHERE rc_type != " . RC_LOG . " AND rc_timestamp BETWEEN '$start' AND '$end'
- ";
+ JOIN $page ON rc_cur_id=page_id AND rc_this_oldid=page_latest
+ WHERE rc_type != " . RC_LOG . " AND rc_timestamp BETWEEN '$start' AND '$end'";
$res = $dbw->query( $sql, __METHOD__ );
$this->updateSearchIndex( $maxLockTime, array( $this, 'searchIndexUpdateCallback' ), $dbw, $res );
}
if ( !$this->hasOption( 'only' ) || $this->getOption( 'only' ) == $queryPage->getName() ) {
- $this->output( sprintf( '%-30s ', $special ) );
+ $this->output( sprintf( '%-30s ', $special ) );
if ( $queryPage->isExpensive() ) {
$t1 = explode( ' ', microtime() );
# Do the query
$count = count( $dupes );
$this->out( "Found $count accounts with duplicate records on " . wfWikiID() . ".\n" );
- $this->trimmed = 0;
+ $this->trimmed = 0;
$this->reassigned = 0;
- $this->failed = 0;
+ $this->failed = 0;
foreach ( $dupes as $name ) {
$this->examine( $name, $doDelete );
}
__METHOD__ );
$firstRow = $this->db->fetchObject( $result );
- $firstId = $firstRow->user_id;
+ $firstId = $firstRow->user_id;
$this->out( "Record that will be used for '$name' is user_id=$firstId\n" );
foreach ( $result as $row ) {
public $mOldValue;
public $mNewValue;
- private $mMode, $mReady ;
+ private $mMode, $mReady;
/** Constructor. Will show usage and exit if script options are not correct */
function __construct( $opts, $args ) {
*/
private function checkOpts( $opts, $args ) {
// The three possible ways to run the script:
- $list = isset( $opts['list'] );
- $usage = isset( $opts['usage'] ) && ( count( $args ) <= 1 );
- $change = isset( $opts['old'] ) && isset( $opts['new'] ) && ( count( $args ) <= 1 ) ;
+ $list = isset( $opts['list'] );
+ $usage = isset( $opts['usage'] ) && ( count( $args ) <= 1 );
+ $change = isset( $opts['old'] ) && isset( $opts['new'] ) && ( count( $args ) <= 1 );
// We want only one of them
$isValid = ( ( $list + $usage + $change ) == 1 );
$this->mQuick = isset( $opts['nowarn'] );
$this->mQuiet = isset( $opts['quiet'] );
- $this->mDry = isset( $opts['dry'] );
+ $this->mDry = isset( $opts['dry'] );
// Set object properties, specially 'mMode' used by run()
if ( isset( $opts['list'] ) ) {
- $this->mMode = 'LISTER' ;
+ $this->mMode = 'LISTER';
} elseif ( isset( $opts['usage'] ) ) {
- $this->mMode = 'USAGER' ;
- $this->mAnOption = isset( $args[0] ) ? $args[0] : false ;
+ $this->mMode = 'USAGER';
+ $this->mAnOption = isset( $args[0] ) ? $args[0] : false;
} elseif ( isset( $opts['old'] ) && isset( $opts['new'] ) ) {
- $this->mMode = 'CHANGER' ;
- $this->mOldValue = $opts['old'] ;
- $this->mNewValue = $opts['new'] ;
+ $this->mMode = 'CHANGER';
+ $this->mOldValue = $opts['old'];
+ $this->mNewValue = $opts['new'];
$this->mAnOption = $args[0];
} else {
die( "There is a bug in the software, this should never happen\n" );
if ( !$this->mDry ) {
$user->saveSettings();
}
- if ( !$this->mQuiet ) { print " OK\n"; }
+ if ( !$this->mQuiet ) {
+ print " OK\n";
+ }
} elseif ( !$this->mQuiet ) {
print "Not changing '$username' using <{$this->mAnOption}> = '$curValue'\n";
* @file
*/
-if( !defined( 'MEDIAWIKI' ) ) {
+if ( !defined( 'MEDIAWIKI' ) ) {
die( 'Not an entry point.' );
}
),
'mediawiki.special.preferences' => array(
'scripts' => 'resources/mediawiki.special/mediawiki.special.preferences.js',
- 'styles' => 'resources/mediawiki.special/mediawiki.special.preferences.css',
+ 'styles' => 'resources/mediawiki.special/mediawiki.special.preferences.css',
),
'mediawiki.special.recentchanges' => array(
'scripts' => 'resources/mediawiki.special/mediawiki.special.recentchanges.js',
),
'position' => 'top',
),
+ 'mediawiki.special.createaccount.vform' => array(
+ 'styles' => array(
+ 'resources/mediawiki.special/mediawiki.special.vforms.css',
+ 'resources/mediawiki.special/mediawiki.special.createAccount.vform.css',
+ ),
+ 'position' => 'top',
+ ),
+ 'mediawiki.special.createaccount.vform.js' => array(
+ 'scripts' => 'resources/mediawiki.special/mediawiki.special.createAccount.vform.js',
+ 'messages' => array(
+ 'createacct-captcha',
+ 'createacct-imgcaptcha-ph'
+ ),
+ 'dependencies' => 'mediawiki.jqueryMsg',
+ 'position' => 'top',
+ ),
'mediawiki.special.javaScriptTest' => array(
'scripts' => 'resources/mediawiki.special/mediawiki.special.javaScriptTest.js',
'messages' => array_merge( Skin::getSkinNameMessages(), array(
--- /dev/null
+/* Disable the underline that Vector puts on h2 headings, and bold them. */
+.mw-ui-container h2 {
+ border: 0;
+ font-weight: bold;
+}
+
+/* shuffled CAPTCHA */
+#wpCaptchaWord {
+ margin-top: 6px;
+}
+
+.mw-createacct-captcha-container {
+ background-color: #f8f8f8;
+ border: 1px solid #c9c9c9;
+ padding: 10px;
+ text-align: center;
+}
+
+.mw-createacct-captcha-image-container {
+ background-color: #fff;
+ min-height: 95px;
+}
+
+.mw-createacct-captcha-assisted {
+ display: block;
+ margin-top: 0.5em;
+}
+
+.mw-createacct-captcha-and-reload {
+ border: 1px solid #c9c9c9;
+ display: table-cell;
+ width: 270px;
+ background-color: #FFF;
+}
+
+.mw-createacct-captcha-and-reload .confirmedit-captcha-reload {
+ display: block;
+ float: right;
+}
+
+/* Benefits column CSS to the right (if it fits) of the form. */
+.mw-ui-container #userloginForm {
+ float: left;
+}
+
+div.mw-createacct-benefits-container {
+ float: left
+}
+
+div.mw-createacct-benefits-container h2 {
+ margin-bottom: 30px;
+}
+
+div.mw-benefits-icon {
+ display: inline-block;
+ padding: 0;
+ float: left;
+ width: 80px;
+ height: 75px;
+ margin-right: 15px;
+ border: 0;
+}
+
+.mw-benefits-icon.icon-edits {
+ /* @embed */
+ background: url(images/icon-edits.png) no-repeat right;
+}
+
+.mw-benefits-icon.icon-pages {
+ /* @embed */
+ background: url(images/icon-pages.png) no-repeat right;
+}
+
+.mw-benefits-icon.icon-contributors {
+ /* @embed */
+ background: url(images/icon-contributors.png) no-repeat right;
+}
+
+/* Special font for numbers in benefits*/
+div.mw-number-text h3 {
+ top: 0;
+ margin: 0;
+ padding: 0;
+ color: #252525;
+ font-family: 'Georgia', serif;
+ font-weight: normal;
+ font-size: 2.2em;
+ line-height: 1.2;
+ text-align: center;
+}
+
+div.mw-number-text {
+ display: block;
+ font-size: 1.2em;
+ color: #444;
+ margin-top: 1em;
+ text-align: center;
+}
--- /dev/null
+/**
+ * JavaScript for Create account form (Special:UserLogin?type=signup).
+ */
+( function ( mw, $ ) {
+
+ $( document ).ready( function( $ ) {
+ var $content = $( '#mw-content-text' ),
+ $submit = $content.find( '#wpCreateaccount' ),
+ tabIndex,
+ $captchaStuff,
+ helpMsg = mw.config.get( 'wgCreateacctImgcaptchaHelp' ),
+ captchaImage;
+
+ /*
+ * CAPTCHA
+ * The CAPTCHA is in a div style="captcha" at the top of the form.
+ * If it's a FancyCaptcha, then we remove it and insert it lower down,
+ * in a customized div with just what we need (e.g. no
+ * fancycaptcha-createaccount message).
+ */
+ if ( !$submit.length) {
+ return;
+ }
+ tabIndex = $submit.prop( 'tabindex' ) - 1;
+ $captchaStuff = $content.find ( '.captcha' );
+
+ if ( $captchaStuff.length ) {
+
+ // The FancyCaptcha image has this class in the ConfirmEdit extension
+ // after 2013-04-18.
+ captchaImage = $captchaStuff.find( 'img.fancycaptcha-image' );
+ if ( captchaImage.length !== 1 ) {
+ return;
+ }
+
+ $captchaStuff.remove();
+
+ // Insert another div before the submit button.
+ $submit.closest( 'div' )
+ .before( [
+ '<div>',
+ '<label for="wpCaptchaWord">' + mw.message( 'createacct-captcha' ).escaped() + '</label>',
+ '<div class="mw-createacct-captcha-container">',
+ '<div class="mw-createacct-captcha-and-reload">',
+ '<div class="mw-createacct-captcha-image-container">',
+ '<img id="mw-createacct-captcha" alt="PLACEHOLDER">',
+ '</div>',
+ '</div>',
+ '<input id="wpCaptchaWord" name="wpCaptchaWord" type="text" placeholder="' +
+ mw.message( 'createacct-imgcaptcha-ph' ).escaped() +
+ '" tabindex="' + tabIndex + '" autocapitalize="off" autocorrect="off">',
+ '<small class="mw-createacct-captcha-assisted">' + helpMsg + '</small>',
+ '</div>',
+ '</div>'
+ ].join( '' )
+ );
+
+ // Replace the placeholder img with the img from the old CAPTCHA.
+ captchaImage.replaceAll( $content.find( '#mw-createacct-captcha' ) );
+
+ // Append CAPTCHA reload, if any.
+ $( '.mw-createacct-captcha-and-reload' ).append( $captchaStuff.find( '.confirmedit-captcha-reload' ) );
+
+ // Find the input field, add the text (if any) of the existing CAPTCHA
+ // field (although usually it's blanked out on every redisplay),
+ // and after it move over the hidden field that tells the CAPTCHA
+ // what to do.
+ $content.find( '#wpCaptchaWord' )
+ .val( $captchaStuff.find( '#wpCaptchaWord' ).val() )
+ .after( $captchaStuff.find( '#wpCaptchaId' ) );
+ }
+
+ });
+
+}( mediaWiki, jQuery ) );
/* Reposition and resize language links, which appear on a per-wiki basis */
.mw-ui-container #languagelinks {
- margin-bottom: 3em;
+ margin-bottom: 2em;
font-size: 0.8em;
}
+/* Put some space under template's header, which may contain CAPTCHA HTML.*/
+section.mw-form-header {
+ margin-bottom: 10px;
+}
+
/*
* Besides errorbox there could be warningbox, successbox, msgbox, though
* spage has never seen these in practice.
border: 1px solid #fac5c5;
background-color: #fae3e3;
text-shadow: 0 1px #fae3e3;
+ word-wrap: break-word;
+}
+
+/*
+ * Override the right margin of the form to give space in case a benefits
+ * column appears to the side.
+ *
+ */
+.mw-ui-container #userloginForm {
+ margin-right: 100px;
}
border-bottom-right-radius: 3px;
}
-/* line 12, sourcefiles/scss/components/default/_forms.scss */
+/* line 14, sourcefiles/scss/components/default/_forms.scss */
.mw-ui-vform {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 290px;
}
-/* line 17, sourcefiles/scss/components/default/_forms.scss */
+/* line 19, sourcefiles/scss/components/default/_forms.scss */
.mw-ui-vform > div {
display: block;
margin: 0 0 15px 0;
padding: 0;
width: 100%;
}
-/* line 26, sourcefiles/scss/components/default/_forms.scss */
+/* line 27, sourcefiles/scss/components/default/_forms.scss */
.mw-ui-vform > div input,
-.mw-ui-vform > div label,
.mw-ui-vform > div .mw-ui-button {
display: block;
-webkit-box-sizing: border-box;
margin: 0;
width: 100%;
}
-/* line 33, sourcefiles/scss/components/default/_forms.scss */
+/* line 34, sourcefiles/scss/components/default/_forms.scss */
.mw-ui-vform > div input {
outline: 0;
border-style: solid;
box-shadow: #4091ed 0px 0px 5px;
border-color: #4091ed;
}
-/* line 37, sourcefiles/scss/components/default/_forms.scss */
+/* line 38, sourcefiles/scss/components/default/_forms.scss */
.mw-ui-vform > div label {
+ display: block;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
font-size: 0.9em;
color: #7d7d7d;
width: auto;
.mw-ui-vform > div label * {
font-weight: normal;
}
-/* line 44, sourcefiles/scss/components/default/_forms.scss */
-.mw-ui-vform > div label.mw-ui-checkbox-label, .mw-ui-vform > div label.mw-ui-radio-label {
- margin-bottom: 0.5em;
- cursor: pointer;
- vertical-align: bottom;
- line-height: normal;
- font-weight: normal;
-}
-/* line 50, sourcefiles/scss/mixins/_forms.scss */
-.mw-ui-vform > div label.mw-ui-checkbox-label > input[type="checkbox"], .mw-ui-vform > div label.mw-ui-checkbox-label > input[type="radio"], .mw-ui-vform > div label.mw-ui-radio-label > input[type="checkbox"], .mw-ui-vform > div label.mw-ui-radio-label > input[type="radio"] {
- width: auto;
- height: auto;
- margin: 0 0.1em 0em 0;
- padding: 0;
- border-style: solid;
- border-width: 1px;
- border-color: #c9c9c9;
- cursor: pointer;
-}
-/* line 51, sourcefiles/scss/components/default/_forms.scss */
+/* line 49, sourcefiles/scss/components/default/_forms.scss */
.mw-ui-vform > div input[type="checkbox"],
.mw-ui-vform > div input[type="radio"] {
display: inline;
width: auto;
}
-/* line 66, sourcefiles/scss/components/default/_forms.scss */
+/* line 65, sourcefiles/scss/components/default/_forms.scss */
.mw-ui-input {
outline: 0;
border-style: solid;
border-color: #4091ed;
}
-/* line 71, sourcefiles/scss/components/default/_forms.scss */
-.mw-ui-block-label, .mw-ui-formlist div label {
+/* line 72, sourcefiles/scss/components/default/_forms.scss */
+.mw-ui-label {
font-size: 0.9em;
color: #7d7d7d;
}
/* line 34, sourcefiles/scss/mixins/_forms.scss */
-.mw-ui-block-label *, .mw-ui-formlist div label * {
+.mw-ui-label * {
font-weight: normal;
}
-/* line 80, sourcefiles/scss/components/default/_forms.scss */
+/* line 81, sourcefiles/scss/components/default/_forms.scss */
.mw-ui-checkbox-label, .mw-ui-radio-label {
margin-bottom: 0.5em;
cursor: pointer;
text-shadow: none;
}
-/* line 12, sourcefiles/scss/components/default/_forms.scss */
+/* line 14, sourcefiles/scss/components/default/_forms.scss */
.mw-ui-vform {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 290px;
}
-/* line 17, sourcefiles/scss/components/default/_forms.scss */
+/* line 19, sourcefiles/scss/components/default/_forms.scss */
.mw-ui-vform > div {
display: block;
margin: 0 0 15px 0;
padding: 0;
width: 100%;
}
-/* line 26, sourcefiles/scss/components/default/_forms.scss */
+/* line 27, sourcefiles/scss/components/default/_forms.scss */
.mw-ui-vform > div input,
-.mw-ui-vform > div label,
.mw-ui-vform > div .mw-ui-button {
display: block;
-webkit-box-sizing: border-box;
margin: 0;
width: 100%;
}
-/* line 33, sourcefiles/scss/components/default/_forms.scss */
+/* line 34, sourcefiles/scss/components/default/_forms.scss */
.mw-ui-vform > div input {
outline: 0;
border-style: solid;
box-shadow: #4091ed 0px 0px 5px;
border-color: #4091ed;
}
-/* line 37, sourcefiles/scss/components/default/_forms.scss */
+/* line 38, sourcefiles/scss/components/default/_forms.scss */
.mw-ui-vform > div label {
+ display: block;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
font-size: 0.9em;
color: #7d7d7d;
width: auto;
.mw-ui-vform > div label * {
font-weight: normal;
}
-/* line 44, sourcefiles/scss/components/default/_forms.scss */
-.mw-ui-vform > div label.mw-ui-checkbox-label, .mw-ui-vform > div label.mw-ui-radio-label {
- margin-bottom: 0.5em;
- cursor: pointer;
- vertical-align: bottom;
- line-height: normal;
- font-weight: normal;
-}
-/* line 50, sourcefiles/scss/mixins/_forms.scss */
-.mw-ui-vform > div label.mw-ui-checkbox-label > input[type="checkbox"], .mw-ui-vform > div label.mw-ui-checkbox-label > input[type="radio"], .mw-ui-vform > div label.mw-ui-radio-label > input[type="checkbox"], .mw-ui-vform > div label.mw-ui-radio-label > input[type="radio"] {
- width: auto;
- height: auto;
- margin: 0 0.1em 0em 0;
- padding: 0;
- border-style: solid;
- border-width: 1px;
- border-color: #c9c9c9;
- cursor: pointer;
-}
-/* line 51, sourcefiles/scss/components/default/_forms.scss */
+/* line 49, sourcefiles/scss/components/default/_forms.scss */
.mw-ui-vform > div input[type="checkbox"],
.mw-ui-vform > div input[type="radio"] {
display: inline;
width: auto;
}
-/* line 66, sourcefiles/scss/components/default/_forms.scss */
+/* line 65, sourcefiles/scss/components/default/_forms.scss */
.mw-ui-input {
outline: 0;
border-style: solid;
border-color: #4091ed;
}
-/* line 71, sourcefiles/scss/components/default/_forms.scss */
-.mw-ui-block-label, .mw-ui-formlist div label {
+/* line 72, sourcefiles/scss/components/default/_forms.scss */
+.mw-ui-label {
font-size: 0.9em;
color: #7d7d7d;
}
/* line 34, sourcefiles/scss/mixins/_forms.scss */
-.mw-ui-block-label *, .mw-ui-formlist div label * {
+.mw-ui-label * {
font-weight: normal;
}
-/* line 80, sourcefiles/scss/components/default/_forms.scss */
+/* line 81, sourcefiles/scss/components/default/_forms.scss */
.mw-ui-checkbox-label, .mw-ui-radio-label {
margin-bottom: 0.5em;
cursor: pointer;
// --------------------------------------------------------------------------
// The FancyCaptcha image CAPTCHA used on WMF wikis drives the width of the
-// 'vform' stacked div design, the form can't be narrower than this.
+// 'VForm' design, the form can't be narrower than this.
$captchaContainerWidth: 290px;
$defaultFormWidth: $captchaContainerWidth;
+// Style a compact vertical stacked form ("VForm") and the elements in divs
+// within it.
.mw-ui-vform {
@include box-sizing(border-box);
padding: 0;
width: 100%;
- // MW currently doesn't use the type attribute everywhere on inputs
+ // MW currently doesn't use the type attribute everywhere on inputs.
input,
- label,
.mw-ui-button {
display: block;
@include box-sizing(border-box);
}
label {
+ display: block;
+ @include box-sizing(border-box);
@include agora-label-styling;
-
width: auto;
margin: 0 0 0.2em 0;
padding: 0;
-
- &.mw-ui-checkbox-label, &.mw-ui-radio-label {
- @include agora-inline-label-styling;
- }
}
- // Override the above styling just for checkboxes and radio inputs
+ // Override input styling just for checkboxes and radio inputs.
input[type="checkbox"],
input[type="radio"] {
display: inline;
// Elements
// --------------------------------------------------------------------------
-// Apply mw-ui-input to fields individually to style them
-// You don't need to use this if <input> is within a Agora form container
+// Apply mw-ui-input to individual input fields to style them.
+// You generally don't need to use this class if <input> is within an Agora
+// form container such as mw-ui-vform
.mw-ui-input {
@include agora-field-styling; // mixins/_forms.scss
}
-// Default label styling is mw-ui-block-label
-.mw-ui-block-label, .mw-ui-formlist div label {
+// Apply mw-ui-label to individual elements to style them.
+// You generally don't need to use this class if <label> is within an Agora
+// form container such as mw-ui-vform
+.mw-ui-label {
@include agora-label-styling; // mixins/_forms.scss
}
-// Checkbox and radio button label alignment hack
+// Nesting an input checkbox or radio button inside a label with this class
+// improves alignment, e.g.
// <label class="mw-ui-checkbox-label">
-// <input type="checkbox" />Label
+// <input type="checkbox">The label text
// </label>
-
.mw-ui-checkbox-label, .mw-ui-radio-label {
@include agora-inline-label-styling;
}
return;
}
- // Placeholder text for search box
- $searchInput
- .attr( 'placeholder', mw.msg( 'searchsuggest-search' ) )
- .placeholder();
-
// Special suggestions functionality for skin-provided search box
$searchInput.suggestions( {
result: {
/**
* @property {RegExp}
* Regex to match accesskey tooltips.
+ *
+ * Should match:
+ *
+ * - "ctrl-option-"
+ * - "alt-shift-"
+ * - "ctrl-alt-"
+ * - "ctrl-"
+ *
+ * The accesskey is matched in group $6.
*/
- tooltipAccessKeyRegexp: /\[(ctrl-)?(alt-)?(shift-)?(esc-)?(.)\]$/,
+ tooltipAccessKeyRegexp: /\[(ctrl-)?(option-)?(alt-)?(shift-)?(esc-)?(.)\]$/,
/**
* Add the appropriate prefix to the accesskey shown in the tooltip.
}
$nodes.attr( 'title', function ( i, val ) {
- if ( val && util.tooltipAccessKeyRegexp.exec( val ) ) {
+ if ( val && util.tooltipAccessKeyRegexp.test( val ) ) {
return val.replace( util.tooltipAccessKeyRegexp,
- '[' + util.tooltipAccessKeyPrefix + '$5]' );
+ '[' + util.tooltipAccessKeyPrefix + '$6]' );
}
return val;
} );
if ( id ) {
$item.attr( 'id', id );
}
- if ( accesskey ) {
- $link.attr( 'accesskey', accesskey );
- tooltip += ' [' + accesskey + ']';
+
+ if ( tooltip ) {
+ // Trim any existing accesskey hint and the trailing space
+ tooltip = $.trim( tooltip.replace( util.tooltipAccessKeyRegexp, '' ) );
+ if ( accesskey ) {
+ tooltip += ' [' + accesskey + ']';
+ }
$link.attr( 'title', tooltip );
+ if ( accesskey ) {
+ util.updateTooltipAccessKeys( $link );
+ }
}
- if ( accesskey && tooltip ) {
- util.updateTooltipAccessKeys( $link );
+
+ if ( accesskey ) {
+ $link.attr( 'accesskey', accesskey );
}
// Where to put our node ?
// - nextnode is a DOM element (was the only option before MW 1.17, in wikibits.js)
if ( nextnode && nextnode.parentNode === $ul[0] ) {
- $(nextnode).before( $item );
+ $( nextnode ).before( $item );
// - nextnode is a CSS selector for jQuery
} else if ( typeof nextnode === 'string' && $ul.find( nextnode ).length !== 0 ) {
* @ingroup Skins
*/
-if( !defined( 'MEDIAWIKI' ) ) {
+if ( !defined( 'MEDIAWIKI' ) ) {
die( -1 );
}
$search = $this->getSkin()->getRequest()->getText( 'search' );
$action = $this->data['searchaction'];
$s = "<form id=\"searchform-" . htmlspecialchars($which) . "\" method=\"get\" class=\"inline\" action=\"$action\">";
- if( $which == 'footer' ) {
+ if ( $which == 'footer' ) {
$s .= wfMessage( 'qbfind' )->text() . ": ";
}
$s .= "<input type='text' class=\"mw-searchInput\" name=\"search\" size=\"14\" value=\""
. htmlspecialchars( substr( $search, 0, 256 ) ) . "\" />"
- . ($which == 'footer' ? " " : "<br />")
+ . ( $which == 'footer' ? " " : "<br />" )
. "<input type='submit' class=\"searchButton\" name=\"go\" value=\"" . wfMessage( 'searcharticle' )->escaped() . "\" />";
- if( $wgUseTwoButtonsSearchForm ) {
+ if ( $wgUseTwoButtonsSearchForm ) {
$s .= " <input type='submit' class=\"searchButton\" name=\"fulltext\" value=\"" . wfMessage( 'searchbutton' )->escaped() . "\" />\n";
} else {
$s .= '<div><a href="' . $action . '" rel="search">' . wfMessage( 'powersearch-legend' )->escaped() . "</a></div>\n";
* @ingroup Skins
*/
-if( !defined( 'MEDIAWIKI' ) )
+if ( !defined( 'MEDIAWIKI' ) ) {
die( -1 );
+}
/**
* Inherit main code from SkinTemplate, set the CSS and template filter.
*/
function setupSkinUserCss( OutputPage $out ) {
parent::setupSkinUserCss( $out );
- $out->addModuleStyles ('skins.modern');
+ $out->addModuleStyles( 'skins.modern' );
}
}
<div id="mw_header"><h1 id="firstHeading" lang="<?php
$this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
$this->html( 'pageLanguage' );
- ?>"><span dir="auto"><?php $this->html('title') ?></span></h1></div>
+ ?>"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1></div>
<div id="mw_main">
<div id="mw_contentwrapper">
for the margins -->
<div id="mw_contentholder" class="mw-body">
<div class='mw-topboxes'>
- <div id="mw-js-message" style="display:none;"<?php $this->html('userlangattributes')?>></div>
- <div class="mw-topbox" id="siteSub"><?php $this->msg('tagline') ?></div>
- <?php if($this->data['newtalk'] ) {
- ?><div class="usermessage mw-topbox"><?php $this->html('newtalk') ?></div>
+ <div id="mw-js-message" style="display:none;"<?php $this->html( 'userlangattributes' )?>></div>
+ <div class="mw-topbox" id="siteSub"><?php $this->msg( 'tagline' ) ?></div>
+ <?php if ( $this->data['newtalk'] ) {
+ ?><div class="usermessage mw-topbox"><?php $this->html( 'newtalk' ) ?></div>
<?php } ?>
- <?php if($this->data['sitenotice']) {
- ?><div class="mw-topbox" id="siteNotice"><?php $this->html('sitenotice') ?></div>
+ <?php if ( $this->data['sitenotice'] ) {
+ ?><div class="mw-topbox" id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div>
<?php } ?>
</div>
- <div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div>
+ <div id="contentSub"<?php $this->html( 'userlangattributes' ) ?>><?php $this->html( 'subtitle' ) ?></div>
- <?php if($this->data['undelete']) { ?><div id="contentSub2"><?php $this->html('undelete') ?></div><?php } ?>
- <?php if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#mw_portlets"><?php $this->msg('jumptonavigation') ?></a><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?>
+ <?php if ( $this->data['undelete'] ) { ?><div id="contentSub2"><?php $this->html( 'undelete' ) ?></div><?php } ?>
+ <?php if ( $this->data['showjumplinks'] ) { ?><div id="jump-to-nav"><?php $this->msg( 'jumpto' ) ?> <a href="#mw_portlets"><?php $this->msg( 'jumptonavigation' ) ?></a><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg( 'jumptosearch' ) ?></a></div><?php } ?>
- <?php $this->html('bodytext') ?>
+ <?php $this->html( 'bodytext' ) ?>
<div class='mw_clear'></div>
- <?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
- <?php $this->html ('dataAfterContent') ?>
+ <?php if ( $this->data['catlinks'] ) { $this->html( 'catlinks' ); } ?>
+ <?php $this->html( 'dataAfterContent' ) ?>
</div><!-- mw_contentholder -->
</div><!-- mw_content -->
</div><!-- mw_contentwrapper -->
- <div id="mw_portlets"<?php $this->html("userlangattributes") ?>>
+ <div id="mw_portlets"<?php $this->html( "userlangattributes" ) ?>>
<h2><?php $this->msg( 'navigation-heading' ) ?></h2>
<!-- portlets -->
<!-- personal portlet -->
<div class="portlet" id="p-personal" role="navigation">
- <h3><?php $this->msg('personaltools') ?></h3>
+ <h3><?php $this->msg( 'personaltools' ) ?></h3>
<div class="pBody">
<ul>
-<?php foreach($this->getPersonalTools() as $key => $item) { ?>
- <?php echo $this->makeListItem($key, $item); ?>
+<?php foreach ( $this->getPersonalTools() as $key => $item ) { ?>
+ <?php echo $this->makeListItem( $key, $item ); ?>
<?php } ?>
</ul>
<!-- footer -->
- <div id="footer" role="contentinfo"<?php $this->html('userlangattributes') ?>>
+ <div id="footer" role="contentinfo"<?php $this->html( 'userlangattributes' ) ?>>
<ul id="f-list">
<?php
- foreach( $this->getFooterLinks("flat") as $aLink ) {
- if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
+ foreach ( $this->getFooterLinks( "flat" ) as $aLink ) {
+ if ( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
?> <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li>
<?php }
}
?>
</ul>
<?php
- foreach ( $this->getFooterIcons("nocopyright") as $blockName => $footerIcons ) { ?>
- <div id="mw_<?php echo htmlspecialchars($blockName); ?>">
+ foreach ( $this->getFooterIcons( "nocopyright" ) as $blockName => $footerIcons ) { ?>
+ <div id="mw_<?php echo htmlspecialchars( $blockName ); ?>">
<?php
foreach ( $footerIcons as $icon ) { ?>
<?php echo $this->getSkin()->makeFooterIcon( $icon, 'withoutImage' ); ?>
* @ingroup Skins
*/
-if( !defined( 'MEDIAWIKI' ) )
+if ( !defined( 'MEDIAWIKI' ) ) {
die( -1 );
+}
/**
* Inherit main code from SkinTemplate, set the CSS and template filter.
$out->addModuleStyles( 'skins.monobook' );
// Ugh. Can't do this properly because $wgHandheldStyle may be a URL
- if( $wgHandheldStyle ) {
+ if ( $wgHandheldStyle ) {
// Currently in testing... try 'chick/main.css'
$out->addStyle( $wgHandheldStyle, 'handheld' );
}
?><div id="globalWrapper">
<div id="column-content"><div id="content" class="mw-body-primary" role="main">
<a id="top"></a>
- <?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
+ <?php if ( $this->data['sitenotice'] ) { ?><div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div><?php } ?>
<h1 id="firstHeading" class="firstHeading" lang="<?php
$this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
$this->html( 'pageLanguage' );
- ?>"><span dir="auto"><?php $this->html('title') ?></span></h1>
+ ?>"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1>
<div id="bodyContent" class="mw-body">
- <div id="siteSub"><?php $this->msg('tagline') ?></div>
- <div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div>
-<?php if($this->data['undelete']) { ?>
- <div id="contentSub2"><?php $this->html('undelete') ?></div>
-<?php } ?><?php if($this->data['newtalk'] ) { ?>
- <div class="usermessage"><?php $this->html('newtalk') ?></div>
-<?php } ?><?php if($this->data['showjumplinks']) { ?>
- <div id="jump-to-nav" class="mw-jump"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div>
+ <div id="siteSub"><?php $this->msg( 'tagline' ) ?></div>
+ <div id="contentSub"<?php $this->html( 'userlangattributes' ) ?>><?php $this->html( 'subtitle' ) ?></div>
+<?php if ( $this->data['undelete'] ) { ?>
+ <div id="contentSub2"><?php $this->html( 'undelete' ) ?></div>
+<?php } ?><?php if ( $this->data['newtalk'] ) { ?>
+ <div class="usermessage"><?php $this->html( 'newtalk' ) ?></div>
+<?php } ?><?php if ( $this->data['showjumplinks'] ) { ?>
+ <div id="jump-to-nav" class="mw-jump"><?php $this->msg( 'jumpto' ) ?> <a href="#column-one"><?php $this->msg( 'jumptonavigation' ) ?></a><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg( 'jumptosearch' ) ?></a></div>
<?php } ?>
<!-- start content -->
-<?php $this->html('bodytext') ?>
- <?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
+<?php $this->html( 'bodytext' ) ?>
+ <?php if ( $this->data['catlinks'] ) { $this->html( 'catlinks' ); } ?>
<!-- end content -->
- <?php if($this->data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?>
+ <?php if ( $this->data['dataAfterContent'] ) { $this->html( 'dataAfterContent' ); } ?>
<div class="visualClear"></div>
</div>
</div></div>
-<div id="column-one"<?php $this->html('userlangattributes') ?>>
+<div id="column-one"<?php $this->html( 'userlangattributes' ) ?>>
<h2><?php $this->msg( 'navigation-heading' ) ?></h2>
<?php $this->cactions(); ?>
<div class="portlet" id="p-personal" role="navigation">
- <h3><?php $this->msg('personaltools') ?></h3>
+ <h3><?php $this->msg( 'personaltools' ) ?></h3>
<div class="pBody">
- <ul<?php $this->html('userlangattributes') ?>>
-<?php foreach($this->getPersonalTools() as $key => $item) { ?>
- <?php echo $this->makeListItem($key, $item); ?>
+ <ul<?php $this->html( 'userlangattributes' ) ?>>
+<?php foreach ( $this->getPersonalTools() as $key => $item ) { ?>
+ <?php echo $this->makeListItem( $key, $item ); ?>
<?php } ?>
</ul>
echo Html::element( 'a', array(
'href' => $this->data['nav_urls']['mainpage']['href'],
'style' => "background-image: url({$this->data['logopath']});" )
- + Linker::tooltipAndAccesskeyAttribs('p-logo') ); ?>
+ + Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) ); ?>
</div>
<?php
$validFooterLinks = $this->getFooterLinks( "flat" ); // Additional footer links
if ( count( $validFooterIcons ) + count( $validFooterLinks ) > 0 ) { ?>
-<div id="footer" role="contentinfo"<?php $this->html('userlangattributes') ?>>
+<div id="footer" role="contentinfo"<?php $this->html( 'userlangattributes' ) ?>>
<?php
$footerEnd = '</div>';
} else {
if ( count( $validFooterLinks ) > 0 ) {
?> <ul id="f-list">
<?php
- foreach( $validFooterLinks as $aLink ) { ?>
+ foreach ( $validFooterLinks as $aLink ) { ?>
<li id="<?php echo $aLink ?>"><?php $this->html($aLink) ?></li>
<?php
}
* @param $sidebar array
*/
protected function renderPortals( $sidebar ) {
- if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
- if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
- if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
+ if ( !isset( $sidebar['SEARCH'] ) ) {
+ $sidebar['SEARCH'] = true;
+ }
+ if ( !isset( $sidebar['TOOLBOX'] ) ) {
+ $sidebar['TOOLBOX'] = true;
+ }
+ if ( !isset( $sidebar['LANGUAGES'] ) ) {
+ $sidebar['LANGUAGES'] = true;
+ }
- foreach( $sidebar as $boxName => $content ) {
- if ( $content === false )
+ foreach ( $sidebar as $boxName => $content ) {
+ if ( $content === false ) {
continue;
+ }
if ( $boxName == 'SEARCH' ) {
$this->searchBox();
<?php echo $this->makeSearchInput( array( "id" => "searchInput" ) ); ?>
<?php echo $this->makeSearchButton( "go", array( "id" => "searchGoButton", "class" => "searchButton" ) );
- if ( $wgUseTwoButtonsSearchForm ): ?> 
+ if ( $wgUseTwoButtonsSearchForm ) { ?> 
<?php echo $this->makeSearchButton( "fulltext", array( "id" => "mw-searchButton", "class" => "searchButton" ) );
- else: ?>
+ } else { ?>
<div><a href="<?php $this->text( 'searchaction' ) ?>" rel="search"><?php $this->msg( 'powersearch-legend' ) ?></a></div><?php
- endif; ?>
+ } ?>
</form>
</div>
<h3><?php $this->msg( 'views' ) ?></h3>
<div class="pBody">
<ul><?php
- foreach( $this->data['content_actions'] as $key => $tab ) {
+ foreach ( $this->data['content_actions'] as $key => $tab ) {
echo '
' . $this->makeListItem( $key, $tab );
} ?>
/*************************************************************************************************/
function languageBox() {
- if( $this->data['language_urls'] ) {
+ if ( $this->data['language_urls'] ) {
?>
<div id="p-lang" class="portlet" role="navigation">
<h3<?php $this->html( 'userlangattributes' ) ?>><?php $this->msg( 'otherlanguages' ) ?></h3>
<div class="pBody">
<ul>
-<?php foreach( $this->data['language_urls'] as $key => $langlink ) { ?>
+<?php foreach ( $this->data['language_urls'] as $key => $langlink ) { ?>
<?php echo $this->makeListItem( $key, $langlink ); ?>
<?php } ?>
<div class='pBody'>
<?php if ( is_array( $cont ) ) { ?>
<ul>
-<?php foreach( $cont as $key => $val ) { ?>
+<?php foreach ( $cont as $key => $val ) { ?>
<?php echo $this->makeListItem( $key, $val ); ?>
<?php } ?>
* @ingroup Skins
*/
-if( !defined( 'MEDIAWIKI' ) ) {
+if ( !defined( 'MEDIAWIKI' ) ) {
die( -1 );
}
<div id="content" class="mw-body" role="main">
<a id="top"></a>
<div id="mw-js-message" style="display:none;"<?php $this->html( 'userlangattributes' ) ?>></div>
- <?php if ( $this->data['sitenotice'] ): ?>
+ <?php if ( $this->data['sitenotice'] ) { ?>
<!-- sitenotice -->
<div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div>
<!-- /sitenotice -->
- <?php endif; ?>
+ <?php } ?>
<!-- firstHeading -->
<h1 id="firstHeading" class="firstHeading" lang="<?php
$this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
<!-- /firstHeading -->
<!-- bodyContent -->
<div id="bodyContent">
- <?php if ( $this->data['isarticle'] ): ?>
+ <?php if ( $this->data['isarticle'] ) { ?>
<!-- tagline -->
<div id="siteSub"><?php $this->msg( 'tagline' ) ?></div>
<!-- /tagline -->
- <?php endif; ?>
+ <?php } ?>
<!-- subtitle -->
<div id="contentSub"<?php $this->html( 'userlangattributes' ) ?>><?php $this->html( 'subtitle' ) ?></div>
<!-- /subtitle -->
- <?php if ( $this->data['undelete'] ): ?>
+ <?php if ( $this->data['undelete'] ) { ?>
<!-- undelete -->
<div id="contentSub2"><?php $this->html( 'undelete' ) ?></div>
<!-- /undelete -->
- <?php endif; ?>
- <?php if( $this->data['newtalk'] ): ?>
+ <?php } ?>
+ <?php if ( $this->data['newtalk'] ) { ?>
<!-- newtalk -->
<div class="usermessage"><?php $this->html( 'newtalk' ) ?></div>
<!-- /newtalk -->
- <?php endif; ?>
- <?php if ( $this->data['showjumplinks'] ): ?>
+ <?php } ?>
+ <?php if ( $this->data['showjumplinks'] ) { ?>
<!-- jumpto -->
<div id="jump-to-nav" class="mw-jump">
<?php $this->msg( 'jumpto' ) ?>
<a href="#p-search"><?php $this->msg( 'jumptosearch' ) ?></a>
</div>
<!-- /jumpto -->
- <?php endif; ?>
+ <?php } ?>
<!-- bodycontent -->
<?php $this->html( 'bodycontent' ) ?>
<!-- /bodycontent -->
- <?php if ( $this->data['printfooter'] ): ?>
+ <?php if ( $this->data['printfooter'] ) { ?>
<!-- printfooter -->
<div class="printfooter">
<?php $this->html( 'printfooter' ); ?>
</div>
<!-- /printfooter -->
- <?php endif; ?>
- <?php if ( $this->data['catlinks'] ): ?>
+ <?php } ?>
+ <?php if ( $this->data['catlinks'] ) { ?>
<!-- catlinks -->
<?php $this->html( 'catlinks' ); ?>
<!-- /catlinks -->
- <?php endif; ?>
- <?php if ( $this->data['dataAfterContent'] ): ?>
+ <?php } ?>
+ <?php if ( $this->data['dataAfterContent'] ) { ?>
<!-- dataAfterContent -->
<?php $this->html( 'dataAfterContent' ); ?>
<!-- /dataAfterContent -->
- <?php endif; ?>
+ <?php } ?>
<div class="visualClear"></div>
<!-- debughtml -->
<?php $this->html( 'debughtml' ); ?>
</div>
<!-- footer -->
<div id="footer" role="contentinfo"<?php $this->html( 'userlangattributes' ) ?>>
- <?php foreach( $this->getFooterLinks() as $category => $links ): ?>
+ <?php foreach ( $this->getFooterLinks() as $category => $links ) { ?>
<ul id="footer-<?php echo $category ?>">
- <?php foreach( $links as $link ): ?>
+ <?php foreach ( $links as $link ) { ?>
<li id="footer-<?php echo $category ?>-<?php echo $link ?>"><?php $this->html( $link ) ?></li>
- <?php endforeach; ?>
+ <?php } ?>
</ul>
- <?php endforeach; ?>
- <?php $footericons = $this->getFooterIcons("icononly");
- if ( count( $footericons ) > 0 ): ?>
+ <?php } ?>
+ <?php $footericons = $this->getFooterIcons( "icononly" );
+ if ( count( $footericons ) > 0 ) { ?>
<ul id="footer-icons" class="noprint">
-<?php foreach ( $footericons as $blockName => $footerIcons ): ?>
+<?php foreach ( $footericons as $blockName => $footerIcons ) { ?>
<li id="footer-<?php echo htmlspecialchars( $blockName ); ?>ico">
-<?php foreach ( $footerIcons as $icon ): ?>
+<?php foreach ( $footerIcons as $icon ) { ?>
<?php echo $this->getSkin()->makeFooterIcon( $icon ); ?>
-<?php endforeach; ?>
+<?php } ?>
</li>
-<?php endforeach; ?>
+<?php } ?>
</ul>
- <?php endif; ?>
+ <?php } ?>
<div style="clear:both"></div>
</div>
<!-- /footer -->
}
// Render portals
foreach ( $portals as $name => $content ) {
- if ( $content === false )
+ if ( $content === false ) {
continue;
+ }
echo "\n<!-- {$name} -->\n";
switch( $name ) {
<h3<?php $this->html( 'userlangattributes' ) ?>><?php $msgObj = wfMessage( $msg ); echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $msg ); ?></h3>
<div class="body">
<?php
- if ( is_array( $content ) ): ?>
+ if ( is_array( $content ) ) { ?>
<ul>
<?php
- foreach( $content as $key => $val ): ?>
+ foreach ( $content as $key => $val ) { ?>
<?php echo $this->makeListItem( $key, $val ); ?>
<?php
- endforeach;
+ }
if ( $hook !== null ) {
wfRunHooks( $hook, array( &$this, true ) );
}
?>
</ul>
<?php
- else: ?>
+ } else { ?>
<?php echo $content; /* Allow raw HTML block to be defined by extensions */ ?>
<?php
- endif; ?>
+ } ?>
</div>
</div>
<?php
// Render elements
foreach ( $elements as $name => $element ) {
echo "\n<!-- {$name} -->\n";
- switch ( $element ) {
+ switch( $element ) {
case 'NAMESPACES':
?>
-<div id="p-namespaces" role="navigation" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+<div id="p-namespaces" role="navigation" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>">
<h3><?php $this->msg( 'namespaces' ) ?></h3>
<ul<?php $this->html( 'userlangattributes' ) ?>>
- <?php foreach ( $this->data['namespace_urls'] as $link ): ?>
+ <?php foreach ( $this->data['namespace_urls'] as $link ) { ?>
<li <?php echo $link['attributes'] ?>><span><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></span></li>
- <?php endforeach; ?>
+ <?php } ?>
</ul>
</div>
<?php
break;
case 'VARIANTS':
?>
-<div id="p-variants" role="navigation" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+<div id="p-variants" role="navigation" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>">
<h3 id="mw-vector-current-variant">
- <?php foreach ( $this->data['variant_urls'] as $link ): ?>
- <?php if ( stripos( $link['attributes'], 'selected' ) !== false ): ?>
+ <?php foreach ( $this->data['variant_urls'] as $link ) { ?>
+ <?php if ( stripos( $link['attributes'], 'selected' ) !== false ) { ?>
<?php echo htmlspecialchars( $link['text'] ) ?>
- <?php endif; ?>
- <?php endforeach; ?>
+ <?php } ?>
+ <?php } ?>
</h3>
<h3><span><?php $this->msg( 'variants' ) ?></span><a href="#"></a></h3>
<div class="menu">
<ul>
- <?php foreach ( $this->data['variant_urls'] as $link ): ?>
+ <?php foreach ( $this->data['variant_urls'] as $link ) { ?>
<li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" lang="<?php echo htmlspecialchars( $link['lang'] ) ?>" hreflang="<?php echo htmlspecialchars( $link['hreflang'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
- <?php endforeach; ?>
+ <?php } ?>
</ul>
</div>
</div>
case 'VIEWS':
?>
<div id="p-views" role="navigation" class="vectorTabs<?php if ( count( $this->data['view_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>">
- <h3><?php $this->msg('views') ?></h3>
- <ul<?php $this->html('userlangattributes') ?>>
- <?php foreach ( $this->data['view_urls'] as $link ): ?>
+ <h3><?php $this->msg( 'views' ) ?></h3>
+ <ul<?php $this->html( 'userlangattributes' ) ?>>
+ <?php foreach ( $this->data['view_urls'] as $link ) { ?>
<li<?php echo $link['attributes'] ?>><span><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php
// $link['text'] can be undefined - bug 27764
if ( array_key_exists( 'text', $link ) ) {
- echo array_key_exists( 'img', $link ) ? '<img src="' . $link['img'] . '" alt="' . $link['text'] . '" />' : htmlspecialchars( $link['text'] );
+ echo array_key_exists( 'img', $link ) ? '<img src="' . $link['img'] . '" alt="' . $link['text'] . '" />' : htmlspecialchars( $link['text'] );
}
?></a></span></li>
- <?php endforeach; ?>
+ <?php } ?>
</ul>
</div>
<?php
break;
case 'ACTIONS':
?>
-<div id="p-cactions" role="navigation" class="vectorMenu<?php if ( count( $this->data['action_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+<div id="p-cactions" role="navigation" class="vectorMenu<?php if ( count( $this->data['action_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>">
<h3><span><?php $this->msg( 'actions' ) ?></span><a href="#"></a></h3>
<div class="menu">
<ul<?php $this->html( 'userlangattributes' ) ?>>
- <?php foreach ( $this->data['action_urls'] as $link ): ?>
+ <?php foreach ( $this->data['action_urls'] as $link ) { ?>
<li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
- <?php endforeach; ?>
+ <?php } ?>
</ul>
</div>
</div>
break;
case 'PERSONAL':
?>
-<div id="p-personal" role="navigation" class="<?php if ( count( $this->data['personal_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+<div id="p-personal" role="navigation" class="<?php if ( count( $this->data['personal_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>">
<h3><?php $this->msg( 'personaltools' ) ?></h3>
<ul<?php $this->html( 'userlangattributes' ) ?>>
<?php
<div id="p-search" role="search">
<h3<?php $this->html( 'userlangattributes' ) ?>><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h3>
<form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
- <?php if ( $wgVectorUseSimpleSearch && $this->getSkin()->getUser()->getOption( 'vector-simplesearch' ) ): ?>
+ <?php if ( $wgVectorUseSimpleSearch && $this->getSkin()->getUser()->getOption( 'vector-simplesearch' ) ) { ?>
<div id="simpleSearch">
- <?php if ( $this->data['rtl'] ): ?>
+ <?php if ( $this->data['rtl'] ) { ?>
<?php echo $this->makeSearchButton( 'image', array( 'id' => 'searchButton', 'src' => $this->getSkin()->getSkinStylePath( 'images/search-rtl.png' ), 'width' => '12', 'height' => '13' ) ); ?>
- <?php endif; ?>
+ <?php } ?>
<?php echo $this->makeSearchInput( array( 'id' => 'searchInput', 'type' => 'text' ) ); ?>
- <?php if ( !$this->data['rtl'] ): ?>
+ <?php if ( !$this->data['rtl'] ) { ?>
<?php echo $this->makeSearchButton( 'image', array( 'id' => 'searchButton', 'src' => $this->getSkin()->getSkinStylePath( 'images/search-ltr.png' ), 'width' => '12', 'height' => '13' ) ); ?>
- <?php endif; ?>
- <?php else: ?>
+ <?php } ?>
+ <?php } else { ?>
<div>
<?php echo $this->makeSearchInput( array( 'id' => 'searchInput' ) ); ?>
<?php echo $this->makeSearchButton( 'go', array( 'id' => 'searchGoButton', 'class' => 'searchButton' ) ); ?>
<?php echo $this->makeSearchButton( 'fulltext', array( 'id' => 'mw-searchButton', 'class' => 'searchButton' ) ); ?>
- <?php endif; ?>
+ <?php } ?>
<input type='hidden' name="title" value="<?php $this->text( 'searchtitle' ) ?>"/>
</div>
</form>
#p-personal li.active a:hover {
background-color: transparent;
}
-/* the icon in front of the user name, single quotes
-in bg url to hide it from iemac */
+/* The icon in front of the username / login link */
li#pt-userpage,
li#pt-anonuserpage,
li#pt-login {
/* @embed */
background: url(user.gif) top left no-repeat;
padding-left: 20px;
- text-transform: none;
}
#p-personal ul {
text-transform: lowercase;
}
+/* Don't lowercase username or IP addresses (IPv6) */
+li#pt-userpage,
+li#pt-anonuserpage {
+ text-transform: none;
+}
#p-personal li.active {
font-weight: bold;
}
/* @embed */
background-image: linear-gradient(transparent, transparent), url(images/user-icon.svg);
padding-left: 15px !important;
- text-transform: none;
}
.redirectText {
'DbTestPreviewer' => "$testDir/testHelpers.inc",
'DbTestRecorder' => "$testDir/testHelpers.inc",
'DelayedParserTest' => "$testDir/testHelpers.inc",
+ 'ParserTestResult' => "$testDir/parser/ParserTestResult.php",
'TestFileIterator' => "$testDir/testHelpers.inc",
'TestRecorder' => "$testDir/testHelpers.inc",
//db
'ORMTableTest' => "$testDir/phpunit/includes/db/ORMTableTest.php",
+ 'DatabaseTestHelper' => "$testDir/phpunit/includes/db/DatabaseTestHelper.php",
# tests/phpunit/includes/api
'ApiFormatTestBase' => "$testDir/phpunit/includes/api/format/ApiFormatTestBase.php",
--- /dev/null
+<?php
+/**
+ * @copyright Copyright © 2013, Antoine Musso
+ * @copyright Copyright © 2013, Wikimedia Foundation Inc.
+ * @license GNU GPL v2
+ *
+ * @file
+ */
+
+/**
+ * Represent the result of a parser test.
+ *
+ * @since 1.22
+ */
+class ParserTestResult {
+ /**
+ * Description of the parser test.
+ *
+ * This is usually the text used to describe a parser test in the .txt
+ * files. It is initialized on a construction and you most probably
+ * never want to change it.
+ */
+ public $description;
+ /** Text that was expected */
+ public $expected;
+ /** Actual text rendered */
+ public $actual;
+
+ /**
+ * @param $description string A short text describing the parser test
+ * usually the text in the parser test .txt file. The description
+ * is later available using the property $description.
+ */
+ public function __construct( $description ) {
+ $this->description = $description;
+ }
+
+ /** Whether the test passed */
+ public function isSuccess() {
+ return ($this->expected === $this->actual);
+ }
+}
}
$this->teardownGlobals();
- return $this->showTestResult( $desc, $result, $out );
+
+ $testResult = new ParserTestResult( $desc );
+ $testResult->expected = $result;
+ $testResult->actual = $out;
+
+ return $this->showTestResult( $testResult );
}
/**
- *
+ * Refactored in 1.22 to use ParserTestResult
*/
- function showTestResult( $desc, $result, $out ) {
- if ( $result === $out ) {
- $this->showSuccess( $desc );
+ function showTestResult( ParserTestResult $testResult ) {
+ if ( $testResult->isSuccess() ) {
+ $this->showSuccess( $testResult );
return true;
} else {
- $this->showFailure( $desc, $result, $out );
+ $this->showFailure( $testResult );
return false;
}
}
/**
* Print a happy success message.
*
- * @param $desc String: the test name
+ * Refactored in 1.22 to use ParserTestResult
+ *
+ * @param $testResult ParserTestResult
* @return Boolean
*/
- protected function showSuccess( $desc ) {
+ protected function showSuccess( ParserTestResult $testResult ) {
if ( $this->showProgress ) {
print $this->term->color( '1;32' ) . 'PASSED' . $this->term->reset() . "\n";
}
* Print a failure message and provide some explanatory output
* about what went wrong if so configured.
*
- * @param $desc String: the test name
- * @param $result String: expected HTML output
- * @param $html String: actual HTML output
+ * Refactored in 1.22 to use ParserTestResult
+ *
+ * @param $testResult ParserTestResult
* @return Boolean
*/
- protected function showFailure( $desc, $result, $html ) {
+ protected function showFailure( ParserTestResult $testResult ) {
if ( $this->showFailure ) {
if ( !$this->showProgress ) {
# In quiet mode we didn't show the 'Testing' message before the
# test, in case it succeeded. Show it now:
- $this->showTesting( $desc );
+ $this->showTesting( $testResult->description );
}
print $this->term->color( '31' ) . 'FAILED!' . $this->term->reset() . "\n";
if ( $this->showOutput ) {
- print "--- Expected ---\n$result\n--- Actual ---\n$html\n";
+ print "--- Expected ---\n{$testResult->expected}\n";
+ print "--- Actual ---\n{$testResult->actual}\n";
}
if ( $this->showDiffs ) {
- print $this->quickDiff( $result, $html );
- if ( !$this->wellFormed( $html ) ) {
+ print $this->quickDiff( $testResult->expected, $testResult->actual );
+ if ( !$this->wellFormed( $testResult->actual ) ) {
print "XML error: $this->mXmlError\n";
}
}
* {{BASEPAGENAME}}
* {{SUBPAGENAME}}
* {{SUBPAGENAMEE}}
+* {{ROOTPAGENAME}}
+* {{ROOTPAGENAMEE}}
* {{BASEPAGENAME}}
* {{BASEPAGENAMEE}}
* {{TALKPAGENAME}}
</li><li> Parser_test
</li><li> Parser test
</li><li> Parser_test
+</li><li> Parser test
+</li><li> Parser_test
</li><li> Talk:Parser test
</li><li> Talk:Parser_test
</li><li> Parser test
"\$wgContLang->getCode() (" . $wgContLang->getCode() . ")" );
}
+ // HACK: Call getLanguage() so the real $wgContLang is cached as the user language
+ // rather than our fake one. This is to avoid breaking other, unrelated tests.
+ RequestContext::getMain()->getLanguage();
+
$langCode = 'en'; # For mainpage to be 'Main Page'
$langObj = Language::factory( $langCode );
$this->assertEquals( 'WfGetCallerTest::testN', self::intermediateFunction( 2, 0 ) );
$this->assertEquals( 'WfGetCallerTest::intermediateFunction', self::intermediateFunction( 1, 0 ) );
- for ( $i = 0; $i < 10; $i++ )
+ for ( $i = 0; $i < 10; $i++ ) {
$this->assertEquals( 'WfGetCallerTest::intermediateFunction', self::intermediateFunction( $i + 1, $i ) );
+ }
}
}
class HooksTest extends MediaWikiTestCase {
- public function testOldStyleHooks() {
- $foo = 'Foo';
- $bar = 'Bar';
-
- $i = new NothingClass();
-
+ function setUp() {
global $wgHooks;
-
- $wgHooks['MediaWikiHooksTest001'][] = array( $i, 'someNonStatic' );
-
- wfRunHooks( 'MediaWikiHooksTest001', array( &$foo, &$bar ) );
-
- $this->assertEquals( 'fOO', $foo, 'Standard method' );
- $foo = 'Foo';
-
- $wgHooks['MediaWikiHooksTest001'][] = $i;
-
- wfRunHooks( 'MediaWikiHooksTest001', array( &$foo, &$bar ) );
-
- $this->assertEquals( 'foo', $foo, 'onEventName style' );
- $foo = 'Foo';
-
- $wgHooks['MediaWikiHooksTest001'][] = array( $i, 'someNonStaticWithData', 'baz' );
-
- wfRunHooks( 'MediaWikiHooksTest001', array( &$foo, &$bar ) );
-
- $this->assertEquals( 'baz', $foo, 'Data included' );
- $foo = 'Foo';
-
- $wgHooks['MediaWikiHooksTest001'][] = array( $i, 'someStatic' );
-
- wfRunHooks( 'MediaWikiHooksTest001', array( &$foo, &$bar ) );
-
- $this->assertEquals( 'bah', $foo, 'Standard static method' );
- //$foo = 'Foo';
-
+ parent::setUp();
+ Hooks::clear( 'MediaWikiHooksTest001' );
unset( $wgHooks['MediaWikiHooksTest001'] );
-
}
- public function testNewStyleHooks() {
- $foo = 'Foo';
- $bar = 'Bar';
-
+ public static function provideHooks() {
$i = new NothingClass();
+ return array(
+ array( 'Object and method', array( $i, 'someNonStatic' ), 'changed-nonstatic', 'changed-nonstatic' ),
+ array( 'Object and no method', array( $i ), 'changed-onevent', 'original' ),
+ array( 'Object and method with data', array( $i, 'someNonStaticWithData', 'data' ), 'data', 'original' ),
+ array( 'Object and static method', array( $i, 'someStatic' ), 'changed-static', 'original' ),
+ array( 'Class::method static call', array( 'NothingClass::someStatic' ), 'changed-static', 'original' ),
+ array( 'Global function', array( 'NothingFunction' ), 'changed-func', 'original' ),
+ array( 'Global function with data', array( 'NothingFunctionData', 'data' ), 'data', 'original' ),
+ array( 'Closure', array( function( &$foo, $bar ) {
+ $foo = 'changed-closure';
+ return true;
+ } ), 'changed-closure', 'original' ),
+ array( 'Closure with data', array( function( $data, &$foo, $bar ) {
+ $foo = $data;
+ return true;
+ }, 'data' ), 'data', 'original' )
+ );
+ }
- Hooks::register( 'MediaWikiHooksTest001', array( $i, 'someNonStatic' ) );
-
- Hooks::run( 'MediaWikiHooksTest001', array( &$foo, &$bar ) );
-
- $this->assertEquals( 'fOO', $foo, 'Standard method' );
- $foo = 'Foo';
-
- Hooks::register( 'MediaWikiHooksTest001', $i );
-
- Hooks::run( 'MediaWikiHooksTest001', array( &$foo, &$bar ) );
-
- $this->assertEquals( 'foo', $foo, 'onEventName style' );
- $foo = 'Foo';
-
- Hooks::register( 'MediaWikiHooksTest001', array( $i, 'someNonStaticWithData', 'baz' ) );
+ /**
+ * @dataProvider provideHooks
+ */
+ public function testOldStyleHooks( $msg, array $hook, $expectedFoo, $expectedBar ) {
+ global $wgHooks;
+ $foo = $bar = 'original';
- Hooks::run( 'MediaWikiHooksTest001', array( &$foo, &$bar ) );
+ $wgHooks['MediaWikiHooksTest001'][] = $hook;
+ wfRunHooks( 'MediaWikiHooksTest001', array( &$foo, &$bar ) );
- $this->assertEquals( 'baz', $foo, 'Data included' );
- $foo = 'Foo';
+ $this->assertSame( $expectedFoo, $foo, $msg );
+ $this->assertSame( $expectedBar, $bar, $msg );
+ }
- Hooks::register( 'MediaWikiHooksTest001', array( $i, 'someStatic' ) );
+ /**
+ * @dataProvider provideHooks
+ */
+ public function testNewStyleHooks( $msg, $hook, $expectedFoo, $expectedBar ) {
+ $foo = $bar = 'original';
+ Hooks::register( 'MediaWikiHooksTest001', $hook );
Hooks::run( 'MediaWikiHooksTest001', array( &$foo, &$bar ) );
- $this->assertEquals( 'bah', $foo, 'Standard static method' );
- $foo = 'Foo';
-
- Hooks::clear( 'MediaWikiHooksTest001' );
+ $this->assertSame( $expectedFoo, $foo, $msg );
+ $this->assertSame( $expectedBar, $bar, $msg );
}
public function testNewStyleHookInteraction() {
$a = new NothingClass();
$b = new NothingClass();
- // make sure to start with a clean slate
- Hooks::clear( 'MediaWikiHooksTest001' );
- unset( $wgHooks['MediaWikiHooksTest001'] );
-
$wgHooks['MediaWikiHooksTest001'][] = $a;
$this->assertTrue( Hooks::isRegistered( 'MediaWikiHooksTest001' ), 'Hook registered via $wgHooks should be noticed by Hooks::isRegistered' );
Hooks::run( 'MediaWikiHooksTest001', array( &$foo, &$bar ) );
$this->assertEquals( 1, $a->calls, 'Hooks::run() should run hooks registered via wgHooks as well as Hooks::register' );
$this->assertEquals( 1, $b->calls, 'Hooks::run() should run hooks registered via wgHooks as well as Hooks::register' );
+ }
- // clean up
- Hooks::clear( 'MediaWikiHooksTest001' );
- unset( $wgHooks['MediaWikiHooksTest001'] );
+ /**
+ * @expectedException MWException
+ */
+ public function testUncallableFunction() {
+ Hooks::register( 'MediaWikiHooksTest001', 'ThisFunctionDoesntExist' );
+ Hooks::run( 'MediaWikiHooksTest001', array() );
+ }
+
+ public function testFalseReturn() {
+ Hooks::register( 'MediaWikiHooksTest001', function( &$foo ) { return false; } );
+ Hooks::register( 'MediaWikiHooksTest001', function( &$foo ) { $foo = 'test'; return true; } );
+ $foo = 'original';
+ Hooks::run( 'MediaWikiHooksTest001', array( &$foo ) );
+ $this->assertSame( 'original', $foo, 'Hooks continued processing after a false return.' );
}
+
+ /**
+ * @expectedException FatalError
+ */
+ public function testFatalError() {
+ Hooks::register( 'MediaWikiHooksTest001', function() { return 'test'; } );
+ Hooks::run( 'MediaWikiHooksTest001', array() );
+ }
+}
+
+function NothingFunction( &$foo, &$bar ) {
+ $foo = 'changed-func';
+ return true;
+}
+
+function NothingFunctionData( $data, &$foo, &$bar ) {
+ $foo = $data;
+ return true;
}
class NothingClass {
public $calls = 0;
public static function someStatic( &$foo, &$bar ) {
- $foo = 'bah';
+ $foo = 'changed-static';
return true;
}
public function someNonStatic( &$foo, &$bar ) {
$this->calls++;
- $foo = 'fOO';
- $bar = 'bAR';
+ $foo = 'changed-nonstatic';
+ $bar = 'changed-nonstatic';
return true;
}
public function onMediaWikiHooksTest001( &$foo, &$bar ) {
$this->calls++;
- $foo = 'foo';
+ $foo = 'changed-onevent';
return true;
}
- public function someNonStaticWithData( $foo, &$bar ) {
+ public function someNonStaticWithData( $data, &$foo, &$bar ) {
$this->calls++;
- $bar = $foo;
+ $foo = $data;
return true;
}
}
$timestamp->getTimestamp( 98 );
}
- /**
- * Test human readable timestamp format.
- */
- function testHumanOutput() {
- $timestamp = new MWTimestamp( time() - 3600 );
- $this->assertEquals( "1 hour ago", $timestamp->getHumanTimestamp()->inLanguage( 'en' )->text() );
- $timestamp = new MWTimestamp( time() - 5184000 );
- $this->assertEquals( "2 months ago", $timestamp->getHumanTimestamp()->inLanguage( 'en' )->text() );
- $timestamp = new MWTimestamp( time() - 31536000 );
- $this->assertEquals( "1 year ago", $timestamp->getHumanTimestamp()->inLanguage( 'en' )->text() );
- }
-
/**
* Returns a list of valid timestamps in the format:
* array( type, timestamp_of_type, timestamp_in_MW )
array( TS_UNIX, '-62135596801', '00001231235959' )
);
}
+
+ /**
+ * @test
+ * @dataProvider provideHumanTimestampTests
+ */
+ public function testHumanTimestamp(
+ $tsTime, // The timestamp to format
+ $currentTime, // The time to consider "now"
+ $timeCorrection, // The time offset to use
+ $dateFormat, // The date preference to use
+ $expectedOutput, // The expected output
+ $desc // Description
+ ) {
+ $user = $this->getMock( 'User' );
+ $user->expects( $this->any() )
+ ->method( 'getOption' )
+ ->with( 'timecorrection' )
+ ->will( $this->returnValue( $timeCorrection ) );
+
+ $user->expects( $this->any() )
+ ->method( 'getDatePreference' )
+ ->will( $this->returnValue( $dateFormat ) );
+
+ $tsTime = new MWTimestamp( $tsTime );
+ $currentTime = new MWTimestamp( $currentTime );
+
+ $this->assertEquals(
+ $expectedOutput,
+ $tsTime->getHumanTimestamp( $currentTime, $user ),
+ $desc
+ );
+ }
+
+ public static function provideHumanTimestampTests() {
+ return array(
+ array(
+ '20111231170000',
+ '20120101000000',
+ 'Offset|0',
+ 'mdy',
+ 'Yesterday at 17:00',
+ '"Yesterday" across years',
+ ),
+ array(
+ '20120717190900',
+ '20120717190929',
+ 'Offset|0',
+ 'mdy',
+ 'just now',
+ '"Just now"',
+ ),
+ array(
+ '20120717190900',
+ '20120717191530',
+ 'Offset|0',
+ 'mdy',
+ '6 minutes ago',
+ 'X minutes ago',
+ ),
+ array(
+ '20121006173100',
+ '20121006173200',
+ 'Offset|0',
+ 'mdy',
+ '1 minute ago',
+ '"1 minute ago"',
+ ),
+ array(
+ '20120617190900',
+ '20120717190900',
+ 'Offset|0',
+ 'mdy',
+ 'June 17',
+ 'Another month'
+ ),
+ array(
+ '19910130151500',
+ '20120716193700',
+ 'Offset|0',
+ 'mdy',
+ '15:15, January 30, 1991',
+ 'Different year',
+ ),
+ array(
+ '20120101050000',
+ '20120101080000',
+ 'Offset|-360',
+ 'mdy',
+ 'Yesterday at 23:00',
+ '"Yesterday" across years with time correction',
+ ),
+ array(
+ '20120714184300',
+ '20120716184300',
+ 'Offset|-420',
+ 'mdy',
+ 'Saturday at 11:43',
+ 'Recent weekday with time correction',
+ ),
+ array(
+ '20120714184300',
+ '20120715040000',
+ 'Offset|-420',
+ 'mdy',
+ '11:43',
+ 'Today at another time with time correction',
+ ),
+ array(
+ '20120617190900',
+ '20120717190900',
+ 'Offset|0',
+ 'dmy',
+ '17 June',
+ 'Another month with dmy'
+ ),
+ array(
+ '20120617190900',
+ '20120717190900',
+ 'Offset|0',
+ 'ISO 8601',
+ '06-17',
+ 'Another month with ISO-8601'
+ ),
+ array(
+ '19910130151500',
+ '20120716193700',
+ 'Offset|0',
+ 'ISO 8601',
+ '1991-01-30T15:15:00',
+ 'Different year with ISO-8601',
+ ),
+ );
+ }
}
global $wgLocalTZoffset;
$wgLocalTZoffset = -60;
$this->user->mBlockedby = $this->user->getName();
- $this->user->mBlock = new Block( '127.0.8.1', 0, 1, 'no reason given', $now, 0, 10 );
+ $this->user->mBlock = new Block( '127.0.8.1', 0, $this->user->getId(),
+ 'no reason given', $now, 0, 10 );
$this->assertEquals( array( array( 'blockedtext',
'[[User:Useruser|Useruser]]', 'no reason given', '127.0.0.1',
'Useruser', null, '23:00, 31 December 1969', '127.0.8.1',
/**
* Test the abstract database layer
- * Using Mysql for the sql at the moment TODO
- *
- * @group Database
+ * This is a non DBMS depending test.
*/
class DatabaseSQLTest extends MediaWikiTestCase {
+ private $database;
+
protected function setUp() {
parent::setUp();
- // TODO support other DBMS or find another way to do it
- if ( $this->db->getType() !== 'mysql' ) {
- $this->markTestSkipped( 'No mysql database' );
- }
+ $this->database = new DatabaseTestHelper( __CLASS__ );
+ }
+
+ protected function assertLastSql( $sqlText ) {
+ $this->assertEquals(
+ $this->database->getLastSqls(),
+ $sqlText
+ );
}
/**
- * @dataProvider provideSelectSQLText
+ * @dataProvider provideSelect
*/
- function testSelectSQLText( $sql, $sqlText ) {
- $this->assertEquals( trim( $this->db->selectSQLText(
- isset( $sql['tables'] ) ? $sql['tables'] : array(),
- isset( $sql['fields'] ) ? $sql['fields'] : array(),
+ function testSelect( $sql, $sqlText ) {
+ $this->database->select(
+ $sql['tables'],
+ $sql['fields'],
isset( $sql['conds'] ) ? $sql['conds'] : array(),
__METHOD__,
isset( $sql['options'] ) ? $sql['options'] : array(),
isset( $sql['join_conds'] ) ? $sql['join_conds'] : array()
- ) ), $sqlText );
+ );
+ $this->assertLastSql( $sqlText );
}
- public static function provideSelectSQLText() {
+ public static function provideSelect() {
return array(
array(
array(
'fields' => array( 'field', 'alias' => 'field2' ),
'conds' => array( 'alias' => 'text' ),
),
- "SELECT field,field2 AS alias " .
- "FROM `unittest_table` " .
+ "SELECT field,field2 AS alias " .
+ "FROM table " .
"WHERE alias = 'text'"
),
array(
'conds' => array( 'alias' => 'text' ),
'options' => array( 'LIMIT' => 1, 'ORDER BY' => 'field' ),
),
- "SELECT field,field2 AS alias " .
- "FROM `unittest_table` " .
- "WHERE alias = 'text' " .
+ "SELECT field,field2 AS alias " .
+ "FROM table " .
+ "WHERE alias = 'text' " .
"ORDER BY field " .
"LIMIT 1"
),
'LEFT JOIN', 'tid = t2.id'
) ),
),
- "SELECT tid,field,field2 AS alias,t2.id " .
- "FROM `unittest_table` LEFT JOIN `unittest_table2` `t2` ON ((tid = t2.id)) " .
- "WHERE alias = 'text' " .
+ "SELECT tid,field,field2 AS alias,t2.id " .
+ "FROM table LEFT JOIN table2 t2 ON ((tid = t2.id)) " .
+ "WHERE alias = 'text' " .
"ORDER BY field " .
"LIMIT 1"
),
'LEFT JOIN', 'tid = t2.id'
) ),
),
- "SELECT tid,field,field2 AS alias,t2.id " .
- "FROM `unittest_table` LEFT JOIN `unittest_table2` `t2` ON ((tid = t2.id)) " .
- "WHERE alias = 'text' " .
+ "SELECT tid,field,field2 AS alias,t2.id " .
+ "FROM table LEFT JOIN table2 t2 ON ((tid = t2.id)) " .
+ "WHERE alias = 'text' " .
"GROUP BY field HAVING COUNT(*) > 1 " .
"LIMIT 1"
),
'LEFT JOIN', 'tid = t2.id'
) ),
),
- "SELECT tid,field,field2 AS alias,t2.id " .
- "FROM `unittest_table` LEFT JOIN `unittest_table2` `t2` ON ((tid = t2.id)) " .
- "WHERE alias = 'text' " .
+ "SELECT tid,field,field2 AS alias,t2.id " .
+ "FROM table LEFT JOIN table2 t2 ON ((tid = t2.id)) " .
+ "WHERE alias = 'text' " .
"GROUP BY field,field2 HAVING (COUNT(*) > 1) AND field = '1' " .
"LIMIT 1"
),
+ array(
+ array(
+ 'tables' => array( 'table' ),
+ 'fields' => array( 'alias' => 'field' ),
+ 'conds' => array( 'alias' => array( 1, 2, 3, 4 ) ),
+ ),
+ "SELECT field AS alias " .
+ "FROM table " .
+ "WHERE alias IN ('1','2','3','4')"
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider provideUpdate
+ */
+ function testUpdate( $sql, $sqlText ) {
+ $this->database->update(
+ $sql['table'],
+ $sql['values'],
+ $sql['conds'],
+ __METHOD__,
+ isset( $sql['options'] ) ? $sql['options'] : array()
+ );
+ $this->assertLastSql( $sqlText );
+ }
+
+ public static function provideUpdate() {
+ return array(
+ array(
+ array(
+ 'table' => 'table',
+ 'values' => array( 'field' => 'text', 'field2' => 'text2' ),
+ 'conds' => array( 'alias' => 'text' ),
+ ),
+ "UPDATE table " .
+ "SET field = 'text'" .
+ ",field2 = 'text2' " .
+ "WHERE alias = 'text'"
+ ),
+ array(
+ array(
+ 'table' => 'table',
+ 'values' => array( 'field = other', 'field2' => 'text2' ),
+ 'conds' => array( 'id' => '1' ),
+ ),
+ "UPDATE table " .
+ "SET field = other" .
+ ",field2 = 'text2' " .
+ "WHERE id = '1'"
+ ),
+ array(
+ array(
+ 'table' => 'table',
+ 'values' => array( 'field = other', 'field2' => 'text2' ),
+ 'conds' => '*',
+ ),
+ "UPDATE table " .
+ "SET field = other" .
+ ",field2 = 'text2'"
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider provideDelete
+ */
+ function testDelete( $sql, $sqlText ) {
+ $this->database->delete(
+ $sql['table'],
+ $sql['conds'],
+ __METHOD__
+ );
+ $this->assertLastSql( $sqlText );
+ }
+
+ public static function provideDelete() {
+ return array(
+ array(
+ array(
+ 'table' => 'table',
+ 'conds' => array( 'alias' => 'text' ),
+ ),
+ "DELETE FROM table " .
+ "WHERE alias = 'text'"
+ ),
+ array(
+ array(
+ 'table' => 'table',
+ 'conds' => '*',
+ ),
+ "DELETE FROM table"
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider provideDeleteJoin
+ */
+ function testDeleteJoin( $sql, $sqlText ) {
+ $this->database->deleteJoin(
+ $sql['delTable'],
+ $sql['joinTable'],
+ $sql['delVar'],
+ $sql['joinVar'],
+ $sql['conds'],
+ __METHOD__
+ );
+ $this->assertLastSql( $sqlText );
+ }
+
+ public static function provideDeleteJoin() {
+ return array(
+ array(
+ array(
+ 'delTable' => 'table',
+ 'joinTable' => 'table_join',
+ 'delVar' => 'field',
+ 'joinVar' => 'field_join',
+ 'conds' => array( 'alias' => 'text' ),
+ ),
+ "DELETE FROM table " .
+ "WHERE field IN (" .
+ "SELECT field_join FROM table_join WHERE alias = 'text'" .
+ ")"
+ ),
+ array(
+ array(
+ 'delTable' => 'table',
+ 'joinTable' => 'table_join',
+ 'delVar' => 'field',
+ 'joinVar' => 'field_join',
+ 'conds' => '*',
+ ),
+ "DELETE FROM table " .
+ "WHERE field IN (" .
+ "SELECT field_join FROM table_join " .
+ ")"
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider provideInsert
+ */
+ function testInsert( $sql, $sqlText ) {
+ $this->database->insert(
+ $sql['table'],
+ $sql['rows'],
+ __METHOD__,
+ isset( $sql['options'] ) ? $sql['options'] : array()
+ );
+ $this->assertLastSql( $sqlText );
+ }
+
+ public static function provideInsert() {
+ return array(
+ array(
+ array(
+ 'table' => 'table',
+ 'rows' => array( 'field' => 'text', 'field2' => 2 ),
+ ),
+ "INSERT INTO table " .
+ "(field,field2) " .
+ "VALUES ('text','2')"
+ ),
+ array(
+ array(
+ 'table' => 'table',
+ 'rows' => array( 'field' => 'text', 'field2' => 2 ),
+ 'options' => 'IGNORE',
+ ),
+ "INSERT IGNORE INTO table " .
+ "(field,field2) " .
+ "VALUES ('text','2')"
+ ),
+ array(
+ array(
+ 'table' => 'table',
+ 'rows' => array(
+ array( 'field' => 'text', 'field2' => 2 ),
+ array( 'field' => 'multi', 'field2' => 3 ),
+ ),
+ 'options' => 'IGNORE',
+ ),
+ "INSERT IGNORE INTO table " .
+ "(field,field2) " .
+ "VALUES " .
+ "('text','2')," .
+ "('multi','3')"
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider provideInsertSelect
+ */
+ function testInsertSelect( $sql, $sqlText ) {
+ $this->database->insertSelect(
+ $sql['destTable'],
+ $sql['srcTable'],
+ $sql['varMap'],
+ $sql['conds'],
+ __METHOD__,
+ isset( $sql['insertOptions'] ) ? $sql['insertOptions'] : array(),
+ isset( $sql['selectOptions'] ) ? $sql['selectOptions'] : array()
+ );
+ $this->assertLastSql( $sqlText );
+ }
+
+ public static function provideInsertSelect() {
+ return array(
+ array(
+ array(
+ 'destTable' => 'insert_table',
+ 'srcTable' => 'select_table',
+ 'varMap' => array( 'field_insert' => 'field_select', 'field' => 'field2' ),
+ 'conds' => '*',
+ ),
+ "INSERT INTO insert_table " .
+ "(field_insert,field) " .
+ "SELECT field_select,field2 " .
+ "FROM select_table"
+ ),
+ array(
+ array(
+ 'destTable' => 'insert_table',
+ 'srcTable' => 'select_table',
+ 'varMap' => array( 'field_insert' => 'field_select', 'field' => 'field2' ),
+ 'conds' => array( 'field' => 2 ),
+ ),
+ "INSERT INTO insert_table " .
+ "(field_insert,field) " .
+ "SELECT field_select,field2 " .
+ "FROM select_table " .
+ "WHERE field = '2'"
+ ),
+ array(
+ array(
+ 'destTable' => 'insert_table',
+ 'srcTable' => 'select_table',
+ 'varMap' => array( 'field_insert' => 'field_select', 'field' => 'field2' ),
+ 'conds' => array( 'field' => 2 ),
+ 'insertOptions' => 'IGNORE',
+ 'selectOptions' => array( 'ORDER BY' => 'field' ),
+ ),
+ "INSERT IGNORE INTO insert_table " .
+ "(field_insert,field) " .
+ "SELECT field_select,field2 " .
+ "FROM select_table " .
+ "WHERE field = '2' " .
+ "ORDER BY field"
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider provideReplace
+ */
+ function testReplace( $sql, $sqlText ) {
+ $this->database->replace(
+ $sql['table'],
+ $sql['uniqueIndexes'],
+ $sql['rows'],
+ __METHOD__
+ );
+ $this->assertLastSql( $sqlText );
+ }
+
+ public static function provideReplace() {
+ return array(
+ array(
+ array(
+ 'table' => 'replace_table',
+ 'uniqueIndexes' => array( 'field' ),
+ 'rows' => array( 'field' => 'text', 'field2' => 'text2' ),
+ ),
+ "DELETE FROM replace_table " .
+ "WHERE ( field='text' ); " .
+ "INSERT INTO replace_table " .
+ "(field,field2) " .
+ "VALUES ('text','text2')"
+ ),
+ array(
+ array(
+ 'table' => 'module_deps',
+ 'uniqueIndexes' => array( array( 'md_module', 'md_skin' ) ),
+ 'rows' => array(
+ 'md_module' => 'module',
+ 'md_skin' => 'skin',
+ 'md_deps' => 'deps',
+ ),
+ ),
+ "DELETE FROM module_deps " .
+ "WHERE ( md_module='module' AND md_skin='skin' ); " .
+ "INSERT INTO module_deps " .
+ "(md_module,md_skin,md_deps) " .
+ "VALUES ('module','skin','deps')"
+ ),
+ array(
+ array(
+ 'table' => 'module_deps',
+ 'uniqueIndexes' => array( array( 'md_module', 'md_skin' ) ),
+ 'rows' => array(
+ array(
+ 'md_module' => 'module',
+ 'md_skin' => 'skin',
+ 'md_deps' => 'deps',
+ ), array(
+ 'md_module' => 'module2',
+ 'md_skin' => 'skin2',
+ 'md_deps' => 'deps2',
+ ),
+ ),
+ ),
+ "DELETE FROM module_deps " .
+ "WHERE ( md_module='module' AND md_skin='skin' ); " .
+ "INSERT INTO module_deps " .
+ "(md_module,md_skin,md_deps) " .
+ "VALUES ('module','skin','deps'); " .
+ "DELETE FROM module_deps " .
+ "WHERE ( md_module='module2' AND md_skin='skin2' ); " .
+ "INSERT INTO module_deps " .
+ "(md_module,md_skin,md_deps) " .
+ "VALUES ('module2','skin2','deps2')"
+ ),
+ array(
+ array(
+ 'table' => 'module_deps',
+ 'uniqueIndexes' => array( 'md_module', 'md_skin' ),
+ 'rows' => array(
+ array(
+ 'md_module' => 'module',
+ 'md_skin' => 'skin',
+ 'md_deps' => 'deps',
+ ), array(
+ 'md_module' => 'module2',
+ 'md_skin' => 'skin2',
+ 'md_deps' => 'deps2',
+ ),
+ ),
+ ),
+ "DELETE FROM module_deps " .
+ "WHERE ( md_module='module' ) OR ( md_skin='skin' ); " .
+ "INSERT INTO module_deps " .
+ "(md_module,md_skin,md_deps) " .
+ "VALUES ('module','skin','deps'); " .
+ "DELETE FROM module_deps " .
+ "WHERE ( md_module='module2' ) OR ( md_skin='skin2' ); " .
+ "INSERT INTO module_deps " .
+ "(md_module,md_skin,md_deps) " .
+ "VALUES ('module2','skin2','deps2')"
+ ),
+ array(
+ array(
+ 'table' => 'module_deps',
+ 'uniqueIndexes' => array(),
+ 'rows' => array(
+ 'md_module' => 'module',
+ 'md_skin' => 'skin',
+ 'md_deps' => 'deps',
+ ),
+ ),
+ "INSERT INTO module_deps " .
+ "(md_module,md_skin,md_deps) " .
+ "VALUES ('module','skin','deps')"
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider provideNativeReplace
+ */
+ function testNativeReplace( $sql, $sqlText ) {
+ $this->database->nativeReplace(
+ $sql['table'],
+ $sql['rows'],
+ __METHOD__
+ );
+ $this->assertLastSql( $sqlText );
+ }
+
+ public static function provideNativeReplace() {
+ return array(
+ array(
+ array(
+ 'table' => 'replace_table',
+ 'rows' => array( 'field' => 'text', 'field2' => 'text2' ),
+ ),
+ "REPLACE INTO replace_table " .
+ "(field,field2) " .
+ "VALUES ('text','text2')"
+ ),
);
}
* @dataProvider provideConditional
*/
function testConditional( $sql, $sqlText ) {
- $this->assertEquals( trim( $this->db->conditional(
+ $this->assertEquals( trim( $this->database->conditional(
$sql['conds'],
$sql['true'],
$sql['false']
),
);
}
+
+ /**
+ * @dataProvider provideBuildConcat
+ */
+ function testBuildConcat( $stringList, $sqlText ) {
+ $this->assertEquals( trim( $this->database->buildConcat(
+ $stringList
+ ) ), $sqlText );
+ }
+
+ public static function provideBuildConcat() {
+ return array(
+ array(
+ array( 'field', 'field2' ),
+ "CONCAT(field,field2)"
+ ),
+ array(
+ array( "'test'", 'field2' ),
+ "CONCAT('test',field2)"
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider provideBuildLike
+ */
+ function testBuildLike( $array, $sqlText ) {
+ $this->assertEquals( trim( $this->database->buildLike(
+ $array
+ ) ), $sqlText );
+ }
+
+ public static function provideBuildLike() {
+ return array(
+ array(
+ 'text',
+ "LIKE 'text'"
+ ),
+ array(
+ array( 'text', new LikeMatch( '%' ) ),
+ "LIKE 'text%'"
+ ),
+ array(
+ array( 'text', new LikeMatch( '%' ), 'text2' ),
+ "LIKE 'text%text2'"
+ ),
+ array(
+ array( 'text', new LikeMatch( '_' ) ),
+ "LIKE 'text_'"
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider provideUnionQueries
+ */
+ function testUnionQueries( $sql, $sqlText ) {
+ $this->assertEquals( trim( $this->database->unionQueries(
+ $sql['sqls'],
+ $sql['all']
+ ) ), $sqlText );
+ }
+
+ public static function provideUnionQueries() {
+ return array(
+ array(
+ array(
+ 'sqls' => array( 'RAW SQL', 'RAW2SQL' ),
+ 'all' => true,
+ ),
+ "(RAW SQL) UNION ALL (RAW2SQL)"
+ ),
+ array(
+ array(
+ 'sqls' => array( 'RAW SQL', 'RAW2SQL' ),
+ 'all' => false,
+ ),
+ "(RAW SQL) UNION (RAW2SQL)"
+ ),
+ array(
+ array(
+ 'sqls' => array( 'RAW SQL', 'RAW2SQL', 'RAW3SQL' ),
+ 'all' => false,
+ ),
+ "(RAW SQL) UNION (RAW2SQL) UNION (RAW3SQL)"
+ ),
+ );
+ }
+
+ function testTransactionCommit() {
+ $this->database->begin( __METHOD__ );
+ $this->database->commit( __METHOD__ );
+ $this->assertLastSql( 'BEGIN; COMMIT' );
+ }
+
+ function testTransactionRollback() {
+ $this->database->begin( __METHOD__ );
+ $this->database->rollback( __METHOD__ );
+ $this->assertLastSql( 'BEGIN; ROLLBACK' );
+ }
+
+ function testDropTable() {
+ $this->database->setExistingTables( array( 'table' ) );
+ $this->database->dropTable( 'table', __METHOD__ );
+ $this->assertLastSql( 'DROP TABLE table' );
+ }
+
+ function testDropNonExistingTable() {
+ $this->assertFalse(
+ $this->database->dropTable( 'non_existing', __METHOD__ )
+ );
+ }
}
--- /dev/null
+<?php
+
+/**
+ * Helper for testing the methods from the DatabaseBase class
+ * @since 1.22
+ */
+class DatabaseTestHelper extends DatabaseBase {
+
+ /**
+ * __CLASS__ of the test suite,
+ * used to determine, if the function name is passed every time to query()
+ */
+ protected $testName = array();
+
+ /**
+ * Array of lastSqls passed to query(),
+ * This is an array since some methods in DatabaseBase can do more than one
+ * query. Cleared when calling getLastSqls().
+ */
+ protected $lastSqls = array();
+
+ /**
+ * Array of tables to be considered as existing by tableExist()
+ * Use setExistingTables() to alter.
+ */
+ protected $tablesExists;
+
+ public function __construct( $testName ) {
+ $this->testName = $testName;
+ }
+
+ /**
+ * Returns SQL queries grouped by '; '
+ * Clear the list of queries that have been done so far.
+ */
+ public function getLastSqls() {
+ $lastSqls = implode( '; ', $this->lastSqls );
+ $this->lastSqls = array();
+ return $lastSqls;
+ }
+
+ public function setExistingTables( $tablesExists ) {
+ $this->tablesExists = (array)$tablesExists;
+ }
+
+ protected function addSql( $sql ) {
+ // clean up spaces before and after some words and the whole string
+ $this->lastSqls[] = trim( preg_replace(
+ '/\s{2,}(?=FROM|WHERE|GROUP BY|ORDER BY|LIMIT)|(?<=SELECT|INSERT|UPDATE)\s{2,}/',
+ ' ', $sql
+ ) );
+ }
+
+ protected function checkFunctionName( $fname ) {
+ if ( substr( $fname, 0, strlen( $this->testName ) ) !== $this->testName ) {
+ throw new MWException( 'function name does not start with test class. ' .
+ $fname . ' vs. ' . $this->testName . '. ' .
+ 'Please provide __METHOD__ to database methods.' );
+ }
+ }
+
+ function strencode( $s ) {
+ // Choose apos to avoid handling of escaping double quotes in quoted text
+ return str_replace( "'", "\'", $s );
+ }
+
+ public function addIdentifierQuotes( $s ) {
+ // no escaping to avoid handling of double quotes in quoted text
+ return $s;
+ }
+
+ public function query( $sql, $fname = '', $tempIgnore = false ) {
+ $this->checkFunctionName( $fname );
+ $this->addSql( $sql );
+
+ return parent::query( $sql, $fname, $tempIgnore );
+ }
+
+ public function tableExists( $table, $fname = __METHOD__ ) {
+ $this->checkFunctionName( $fname );
+ return in_array( $table, (array)$this->tablesExists );
+ }
+
+ // Redeclare parent method to make it public
+ public function nativeReplace( $table, $rows, $fname ) {
+ return parent::nativeReplace( $table, $rows, $fname );
+ }
+
+ function getType() {
+ return 'test';
+ }
+
+ function open( $server, $user, $password, $dbName ) {
+ return false;
+ }
+
+ function fetchObject( $res ) {
+ return false;
+ }
+
+ function fetchRow( $res ) {
+ return false;
+ }
+
+ function numRows( $res ) {
+ return -1;
+ }
+
+ function numFields( $res ) {
+ return -1;
+ }
+
+ function fieldName( $res, $n ) {
+ return 'test';
+ }
+
+ function insertId() {
+ return -1;
+ }
+
+ function dataSeek( $res, $row ) {
+ /* nop */
+ }
+
+ function lastErrno() {
+ return -1;
+ }
+
+ function lastError() {
+ return 'test';
+ }
+
+ function fieldInfo( $table, $field ) {
+ return false;
+ }
+
+ function indexInfo( $table, $index, $fname = 'Database::indexInfo' ) {
+ return false;
+ }
+
+ function affectedRows() {
+ return -1;
+ }
+
+ static function getSoftwareLink() {
+ return 'test';
+ }
+
+ function getServerVersion() {
+ return 'test';
+ }
+
+ function getServerInfo() {
+ return 'test';
+ }
+
+ protected function closeConnection() {
+ return false;
+ }
+
+ protected function doQuery( $sql ) {
+ return array();
+ }
+}
protected function setUp() {
global $wgFileBackends;
parent::setUp();
- $tmpPrefix = wfTempDir() . '/filebackend-unittest-' . time() . '-' . mt_rand();
+ $uniqueId = time() . '-' . mt_rand();
+ $tmpPrefix = wfTempDir() . '/filebackend-unittest-' . $uniqueId;
if ( $this->getCliArg( 'use-filebackend=' ) ) {
if ( self::$backendToUse ) {
$this->singleBackend = self::$backendToUse;
'name' => 'localtesting',
'lockManager' => 'fsLockManager',
#'parallelize' => 'implicit',
+ 'wikiId' => wfWikiID() . $uniqueId,
'containerPaths' => array(
'unittest-cont1' => "{$tmpPrefix}-localtesting-cont1",
'unittest-cont2' => "{$tmpPrefix}-localtesting-cont2" )
'name' => 'localtesting',
'lockManager' => 'fsLockManager',
'parallelize' => 'implicit',
+ 'wikiId' => wfWikiId() . $uniqueId,
'backends' => array(
array(
'name' => 'localmultitesting1',
$this->backend = $this->singleBackend;
$this->tearDownFiles();
$this->doTestConcatenate( $op, $srcs, $srcsContent, $alreadyExists, $okStatus );
+ $this->filesToPrune[] = $op['dst']; # avoid file leaking
$this->tearDownFiles();
$this->backend = $this->multiBackend;
function tearDownFiles() {
foreach ( $this->filesToPrune as $file ) {
- @unlink( $file );
+ if ( is_file( $file ) ) {
+ unlink( $file );
+ }
}
$containers = array( 'unittest-cont1', 'unittest-cont2' );
foreach ( $containers as $container ) {
$suite = new PHPUnit_Framework_TestSuite;
- foreach ( $wgParserTestFiles as $filename ) {
- $testsName = basename( $filename, '.txt' );
+ foreach ( $wgParserTestFiles as $fileName ) {
+ $testsName = basename( $fileName, '.txt' );
+ $escapedFileName = strtr( $fileName, array( "'" => "\\'", '\\' => '\\\\' ) );
/* This used to be ucfirst( basename( dirname( $filename ) ) )
* and then was ucfirst( basename( $filename, '.txt' )
* but that didn't work with names like foo.tests.txt
*/
- $className = str_replace( '.', '_', ucfirst( $testsName ) );
+ $parserTestClassName = str_replace( '.', '_', ucfirst( $testsName ) );
+ $parserTestClassDefinition = <<<EOT
+/**
+ * @group Database
+ * @group Parser
+ * @group ParserTests
+ * @group ParserTests_$parserTestClassName
+ */
+class $parserTestClassName extends NewParserTest {
+ protected \$file = '$escapedFileName';
+}
+EOT;
- eval( "/** @group Database\n@group Parser\n*/ class $className extends NewParserTest { protected \$file = '" . strtr( $filename, array( "'" => "\\'", '\\' => '\\\\' ) ) . "'; } " );
+ eval( $parserTestClassDefinition );
- $parserTester = new $className( $testsName );
+ $parserTester = new $parserTestClassName( $testsName );
$suite->addTestSuite( new ReflectionClass ( $parserTester ) );
}
return $suite;
( function ( mw, $ ) {
- QUnit.module( 'mediawiki.util', QUnit.newMwEnvironment() );
+ QUnit.module( 'mediawiki.util', QUnit.newMwEnvironment( {
+ setup: function () {
+ this.taPrefix = mw.util.tooltipAccessKeyPrefix;
+ mw.util.tooltipAccessKeyPrefix = 'ctrl-alt-';
+ },
+ teardown: function () {
+ mw.util.tooltipAccessKeyPrefix = this.taPrefix;
+ }
+ } ) );
QUnit.test( 'rawurlencode', 1, function ( assert ) {
assert.equal( mw.util.rawurlencode( 'Test:A & B/Here' ), 'Test%3AA%20%26%20B%2FHere' );
assert.strictEqual( mw.util.getParamValue( 'TEST', url ), 'a b+c d', 'Bug 30441: getParamValue must understand "+" encoding of space (multiple spaces)' );
} );
- QUnit.test( 'tooltipAccessKey', 3, function ( assert ) {
- assert.equal( typeof mw.util.tooltipAccessKeyPrefix, 'string', 'mw.util.tooltipAccessKeyPrefix must be a string' );
- assert.ok( mw.util.tooltipAccessKeyRegexp instanceof RegExp, 'mw.util.tooltipAccessKeyRegexp instance of RegExp' );
- assert.ok( mw.util.updateTooltipAccessKeys, 'mw.util.updateTooltipAccessKeys' );
+ QUnit.test( 'tooltipAccessKey', 4, function ( assert ) {
+ assert.equal( typeof mw.util.tooltipAccessKeyPrefix, 'string', 'tooltipAccessKeyPrefix must be a string' );
+ assert.equal( $.type( mw.util.tooltipAccessKeyRegexp ), 'regexp', 'tooltipAccessKeyRegexp is a regexp' );
+ assert.ok( mw.util.updateTooltipAccessKeys, 'updateTooltipAccessKeys is non-empty' );
+
+ 'Example [a]'.replace( mw.util.tooltipAccessKeyRegexp, function ( sub, m1, m2, m3, m4, m5, m6 ) {
+ assert.equal( m6, 'a', 'tooltipAccessKeyRegexp finds the accesskey hint' );
+ } );
} );
QUnit.test( '$content', 2, function ( assert ) {
* Previously, test elements where invisible to the selector since only
* one element can have a given id.
*/
- QUnit.test( 'addPortletLink', 8, function ( assert ) {
+ QUnit.test( 'addPortletLink', 10, function ( assert ) {
var pTestTb, pCustom, vectorTabs, tbRL, cuQuux, $cuQuux, tbMW, $tbMW, tbRLDM, caFoo;
pTestTb = '\
$( '#qunit-fixture' ).append( pTestTb, pCustom, vectorTabs );
tbRL = mw.util.addPortletLink( 'p-test-tb', '//mediawiki.org/wiki/ResourceLoader',
- 'ResourceLoader', 't-rl', 'More info about ResourceLoader on MediaWiki.org ', 'l' );
+ 'ResourceLoader', 't-rl', 'More info about ResourceLoader on MediaWiki.org ', 'l'
+ );
assert.ok( $.isDomElement( tbRL ), 'addPortletLink returns a valid DOM Element according to $.isDomElement' );
'MediaWiki.org', 't-mworg', 'Go to MediaWiki.org ', 'm', tbRL );
$tbMW = $( tbMW );
+ assert.propEqual(
+ $tbMW.getAttrs(),
+ {
+ id: 't-mworg'
+ },
+ 'Validate attributes of created element'
+ );
+
+ assert.propEqual(
+ $tbMW.find( 'a' ).getAttrs(),
+ {
+ href: '//mediawiki.org/',
+ title: 'Go to MediaWiki.org [ctrl-alt-m]',
+ accesskey: 'm'
+ },
+ 'Validate attributes of anchor tag in created element'
+ );
- assert.equal( $tbMW.attr( 'id' ), 't-mworg', 'Link has correct ID set' );
assert.equal( $tbMW.closest( '.portlet' ).attr( 'id' ), 'p-test-tb', 'Link was inserted within correct portlet' );
assert.equal( $tbMW.next().attr( 'id' ), 't-rl', 'Link is in the correct position (by passing nextnode)' );
- cuQuux = mw.util.addPortletLink( 'p-test-custom', '#', 'Quux' );
+ cuQuux = mw.util.addPortletLink( 'p-test-custom', '#', 'Quux', null, 'Example [shift-x]', 'q' );
$cuQuux = $( cuQuux );
+ assert.equal( $cuQuux.find( 'a' ).attr( 'title' ), 'Example [ctrl-alt-q]', 'Existing accesskey is stripped and updated' );
+
assert.equal(
$( '#p-test-custom #c-barmenu ul li' ).length,
1,