* (bug 54597) $wgBlockOpenProxies, $wgProxyPorts, $wgProxyScriptPath, and
$wgProxyMemcExpiry have been removed, along with the open proxy scanner
script they were added for.
+* Default value of $wgMaxShellMemory has been tripled (it's now 300 MB).
=== New features in 1.22 ===
* (bug 44525) mediawiki.jqueryMsg can now parse (whitelisted) HTML elements and attributes.
version of the Vector extension as this feature may conflict.
* New 'mediawiki.ui' CSS module providing mw-ui-* styles for buttons and a
compact vertical form layout.
+* HTMLForm supports a new display format 'vform' which applies this compact vertical
+ layout and button styling. Special:PasswordReset uses this format.
* New versions of login (Special:UserLogin) and create account
(Special:UserLogin/signup) forms using the "vform" compact vertical form layout.
These forms use new messages that assume a "Help logging in" link, see
output in a HTML comment.
* The 'UnwatchArticle' and 'WatchArticle' hooks now support a Status object
instead of just a boolean return value to abort the hook.
+* Added a hook, SpecialWatchlistGetNonRevisionTypes, to allow extensions
+ with custom recentchanges entries to hook into the Watchlist without
+ clobbering each other.
+* A hidden, empty input field was added to the edit form, and any edit that fills
+ it in will be rejected. This prevents against the simplest form of spambots.
+ Previously in the "SimpleAntiSpam" extension by Ryan Schmidt.
=== Bug fixes in 1.22 ===
* Disable Special:PasswordReset when $wgEnableEmail is false. Previously one
--- /dev/null
+Security reminder: MediaWiki does not require PHP's register_globals. If you
+have it on, turn it '''off''' if you can.
+
+== MediaWiki 1.23 ==
+
+THIS IS NOT A RELEASE YET
+
+MediaWiki 1.23 is an alpha-quality branch and is not recommended for use in
+production.
+
+=== Configuration changes in 1.23 ===
+
+=== New features in 1.23 ===
+
+=== Bug fixes in 1.23 ===
+
+=== API changes in 1.23 ===
+
+=== Languages updated in 1.23===
+
+MediaWiki supports over 350 languages. Many localisations are updated
+regularly. Below only new and removed languages are listed, as well as
+changes to languages because of Bugzilla reports.
+
+=== Other changes in 1.23 ===
+
+== Compatibility ==
+
+MediaWiki 1.23 requires PHP 5.3.2 or later.
+
+MySQL is the recommended DBMS. PostgreSQL or SQLite can also be used, but
+support for them is somewhat less mature. There is experimental support for
+Oracle.
+
+The supported versions are:
+
+* MySQL 5.0.2 or later
+* PostgreSQL 8.3 or later
+* SQLite 3.3.7 or later
+* Oracle 9.0.1 or later
+
+== Upgrading ==
+
+1.23 has several database changes since 1.22, and will not work without schema
+updates. Note that due to changes to some very large tables like the revision
+table, the schema update may take quite long (minutes on a medium sized site,
+many hours on a large site).
+
+If upgrading from before 1.11, and you are using a wiki as a commons
+repository, make sure that it is updated as well. Otherwise, errors may arise
+due to database schema changes.
+
+If upgrading from before 1.7, you may want to run refreshLinks.php to ensure
+new database fields are filled with data.
+
+If you are upgrading from MediaWiki 1.4.x or earlier, you should upgrade to
+1.5 first. The upgrade script maintenance/upgrade1_5.php has been removed
+with MediaWiki 1.21.
+
+Don't forget to always back up your database before upgrading!
+
+See the file UPGRADE for more detailed upgrade instructions.
+
+For notes on 1.21.x and older releases, see HISTORY.
+
+== Online documentation ==
+
+Documentation for both end-users and site administrators is available on
+MediaWiki.org, and is covered under the GNU Free Documentation License (except
+for pages that explicitly state that their contents are in the public domain):
+
+ https://www.mediawiki.org/wiki/Documentation
+
+== Mailing list ==
+
+A mailing list is available for MediaWiki user support and discussion:
+
+ https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
+
+A low-traffic announcements-only list is also available:
+
+ https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce
+
+It's highly recommended that you sign up for one of these lists if you're
+going to run a public MediaWiki, so you can be notified of security fixes.
+
+== IRC help ==
+
+There's usually someone online in #mediawiki on irc.freenode.net.
&$fields: array of query fields
$values: array of variables with watchlist options
+'SpecialWatchlistGetNonRevisionTypes': Called when building sql query for
+SpecialWatchlist. Allows extensions to register custom values they have
+inserted to rc_type so they can be returned as part of the watchlist.
+&$nonRevisionTypes: array of values in the rc_type field of recentchanges table
+
'TestCanonicalRedirect': Called when about to force a redirect to a canonical
URL for a title when we have no other parameters on the URL. Gives a chance for
extensions that alter page view behavior radically to abort that redirect or
* MediaWiki version number
* @since 1.2
*/
-$wgVersion = '1.22alpha';
+$wgVersion = '1.23alpha';
/**
* Name of the site. It must be changed in LocalSettings.php
*/
$wgCascadingRestrictionLevels = array( 'sysop' );
+/**
+ * Restriction levels that should be considered "semiprotected"
+ *
+ * Certain places in the interface recognize a dichotomy between "protected"
+ * and "semiprotected", without further distinguishing the specific levels. In
+ * general, if anyone can be eligible to edit a protection level merely by
+ * reaching some condition in $wgAutopromote, it should probably be considered
+ * "semiprotected".
+ *
+ * 'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility.
+ * 'sysop' is not changed, since it really shouldn't be here.
+ */
+$wgSemiprotectedRestrictionLevels = array( 'autoconfirmed' );
+
/**
* Set the minimum permissions required to edit pages in each
* namespace. If you list more than one permission, a user must
/**
* Maximum amount of virtual memory available to shell processes under linux, in KB.
*/
-$wgMaxShellMemory = 102400;
+$wgMaxShellMemory = 307200;
/**
* Maximum file size created by shell processes under linux, in KB
return $status;
}
+ $spam = $wgRequest->getText( 'wpAntispam' );
+ if ( $spam !== '' ) {
+ wfDebugLog(
+ 'SimpleAntiSpam',
+ $wgUser->getName() .
+ ' editing "' .
+ $this->mTitle->getPrefixedText() .
+ '" submitted bogus field "' .
+ $spam .
+ '"'
+ );
+ $status->fatal( 'spamprotectionmatch', false );
+ $status->value = self::AS_SPAM_ERROR;
+ wfProfileOut( __METHOD__ . '-checks' );
+ wfProfileOut( __METHOD__ );
+ return $status;
+ }
+
try {
# Construct Content object
$textbox_content = $this->toEditContent( $this->textbox1 );
call_user_func_array( $formCallback, array( &$wgOut ) );
}
+ // Add an empty field to trip up spambots
+ $wgOut->addHTML(
+ Xml::openElement( 'div', array( 'id' => 'antispam-container', 'style' => 'display: none;' ) )
+ . Html::rawElement( 'label', array( 'for' => 'wpAntiSpam' ), wfMessage( 'simpleantispam-label' )->parse() )
+ . Xml::element( 'input', array( 'type' => 'text', 'name' => 'wpAntispam', 'id' => 'wpAntispam', 'value' => '' ) )
+ . Xml::closeElement( 'div' )
+ );
+
wfRunHooks( 'EditPage::showEditForm:fields', array( &$this, &$wgOut ) );
// Put these up at the top to ensure they aren't lost on early form submission
$cmd = $envcmd . $cmd;
if ( php_uname( 's' ) == 'Linux' ) {
- $stderrDuplication = '';
- if ( $includeStderr ) {
- $stderrDuplication = 'exec 2>&1; ';
- }
$time = intval ( isset( $limits['time'] ) ? $limits['time'] : $wgMaxShellTime );
if ( isset( $limits['walltime'] ) ) {
$wallTime = intval( $limits['walltime'] );
$cmd = '/bin/bash ' . escapeshellarg( "$IP/includes/limit.sh" ) . ' ' .
escapeshellarg( $cmd ) . ' ' .
escapeshellarg(
- $stderrDuplication .
+ "MW_INCLUDE_STDERR=" . ( $includeStderr ? '1' : '' ) . ';' .
"MW_CPU_LIMIT=$time; " .
'MW_CGROUP=' . escapeshellarg( $wgShellCgroup ) . '; ' .
"MW_MEM_LIMIT=$mem; " .
"MW_FILE_SIZE_LIMIT=$filesize; " .
"MW_WALL_CLOCK_LIMIT=$wallTime"
);
- } else {
+ } elseif ( $includeStderr ) {
$cmd .= ' 2>&1';
}
} elseif ( $includeStderr ) {
$this->loadFile();
$descUrl = $this->mPage->getFile()->getDescriptionUrl();
- $descText = $this->mPage->getFile()->getDescriptionText();
+ $descText = $this->mPage->getFile()->getDescriptionText( $this->getContext()->getLanguage() );
/* Add canonical to head if there is no local page for this shared file */
if ( $descUrl && $this->mPage->getID() == 0 ) {
* @return String: HTML output
*/
public static function formatTemplates( $templates, $preview = false, $section = false, $more = null ) {
+ global $wgLang;
wfProfileIn( __METHOD__ );
$outText = '';
usort( $templates, 'Title::compare' );
foreach ( $templates as $titleObj ) {
- $r = $titleObj->getRestrictions( 'edit' );
- if ( in_array( 'sysop', $r ) ) {
- $protected = wfMessage( 'template-protected' )->parse();
- } elseif ( in_array( 'autoconfirmed', $r ) ) {
- $protected = wfMessage( 'template-semiprotected' )->parse();
- } else {
- $protected = '';
+ $protected = '';
+ $restrictions = $titleObj->getRestrictions( 'edit' );
+ if ( $restrictions ) {
+ // Check backwards-compatible messages
+ $msg = null;
+ if ( $restrictions === array( 'sysop' ) ) {
+ $msg = wfMessage( 'template-protected' );
+ } elseif ( $restrictions === array( 'autoconfirmed' ) ) {
+ $msg = wfMessage( 'template-semiprotected' );
+ }
+ if ( $msg && !$msg->isDisabled() ) {
+ $protected = $msg->parse();
+ } else {
+ // Construct the message from restriction-level-*
+ // e.g. restriction-level-sysop, restriction-level-autoconfirmed
+ $msgs = array();
+ foreach ( $restrictions as $r ) {
+ $msgs[] = wfMessage( "restriction-level-$r" )->parse();
+ }
+ $protected = wfMessage( 'parentheses' )
+ ->rawParams( $wgLang->commaList( $msgs ) )->escaped();
+ }
}
if ( $titleObj->quickUserCan( 'edit' ) ) {
$editLink = self::link(
* @return Tuple(type, value)
*/
protected function extractParam( $param ) {
- if ( is_array( $param ) ){
+ if ( is_array( $param ) ) {
if ( isset( $param['raw'] ) ) {
return array( 'after', $param['raw'] );
} elseif ( isset( $param['num'] ) ) {
);
return array( 'before', '[INVALID]' );
}
+ } elseif ( $param instanceof Message ) {
+ // Message objects should not be before parameters because
+ // then they'll get double escaped. If the message needs to be
+ // escaped, it'll happen right here when we call toString().
+ return array( 'after', $param->toString() );
} else {
return array( 'before', $param );
}
*/
private $mTarget = null;
+ /**
+ * @var bool: Whether output should contain table of contents
+ */
+ private $mEnableTOC = true;
+
/**
* Constructor for OutputPage. This should not be called directly.
* Instead a new RequestContext should be created and it will implicitly create
*
* @param $timestamp string
*
- * @return Boolean: true iff cache-ok headers was sent.
+ * @return Boolean: true if cache-ok headers was sent.
*/
public function checkLastModified( $timestamp ) {
global $wgCachePages, $wgCacheEpoch, $wgUseSquid, $wgSquidMaxage;
*/
function addParserOutput( &$parserOutput ) {
$this->addParserOutputNoText( $parserOutput );
+ $parserOutput->setTOCEnabled( $this->mEnableTOC );
$text = $parserOutput->getText();
wfRunHooks( 'OutputPageBeforeHTML', array( &$this, &$text ) );
$this->addHTML( $text );
return array();
}
+ /**
+ * Enables/disables TOC, doesn't override __NOTOC__
+ * @param bool $flag
+ * @since 1.22
+ */
+ public function enableTOC( $flag = true ) {
+ $this->mEnableTOC = $flag;
+ }
+
+ /**
+ * @return bool
+ * @since 1.22
+ */
+ public function isTOCEnabled() {
+ return $this->mEnableTOC;
+ }
}
if ( $id ) {
// Use the specified ID
$conds['rev_id'] = $id;
+ return self::newFromConds( $conds, (int)$flags );
} else {
// Use a join to get the latest revision
$conds[] = 'rev_id=page_latest';
+ $db = wfGetDB( ( $flags & self::READ_LATEST ) ? DB_MASTER : DB_SLAVE );
+ return self::loadFromConds( $db, $conds, $flags );
}
- return self::newFromConds( $conds, (int)$flags );
}
/**
}
}
if ( count( $this->errors ) == 1 ) {
- $s = $this->getErrorMessage( $this->errors[0] );
+ $s = $this->getErrorMessage( $this->errors[0] )->plain();
if ( $shortContext ) {
$s = wfMessage( $shortContext, $s )->plain();
} elseif ( $longContext ) {
$s = wfMessage( $longContext, "* $s\n" )->plain();
}
} else {
- $s = '* ' . implode( "\n* ",
- $this->getErrorMessageArray( $this->errors ) ) . "\n";
+ $errors = $this->getErrorMessageArray( $this->errors );
+ foreach ( $errors as &$error ) {
+ $error = $error->plain();
+ }
+ $s = '* ' . implode( "\n* ", $errors ) . "\n";
if ( $longContext ) {
$s = wfMessage( $longContext, $s )->plain();
} elseif ( $shortContext ) {
return $s;
}
+ /**
+ * Get the error list as a Message object
+ *
+ * @param string $shortContext a short enclosing context message name, to
+ * be used when there is a single error
+ * @param string $longContext a long enclosing context message name, for a list
+ * @return Message
+ */
+ function getMessage( $shortContext = false, $longContext = false ) {
+ if ( count( $this->errors ) == 0 ) {
+ if ( $this->ok ) {
+ $this->fatal( 'internalerror_info',
+ __METHOD__ . " called for a good result, this is incorrect\n" );
+ } else {
+ $this->fatal( 'internalerror_info',
+ __METHOD__ . ": Invalid result object: no error text but not OK\n" );
+ }
+ }
+ if ( count( $this->errors ) == 1 ) {
+ $s = $this->getErrorMessage( $this->errors[0] );
+ if ( $shortContext ) {
+ $s = wfMessage( $shortContext, $s );
+ } elseif ( $longContext ) {
+ $wrapper = new RawMessage( "* \$1\n" );
+ $wrapper->params( $s )->parse();
+ $s = wfMessage( $longContext, $wrapper );
+ }
+ } else {
+ $msgs = $this->getErrorMessageArray( $this->errors );
+ $msgCount = count( $msgs );
+
+ if ( $shortContext ) {
+ $msgCount++;
+ }
+
+ $wrapper = new RawMessage( '* $' . implode( "\n* \$", range( 1, $msgCount ) ) );
+ $s = $wrapper->params( $msgs )->parse();
+
+ if ( $longContext ) {
+ $s = wfMessage( $longContext, $wrapper );
+ } elseif ( $shortContext ) {
+ $wrapper = new RawMessage( "\n\$1\n", $wrapper );
+ $wrapper->parse();
+ $s = wfMessage( $shortContext, $wrapper );
+ }
+ }
+
+ return $s;
+ }
+
/**
* Return the message for a single error.
* @param $error Mixed With an array & two values keyed by
} else {
$msg = wfMessage( $error );
}
- return $msg->plain();
+ return $msg;
}
/**
return $replaced;
}
- /**
- * Backward compatibility function for WikiError -> Status migration
- *
- * @return String
- */
- public function getMessage() {
- return $this->getWikiText();
- }
-
/**
* @return mixed
*/
}
/**
- * Is this page "semi-protected" - the *only* protection is autoconfirm?
+ * Is this page "semi-protected" - the *only* protection levels are listed
+ * in $wgSemiprotectedRestrictionLevels?
*
* @param string $action Action to check (default: edit)
* @return Bool
*/
public function isSemiProtected( $action = 'edit' ) {
- if ( $this->exists() ) {
- $restrictions = $this->getRestrictions( $action );
- if ( count( $restrictions ) > 0 ) {
- foreach ( $restrictions as $restriction ) {
- if ( strtolower( $restriction ) != 'editsemiprotected' &&
- strtolower( $restriction ) != 'autoconfirmed' // BC
- ) {
- return false;
- }
- }
- } else {
- # Not protected
- return false;
- }
- return true;
- } else {
- # If it doesn't exist, it can't be protected
+ global $wgSemiprotectedRestrictionLevels;
+
+ $restrictions = $this->getRestrictions( $action );
+ $semi = $wgSemiprotectedRestrictionLevels;
+ if ( !$restrictions || !$semi ) {
+ // Not protected, or all protection is full protection
return false;
}
+
+ // Remap autoconfirmed to editsemiprotected for BC
+ foreach ( array_keys( $semi, 'autoconfirmed' ) as $key ) {
+ $semi[$key] = 'editsemiprotected';
+ }
+ foreach ( array_keys( $restrictions, 'autoconfirmed' ) as $key ) {
+ $restrictions[$key] = 'editsemiprotected';
+ }
+
+ return !array_diff( $restrictions, $semi );
}
/**
}
/**
- * Returns true iff this page's content model supports sections.
+ * Returns true if this page's content model supports sections.
*
* @return boolean whether sections are supported.
*
*
* @param string $title Message cache key with initial uppercase letter.
* @param string $code Code denoting the language to try.
- * @return string|bool The message, or false iff it does not exist or on error
+ * @return string|bool The message, or false if it does not exist or on error
*/
function getMsgFromNamespace( $title, $code ) {
$this->load( $code );
/**
* Check for empty diff.
*
- * @return bool True iff two sequences were identical.
+ * @return bool True if two sequences were identical.
*/
function isEmpty() {
foreach ( $this->edits as $edit ) {
// Clear any file cache entries
$this->clearCache();
- $supportedOps = array( 'create', 'store', 'copy', 'move', 'delete', 'null' );
+ $supportedOps = array( 'create', 'store', 'copy', 'move', 'delete', 'describe', 'null' );
$async = ( $this->parallelize === 'implicit' && count( $ops ) > 1 );
$maxConcurrency = $this->concurrency; // throttle
/**
* precheckDestExistence() helper function to get the source file SHA-1.
- * Subclasses should overwride this iff the source is not in storage.
+ * Subclasses should overwride this if the source is not in storage.
*
* @return string|bool Returns false on failure
*/
$this->session = wfRandomString( 31 );
}
+ // @TODO: change this code to work in one batch
+ protected function getLocksOnServer( $lockSrv, array $pathsByType ) {
+ $status = Status::newGood();
+ foreach ( $pathsByType as $type => $paths ) {
+ $status->merge( $this->doGetLocksOnServer( $lockSrv, $paths, $type ) );
+ }
+ return $status;
+ }
+
+ protected function freeLocksOnServer( $lockSrv, array $pathsByType ) {
+ return Status::newGood();
+ }
+
/**
* @see QuorumLockManager::isServerUp()
* @return bool
* @see DBLockManager::getLocksOnServer()
* @return Status
*/
- protected function getLocksOnServer( $lockSrv, array $paths, $type ) {
+ protected function doGetLocksOnServer( $lockSrv, array $paths, $type ) {
$status = Status::newGood();
$db = $this->getConnection( $lockSrv ); // checked in isServerUp()
return $status;
}
- /**
- * @see QuorumLockManager::freeLocksOnServer()
- * @return Status
- */
- protected function freeLocksOnServer( $lockSrv, array $paths, $type ) {
- return Status::newGood(); // not supported
- }
-
/**
* @see QuorumLockManager::releaseAllLocks()
* @return Status
self::LOCK_EX => self::LOCK_EX
);
- protected function getLocksOnServer( $lockSrv, array $paths, $type ) {
+ protected function doGetLocksOnServer( $lockSrv, array $paths, $type ) {
$status = Status::newGood();
if ( !count( $paths ) ) {
return $status; // nothing to lock
return $status;
}
- /**
- * @see QuorumLockManager::freeLocksOnServer()
- * @return Status
- */
- protected function freeLocksOnServer( $lockSrv, array $paths, $type ) {
- return Status::newGood(); // not supported
- }
-
/**
* @see QuorumLockManager::releaseAllLocks()
* @return Status
/**
* Lock the resources at the given abstract paths
*
- * @param array $paths Map of LockManager::LOCK_* constants to lists of storage paths
+ * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
* @param integer $timeout Timeout in seconds (0 means non-blocking) (since 1.21)
* @return Status
* @since 1.22
/**
* Unlock the resources at the given abstract paths
*
- * @param array $paths List of storage paths
+ * @param array $paths List of paths
* @param $type integer LockManager::LOCK_* constant
* @return Status
*/
/**
* Unlock the resources at the given abstract paths
*
- * @param array $paths Map of LockManager::LOCK_* constants to lists of storage paths
+ * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
* @return Status
* @since 1.22
*/
* Normalize the $paths array by converting LOCK_UW locks into the
* appropriate type and removing any duplicated paths for each lock type.
*
- * @param array $paths Map of LockManager::LOCK_* constants to lists of storage paths
+ * @param array $paths Map of LockManager::LOCK_* constants to lists of paths
* @return Array
* @since 1.22
*/
/**
* @see LockManager::lockByType()
- * @param array $paths Map of LockManager::LOCK_* constants to lists of storage paths
+ * @param array $paths Map of LockManager::LOCK_* constants to lists of paths
* @return Status
* @since 1.22
*/
/**
* Lock resources with the given keys and lock type
*
- * @param array $paths List of storage paths
+ * @param array $paths List of paths
* @param $type integer LockManager::LOCK_* constant
* @return Status
*/
/**
* @see LockManager::unlockByType()
- * @param array $paths Map of LockManager::LOCK_* constants to lists of storage paths
+ * @param array $paths Map of LockManager::LOCK_* constants to lists of paths
* @return Status
* @since 1.22
*/
/**
* Unlock resources with the given keys and lock type
*
- * @param array $paths List of storage paths
+ * @param array $paths List of paths
* @param $type integer LockManager::LOCK_* constant
* @return Status
*/
* @since 1.19
*/
class NullLockManager extends LockManager {
- /**
- * @see LockManager::doLock()
- * @param $paths array
- * @param $type int
- * @return Status
- */
protected function doLock( array $paths, $type ) {
return Status::newGood();
}
- /**
- * @see LockManager::doUnlock()
- * @param $paths array
- * @param $type int
- * @return Status
- */
protected function doUnlock( array $paths, $type ) {
return Status::newGood();
}
$this->session = wfRandomString( 32 );
}
+ // @TODO: change this code to work in one batch
+ protected function getLocksOnServer( $lockSrv, array $pathsByType ) {
+ $status = Status::newGood();
+
+ $lockedPaths = array();
+ foreach ( $pathsByType as $type => $paths ) {
+ $status->merge( $this->doGetLocksOnServer( $lockSrv, $paths, $type ) );
+ if ( $status->isOK() ) {
+ $lockedPaths[$type] = isset( $lockedPaths[$type] )
+ ? array_merge( $lockedPaths[$type], $paths )
+ : $paths;
+ } else {
+ foreach ( $lockedPaths as $type => $paths ) {
+ $status->merge( $this->doFreeLocksOnServer( $lockSrv, $paths, $type ) );
+ }
+ break;
+ }
+ }
+
+ return $status;
+ }
+
+ // @TODO: change this code to work in one batch
+ protected function freeLocksOnServer( $lockSrv, array $pathsByType ) {
+ $status = Status::newGood();
+
+ foreach ( $pathsByType as $type => $paths ) {
+ $status->merge( $this->doFreeLocksOnServer( $lockSrv, $paths, $type ) );
+ }
+
+ return $status;
+ }
+
/**
* @see QuorumLockManager::getLocksOnServer()
* @return Status
*/
- protected function getLocksOnServer( $lockSrv, array $paths, $type ) {
+ protected function doGetLocksOnServer( $lockSrv, array $paths, $type ) {
$status = Status::newGood();
$memc = $this->getCache( $lockSrv );
* @see QuorumLockManager::freeLocksOnServer()
* @return Status
*/
- protected function freeLocksOnServer( $lockSrv, array $paths, $type ) {
+ protected function doFreeLocksOnServer( $lockSrv, array $paths, $type ) {
$status = Status::newGood();
$memc = $this->getCache( $lockSrv );
abstract class QuorumLockManager extends LockManager {
/** @var Array Map of bucket indexes to peer server lists */
protected $srvsByBucket = array(); // (bucket index => (lsrv1, lsrv2, ...))
+ /** @var Array Map of degraded buckets */
+ protected $degradedBuckets = array(); // (buckey index => UNIX timestamp)
- /**
- * @see LockManager::doLock()
- * @param $paths array
- * @param $type int
- * @return Status
- */
final protected function doLock( array $paths, $type ) {
+ return $this->doLockByType( array( $type => $paths ) );
+ }
+
+ final protected function doUnlock( array $paths, $type ) {
+ return $this->doUnlockByType( array( $type => $paths ) );
+ }
+
+ protected function doLockByType( array $pathsByType ) {
$status = Status::newGood();
- $pathsToLock = array(); // (bucket => paths)
+ $pathsToLock = array(); // (bucket => type => paths)
// Get locks that need to be acquired (buckets => locks)...
- foreach ( $paths as $path ) {
- if ( isset( $this->locksHeld[$path][$type] ) ) {
- ++$this->locksHeld[$path][$type];
- } else {
- $bucket = $this->getBucketFromPath( $path );
- $pathsToLock[$bucket][] = $path;
+ foreach ( $pathsByType as $type => $paths ) {
+ foreach ( $paths as $path ) {
+ if ( isset( $this->locksHeld[$path][$type] ) ) {
+ ++$this->locksHeld[$path][$type];
+ } else {
+ $bucket = $this->getBucketFromPath( $path );
+ $pathsToLock[$bucket][$type][] = $path;
+ }
}
}
- $lockedPaths = array(); // files locked in this attempt
+ $lockedPaths = array(); // files locked in this attempt (type => paths)
// Attempt to acquire these locks...
- foreach ( $pathsToLock as $bucket => $paths ) {
+ foreach ( $pathsToLock as $bucket => $pathsToLockByType ) {
// Try to acquire the locks for this bucket
- $status->merge( $this->doLockingRequestBucket( $bucket, $paths, $type ) );
+ $status->merge( $this->doLockingRequestBucket( $bucket, $pathsToLockByType ) );
if ( !$status->isOK() ) {
- $status->merge( $this->doUnlock( $lockedPaths, $type ) );
+ $status->merge( $this->doUnlockByType( $lockedPaths ) );
return $status;
}
// Record these locks as active
- foreach ( $paths as $path ) {
- $this->locksHeld[$path][$type] = 1; // locked
+ foreach ( $pathsToLockByType as $type => $paths ) {
+ foreach ( $paths as $path ) {
+ $this->locksHeld[$path][$type] = 1; // locked
+ // Keep track of what locks were made in this attempt
+ $lockedPaths[$type][] = $path;
+ }
}
- // Keep track of what locks were made in this attempt
- $lockedPaths = array_merge( $lockedPaths, $paths );
}
return $status;
}
- /**
- * @see LockManager::doUnlock()
- * @param $paths array
- * @param $type int
- * @return Status
- */
- final protected function doUnlock( array $paths, $type ) {
+ protected function doUnlockByType( array $pathsByType ) {
$status = Status::newGood();
- $pathsToUnlock = array();
- foreach ( $paths as $path ) {
- if ( !isset( $this->locksHeld[$path][$type] ) ) {
- $status->warning( 'lockmanager-notlocked', $path );
- } else {
- --$this->locksHeld[$path][$type];
- // Reference count the locks held and release locks when zero
- if ( $this->locksHeld[$path][$type] <= 0 ) {
- unset( $this->locksHeld[$path][$type] );
- $bucket = $this->getBucketFromPath( $path );
- $pathsToUnlock[$bucket][] = $path;
- }
- if ( !count( $this->locksHeld[$path] ) ) {
- unset( $this->locksHeld[$path] ); // no SH or EX locks left for key
+ $pathsToUnlock = array(); // (bucket => type => paths)
+ foreach ( $pathsByType as $type => $paths ) {
+ foreach ( $paths as $path ) {
+ if ( !isset( $this->locksHeld[$path][$type] ) ) {
+ $status->warning( 'lockmanager-notlocked', $path );
+ } else {
+ --$this->locksHeld[$path][$type];
+ // Reference count the locks held and release locks when zero
+ if ( $this->locksHeld[$path][$type] <= 0 ) {
+ unset( $this->locksHeld[$path][$type] );
+ $bucket = $this->getBucketFromPath( $path );
+ $pathsToUnlock[$bucket][$type][] = $path;
+ }
+ if ( !count( $this->locksHeld[$path] ) ) {
+ unset( $this->locksHeld[$path] ); // no SH or EX locks left for key
+ }
}
}
}
// Remove these specific locks if possible, or at least release
// all locks once this process is currently not holding any locks.
- foreach ( $pathsToUnlock as $bucket => $paths ) {
- $status->merge( $this->doUnlockingRequestBucket( $bucket, $paths, $type ) );
+ foreach ( $pathsToUnlock as $bucket => $pathsToUnlockByType ) {
+ $status->merge( $this->doUnlockingRequestBucket( $bucket, $pathsToUnlockByType ) );
}
if ( !count( $this->locksHeld ) ) {
$status->merge( $this->releaseAllLocks() );
+ $this->degradedBuckets = array(); // safe to retry the normal quorum
}
return $status;
* This is all or nothing; if any key is locked then this totally fails.
*
* @param $bucket integer
- * @param array $paths List of resource keys to lock
- * @param $type integer LockManager::LOCK_EX or LockManager::LOCK_SH
+ * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
* @return Status
*/
- final protected function doLockingRequestBucket( $bucket, array $paths, $type ) {
+ final protected function doLockingRequestBucket( $bucket, array $pathsByType ) {
$status = Status::newGood();
$yesVotes = 0; // locks made on trustable servers
if ( !$this->isServerUp( $lockSrv ) ) {
--$votesLeft;
$status->warning( 'lockmanager-fail-svr-acquire', $lockSrv );
+ $this->degradedBuckets[$bucket] = time();
continue; // server down?
}
// Attempt to acquire the lock on this peer
- $status->merge( $this->getLocksOnServer( $lockSrv, $paths, $type ) );
+ $status->merge( $this->getLocksOnServer( $lockSrv, $pathsByType ) );
if ( !$status->isOK() ) {
return $status; // vetoed; resource locked
}
* Attempt to release locks with the peers for a bucket
*
* @param $bucket integer
- * @param array $paths List of resource keys to lock
- * @param $type integer LockManager::LOCK_EX or LockManager::LOCK_SH
+ * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
* @return Status
*/
- final protected function doUnlockingRequestBucket( $bucket, array $paths, $type ) {
+ final protected function doUnlockingRequestBucket( $bucket, array $pathsByType ) {
$status = Status::newGood();
+ $yesVotes = 0; // locks freed on trustable servers
+ $votesLeft = count( $this->srvsByBucket[$bucket] ); // remaining peers
+ $quorum = floor( $votesLeft / 2 + 1 ); // simple majority
+ $isDegraded = isset( $this->degradedBuckets[$bucket] ); // not the normal quorum?
foreach ( $this->srvsByBucket[$bucket] as $lockSrv ) {
if ( !$this->isServerUp( $lockSrv ) ) {
- $status->fatal( 'lockmanager-fail-svr-release', $lockSrv );
+ $status->warning( 'lockmanager-fail-svr-release', $lockSrv );
// Attempt to release the lock on this peer
} else {
- $status->merge( $this->freeLocksOnServer( $lockSrv, $paths, $type ) );
+ $status->merge( $this->freeLocksOnServer( $lockSrv, $pathsByType ) );
+ ++$yesVotes; // success for this peer
+ // Normally the first peers form the quorum, and the others are ignored.
+ // Ignore them in this case, but not when an alternative quorum was used.
+ if ( $yesVotes >= $quorum && !$isDegraded ) {
+ break; // lock released
+ }
}
}
+ // Set a bad status if the quorum was not met.
+ // Assumes the same "up" servers as during the acquire step.
+ $status->setResult( $yesVotes >= $quorum );
return $status;
}
}
/**
- * Check if a lock server is up
+ * Check if a lock server is up.
+ * This should process cache results to reduce RTT.
*
* @param $lockSrv string
* @return bool
abstract protected function isServerUp( $lockSrv );
/**
- * Get a connection to a lock server and acquire locks on $paths
+ * Get a connection to a lock server and acquire locks
*
* @param $lockSrv string
- * @param $paths array
- * @param $type integer
+ * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
* @return Status
*/
- abstract protected function getLocksOnServer( $lockSrv, array $paths, $type );
+ abstract protected function getLocksOnServer( $lockSrv, array $pathsByType );
/**
* Get a connection to a lock server and release locks on $paths.
* Subclasses must effectively implement this or releaseAllLocks().
*
* @param $lockSrv string
- * @param $paths array
- * @param $type integer
+ * @param array $pathsByType Map of LockManager::LOCK_* constants to lists of paths
* @return Status
*/
- abstract protected function freeLocksOnServer( $lockSrv, array $paths, $type );
+ abstract protected function freeLocksOnServer( $lockSrv, array $pathsByType );
/**
* Release all locks that this session is holding.
$this->session = wfRandomString( 32 );
}
- protected function getLocksOnServer( $lockSrv, array $paths, $type ) {
+ // @TODO: change this code to work in one batch
+ protected function getLocksOnServer( $lockSrv, array $pathsByType ) {
+ $status = Status::newGood();
+
+ $lockedPaths = array();
+ foreach ( $pathsByType as $type => $paths ) {
+ $status->merge( $this->doGetLocksOnServer( $lockSrv, $paths, $type ) );
+ if ( $status->isOK() ) {
+ $lockedPaths[$type] = isset( $lockedPaths[$type] )
+ ? array_merge( $lockedPaths[$type], $paths )
+ : $paths;
+ } else {
+ foreach ( $lockedPaths as $type => $paths ) {
+ $status->merge( $this->doFreeLocksOnServer( $lockSrv, $paths, $type ) );
+ }
+ break;
+ }
+ }
+
+ return $status;
+ }
+
+ // @TODO: change this code to work in one batch
+ protected function freeLocksOnServer( $lockSrv, array $pathsByType ) {
+ $status = Status::newGood();
+
+ foreach ( $pathsByType as $type => $paths ) {
+ $status->merge( $this->doFreeLocksOnServer( $lockSrv, $paths, $type ) );
+ }
+
+ return $status;
+ }
+
+ protected function doGetLocksOnServer( $lockSrv, array $paths, $type ) {
$status = Status::newGood();
$server = $this->lockServers[$lockSrv];
return $status;
}
- protected function freeLocksOnServer( $lockSrv, array $paths, $type ) {
+ protected function doFreeLocksOnServer( $lockSrv, array $paths, $type ) {
$status = Status::newGood();
$server = $this->lockServers[$lockSrv];
/**
* The Installer object.
*
- * TODO: naming this parent is confusing, 'installer' would be clearer.
+ * @todo Naming this parent is confusing, 'installer' would be clearer.
*
* @var WebInstaller
*/
return false;
}
- return $this->db->tableExists( 'cur', __METHOD__ ) || $this->db->tableExists( 'revision', __METHOD__ );
+ return $this->db->tableExists( 'cur', __METHOD__ ) ||
+ $this->db->tableExists( 'revision', __METHOD__ );
}
/**
public function getInstallUserBox() {
return Html::openElement( 'fieldset' ) .
Html::element( 'legend', array(), wfMessage( 'config-db-install-account' )->text() ) .
- $this->getTextBox( '_InstallUser', 'config-db-username', array( 'dir' => 'ltr' ), $this->parent->getHelpBox( 'config-db-install-username' ) ) .
- $this->getPasswordBox( '_InstallPassword', 'config-db-password', array( 'dir' => 'ltr' ), $this->parent->getHelpBox( 'config-db-install-password' ) ) .
+ $this->getTextBox(
+ '_InstallUser',
+ 'config-db-username',
+ array( 'dir' => 'ltr' ),
+ $this->parent->getHelpBox( 'config-db-install-username' )
+ ) .
+ $this->getPasswordBox(
+ '_InstallPassword',
+ 'config-db-password',
+ array( 'dir' => 'ltr' ),
+ $this->parent->getHelpBox( 'config-db-install-password' )
+ ) .
Html::closeElement( 'fieldset' );
}
}
/**
- * Loads LocalSettings.php, if needed, and initialises everything needed for LoadExtensionSchemaUpdates hook
+ * Loads LocalSettings.php, if needed, and initialises everything needed for
+ * LoadExtensionSchemaUpdates hook.
*/
private function loadExtensions() {
if ( !defined( 'MEDIAWIKI_INSTALL' ) ) {
* @param string $tableName The table name
* @param string $oldIndexName The old index name
* @param string $newIndexName The new index name
- * @param $skipBothIndexExistWarning Boolean: Whether to warn if both the old and the new indexes exist. [facultative; by default, false]
+ * @param $skipBothIndexExistWarning Boolean: Whether to warn if both the old
+ * and the new indexes exist. [facultative; by default, false]
* @param string $sqlPath The path to the SQL change path
*/
- public function renameExtensionIndex( $tableName, $oldIndexName, $newIndexName, $sqlPath, $skipBothIndexExistWarning = false ) {
- $this->extensionUpdates[] = array( 'renameIndex', $tableName, $oldIndexName, $newIndexName, $skipBothIndexExistWarning, $sqlPath, true );
+ public function renameExtensionIndex( $tableName, $oldIndexName, $newIndexName,
+ $sqlPath, $skipBothIndexExistWarning = false
+ ) {
+ $this->extensionUpdates[] = array(
+ 'renameIndex',
+ $tableName,
+ $oldIndexName,
+ $newIndexName,
+ $skipBothIndexExistWarning,
+ $sqlPath,
+ true
+ );
}
/**
* @param string $table Name of the table to modify
* @param string $oldIndex Old name of the index
* @param string $newIndex New name of the index
- * @param $skipBothIndexExistWarning Boolean: Whether to warn if both the old and the new indexes exist.
+ * @param $skipBothIndexExistWarning Boolean: Whether to warn if both the
+ * old and the new indexes exist.
* @param string $patch Path to the patch file
* @param $fullpath Boolean: Whether to treat $patch path as a relative or not
* @return Boolean false if this was skipped because schema changes are skipped
*/
- protected function renameIndex( $table, $oldIndex, $newIndex, $skipBothIndexExistWarning, $patch, $fullpath = false ) {
+ protected function renameIndex( $table, $oldIndex, $newIndex,
+ $skipBothIndexExistWarning, $patch, $fullpath = false
+ ) {
if ( !$this->doTable( $table ) ) {
return true;
}
// Second requirement: the new index must be missing
if ( $this->db->indexExists( $table, $newIndex, __METHOD__ ) ) {
$this->output( "...index $newIndex already set on $table table.\n" );
- if ( !$skipBothIndexExistWarning && $this->db->indexExists( $table, $oldIndex, __METHOD__ ) ) {
- $this->output( "...WARNING: $oldIndex still exists, despite it has been renamed into $newIndex (which also exists).\n" .
+ if ( !$skipBothIndexExistWarning &&
+ $this->db->indexExists( $table, $oldIndex, __METHOD__ )
+ ) {
+ $this->output( "...WARNING: $oldIndex still exists, despite it has " .
+ "been renamed into $newIndex (which also exists).\n" .
" $oldIndex should be manually removed if not needed anymore.\n" );
}
}
// Requirements have been satisfied, patch can be applied
- return $this->applyPatch( $patch, $fullpath, "Renaming index $oldIndex into $newIndex to table $table" );
+ return $this->applyPatch(
+ $patch,
+ $fullpath,
+ "Renaming index $oldIndex into $newIndex to table $table"
+ );
}
/**
if ( !$this->db->tableExists( $table, __METHOD__ ) ) {
$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" );
+ $this->output( "...$field field does not exist in $table table, " .
+ "skipping modify field patch.\n" );
} elseif ( $this->updateRowExists( $updateKey ) ) {
$this->output( "...$field in table $table already modified by patch $patch.\n" );
} else {
// turn (bug nnnn) into links
$text = preg_replace_callback( '/bug (\d+)/', array( $this, 'replaceBugLinks' ), $text );
// add links to manual to every global variable mentioned
- $text = preg_replace_callback( '/(\$wg[a-z0-9_]+)/i', array( $this, 'replaceConfigLinks' ), $text );
+ $text = preg_replace_callback(
+ '/(\$wg[a-z0-9_]+)/i',
+ array( $this, 'replaceConfigLinks' ),
+ $text
+ );
return $text;
}
/**
* URL to mediawiki-announce subscription
*/
- protected $mediaWikiAnnounceUrl = 'https://lists.wikimedia.org/mailman/subscribe/mediawiki-announce';
+ protected $mediaWikiAnnounceUrl =
+ 'https://lists.wikimedia.org/mailman/subscribe/mediawiki-announce';
/**
* Supported language codes for Mailman
$this->showMessage( 'config-using-server', $server );
$this->setVar( 'wgServer', $server );
}
+
return true;
}
$IP = dirname( dirname( __DIR__ ) );
$this->setVar( 'IP', $IP );
- $this->showMessage( 'config-using-uri', $this->getVar( 'wgServer' ), $this->getVar( 'wgScriptPath' ) );
+ $this->showMessage(
+ 'config-using-uri',
+ $this->getVar( 'wgServer' ),
+ $this->getVar( 'wgScriptPath' )
+ );
return true;
}
}
}
- // Uses messages 'config-unicode-using-php', 'config-unicode-using-utf8', 'config-unicode-using-intl'
+ // Uses messages 'config-unicode-using-php', 'config-unicode-using-utf8',
+ // 'config-unicode-using-intl'
if ( $useNormalizer === 'php' ) {
$this->showMessage( 'config-unicode-pure-php-warning' );
} else {
$locale = '';
}
- //$rightsUrl = $this->values['wgRightsUrl'] ? '' : '#'; // TODO: Fixme, I'm unused!
+ //$rightsUrl = $this->values['wgRightsUrl'] ? '' : '#'; // @todo FIXME: I'm unused!
$hashedUploads = $this->safeMode ? '' : '#';
$metaNamespace = '';
if ( $this->values['wgMetaNamespace'] !== $this->values['wgSitename'] ) {
return 'mysql';
}
- public function __construct( $parent ) {
- parent::__construct( $parent );
- }
-
/**
* @return Bool
*/
* @return string
*/
public function getConnectForm() {
- return $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) .
+ return $this->getTextBox(
+ 'wgDBserver',
+ 'config-db-host',
+ array(),
+ $this->parent->getHelpBox( 'config-db-host-help' )
+ ) .
Html::openElement( 'fieldset' ) .
Html::element( 'legend', array(), wfMessage( 'config-db-wiki-settings' )->text() ) .
$this->getTextBox( 'wgDBname', 'config-db-name', array( 'dir' => 'ltr' ),
$conn = $status->value;
$dbName = $this->getVar( 'wgDBname' );
if ( !$conn->selectDB( $dbName ) ) {
- $conn->query( "CREATE DATABASE " . $conn->addIdentifierQuotes( $dbName ) . "CHARACTER SET utf8", __METHOD__ );
+ $conn->query(
+ "CREATE DATABASE " . $conn->addIdentifierQuotes( $dbName ) . "CHARACTER SET utf8",
+ __METHOD__
+ );
$conn->selectDB( $dbName );
}
$this->setupSchemaVars();
protected function getCoreUpdateList() {
return array(
// 1.2
- array( 'addField', 'ipblocks', 'ipb_id', 'patch-ipblocks.sql' ),
- array( 'addField', 'ipblocks', 'ipb_expiry', 'patch-ipb_expiry.sql' ),
+ array( 'addField', 'ipblocks', 'ipb_id', 'patch-ipblocks.sql' ),
+ array( 'addField', 'ipblocks', 'ipb_expiry', 'patch-ipb_expiry.sql' ),
array( 'doInterwikiUpdate' ),
array( 'doIndexUpdate' ),
- array( 'addTable', 'hitcounter', 'patch-hitcounter.sql' ),
- array( 'addField', 'recentchanges', 'rc_type', 'patch-rc_type.sql' ),
+ array( 'addTable', 'hitcounter', 'patch-hitcounter.sql' ),
+ array( 'addField', 'recentchanges', 'rc_type', 'patch-rc_type.sql' ),
// 1.3
- array( 'addField', 'user', 'user_real_name', 'patch-user-realname.sql' ),
- array( 'addTable', 'querycache', 'patch-querycache.sql' ),
- array( 'addTable', 'objectcache', 'patch-objectcache.sql' ),
- array( 'addTable', 'categorylinks', 'patch-categorylinks.sql' ),
+ array( 'addField', 'user', 'user_real_name', 'patch-user-realname.sql' ),
+ array( 'addTable', 'querycache', 'patch-querycache.sql' ),
+ array( 'addTable', 'objectcache', 'patch-objectcache.sql' ),
+ array( 'addTable', 'categorylinks', 'patch-categorylinks.sql' ),
array( 'doOldLinksUpdate' ),
array( 'doFixAncientImagelinks' ),
- array( 'addField', 'recentchanges', 'rc_ip', 'patch-rc_ip.sql' ),
+ array( 'addField', 'recentchanges', 'rc_ip', 'patch-rc_ip.sql' ),
// 1.4
- array( 'addIndex', 'image', 'PRIMARY', 'patch-image_name_primary.sql' ),
- array( 'addField', 'recentchanges', 'rc_id', 'patch-rc_id.sql' ),
- array( 'addField', 'recentchanges', 'rc_patrolled', 'patch-rc-patrol.sql' ),
- array( 'addTable', 'logging', 'patch-logging.sql' ),
- array( 'addField', 'user', 'user_token', 'patch-user_token.sql' ),
- array( 'addField', 'watchlist', 'wl_notificationtimestamp', 'patch-email-notification.sql' ),
+ array( 'addIndex', 'image', 'PRIMARY', 'patch-image_name_primary.sql' ),
+ array( 'addField', 'recentchanges', 'rc_id', 'patch-rc_id.sql' ),
+ array( 'addField', 'recentchanges', 'rc_patrolled', 'patch-rc-patrol.sql' ),
+ array( 'addTable', 'logging', 'patch-logging.sql' ),
+ array( 'addField', 'user', 'user_token', 'patch-user_token.sql' ),
+ array( 'addField', 'watchlist', 'wl_notificationtimestamp', 'patch-email-notification.sql' ),
array( 'doWatchlistUpdate' ),
- array( 'dropField', 'user', 'user_emailauthenticationtimestamp', 'patch-email-authentication.sql' ),
+ array( 'dropField', 'user', 'user_emailauthenticationtimestamp',
+ 'patch-email-authentication.sql' ),
// 1.5
array( 'doSchemaRestructuring' ),
- array( 'addField', 'logging', 'log_params', 'patch-log_params.sql' ),
- array( 'checkBin', 'logging', 'log_title', 'patch-logging-title.sql', ),
- array( 'addField', 'archive', 'ar_rev_id', 'patch-archive-rev_id.sql' ),
- array( 'addField', 'page', 'page_len', 'patch-page_len.sql' ),
- array( 'dropField', 'revision', 'inverse_timestamp', 'patch-inverse_timestamp.sql' ),
- array( 'addField', 'revision', 'rev_text_id', 'patch-rev_text_id.sql' ),
- array( 'addField', 'revision', 'rev_deleted', 'patch-rev_deleted.sql' ),
- array( 'addField', 'image', 'img_width', 'patch-img_width.sql' ),
- array( 'addField', 'image', 'img_metadata', 'patch-img_metadata.sql' ),
- array( 'addField', 'user', 'user_email_token', 'patch-user_email_token.sql' ),
- array( 'addField', 'archive', 'ar_text_id', 'patch-archive-text_id.sql' ),
+ array( 'addField', 'logging', 'log_params', 'patch-log_params.sql' ),
+ array( 'checkBin', 'logging', 'log_title', 'patch-logging-title.sql', ),
+ array( 'addField', 'archive', 'ar_rev_id', 'patch-archive-rev_id.sql' ),
+ array( 'addField', 'page', 'page_len', 'patch-page_len.sql' ),
+ array( 'dropField', 'revision', 'inverse_timestamp', 'patch-inverse_timestamp.sql' ),
+ array( 'addField', 'revision', 'rev_text_id', 'patch-rev_text_id.sql' ),
+ array( 'addField', 'revision', 'rev_deleted', 'patch-rev_deleted.sql' ),
+ array( 'addField', 'image', 'img_width', 'patch-img_width.sql' ),
+ array( 'addField', 'image', 'img_metadata', 'patch-img_metadata.sql' ),
+ array( 'addField', 'user', 'user_email_token', 'patch-user_email_token.sql' ),
+ array( 'addField', 'archive', 'ar_text_id', 'patch-archive-text_id.sql' ),
array( 'doNamespaceSize' ),
- array( 'addField', 'image', 'img_media_type', 'patch-img_media_type.sql' ),
+ array( 'addField', 'image', 'img_media_type', 'patch-img_media_type.sql' ),
array( 'doPagelinksUpdate' ),
- array( 'dropField', 'image', 'img_type', 'patch-drop_img_type.sql' ),
+ array( 'dropField', 'image', 'img_type', 'patch-drop_img_type.sql' ),
array( 'doUserUniqueUpdate' ),
array( 'doUserGroupsUpdate' ),
- array( 'addField', 'site_stats', 'ss_total_pages', 'patch-ss_total_articles.sql' ),
- array( 'addTable', 'user_newtalk', 'patch-usernewtalk2.sql' ),
- array( 'addTable', 'transcache', 'patch-transcache.sql' ),
- array( 'addField', 'interwiki', 'iw_trans', 'patch-interwiki-trans.sql' ),
+ array( 'addField', 'site_stats', 'ss_total_pages', 'patch-ss_total_articles.sql' ),
+ array( 'addTable', 'user_newtalk', 'patch-usernewtalk2.sql' ),
+ array( 'addTable', 'transcache', 'patch-transcache.sql' ),
+ array( 'addField', 'interwiki', 'iw_trans', 'patch-interwiki-trans.sql' ),
// 1.6
array( 'doWatchlistNull' ),
- array( 'addIndex', 'logging', 'times', 'patch-logging-times-index.sql' ),
- array( 'addField', 'ipblocks', 'ipb_range_start', 'patch-ipb_range_start.sql' ),
+ array( 'addIndex', 'logging', 'times', 'patch-logging-times-index.sql' ),
+ array( 'addField', 'ipblocks', 'ipb_range_start', 'patch-ipb_range_start.sql' ),
array( 'doPageRandomUpdate' ),
- array( 'addField', 'user', 'user_registration', 'patch-user_registration.sql' ),
+ array( 'addField', 'user', 'user_registration', 'patch-user_registration.sql' ),
array( 'doTemplatelinksUpdate' ),
- array( 'addTable', 'externallinks', 'patch-externallinks.sql' ),
- array( 'addTable', 'job', 'patch-job.sql' ),
- array( 'addField', 'site_stats', 'ss_images', 'patch-ss_images.sql' ),
- array( 'addTable', 'langlinks', 'patch-langlinks.sql' ),
- array( 'addTable', 'querycache_info', 'patch-querycacheinfo.sql' ),
- array( 'addTable', 'filearchive', 'patch-filearchive.sql' ),
- array( 'addField', 'ipblocks', 'ipb_anon_only', 'patch-ipb_anon_only.sql' ),
- array( 'addIndex', 'recentchanges', 'rc_ns_usertext', 'patch-recentchanges-utindex.sql' ),
- array( 'addIndex', 'recentchanges', 'rc_user_text', 'patch-rc_user_text-index.sql' ),
+ array( 'addTable', 'externallinks', 'patch-externallinks.sql' ),
+ array( 'addTable', 'job', 'patch-job.sql' ),
+ array( 'addField', 'site_stats', 'ss_images', 'patch-ss_images.sql' ),
+ array( 'addTable', 'langlinks', 'patch-langlinks.sql' ),
+ array( 'addTable', 'querycache_info', 'patch-querycacheinfo.sql' ),
+ array( 'addTable', 'filearchive', 'patch-filearchive.sql' ),
+ array( 'addField', 'ipblocks', 'ipb_anon_only', 'patch-ipb_anon_only.sql' ),
+ array( 'addIndex', 'recentchanges', 'rc_ns_usertext', 'patch-recentchanges-utindex.sql' ),
+ array( 'addIndex', 'recentchanges', 'rc_user_text', 'patch-rc_user_text-index.sql' ),
// 1.9
- array( 'addField', 'user', 'user_newpass_time', 'patch-user_newpass_time.sql' ),
- array( 'addTable', 'redirect', 'patch-redirect.sql' ),
- array( 'addTable', 'querycachetwo', 'patch-querycachetwo.sql' ),
- array( 'addField', 'ipblocks', 'ipb_enable_autoblock', 'patch-ipb_optional_autoblock.sql' ),
+ array( 'addField', 'user', 'user_newpass_time', 'patch-user_newpass_time.sql' ),
+ array( 'addTable', 'redirect', 'patch-redirect.sql' ),
+ array( 'addTable', 'querycachetwo', 'patch-querycachetwo.sql' ),
+ array( 'addField', 'ipblocks', 'ipb_enable_autoblock', 'patch-ipb_optional_autoblock.sql' ),
array( 'doBacklinkingIndicesUpdate' ),
- array( 'addField', 'recentchanges', 'rc_old_len', 'patch-rc_len.sql' ),
- array( 'addField', 'user', 'user_editcount', 'patch-user_editcount.sql' ),
+ array( 'addField', 'recentchanges', 'rc_old_len', 'patch-rc_len.sql' ),
+ array( 'addField', 'user', 'user_editcount', 'patch-user_editcount.sql' ),
// 1.10
array( 'doRestrictionsUpdate' ),
- array( 'addField', 'logging', 'log_id', 'patch-log_id.sql' ),
- array( 'addField', 'revision', 'rev_parent_id', 'patch-rev_parent_id.sql' ),
- array( 'addField', 'page_restrictions', 'pr_id', 'patch-page_restrictions_sortkey.sql' ),
- array( 'addField', 'revision', 'rev_len', 'patch-rev_len.sql' ),
- array( 'addField', 'recentchanges', 'rc_deleted', 'patch-rc_deleted.sql' ),
- array( 'addField', 'logging', 'log_deleted', 'patch-log_deleted.sql' ),
- array( 'addField', 'archive', 'ar_deleted', 'patch-ar_deleted.sql' ),
- array( 'addField', 'ipblocks', 'ipb_deleted', 'patch-ipb_deleted.sql' ),
- array( 'addField', 'filearchive', 'fa_deleted', 'patch-fa_deleted.sql' ),
- array( 'addField', 'archive', 'ar_len', 'patch-ar_len.sql' ),
+ array( 'addField', 'logging', 'log_id', 'patch-log_id.sql' ),
+ array( 'addField', 'revision', 'rev_parent_id', 'patch-rev_parent_id.sql' ),
+ array( 'addField', 'page_restrictions', 'pr_id', 'patch-page_restrictions_sortkey.sql' ),
+ array( 'addField', 'revision', 'rev_len', 'patch-rev_len.sql' ),
+ array( 'addField', 'recentchanges', 'rc_deleted', 'patch-rc_deleted.sql' ),
+ array( 'addField', 'logging', 'log_deleted', 'patch-log_deleted.sql' ),
+ array( 'addField', 'archive', 'ar_deleted', 'patch-ar_deleted.sql' ),
+ array( 'addField', 'ipblocks', 'ipb_deleted', 'patch-ipb_deleted.sql' ),
+ array( 'addField', 'filearchive', 'fa_deleted', 'patch-fa_deleted.sql' ),
+ array( 'addField', 'archive', 'ar_len', 'patch-ar_len.sql' ),
// 1.11
- array( 'addField', 'ipblocks', 'ipb_block_email', 'patch-ipb_emailban.sql' ),
+ array( 'addField', 'ipblocks', 'ipb_block_email', 'patch-ipb_emailban.sql' ),
array( 'doCategorylinksIndicesUpdate' ),
- array( 'addField', 'oldimage', 'oi_metadata', 'patch-oi_metadata.sql' ),
- array( 'addIndex', 'archive', 'usertext_timestamp', 'patch-archive-user-index.sql' ),
- array( 'addIndex', 'image', 'img_usertext_timestamp', 'patch-image-user-index.sql' ),
- array( 'addIndex', 'oldimage', 'oi_usertext_timestamp', 'patch-oldimage-user-index.sql' ),
- array( 'addField', 'archive', 'ar_page_id', 'patch-archive-page_id.sql' ),
- array( 'addField', 'image', 'img_sha1', 'patch-img_sha1.sql' ),
+ array( 'addField', 'oldimage', 'oi_metadata', 'patch-oi_metadata.sql' ),
+ array( 'addIndex', 'archive', 'usertext_timestamp', 'patch-archive-user-index.sql' ),
+ array( 'addIndex', 'image', 'img_usertext_timestamp', 'patch-image-user-index.sql' ),
+ array( 'addIndex', 'oldimage', 'oi_usertext_timestamp', 'patch-oldimage-user-index.sql' ),
+ array( 'addField', 'archive', 'ar_page_id', 'patch-archive-page_id.sql' ),
+ array( 'addField', 'image', 'img_sha1', 'patch-img_sha1.sql' ),
// 1.12
- array( 'addTable', 'protected_titles', 'patch-protected_titles.sql' ),
+ array( 'addTable', 'protected_titles', 'patch-protected_titles.sql' ),
// 1.13
- array( 'addField', 'ipblocks', 'ipb_by_text', 'patch-ipb_by_text.sql' ),
- array( 'addTable', 'page_props', 'patch-page_props.sql' ),
- array( 'addTable', 'updatelog', 'patch-updatelog.sql' ),
- array( 'addTable', 'category', 'patch-category.sql' ),
+ array( 'addField', 'ipblocks', 'ipb_by_text', 'patch-ipb_by_text.sql' ),
+ array( 'addTable', 'page_props', 'patch-page_props.sql' ),
+ array( 'addTable', 'updatelog', 'patch-updatelog.sql' ),
+ array( 'addTable', 'category', 'patch-category.sql' ),
array( 'doCategoryPopulation' ),
- array( 'addField', 'archive', 'ar_parent_id', 'patch-ar_parent_id.sql' ),
- array( 'addField', 'user_newtalk', 'user_last_timestamp', 'patch-user_last_timestamp.sql' ),
+ array( 'addField', 'archive', 'ar_parent_id', 'patch-ar_parent_id.sql' ),
+ array( 'addField', 'user_newtalk', 'user_last_timestamp', 'patch-user_last_timestamp.sql' ),
array( 'doPopulateParentId' ),
- array( 'checkBin', 'protected_titles', 'pt_title', 'patch-pt_title-encoding.sql', ),
+ array( 'checkBin', 'protected_titles', 'pt_title', 'patch-pt_title-encoding.sql', ),
array( 'doMaybeProfilingMemoryUpdate' ),
array( 'doFilearchiveIndicesUpdate' ),
// 1.14
- array( 'addField', 'site_stats', 'ss_active_users', 'patch-ss_active_users.sql' ),
+ array( 'addField', 'site_stats', 'ss_active_users', 'patch-ss_active_users.sql' ),
array( 'doActiveUsersInit' ),
- array( 'addField', 'ipblocks', 'ipb_allow_usertalk', 'patch-ipb_allow_usertalk.sql' ),
+ array( 'addField', 'ipblocks', 'ipb_allow_usertalk', 'patch-ipb_allow_usertalk.sql' ),
// 1.15
array( 'doUniquePlTlIl' ),
- array( 'addTable', 'change_tag', 'patch-change_tag.sql' ),
- array( 'addTable', 'tag_summary', 'patch-tag_summary.sql' ),
- array( 'addTable', 'valid_tag', 'patch-valid_tag.sql' ),
+ array( 'addTable', 'change_tag', 'patch-change_tag.sql' ),
+ array( 'addTable', 'tag_summary', 'patch-tag_summary.sql' ),
+ array( 'addTable', 'valid_tag', 'patch-valid_tag.sql' ),
// 1.16
- array( 'addTable', 'user_properties', 'patch-user_properties.sql' ),
- array( 'addTable', 'log_search', 'patch-log_search.sql' ),
- array( 'addField', 'logging', 'log_user_text', 'patch-log_user_text.sql' ),
- array( 'doLogUsertextPopulation' ), # listed separately from the previous update because 1.16 was released without this update
+ array( 'addTable', 'user_properties', 'patch-user_properties.sql' ),
+ array( 'addTable', 'log_search', 'patch-log_search.sql' ),
+ array( 'addField', 'logging', 'log_user_text', 'patch-log_user_text.sql' ),
+ # listed separately from the previous update because 1.16 was released without this update
+ array( 'doLogUsertextPopulation' ),
array( 'doLogSearchPopulation' ),
- array( 'addTable', 'l10n_cache', 'patch-l10n_cache.sql' ),
- array( 'addIndex', 'log_search', 'ls_field_val', 'patch-log_search-rename-index.sql' ),
- array( 'addIndex', 'change_tag', 'change_tag_rc_tag', 'patch-change_tag-indexes.sql' ),
- array( 'addField', 'redirect', 'rd_interwiki', 'patch-rd_interwiki.sql' ),
+ array( 'addTable', 'l10n_cache', 'patch-l10n_cache.sql' ),
+ array( 'addIndex', 'log_search', 'ls_field_val', 'patch-log_search-rename-index.sql' ),
+ array( 'addIndex', 'change_tag', 'change_tag_rc_tag', 'patch-change_tag-indexes.sql' ),
+ array( 'addField', 'redirect', 'rd_interwiki', 'patch-rd_interwiki.sql' ),
array( 'doUpdateTranscacheField' ),
array( 'doUpdateMimeMinorField' ),
// 1.17
- array( 'addTable', 'iwlinks', 'patch-iwlinks.sql' ),
- array( 'addIndex', 'iwlinks', 'iwl_prefix_title_from', 'patch-rename-iwl_prefix.sql' ),
- array( 'addField', 'updatelog', 'ul_value', 'patch-ul_value.sql' ),
- array( 'addField', 'interwiki', 'iw_api', 'patch-iw_api_and_wikiid.sql' ),
- array( 'dropIndex', 'iwlinks', 'iwl_prefix', 'patch-kill-iwl_prefix.sql' ),
- array( 'addField', 'categorylinks', 'cl_collation', 'patch-categorylinks-better-collation.sql' ),
+ array( 'addTable', 'iwlinks', 'patch-iwlinks.sql' ),
+ array( 'addIndex', 'iwlinks', 'iwl_prefix_title_from', 'patch-rename-iwl_prefix.sql' ),
+ array( 'addField', 'updatelog', 'ul_value', 'patch-ul_value.sql' ),
+ array( 'addField', 'interwiki', 'iw_api', 'patch-iw_api_and_wikiid.sql' ),
+ array( 'dropIndex', 'iwlinks', 'iwl_prefix', 'patch-kill-iwl_prefix.sql' ),
+ array( 'addField', 'categorylinks', 'cl_collation', 'patch-categorylinks-better-collation.sql' ),
array( 'doClFieldsUpdate' ),
array( 'doCollationUpdate' ),
- array( 'addTable', 'msg_resource', 'patch-msg_resource.sql' ),
- array( 'addTable', 'module_deps', 'patch-module_deps.sql' ),
- array( 'dropIndex', 'archive', 'ar_page_revid', 'patch-archive_kill_ar_page_revid.sql' ),
- array( 'addIndex', 'archive', 'ar_revid', 'patch-archive_ar_revid.sql' ),
+ array( 'addTable', 'msg_resource', 'patch-msg_resource.sql' ),
+ array( 'addTable', 'module_deps', 'patch-module_deps.sql' ),
+ array( 'dropIndex', 'archive', 'ar_page_revid', 'patch-archive_kill_ar_page_revid.sql' ),
+ array( 'addIndex', 'archive', 'ar_revid', 'patch-archive_ar_revid.sql' ),
array( 'doLangLinksLengthUpdate' ),
// 1.18
array( 'doUserNewTalkTimestampNotNull' ),
- array( 'addIndex', 'user', 'user_email', 'patch-user_email_index.sql' ),
+ array( 'addIndex', 'user', 'user_email', 'patch-user_email_index.sql' ),
array( 'modifyField', 'user_properties', 'up_property', 'patch-up_property.sql' ),
- array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ),
- array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql'),
+ array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ),
+ array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql' ),
// 1.19
- array( 'addIndex', 'logging', 'type_action', 'patch-logging-type-action-index.sql'),
- array( 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1.sql' ),
+ array( 'addIndex', 'logging', 'type_action', 'patch-logging-type-action-index.sql' ),
+ array( 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1.sql' ),
array( 'doMigrateUserOptions' ),
- array( 'dropField', 'user', 'user_options', 'patch-drop-user_options.sql' ),
- array( 'addField', 'archive', 'ar_sha1', 'patch-ar_sha1.sql' ),
- array( 'addIndex', 'page', 'page_redirect_namespace_len', 'patch-page_redirect_namespace_len.sql' ),
- array( 'addField', 'uploadstash', 'us_chunk_inx', 'patch-uploadstash_chunk.sql' ),
- array( 'addfield', 'job', 'job_timestamp', 'patch-jobs-add-timestamp.sql' ),
+ array( 'dropField', 'user', 'user_options', 'patch-drop-user_options.sql' ),
+ array( 'addField', 'archive', 'ar_sha1', 'patch-ar_sha1.sql' ),
+ array( 'addIndex', 'page', 'page_redirect_namespace_len',
+ 'patch-page_redirect_namespace_len.sql' ),
+ array( 'addField', 'uploadstash', 'us_chunk_inx', 'patch-uploadstash_chunk.sql' ),
+ array( 'addfield', 'job', 'job_timestamp', 'patch-jobs-add-timestamp.sql' ),
// 1.20
array( 'addIndex', 'revision', 'page_user_timestamp', 'patch-revision-user-page-index.sql' ),
- array( 'addField', 'ipblocks', 'ipb_parent_block_id', 'patch-ipb-parent-block-id.sql' ),
- array( 'addIndex', 'ipblocks', 'ipb_parent_block_id', 'patch-ipb-parent-block-id-index.sql' ),
- array( 'dropField', 'category', 'cat_hidden', 'patch-cat_hidden.sql' ),
+ array( 'addField', 'ipblocks', 'ipb_parent_block_id', 'patch-ipb-parent-block-id.sql' ),
+ array( 'addIndex', 'ipblocks', 'ipb_parent_block_id', 'patch-ipb-parent-block-id-index.sql' ),
+ array( 'dropField', 'category', 'cat_hidden', 'patch-cat_hidden.sql' ),
// 1.21
- array( 'addField', 'revision', 'rev_content_format', 'patch-revision-rev_content_format.sql' ),
- array( 'addField', 'revision', 'rev_content_model', 'patch-revision-rev_content_model.sql' ),
- array( 'addField', 'archive', 'ar_content_format', 'patch-archive-ar_content_format.sql' ),
- array( 'addField', 'archive', 'ar_content_model', 'patch-archive-ar_content_model.sql' ),
- array( 'addField', 'page', 'page_content_model', 'patch-page-page_content_model.sql' ),
- array( 'dropField', 'site_stats', 'ss_admins', 'patch-drop-ss_admins.sql' ),
- array( 'dropField', 'recentchanges', 'rc_moved_to_title', 'patch-rc_moved.sql' ),
- array( 'addTable', 'sites', 'patch-sites.sql' ),
- array( 'addField', 'filearchive', 'fa_sha1', 'patch-fa_sha1.sql' ),
- array( 'addField', 'job', 'job_token', 'patch-job_token.sql' ),
- array( 'addField', 'job', 'job_attempts', 'patch-job_attempts.sql' ),
+ array( 'addField', 'revision', 'rev_content_format', 'patch-revision-rev_content_format.sql' ),
+ array( 'addField', 'revision', 'rev_content_model', 'patch-revision-rev_content_model.sql' ),
+ array( 'addField', 'archive', 'ar_content_format', 'patch-archive-ar_content_format.sql' ),
+ array( 'addField', 'archive', 'ar_content_model', 'patch-archive-ar_content_model.sql' ),
+ array( 'addField', 'page', 'page_content_model', 'patch-page-page_content_model.sql' ),
+ array( 'dropField', 'site_stats', 'ss_admins', 'patch-drop-ss_admins.sql' ),
+ array( 'dropField', 'recentchanges', 'rc_moved_to_title', 'patch-rc_moved.sql' ),
+ array( 'addTable', 'sites', 'patch-sites.sql' ),
+ array( 'addField', 'filearchive', 'fa_sha1', 'patch-fa_sha1.sql' ),
+ array( 'addField', 'job', 'job_token', 'patch-job_token.sql' ),
+ array( 'addField', 'job', 'job_attempts', 'patch-job_attempts.sql' ),
array( 'doEnableProfiling' ),
- array( 'addField', 'uploadstash', 'us_props', 'patch-uploadstash-us_props.sql' ),
+ array( 'addField', 'uploadstash', 'us_props', 'patch-uploadstash-us_props.sql' ),
array( 'modifyField', 'user_groups', 'ug_group', 'patch-ug_group-length-increase-255.sql' ),
- array( 'modifyField', 'user_former_groups', 'ufg_group', 'patch-ufg_group-length-increase-255.sql' ),
- array( 'addIndex', 'page_props', 'pp_propname_page', 'patch-page_props-propname-page-index.sql' ),
+ array( 'modifyField', 'user_former_groups', 'ufg_group',
+ 'patch-ufg_group-length-increase-255.sql' ),
+ array( 'addIndex', 'page_props', 'pp_propname_page',
+ 'patch-page_props-propname-page-index.sql' ),
array( 'addIndex', 'image', 'img_media_mime', 'patch-img_media_mime-index.sql' ),
// 1.22
array( 'doIwlinksIndexNonUnique' ),
- array( 'addIndex', 'iwlinks', 'iwl_prefix_from_title', 'patch-iwlinks-from-title-index.sql' ),
- array( 'addField', 'archive', 'ar_id', 'patch-archive-ar_id.sql' ),
- array( 'addField', 'externallinks', 'el_id', 'patch-externallinks-el_id.sql' ),
+ array( 'addIndex', 'iwlinks', 'iwl_prefix_from_title',
+ 'patch-iwlinks-from-title-index.sql' ),
+ array( 'addField', 'archive', 'ar_id', 'patch-archive-ar_id.sql' ),
+ array( 'addField', 'externallinks', 'el_id', 'patch-externallinks-el_id.sql' ),
);
}
}
$this->applyPatch( 'patch-interwiki.sql', false, 'Creating interwiki table' );
- $this->applyPatch( "$IP/maintenance/interwiki.sql", true, 'Adding default interwiki definitions' );
+ $this->applyPatch(
+ "$IP/maintenance/interwiki.sql",
+ true,
+ 'Adding default interwiki definitions'
+ );
}
/**
return;
}
- if ( $this->applyPatch( 'patch-fix-il_from.sql', false, "Fixing ancient broken imagelinks table." ) ) {
+ $applied = $this->applyPatch(
+ 'patch-fix-il_from.sql',
+ false,
+ 'Fixing ancient broken imagelinks table.'
+ );
+
+ if ( $applied ) {
$this->output( "NOTE: you will have to run maintenance/refreshLinks.php after this." );
}
}
*/
function doWatchlistUpdate() {
$talk = $this->db->selectField( 'watchlist', 'count(*)', 'wl_namespace & 1', __METHOD__ );
- $nontalk = $this->db->selectField( 'watchlist', 'count(*)', 'NOT (wl_namespace & 1)', __METHOD__ );
+ $nontalk = $this->db->selectField(
+ 'watchlist',
+ 'count(*)',
+ 'NOT (wl_namespace & 1)',
+ __METHOD__
+ );
if ( $talk == $nontalk ) {
$this->output( "...watchlist talk page rows already present.\n" );
$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__ );
+ $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__
+ );
if ( $rows->numRows() > 0 ) {
$this->output( wfTimestamp( TS_DB ) );
if ( !isset( $duplicate[$row->cur_namespace] ) ) {
$duplicate[$row->cur_namespace] = array();
}
+
$duplicate[$row->cur_namespace][] = $row->cur_title;
- $this->output( sprintf( " %-60s %3s %5s\n", $row->cur_title, $row->cur_namespace, $row->c ) );
+ $this->output( sprintf(
+ " %-60s %3s %5s\n",
+ $row->cur_title, $row->cur_namespace,
+ $row->c
+ ) );
}
$sql = "SELECT cur_title, cur_namespace, cur_id, cur_timestamp FROM $cur WHERE ";
$firstCond = true;
$this->output( wfTimestamp( TS_DB ) );
$this->output( "......Locking tables.\n" );
- $this->db->query( "LOCK TABLES $page WRITE, $revision WRITE, $old WRITE, $cur WRITE", __METHOD__ );
+ $this->db->query(
+ "LOCK TABLES $page WRITE, $revision WRITE, $old WRITE, $cur WRITE",
+ __METHOD__
+ );
$maxold = intval( $this->db->selectField( 'old', 'max(old_id)', '', __METHOD__ ) );
$this->output( wfTimestamp( TS_DB ) );
$cur_text = 'cur_text';
$cur_flags = "''";
}
- $this->db->query( "INSERT INTO $old (old_namespace, old_title, old_text, old_comment, old_user, old_user_text,
- old_timestamp, old_minor_edit, old_flags)
- SELECT cur_namespace, cur_title, $cur_text, cur_comment, cur_user, cur_user_text, cur_timestamp, cur_minor_edit, $cur_flags
- FROM $cur", __METHOD__ );
+ $this->db->query(
+ "INSERT INTO $old (old_namespace, old_title, old_text, old_comment, old_user,
+ old_user_text, old_timestamp, old_minor_edit, old_flags)
+ SELECT cur_namespace, cur_title, $cur_text, cur_comment, cur_user, cur_user_text,
+ cur_timestamp, cur_minor_edit, $cur_flags
+ FROM $cur",
+ __METHOD__
+ );
$this->output( wfTimestamp( TS_DB ) );
$this->output( "......Setting up revision table.\n" );
- $this->db->query( "INSERT INTO $revision (rev_id, rev_page, rev_comment, rev_user, rev_user_text, rev_timestamp,
- rev_minor_edit)
+ $this->db->query(
+ "INSERT INTO $revision (rev_id, rev_page, rev_comment, rev_user,
+ rev_user_text, rev_timestamp, rev_minor_edit)
SELECT old_id, cur_id, old_comment, old_user, old_user_text,
old_timestamp, old_minor_edit
- FROM $old,$cur WHERE old_namespace=cur_namespace AND old_title=cur_title", __METHOD__ );
+ FROM $old,$cur WHERE old_namespace=cur_namespace AND old_title=cur_title",
+ __METHOD__
+ );
$this->output( wfTimestamp( TS_DB ) );
$this->output( "......Setting up page table.\n" );
- $this->db->query( "INSERT INTO $page (page_id, page_namespace, page_title, page_restrictions, page_counter,
- page_is_redirect, page_is_new, page_random, page_touched, page_latest, page_len)
- SELECT cur_id, cur_namespace, cur_title, cur_restrictions, cur_counter, cur_is_redirect, cur_is_new,
- cur_random, cur_touched, rev_id, LENGTH(cur_text)
+ $this->db->query(
+ "INSERT INTO $page (page_id, page_namespace, page_title,
+ page_restrictions, page_counter, page_is_redirect, page_is_new, page_random,
+ page_touched, page_latest, page_len)
+ SELECT cur_id, cur_namespace, cur_title, cur_restrictions, cur_counter,
+ cur_is_redirect, cur_is_new, cur_random, cur_touched, rev_id, LENGTH(cur_text)
FROM $cur,$revision
- WHERE cur_id=rev_page AND rev_timestamp=cur_timestamp AND rev_id > {$maxold}", __METHOD__ );
+ WHERE cur_id=rev_page AND rev_timestamp=cur_timestamp AND rev_id > {$maxold}",
+ __METHOD__
+ );
$this->output( wfTimestamp( TS_DB ) );
$this->output( "......Unlocking tables.\n" );
return;
}
- $this->applyPatch( 'patch-pagelinks.sql', false, "Converting links and brokenlinks tables to pagelinks" );
+ $this->applyPatch(
+ 'patch-pagelinks.sql',
+ false,
+ 'Converting links and brokenlinks tables to pagelinks'
+ );
global $wgContLang;
foreach ( MWNamespace::getCanonicalNamespaces() as $ns => $name ) {
if ( $info->type() == 'int' ) {
$oldug = $this->db->tableName( 'user_groups' );
$newug = $this->db->tableName( 'user_groups_bogus' );
- $this->output( "user_groups table exists but is in bogus intermediate format. Renaming to $newug... " );
+ $this->output( "user_groups table exists but is in bogus intermediate " .
+ "format. Renaming to $newug... " );
$this->db->query( "ALTER TABLE $oldug RENAME TO $newug", __METHOD__ );
$this->output( "done.\n" );
$this->applyPatch( 'patch-user_groups.sql', false, "Re-adding fresh user_groups table" );
$this->output( "***\n" );
- $this->output( "*** WARNING: You will need to manually fix up user permissions in the user_groups\n" );
+ $this->output( "*** WARNING: You will need to manually fix up user " .
+ "permissions in the user_groups\n" );
$this->output( "*** table. Old 1.5 alpha versions did some pretty funky stuff...\n" );
$this->output( "***\n" );
} else {
if ( !$this->db->tableExists( 'user_rights', __METHOD__ ) ) {
if ( $this->db->fieldExists( 'user', 'user_rights', __METHOD__ ) ) {
- $this->db->applyPatch( 'patch-user_rights.sql', false, "Upgrading from a 1.3 or older database? Breaking out user_rights for conversion" );
+ $this->db->applyPatch(
+ 'patch-user_rights.sql',
+ false,
+ 'Upgrading from a 1.3 or older database? Breaking out user_rights for conversion'
+ );
} else {
$this->output( "*** WARNING: couldn't locate user_rights table or field for upgrade.\n" );
$this->output( "*** You may need to manually configure some sysops by manipulating\n" );
return;
}
- $this->applyPatch( 'patch-watchlist-null.sql', false, "Making wl_notificationtimestamp nullable" );
+ $this->applyPatch(
+ 'patch-watchlist-null.sql',
+ false,
+ 'Making wl_notificationtimestamp nullable'
+ );
}
/**
), __METHOD__
);
}
- $this->output( "Done. Please run maintenance/refreshLinks.php for a more thorough templatelinks update.\n" );
+ $this->output( "Done. Please run maintenance/refreshLinks.php for a more " .
+ "thorough templatelinks update.\n" );
}
protected function doBacklinkingIndicesUpdate() {
return;
}
- $this->applyPatch( 'patch-page_restrictions.sql', false, "Creating page_restrictions table (1/2)" );
- $this->applyPatch( 'patch-page_restrictions_sortkey.sql', false, "Creating page_restrictions table (2/2)" );
+ $this->applyPatch(
+ 'patch-page_restrictions.sql',
+ false,
+ 'Creating page_restrictions table (1/2)'
+ );
+ $this->applyPatch(
+ 'patch-page_restrictions_sortkey.sql',
+ false,
+ 'Creating page_restrictions table (2/2)'
+ );
$this->output( "done.\n" );
$this->output( "Migrating old restrictions to new table...\n" );
return true;
}
- return $this->applyPatch( 'patch-profiling-memory.sql', false, "Adding pf_memory field to table profiling" );
+ return $this->applyPatch(
+ 'patch-profiling-memory.sql',
+ false,
+ 'Adding pf_memory field to table profiling'
+ );
}
protected function doFilearchiveIndicesUpdate() {
return true;
}
if ( $this->skipSchema ) {
- $this->output( "...skipping schema change (making pl_namespace, tl_namespace and il_to indices UNIQUE).\n" );
+ $this->output( "...skipping schema change (making pl_namespace, tl_namespace " .
+ "and il_to indices UNIQUE).\n" );
return false;
}
- return $this->applyPatch( 'patch-pl-tl-il-unique.sql', false, "Making pl_namespace, tl_namespace and il_to indices UNIQUE" );
+ return $this->applyPatch(
+ 'patch-pl-tl-il-unique.sql',
+ false,
+ 'Making pl_namespace, tl_namespace and il_to indices UNIQUE'
+ );
}
protected function doUpdateMimeMinorField() {
return;
}
- $this->applyPatch( 'patch-mime_minor_length.sql', false, "Altering all *_mime_minor fields to 100 bytes in size" );
+ $this->applyPatch(
+ 'patch-mime_minor_length.sql',
+ false,
+ 'Altering all *_mime_minor fields to 100 bytes in size'
+ );
}
protected function doClFieldsUpdate() {
return;
}
- $this->applyPatch( 'patch-categorylinks-better-collation2.sql', false, 'Updating categorylinks (again)' );
+ $this->applyPatch(
+ 'patch-categorylinks-better-collation2.sql',
+ false,
+ 'Updating categorylinks (again)'
+ );
}
protected function doLangLinksLengthUpdate() {
$row = $this->db->fetchObject( $res );
if ( $row && $row->Type == "varbinary(10)" ) {
- $this->applyPatch( 'patch-langlinks-ll_lang-20.sql', false, 'Updating length of ll_lang in langlinks' );
+ $this->applyPatch(
+ 'patch-langlinks-ll_lang-20.sql',
+ false,
+ 'Updating length of ll_lang in langlinks'
+ );
} else {
$this->output( "...ll_lang is up-to-date.\n" );
}
return;
}
- $this->applyPatch( 'patch-user-newtalk-timestamp-null.sql', false, "Making user_last_timestamp nullable" );
+ $this->applyPatch(
+ 'patch-user-newtalk-timestamp-null.sql',
+ false,
+ 'Making user_last_timestamp nullable'
+ );
}
protected function doIwlinksIndexNonUnique() {
return false;
}
- return $this->applyPatch( 'patch-iwl_prefix_title_from-non-unique.sql', false, "Making iwl_prefix_title_from index non-UNIQUE" );
+ return $this->applyPatch(
+ 'patch-iwl_prefix_title_from-non-unique.sql',
+ false,
+ 'Making iwl_prefix_title_from index non-UNIQUE'
+ );
}
}
$this->parent->setVar( 'wgDBserver', '' );
}
- return $this->getTextBox( 'wgDBserver', 'config-db-host-oracle', array(), $this->parent->getHelpBox( 'config-db-host-oracle-help' ) ) .
+ return $this->getTextBox(
+ 'wgDBserver',
+ 'config-db-host-oracle',
+ array(),
+ $this->parent->getHelpBox( 'config-db-host-oracle-help' )
+ ) .
Html::openElement( 'fieldset' ) .
Html::element( 'legend', array(), wfMessage( 'config-db-wiki-settings' )->text() ) .
$this->getTextBox( 'wgDBprefix', 'config-db-prefix' ) .
$this->getTextBox( '_OracleDefTS', 'config-oracle-def-ts' ) .
- $this->getTextBox( '_OracleTempTS', 'config-oracle-temp-ts', array(), $this->parent->getHelpBox( 'config-db-oracle-help' ) ) .
+ $this->getTextBox(
+ '_OracleTempTS',
+ 'config-oracle-temp-ts',
+ array(),
+ $this->parent->getHelpBox( 'config-db-oracle-help' )
+ ) .
Html::closeElement( 'fieldset' ) .
$this->parent->getWarningBox( wfMessage( 'config-db-account-oracle-warn' )->text() ) .
$this->getInstallUserBox() .
public function submitConnectForm() {
// Get variables from the request
- $newValues = $this->setVarsFromRequest( array( 'wgDBserver', 'wgDBprefix', 'wgDBuser', 'wgDBpassword' ) );
+ $newValues = $this->setVarsFromRequest(
+ 'wgDBserver',
+ 'wgDBprefix',
+ 'wgDBuser',
+ 'wgDBpassword'
+ );
$this->parent->setVar( 'wgDBname', $this->getVar( 'wgDBuser' ) );
// Validate them
* @return bool Whether the connection string is valid.
*/
public static function checkConnectStringFormat( $connect_string ) {
+ // @@codingStandardsIgnoreStart Long lines with regular expressions.
+ // @todo Very long regular expression. Make more readable?
$isValid = preg_match( '/^[[:alpha:]][\w\-]*(?:\.[[:alpha:]][\w\-]*){0,2}$/', $connect_string ); // TNS name
$isValid |= preg_match( '/^(?:\/\/)?[\w\-\.]+(?::[\d]+)?(?:\/(?:[\w\-\.]+(?::(pooled|dedicated|shared))?)?(?:\/[\w\-\.]+)?)?$/', $connect_string ); // EZConnect
+ // @@codingStandardsIgnoreEnd
return (bool)$isValid;
}
}
array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql' ),
//1.18
- array( 'addIndex', 'user', 'i02', 'patch-user_email_index.sql' ),
+ array( 'addIndex', 'user', 'i02', 'patch-user_email_index.sql' ),
array( 'modifyField', 'user_properties', 'up_property', 'patch-up_property.sql' ),
array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ),
array( 'doRecentchangesFK2Cascade' ),
//1.19
- array( 'addIndex', 'logging', 'i05', 'patch-logging_type_action_index.sql'),
+ array( 'addIndex', 'logging', 'i05', 'patch-logging_type_action_index.sql' ),
array( 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1_field.sql' ),
array( 'addField', 'archive', 'ar_sha1', 'patch-ar_sha1_field.sql' ),
array( 'doRemoveNotNullEmptyDefaults2' ),
array( 'dropField', 'category', 'cat_hidden', 'patch-cat_hidden.sql' ),
//1.21
- array( 'addField', 'revision', 'rev_content_format', 'patch-revision-rev_content_format.sql' ),
- array( 'addField', 'revision', 'rev_content_model', 'patch-revision-rev_content_model.sql' ),
- array( 'addField', 'archive', 'ar_content_format', 'patch-archive-ar_content_format.sql' ),
- array( 'addField', 'archive', 'ar_content_model', 'patch-archive-ar_content_model.sql' ),
- array( 'addField', 'archive', 'ar_id', 'patch-archive-ar_id.sql' ),
- array( 'addField', 'externallinks', 'el_id', 'patch-externallinks-el_id.sql' ),
- array( 'addField', 'page', 'page_content_model', 'patch-page-page_content_model.sql' ),
- array( 'dropField', 'site_stats', 'ss_admins', 'patch-ss_admins.sql' ),
+ array( 'addField', 'revision', 'rev_content_format',
+ 'patch-revision-rev_content_format.sql' ),
+ array( 'addField', 'revision', 'rev_content_model',
+ 'patch-revision-rev_content_model.sql' ),
+ array( 'addField', 'archive', 'ar_content_format', 'patch-archive-ar_content_format.sql' ),
+ array( 'addField', 'archive', 'ar_content_model', 'patch-archive-ar_content_model.sql' ),
+ array( 'addField', 'archive', 'ar_id', 'patch-archive-ar_id.sql' ),
+ array( 'addField', 'externallinks', 'el_id', 'patch-externallinks-el_id.sql' ),
+ array( 'addField', 'page', 'page_content_model', 'patch-page-page_content_model.sql' ),
+ array( 'dropField', 'site_stats', 'ss_admins', 'patch-ss_admins.sql' ),
array( 'dropField', 'recentchanges', 'rc_moved_to_title', 'patch-rc_moved.sql' ),
- array( 'addTable', 'sites', 'patch-sites.sql' ),
- array( 'addField', 'filearchive', 'fa_sha1', 'patch-fa_sha1.sql' ),
- array( 'addField', 'job', 'job_token', 'patch-job_token.sql' ),
- array( 'addField', 'job', 'job_attempts', 'patch-job_attempts.sql' ),
- array( 'addField', 'uploadstash', 'us_props', 'patch-uploadstash-us_props.sql' ),
+ array( 'addTable', 'sites', 'patch-sites.sql' ),
+ array( 'addField', 'filearchive', 'fa_sha1', 'patch-fa_sha1.sql' ),
+ array( 'addField', 'job', 'job_token', 'patch-job_token.sql' ),
+ array( 'addField', 'job', 'job_attempts', 'patch-job_attempts.sql' ),
+ array( 'addField', 'uploadstash', 'us_props', 'patch-uploadstash-us_props.sql' ),
array( 'modifyField', 'user_groups', 'ug_group', 'patch-ug_group-length-increase-255.sql' ),
- array( 'modifyField', 'user_former_groups', 'ufg_group', 'patch-ufg_group-length-increase-255.sql' ),
+ array( 'modifyField', 'user_former_groups', 'ufg_group',
+ 'patch-ufg_group-length-increase-255.sql' ),
// KEEP THIS AT THE BOTTOM!!
array( 'doRebuildDuplicateFunction' ),
return;
}
- $this->applyPatch( 'patch_namespace_defaults.sql', false, "Altering namespace fields with default value" );
+ $this->applyPatch(
+ 'patch_namespace_defaults.sql',
+ false,
+ 'Altering namespace fields with default value'
+ );
}
/**
* Uniform FK names + deferrable state
*/
protected function doFKRenameDeferr() {
- $meta = $this->db->query( 'SELECT COUNT(*) cnt FROM user_constraints WHERE constraint_type = \'R\' AND deferrable = \'DEFERRABLE\'' );
+ $meta = $this->db->query( '
+ SELECT COUNT(*) cnt
+ FROM user_constraints
+ WHERE constraint_type = \'R\' AND deferrable = \'DEFERRABLE\''
+ );
$row = $meta->fetchRow();
if ( $row && $row['cnt'] > 0 ) {
return;
if ( $meta->isNullable() ) {
return;
}
- $this->applyPatch( 'patch_remove_not_null_empty_defs.sql', false, "Removing not null empty constraints" );
+ $this->applyPatch(
+ 'patch_remove_not_null_empty_defs.sql',
+ false,
+ 'Removing not null empty constraints'
+ );
}
protected function doRemoveNotNullEmptyDefaults2() {
if ( $meta->isNullable() ) {
return;
}
- $this->applyPatch( 'patch_remove_not_null_empty_defs2.sql', false, "Removing not null empty constraints" );
+ $this->applyPatch(
+ 'patch_remove_not_null_empty_defs2.sql',
+ false,
+ 'Removing not null empty constraints'
+ );
}
/**
'_InstallUser' => 'postgres',
);
- var $minimumVersion = '8.3';
- var $maxRoleSearchDepth = 5;
+ public $minimumVersion = '8.3';
+ public $maxRoleSearchDepth = 5;
protected $pgConns = array();
}
function getConnectForm() {
- return $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) .
+ return $this->getTextBox(
+ 'wgDBserver',
+ 'config-db-host',
+ array(),
+ $this->parent->getHelpBox( 'config-db-host-help' )
+ ) .
$this->getTextBox( 'wgDBport', 'config-db-port' ) .
Html::openElement( 'fieldset' ) .
Html::element( 'legend', array(), wfMessage( 'config-db-wiki-settings' )->text() ) .
- $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-db-name-help' ) ) .
- $this->getTextBox( 'wgDBmwschema', 'config-db-schema', array(), $this->parent->getHelpBox( 'config-db-schema-help' ) ) .
+ $this->getTextBox(
+ 'wgDBname',
+ 'config-db-name',
+ array(),
+ $this->parent->getHelpBox( 'config-db-name-help' )
+ ) .
+ $this->getTextBox(
+ 'wgDBmwschema',
+ 'config-db-schema',
+ array(),
+ $this->parent->getHelpBox( 'config-db-schema-help' )
+ ) .
Html::closeElement( 'fieldset' ) .
$this->getInstallUserBox();
}
array( 'renameIndex', 'pagecontent', 'text_pkey', 'pagecontent_pkey' ),
# renamed sequences
- array( 'renameSequence', 'ipblocks_ipb_id_val', 'ipblocks_ipb_id_seq' ),
- array( 'renameSequence', 'rev_rev_id_val', 'revision_rev_id_seq' ),
- array( 'renameSequence', 'text_old_id_val', 'text_old_id_seq' ),
- array( 'renameSequence', 'rc_rc_id_seq', 'recentchanges_rc_id_seq' ),
- array( 'renameSequence', 'log_log_id_seq', 'logging_log_id_seq' ),
- array( 'renameSequence', 'pr_id_val', 'page_restrictions_pr_id_seq' ),
- array( 'renameSequence', 'us_id_seq', 'uploadstash_us_id_seq' ),
+ array( 'renameSequence', 'ipblocks_ipb_id_val', 'ipblocks_ipb_id_seq' ),
+ array( 'renameSequence', 'rev_rev_id_val', 'revision_rev_id_seq' ),
+ array( 'renameSequence', 'text_old_id_val', 'text_old_id_seq' ),
+ array( 'renameSequence', 'rc_rc_id_seq', 'recentchanges_rc_id_seq' ),
+ array( 'renameSequence', 'log_log_id_seq', 'logging_log_id_seq' ),
+ array( 'renameSequence', 'pr_id_val', 'page_restrictions_pr_id_seq' ),
+ array( 'renameSequence', 'us_id_seq', 'uploadstash_us_id_seq' ),
# since r58263
- array( 'renameSequence', 'category_id_seq', 'category_cat_id_seq'),
+ array( 'renameSequence', 'category_id_seq', 'category_cat_id_seq' ),
# new sequences if not renamed above
array( 'addSequence', 'logging', false, 'logging_log_id_seq' ),
array( 'addSequence', 'filearchive', 'fa_id', 'filearchive_fa_id_seq' ),
# new tables
- array( 'addTable', 'category', 'patch-category.sql' ),
- array( 'addTable', 'page', 'patch-page.sql' ),
- array( 'addTable', 'querycachetwo', 'patch-querycachetwo.sql' ),
- array( 'addTable', 'page_props', 'patch-page_props.sql' ),
+ array( 'addTable', 'category', 'patch-category.sql' ),
+ array( 'addTable', 'page', 'patch-page.sql' ),
+ array( 'addTable', 'querycachetwo', 'patch-querycachetwo.sql' ),
+ array( 'addTable', 'page_props', 'patch-page_props.sql' ),
array( 'addTable', 'page_restrictions', 'patch-page_restrictions.sql' ),
- array( 'addTable', 'profiling', 'patch-profiling.sql' ),
- array( 'addTable', 'protected_titles', 'patch-protected_titles.sql' ),
- array( 'addTable', 'redirect', 'patch-redirect.sql' ),
- array( 'addTable', 'updatelog', 'patch-updatelog.sql' ),
- array( 'addTable', 'change_tag', 'patch-change_tag.sql' ),
- array( 'addTable', 'tag_summary', 'patch-tag_summary.sql' ),
- array( 'addTable', 'valid_tag', 'patch-valid_tag.sql' ),
- array( 'addTable', 'user_properties', 'patch-user_properties.sql' ),
- array( 'addTable', 'log_search', 'patch-log_search.sql' ),
- array( 'addTable', 'l10n_cache', 'patch-l10n_cache.sql' ),
- array( 'addTable', 'iwlinks', 'patch-iwlinks.sql' ),
- array( 'addTable', 'msg_resource', 'patch-msg_resource.sql' ),
- array( 'addTable', 'msg_resource_links','patch-msg_resource_links.sql' ),
- array( 'addTable', 'module_deps', 'patch-module_deps.sql' ),
- array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ),
- array( 'addTable', 'user_former_groups','patch-user_former_groups.sql' ),
- array( 'addTable', 'sites', 'patch-sites.sql' ),
+ array( 'addTable', 'profiling', 'patch-profiling.sql' ),
+ array( 'addTable', 'protected_titles', 'patch-protected_titles.sql' ),
+ array( 'addTable', 'redirect', 'patch-redirect.sql' ),
+ array( 'addTable', 'updatelog', 'patch-updatelog.sql' ),
+ array( 'addTable', 'change_tag', 'patch-change_tag.sql' ),
+ array( 'addTable', 'tag_summary', 'patch-tag_summary.sql' ),
+ array( 'addTable', 'valid_tag', 'patch-valid_tag.sql' ),
+ array( 'addTable', 'user_properties', 'patch-user_properties.sql' ),
+ array( 'addTable', 'log_search', 'patch-log_search.sql' ),
+ array( 'addTable', 'l10n_cache', 'patch-l10n_cache.sql' ),
+ array( 'addTable', 'iwlinks', 'patch-iwlinks.sql' ),
+ array( 'addTable', 'msg_resource', 'patch-msg_resource.sql' ),
+ array( 'addTable', 'msg_resource_links', 'patch-msg_resource_links.sql' ),
+ array( 'addTable', 'module_deps', 'patch-module_deps.sql' ),
+ array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ),
+ array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql' ),
+ array( 'addTable', 'sites', 'patch-sites.sql' ),
# Needed before new field
array( 'convertArchive2' ),
# new fields
- array( 'addPgField', 'updatelog', 'ul_value', 'TEXT' ),
- array( 'addPgField', 'archive', 'ar_deleted', 'SMALLINT NOT NULL DEFAULT 0' ),
- array( 'addPgField', 'archive', 'ar_len', 'INTEGER' ),
- array( 'addPgField', 'archive', 'ar_page_id', 'INTEGER' ),
- array( 'addPgField', 'archive', 'ar_parent_id', 'INTEGER' ),
- array( 'addPgField', 'archive', 'ar_content_model', 'TEXT' ),
- array( 'addPgField', 'archive', 'ar_content_format', 'TEXT' ),
- array( 'addPgField', 'categorylinks', 'cl_sortkey_prefix', "TEXT NOT NULL DEFAULT ''"),
- array( 'addPgField', 'categorylinks', 'cl_collation', "TEXT NOT NULL DEFAULT 0" ),
- array( 'addPgField', 'categorylinks', 'cl_type', "TEXT NOT NULL DEFAULT 'page'" ),
- array( 'addPgField', 'image', 'img_sha1', "TEXT NOT NULL DEFAULT ''" ),
- array( 'addPgField', 'ipblocks', 'ipb_allow_usertalk', 'SMALLINT NOT NULL DEFAULT 0' ),
- array( 'addPgField', 'ipblocks', 'ipb_anon_only', 'SMALLINT NOT NULL DEFAULT 0' ),
- array( 'addPgField', 'ipblocks', 'ipb_by_text', "TEXT NOT NULL DEFAULT ''" ),
- array( 'addPgField', 'ipblocks', 'ipb_block_email', 'SMALLINT NOT NULL DEFAULT 0' ),
- array( 'addPgField', 'ipblocks', 'ipb_create_account', 'SMALLINT NOT NULL DEFAULT 1' ),
- array( 'addPgField', 'ipblocks', 'ipb_deleted', 'SMALLINT NOT NULL DEFAULT 0' ),
- array( 'addPgField', 'ipblocks', 'ipb_enable_autoblock', 'SMALLINT NOT NULL DEFAULT 1' ),
- array( 'addPgField', 'ipblocks', 'ipb_parent_block_id', 'INTEGER DEFAULT NULL REFERENCES ipblocks(ipb_id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED' ),
- array( 'addPgField', 'filearchive', 'fa_deleted', 'SMALLINT NOT NULL DEFAULT 0' ),
- array( 'addPgField', 'filearchive', 'fa_sha1', "TEXT NOT NULL DEFAULT ''" ),
- array( 'addPgField', 'logging', 'log_deleted', 'SMALLINT NOT NULL DEFAULT 0' ),
- array( 'addPgField', 'logging', 'log_id', "INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('logging_log_id_seq')" ),
- array( 'addPgField', 'logging', 'log_params', 'TEXT' ),
- array( 'addPgField', 'mwuser', 'user_editcount', 'INTEGER' ),
- array( 'addPgField', 'mwuser', 'user_newpass_time', 'TIMESTAMPTZ' ),
- array( 'addPgField', 'oldimage', 'oi_deleted', 'SMALLINT NOT NULL DEFAULT 0' ),
- array( 'addPgField', 'oldimage', 'oi_major_mime', "TEXT NOT NULL DEFAULT 'unknown'" ),
- array( 'addPgField', 'oldimage', 'oi_media_type', 'TEXT' ),
- array( 'addPgField', 'oldimage', 'oi_metadata', "BYTEA NOT NULL DEFAULT ''" ),
- array( 'addPgField', 'oldimage', 'oi_minor_mime', "TEXT NOT NULL DEFAULT 'unknown'" ),
- array( 'addPgField', 'oldimage', 'oi_sha1', "TEXT NOT NULL DEFAULT ''" ),
- array( 'addPgField', 'page', 'page_content_model', 'TEXT' ),
- array( 'addPgField', 'page_restrictions', 'pr_id', "INTEGER NOT NULL UNIQUE DEFAULT nextval('page_restrictions_pr_id_seq')" ),
- array( 'addPgField', 'profiling', 'pf_memory', 'NUMERIC(18,10) NOT NULL DEFAULT 0' ),
- array( 'addPgField', 'recentchanges', 'rc_deleted', 'SMALLINT NOT NULL DEFAULT 0' ),
- array( 'addPgField', 'recentchanges', 'rc_log_action', 'TEXT' ),
- array( 'addPgField', 'recentchanges', 'rc_log_type', 'TEXT' ),
- array( 'addPgField', 'recentchanges', 'rc_logid', 'INTEGER NOT NULL DEFAULT 0' ),
- array( 'addPgField', 'recentchanges', 'rc_new_len', 'INTEGER' ),
- array( 'addPgField', 'recentchanges', 'rc_old_len', 'INTEGER' ),
- array( 'addPgField', 'recentchanges', 'rc_params', 'TEXT' ),
- array( 'addPgField', 'redirect', 'rd_interwiki', 'TEXT NULL' ),
- array( 'addPgField', 'redirect', 'rd_fragment', 'TEXT NULL' ),
- array( 'addPgField', 'revision', 'rev_deleted', 'SMALLINT NOT NULL DEFAULT 0' ),
- array( 'addPgField', 'revision', 'rev_len', 'INTEGER' ),
- array( 'addPgField', 'revision', 'rev_parent_id', 'INTEGER DEFAULT NULL' ),
- array( 'addPgField', 'revision', 'rev_content_model', 'TEXT' ),
- array( 'addPgField', 'revision', 'rev_content_format', 'TEXT' ),
- array( 'addPgField', 'site_stats', 'ss_active_users', "INTEGER DEFAULT '-1'" ),
- array( 'addPgField', 'user_newtalk', 'user_last_timestamp', 'TIMESTAMPTZ' ),
- array( 'addPgField', 'logging', 'log_user_text', "TEXT NOT NULL DEFAULT ''" ),
- array( 'addPgField', 'logging', 'log_page', 'INTEGER' ),
- array( 'addPgField', 'interwiki', 'iw_api', "TEXT NOT NULL DEFAULT ''"),
- array( 'addPgField', 'interwiki', 'iw_wikiid', "TEXT NOT NULL DEFAULT ''"),
- array( 'addPgField', 'revision', 'rev_sha1', "TEXT NOT NULL DEFAULT ''" ),
- array( 'addPgField', 'archive', 'ar_sha1', "TEXT NOT NULL DEFAULT ''" ),
- array( 'addPgField', 'uploadstash', 'us_chunk_inx', "INTEGER NULL" ),
- array( 'addPgField', 'job', 'job_timestamp', "TIMESTAMPTZ" ),
- array( 'addPgField', 'job', 'job_random', "INTEGER NOT NULL DEFAULT 0" ),
- array( 'addPgField', 'job', 'job_attempts', "INTEGER NOT NULL DEFAULT 0" ),
- array( 'addPgField', 'job', 'job_token', "TEXT NOT NULL DEFAULT ''" ),
- array( 'addPgField', 'job', 'job_token_timestamp', "TIMESTAMPTZ" ),
- array( 'addPgField', 'job', 'job_sha1', "TEXT NOT NULL DEFAULT ''" ),
- array( 'addPgField', 'archive', 'ar_id', "INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('archive_ar_id_seq')" ),
- array( 'addPgField', 'externallinks', 'el_id', "INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('externallinks_el_id_seq')" ),
-
+ array( 'addPgField', 'updatelog', 'ul_value', 'TEXT' ),
+ array( 'addPgField', 'archive', 'ar_deleted', 'SMALLINT NOT NULL DEFAULT 0' ),
+ array( 'addPgField', 'archive', 'ar_len', 'INTEGER' ),
+ array( 'addPgField', 'archive', 'ar_page_id', 'INTEGER' ),
+ array( 'addPgField', 'archive', 'ar_parent_id', 'INTEGER' ),
+ array( 'addPgField', 'archive', 'ar_content_model', 'TEXT' ),
+ array( 'addPgField', 'archive', 'ar_content_format', 'TEXT' ),
+ array( 'addPgField', 'categorylinks', 'cl_sortkey_prefix', "TEXT NOT NULL DEFAULT ''" ),
+ array( 'addPgField', 'categorylinks', 'cl_collation', "TEXT NOT NULL DEFAULT 0" ),
+ array( 'addPgField', 'categorylinks', 'cl_type', "TEXT NOT NULL DEFAULT 'page'" ),
+ array( 'addPgField', 'image', 'img_sha1', "TEXT NOT NULL DEFAULT ''" ),
+ array( 'addPgField', 'ipblocks', 'ipb_allow_usertalk', 'SMALLINT NOT NULL DEFAULT 0' ),
+ array( 'addPgField', 'ipblocks', 'ipb_anon_only', 'SMALLINT NOT NULL DEFAULT 0' ),
+ array( 'addPgField', 'ipblocks', 'ipb_by_text', "TEXT NOT NULL DEFAULT ''" ),
+ array( 'addPgField', 'ipblocks', 'ipb_block_email', 'SMALLINT NOT NULL DEFAULT 0' ),
+ array( 'addPgField', 'ipblocks', 'ipb_create_account', 'SMALLINT NOT NULL DEFAULT 1' ),
+ array( 'addPgField', 'ipblocks', 'ipb_deleted', 'SMALLINT NOT NULL DEFAULT 0' ),
+ array( 'addPgField', 'ipblocks', 'ipb_enable_autoblock', 'SMALLINT NOT NULL DEFAULT 1' ),
+ array( 'addPgField', 'ipblocks', 'ipb_parent_block_id',
+ 'INTEGER DEFAULT NULL REFERENCES ipblocks(ipb_id) ' .
+ 'ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED' ),
+ array( 'addPgField', 'filearchive', 'fa_deleted', 'SMALLINT NOT NULL DEFAULT 0' ),
+ array( 'addPgField', 'filearchive', 'fa_sha1', "TEXT NOT NULL DEFAULT ''" ),
+ array( 'addPgField', 'logging', 'log_deleted', 'SMALLINT NOT NULL DEFAULT 0' ),
+ array( 'addPgField', 'logging', 'log_id',
+ "INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('logging_log_id_seq')" ),
+ array( 'addPgField', 'logging', 'log_params', 'TEXT' ),
+ array( 'addPgField', 'mwuser', 'user_editcount', 'INTEGER' ),
+ array( 'addPgField', 'mwuser', 'user_newpass_time', 'TIMESTAMPTZ' ),
+ array( 'addPgField', 'oldimage', 'oi_deleted', 'SMALLINT NOT NULL DEFAULT 0' ),
+ array( 'addPgField', 'oldimage', 'oi_major_mime', "TEXT NOT NULL DEFAULT 'unknown'" ),
+ array( 'addPgField', 'oldimage', 'oi_media_type', 'TEXT' ),
+ array( 'addPgField', 'oldimage', 'oi_metadata', "BYTEA NOT NULL DEFAULT ''" ),
+ array( 'addPgField', 'oldimage', 'oi_minor_mime', "TEXT NOT NULL DEFAULT 'unknown'" ),
+ array( 'addPgField', 'oldimage', 'oi_sha1', "TEXT NOT NULL DEFAULT ''" ),
+ array( 'addPgField', 'page', 'page_content_model', 'TEXT' ),
+ array( 'addPgField', 'page_restrictions', 'pr_id',
+ "INTEGER NOT NULL UNIQUE DEFAULT nextval('page_restrictions_pr_id_seq')" ),
+ array( 'addPgField', 'profiling', 'pf_memory', 'NUMERIC(18,10) NOT NULL DEFAULT 0' ),
+ array( 'addPgField', 'recentchanges', 'rc_deleted', 'SMALLINT NOT NULL DEFAULT 0' ),
+ array( 'addPgField', 'recentchanges', 'rc_log_action', 'TEXT' ),
+ array( 'addPgField', 'recentchanges', 'rc_log_type', 'TEXT' ),
+ array( 'addPgField', 'recentchanges', 'rc_logid', 'INTEGER NOT NULL DEFAULT 0' ),
+ array( 'addPgField', 'recentchanges', 'rc_new_len', 'INTEGER' ),
+ array( 'addPgField', 'recentchanges', 'rc_old_len', 'INTEGER' ),
+ array( 'addPgField', 'recentchanges', 'rc_params', 'TEXT' ),
+ array( 'addPgField', 'redirect', 'rd_interwiki', 'TEXT NULL' ),
+ array( 'addPgField', 'redirect', 'rd_fragment', 'TEXT NULL' ),
+ array( 'addPgField', 'revision', 'rev_deleted', 'SMALLINT NOT NULL DEFAULT 0' ),
+ array( 'addPgField', 'revision', 'rev_len', 'INTEGER' ),
+ array( 'addPgField', 'revision', 'rev_parent_id', 'INTEGER DEFAULT NULL' ),
+ array( 'addPgField', 'revision', 'rev_content_model', 'TEXT' ),
+ array( 'addPgField', 'revision', 'rev_content_format', 'TEXT' ),
+ array( 'addPgField', 'site_stats', 'ss_active_users', "INTEGER DEFAULT '-1'" ),
+ array( 'addPgField', 'user_newtalk', 'user_last_timestamp', 'TIMESTAMPTZ' ),
+ array( 'addPgField', 'logging', 'log_user_text', "TEXT NOT NULL DEFAULT ''" ),
+ array( 'addPgField', 'logging', 'log_page', 'INTEGER' ),
+ array( 'addPgField', 'interwiki', 'iw_api', "TEXT NOT NULL DEFAULT ''" ),
+ array( 'addPgField', 'interwiki', 'iw_wikiid', "TEXT NOT NULL DEFAULT ''" ),
+ array( 'addPgField', 'revision', 'rev_sha1', "TEXT NOT NULL DEFAULT ''" ),
+ array( 'addPgField', 'archive', 'ar_sha1', "TEXT NOT NULL DEFAULT ''" ),
+ array( 'addPgField', 'uploadstash', 'us_chunk_inx', "INTEGER NULL" ),
+ array( 'addPgField', 'job', 'job_timestamp', "TIMESTAMPTZ" ),
+ array( 'addPgField', 'job', 'job_random', "INTEGER NOT NULL DEFAULT 0" ),
+ array( 'addPgField', 'job', 'job_attempts', "INTEGER NOT NULL DEFAULT 0" ),
+ array( 'addPgField', 'job', 'job_token', "TEXT NOT NULL DEFAULT ''" ),
+ array( 'addPgField', 'job', 'job_token_timestamp', "TIMESTAMPTZ" ),
+ array( 'addPgField', 'job', 'job_sha1', "TEXT NOT NULL DEFAULT ''" ),
+ array( 'addPgField', 'archive', 'ar_id',
+ "INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('archive_ar_id_seq')" ),
+ array( 'addPgField', 'externallinks', 'el_id',
+ "INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('externallinks_el_id_seq')" ),
# type changes
- array( 'changeField', 'archive', 'ar_deleted', 'smallint', '' ),
- array( 'changeField', 'archive', 'ar_minor_edit', 'smallint', 'ar_minor_edit::smallint DEFAULT 0' ),
- array( 'changeField', 'filearchive', 'fa_deleted', 'smallint', '' ),
- array( 'changeField', 'filearchive', 'fa_height', 'integer', '' ),
- array( 'changeField', 'filearchive', 'fa_metadata', 'bytea', "decode(fa_metadata,'escape')" ),
- array( 'changeField', 'filearchive', 'fa_size', 'integer', '' ),
- array( 'changeField', 'filearchive', 'fa_width', 'integer', '' ),
- array( 'changeField', 'filearchive', 'fa_storage_group', 'text', '' ),
- array( 'changeField', 'filearchive', 'fa_storage_key', 'text', '' ),
- array( 'changeField', 'image', 'img_metadata', 'bytea', "decode(img_metadata,'escape')" ),
- array( 'changeField', 'image', 'img_size', 'integer', '' ),
- array( 'changeField', 'image', 'img_width', 'integer', '' ),
- array( 'changeField', 'image', 'img_height', 'integer', '' ),
- array( 'changeField', 'interwiki', 'iw_local', 'smallint', 'iw_local::smallint' ),
- array( 'changeField', 'interwiki', 'iw_trans', 'smallint', 'iw_trans::smallint DEFAULT 0' ),
- array( 'changeField', 'ipblocks', 'ipb_auto', 'smallint', 'ipb_auto::smallint DEFAULT 0' ),
- array( 'changeField', 'ipblocks', 'ipb_anon_only', 'smallint', "CASE WHEN ipb_anon_only=' ' THEN 0 ELSE ipb_anon_only::smallint END DEFAULT 0" ),
- array( 'changeField', 'ipblocks', 'ipb_create_account', 'smallint', "CASE WHEN ipb_create_account=' ' THEN 0 ELSE ipb_create_account::smallint END DEFAULT 1" ),
- array( 'changeField', 'ipblocks', 'ipb_enable_autoblock', 'smallint', "CASE WHEN ipb_enable_autoblock=' ' THEN 0 ELSE ipb_enable_autoblock::smallint END DEFAULT 1" ),
- array( 'changeField', 'ipblocks', 'ipb_block_email', 'smallint', "CASE WHEN ipb_block_email=' ' THEN 0 ELSE ipb_block_email::smallint END DEFAULT 0" ),
- array( 'changeField', 'ipblocks', 'ipb_address', 'text', 'ipb_address::text' ),
- array( 'changeField', 'ipblocks', 'ipb_deleted', 'smallint', 'ipb_deleted::smallint DEFAULT 0' ),
- array( 'changeField', 'mwuser', 'user_token', 'text', '' ),
- array( 'changeField', 'mwuser', 'user_email_token', 'text', '' ),
- array( 'changeField', 'objectcache', 'keyname', 'text', '' ),
- array( 'changeField', 'oldimage', 'oi_height', 'integer', '' ),
- array( 'changeField', 'oldimage', 'oi_metadata', 'bytea', "decode(img_metadata,'escape')" ),
- array( 'changeField', 'oldimage', 'oi_size', 'integer', '' ),
- array( 'changeField', 'oldimage', 'oi_width', 'integer', '' ),
- array( 'changeField', 'page', 'page_is_redirect', 'smallint', 'page_is_redirect::smallint DEFAULT 0' ),
- array( 'changeField', 'page', 'page_is_new', 'smallint', 'page_is_new::smallint DEFAULT 0' ),
- array( 'changeField', 'querycache', 'qc_value', 'integer', '' ),
- array( 'changeField', 'querycachetwo', 'qcc_value', 'integer', '' ),
- array( 'changeField', 'recentchanges', 'rc_bot', 'smallint', 'rc_bot::smallint DEFAULT 0' ),
- array( 'changeField', 'recentchanges', 'rc_deleted', 'smallint', '' ),
- array( 'changeField', 'recentchanges', 'rc_minor', 'smallint', 'rc_minor::smallint DEFAULT 0' ),
- array( 'changeField', 'recentchanges', 'rc_new', 'smallint', 'rc_new::smallint DEFAULT 0' ),
- array( 'changeField', 'recentchanges', 'rc_type', 'smallint', 'rc_type::smallint DEFAULT 0' ),
- array( 'changeField', 'recentchanges', 'rc_patrolled', 'smallint', 'rc_patrolled::smallint DEFAULT 0' ),
- array( 'changeField', 'revision', 'rev_deleted', 'smallint', 'rev_deleted::smallint DEFAULT 0' ),
- array( 'changeField', 'revision', 'rev_minor_edit', 'smallint', 'rev_minor_edit::smallint DEFAULT 0' ),
- array( 'changeField', 'templatelinks', 'tl_namespace', 'smallint', 'tl_namespace::smallint' ),
- array( 'changeField', 'user_newtalk', 'user_ip', 'text', 'host(user_ip)' ),
- array( 'changeField', 'uploadstash', 'us_image_bits', 'smallint', '' ),
- array( 'changeField', 'profiling', 'pf_time', 'float', '' ),
- array( 'changeField', 'profiling', 'pf_memory', 'float', '' ),
+ array( 'changeField', 'archive', 'ar_deleted', 'smallint', '' ),
+ array( 'changeField', 'archive', 'ar_minor_edit', 'smallint',
+ 'ar_minor_edit::smallint DEFAULT 0' ),
+ array( 'changeField', 'filearchive', 'fa_deleted', 'smallint', '' ),
+ array( 'changeField', 'filearchive', 'fa_height', 'integer', '' ),
+ array( 'changeField', 'filearchive', 'fa_metadata', 'bytea', "decode(fa_metadata,'escape')" ),
+ array( 'changeField', 'filearchive', 'fa_size', 'integer', '' ),
+ array( 'changeField', 'filearchive', 'fa_width', 'integer', '' ),
+ array( 'changeField', 'filearchive', 'fa_storage_group', 'text', '' ),
+ array( 'changeField', 'filearchive', 'fa_storage_key', 'text', '' ),
+ array( 'changeField', 'image', 'img_metadata', 'bytea', "decode(img_metadata,'escape')" ),
+ array( 'changeField', 'image', 'img_size', 'integer', '' ),
+ array( 'changeField', 'image', 'img_width', 'integer', '' ),
+ array( 'changeField', 'image', 'img_height', 'integer', '' ),
+ array( 'changeField', 'interwiki', 'iw_local', 'smallint', 'iw_local::smallint' ),
+ array( 'changeField', 'interwiki', 'iw_trans', 'smallint', 'iw_trans::smallint DEFAULT 0' ),
+ array( 'changeField', 'ipblocks', 'ipb_auto', 'smallint', 'ipb_auto::smallint DEFAULT 0' ),
+ array( 'changeField', 'ipblocks', 'ipb_anon_only', 'smallint',
+ "CASE WHEN ipb_anon_only=' ' THEN 0 ELSE ipb_anon_only::smallint END DEFAULT 0" ),
+ array( 'changeField', 'ipblocks', 'ipb_create_account', 'smallint',
+ "CASE WHEN ipb_create_account=' ' THEN 0 ELSE ipb_create_account::smallint END DEFAULT 1" ),
+ array( 'changeField', 'ipblocks', 'ipb_enable_autoblock', 'smallint',
+ "CASE WHEN ipb_enable_autoblock=' ' THEN 0 ELSE ipb_enable_autoblock::smallint END DEFAULT 1" ),
+ array( 'changeField', 'ipblocks', 'ipb_block_email', 'smallint',
+ "CASE WHEN ipb_block_email=' ' THEN 0 ELSE ipb_block_email::smallint END DEFAULT 0" ),
+ array( 'changeField', 'ipblocks', 'ipb_address', 'text', 'ipb_address::text' ),
+ array( 'changeField', 'ipblocks', 'ipb_deleted', 'smallint', 'ipb_deleted::smallint DEFAULT 0' ),
+ array( 'changeField', 'mwuser', 'user_token', 'text', '' ),
+ array( 'changeField', 'mwuser', 'user_email_token', 'text', '' ),
+ array( 'changeField', 'objectcache', 'keyname', 'text', '' ),
+ array( 'changeField', 'oldimage', 'oi_height', 'integer', '' ),
+ array( 'changeField', 'oldimage', 'oi_metadata', 'bytea', "decode(img_metadata,'escape')" ),
+ array( 'changeField', 'oldimage', 'oi_size', 'integer', '' ),
+ array( 'changeField', 'oldimage', 'oi_width', 'integer', '' ),
+ array( 'changeField', 'page', 'page_is_redirect', 'smallint',
+ 'page_is_redirect::smallint DEFAULT 0' ),
+ array( 'changeField', 'page', 'page_is_new', 'smallint', 'page_is_new::smallint DEFAULT 0' ),
+ array( 'changeField', 'querycache', 'qc_value', 'integer', '' ),
+ array( 'changeField', 'querycachetwo', 'qcc_value', 'integer', '' ),
+ array( 'changeField', 'recentchanges', 'rc_bot', 'smallint', 'rc_bot::smallint DEFAULT 0' ),
+ array( 'changeField', 'recentchanges', 'rc_deleted', 'smallint', '' ),
+ array( 'changeField', 'recentchanges', 'rc_minor', 'smallint', 'rc_minor::smallint DEFAULT 0' ),
+ array( 'changeField', 'recentchanges', 'rc_new', 'smallint', 'rc_new::smallint DEFAULT 0' ),
+ array( 'changeField', 'recentchanges', 'rc_type', 'smallint', 'rc_type::smallint DEFAULT 0' ),
+ array( 'changeField', 'recentchanges', 'rc_patrolled', 'smallint',
+ 'rc_patrolled::smallint DEFAULT 0' ),
+ array( 'changeField', 'revision', 'rev_deleted', 'smallint', 'rev_deleted::smallint DEFAULT 0' ),
+ array( 'changeField', 'revision', 'rev_minor_edit', 'smallint',
+ 'rev_minor_edit::smallint DEFAULT 0' ),
+ array( 'changeField', 'templatelinks', 'tl_namespace', 'smallint', 'tl_namespace::smallint' ),
+ array( 'changeField', 'user_newtalk', 'user_ip', 'text', 'host(user_ip)' ),
+ array( 'changeField', 'uploadstash', 'us_image_bits', 'smallint', '' ),
+ array( 'changeField', 'profiling', 'pf_time', 'float', '' ),
+ array( 'changeField', 'profiling', 'pf_memory', 'float', '' ),
# null changes
- array( 'changeNullableField', 'oldimage', 'oi_bits', 'NULL' ),
- array( 'changeNullableField', 'oldimage', 'oi_timestamp', 'NULL' ),
+ array( 'changeNullableField', 'oldimage', 'oi_bits', 'NULL' ),
+ array( 'changeNullableField', 'oldimage', 'oi_timestamp', 'NULL' ),
array( 'changeNullableField', 'oldimage', 'oi_major_mime', 'NULL' ),
array( 'changeNullableField', 'oldimage', 'oi_minor_mime', 'NULL' ),
- array( 'changeNullableField', 'image', 'img_metadata', 'NOT NULL'),
- array( 'changeNullableField', 'filearchive', 'fa_metadata', 'NOT NULL'),
+ array( 'changeNullableField', 'image', 'img_metadata', 'NOT NULL' ),
+ array( 'changeNullableField', 'filearchive', 'fa_metadata', 'NOT NULL' ),
array( 'changeNullableField', 'recentchanges', 'rc_cur_id', 'NULL' ),
array( 'checkOiDeleted' ),
# New indexes
- array( 'addPgIndex', 'archive', 'archive_user_text', '(ar_user_text)' ),
- array( 'addPgIndex', 'image', 'img_sha1', '(img_sha1)' ),
- array( 'addPgIndex', 'ipblocks', 'ipb_parent_block_id', '(ipb_parent_block_id)' ),
- array( 'addPgIndex', 'oldimage', 'oi_sha1', '(oi_sha1)' ),
- array( 'addPgIndex', 'page', 'page_mediawiki_title', '(page_title) WHERE page_namespace = 8' ),
- array( 'addPgIndex', 'pagelinks', 'pagelinks_title', '(pl_title)' ),
- array( 'addPgIndex', 'page_props', 'pp_propname_page', '(pp_propname, pp_page)' ),
- array( 'addPgIndex', 'revision', 'rev_text_id_idx', '(rev_text_id)' ),
- array( 'addPgIndex', 'recentchanges', 'rc_timestamp_bot', '(rc_timestamp) WHERE rc_bot = 0' ),
- array( 'addPgIndex', 'templatelinks', 'templatelinks_from', '(tl_from)' ),
- array( 'addPgIndex', 'watchlist', 'wl_user', '(wl_user)' ),
- array( 'addPgIndex', 'logging', 'logging_user_type_time', '(log_user, log_type, log_timestamp)' ),
- array( 'addPgIndex', 'logging', 'logging_page_id_time', '(log_page,log_timestamp)' ),
- array( 'addPgIndex', 'iwlinks', 'iwl_prefix_from_title', '(iwl_prefix, iwl_from, iwl_title)' ),
- array( 'addPgIndex', 'iwlinks', 'iwl_prefix_title_from', '(iwl_prefix, iwl_title, iwl_from)' ),
- array( 'addPgIndex', 'job', 'job_timestamp_idx', '(job_timestamp)' ),
- array( 'addPgIndex', 'job', 'job_sha1', '(job_sha1)' ),
- array( 'addPgIndex', 'job', 'job_cmd_token', '(job_cmd, job_token, job_random)' ),
- array( 'addPgIndex', 'job', 'job_cmd_token_id', '(job_cmd, job_token, job_id)' ),
- array( 'addPgIndex', 'filearchive', 'fa_sha1', '(fa_sha1)' ),
+ array( 'addPgIndex', 'archive', 'archive_user_text', '(ar_user_text)' ),
+ array( 'addPgIndex', 'image', 'img_sha1', '(img_sha1)' ),
+ array( 'addPgIndex', 'ipblocks', 'ipb_parent_block_id', '(ipb_parent_block_id)' ),
+ array( 'addPgIndex', 'oldimage', 'oi_sha1', '(oi_sha1)' ),
+ array( 'addPgIndex', 'page', 'page_mediawiki_title', '(page_title) WHERE page_namespace = 8' ),
+ array( 'addPgIndex', 'pagelinks', 'pagelinks_title', '(pl_title)' ),
+ array( 'addPgIndex', 'page_props', 'pp_propname_page', '(pp_propname, pp_page)' ),
+ array( 'addPgIndex', 'revision', 'rev_text_id_idx', '(rev_text_id)' ),
+ array( 'addPgIndex', 'recentchanges', 'rc_timestamp_bot', '(rc_timestamp) WHERE rc_bot = 0' ),
+ array( 'addPgIndex', 'templatelinks', 'templatelinks_from', '(tl_from)' ),
+ array( 'addPgIndex', 'watchlist', 'wl_user', '(wl_user)' ),
+ array( 'addPgIndex', 'logging', 'logging_user_type_time',
+ '(log_user, log_type, log_timestamp)' ),
+ array( 'addPgIndex', 'logging', 'logging_page_id_time', '(log_page,log_timestamp)' ),
+ array( 'addPgIndex', 'iwlinks', 'iwl_prefix_from_title', '(iwl_prefix, iwl_from, iwl_title)' ),
+ array( 'addPgIndex', 'iwlinks', 'iwl_prefix_title_from', '(iwl_prefix, iwl_title, iwl_from)' ),
+ array( 'addPgIndex', 'job', 'job_timestamp_idx', '(job_timestamp)' ),
+ array( 'addPgIndex', 'job', 'job_sha1', '(job_sha1)' ),
+ array( 'addPgIndex', 'job', 'job_cmd_token', '(job_cmd, job_token, job_random)' ),
+ array( 'addPgIndex', 'job', 'job_cmd_token_id', '(job_cmd, job_token, job_id)' ),
+ array( 'addPgIndex', 'filearchive', 'fa_sha1', '(fa_sha1)' ),
array( 'checkIndex', 'pagelink_unique', array(
array( 'pl_from', 'int4_ops', 'btree', 0 ),
array( 'pl_namespace', 'int2_ops', 'btree', 0 ),
array( 'pl_title', 'text_ops', 'btree', 0 ),
),
- 'CREATE UNIQUE INDEX pagelink_unique ON pagelinks (pl_from,pl_namespace,pl_title)' ),
+ 'CREATE UNIQUE INDEX pagelink_unique ON pagelinks (pl_from,pl_namespace,pl_title)' ),
array( 'checkIndex', 'cl_sortkey', array(
array( 'cl_to', 'text_ops', 'btree', 0 ),
array( 'cl_sortkey', 'text_ops', 'btree', 0 ),
array( 'cl_from', 'int4_ops', 'btree', 0 ),
),
- 'CREATE INDEX cl_sortkey ON "categorylinks" USING "btree" ("cl_to", "cl_sortkey", "cl_from")' ),
+ '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 ),
),
- 'CREATE INDEX iwl_prefix_title_from ON "iwlinks" USING "btree" ("iwl_prefix", "iwl_title", "iwl_from")' ),
+ 'CREATE INDEX iwl_prefix_title_from ON "iwlinks" ' .
+ 'USING "btree" ("iwl_prefix", "iwl_title", "iwl_from")' ),
array( 'checkIndex', 'logging_times', array(
array( 'log_timestamp', 'timestamptz_ops', 'btree', 0 ),
),
array( 'oi_name', 'text_ops', 'btree', 0 ),
array( 'oi_archive_name', 'text_ops', 'btree', 0 ),
),
- 'CREATE INDEX "oi_name_archive_name" ON "oldimage" USING "btree" ("oi_name", "oi_archive_name")' ),
+ 'CREATE INDEX "oi_name_archive_name" ON "oldimage" ' .
+ 'USING "btree" ("oi_name", "oi_archive_name")' ),
array( 'checkIndex', 'oi_name_timestamp', array(
array( 'oi_name', 'text_ops', 'btree', 0 ),
array( 'oi_timestamp', 'timestamptz_ops', 'btree', 0 ),
),
- 'CREATE INDEX "oi_name_timestamp" ON "oldimage" USING "btree" ("oi_name", "oi_timestamp")' ),
+ 'CREATE INDEX "oi_name_timestamp" ON "oldimage" ' .
+ 'USING "btree" ("oi_name", "oi_timestamp")' ),
array( 'checkIndex', 'page_main_title', array(
array( 'page_title', 'text_pattern_ops', 'btree', 0 ),
),
- 'CREATE INDEX "page_main_title" ON "page" USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 0)' ),
+ 'CREATE INDEX "page_main_title" ON "page" ' .
+ 'USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 0)' ),
array( 'checkIndex', 'page_mediawiki_title', array(
array( 'page_title', 'text_pattern_ops', 'btree', 0 ),
),
- 'CREATE INDEX "page_mediawiki_title" ON "page" USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 8)' ),
+ 'CREATE INDEX "page_mediawiki_title" ON "page" ' .
+ 'USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 8)' ),
array( 'checkIndex', 'page_project_title', array(
array( 'page_title', 'text_pattern_ops', 'btree', 0 ),
),
- 'CREATE INDEX "page_project_title" ON "page" USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 4)' ),
+ 'CREATE INDEX "page_project_title" ON "page" ' .
+ 'USING "btree" ("page_title" "text_pattern_ops") ' .
+ 'WHERE ("page_namespace" = 4)' ),
array( 'checkIndex', 'page_talk_title', array(
array( 'page_title', 'text_pattern_ops', 'btree', 0 ),
),
- 'CREATE INDEX "page_talk_title" ON "page" USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 1)' ),
+ 'CREATE INDEX "page_talk_title" ON "page" ' .
+ 'USING "btree" ("page_title" "text_pattern_ops") ' .
+ 'WHERE ("page_namespace" = 1)' ),
array( 'checkIndex', 'page_user_title', array(
array( 'page_title', 'text_pattern_ops', 'btree', 0 ),
),
- 'CREATE INDEX "page_user_title" ON "page" USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 2)' ),
+ 'CREATE INDEX "page_user_title" ON "page" ' .
+ 'USING "btree" ("page_title" "text_pattern_ops") WHERE ' .
+ '("page_namespace" = 2)' ),
array( 'checkIndex', 'page_utalk_title', array(
array( 'page_title', 'text_pattern_ops', 'btree', 0 ),
),
- 'CREATE INDEX "page_utalk_title" ON "page" USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 3)' ),
+ 'CREATE INDEX "page_utalk_title" ON "page" ' .
+ 'USING "btree" ("page_title" "text_pattern_ops") ' .
+ 'WHERE ("page_namespace" = 3)' ),
array( 'checkIndex', 'ts2_page_text', array(
array( 'textvector', 'tsvector_ops', 'gist', 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)' ),
+ 'CREATE UNIQUE INDEX ipb_address_unique ' .
+ 'ON ipblocks (ipb_address,ipb_user,ipb_auto,ipb_anon_only)' ),
array( 'checkIwlPrefix' ),
# All FK columns should be deferred
- array( 'changeFkeyDeferrable', 'archive', 'ar_user', 'mwuser(user_id) ON DELETE SET NULL' ),
- array( 'changeFkeyDeferrable', 'categorylinks', 'cl_from', 'page(page_id) ON DELETE CASCADE' ),
- array( 'changeFkeyDeferrable', 'externallinks', 'el_from', 'page(page_id) ON DELETE CASCADE' ),
- array( 'changeFkeyDeferrable', 'filearchive', 'fa_deleted_user', 'mwuser(user_id) ON DELETE SET NULL' ),
- array( 'changeFkeyDeferrable', 'filearchive', 'fa_user', 'mwuser(user_id) ON DELETE SET NULL' ),
- array( 'changeFkeyDeferrable', 'image', 'img_user', 'mwuser(user_id) ON DELETE SET NULL' ),
- array( 'changeFkeyDeferrable', 'imagelinks', 'il_from', 'page(page_id) ON DELETE CASCADE' ),
- array( 'changeFkeyDeferrable', 'ipblocks', 'ipb_by', 'mwuser(user_id) ON DELETE CASCADE' ),
- array( 'changeFkeyDeferrable', 'ipblocks', 'ipb_user', 'mwuser(user_id) ON DELETE SET NULL' ),
- array( 'changeFkeyDeferrable', 'ipblocks', 'ipb_parent_block_id', 'ipblocks(ipb_id) ON DELETE SET NULL' ),
- array( 'changeFkeyDeferrable', 'langlinks', 'll_from', 'page(page_id) ON DELETE CASCADE' ),
- array( 'changeFkeyDeferrable', 'logging', 'log_user', 'mwuser(user_id) ON DELETE SET NULL' ),
- array( 'changeFkeyDeferrable', 'oldimage', 'oi_name', 'image(img_name) ON DELETE CASCADE ON UPDATE CASCADE' ),
- array( 'changeFkeyDeferrable', 'oldimage', 'oi_user', 'mwuser(user_id) ON DELETE SET NULL' ),
- array( 'changeFkeyDeferrable', 'pagelinks', 'pl_from', 'page(page_id) ON DELETE CASCADE' ),
- array( 'changeFkeyDeferrable', 'page_props', 'pp_page', 'page (page_id) ON DELETE CASCADE' ),
- array( 'changeFkeyDeferrable', 'page_restrictions', 'pr_page', 'page(page_id) ON DELETE CASCADE' ),
- array( 'changeFkeyDeferrable', 'protected_titles', 'pt_user', 'mwuser(user_id) ON DELETE SET NULL' ),
- array( 'changeFkeyDeferrable', 'recentchanges', 'rc_cur_id', 'page(page_id) ON DELETE SET NULL' ),
- array( 'changeFkeyDeferrable', 'recentchanges', 'rc_user', 'mwuser(user_id) ON DELETE SET NULL' ),
- array( 'changeFkeyDeferrable', 'redirect', 'rd_from', 'page(page_id) ON DELETE CASCADE' ),
- array( 'changeFkeyDeferrable', 'revision', 'rev_page', 'page (page_id) ON DELETE CASCADE' ),
- array( 'changeFkeyDeferrable', 'revision', 'rev_user', 'mwuser(user_id) ON DELETE RESTRICT' ),
- array( 'changeFkeyDeferrable', 'templatelinks', 'tl_from', 'page(page_id) ON DELETE CASCADE' ),
- array( 'changeFkeyDeferrable', 'user_groups', 'ug_user', 'mwuser(user_id) ON DELETE CASCADE' ),
- array( 'changeFkeyDeferrable', 'user_newtalk', 'user_id', 'mwuser(user_id) ON DELETE CASCADE' ),
- array( 'changeFkeyDeferrable', 'user_properties', 'up_user', 'mwuser(user_id) ON DELETE CASCADE' ),
- array( 'changeFkeyDeferrable', 'watchlist', 'wl_user', 'mwuser(user_id) ON DELETE CASCADE' ),
+ array( 'changeFkeyDeferrable', 'archive', 'ar_user', 'mwuser(user_id) ON DELETE SET NULL' ),
+ array( 'changeFkeyDeferrable', 'categorylinks', 'cl_from', 'page(page_id) ON DELETE CASCADE' ),
+ array( 'changeFkeyDeferrable', 'externallinks', 'el_from', 'page(page_id) ON DELETE CASCADE' ),
+ array( 'changeFkeyDeferrable', 'filearchive', 'fa_deleted_user',
+ 'mwuser(user_id) ON DELETE SET NULL' ),
+ array( 'changeFkeyDeferrable', 'filearchive', 'fa_user', 'mwuser(user_id) ON DELETE SET NULL' ),
+ array( 'changeFkeyDeferrable', 'image', 'img_user', 'mwuser(user_id) ON DELETE SET NULL' ),
+ array( 'changeFkeyDeferrable', 'imagelinks', 'il_from', 'page(page_id) ON DELETE CASCADE' ),
+ array( 'changeFkeyDeferrable', 'ipblocks', 'ipb_by', 'mwuser(user_id) ON DELETE CASCADE' ),
+ array( 'changeFkeyDeferrable', 'ipblocks', 'ipb_user', 'mwuser(user_id) ON DELETE SET NULL' ),
+ array( 'changeFkeyDeferrable', 'ipblocks', 'ipb_parent_block_id',
+ 'ipblocks(ipb_id) ON DELETE SET NULL' ),
+ array( 'changeFkeyDeferrable', 'langlinks', 'll_from', 'page(page_id) ON DELETE CASCADE' ),
+ array( 'changeFkeyDeferrable', 'logging', 'log_user', 'mwuser(user_id) ON DELETE SET NULL' ),
+ array( 'changeFkeyDeferrable', 'oldimage', 'oi_name',
+ 'image(img_name) ON DELETE CASCADE ON UPDATE CASCADE' ),
+ array( 'changeFkeyDeferrable', 'oldimage', 'oi_user', 'mwuser(user_id) ON DELETE SET NULL' ),
+ array( 'changeFkeyDeferrable', 'pagelinks', 'pl_from', 'page(page_id) ON DELETE CASCADE' ),
+ array( 'changeFkeyDeferrable', 'page_props', 'pp_page', 'page (page_id) ON DELETE CASCADE' ),
+ array( 'changeFkeyDeferrable', 'page_restrictions', 'pr_page',
+ 'page(page_id) ON DELETE CASCADE' ),
+ array( 'changeFkeyDeferrable', 'protected_titles', 'pt_user',
+ 'mwuser(user_id) ON DELETE SET NULL' ),
+ array( 'changeFkeyDeferrable', 'recentchanges', 'rc_cur_id',
+ 'page(page_id) ON DELETE SET NULL' ),
+ array( 'changeFkeyDeferrable', 'recentchanges', 'rc_user',
+ 'mwuser(user_id) ON DELETE SET NULL' ),
+ array( 'changeFkeyDeferrable', 'redirect', 'rd_from', 'page(page_id) ON DELETE CASCADE' ),
+ array( 'changeFkeyDeferrable', 'revision', 'rev_page', 'page (page_id) ON DELETE CASCADE' ),
+ array( 'changeFkeyDeferrable', 'revision', 'rev_user', 'mwuser(user_id) ON DELETE RESTRICT' ),
+ array( 'changeFkeyDeferrable', 'templatelinks', 'tl_from', 'page(page_id) ON DELETE CASCADE' ),
+ array( 'changeFkeyDeferrable', 'user_groups', 'ug_user', 'mwuser(user_id) ON DELETE CASCADE' ),
+ array( 'changeFkeyDeferrable', 'user_newtalk', 'user_id', 'mwuser(user_id) ON DELETE CASCADE' ),
+ array( 'changeFkeyDeferrable', 'user_properties', 'up_user',
+ 'mwuser(user_id) ON DELETE CASCADE' ),
+ array( 'changeFkeyDeferrable', 'watchlist', 'wl_user', 'mwuser(user_id) ON DELETE CASCADE' ),
# r81574
array( 'addInterwikiType' ),
if ( !$skipBothIndexExistWarning
&& $this->db->indexExists( $table, $old, __METHOD__ )
) {
- $this->output( "...WARNING: $old still exists, despite it has been renamed into $new (which also exists).\n" .
+ $this->output( "...WARNING: $old still exists, despite it has been " .
+ "renamed into $new (which also exists).\n" .
" $old should be manually removed if not needed anymore.\n" );
}
protected function changeFkeyDeferrable( $table, $field, $clause ) {
$fi = $this->db->fieldInfo( $table, $field );
if ( is_null( $fi ) ) {
- $this->output( "WARNING! Column '$table.$field' does not exist but it should! Please report this.\n" );
+ $this->output( "WARNING! Column '$table.$field' does not exist but it should! " .
+ "Please report this.\n" );
return;
}
$command = "ALTER TABLE $table DROP CONSTRAINT $conname";
$this->db->query( $command );
} else {
- $this->output( "Column '$table.$field' does not have a foreign key constraint, will be added\n" );
+ $this->output( "Column '$table.$field' does not have a foreign key " .
+ "constraint, will be added\n" );
$conclause = "";
}
- $command = "ALTER TABLE $table ADD $conclause FOREIGN KEY ($field) REFERENCES $clause DEFERRABLE INITIALLY DEFERRED";
+ $command =
+ "ALTER TABLE $table ADD $conclause " .
+ "FOREIGN KEY ($field) REFERENCES $clause DEFERRABLE INITIALLY DEFERRED";
$this->db->query( $command );
}
$this->output( "Dropping rule 'archive_delete'\n" );
$this->db->query( 'DROP RULE archive_delete ON archive' );
}
- $this->applyPatch( 'patch-remove-archive2.sql', false, "Converting 'archive2' back to normal archive table" );
+ $this->applyPatch(
+ 'patch-remove-archive2.sql',
+ false,
+ "Converting 'archive2' back to normal archive table"
+ );
} else {
$this->output( "...obsolete table 'archive2' does not exist\n" );
}
if ( $this->db->fieldInfo( 'oldimage', 'oi_deleted' )->type() !== 'smallint' ) {
$this->output( "Changing 'oldimage.oi_deleted' to type 'smallint'\n" );
$this->db->query( "ALTER TABLE oldimage ALTER oi_deleted DROP DEFAULT" );
- $this->db->query( "ALTER TABLE oldimage ALTER oi_deleted TYPE SMALLINT USING (oi_deleted::smallint)" );
+ $this->db->query(
+ "ALTER TABLE oldimage ALTER oi_deleted TYPE SMALLINT USING (oi_deleted::smallint)" );
$this->db->query( "ALTER TABLE oldimage ALTER oi_deleted SET DEFAULT 0" );
} else {
$this->output( "...column 'oldimage.oi_deleted' is already of type 'smallint'\n" );
protected function checkOiNameConstraint() {
if ( $this->db->hasConstraint( "oldimage_oi_name_fkey_cascaded" ) ) {
- $this->output( "...table 'oldimage' has correct cascading delete/update foreign key to image\n" );
+ $this->output( "...table 'oldimage' has correct cascading delete/update " .
+ "foreign key to image\n" );
} else {
if ( $this->db->hasConstraint( "oldimage_oi_name_fkey" ) ) {
- $this->db->query( "ALTER TABLE oldimage DROP CONSTRAINT oldimage_oi_name_fkey" );
+ $this->db->query(
+ "ALTER TABLE oldimage DROP CONSTRAINT oldimage_oi_name_fkey" );
}
if ( $this->db->hasConstraint( "oldimage_oi_name_fkey_cascade" ) ) {
- $this->db->query( "ALTER TABLE oldimage DROP CONSTRAINT oldimage_oi_name_fkey_cascade" );
+ $this->db->query(
+ "ALTER TABLE oldimage DROP CONSTRAINT oldimage_oi_name_fkey_cascade" );
}
$this->output( "Making foreign key on table 'oldimage' (to image) a cascade delete/update\n" );
- $this->db->query( "ALTER TABLE oldimage ADD CONSTRAINT oldimage_oi_name_fkey_cascaded " .
- "FOREIGN KEY (oi_name) REFERENCES image(img_name) ON DELETE CASCADE ON UPDATE CASCADE" );
+ $this->db->query(
+ "ALTER TABLE oldimage ADD CONSTRAINT oldimage_oi_name_fkey_cascaded " .
+ "FOREIGN KEY (oi_name) REFERENCES image(img_name) " .
+ "ON DELETE CASCADE ON UPDATE CASCADE" );
}
}
protected function checkPageDeletedTrigger() {
if ( !$this->db->triggerExists( 'page', 'page_deleted' ) ) {
- $this->applyPatch( 'patch-page_deleted.sql', false, "Adding function and trigger 'page_deleted' to table 'page'" );
+ $this->applyPatch(
+ 'patch-page_deleted.sql',
+ false,
+ "Adding function and trigger 'page_deleted' to table 'page'"
+ );
} else {
$this->output( "...table 'page' has 'page_deleted' trigger\n" );
}
if ( $this->fkeyDeltype( 'revision_rev_user_fkey' ) == 'r' ) {
$this->output( "...constraint 'revision_rev_user_fkey' is ON DELETE RESTRICT\n" );
} else {
- $this->applyPatch( 'patch-revision_rev_user_fkey.sql', false, "Changing constraint 'revision_rev_user_fkey' to ON DELETE RESTRICT" );
+ $this->applyPatch(
+ 'patch-revision_rev_user_fkey.sql',
+ false,
+ "Changing constraint 'revision_rev_user_fkey' to ON DELETE RESTRICT"
+ );
}
}
protected function checkIwlPrefix() {
if ( $this->db->indexExists( 'iwlinks', 'iwl_prefix' ) ) {
- $this->applyPatch( 'patch-rename-iwl_prefix.sql', false, "Replacing index 'iwl_prefix' with 'iwl_prefix_title_from'" );
+ $this->applyPatch(
+ 'patch-rename-iwl_prefix.sql',
+ false,
+ "Replacing index 'iwl_prefix' with 'iwl_prefix_title_from'"
+ );
}
}
}
public function getConnectForm() {
- return $this->getTextBox( 'wgSQLiteDataDir', 'config-sqlite-dir', array(), $this->parent->getHelpBox( 'config-sqlite-dir-help' ) ) .
- $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-sqlite-name-help' ) );
+ return $this->getTextBox(
+ 'wgSQLiteDataDir',
+ 'config-sqlite-dir', array(),
+ $this->parent->getHelpBox( 'config-sqlite-dir-help' )
+ ) .
+ $this->getTextBox(
+ 'wgDBname',
+ 'config-db-name',
+ array(),
+ $this->parent->getHelpBox( 'config-sqlite-name-help' )
+ );
}
/**
if ( !is_writable( dirname( $dir ) ) ) {
$webserverGroup = Installer::maybeGetWebserverPrimaryGroup();
if ( $webserverGroup !== null ) {
- return Status::newFatal( 'config-sqlite-parent-unwritable-group', $dir, dirname( $dir ), basename( $dir ), $webserverGroup );
+ return Status::newFatal(
+ 'config-sqlite-parent-unwritable-group',
+ $dir, dirname( $dir ), basename( $dir ),
+ $webserverGroup
+ );
} else {
- return Status::newFatal( 'config-sqlite-parent-unwritable-nogroup', $dir, dirname( $dir ), basename( $dir ) );
+ return Status::newFatal(
+ 'config-sqlite-parent-unwritable-nogroup',
+ $dir, dirname( $dir ), basename( $dir )
+ );
}
}
protected function getCoreUpdateList() {
return array(
// 1.14
- array( 'addField', 'site_stats', 'ss_active_users', 'patch-ss_active_users.sql' ),
+ array( 'addField', 'site_stats', 'ss_active_users', 'patch-ss_active_users.sql' ),
array( 'doActiveUsersInit' ),
- array( 'addField', 'ipblocks', 'ipb_allow_usertalk', 'patch-ipb_allow_usertalk.sql' ),
+ array( 'addField', 'ipblocks', 'ipb_allow_usertalk', 'patch-ipb_allow_usertalk.sql' ),
array( 'sqliteInitialIndexes' ),
// 1.15
- array( 'addTable', 'change_tag', 'patch-change_tag.sql' ),
- array( 'addTable', 'tag_summary', 'patch-tag_summary.sql' ),
- array( 'addTable', 'valid_tag', 'patch-valid_tag.sql' ),
+ array( 'addTable', 'change_tag', 'patch-change_tag.sql' ),
+ array( 'addTable', 'tag_summary', 'patch-tag_summary.sql' ),
+ array( 'addTable', 'valid_tag', 'patch-valid_tag.sql' ),
// 1.16
- array( 'addTable', 'user_properties', 'patch-user_properties.sql' ),
- array( 'addTable', 'log_search', 'patch-log_search.sql' ),
- array( 'addField', 'logging', 'log_user_text', 'patch-log_user_text.sql' ),
- array( 'doLogUsertextPopulation' ), # listed separately from the previous update because 1.16 was released without this update
+ array( 'addTable', 'user_properties', 'patch-user_properties.sql' ),
+ array( 'addTable', 'log_search', 'patch-log_search.sql' ),
+ array( 'addField', 'logging', 'log_user_text', 'patch-log_user_text.sql' ),
+ # listed separately from the previous update because 1.16 was released without this update
+ array( 'doLogUsertextPopulation' ),
array( 'doLogSearchPopulation' ),
- array( 'addTable', 'l10n_cache', 'patch-l10n_cache.sql' ),
- array( 'addIndex', 'log_search', 'ls_field_val', 'patch-log_search-rename-index.sql' ),
- array( 'addIndex', 'change_tag', 'change_tag_rc_tag', 'patch-change_tag-indexes.sql' ),
- array( 'addField', 'redirect', 'rd_interwiki', 'patch-rd_interwiki.sql' ),
+ array( 'addTable', 'l10n_cache', 'patch-l10n_cache.sql' ),
+ array( 'addIndex', 'log_search', 'ls_field_val', 'patch-log_search-rename-index.sql' ),
+ array( 'addIndex', 'change_tag', 'change_tag_rc_tag', 'patch-change_tag-indexes.sql' ),
+ array( 'addField', 'redirect', 'rd_interwiki', 'patch-rd_interwiki.sql' ),
array( 'doUpdateTranscacheField' ),
array( 'sqliteSetupSearchindex' ),
// 1.17
- array( 'addTable', 'iwlinks', 'patch-iwlinks.sql' ),
- array( 'addIndex', 'iwlinks', 'iwl_prefix_title_from', 'patch-rename-iwl_prefix.sql' ),
- array( 'addField', 'updatelog', 'ul_value', 'patch-ul_value.sql' ),
- array( 'addField', 'interwiki', 'iw_api', 'patch-iw_api_and_wikiid.sql' ),
- array( 'dropIndex', 'iwlinks', 'iwl_prefix', 'patch-kill-iwl_prefix.sql' ),
- array( 'addField', 'categorylinks', 'cl_collation', 'patch-categorylinks-better-collation.sql' ),
+ array( 'addTable', 'iwlinks', 'patch-iwlinks.sql' ),
+ array( 'addIndex', 'iwlinks', 'iwl_prefix_title_from', 'patch-rename-iwl_prefix.sql' ),
+ array( 'addField', 'updatelog', 'ul_value', 'patch-ul_value.sql' ),
+ array( 'addField', 'interwiki', 'iw_api', 'patch-iw_api_and_wikiid.sql' ),
+ array( 'dropIndex', 'iwlinks', 'iwl_prefix', 'patch-kill-iwl_prefix.sql' ),
+ array( 'addField', 'categorylinks', 'cl_collation', 'patch-categorylinks-better-collation.sql' ),
array( 'doCollationUpdate' ),
- array( 'addTable', 'msg_resource', 'patch-msg_resource.sql' ),
- array( 'addTable', 'module_deps', 'patch-module_deps.sql' ),
- array( 'dropIndex', 'archive', 'ar_page_revid', 'patch-archive_kill_ar_page_revid.sql' ),
- array( 'addIndex', 'archive', 'ar_revid', 'patch-archive_ar_revid.sql' ),
+ array( 'addTable', 'msg_resource', 'patch-msg_resource.sql' ),
+ array( 'addTable', 'module_deps', 'patch-module_deps.sql' ),
+ array( 'dropIndex', 'archive', 'ar_page_revid', 'patch-archive_kill_ar_page_revid.sql' ),
+ array( 'addIndex', 'archive', 'ar_revid', 'patch-archive_ar_revid.sql' ),
// 1.18
- array( 'addIndex', 'user', 'user_email', 'patch-user_email_index.sql' ),
- array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ),
- array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql'),
+ array( 'addIndex', 'user', 'user_email', 'patch-user_email_index.sql' ),
+ array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ),
+ array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql' ),
// 1.19
- array( 'addIndex', 'logging', 'type_action', 'patch-logging-type-action-index.sql'),
+ array( 'addIndex', 'logging', 'type_action', 'patch-logging-type-action-index.sql' ),
array( 'doMigrateUserOptions' ),
- array( 'dropField', 'user', 'user_options', 'patch-drop-user_options.sql' ),
- array( 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1.sql' ),
- array( 'addField', 'archive', 'ar_sha1', 'patch-ar_sha1.sql' ),
- array( 'addIndex', 'page', 'page_redirect_namespace_len', 'patch-page_redirect_namespace_len.sql' ),
- array( 'addField', 'uploadstash', 'us_chunk_inx', 'patch-uploadstash_chunk.sql' ),
- array( 'addfield', 'job', 'job_timestamp', 'patch-jobs-add-timestamp.sql' ),
+ array( 'dropField', 'user', 'user_options', 'patch-drop-user_options.sql' ),
+ array( 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1.sql' ),
+ array( 'addField', 'archive', 'ar_sha1', 'patch-ar_sha1.sql' ),
+ array( 'addIndex', 'page', 'page_redirect_namespace_len',
+ 'patch-page_redirect_namespace_len.sql' ),
+ array( 'addField', 'uploadstash', 'us_chunk_inx', 'patch-uploadstash_chunk.sql' ),
+ array( 'addfield', 'job', 'job_timestamp', 'patch-jobs-add-timestamp.sql' ),
// 1.20
array( 'addIndex', 'revision', 'page_user_timestamp', 'patch-revision-user-page-index.sql' ),
array( 'addField', 'ipblocks', 'ipb_parent_block_id', 'patch-ipb-parent-block-id.sql' ),
array( 'addIndex', 'ipblocks', 'ipb_parent_block_id', 'patch-ipb-parent-block-id-index.sql' ),
- array( 'dropField', 'category', 'cat_hidden', 'patch-cat_hidden.sql' ),
+ array( 'dropField', 'category', 'cat_hidden', 'patch-cat_hidden.sql' ),
// 1.21
array( 'addField', 'revision', 'rev_content_format', 'patch-revision-rev_content_format.sql' ),
- array( 'addField', 'revision', 'rev_content_model', 'patch-revision-rev_content_model.sql' ),
- array( 'addField', 'archive', 'ar_content_format', 'patch-archive-ar_content_format.sql' ),
- array( 'addField', 'archive', 'ar_content_model', 'patch-archive-ar_content_model.sql' ),
- array( 'addField', 'page', 'page_content_model', 'patch-page-page_content_model.sql' ),
- array( 'dropField', 'site_stats', 'ss_admins', 'patch-drop-ss_admins.sql' ),
+ array( 'addField', 'revision', 'rev_content_model', 'patch-revision-rev_content_model.sql' ),
+ array( 'addField', 'archive', 'ar_content_format', 'patch-archive-ar_content_format.sql' ),
+ array( 'addField', 'archive', 'ar_content_model', 'patch-archive-ar_content_model.sql' ),
+ array( 'addField', 'page', 'page_content_model', 'patch-page-page_content_model.sql' ),
+ array( 'dropField', 'site_stats', 'ss_admins', 'patch-drop-ss_admins.sql' ),
array( 'dropField', 'recentchanges', 'rc_moved_to_title', 'patch-rc_moved.sql' ),
- array( 'addTable', 'sites', 'patch-sites.sql' ),
- array( 'addField', 'filearchive', 'fa_sha1', 'patch-fa_sha1.sql' ),
- array( 'addField', 'job', 'job_token', 'patch-job_token.sql' ),
- array( 'addField', 'job', 'job_attempts', 'patch-job_attempts.sql' ),
+ array( 'addTable', 'sites', 'patch-sites.sql' ),
+ array( 'addField', 'filearchive', 'fa_sha1', 'patch-fa_sha1.sql' ),
+ array( 'addField', 'job', 'job_token', 'patch-job_token.sql' ),
+ array( 'addField', 'job', 'job_attempts', 'patch-job_attempts.sql' ),
array( 'doEnableProfiling' ),
- array( 'addField', 'uploadstash', 'us_props', 'patch-uploadstash-us_props.sql' ),
+ array( 'addField', 'uploadstash', 'us_props', 'patch-uploadstash-us_props.sql' ),
array( 'modifyField', 'user_groups', 'ug_group', 'patch-ug_group-length-increase-255.sql' ),
- array( 'modifyField', 'user_former_groups', 'ufg_group', 'patch-ufg_group-length-increase-255.sql' ),
- array( 'addIndex', 'page_props', 'pp_propname_page', 'patch-page_props-propname-page-index.sql' ),
+ array( 'modifyField', 'user_former_groups', 'ufg_group',
+ 'patch-ufg_group-length-increase-255.sql' ),
+ array( 'addIndex', 'page_props', 'pp_propname_page',
+ 'patch-page_props-propname-page-index.sql' ),
array( 'addIndex', 'image', 'img_media_mime', 'patch-img_media_mime-index.sql' ),
- array( 'addIndex', 'iwlinks', 'iwl_prefix_from_title', 'patch-iwlinks-from-title-index.sql' ),
+ array( 'addIndex', 'iwlinks', 'iwl_prefix_from_title', 'patch-iwlinks-from-title-index.sql' ),
array( 'addField', 'archive', 'ar_id', 'patch-archive-ar_id.sql' ),
array( 'addField', 'externallinks', 'el_id', 'patch-externallinks-el_id.sql' ),
);
}
protected function sqliteInitialIndexes() {
- // initial-indexes.sql fails if the indexes are already present, so we perform a quick check if our database is newer.
- if ( $this->updateRowExists( 'initial_indexes' ) || $this->db->indexExists( 'user', 'user_name', __METHOD__ ) ) {
+ // initial-indexes.sql fails if the indexes are already present,
+ // so we perform a quick check if our database is newer.
+ if ( $this->updateRowExists( 'initial_indexes' ) ||
+ $this->db->indexExists( 'user', 'user_name', __METHOD__ )
+ ) {
$this->output( "...have initial indexes\n" );
return;
$module = DatabaseSqlite::getFulltextSearchModule();
$fts3tTable = $this->updateRowExists( 'fts3' );
if ( $fts3tTable && !$module ) {
- $this->applyPatch( 'searchindex-no-fts.sql', false, 'PHP is missing FTS3 support, downgrading tables' );
+ $this->applyPatch(
+ 'searchindex-no-fts.sql',
+ false,
+ 'PHP is missing FTS3 support, downgrading tables'
+ );
} elseif ( !$fts3tTable && $module == 'FTS3' ) {
$this->applyPatch( 'searchindex-fts3.sql', false, "Adding FTS3 search capabilities" );
} else {
*/
public function getInfoBox( $text, $icon = false, $class = false ) {
$text = $this->parse( $text, true );
- $icon = ( $icon == false ) ? '../skins/common/images/info-32.png' : '../skins/common/images/' . $icon;
+ $icon = ( $icon == false ) ?
+ '../skins/common/images/info-32.png' :
+ '../skins/common/images/' . $icon;
$alt = wfMessage( 'config-information' )->text();
return Html::infoBox( $text, $icon, $alt, $class, false );
) ) .
$this->parent->getTextBox( array(
'var' => 'wgMetaNamespace',
- 'label' => '', //TODO: Needs a label?
- 'attribs' => array( 'readonly' => 'readonly', 'class' => 'enabledByOther' ),
-
+ 'label' => '', // @todo Needs a label?
+ 'attribs' => array( 'readonly' => 'readonly', 'class' => 'enabledByOther' )
) ) .
$this->getFieldSetStart( 'config-admin-box' ) .
$this->parent->getTextBox( array(
}
class WebInstaller_Options extends WebInstallerPage {
-
public function execute() {
if ( $this->getVar( '_SkipOptional' ) == 'skip' ) {
return 'skip';
public function startStage( $step ) {
// Messages: config-install-database, config-install-tables, config-install-interwiki,
// config-install-stats, config-install-keys, config-install-sysop, config-install-mainpage
- $this->addHTML( "<li>" . wfMessage( "config-install-$step" )->escaped() . wfMessage( 'ellipsis' )->escaped() );
+ $this->addHTML( "<li>" . wfMessage( "config-install-$step" )->escaped() .
+ wfMessage( 'ellipsis' )->escaped() );
+
if ( $step == 'extension-tables' ) {
$this->startLiveBox();
}
}
class WebInstaller_Complete extends WebInstallerPage {
-
public function execute() {
// Pop up a dialog box, to make it difficult for the user to forget
// to download the file
# and is available on most Linux systems. If Perl was distributed with
# BSD::Resource included, we would happily use that instead, but it isn't.
+MW_INCLUDE_STDERR=
MW_CPU_LIMIT=0
MW_CGROUP=
MW_MEM_LIMIT=0
# Override settings
eval "$2"
+if [ -n "$MW_INCLUDE_STDERR" ]; then
+ exec 2>&1
+fi
+
if [ "$MW_CPU_LIMIT" -gt 0 ]; then
ulimit -t "$MW_CPU_LIMIT"
fi
return $result;
}
- /**
- * Non-atomic implementation of incr().
- *
- * Probably all callers actually want incr() to atomically initialise
- * values to zero if they don't exist, as provided by the Redis INCR
- * command. But we are constrained by the memcached-like interface to
- * return null in that case. Once the key exists, further increments are
- * atomic.
- */
- public function incr( $key, $value = 1 ) {
- wfProfileIn( __METHOD__ );
- list( $server, $conn ) = $this->getConnection( $key );
- if ( !$conn ) {
- wfProfileOut( __METHOD__ );
- return false;
- }
- if ( !$conn->exists( $key ) ) {
- wfProfileOut( __METHOD__ );
- return null;
- }
- try {
- $result = $conn->incrBy( $key, $value );
- } catch ( RedisException $e ) {
- $result = false;
- $this->handleException( $server, $conn, $e );
- }
-
- $this->logRequest( 'incr', $key, $server, $result );
- wfProfileOut( __METHOD__ );
- return $result;
- }
-
/**
* Get a Redis object with a connection suitable for fetching the specified key
* @return Array (server, RedisConnRef) or (false, false)
$pref = $parser->getOptions()->getDateFormat();
// Specify a different default date format other than the the normal default
- // iff the user has 'default' for their setting
+ // if the user has 'default' for their setting
if ( $pref == 'default' && $defaultPref ) {
$pref = $defaultPref;
}
$key = "$ns:$index";
$searchkey = "<!--LINK $key-->";
$displayText = $entry['text'];
+ if ( isset( $entry['selflink'] ) ) {
+ $replacePairs[$searchkey] = Linker::makeSelfLinkObj( $title, $displayText, $query );
+ continue;
+ }
if ( $displayText === '' ) {
$displayText = null;
}
// single string to all variants. This would improve parser's performance
// significantly.
foreach ( $this->internals as $ns => $entries ) {
+ if ( $ns == NS_SPECIAL ) {
+ continue;
+ }
foreach ( $entries as $index => $entry ) {
$pdbk = $entry['pdbk'];
// we only deal with new links (in its first query)
if ( !isset( $colours[$pdbk] ) || $colours[$pdbk] === 'new' ) {
- $title = $entry['title'];
- $titleText = $title->getText();
- $titlesAttrs[] = array(
- 'ns' => $ns,
- 'key' => "$ns:$index",
- 'titleText' => $titleText,
- );
+ $titlesAttrs[] = array( $index, $entry['title'] );
// separate titles with \0 because it would never appears
// in a valid title
- $titlesToBeConverted .= $titleText . "\0";
+ $titlesToBeConverted .= $entry['title']->getText() . "\0";
}
}
}
foreach ( $titlesAllVariants as &$titlesVariant ) {
$titlesVariant = explode( "\0", $titlesVariant );
}
- $l = count( $titlesAttrs );
+
// Then add variants of links to link batch
- for ( $i = 0; $i < $l; $i ++ ) {
+ $parentTitle = $this->parent->getTitle();
+ foreach ( $titlesAttrs as $i => $attrs ) {
+ list( $index, $title ) = $attrs;
+ $ns = $title->getNamespace();
+ $text = $title->getText();
+
foreach ( $allVariantsName as $variantName ) {
$textVariant = $titlesAllVariants[$variantName][$i];
- if ( $textVariant != $titlesAttrs[$i]['titleText'] ) {
- $variantTitle = Title::makeTitle( $titlesAttrs[$i]['ns'], $textVariant );
- if ( is_null( $variantTitle ) ) {
- continue;
- }
- $linkBatch->addObj( $variantTitle );
- $variantMap[$variantTitle->getPrefixedDBkey()][] = $titlesAttrs[$i]['key'];
+ if ( $textVariant === $text ) {
+ continue;
+ }
+
+ $variantTitle = Title::makeTitle( $ns, $textVariant );
+ if ( is_null( $variantTitle ) ) {
+ continue;
+ }
+
+ // Self-link checking for mixed/different variant titles. At this point, we
+ // already know the exact title does not exist, so the link cannot be to a
+ // variant of the current title that exists as a separate page.
+ if ( $variantTitle->equals( $parentTitle ) && $title->getFragment() === '' ) {
+ $this->internals[$ns][$index]['selflink'] = true;
+ continue 2;
}
+
+ $linkBatch->addObj( $variantTitle );
+ $variantMap[$variantTitle->getPrefixedDBkey()][] = "$ns:$index";
}
}
# Marker Suffix needs to be accessible staticly.
const MARKER_SUFFIX = "-QINU\x7f";
+ # Markers used for wrapping the table of contents
+ const TOC_START = '<mw:toc>';
+ const TOC_END = '</mw:toc>';
+
# Persistent:
var $mTagHooks = array();
var $mTransparentTagHooks = array();
}
}
- # Self-link checking
- if ( $nt->getFragment() === '' && $ns != NS_SPECIAL ) {
- if ( $nt->equals( $this->mTitle ) || ( !$nt->isKnown() && in_array(
- $this->mTitle->getPrefixedText(),
- $this->getConverterLanguage()->autoConvertToAllVariants( $nt->getPrefixedText() ),
- true
- ) ) ) {
- $s .= $prefix . Linker::makeSelfLinkObj( $nt, $text, '', $trail );
- continue;
- }
+ # Self-link checking. For some languages, variants of the title are checked in
+ # LinkHolderArray::doVariants() to allow batching the existence checks necessary
+ # for linking to a different variant.
+ if ( $ns != NS_SPECIAL && $nt->equals( $this->mTitle ) && $nt->getFragment() === '' ) {
+ $s .= $prefix . Linker::makeSelfLinkObj( $nt, $text, '', $trail );
+ continue;
}
# NS_MEDIA is a pseudo-namespace for linking directly to a file
$openmatch = preg_match( '/(?:<table|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<ol|<dl|<li|<\\/tr|<\\/td|<\\/th)/iS', $t );
$closematch = preg_match(
'/(?:<\\/table|<\\/h1|<\\/h2|<\\/h3|<\\/h4|<\\/h5|<\\/h6|' .
- '<td|<th|<\\/?blockquote|<\\/?div|<hr|<\\/pre|<\\/p|' . $this->mUniqPrefix . '-pre|<\\/li|<\\/ul|<\\/ol|<\\/dl|<\\/?center)/iS', $t );
+ '<td|<th|<\\/?blockquote|<\\/?div|<hr|<\\/pre|<\\/p|<\\/mw:|' . $this->mUniqPrefix . '-pre|<\\/li|<\\/ul|<\\/ol|<\\/dl|<\\/?center)/iS', $t );
if ( $openmatch or $closematch ) {
$paragraphStack = false;
# TODO bug 5718: paragraph closed
}
$toc = Linker::tocList( $toc, $this->mOptions->getUserLangObj() );
$this->mOutput->setTOCHTML( $toc );
+ $toc = self::TOC_START . $toc . self::TOC_END;
}
if ( $isMain ) {
$mEditSectionTokens = false, # prefix/suffix markers if edit sections were output as tokens
$mProperties = array(), # Name/value pairs to be cached in the DB
$mTOCHTML = '', # HTML of the TOC
- $mTimestamp; # Timestamp of the revision
+ $mTimestamp, # Timestamp of the revision
+ $mTOCEnabled = true; # Whether TOC should be shown, can't override __NOTOC__
private $mIndexPolicy = ''; # 'index' or 'noindex'? Any other value will result in no change.
private $mAccessedOptions = array(); # List of ParserOptions (stored in the keys)
private $mSecondaryDataUpdates = array(); # List of DataUpdate, used to save info from the page somewhere else.
}
function getText() {
+ wfProfileIn( __METHOD__ );
+ $text = $this->mText;
if ( $this->mEditSectionTokens ) {
- return preg_replace_callback( ParserOutput::EDITSECTION_REGEX,
- array( &$this, 'replaceEditSectionLinksCallback' ), $this->mText );
+ $text = preg_replace_callback( ParserOutput::EDITSECTION_REGEX,
+ array( &$this, 'replaceEditSectionLinksCallback' ), $text );
+ } else {
+ $text = preg_replace( ParserOutput::EDITSECTION_REGEX, '', $text );
+ }
+
+ // If you have an old cached version of this class - sorry, you can't disable the TOC
+ if ( isset( $this->mTOCEnabled ) && $this->mTOCEnabled ) {
+ $text = str_replace( array( Parser::TOC_START, Parser::TOC_END ), '', $text );
+ } else {
+ $text = preg_replace(
+ '#'. preg_quote( Parser::TOC_START ) . '.*?' . preg_quote( Parser::TOC_END ) . '#s',
+ '',
+ $text
+ );
}
- return preg_replace( ParserOutput::EDITSECTION_REGEX, '', $this->mText );
+ wfProfileOut( __METHOD__ );
+ return $text;
}
/**
function getTOCHTML() { return $this->mTOCHTML; }
function getTimestamp() { return $this->mTimestamp; }
function getLimitReportData() { return $this->mLimitReportData; }
+ function getTOCEnabled() { return $this->mTOCEnabled; }
function setText( $text ) { return wfSetVar( $this->mText, $text ); }
function setLanguageLinks( $ll ) { return wfSetVar( $this->mLanguageLinks, $ll ); }
function setIndexPolicy( $policy ) { return wfSetVar( $this->mIndexPolicy, $policy ); }
function setTOCHTML( $tochtml ) { return wfSetVar( $this->mTOCHTML, $tochtml ); }
function setTimestamp( $timestamp ) { return wfSetVar( $this->mTimestamp, $timestamp ); }
+ function setTOCEnabled( $flag ) { return wfSetVar( $this->mTOCEnabled, $flag ); }
function addCategory( $c, $sort ) { $this->mCategories[$c] = $sort; }
function addLanguageLink( $t ) { $this->mLanguageLinks[] = $t; }
* and clear out the output buffer. If the client cache is too old then do nothing.
* @param $context ResourceLoaderContext
* @param string $mtime The TS_MW timestamp to check the header against
- * @return bool True iff 304 header sent and output handled
+ * @return bool True if 304 header sent and output handled
*/
protected function tryRespondLastModified( ResourceLoaderContext $context, $mtime ) {
// If there's an If-Modified-Since header, respond with a 304 appropriately
} else {
$parentLen = 0;
if ( isset( $this->mParentLens[$row->rev_parent_id] ) ) {
- $this->mParentLens[$row->rev_parent_id];
+ $parentLen = $this->mParentLens[$row->rev_parent_id];
}
$chardiff = ' <span class="mw-changeslist-separator">. .</span> ';
$status = $this->addNewaccountInternal();
if ( !$status->isGood() ) {
- $error = $this->getOutput()->parse( $status->getWikiText() );
- $this->mainLoginForm( $error );
+ $error = $status->getMessage();
+ $this->mainLoginForm( $error->toString() );
return;
}
# Create the account and abort if there's a problem doing so
$status = $this->addNewAccountInternal();
if ( !$status->isGood() ) {
- $error = $this->getOutput()->parse( $status->getWikiText() );
- $this->mainLoginForm( $error );
+ $error = $status->getMessage();
+ $this->mainLoginForm( $error->toString() );
return false;
}
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 ) );
+ $abortError = new RawMessage( $abortError );
+ $abortError->text();
+ return Status::newFatal( $abortError );
}
// Hook point to check for exempt from account creation throttle
$usePage = false;
} else {
# Top log Ids for a page are not stored
- $conds[] = 'rc_this_oldid=page_latest OR rc_type=' . RC_LOG;
+ $nonRevisionTypes = array( RC_LOG );
+ wfRunHooks( 'SpecialWatchlistGetNonRevisionTypes', array( &$nonRevisionTypes ) );
+ if ( $nonRevisionTypes ) {
+ if ( count( $nonRevisionTypes ) === 1 ) {
+ // if only one use an equality instead of IN condition
+ $nonRevisionTypes = reset( $nonRevisionTypes );
+ }
+ $conds[] = $dbr->makeList(
+ array(
+ 'rc_this_oldid=page_latest',
+ 'rc_type' => $nonRevisionTypes,
+ ),
+ LIST_OR
+ );
+ }
$limitWatchlist = 0;
$usePage = true;
}
'tog-extendwatchlist' => 'Brei dophoulys uit om alle wysigings te wys, nie slegs die nuutste nie',
'tog-usenewrc' => 'Groepeer wysigings per bladsy in onlangse wysigings en dophoulys (benodig JavaScript)',
'tog-numberheadings' => 'Nommer opskrifte outomaties',
-'tog-showtoolbar' => 'Wys redigeergereedskap (benodig JavaScript)',
-'tog-editondblclick' => 'Dubbelkliek om blaaie te wysig (benodig JavaScript)',
+'tog-showtoolbar' => 'Wys redigeergereedskap',
+'tog-editondblclick' => 'Dubbelkliek om te wysig',
'tog-editsection' => 'Wys [wysig]-skakels vir elke afdeling',
'tog-editsectiononrightclick' => 'Wysig afdeling met regskliek op afdeling se titel (JavaScript)',
'tog-showtoc' => 'Wys inhoudsopgawe (by bladsye met meer as drie opskrifte)',
'userlogin-resetpassword-link' => 'Herstel u wagwoord',
'helplogin-url' => 'Help:Aanmelding',
'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Hulp met aanmelding]]',
+'userlogin-createanother' => "Skep nog 'n rekening",
'createacct-join' => 'Verskaf u gegewens hieronder.',
'createacct-another-join' => 'Sleutel die nuwe rekening se inligting hier onder in:',
'createacct-emailrequired' => 'E-posadres',
'contributions' => '{{GENDER:$1|Gebruikersbydraes}}',
'contributions-title' => '$1 se bydraes',
'mycontris' => 'Bydraes',
-'contribsub2' => 'Vir $1 ($2)',
+'contribsub2' => 'Vir {{GENDER:$3|$1}} ($2)',
'nocontribs' => 'Geen veranderinge wat by hierdie kriteria pas, is gevind nie.',
'uctop' => '(laaste wysiging)',
'month' => 'Vanaf maand (en vroeër):',
'spam_reverting' => 'Besig met terugrol na die laaste weergawe wat nie skakels na $1 bevat nie',
'spam_blanking' => "Alle weergawes met 'n skakel na $1 word verwyder",
'spam_deleting' => 'Alle weergawes bevat verwysings na $1. Bladsy verwyder',
+'simpleantispam-label' => "Anti-spam kontrole.
+'''Moenie''' die veld invul nie!",
# Info page
'pageinfo-title' => 'Inligting oor "$1"',
'tags-tag' => 'Etiketnaam',
'tags-display-header' => 'Weergawe in wysigingslyste',
'tags-description-header' => 'Volledige beskrywing van betekenis',
+'tags-active-header' => 'Aktief?',
'tags-hitcount-header' => 'Geëtiketteerde veranderings',
+'tags-active-yes' => 'Ja',
+'tags-active-no' => 'Nee',
'tags-edit' => 'wysig',
'tags-hitcount' => '$1 {{PLURAL:$1|wysiging|wysigings}}',
'limitreport-ppvisitednodes' => 'Aantal nodes besoek tydens voorverwerking:',
'limitreport-ppgeneratednodes' => 'Aantal nodes geskep tydens voorverwerking:',
'limitreport-postexpandincludesize' => 'Inklusiegrootte na uitbreiding',
-'limitreport-postexpandincludesize-value' => '$1/$2 grepe',
-'limitreport-templateargumentsize-value' => '$1/$2 grepe',
+'limitreport-postexpandincludesize-value' => '$1/$2 {{PLURAL:$2|greep|grepe}}',
+'limitreport-templateargumentsize-value' => '$1/$2 {{PLURAL:$2|greep|grepe}}',
'limitreport-expansiondepth' => 'Hoogste uitbreidingsdiepte',
);
'siteusers' => '{{SITENAME}} {{PLURAL:$2|përdorues|përdorues}} $1',
'creditspage' => 'Kreditat e faqes',
+# Spam protection
+'simpleantispam-label' => "Anti-spam kontrolloni. A'''''NUK' plotësoni këtë!",
+
# Browsing diffs
'previousdiff' => '← Redaktim mâ i vjetër',
'nextdiff' => 'Redaktim ma i ri →',
'spambot_username' => 'Esporga de spam de MediaWiki',
'spam_reverting' => "Tornando t'a zaguera versión sin de vinclos ta $1",
'spam_blanking' => 'Todas as versions teneban vinclos ta $1, se deixa en blanco',
+'simpleantispam-label' => "Preba anti-spam.
+'''NO''' replene esto!",
# Info page
'pageinfo-title' => 'Información ta «$1»',
'articlepage' => 'اعرض صفحة المحتوى',
'talk' => 'نقاش',
'views' => 'معاينة',
-'toolbox' => 'صÙ\86دÙ\88Ù\82 اÙ\84أدÙ\88ات',
+'toolbox' => 'الأدوات',
'userpage' => 'طالع صفحة المستخدم',
'projectpage' => 'طالع صفحة المشروع',
'imagepage' => 'طالع صفحة الملف',
'action-block' => 'منع هذا المستخدم من التعديل',
'action-protect' => 'تغيير مستويات الحماية لهذه الصفحة',
'action-rollback' => 'استرجاع تعديلات آخر مستخدم عدل صفحة معينة سريعا',
-'action-import' => 'استيراد هذه الصفحة من ويكي آخر',
-'action-importupload' => 'استيراد هذه الصفحة من ملف مرفوع',
+'action-import' => 'استيراد صفحات من ويكي آخر',
+'action-importupload' => 'استيراد صفحات من ملف مرفوع',
'action-patrol' => 'تعليم تعديلات الآخرين بعلامة المراجعة',
'action-autopatrol' => 'جعل تعديلك معلم عليه كمراجع',
'action-unwatchedpages' => 'رؤية قائمة الصفحات غير المراقبة',
'spam_reverting' => 'استرجاع آخر نسخة ليس بها وصلات إلى $1',
'spam_blanking' => 'كل النسخ احتوت على وصلات ل $1، إفراغ',
'spam_deleting' => 'جميع النسخ تحوي رابطا إلى $1، يتم الحذف',
+'simpleantispam-label' => "اختبار ضد السبام.
+'''لا''' تملأ هذا!",
# Info page
'pageinfo-title' => 'المعلومات عن «$1»',
'spambot_username' => 'تنظيف سبام ميدياويكى',
'spam_reverting' => 'ترجيع آخر نسخة مافيهاش لينكات لـ $1',
'spam_blanking' => 'كل النسخ فيها لينكات ل $1، فضيها',
+'simpleantispam-label' => "اختبار انتي-سبام.
+'''ماتعبيش''' دا!",
# Skin names
'skinname-cologneblue' => 'كولون بلو',
'spam_reverting' => '$1লৈ সংযোগ নথকা সৰ্বশেষ পুনৰীক্ষনলে উভতাই নিয়া হৈছে',
'spam_blanking' => 'সকলো পুনৰীক্ষনৰ $1লৈ সংযোগ আছিল, ৰিক্ত কৰা হৈছে',
'spam_deleting' => 'সকলো পুনৰীক্ষণৰ $1লৈ সংযোগ আছিল, বিলোপ কৰা হৈছে',
+'simpleantispam-label' => "এণ্টি-স্পাম পৰীক্ষা।
+এইখন পূৰণ '''নকৰিব'''!",
# Info page
'pageinfo-title' => '"$1" ৰ তথ্য',
'spam_reverting' => 'Revirtiendo a la cabera versión que nun contién enllaces a $1',
'spam_blanking' => 'Toles revisiones teníen enllaces a $1; dexando en blanco',
'spam_deleting' => 'Toles revisiones teníen enllaces a $1, desaniciando',
+'simpleantispam-label' => "Control anti-spam.
+¡'''NUN''' rellenes esto!",
# Info page
'pageinfo-title' => 'Información sobro "$1"',
'tog-newpageshidepatrolled' => 'Яңы биттәр исемлегендә тикшерелгән үҙгәртеүҙәрҙе йәшер',
'tog-extendwatchlist' => 'Барлыҡ үҙгәртеүҙәрҙе үҙ эсенә алған, киңәйтелгән күҙәтеү исемлеге',
'tog-usenewrc' => 'Һуңғы төҙәтеүҙәр һәм күҙәтеү исемлегендәге үҙгәрештәрҙе төркөмдәргә бүлергә',
-'tog-numberheadings' => 'Башисемдәрҙе автоматик рәүештә номерландыр',
+'tog-numberheadings' => 'Башисемдәрҙе автоматик рәүештә номерлаe',
'tog-showtoolbar' => 'Мөхәррирләгән ваҡытта өҫкө ҡоралдар панелен күрһәтергә (JavaScript кәрәк)',
'tog-editondblclick' => 'Биттәрҙе ике сиртеү менән мөхәррирләргә',
'tog-editsection' => 'Һәр бүлек өсөн «үҙгәртеү» һылтанмаһын күрһәтергә',
'spam_reverting' => '$1 һылтанмаһыҙ һуңғы өлгөгә ҡайтарыу',
'spam_blanking' => 'Бөтә өлгөләрҙә лә $1 һылтанмаһы бар, таҙартыу',
'spam_deleting' => 'Бөтә өлгөләрҙә лә $1 һылтанма бар, таҙартыу бара',
+'simpleantispam-label' => "Спамға ҡаршы тикшереү.
+Быны '''ТУЛТЫРМАҒЫҘ'''!",
# Info page
'pageinfo-title' => '«$1» буйынса мәғлүмәт',
'spambot_username' => 'اسپم پاک کنوک مدیا وی کی',
'spam_reverting' => 'عوض کتن په آهری نسحه که شامل لینکان می بیت په $1',
'spam_blanking' => 'کل بازبینی آن شامل لینکان په $1, بوتت هالیکی',
+'simpleantispam-label' => "کنترل ضد اسپم.
+ای شیء پر ''مکن''",
# Skin names
'skinname-cologneblue' => 'نیلی کولاجن',
'spam_reverting' => 'Mabalik sa huring bersion na mayong takod sa $1',
'spam_blanking' => 'An gabos na mga pahirá na may takod sa $1, pigblablanko',
'spam_deleting' => 'An gabos na mga rebisyon na igwang mga kasugpunan sa $1, pinupura',
+'simpleantispam-label' => 'Narikisa kan anti-espam.
+"Dae" ka magkaag nin laman digde!',
# Info page
'pageinfo-title' => 'Impormasyon para sa "$1"',
'spam_reverting' => 'Адкат да апошняй вэрсіі без спасылак на $1',
'spam_blanking' => 'Усе вэрсіі ўтрымліваюць спасылкі на $1, чыстка',
'spam_deleting' => 'Усе вэрсіі ўтрымлівалі спасылкі на $1, выдаляем',
+'simpleantispam-label' => "Праверка анты-спаму.
+'''НЕ''' запаўняйце тут нічога!",
# Info page
'pageinfo-title' => 'Інфармацыя пра «$1»',
'databaseerror' => 'Грешка при работа с базата от данни',
'databaseerror-text' => 'Възникна грешка при заявката за базата данни.
Това може да означава бъг в софтуера.',
+'databaseerror-textcl' => 'Възникна грешка при заявка за базата данни.',
'databaseerror-query' => 'Заявка: $1',
'databaseerror-function' => 'Функция: $1',
'databaseerror-error' => 'Грешка: $1',
'customjsprotected' => 'Нямате права за редактиране на тази Джаваскрипт страница, защото тя съдържа чужди потребителски настройки.',
'mycustomcssprotected' => 'Нямате права за редактиране на тази CSS страница.',
'mycustomjsprotected' => 'Нямате права за редактиране на тази JavaScript страница.',
+'myprivateinfoprotected' => 'Нямате права да редактирате личната си информация.',
'mypreferencesprotected' => 'Нямате права да редактирате настройките си.',
'ns-specialprotected' => 'Специалните страници не могат да бъдат редактирани.',
'titleprotected' => "Тази страница е била защитена срещу създаване от [[User:$1|$1]].
'yourname' => 'Потребителско име:',
'userlogin-yourname' => 'Потребителско име',
'userlogin-yourname-ph' => 'Въведете вашето потребителско име',
+'createacct-another-username-ph' => 'Въвежда се потребителското име',
'yourpassword' => 'Парола:',
'userlogin-yourpassword' => 'Парола',
'userlogin-yourpassword-ph' => 'Въведете вашата парола',
'createacct-yourpassword-ph' => 'Въведете парола',
'yourpasswordagain' => 'Парола (повторно):',
'createacct-yourpasswordagain' => 'Потвърждаване на паролата',
-'createacct-yourpasswordagain-ph' => 'Ð\92Ñ\8aведеÑ\82е паÑ\80олаÑ\82а оÑ\82ново',
+'createacct-yourpasswordagain-ph' => 'Ð\92Ñ\8aвежда Ñ\81е паÑ\80олаÑ\82а (повÑ\82оÑ\80но)',
'remembermypassword' => 'Запомняне на паролата на този компютър (най-много за $1 {{PLURAL:$1|ден|дни}})',
'userlogin-signwithsecure' => 'Използване на защитена връзка',
'yourdomainname' => 'Домейн:',
'userlogin-resetpassword-link' => 'Възстановяване на паролата',
'helplogin-url' => 'Help:Влизане',
'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Помощ за влизане]] в системата',
+'userlogin-loggedin' => 'Вече сте влезли в системата като {{GENDER:$1|$1}}.
+Чрез формуляра по-долу можете да влезете като друг потребител.',
'userlogin-createanother' => 'Създаване на друга сметка',
'createacct-join' => 'Въведете своите данни по-долу.',
+'createacct-another-join' => 'Попълване на информацията за новата сметка',
'createacct-emailrequired' => 'Адрес за електронна поща',
'createacct-emailoptional' => 'Адрес за електронна поща (незадължително)',
-'createaccountmail' => 'Използване на временна парола, която се изпраща по електронната поща, посочена по-долу',
+'createacct-another-email-ph' => 'Въвежда се електронна поща',
+'createaccountmail' => 'Използване на случайна временна парола, която се изпраща на електронната поща, посочена по-долу',
'createacct-realname' => 'Истинско име (незадължително)',
'createaccountreason' => 'Причина:',
'createacct-reason' => 'Причина',
+'createacct-reason-ph' => 'Защо създавате друга сметка',
+'createacct-captcha' => 'Проверка за сигурност',
'createacct-imgcaptcha-ph' => 'Въведете текста, който виждате по-горе',
'createacct-submit' => 'Създаване на сметката',
'createacct-another-submit' => 'Създаване на друга сметка',
'newpassword' => 'Нова парола:',
'retypenew' => 'Нова парола повторно:',
'resetpass_submit' => 'Избиране на парола и влизане',
-'changepassword-success' => 'Паролата ви беше сменена! Сега влизате…',
+'changepassword-success' => 'Паролата ви беше променена успешно!',
'resetpass_forbidden' => 'Не е разрешена смяна на паролата',
'resetpass-no-info' => 'За да достъпвате тази страница директно, необходимо е да влезете в системата.',
'resetpass-submit-loggedin' => 'Промяна на паролата',
# Special:PasswordReset
'passwordreset' => 'Възстановяване на парола',
+'passwordreset-text-one' => 'Попълването на формуляра ще доведе до възстановяване на паролата.',
'passwordreset-text-many' => '{{PLURAL:$1|За възстановяване на паролата е необходимо да се попълни едно от полетата.}}',
'passwordreset-legend' => 'Възстановяване на парола',
'passwordreset-disabled' => 'Възстановяването на паролата е изключено в това уики.',
+'passwordreset-emaildisabled' => 'Функционалността за електронна поща е изключена в това уики.',
'passwordreset-username' => 'Потребителско име:',
'passwordreset-domain' => 'Домейн:',
'passwordreset-capture' => 'Преглеждане на електронното писмо?',
Временна парола: $2',
'passwordreset-emailsent' => 'На електронната поща беше испратено писмо за възстановяване на паролата.',
'passwordreset-emailsent-capture' => 'По-долу е показано електронното писмо за възстановяване на паролата, което беше изпратено.',
-'passwordreset-emailerror-capture' => 'По-долу е показано създадено електронно писмо за възстановяване на паролата, което не беше изпратено на потребителя: $1',
+'passwordreset-emailerror-capture' => 'По-долу е показано създадено електронно писмо за възстановяване на паролата, което не беше изпратено на {{GENDER:$2|потребителя}}: $1',
# Special:ChangeEmail
'changeemail' => 'Промяна на адреса за е-поща',
'loginreqlink' => 'влизане',
'loginreqpagetext' => 'Необходимо е $1, за да можете да разглеждате други страници.',
'accmailtitle' => 'Паролата беше изпратена.',
-'accmailtext' => "Случайно генерирана парола за [[User talk:$1|$1]] беше изпратена на $2.
-
-Паролата за тази нова потребителска сметка може да бъде променена от специалната страница ''[[Special:ChangePassword|„Промяна на парола“]]'' след влизане в системата.",
+'accmailtext' => "Случайно генерирана парола за [[User talk:$1|$1]] беше изпратена на $2. Паролата може да бъде променена от страницата ''[[Special:ChangePassword|„Промяна на паролата“]]'' след влизане в системата.",
'newarticle' => '(нова)',
'newarticletext' => 'Последвахте препратка към страница, която все още не съществува.
За да я създадете, просто започнете да пишете в долната текстова кутия
'nocreate-loggedin' => 'Нямате необходимите права да създавате нови страници.',
'sectioneditnotsupported-title' => 'Не се поддържа редактиране на раздели',
'sectioneditnotsupported-text' => 'Не се поддържа редактиране на раздели на тази страница.',
-'permissionserrors' => 'Ð\93Ñ\80еÑ\88ки при правата на достъп',
+'permissionserrors' => 'Ð\93Ñ\80еÑ\88ка при правата на достъп',
'permissionserrorstext' => 'Нямате правата да извършите това действие по {{PLURAL:$1|следната причина|следните причини}}:',
'permissionserrorstext-withaction' => 'Нямате разрешение за $2 поради {{PLURAL:$1|следната причина|следните причини}}:',
'recreate-moveddeleted-warn' => "'''Внимание: Създавате страница, която по-рано вече е била изтрита.'''
'prefs-rendering' => 'Облик',
'saveprefs' => 'Съхраняване',
'resetprefs' => 'Отмяна на текущите промени',
-'restoreprefs' => 'Възстановяване на всички настройки по подразбиране',
+'restoreprefs' => 'Възстановяване на всички настройки по подразбиране (за всички раздели)',
'prefs-editing' => 'Редактиране',
'rows' => 'Редове:',
'columns' => 'Колони:',
# Recent changes
'nchanges' => '$1 {{PLURAL:$1|промяна|промени}}',
+'enhancedrc-since-last-visit' => '$1 {{PLURAL:$1|от последното посещение}}',
'enhancedrc-history' => 'история',
'recentchanges' => 'Последни промени',
'recentchanges-legend' => 'Опции на списъка с последни промени',
'spam_reverting' => 'Връщане на последната версия, несъдържаща препратки към $1',
'spam_blanking' => 'Всички версии, съдържащи препратки към $1, изчистване',
'spam_deleting' => 'Всички версии съдържат препратки към $1, изтриване',
+'simpleantispam-label' => "Проверка за спам.
+Необходимо е да '''НЕ''' попълвате това поле!",
# Info page
'pageinfo-title' => 'Информация за "$1"',
'spam_reverting' => '$1-এর প্রতি কোন সংযোগ নেই, এমন সর্বশেষ সংস্করণে ফেরত নেওয়া হচ্ছে।',
'spam_blanking' => '$1-এর প্রতি সংযোগ অন্তর্ভুক্ত আছে এমন সমস্ত সংশোধন খালি করা হচ্ছে',
'spam_deleting' => '$1-এর প্রতি সংযোগ অন্তর্ভুক্ত আছে এমন সমস্ত সংশোধন অপসারণ করা হচ্ছে',
+'simpleantispam-label' => "এন্টি-স্প্যাম যাচাই।
+এটা পূরণ করবেন '''না'''!",
# Info page
'pageinfo-title' => '"$1" এর তথ্য',
'spam_reverting' => "Distreiñ d'ar stumm diwezhañ hep liamm davet $1",
'spam_blanking' => 'Diverkañ an holl stummoù enno liammoù davet $1',
'spam_deleting' => 'An holl stummoù enno liammoù war-zu $1, o tiverkañ',
+'simpleantispam-label' => "Taol gwiriañ eneb-strob.
+'''Arabat''' merkañ tra pe dra amañ !",
# Info page
'pageinfo-title' => 'Titouroù evit "$1"',
'spam_reverting' => 'Vraćanje na zadnju verziju koja ne sadrži linkove ka $1',
'spam_blanking' => 'Sve revizije koje sadrže linkove ka $1, očisti',
'spam_deleting' => 'Sve revizije koje sadrže linkove na $1, brišem',
+'simpleantispam-label' => "Provjera protiv spama.
+'''NE''' popunjavaj ovo!",
# Info page
'pageinfo-title' => 'Informacije za "$1"',
'spam_reverting' => 'Es reverteix a la darrera versió que no conté enllaços a $1',
'spam_blanking' => "Totes les revisions contenien enllaços $1, s'està deixant en blanc",
'spam_deleting' => "S'estan suprimint totes les revisions que contenien enllaços a $1",
+'simpleantispam-label' => "Comprovació anti-spam.
+'''NO''' ho ompliu!",
# Info page
'pageinfo-title' => 'Informació de «$1»',
'tog-noconvertlink' => 'Хааман хьажориг кхуллу гlирс дlабайа',
'tog-norollbackdiff' => 'Юха яккхиначул тӀаьхьа ма гайта версешан башхо',
'tog-useeditwarning' => 'Хаамбе бина хийцамаш дӀаязцабеш аса болх дӀатосучу хенахь',
+'tog-prefershttps' => 'Даима лела йе лардина системин чудалар',
'underline-always' => 'Даимна',
'underline-never' => 'Цкъа а',
'changeemail-cancel' => 'Цаоьшу',
# Special:ResetTokens
+'resettokens' => 'Токенаш кхоссар',
'resettokens-text' => 'Хьан йиш ю токенаш кхосса, цара йиш хуьлуьйту цхьаболу долара хаамашна тӀекхача, уьш ю хьан дӀаяздар ца вовшахтесна.
Хьона иза оьшу, ахьа хьай токенаш цхьам гучу яьхна елахь я хьан аккаунт йохийна елахь.',
'resettokens-legend' => 'Токенаш кхоссар',
+'resettokens-tokens' => 'Токенаш:',
'resettokens-token-label' => '$1 (карара маьӀна: $2)',
'resettokens-watchlist-token' => 'Веб-каналан (Atom/RSS) токен [[Special:Watchlist|хьан тергаме могӀам чура агӀонашна хийцамаш бар]]',
+'resettokens-done' => 'Токенаш кхиссина.',
'resettokens-resetbutton' => 'Къастина токенаш кхоссар',
# Edit page toolbar
'summary-preview' => 'Цуьнах лаьцна хирду:',
'blockedtitle' => 'Декъашхочун блоктоьхана',
'nosuchsectiontitle' => 'Дакъа каро йиш яц.',
+'nosuchsectiontext' => 'Хьо гӀерта дуцу дакъа тадан.
+Хьо хӀокху агӀоне хьоьжучу хенахь иза кхечухьа деккхина я дӀадаьккхина хела тарло.',
'loginreqtitle' => 'Хьай цӀарца чугӀо',
'loginreqlink' => 'Логин',
'accmailtitle' => 'Пароль дlаяхьийтина.',
'prefs-email' => 'Электронан почтан параметраш',
'prefs-rendering' => 'Арахьара хатl',
'saveprefs' => 'lалашдан',
+'resetprefs' => 'Кхоссар',
'restoreprefs' => 'МеттахӀоттабе гӀирс Iад битарца',
'prefs-editing' => 'Тадар',
'rows' => 'МогӀанаш:',
'recentchangesdays-max' => 'Къезиг $1 {{PLURAL:$1|дена}}',
'recentchangescount' => 'Iад йитарца гойтуш долу нисдаршан дукхалла',
'prefs-help-recentchangescount' => 'Гойту керла нисдарш, агӀонашан истори, тептарш.',
+'prefs-help-watchlist-token2' => 'Иза хьан тергаме могӀан къайла догӀа ду.
+Муьлха и хуучунна йиш ю хьан тергаме могӀам беша, цундела ма хаийта иза кхечаьрга. [[Special:ResetTokens|ТӀетаӀа йе кхуза и хьайга кхосса лууш делахь]].',
'savedprefs' => 'Хьан гӀирс Ӏалашбина.',
'timezonelegend' => 'Сахьатан аса:',
'localtime' => 'Меттигера хан:',
'show-big-image-size' => '$1 × $2 пикселш',
# Special:NewFiles
-'newimages' => 'Ð\9aеÑ\80лаÑ\87Ñ\83 Ñ\84айланÑ\88ан галерий',
+'newimages' => 'Ð\9aеÑ\80лаÑ\87Ñ\83 Ñ\84айлийн галерий',
'newimages-summary' => 'ХӀокху белхан агӀона чохь гойтуш ю дукха хан йоццуш чуйаьхна файлаш.',
'newimages-legend' => 'Литтар',
+'showhidebots' => '$1 шабелхалой',
'ilsubmit' => 'Лаха',
'sp-newimages-showfrom' => 'Гайта керла файлаш $2, $1 тӀера дуьйна',
'htmlform-selectorother-other' => 'Кхин',
# New logging system
-'logentry-delete-delete' => '$1 {{GENDER:$2|дӀаякхина|дӀаякхина}} агӀо $3',
+'logentry-delete-delete' => '$1 {{GENDER:$2|дӀаяьккхина}} агӀо $3',
'logentry-delete-restore' => '$1 {{GENDER:$2|меттахӀоттайина|меттахӀоттайина}} агӀо $3',
'logentry-move-move' => '$1 {{GENDER:$2|цӀе хийцина|цӀе хийцина}} $3 оцу $4',
'logentry-move-move-noredirect' => '$1 {{GENDER:$2|цӀе хийцина|цӀе хийцина}} $3 оцу $4 дӀасахьажийнарг цаюьтуш',
'spam_reverting' => 'Revert na poslední verzi neobsahující odkazy na $1',
'spam_blanking' => 'Všechny verze obsahovaly odkazy na $1, vyprázdněno',
'spam_deleting' => 'Všechny verze obsahovaly odkazy na $1, smazáno',
+'simpleantispam-label' => "Antispamová kontrola.
+'''NEVYPLŇUJTE''' následující!",
# Info page
'pageinfo-title' => 'Informace o stránce „$1“',
'tagline' => 'Oddi ar {{SITENAME}}',
'help' => 'Cymorth',
'search' => 'Chwilio',
-'searchbutton' => 'Chwilio',
+'searchbutton' => 'Chwilier',
'go' => 'Eler',
'searcharticle' => 'Mynd',
'history' => 'Hanes y dudalen',
'youhavenewmessagesmulti' => 'Mae negeseuon newydd gennych ar $1',
'editsection' => 'golygu',
'editold' => 'golygu',
-'viewsourceold' => 'dangos y tarddiad',
+'viewsourceold' => 'dangos côd y dudalen',
'editlink' => 'golygu',
'viewsourcelink' => 'dangos côd y dudalen',
'editsectionhint' => "Golygu'r adran: $1",
'loginprompt' => "Mae'n rhaid galluogi cwcis er mwyn mewngofnodi i {{SITENAME}}.",
'userlogin' => 'Mewngofnodi / creu cyfrif',
'userloginnocreate' => 'Mewngofnodi',
-'logout' => 'Allgofnodi',
+'logout' => 'Allgofnoder',
'userlogout' => 'Allgofnodi',
'notloggedin' => 'Nid ydych wedi mewngofnodi',
'userlogin-noaccount' => 'Dim cyfrif gennych?',
'userlogin-joinproject' => 'Ymuno â {{SITENAME}}',
-'nologin' => "Dim cyfrif gennych? '''$1'''.",
+'nologin' => 'Dim cyfrif gennych? $1.',
'nologinlink' => 'Crëwch gyfrif',
'createaccount' => 'Creu cyfrif newydd',
-'gotaccount' => "Oes cyfrif gennych eisoes? '''$1'''.",
-'gotaccountlink' => 'Mewngofnodwch',
+'gotaccount' => 'Oes cyfrif gennych eisoes? $1.',
+'gotaccountlink' => 'Mewngofnodi',
'userlogin-resetlink' => 'Ydych chi wedi anghofio eich manylion mewngofnodi?',
'userlogin-resetpassword-link' => 'Ailosod eich cyfrinair',
'helplogin-url' => 'Help:Mewngofnodi',
'changeemail-none' => '(dim)',
'changeemail-password' => 'Eich cyfrinair ar {{SITENAME}}:',
'changeemail-submit' => 'Newidier y cyfeiriad e-bost',
-'changeemail-cancel' => 'Dileer',
+'changeemail-cancel' => 'Diddymer',
# Special:ResetTokens
'resettokens' => 'Ailosod tocynnau',
'spam_reverting' => 'Wedi adfer y diwygiad diweddaraf na sydd yn cynnwys cysylltiadau i $1',
'spam_blanking' => 'Roedd cysylltiadau i $1 gan bob golygiad, felly gwacawyd y dudalen',
'spam_deleting' => 'Roedd pob diwygiad yn cynnwys cysylltiadau â $1, felly fe ddilëwyd y dudalen',
+'simpleantispam-label' => "Prawf gwrth-sbam.
+'''Peidiwch''' â llenwi hwn!",
# Info page
'pageinfo-title' => 'Manylion "$1"',
* @author Morten LJ
* @author Najami
* @author Nghtwlkr
+ * @author Overlaet
* @author Palnatoke
* @author Peter Alberti
* @author Peter Andersen
'createacct-emailrequired' => 'Mailadresse',
'createacct-emailoptional' => 'Mailadresse (valgfri)',
'createacct-email-ph' => 'Indtast din mailadresse',
-'createacct-another-email-ph' => 'Indtast e-mail-adresse',
+'createacct-another-email-ph' => 'Indtast e-mailadresse',
'createaccountmail' => 'Brug en midlertidig tilfældig adgangskode og send den til den angivne e-mailadresse',
'createacct-realname' => 'Dit rigtige navn',
'createaccountreason' => 'Begrundelse:',
kan du bare ignorere denne e-mail og fortsætte med at bruge din gamle adgangskode.',
'noemail' => 'Der er ikke oplyst en e-mailadresse for bruger "$1".',
'noemailcreate' => 'Du skal angive en gyldig e-mailadresse',
-'passwordsent' => 'En ny adgangskode er sendt til e-mail-adressen,
-som er registreret for "$1".
+'passwordsent' => 'En ny adgangskode er sendt til e-mailadressen, som er registreret for "$1".
Du bør logge på og ændre din adgangskode straks efter du har modtaget e-mailen.',
'blocked-mailpassword' => 'Din IP-adresse er spærret for ændring af sider. For at forhindre misbrug, er det heller ikke muligt, at bestille et nyt password.',
'eauthentsent' => 'En bekræftelsesmail er sendt til den angivne e-mailadresse.
'mailerror' => 'Fejl ved afsendelse af e-mail: $1',
'acct_creation_throttle_hit' => 'Besøgende med samme IP-adresse som dig har oprettet {{PLURAL:$1|en konto|$1 kontoer}} det sidste døgn, og det er ikke tilladt at oprette flere.
Derfor kan besøgende ikke oprette flere kontoer fra denne IP-adresse i øjeblikket.',
-'emailauthenticated' => 'Din e-mail-adresse blev bekræftet $2 $3.',
+'emailauthenticated' => 'Din e-mailadresse blev bekræftet $2 $3.',
'emailnotauthenticated' => 'Din e-mail-adresse er endnu ikke bekræftet og de avancerede e-mail-funktioner er slået fra indtil bekræftelse har fundet sted (d.u.a.). Log ind med den midlertidige adgangskode, der er blevet sendt til dig, for at bekræfte, eller bestil et nyt på loginsiden.',
'noemailprefs' => 'Angiv en e-mailadresse, så følgende funktioner er til rådighed.',
-'emailconfirmlink' => 'Bekræft e-mail-adressen (autentificering).',
+'emailconfirmlink' => 'Bekræft din e-mailadresse',
'invalidemailaddress' => 'E-mailadressen kan ikke accepteres da den tilsyneladende har et ugyldigt format. Skriv venligst en e-mailadresse med et korrekt format eller tøm feltet.',
-'cannotchangeemail' => 'De email-adresser, der er tilknyttet brugerkontoer, kan ikke ændres på denne wiki.',
+'cannotchangeemail' => 'De e-mailadresser, der er tilknyttet brugerkontoer, kan ikke ændres på denne wiki.',
'emaildisabled' => 'Denne hjemmeside kan ikke sende emails.',
'accountcreated' => 'Brugerkonto oprettet',
'accountcreatedtext' => 'Brugerkontoen for [[{{ns:User}}:$1|$1]] ([[{{ns:User talk}}:$1|diskussion]]) er oprettet.',
'passwordreset-capture-help' => 'Hvis du krydser dette felt af, vil emailen (med den midlertidige adgangskode) blive vist til dig i tillæg til at blive sendt til brugeren.',
'passwordreset-email' => 'E-mailadresse:',
'passwordreset-emailtitle' => 'Kontooplysninger på {{SITENAME}}',
-'passwordreset-emailtext-ip' => 'Nogen (sandsynligvis dig, fra IP-adressen $1) har anmodet om at få nulstillet din adgangskode til {{SITENAME}} ($4). {{PLURAL:$3|Den følgende brugerkonto er associeret|De følgende brugerkonti er associerede}} med denne e-mail-adresse:
+'passwordreset-emailtext-ip' => 'Nogen (sandsynligvis dig, fra IP-adressen $1) har anmodet om at få nulstillet din adgangskode til {{SITENAME}} ($4). {{PLURAL:$3|Den følgende brugerkonto er associeret|De følgende brugerkonti er associerede}} med denne e-mailadresse:
$2
{{PLURAL:$3|Denne midlertidige adgangskode|Disse midlertidige adgangskoder}} vil udløbe om {{PLURAL:$5|en dag|$5 dage}}.
-Du bør logge på og vælge en ny adgangskode nu. Hvis en anden end dig har gjort denne anmodning, eller hvis du er kommet i tanke om din oprindelig adgangskode og ikke længere ønsker at ændre den, kan du ignorere denne meddelelse og fortsætte med at bruge din gamle adgangskode.',
-'passwordreset-emailtext-user' => 'Brugeren $1 på {{SITENAME}} har anmodet om at få nulstillet din adgangskode til {{SITENAME}} ($4). {{PLURAL:$3|Den følgende brugerkonto er associeret|De følgende brugerkonti er associerede}} med denne e-mail-adresse:
+Du bør logge på og vælge en ny adgangskode nu. Hvis en anden end dig har lavet denne anmodning, eller hvis du er kommet i tanke om din oprindelig adgangskode og ikke længere ønsker at ændre den, kan du ignorere denne meddelelse og fortsætte med at bruge din gamle adgangskode.',
+'passwordreset-emailtext-user' => 'Brugeren $1 på {{SITENAME}} har anmodet om at få nulstillet din adgangskode til {{SITENAME}} ($4). {{PLURAL:$3|Den følgende brugerkonto er associeret|De følgende brugerkonti er associerede}} med denne e-mailadresse:
$2
{{PLURAL:$3|Denne midlertidige adgangskode|Disse midlertidige adgangskoder}} vil udløbe om {{PLURAL:$5|en dag|$5 dage}}.
-Du bør logge på og vælge en ny adgangskode nu. Hvis en anden end dig har gjort denne anmodning, eller hvis du er kommet i tanke om din oprindelig adgangskode og ikke længere ønsker at ændre den, kan du ignorere denne meddelelse og fortsætte med at bruge din gamle adgangskode.',
+Du bør logge på og vælge en ny adgangskode nu. Hvis en anden end dig har lavet denne anmodning, eller hvis du er kommet i tanke om din oprindelig adgangskode og ikke længere ønsker at ændre den, kan du ignorere denne meddelelse og fortsætte med at bruge din gamle adgangskode.',
'passwordreset-emailelement' => 'Brugernavn: $1
Midlertidig adgangskode: $2',
'passwordreset-emailsent' => 'En e-mail om nulstilling af adgangskode er blevet sendt.',
'changeemail-newemail' => 'Ny e-mailadresse:',
'changeemail-none' => '(ingen)',
'changeemail-password' => 'Din adgangskode til {{SITENAME}}:',
-'changeemail-submit' => 'Ændre email',
+'changeemail-submit' => 'Ændre e-mail',
'changeemail-cancel' => 'Afbryd',
# Special:ResetTokens
Hvis du vælger at oplyse dit navn, vil det blive brugt til at tilskrive dig dit arbejde.',
'prefs-help-email' => 'Angivelse af e-mailadresse er valgfrit, men den gør det muligt at sende dig en ny adgangskode hvis du glemmer den.',
'prefs-help-email-others' => 'Du kan også vælge at lade andre kontakte dig gennem din bruger eller diskussions side uden at behøve at afsløre din identitet.',
-'prefs-help-email-required' => 'E-mail-adresse er krævet.',
+'prefs-help-email-required' => 'E-mailadresse er krævet.',
'prefs-info' => 'Grundlæggende information',
'prefs-i18n' => 'Internationalisering:',
'prefs-signature' => 'Signatur',
'right-editmyuserjs' => 'Redigere dine egne JavaScript-filer',
'right-viewmywatchlist' => 'Se din egen overvågningsliste',
'right-editmywatchlist' => 'Redigere din egen overvågningsliste. Bemærk nogle handlinger tilføjer sider selv uden denne rettelse.',
-'right-viewmyprivateinfo' => 'Se dine egen private data (f.eks. e-mail-adresse, rigtige navn)',
-'right-editmyprivateinfo' => 'Redigere din egen private data (f.eks. e-mail-adresse, rigtige navn)',
+'right-viewmyprivateinfo' => 'Se dine egne private data (f.eks. e-mailadresse, rigtige navn)',
+'right-editmyprivateinfo' => 'Redigere dine egne private data (f.eks. e-mailadresse, rigtige navn)',
'right-editmyoptions' => 'Redigere dine egne indstillinger',
'right-rollback' => 'Hurtig gendannelse af alle redigeringer foretaget af den seneste bruger',
'right-markbotedits' => 'Markere gendannelser som ændringer foretaget af en robot',
'action-userrights' => 'ændre alle brugerrettigheder',
'action-userrights-interwiki' => 'ændre brugerrettigheder for brugere på andre wikier',
'action-siteadmin' => 'låse eller låse databasen op',
-'action-sendemail' => 'sende email',
+'action-sendemail' => 'sende e-mail',
'action-editmywatchlist' => 'rediger din overvågningsliste',
'action-viewmywatchlist' => 'se din overvågningsliste',
'action-viewmyprivateinfo' => 'se din private information',
'usermaildisabled' => 'Bruger-e-mail deaktiveret',
'usermaildisabledtext' => 'Du kan ikke sende e-mails til andre brugere på denne wiki',
'noemailtitle' => 'Ingen e-mailadresse',
-'noemailtext' => 'Denne bruger har ikke angivet en gyldig e-mail-adresse.',
+'noemailtext' => 'Denne bruger har ikke angivet en gyldig e-mailadresse.',
'nowikiemailtitle' => 'E-mail er ikke tilladt',
'nowikiemailtext' => 'Denne bruger har valgt ikke at modtage e-mail fra andre brugere.',
'emailnotarget' => 'Ikke-eksisterende eller ugyldigt brugernavn for modtageren.',
'spam_reverting' => 'Sidste version uden henvisning til $1 gendannet.',
'spam_blanking' => 'Alle versioner, som indeholdt henvisninger til $1, er renset.',
'spam_deleting' => 'Alle versioner indeholder henvisninger til $1, sletter',
+'simpleantispam-label' => "Anti-spam tjek.
+Udfyld ''' ikke ''' dette!",
# Info page
'pageinfo-title' => 'Information om "$1"',
'limitall' => 'alle',
# Email address confirmation
-'confirmemail' => 'Bekræft e-mail-adressen',
+'confirmemail' => 'Bekræft e-mailadresse',
'confirmemail_noemail' => 'Du har ikke angivet en gyldig e-mailadresse i din [[Special:Preferences|brugerprofil]].',
-'confirmemail_text' => '{{SITENAME}} kræver, at du bekræfter en e-mail-adresse (autentificering), før du kan bruge de udvidede e-mail-funktioner. Med et klik på kontrolfeltet forneden sendes en e-mail til dig. Denne e-mail indeholder et link med en bekræftelseskode. Med et klik på dette link bekræftes, at e-mail-adressen er gyldig.',
+'confirmemail_text' => '{{SITENAME}} kræver, at du bekræfter en e-mailadresse (autentificering), før du kan bruge de udvidede e-mailfunktioner. Med et klik på kontrolfeltet forneden sendes en e-mail til dig. Denne e-mail indeholder et link med en bekræftelseskode. Med et klik på dette link bekræftes, at e-mailadressen er gyldig.',
'confirmemail_pending' => 'En bekræftelsesmail er allerede sendt til dig. Hvis du først for nylig har oprettet brugerkontoen, vent da et par minutter på denne e-mail, før du bestiller en ny kode.',
'confirmemail_send' => 'Send bekræftelseskode',
'confirmemail_sent' => 'Bekræftelses-e-mail afsendt.',
'confirmemail_oncreate' => 'En bekræftelseskode er sendt til din e-mailadresse. Denne kode skal ikke bruges til at logge på, den kræves til aktivering af e-mailfunktionerne i Wikien.',
-'confirmemail_sendfailed' => 'Bekræftelsesmailen kunne ikke afsendes. Kontroller at e-mail-adressen er korrekt.
+'confirmemail_sendfailed' => '{{SITENAME}} kunne ikke afsende din bekræftelsesmail.
+Kontroller at e-mailadressen er korrekt.
-Svarbesked fra mailserveren: $1',
+Besked fra mailserveren: $1',
'confirmemail_invalid' => 'Ugyldig bekræftelseskode. Kodens gyldighed er muligvis udløbet.',
-'confirmemail_needlogin' => 'Du skal $1 for at bekræfte e-mail-adressen.',
-'confirmemail_success' => 'E-mail-adressen er nu bekræftet. Du kan nu logge på.',
-'confirmemail_loggedin' => 'E-mail-adressen er nu bekræftet.',
-'confirmemail_error' => 'Der skete en fejl ved bekræftelsen af e-mail-adressen.',
-'confirmemail_subject' => '[{{SITENAME}}] - bekræftelse af e-mail-adressen',
+'confirmemail_needlogin' => 'Du skal $1 for at bekræfte din e-mailadresse.',
+'confirmemail_success' => 'E-mailadressen er blevet bekræftet.
+Du kan nu [[Special:UserLogin|logge på]].',
+'confirmemail_loggedin' => 'Din e-mailadresse er nu bekræftet.',
+'confirmemail_error' => 'Der skete en fejl under lagring af din bekræftelse.',
+'confirmemail_subject' => '[{{SITENAME}}] - bekræftelse af e-mailadresse',
'confirmemail_body' => 'Hej,
Nogen med IP-adresse $1, sandsynligvis dig, har bestilt en bekræftelse af denne e-mailadresse til brugerkontoen "$2" på {{SITENAME}}.
--
{{SITENAME}}: {{fullurl:{{Mediawiki:mainpage}}}}',
-'confirmemail_body_changed' => 'Der er nogen, sandsynligvis dig, fra ip-adressen $1, der har ændret emailadressen for kontoen "$2" til denne adresse på {{SITENAME}}.
+'confirmemail_body_changed' => 'Der er nogen, sandsynligvis dig, fra ip-adressen $1, der har ændret e-mailadressen for kontoen "$2" til denne adresse på {{SITENAME}}.
-For at bekræfte, at denne konto virkeligt tilhører dig og for at genaktivere emailfunktionerne på {{SITENAME}}, bedes du åbne følgende link i en browser:
+For at bekræfte, at denne konto virkeligt tilhører dig og for at genaktivere e-mailfunktionerne på {{SITENAME}}, bedes du åbne følgende link i en browser:
$3
'spam_reverting' => 'Letzte Version ohne Links zu $1 wiederhergestellt.',
'spam_blanking' => 'Alle Versionen mit einem Link zu $1 wurden bereinigt.',
'spam_deleting' => 'Alle Versionen mit einem Link zu $1 wurden gelöscht.',
+'simpleantispam-label' => "Spamschutzprüfung.
+Hier '''NICHTS''' eintragen!",
# Info page
'pageinfo-title' => 'Informationen zu „$1“',
'spam_reverting' => 'agêriyeno revizyon o ke tawayê $1 ıney piya çiniyo',
'spam_blanking' => 'Revizyonê gredê $1 vineyay, wa weng kero',
'spam_deleting' => 'Revizyonê gredê $1 vineyay, wa besterneyê',
+'simpleantispam-label' => "tehqiqatê Anti-spami.
+no '''de mekerê'''!",
# Info page
'pageinfo-title' => 'Heq tê "$1"\'i',
'spam_reverting' => 'Nawrośijo se slědna wersija, kótaraž njejo wopśimjeła wótkaz na $1.',
'spam_blanking' => 'Wšykne wersije su wopśimowali wótkaze na $1, do rěcha spórane.',
'spam_deleting' => 'Wšykne wersije z wótkazami do $1 so lašuju',
+'simpleantispam-label' => "Antispamowa kontrola.
+How '''NIC''' zapisaś!",
# Info page
'pageinfo-title' => 'Informacije za bok "$1"',
'spam_reverting' => 'Επαναφορά στην τελευταία έκδοση που δεν περιέχει συνδέσμους στο $1',
'spam_blanking' => 'Όλες οι αναθεωρήσεις περιείχαν συνδέσμους προς το $1, εξάλειψη',
'spam_deleting' => 'Διαγραφή όλων των αναθεωρήσεων που περιείχαν συνδέσμους προς το $1',
+'simpleantispam-label' => "Έλεγχος anti-spam.
+'''ΜΗΝ''' το συμπληρώσετε αυτό!",
# Info page
'pageinfo-title' => 'Πληροφορίες για "$1"',
'broken-file-category' => 'Pages with broken file links',
'categoryviewer-pagedlinks' => '($1) ($2)', # only translate this message to other languages if you have to change it
-'linkprefix' => '/^(.*?)([a-zA-Z\\x80-\\xff]+)$/sD', # only translate this message to other languages if you have to change it
+'linkprefix' => '/^((?>.*(?<![a-zA-Z\\x80-\\xff])))(.+)$/sD', # only translate this message to other languages if you have to change it
'about' => 'About',
'article' => 'Content page',
'spam_reverting' => 'Reverting to last revision not containing links to $1',
'spam_blanking' => 'All revisions contained links to $1, blanking',
'spam_deleting' => 'All revisions contained links to $1, deleting',
+'simpleantispam-label' => "Anti-spam check.
+Do '''NOT''' fill this in!",
# Info page
'pageinfo-header' => '-', # do not translate or duplicate this message to other languages
'spam_reverting' => 'Restarigo de lasta versio ne entenante ligilojn al $1',
'spam_blanking' => 'Forviŝo de ĉiuj versioj entenantaj ligilojn al $1',
'spam_deleting' => 'Ĉiuj versioj enhavis ligilojn al $1 - forigante',
+'simpleantispam-label' => 'Kontrolo kontraŭ spamo.
+NE ENIGU ion ajn!',
# Info page
'pageinfo-title' => 'Informoj por "$1"',
'spam_reverting' => 'Revirtiendo a la última versión que no contenga enlaces a $1',
'spam_blanking' => 'Todas las revisiones contienen enlaces a $1, blanqueando',
'spam_deleting' => 'Todas las revisiones que contienen enlaces a $1, en proceso de eliminación',
+'simpleantispam-label' => 'Comprobación anti-spam
+¡NO rellenes esto!',
# Info page
'pageinfo-title' => 'Información para «$1»',
'revdelete-no-file' => 'Faili ei ole.',
'revdelete-show-file-confirm' => 'Kas oled kindel, et soovid häha faili "<nowiki>$1</nowiki>" kustutatud redaktsiooni, mis tehti $2 kell $3?',
'revdelete-show-file-submit' => 'Jah',
-'revdelete-selected' => "'''{{PLURAL:$2|Valitud versioon|Valitud versioonid}} artiklist [[:$1]]:'''",
+'revdelete-selected' => "'''Valitud {{PLURAL:$2|redaktsioon|redaktsioonid}} leheküljest [[:$1]]:'''",
'logdelete-selected' => "'''Valitud {{PLURAL:$1|logisissekanne|logisissekanded}}:'''",
-'revdelete-text' => "'''Kustutatud redaktsioonid kajastuvad endiselt lehe ajaloos ja logides, kuid osa nende sisust pole tavakasutajatele nähtav.'''
-{{GRAMMAR:genitive|{{SITENAME}}}} administraatorid saavad varjatud sisu siiski vaadata ning seda vajadusel taastada, kui see pole just täiendavalt ära keelatud.",
+'revdelete-text' => "'''Kustutatud redaktsioonid ja sündmused kajastuvad endiselt lehekülje ajaloos ja logides, kuid osa nende sisust pole avalikult nähtav.'''
+{{GRAMMAR:genitive|{{SITENAME}}}} administraatorid saavad peidetud sisu siiski vaadata ning seda vajadusel selle liidese kaudu taastada, kui see pole just täiendavalt keelatud.",
'revdelete-confirm' => 'Kinnita, et soovid tõesti seda teha ning et saad aru tagajärgedest ja tegevus on kooskõlas [[{{MediaWiki:Policy-url}}|siinsete kokkulepetega]].',
'revdelete-suppress-text' => "Andmed tuleks varjata '''ainult''' järgnevatel juhtudel:
* Sobimatu isiklik teave
'spam_reverting' => 'Taastan viimase versiooni, mis ei sisalda linke aadressile $1.',
'spam_blanking' => 'Kõik versioonid sisaldasid linke veebilehele $1. Lehekülg tühjendatud.',
'spam_deleting' => 'Kustutatud kõik redaktsioonid, mis viitasid aadressile $1.',
+'simpleantispam-label' => "Rämpspostikontroll.
+'''ÄRA''' täida seda välja!",
# Info page
'pageinfo-title' => 'Teave lehekülje "$1" kohta',
'spambot_username' => 'MediaWikiren spam garbiketa',
'spam_reverting' => '$1(e)rako loturarik ez daukan azken bertsiora itzultzen',
'spam_blanking' => 'Berrikuspen guztiek $1(e)rako lotura zeukaten, husten',
+'simpleantispam-label' => "Anti-spam egiaztapena.
+Atal hau '''EZ''' bete!",
# Info page
'pageinfo-title' => '"$1"(r)entzako informazioa',
'uploadstash-nofiles' => 'شما هیچ پروندهٔ انبارشدهای ندارید.',
'uploadstash-badtoken' => 'انجام این اقدام ناموفق بود، احتمالاً به این دلیل که اعتبار ویرایش شما به اتمام رسیده است. دوباره امتحان کنید.',
'uploadstash-errclear' => 'پاک کردن پروندهها ناموفق بود.',
-'uploadstash-refresh' => 'تازه کردن فهرست پروندهها',
+'uploadstash-refresh' => 'تازهکردن فهرست پروندهها',
'invalid-chunk-offset' => 'جابجایی نامعتبر قطعه',
# img_auth script messages
'ipb-disableusertalk' => 'جلوگیری از ویرایشی صفحهً بحث توسط خود کاربر در زمانی که بسته است',
'ipb-change-block' => 'بستن دوبارهٔ کاربر با این تنظیمها',
'ipb-confirm' => 'تأیید بستن',
-'badipaddress' => 'نشانی آیپی غیر مجاز',
+'badipaddress' => 'نشانی آیپی نامجاز',
'blockipsuccesssub' => 'بستن با موفقیت انجام شد',
'blockipsuccesstext' => '[[Special:Contributions/$1|$1]] بسته شد.<br />
برای بررسی بستهشدهها [[Special:BlockList|فهرست بستهشدهها]] را ببینید.',
'spam_reverting' => 'واگردانی به آخرین نسخهای که پیوندی به $1 ندارد.',
'spam_blanking' => 'تمام نسخهها حاوی پیوند به $1 بود، در حال خالی کردن',
'spam_deleting' => 'تمام نسخهها حاوی پیوند به $1 بود، در حال حذف',
+'simpleantispam-label' => "بررسی ضدهرزنگاری.
+این قسمت را پر '''نکنید'''!",
# Info page
'pageinfo-title' => 'اطلاعات در مورد «$1»',
'pageinfo-language' => 'زبان محتوای صفحه',
'pageinfo-robot-policy' => 'فهرستکردن توسط رباتها',
'pageinfo-robot-index' => 'مجاز',
-'pageinfo-robot-noindex' => 'غیر مجاز',
+'pageinfo-robot-noindex' => 'نامجاز',
'pageinfo-views' => 'شمار بازدیدها',
'pageinfo-watchers' => 'شمار پیگیریکنندگان صفحه',
'pageinfo-few-watchers' => 'کمتر از $1 {{PLURAL:$1| پیگیر|پیگیر}}',
'badsiglength' => 'Allekirjoitus on liian pitkä – sen on oltava alle $1 {{PLURAL:$1|merkki|merkkiä}}.',
'yourgender' => 'Mikä seuraavista kuvaa sinua?',
'gender-unknown' => 'En halua määritellä',
-'gender-male' => 'Hän on miespuolinen käyttäjä',
-'gender-female' => 'Hän on naispuolinen käyttäjä',
+'gender-male' => 'Mies',
+'gender-female' => 'Nainen',
'prefs-help-gender' => 'Tämän asetuksen määrittäminen on vapaaehtoista.
Ohjelmisto käyttää annettua arvoa viitaten sinuun oikealla kieliopillisella suvulla.
Tämä tieto on julkinen.',
'right-edituserjs' => 'Muokata toisten käyttäjien JavaScript-tiedostoja',
'right-editmyusercss' => 'Muokata omia CSS-tiedostojaan',
'right-editmyuserjs' => 'Muokata omia JavaScript-tiedostojaan',
-'right-viewmywatchlist' => 'Katsoa tarkkailulistaasi',
+'right-viewmywatchlist' => 'Tarkastella tarkkailulistaasi',
'right-editmywatchlist' => 'Muokata tarkkailulistaasi. Huomaa, että jotkin toiminnot lisäävät yhä sivuja listallesi riippumatta tästä oikeudesta.',
'right-viewmyprivateinfo' => 'Nähdä omat yksityiset tietosi (esim. sähköpostiosoite, oikea nimi)',
'right-editmyprivateinfo' => 'Muokata omia yksityisiä tietojasi (esim. sähköpostiosoite, oikea nimi)',
'action-siteadmin' => 'lukita tai avata tietokantaa',
'action-sendemail' => 'lähettää sähköpostia',
'action-editmywatchlist' => 'muokata tarkkailulistaasi',
-'action-viewmywatchlist' => 'katsoa tarkkailulistaasi',
+'action-viewmywatchlist' => 'tarkastella tarkkailulistaasi',
'action-viewmyprivateinfo' => 'katsoa omia yksityisiä tietojasi',
'action-editmyprivateinfo' => 'muokata omia yksityisiä tietojasi',
'protect-otherreason-op' => 'Muu syy',
'protect-dropdown' => '*Yleiset suojaussyyt
** Jatkuva vandalismi
-** Jatkuva roskalinkkien lisääminen
+** Jatkuva mainoslinkkien lisääminen
** Muokkaussota
** Suuri näkyvyys',
'protect-edit-reasonlist' => 'Muokkaa suojaussyitä',
'spam_reverting' => 'Palautettu viimeisimpään versioon, joka ei sisällä linkkejä kohteeseen $1.',
'spam_blanking' => 'Kaikki versiot sisälsivät linkkejä kohteeseen $1. Sivu tyhjennetty.',
'spam_deleting' => 'Kaikki versiot sisälsivät linkkejä kohteeseen $1, poistetaan',
+'simpleantispam-label' => "Mainostenvastainen tarkistus. '''ÄLÄ''' täytä tätä!",
# Info page
'pageinfo-title' => 'Tietoja sivusta $1',
'spam_reverting' => 'Rétablissement de la dernière version ne contenant pas de lien vers $1',
'spam_blanking' => 'Toutes les versions contenant des liens vers $1 sont blanchies',
'spam_deleting' => 'Toutes les versions contenaient des liens vers $1, suppression',
+'simpleantispam-label' => "Vérification anti-spam.
+Ne '''RIEN''' inscrire ici !",
# Info page
'pageinfo-title' => 'Informations pour « $1 »',
'spam_reverting' => 'Rètablissement de la dèrriére vèrsion que contint gins de lim de vers $1',
'spam_blanking' => 'Totes les vèrsions que contegnont des lims de vers $1 sont blanchies',
'spam_deleting' => 'Totes les vèrsions que contegnont des lims de vers $1 sont suprimâs',
+'simpleantispam-label' => "Contrôlo anti-spame.
+Enscrîde '''REN''' ique !",
# Info page
'pageinfo-title' => 'Enformacions por « $1 »',
'spam_reverting' => 'Revertida á última edición sen ligazóns a "$1"',
'spam_blanking' => 'Limpáronse todas as revisións con ligazóns a "$1"',
'spam_deleting' => 'Borráronse todas as revisións con ligazóns a "$1"',
+'simpleantispam-label' => "Comprobación antispam.
+'''NON''' encha isto!",
# Info page
'pageinfo-title' => 'Información sobre "$1"',
'spam_reverting' => 'Letschti Version ohni Links zue $1 widerhärgstellt.',
'spam_blanking' => 'In allene Versione het s Links zue $1 gha, sufer gmacht.',
'spam_deleting' => 'Alli Versione mit eme Link zue $1 sin glescht woret.',
+'simpleantispam-label' => "Spamschutz-Priefig. Do '''nyt''' yytrage!",
# Info page
'pageinfo-title' => 'Informatione zue „$1“',
'spambot_username' => 'મિડિયાવિકી સ્પેમ સફાઇ',
'spam_reverting' => ' $1 પર કડી ન ધરાવતા છેલ્લા ફેરેફાર પર પુનઃ સ્થાપન કરાય છે',
'spam_blanking' => 'બધા ફેરફારોમાં $1 પર કડી હતી, આને હટાવી દેવામાં આવે છે',
+'simpleantispam-label' => "સ્પૅમ વિરોધી તપાસ.
+આને '''ન''' ભરશો!",
# Info page
'pageinfo-title' => ' "$1" માટે માહિતી',
'articlepage' => 'צפייה בדף התוכן',
'talk' => 'שיחה',
'views' => 'צפיות',
-'toolbox' => 'ת×\99×\91ת ×\9b×\9c×\99×\9d',
+'toolbox' => 'כלים',
'userpage' => 'צפייה בדף המשתמש',
'projectpage' => 'צפייה בדף המיזם',
'imagepage' => 'צפייה בדף הקובץ',
'spam_reverting' => 'שחזור לגרסה אחרונה שלא כוללת קישורים ל־$1',
'spam_blanking' => 'כל הגרסאות כוללות קישורים ל־$1, מרוקן את הדף',
'spam_deleting' => 'כל הגרסאות כוללות קישורים ל־$1, מוחק את הדף',
+'simpleantispam-label' => "בדיקת אנטי־ספאם.
+'''אל''' תמלאו שדה זה!",
# Info page
'pageinfo-title' => 'מידע על "$1"',
'spam_reverting' => '$1 को कड़ी ना होने वाले पुराने अवतरण को पुनर्स्थापित कर रहें हैं',
'spam_blanking' => 'सभी अवतरणोंमें $1 को कड़ियां हैं, पूरा पाठ निकाल रहें हैं',
'spam_deleting' => 'सभी अवतरणों में $1 की कड़ी थी, हटाया जा रहा है',
+'simpleantispam-label' => "ऍन्टी-स्पैम जाँच.
+इसे भरें '''नहीं'''!",
# Info page
'pageinfo-title' => '"$1" के लिये जानकारी',
'recentchangesdays-max' => '(maksimalno $1 {{PLURAL:$1|dan|dana}})',
'recentchangescount' => 'Zadani broj izmjena koje se prikazuju:',
'prefs-help-recentchangescount' => 'Ovo uključuje nedavne promjene, stare izmjene, i evidencije.',
+'prefs-help-watchlist-token2' => 'Ovo je tajni ključ prema sažetku vašeg popisa praćenja. Svaki suradnik kojem je poznat, moći će čitati vaš popis praćenih stranica. Ne dijelite ga ni s kim. [[Special:ResetTokens|Kliknite ovdje ako ga želite ponovo postaviti]].',
'savedprefs' => 'Vaše postavke su sačuvane.',
'timezonelegend' => 'Vremenska zona:',
'localtime' => 'Lokalno vrijeme:',
'spam_reverting' => 'Vraćam na zadnju inačicu koja ne sadrži poveznice na $1',
'spam_blanking' => 'Sve inačice sadrže poveznice na $1, brišem cjelokupni sadržaj',
'spam_deleting' => 'Sve inačice sadržale su poveznice na $1, brišem cjelokupni sadržaj',
+'simpleantispam-label' => "Anti-spam provjera.
+'''Ne''' ispunjavajte ovo!",
# Info page
'pageinfo-title' => 'Podatci o stranici "$1"',
'tags' => 'Valjane oznake izmjena',
'tag-filter' => 'Filtar [[Special:Tags|oznaka]]:',
'tag-filter-submit' => 'Filtar',
+'tag-list-wrapper' => '([[Special:Tags|{{PLURAL:$1|Oznaka|Oznake}}]]: $2)',
'tags-title' => 'Oznake',
'tags-intro' => 'Ova je stranica popis oznaka s kojima softver može označiti promjenu te njihovo značenje.',
'tags-tag' => 'Naziv oznake',
'spam_reverting' => 'wróćo na poslednju wersiju, kotraž wotkazy na $1 njewobsahuje',
'spam_blanking' => 'Wšě wersije z wotkazami do $1 so porjedźeja',
'spam_deleting' => 'Wšě wersije z wotkazami do $1 so zhašeja',
+'simpleantispam-label' => "Kontrola přećiwo spamej.
+Tu '''ničo''' njezapisać!",
# Info page
'pageinfo-title' => 'Informacije za stronu "$1"',
'spam_reverting' => 'Visszatérés a $1 lapra mutató hivatkozásokat nem tartalmazó utolsó változathoz',
'spam_blanking' => 'Az összes változat tartalmazott a $1 lapra mutató hivatkozásokat, kiürítés',
'spam_deleting' => 'Minden változat tartalmazott $1-re mutató hivatkozást, törlöm',
+'simpleantispam-label' => "Spam elleni ellenőrzés.
+'''NE''' töltsd ezt ki!",
# Info page
'pageinfo-title' => 'Információk a(z) „$1” lapról',
'articlepage' => 'Vider pagina de contento',
'talk' => 'Discussion',
'views' => 'Representationes',
-'toolbox' => 'Instrumentario',
+'toolbox' => 'Instrumentos',
'userpage' => 'Vider pagina del usator',
'projectpage' => 'Vider pagina de projecto',
'imagepage' => 'Vider le pagina del file',
'deletecomment' => 'Motivo:',
'deleteotherreason' => 'Motivo altere/additional:',
'deletereasonotherlist' => 'Altere motivo',
-'deletereason-dropdown' => '*Motivos habitual pro deler paginas
-** Requesta del autor
+'deletereason-dropdown' => '*Motivos commun pro deler
+** Spam
+** Vandalismo
** Violation de copyright
-** Vandalismo',
+** Requesta del autor
+** Redirection rupte',
'delete-edit-reasonlist' => 'Modificar le motivos pro deletion',
'delete-toobig' => 'Iste pagina ha un grande historia de modificationes con plus de $1 {{PLURAL:$1|version|versiones}}.
Le deletion de tal paginas ha essite restringite pro impedir le disruption accidental de {{SITENAME}}.',
'spam_reverting' => 'Revertite al ultime version que non contine ligamines a $1',
'spam_blanking' => 'Tote le versiones contineva ligamines a $1. Le pagina es vacuate.',
'spam_deleting' => 'Tote le versiones contineva ligamines a $1. Le pagina es delite.',
+'simpleantispam-label' => "Verification antispam.
+'''NON''' completa isto!",
# Info page
'pageinfo-title' => 'Informationes pro "$1"',
'spam_reverting' => 'Membatalkan ke versi terakhir yang tak memiliki pranala ke $1',
'spam_blanking' => 'Semua revisi yang memiliki pranala ke $1, kosong',
'spam_deleting' => 'Semua revisi yang memiliki pranala ke $1, penghapusan',
+'simpleantispam-label' => "Pemeriksaan anti-spam.
+Masukan ini '''DILARANG'''!",
# Info page
'pageinfo-title' => 'Informasi untuk "$1"',
'articlepage' => 'Kitaen ti naglaon a panid',
'talk' => 'Pagtungtungan',
'views' => 'Dagiti pangkitaan',
-'toolbox' => 'Kahon ti ramit',
+'toolbox' => 'Ramramit',
'userpage' => 'Kitaen ti panid ti agar-aramat',
'projectpage' => 'Kitaen ti panid ti gandat',
'imagepage' => 'Kitaen ti panid ti papeles',
'userlogin-resetpassword-link' => 'Iyasentar manen ti kontrasenias',
'helplogin-url' => 'Help:Panagserrek',
'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Tulong iti panagserrek]]',
+'userlogin-loggedin' => 'Nakastrekkan a kas ni {{GENDER:$1|$1}}.
+Usaren ti porma dita baba tapno sumrek a kas sabali nga agar-aramat.',
+'userlogin-createanother' => 'Agaramid pay ti sabali a pakabilangan',
'createacct-join' => 'Ikabil ti pakaammom dita baba.',
'createacct-another-join' => 'Ikabil ti pakaammo ti baro a pakabilangan dita baba.',
'createacct-emailrequired' => 'Esurat a pagtaengan',
'deletecomment' => 'Rason:',
'deleteotherreason' => 'Sabali/maipatinayon a rason:',
'deletereasonotherlist' => 'Sabali a rason',
-'deletereason-dropdown' => '*Kadawyan a rasrason ti panagikkat
-** Kiddaw ti mannurat
+'deletereason-dropdown' => '* Kadawyan a rasrason ti panagikkat
+** Spam
+** Bandalismo
** Panaglabsing iti karbengan ti panagipablaak
-** Bandalismo',
+** Kiddaw ti mannurat
+** Naputed a baw-ing',
'delete-edit-reasonlist' => 'Urnosen dagiti rason ti panagikkat',
'delete-toobig' => 'Daytoy a panid ket dakkel ti pakasaritaanna, sumurok a $1 {{PLURAL:a panagbaliwan|dagiti panagbaliwan}}.
Ti panagikkat ti kastoy a pammpanid ket naparitan tapno mapawilan ti saan nga inkarkaro a pannakadadael ti {{SITENAME}}.',
'spam_reverting' => 'Ipasubli ti kinaudi a panagbaliw nga awan dagiti linaon a silpo idiay $1',
'spam_blanking' => 'Dagiti amin a panagbaliw ket aglaon kadagiti silpo idiay $1, iblanko',
'spam_deleting' => 'Dagiti amin a panagbaliw ket naglaon kadagiti silpo idiay $1, ik-ikkaten',
+'simpleantispam-label' => "Kontra-spam a panagkita.
+ '''Saan''' mo a suratan daytoy!",
# Info page
'pageinfo-title' => 'Pakaammo para iti "$1"',
'spam_reverting' => 'Tek aftur síðustu breytingu sem inniheldur ekki tengil á $1',
'spam_blanking' => 'Allar útgáfur innihéldu tengla á $1, tæmi síðuna',
'spam_deleting' => 'Allar útgáfur innihéldu tengla á $1, eyði síðunni',
+'simpleantispam-label' => 'Kæfuvörn.
+Ekki fylla þetta út!',
# Info page
'pageinfo-title' => 'Upplýsingar um $1',
'spam_reverting' => "Ripristinata l'ultima versione priva di collegamenti a $1",
'spam_blanking' => 'Pagina svuotata, tutte le versioni contenevano collegamenti a $1',
'spam_deleting' => 'Pagina cancellata, tutte le versioni contenevano collegamenti a $1',
+'simpleantispam-label' => "Controllo anti-spam.
+'''NON''' riempire!",
# Info page
'pageinfo-title' => 'Informazioni per "$1"',
'createacct-emailoptional' => 'メールアドレス (省略可能)',
'createacct-email-ph' => 'メールアドレスを入力',
'createacct-another-email-ph' => 'メールアドレスを入力',
-'createaccountmail' => 'ä¸\80æ\99\82ç\9a\84ã\81§ã\83©ã\83³ã\83\80ã\83 ã\81ªã\83\91ã\82¹ã\83¯ã\83¼ã\83\89ã\82\92ç\94\9fæ\88\90ã\81\97ã\81¦ã\80\81æ\8c\87å®\9aã\81\97ã\81\9fã\83¡ã\83¼ã\83«ã\82¢ã\83\89ã\83¬ã\82¹ã\81«é\80\81ä¿¡ã\81\99ã\82\8b',
+'createaccountmail' => 'ä¸\80æ\99\82ç\9a\84ã\81ªç\84¡ä½\9cç\82ºã\81®ã\83\91ã\82¹ã\83¯ã\83¼ã\83\89ã\82\92ç\94\9fæ\88\90ã\81\97ã\81¦ã\80\81æ\8c\87å®\9aã\81\97ã\81\9fã\83¡ã\83¼ã\83«ã\82¢ã\83\89ã\83¬ã\82¹ã\81«é\80\81ä¿¡',
'createacct-realname' => '本名 (省略可能)',
'createaccountreason' => '理由:',
'createacct-reason' => '理由',
'prefs-rendering' => '表示',
'saveprefs' => '保存',
'resetprefs' => '保存していない変更を破棄',
-'restoreprefs' => 'すべて初期設定に戻す',
+'restoreprefs' => 'すべて初期設定に戻す (すべての節について)',
'prefs-editing' => '編集',
'rows' => '行数:',
'columns' => '列数:',
'spam_reverting' => '$1へのリンクを含まない最新の版に差し戻し',
'spam_blanking' => 'すべての版が$1へのリンクを含んでいます。白紙化します。',
'spam_deleting' => 'すべての版が$1へのリンクを含んでいます。削除します。',
+'simpleantispam-label' => "SPAM防止チェックです。
+決してここに値を入力'''しない'''でください。",
# Info page
'pageinfo-title' => '「$1」の情報',
'pageinfo-length' => 'ページの長さ (バイト単位)',
'pageinfo-article-id' => 'ページ ID',
'pageinfo-language' => 'ページ本文の言語',
-'pageinfo-robot-policy' => 'ロボットによるインデックス化',
+'pageinfo-robot-policy' => 'ロボットによるインデックス作成',
'pageinfo-robot-index' => '許可',
'pageinfo-robot-noindex' => '不許可',
'pageinfo-views' => '閲覧回数',
'spam_reverting' => 'Mbalèkaké menyang vèrsi pungkasan sing ora ana pranalané menyang $1',
'spam_blanking' => 'Kabèh révisi sing duwé pranala menyang $1, pangosongan',
'spam_deleting' => 'Kabèh benahan sing nduwé pranala nèng $1, dibusaki',
+'simpleantispam-label' => "Pamariksan anti-spam.
+'''Aja''' diisèkaké!",
# Info page
'pageinfo-title' => 'Inpormasi kanggo "$1"',
'spam_reverting' => 'დაბრუნება ბოლო ვერსიასთან, რომელიც არ შეიცავს ბმულს $1-თან',
'spam_blanking' => 'ყველა გვერდი შეიცავს ბმულს $1-გვერდზე. გასუფთავება',
'spam_deleting' => 'ყველა ვერსია შეიცავდა ბმულს $1-ზე, მიმდინარეობს წაშლა',
+'simpleantispam-label' => "ანტი-სპამის შემოწმება.
+'''არ''' შეავსოთ ის!",
# Info page
'pageinfo-title' => 'ინფორმაცია „$1“-თვის',
'tags-tag' => 'Тег атауы',
'tags-display-header' => 'Өзгеріс тізіміндегі көрінісі',
'tags-description-header' => 'Толық сипаттама мәні',
-'tags-hitcount-header' => 'Телгіленген өзгерістер',
+'tags-active-header' => 'Белсенді ме?',
+'tags-hitcount-header' => 'Тегтелген өзгерістер',
+'tags-active-yes' => 'Иә',
'tags-edit' => 'өңдеу',
'tags-hitcount' => '$1 {{PLURAL:$1|өзгеріс|өзгеріс}}',
'logentry-move-move_redir' => '$1 $3 бетін $4 деген айдатқыш үстіне {{GENDER:$2|жылжытты}}',
'logentry-move-move_redir-noredirect' => '$1 $3 бетін $4 деген айдатқыш үстіне {{GENDER:$2|жылжытты}} (айдатқыш қалдырылмады)',
'logentry-newusers-newusers' => '$1 жаңадан қатысушы тіркелгісін {{GENDER:$2|жасады}}',
-'logentry-newusers-create' => '$1 жаңадан қатысушы тіркелгісі {{GENDER:$2|жасады}}',
+'logentry-newusers-create' => '$1 жаңадан аккаунт тіркеді',
'logentry-newusers-create2' => '$1 $3 деген аккаунт тіркеді',
'logentry-newusers-autocreate' => '$1 қатысушы аккаунтын автоматты түрде {{GENDER:$2|тіркеді}}',
'logentry-rights-rights' => '$1 $3 үшін топ мүшелігін $4 дегеннен $5 дегенге {{GENDER:$2|өзгерті}}',
'articlepage' => '문서 보기',
'talk' => '토론',
'views' => '보기',
-'toolbox' => '도구모음',
+'toolbox' => '도구',
'userpage' => '사용자 문서 보기',
'projectpage' => '프로젝트 문서 보기',
'imagepage' => '파일 문서 보기',
'spam_reverting' => '$1(을)를 포함하지 않는 최신 버전으로 되돌림',
'spam_blanking' => '모든 버전에 $1 링크를 포함하고 있어 차단함',
'spam_deleting' => '모든 버전에 $1 링크를 포함하고 있어 삭제함',
+'simpleantispam-label' => "스팸 방지 검사입니다.
+이것을 입력하지 '''마세요'''!",
# Info page
'pageinfo-title' => '"$1" 문서에 대한 정보',
'spam_reverting' => 'De letzte Version ohne de Links op „$1“ widder zerröckjehollt.',
'spam_blanking' => 'All die Versione hatte Links op „$1“, die sin jetz erus jemaht.',
'spam_deleting' => 'All di Versione met Lenks op „$1“ wääde fott jeschmeße',
+'simpleantispam-label' => 'SPAMschotz — donn hee nix endraare!',
# Info page
'pageinfo-title' => 'Övver di Sigg: „$1“',
'articlepage' => 'Säit',
'talk' => 'Diskussioun',
'views' => 'Affichagen',
-'toolbox' => 'Geschirkëscht',
+'toolbox' => 'Geschir (Tools)',
'userpage' => 'Benotzersäit',
'projectpage' => 'Meta-Text',
'imagepage' => 'Billersäit kucken',
'spam_reverting' => 'Déi lescht Versioun ouni Linken op $1 restauréieren.',
'spam_blanking' => 'An alle Versioune ware Linken op $1, et ass elo alles gebotzt.',
'spam_deleting' => 'All Versioune mat Linken op $1 gi geläscht',
+'simpleantispam-label' => "Anti-Spam Kontroll.
+Fëllt '''näischt''' hei ënnendrënner aus!",
# Info page
'pageinfo-title' => 'Informatioun iwwer "$1"',
'cancel' => 'Cansela',
'moredotdotdot' => 'Plu...',
'mypage' => 'Me paje',
-'mytalk' => 'Me discutes',
+'mytalk' => 'Discutes',
'anontalk' => 'Discutes per esta IP',
'navigation' => 'Naviga',
'and' => ' e',
# Preferences page
'preferences' => 'Preferis',
-'mypreferences' => 'Me preferis',
+'mypreferences' => 'Preferis',
'skin-preview' => 'Previde',
'saveprefs' => 'Fisa',
'rows' => 'Linias:',
'gender-female' => 'Fema',
'email' => 'Eposta',
'prefs-help-realname' => 'Tu nom vera no es obligada, ma si tu vole dona tu nom vera, el va es usada per onora tu per tu labora.',
+'prefs-signature' => 'Suscrive',
# User rights
'userrights' => 'Dirije de la diretos de usores',
'newpageletter' => 'N',
'boteditletter' => 'b',
'rc_categories_any' => 'Cualce',
-'rc-enhanced-expand' => 'Mostra detalias (JavaScript es nesesada)',
+'rc-enhanced-expand' => 'Mostra detalias',
'rc-enhanced-hide' => 'Asconde detalias',
# Recent changes linked
'filehist-dimensions' => 'Mesuras',
'filehist-filesize' => 'Grandia de fix',
'filehist-comment' => 'Comenta',
-'imagelinks' => 'Lias de fix',
+'imagelinks' => 'Usas de fix',
'linkstoimage' => 'Esta {{PLURAL:$1|paje|pajes}} lia a esta fix:',
'nolinkstoimage' => 'Es no pajes ce lia a esta fix.',
'sharedupload' => 'Esta fix es parte de $1 e pote es usada par otra projetas.',
# Watchlist
'watchlist' => 'Pajes oservada',
-'mywatchlist' => 'Me lista de pajes oservada',
+'mywatchlist' => 'Lista de pajes oservada',
'nowatchlist' => 'Tu ave no cosas en tu lista oservada',
'addedwatchtext' => "La paje \"[[:\$1]]\" ia es juntada a tu [[Special:Watchlist|lista de pajes oservada]].
Cambias future a esta paje e se paje de discutes va es listada ala, e la paje va apera en leteras '''forte''' en la [[Special:RecentChanges|lista de cambias resente]] per es plu fasil oservada.
'spam_reverting' => 'Bezig mit trökdrèjje nao de letste versie die gein verwiezing haet nao $1',
'spam_blanking' => "Alle wieziginge mit 'ne link nao $1 waere verwiederd",
'spam_deleting' => 'Alle wieziginge hawwe links nao $1, wuuertj gewösj',
+'simpleantispam-label' => "Antispemcontrole.
+Vol dit veld '''NEET''' in!",
# Info page
'pageinfo-title' => 'Informatie euver "$1"',
'spam_reverting' => 'Atkuriama į ankstesnę versiją, neturinčios nuorodų į $1',
'spam_blanking' => 'Visos versijos turėjo nuorodų į $1, išvaloma',
'spam_deleting' => 'Visos versijos turėjo nuorodų į $1, ištrinama',
+'simpleantispam-label' => "Anti-spam patikra.
+'''NE'''pildykite!",
# Info page
'pageinfo-title' => '„$1“ informacija',
'deletecomment' => 'Iemesls:',
'deleteotherreason' => 'Cits/papildu iemesls:',
'deletereasonotherlist' => 'Cits iemesls',
-'deletereason-dropdown' => '*Izplatīti dzēšanas iemesli
-** Autora pieprsījums
+'deletereason-dropdown' => '* Izplatīti dzēšanas iemesli
+** Spams
+** Vandālisms
** Autortiesību pārkāpums
-** Vandālisms',
+** Autora pieprasījums
+** Nederīga pāradresācija',
'delete-edit-reasonlist' => 'Izmainīt dzēšanas iemeslus',
'delete-toobig' => 'Šai lapai ir liela izmaiņu hronoloģija, vairāk nekā $1 {{PLURAL:$1|versija|versijas}}.
Šādu lapu dzēšana ir atslēgta, lai novērstu nejaušus traucējumus {{grammar:lokatīvs|{{SITENAME}}}}.',
# Namespace form on various pages
'namespace' => 'Vārdtelpa:',
'invert' => 'Izvēlēties pretēji',
+'namespace_association' => 'Saistītā vārdtelpa',
'blanknamespace' => '(Pamatlapa)',
# Contributions
'spamprotectionmatch' => 'Spama filtram radās iebildumi pret šo tekstu: $1',
'spambot_username' => 'MediaWiki surogātpasta tīrīšana',
'spam_reverting' => 'Atjauno iepriekšējo versiju, kas nesatur saiti uz $1',
+'simpleantispam-label' => "Pretspama pārbaude.
+ '''NEAIZPILDĪT!'''",
# Info page
'pageinfo-title' => 'Informācija par "$1"',
'exif-imagelength' => 'augstums',
'exif-bitspersample' => 'biti komponentē',
'exif-compression' => 'Saspiešanas veids',
+'exif-photometricinterpretation' => 'Pikseļu sastāvs',
'exif-orientation' => 'Orientācija',
'exif-samplesperpixel' => 'Komponentu skaits',
'exif-planarconfiguration' => 'Datu izkārtojums',
'userlogin-resetpassword-link' => 'Hamerina ny tenimiafinao',
'helplogin-url' => 'Help:Fidirana',
'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Fanoroana mikasika ny fidirana]]',
+'userlogin-createanother' => 'Hamorona kaonty hafa',
'createacct-join' => 'Atsofohy eo ambany ny fampahalalana momba anao.',
'createacct-another-join' => "Atsofohy eo ambany ny fampahalalana vaovaon'ny kaonty",
'createacct-emailrequired' => 'Adiresy mailaka :',
'listfiles_size' => 'Habe',
'listfiles_description' => 'Visavisa',
'listfiles_count' => 'Version',
+'listfiles-latestversion' => 'Filaza ankehitriny',
'listfiles-latestversion-yes' => 'Eny',
'listfiles-latestversion-no' => 'Tsia',
'morelinkstoimage' => "Hijery [[Special:WhatLinksHere/$1|rohy fanampiny]] makany amin'io rakitra io.",
'linkstoimage-redirect' => '$1 (fihodinana) $2',
'sharedupload' => "Mety ho rakitra itambarana amin'ny tetikasa hafa ny rakitra $1.",
+'sharedupload-desc-there' => "Avy amin'i $1 ity rakitr aity ary mety ampiasaina any amin'ny tetikasa hafa.
+Jereo [$2 ny pejy famisavisana ilay rakitra] ho an'ny fampahalalana fanampiny.",
'sharedupload-desc-here' => "Avy amin'i $1 io rakitra io ary mety ampiasain'ny tetikasa hafa.
Aseho eo ambany ny [$2 famisavisana ilay rakitra].",
+'sharedupload-desc-edit' => "Avy amin'i $1 ity rakitra ity ka mety ampiasaina any amina tetikasa hafa.
+Mety tia hanova ny famisavisany ianao any amin'ny [$2 pejy famisavisana rakitra] any.",
'filepage-nofile' => 'Tsy nahitana rakitra mitondra io anarana io.',
'filepage-nofile-link' => 'Tsy misy rakitra mitondra io anarana io, fa afaka [$1 mampiditra azy ianao].',
'uploadnewversion-linktext' => "Andefa version vaovao n'ity rakitra ity",
Efa nataon'i [[User:$3|$3]] ([[User talk:$3|dinika]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]) ny fanovana farany.",
'editcomment' => "Toy izao no fanamarihana momba io fanovana io: \"''\$1''\".",
'revertpage' => "Voafafa ny fanovana ny [[Special:Contributions/$2|$2]] ([[User talk:$2|Dinika]]); voaverina amin'ny votoatiny teo aloha nataon'i [[User:$1|$1]]",
-'revertpage-nouser' => "Manala ny fanovana (nataon'ny anaram-pikambana nesorina), miverina any amin'ny santiona farany nataon'i [[User:$1|$1]]",
+'revertpage-nouser' => "Manala ny fanovana (nataom-pikambana voaafina), miverina any amin'ny filaza faran'i [[User:$1|$1]]",
'rollback-success' => "Fanalàna ny fanovana nataon'i $1 ;
miverina any amin'ny santiôna farany nataon'i $2.",
'unprotectedarticle' => "nanala ny fiarovana an'i « [[$1]] »",
'movedarticleprotection' => 'nanova ny safidim-piarovana : « [[$2]] » lasa « [[$1]] »',
'protect-title' => "Hanova ny lentam-piarovana ho an'i « $1 »",
-'protect-title-notallowed' => "Hijery ny lentam-piarovana ho an'i «[[$1]]»",
+'protect-title-notallowed' => "Hijery ny lentam-piarovana ho an'i «$1»",
'prot_1movedto2' => '[[$1]] voaova anarana ho [[$2]]',
'protect-badnamespace-title' => 'Anaran-tsehatra tsy azo arovana',
'protect-badnamespace-text' => "Tsy afaka arovana ny pejy ao amin'io anaran-tsehatra io.",
# JavaScriptTest
'javascripttest' => 'Fanandramana JavaScript',
'javascripttest-title' => 'Mandefa fanandramana $1',
+'javascripttest-pagetext-skins' => 'Mifidia skin hanaovana ny fanandramana:',
+'javascripttest-qunit-intro' => "Jereo ny [$1 fanoroana mikasika ny andrana] eo amin'i mediawiki.org.",
+'javascripttest-qunit-heading' => "Tohin'andrana QUnit an'i Javascript eo amin'i MediaWiki",
# Tooltip help for the actions
'tooltip-pt-userpage' => 'Ny pejinao',
'tooltip-ca-viewsource' => 'Voaaro ilay pejy. Fa afaka itanao ny voatotiny.',
'tooltip-ca-history' => "Ny revision natao tamin'ity pejy ity",
'tooltip-ca-protect' => 'Arovy ity pejy ity',
-'tooltip-ca-unprotect' => "Hanala ny fiarovan'ity pejy ity",
+'tooltip-ca-unprotect' => "Hanova ny lentam-piarovan'ity pejy ity",
'tooltip-ca-delete' => 'Fafao ity pejy ity',
'tooltip-ca-undelete' => "Hamerina ny fanovana natao tamin'ity pejy ity talohan'ny famafany",
'tooltip-ca-move' => 'Ovay anarana ilay pejy',
'othercontribs' => "Mifototra amin'ny asan'i $1.",
'others' => 'hafa',
'siteusers' => '{{SITENAME}} mpikambana $1 miisa $2{{PLURAL:}}',
-'anonusers' => "Ny mpikambana tsy nisoratra anarana $1 ao amin'i {{SITENAME}}",
+'anonusers' => "Ny mpikambana tsy nisoratra anarana $1 ao amin'i {{SITENAME}}{{PLURAL:$2}}",
+'creditspage' => "Fisaorana ho an'ny pejy",
# Spam protection
'spamprotectiontitle' => "Sivana mpiaro amin'ny spam",
'pageinfo-length' => 'Halavam-pejy (oktety)',
'pageinfo-article-id' => 'Laharam-pejy',
'pageinfo-language' => "Tenin'ny votoatiny",
-'pageinfo-robot-policy' => "Satan'ny motera fikarohana",
-'pageinfo-robot-index' => 'Azo tondroina',
+'pageinfo-robot-policy' => "Fanondroana ataon'ny rôbô",
+'pageinfo-robot-index' => 'Azo atao',
'pageinfo-robot-noindex' => 'Tsy azo tondroina',
'pageinfo-views' => "Isan'ny jery",
'pageinfo-watchers' => "Isan'ny mpandray anjara manaraka",
+'pageinfo-few-watchers' => 'Mpanaraka latsaky ny $1{{PLURAL:}}',
'pageinfo-redirects-name' => "Fihodinana manketo amin'ity pejy ity",
'pageinfo-subpages-name' => "Zana-pejin'ity pejy ity",
'pageinfo-firstuser' => 'Mpamorona ilay pejy',
'markedaspatrollederrortext' => 'Tsy maintsy misafidy santiôna iray ianao mba hahafahanao manamarika azy ho voamarina.',
'markedaspatrollederror-noautopatrol' => 'Tsy azonao marihana ho voamarina ny fanovanao.',
'markedaspatrollednotify' => "Voamarika ho hita ny fanovana natao tamin'i $1.",
+'markedaspatrollederrornotify' => 'Tsy nahamarika azy ho voaara-maso.',
# Patrol log
'patrol-log-page' => "Laogin'ny fanovana voamarina",
'exif-gpsdestlatitude' => 'Laharam-pehintany tanjona',
'exif-gpsareainformation' => 'Anaram-paritra GPS',
'exif-gpsdatestamp' => 'Daty GPS',
+'exif-worldregioncreated' => 'Faritany nangalana ity ilay sary',
'exif-countrycreated' => 'Firenena nangalana ilay sary',
+'exif-countrycodecreated' => 'Kaontim-pirenena nangalana ilay sary',
+'exif-provinceorstatecreated' => 'Faritany nangalana ilay sary',
+'exif-citycreated' => 'Tanàna nangalana ilay sary',
+'exif-sublocationcreated' => 'Fari-tanàna nangalana ilay sary',
'exif-worldregiondest' => 'Faritany aseho',
'exif-countrydest' => 'Firenena aseho',
'exif-countrycodedest' => 'Kaodim-pirenena aseho',
'exif-contact' => 'Fampahalalana mikasika ny fifandraisana',
'exif-writer' => 'Mpanoratra',
'exif-languagecode' => 'Fiteny',
+'exif-iimversion' => 'filaza IIM',
'exif-iimcategory' => 'Sokajy',
'exif-iimsupplementalcategory' => 'Sokajy fanampiny',
'exif-datetimeexpires' => 'Asa ampiasaina aoriany',
'exif-attributionurl' => "Rehefa mampiasa ity asa ity dia asio rohy mankany amin'i",
'exif-preferredattributionname' => 'Rehefa mampiasa ilay asa, isaory',
'exif-pngfilecomment' => "Famoahan-kevitra momban'ilay rakitra PNG",
+'exif-disclaimer' => 'Fampitanremana',
'exif-contentwarning' => 'Fampitandremana mikasika ny votoatiny',
'exif-giffilecomment' => 'Famoahan-kevitry ny rakirta GIF',
'exif-intellectualgenre' => 'Karazan-javatra',
+'exif-subjectnewscode' => "Kaodin'ny lohahevitra",
+'exif-event' => 'Zava-mitranga azo sary',
+'exif-organisationinimage' => 'Fikambanana azo sary',
+'exif-personinimage' => 'Olona azo sary',
+'exif-originalimageheight' => "Haambon-tsary talohan'ny nanovana azy",
'exif-copyrighted-true' => "Iharan'ny zom-pamorona",
'exif-copyrighted-false' => "Toetran'ny zom-pamorona tsy voafaritra",
'exif-unknowndate' => 'Daty tsy fantatra',
'exif-orientation-1' => 'Tsotra',
+'exif-orientation-3' => 'Ahodina 180°',
+'exif-orientation-4' => 'Navadika ambony ambany',
+'exif-orientation-5' => 'Navadika 90° miankavia ary navadika ambony ambany',
+'exif-orientation-6' => 'Navadika 90° miankavia',
+'exif-orientation-7' => 'Navadika 90° miankavanana ary navadika ambony ambany',
+'exif-orientation-8' => 'Navadika 90° miankavanana',
+
+'exif-planarconfiguration-2' => 'Data misaraka',
'exif-componentsconfiguration-0' => 'tsy nahitana',
'exif-exposureprogram-0' => 'Tsy nolazaina',
+'exif-exposureprogram-1' => 'Natao tanana',
+'exif-exposureprogram-2' => 'Fandaharana ara-dalàna',
'exif-subjectdistance-value' => '$1 metatra',
'exif-lightsource-9' => "Toetr'andro mazava",
'exif-lightsource-10' => "Toetr'andro mandrahona",
'exif-lightsource-11' => 'Haloka',
+'exif-lightsource-17' => 'Jiro manara-penitra A',
+'exif-lightsource-18' => 'Jiro manara-penitra B',
+'exif-lightsource-19' => 'Jiro manara-penitra C',
+'exif-lightsource-24' => "Tangistenina ISO an'ny studio",
+'exif-lightsource-255' => 'Loharanon-kazavana hafa',
# Flash modes
+'exif-flash-fired-0' => 'Tsy nirehitra ny flash',
+'exif-flash-fired-1' => 'Nirehitra ny flash',
+'exif-flash-return-0' => 'Tsy misy stirôbôskôpy mamerina lefa fahitana',
'exif-flash-mode-3' => 'Toetra aotômatika',
'exif-focalplaneresolutionunit-2' => 'Posy',
'confirm_purge_button' => 'Eka',
'confirm-purge-top' => "Fafana ve ny cache-n'ity pejy ity?",
+# action=watch/unwatch
+'confirm-watch-top' => 'Hanaraka ity pejy ity?',
+'confirm-unwatch-button' => 'OK',
+'confirm-unwatch-top' => "Hanala ity pejy ity amin'ny lisitry ny pejy arahinao?",
+
# Multipage image navigation
'imgmultipageprev' => '← pejy nialoha',
'imgmultipagenext' => 'pejy manaraka →',
'table_pager_first' => 'Pejy voalohany',
'table_pager_last' => 'Pejy farany',
'table_pager_limit' => 'Haneho zavatra $1 isaky ny pejy',
+'table_pager_limit_label' => 'Valiny isam-pejy:',
'table_pager_limit_submit' => 'Hitsidika',
'table_pager_empty' => 'Tsy nahitana valiny',
'watchlistedit-noitems' => 'Tsy misy lohateny ny lisitrao.',
'watchlistedit-normal-title' => 'Hanova ny lisitra ny pejy arahako maso',
'watchlistedit-normal-legend' => "Hanala lohateny ao amin'ny lisitra",
+'watchlistedit-normal-explain' => "Aseho eo ambany ny lohateny ao amin'ny lisitry ny pejy arahanao.
+Tsindrio ny boaty eo akaikiny ary tsindrio « {{int:Watchlistedit-normal-submit}} ».
+Azonao atao ihany koa ny [[Special:EditWatchlist/raw|manova ilay lisitra amin'ny akorany]].",
'watchlistedit-normal-submit' => 'Hanala ireo lohateny nosafidiana ireo',
+'watchlistedit-normal-done' => "Afaka tamin'ny lisitry ny pejy arahanao ny lohateny $1{{PLURAL:}}",
'watchlistedit-raw-title' => "Hanova ny lisitra ny pejy arahako maso amin'ny fomba akorany",
'watchlistedit-raw-legend' => "Fanovana ilay lisitry ny pejy arahina maso amin'ny fomba akorany",
'watchlistedit-raw-titles' => 'Lohateny :',
'version-hook-subscribedby' => "Nalefan'i",
'version-version' => '(Santiôna $1)',
'version-license' => 'Lisansy',
+'version-poweredby-others' => 'hafa',
'version-software' => 'Rindrankahy voapetraka',
'version-software-product' => 'Vokatra',
'version-software-version' => 'Santiôna',
# Spam protection
'spam_blanking' => 'Sado revisi nan ado pautan ka $1, kosong',
'spam_deleting' => 'Sado revisi nan ado pautan ka $1, dihapuih',
+'simpleantispam-label' => "Pamarisoan anti-spam.
+Masukan ko '''DILARANG'''!",
# Info page
'pageinfo-title' => 'Informasi untuak "$1"',
'articlepage' => 'Преглед на содржината',
'talk' => 'Разговор',
'views' => 'Посети',
-'toolbox' => 'Ð\90лаÑ\82ник',
+'toolbox' => 'Ð\90лаÑ\82ки',
'userpage' => 'Преглед на корисничката страница',
'projectpage' => 'Преглед на проектната страница',
'imagepage' => 'Преглед на страницата на податотеката',
'spam_reverting' => 'Враќам на последната верзија што не содржи врска до $1',
'spam_blanking' => 'Сите ревизии содржеа врски до $1. Чистам',
'spam_deleting' => 'Сите ревизии содржеа врски до $1. Бришам',
+'simpleantispam-label' => "Антиспам проверка.
+'''НЕ''' го пополнувајте ова!",
# Info page
'pageinfo-title' => 'Информации за „$1“',
'spam_reverting' => '$1 എന്നതിലേയ്ക്കുള്ള കണ്ണികളില്ലാത്ത അവസാന നാൾപ്പതിപ്പിലേയ്ക്ക് മുൻപ്രാപനം ചെയ്യുന്നു',
'spam_blanking' => '$1 എന്നതിലേയ്ക്ക് കണ്ണികളുള്ള എല്ലാ നാൾപ്പതിപ്പുകളും ശൂന്യമാക്കുന്നു',
'spam_deleting' => '$1 എന്നതിലേയ്ക്ക് കണ്ണികളുള്ള എല്ലാ നാൾപ്പതിപ്പുകളും മായ്ക്കുന്നു',
+'simpleantispam-label' => "സ്പാം വിരുദ്ധ പരിശോധന.
+ഇത് '''പൂരിപ്പിക്കരുത്'''",
# Info page
'pageinfo-title' => '"$1" എന്ന താളിന്റെ വിവരങ്ങൾ',
'articlepage' => 'लेख पृष्ठ',
'talk' => 'चर्चा',
'views' => 'दृष्ये',
-'toolbox' => 'साधनपà¥\87à¤\9fà¥\80',
+'toolbox' => 'साधनà¥\87',
'userpage' => 'सदस्य पृष्ठ',
'projectpage' => 'प्रकल्प पान पहा',
'imagepage' => 'संचिका पृष्ठ पहा',
'databaseerror-text' => 'विदागार पृच्छा त्रूटी घडलेली आहे.
ते संचेतनात गणकदोष असण्याची शक्यता निर्देशित करते.',
'databaseerror-textcl' => 'विदागार पृच्छा त्रूटी घडलेली आहे.',
+'databaseerror-query' => 'पृच्छा:$1',
+'databaseerror-function' => 'क्रिया: $1',
+'databaseerror-error' => 'त्रुटी: $1',
'laggedslavemode' => "'''सुचना:''' पानावर अद्ययावत बदल नसतील.",
'readonly' => 'विदागारास (डाटाबेस) ताळे आहे.',
'enterlockreason' => 'विदागारास ताळे ठोकण्याचे कारण, ताळे उघडले जाण्याच्या अदमासे कालावधीसहीत द्या.',
'userlogin-resetpassword-link' => 'परवलीचा शब्द पुन्हा जुळवा (रिसेट)',
'helplogin-url' => 'Help:सनोंद प्रवेशासाठी(लॉगिंग-ईन)',
'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|सनोंद-प्रवेशासाठी(लॉग-ईन) सहाय्य]]',
+'userlogin-loggedin' => 'आपण पुर्वीच {{GENDER:$1|$1}} म्हणून सनोंद प्रवेशित आहात.वेगळ्या सदस्यनावाने सनोंद प्रवेशासाठी खालील आवेदन वापरा.',
+'userlogin-createanother' => 'दुसरे नवीन खाते तयार करा',
'createacct-join' => 'खाली आपली माहिती भरा',
'createacct-another-join' => 'नविन खात्याबाबतची माहिती येथे खाली टाका.',
'createacct-emailrequired' => 'विपत्र पत्ता(ई-मेल)',
'prefs-displaywatchlist' => 'दर्शन पर्याय',
'prefs-tokenwatchlist' => 'ओळखचिन्ह',
'prefs-diffs' => 'फरक',
+'prefs-help-prefershttps' => 'हा पसंतीक्रम आपल्या पुढील सनोंद प्रवेशानंतर कार्यान्वित होईल.',
# User preference: email validation using jQuery
'email-address-validity-valid' => 'विपत्रपत्ता वैध दिसत आहे',
'action-block' => 'या सदस्यास संपादन करण्यापासून प्रतिबंधित करा',
'action-protect' => 'या पानाचा सुरक्षास्तर बदला',
'action-rollback' => 'या आधीच्या सदस्याने नुकतेच संपादन केलेले एखादे विशिष्ट पानाचे बदल लवकर पूर्वस्थितीत न्या',
-'action-import' => 'दà¥\81सऱà¥\8dया विà¤\95à¥\80वरà¥\81न हà¥\87 पान आयात करा',
-'action-importupload' => 'अपभारीत संचिकेतून पान आयात करा',
+'action-import' => 'दà¥\81सऱà¥\8dया विà¤\95à¥\80वरà¥\81न पानà¥\87 आयात करा',
+'action-importupload' => 'अपभारीत संचिकेतून पाने आयात करा',
'action-patrol' => "इतरांची संपादनांवर 'पहारा दिला' म्हणून खूण करा",
'action-autopatrol' => 'आपल्या संपादनांवर पहारा दिल्याची खूण करा',
'action-unwatchedpages' => 'पहारा न दिलेल्या पानांची यादी पहा',
# Recent changes
'nchanges' => '$1 {{PLURAL:$1|बदल}}',
+'enhancedrc-since-last-visit' => '$1 {{PLURAL:$1|मागील भेटीनंतर}}',
'enhancedrc-history' => 'इतिहास',
'recentchanges' => 'अलीकडील बदल',
'recentchanges-legend' => 'अलीकडील बदलाएवजी पर्याय',
'listfiles_size' => 'आकार (बाईट्स)',
'listfiles_description' => 'वर्णन',
'listfiles_count' => 'आवृत्त्या',
+'listfiles-show-all' => 'या चित्राच्या जून्या आवृत्त्या अंतर्भूत करा.',
+'listfiles-latestversion' => 'सध्याची आवृत्ती',
'listfiles-latestversion-yes' => 'हो',
'listfiles-latestversion-no' => 'नाही',
'listusers' => 'सदस्यांची यादी',
'listusers-editsonly' => 'फक्त संपादनांसहित सदस्य दाखवा',
'listusers-creationsort' => 'निर्मितीच्या तारखेप्रमाणे लावा',
+'listusers-desc' => 'उतरत्या क्रमाने निवडा',
'usereditcount' => '$1 {{PLURAL:$1|संपादन|संपादने}}',
'usercreated' => 'दि. $1 ला, $2 वाजता, सदस्य खाते{{GENDER:$3|द्वारे बनविल्या गेले}}',
'newpages' => 'नवीन पाने',
'deleteotherreason' => 'दुसरे/अतिरिक्त कारण:',
'deletereasonotherlist' => 'दुसरे कारण',
'deletereason-dropdown' => '* वगळण्याची सामान्य कारणे
-** लेखकाची(लेखिकेची) विनंती
+** स्पॅम
+** उत्पात
** प्रताधिकार उल्लंघन
-** उत्पात',
+** लेखकाची(लेखिकेची) विनंती
+** तुटकी पुनर्निर्देशने',
'delete-edit-reasonlist' => 'वगळण्याची कारणे संपादित करा',
'delete-toobig' => 'या पानाला खूप मोठी इतिहास यादी आहे, तसेच हे पान $1 {{PLURAL:$1|पेक्षा|पेक्षा}}पेक्षा जास्त वेळा बदलण्यात आलेले आहे. अशी पाने वगळणे हे {{SITENAME}} ला धोकादायक ठरू नये म्हणून शक्य केलेले नाही.',
'delete-warning-toobig' => 'या पानाला खूप मोठी इतिहास यादी आहे, तसेच हे पान $1 {{PLURAL:$1|पेक्षा|पेक्षा}} पेक्षा जास्त वेळा बदलण्यात आलेले आहे.
शेवटचे संपादन [[User:$3|$3]] ([[User talk:$3|Talk]] [[Special:Contributions/$3|{{int:contribslink}}]])-चे होते.',
'editcomment' => "संपादन सारांश \"''\$1''\" होता.",
'revertpage' => '[[Special:Contributions/$2|$2]] ([[User talk:$2|चर्चा]]) यांनी केलेले बदल [[User:$1|$1]] यांच्या आवृत्तीकडे पूर्वपदास नेले.',
-'revertpage-nouser' => '(सदस्यनाम लपवले) यांनी केलेले बदल उलटवून [[User:$1|$1]] यांच्या आवृत्तीप्रमाणे पूर्ववत केले.',
+'revertpage-nouser' => 'लपविलेल्या सदस्याची संपादने उलटवून {{GENDER:$1|[[सदस्य:$1|$1]]}} यांच्या आवृत्तीप्रमाणे पूर्ववत केले.',
'rollback-success' => '$1 ने उलटवलेली संपादने;$2 च्या आवृत्तीस परत नेली.',
# Edit tokens
'contributions' => '{{GENDER:$1|सदस्य}} योगदान',
'contributions-title' => '$1 साठी सदस्य-योगदान',
'mycontris' => 'योगदान',
-'contribsub2' => '$1 ($2) साठी',
+'contribsub2' => '{{GENDER:$3|$1}} ($2) साठी',
'nocontribs' => 'या मानदंडाशी जुळणारे बदल सापडले नाहीत.',
'uctop' => '(सद्य)',
'month' => 'या महिन्यापासून (आणि पूर्वीचे):',
'spam_reverting' => '$1शी दुवे नसलेल्या गेल्या आवर्तनाकडे परत उलटवत आहे',
'spam_blanking' => '$1शी दुवे असलेली सर्व आवर्तने,रिक्त केली जात आहेत',
'spam_deleting' => 'यातील सर्व आवृत्त्यांचे $1शी दुवे आहेत.गाळत आहे',
+'simpleantispam-label' => "चिखलणी विरोधक तपासणी.
+हे भरू '''नका'''!",
# Info page
'pageinfo-title' => '"$1" च्याबद्दल माहिती',
'tags-tag' => 'खूण नाव',
'tags-display-header' => 'बदल सुचीवर कसे दिसेल',
'tags-description-header' => 'अर्थाची पूर्ण माहिती',
+'tags-active-header' => 'सक्रिय?',
'tags-hitcount-header' => 'खुणा केलेले बदल',
+'tags-active-yes' => 'होय',
+'tags-active-no' => 'नाही',
'tags-edit' => 'संपादन करा',
'tags-hitcount' => '$1 {{PLURAL:$1|बदल|बदल}}',
'dberr-problems' => 'माफ करा, हे संकेतस्थळ सध्या तांत्रिक अडचणींना सामोरे जात आहे.',
'dberr-again' => 'थोडा वेळ थांबून पुन्हा पहा.',
'dberr-info' => '( विदादाताशी संपर्क साधण्यात असमर्थ : $1)',
+'dberr-info-hidden' => '( विदादात्याशी संपर्क साधण्यात असमर्थ)',
'dberr-usegoogle' => 'तोपर्यंत गूगलवर शोधून पहा',
'dberr-outofdate' => 'लक्षात घ्या, आमच्या मजकुराबाबत त्यांची सूची कालबाह्य असू शकते',
'dberr-cachederror' => 'ही मागवलेल्या पानाची सयीतील प्रत आहे, ती अद्ययावत नसण्याची शक्यता आहे.',
'limitreport-cputime' => 'CPU वापराचा वेळ',
'limitreport-cputime-value' => '$1 {{PLURAL:$1|सेकंद}}',
'limitreport-walltime-value' => '$1 {{PLURAL:$1|सेकंद}}',
-'limitreport-postexpandincludesize-value' => '$1/$2 बाईटस्',
-'limitreport-templateargumentsize-value' => '$1/$2 बाईटस्',
+'limitreport-postexpandincludesize-value' => '$1/$2 {{PLURAL:$2|बाइट|बाइट्स}}',
+'limitreport-templateargumentsize-value' => '$1/$2 {{PLURAL:$2|बाइट|बाइट्स}}',
);
'spam_reverting' => 'Membalikkan kepada versi terakhir yang tidak mengandungi pautan ke $1',
'spam_blanking' => 'Mengosongkan semua semakan yang mengandungi pautan ke $1',
'spam_deleting' => 'Menghapuskan semua semakan yang mengandungi pautan ke $1',
+'simpleantispam-label' => "Pemeriksaan anti-spam. '''JANGAN''' isi ruangan ini!",
# Info page
'pageinfo-title' => 'Maklumat untuk "$1"',
'spam_reverting' => 'Tilbakestiller til siste versjon uten lenke til $1',
'spam_blanking' => 'Alle revisjoner inneholdt lenke til $1, tømmer siden',
'spam_deleting' => 'Sletter alle revisjoner med lenker til $1',
+'simpleantispam-label' => "Antispamsjekk.
+'''IKKE''' fyll inn dette feltet!",
# Info page
'pageinfo-title' => 'Informasjon om «$1»',
'spambot_username' => 'MediaWiki Spam-Oprümen',
'spam_reverting' => 'Trüchdreiht na de letzte Version ahn Lenken na $1.',
'spam_blanking' => 'All Versionen harrn Lenken na $1, rein maakt.',
+'simpleantispam-label' => "Antispam-Kuntrull. Hier '''nix''' indragen!",
# Info page
'pageinfo-title' => 'Informatschoon för "$1"',
'articlepage' => 'कन्टेन्ट पृष्ठ हेर्नुहोस्',
'talk' => 'वार्तालाप',
'views' => 'अवलोकनहरू',
-'toolbox' => 'à¤\94à¤\9cारबà¤\9fà¥\8dà¤\9fा',
+'toolbox' => 'à¤\94à¤\9cारहरà¥\82',
'userpage' => 'प्रयोगकर्ता पृष्ठ हेर्ने',
'projectpage' => 'प्रोजेक्ट पृष्ठ हेर्ने',
'imagepage' => 'फाइल पृष्ठ हेर्नुहोस्',
'newmessageslink' => 'नयाँ सन्देशहरू',
'newmessagesdifflink' => 'आखिरी परिवर्तन',
'youhavenewmessagesfromusers' => 'तपाईंको लागि {{PLURAL:$3|प्रयोगकर्ता|$3 प्रयोगकर्ताहरु}} ($2) बाट $1',
+'youhavenewmessagesmanyusers' => 'तपाईँलाई धेरै प्रयोगकर्ताहरू($2) बाट $1 छ ।',
+'newmessageslinkplural' => '{{PLURAL:$1|नयाँ सन्देश|नयाँ सन्देशहरू}}',
+'newmessagesdifflinkplural' => 'अन्तिम {{PLURAL:$1|सम्पादन|सम्पादनहरू}}',
'youhavenewmessagesmulti' => 'तपाईंको लागि $1 मा नयाँ सन्देशहरू छन्',
'editsection' => 'सम्पादन',
'editold' => 'सम्पादन गर्ने',
# General errors
'error' => 'त्रुटि',
'databaseerror' => 'डेटावेस त्रुटि',
+'databaseerror-text' => 'डेटाबेस क्वेरीमा खराबी देखा पर्यो ।
+यसले सफ्टवेयरमा त्रुटी रहेको इङ्गित गर्न सक्छ ।',
+'databaseerror-textcl' => 'डेटावेस क्वेरीमा खराबी देखियो ।',
+'databaseerror-query' => 'क्वेरी: $1',
+'databaseerror-function' => 'फङ्सन : $1',
+'databaseerror-error' => 'खराबी: $1',
'laggedslavemode' => "'''चेतावनी:''' पृष्ठमा हालका अद्यतनहरु नहुनसक्छन् ।",
'readonly' => 'डेटाबेस बन्द गरिएको छ',
'enterlockreason' => 'ताल्चा मार्नुको कारण दिनुहोस्, साथै ताल्चा हटाउने समयको अवधि अनुमान लगाउनुहोस्।',
'cannotdelete' => '"$1" पृष्ठ वा फ़ाइल मेट्नसकिएन।
यो अघिबाट नैं मेटिएको हुनुपर्छ।',
'cannotdelete-title' => 'पृष्ठ "$1" लाई मेट्न सकिएन',
+'delete-hook-aborted' => 'हुकले सम्पादनकार्य बन्द गरिदियो ।
+कुनै कारण दिइएन ।',
'badtitle' => 'गलत शीर्षक',
'badtitletext' => 'अनुरोध गरेको पृष्ठ शीर्षक अमान्य, खाली वा गलत रुपमा अन्तर भाषा वा अन्तर विकी सम्बन्ध गरिएको थियो। यसमा शीर्षकमा प्रयोग गर्न नमिल्ने एक वा बढी अक्षरहरू रहेका हुनसक्छन् ।',
'perfcached' => 'तलको डाटाहरु क्याचमा रहेका कुराहरु हुन्। अपटुडेट नहुनपनि सक्छन्।अधिकतम {{PLURAL:$1|नतिजा|$1 नतिजाहरू}} क्यासमा उपलब्ध छ।',
'actionthrottled' => 'कार्य रोकियो',
'actionthrottledtext' => 'स्पामबाट बच्ने तरिकाको रुपमा , तपाईँलाई यो कार्य थोरै समयमा धेरै पटक गर्नबाट सिमित गरिएको छ, र तपाईले आफ्नो सिमा पार गरिसक्नु भयो ।
कृपया केही मिनेटहरु पछि पुन: प्रयास गर्नुहोस् ।',
-'protectedpagetext' => 'यà¥\8b पà¥\83षà¥\8dठसमà¥\8dपादन हà¥\81नबाà¤\9f बà¤\9aाà¤\89न समà¥\8dपादनमा रà¥\8bà¤\95 लगाइएको छ।',
+'protectedpagetext' => 'यà¥\8b पà¥\83षà¥\8dठसमà¥\8dपादन हà¥\81नबाà¤\9f बà¤\9aाà¤\89न समà¥\8dपादनमा तथा à¤\85नà¥\8dयà¤\95ारà¥\8dयमा रà¥\8bà¤\95 लगाइएको छ।',
'viewsourcetext' => 'तपाईँले यस पृष्ठको स्रोत हेर्न र प्रतिलिपी गर्न सक्नुहुन्छ ।',
'viewyourtext' => "यस पृष्ठमा रहेका '''तपाईँका सम्पादनहरु''' हेर्न या प्रतिलिपी गर्न सक्नुहुन्छ :",
-'protectedinterface' => 'यो पृष्ठले सफ्टवेयरको लागि अन्तरमोहडा पाठ प्रदान गर्दछ , र यसलाई दुरुपयोग हुनबाट बचाउन ताल्चा मारिएको छ।',
+'protectedinterface' => 'यो पृष्ठले सफ्टवेयरको लागि अन्तरमोहडा पाठ प्रदान गर्दछ , र यसलाई दुरुपयोग हुनबाट बचाउन सुरक्षा प्रादन गरिएको छ।
+सम्पूर्ण विकिहरूका लागि अनुवादमा परिवर्तन गर्नको लागि [//translatewiki.net/ translatewiki.net], प्रयोग गर्नुहोस् , मिडियाविकि स्थानियकरण परियोजना ।',
'editinginterface' => "'''चेतावनी:''' तपाईं यस्तो पृष्ठलाई सम्पादन गर्नुहुँदैछ, जसले सफ्टवेयरको लागि अन्तरमोहोड़ा (interface) पाठ प्रदान गर्दछ।
यसको परिवर्तनले यस विकिमा अरु प्रयोगकर्ताको अन्तरमोहोड़ाको प्रदर्शनमा प्रभाव पार्छ।
सबै विकिका निम्ति अनुवाद जोड्न अथवा परिबर्तन गर्न कृपया यहाँ जानुहोस् [//translatewiki.net/ translatewiki.net], मीडियाविकि स्थानीयकरण पारियोजना।",
'ns-specialprotected' => 'विशेष पृष्ठ सम्पादन गर्न सकिदैन ।',
'titleprotected' => ' [[User:$1|$1]]द्वारा यो शीर्षक निर्माणहुनबाट जोगाइएको छ।
कारण "\'\'$2\'\'" हो ।',
-'filereadonlyerror' => 'फाà¤\87ल "$1" लाà¤\88 परिवरà¥\8dतन à¤\97रà¥\8dन सà¤\95िà¤\82दà¥\88न à¤\95िन à¤à¤¨à¥\87à¤\82 फाइल भण्डार "$2" केवल पढ्ने स्थिति (read-only mode)मा छ।
+'filereadonlyerror' => 'फाà¤\87ल "$1" लाà¤\88 परिवरà¥\8dतन à¤\97रà¥\8dन सà¤\95िà¤\81दà¥\88न à¤\95िन à¤à¤¨à¥\87 फाइल भण्डार "$2" केवल पढ्ने स्थिति (read-only mode)मा छ।
-à¤\95ारण यà¥\8b दिà¤\8fà¤\95à¥\8bà¤\9b: "\'\'$3\'\'"।',
+यसलाà¤\88 सà¥\81रà¤\95à¥\8dषित à¤\97रà¥\8dनà¥\87 पà¥\8dरवनà¥\8dधà¤\95लà¥\87 यà¥\8b à¤\95ारण दिà¤\8fà¤\95ाà¤\9bनà¥\8d : \'\'$3\'\'।',
'exception-nologin' => 'प्रवेश (लग ईन) नगरिएको',
# Virus scanner
# Login and logout pages
'logouttext' => "'''तपाईं अहिले बाहिर निस्कनु भएको छ।'''
-तपाईंले नाम/खाताविनै पनि {{SITENAME}}मा प्रयोग गर्न सक्नुहुन्छ, अथवा अघिकै वा अर्कै कुनै नामको खाताबाट <span class='plainlinks'>[$1 फेरि प्रवेश गर्न]</span> पनि सक्नुहुन्छ।
-याद राà¤\96à¥\8dनà¥\81हà¥\8bसà¥\8d तपाà¤\88à¤\82लà¥\87 बà¥\8dराà¤\89à¤\9cरà¤\95à¥\8b सà¥\8dमरण à¤à¤£à¥\8dडार खालि नगर्दासम्म कुनै पृष्ठहरूमा तपाईं अझै प्रवेश गरिराखेको देखाउन सक्छ।",
+
+याद राà¤\96à¥\8dनà¥\81हà¥\8bसà¥\8d तपाà¤\88à¤\82लà¥\87 बà¥\8dराà¤\89à¤\9cरà¤\95à¥\8b à¤\95à¥\8dयाश खालि नगर्दासम्म कुनै पृष्ठहरूमा तपाईं अझै प्रवेश गरिराखेको देखाउन सक्छ।",
'welcomeuser' => '$1जी स्वागत छ!',
'yourname' => 'प्रयोगकर्ता नाम:',
+'userlogin-yourname' => 'प्रयोगकर्ता नाम',
+'userlogin-yourname-ph' => 'तपाईँको प्रयोगकर्तानाम लेख्नुहोस्',
+'createacct-another-username-ph' => 'प्रयोगकर्तानाम लेख्नुहोस्',
'yourpassword' => 'पासवर्ड',
+'userlogin-yourpassword' => 'पासवर्ड',
+'userlogin-yourpassword-ph' => 'तपाईँको पासवर्ड लेख्नुहोस्',
+'createacct-yourpassword-ph' => 'पासवर्ड लेख्नुहोस्',
'yourpasswordagain' => 'पासवर्ड फेरि टाईप गर्नुहोस्',
+'createacct-yourpasswordagain' => 'पासवर्ड निश्चित गर्नुहोस्',
+'createacct-yourpasswordagain-ph' => 'फेरि पासवर्ड लेख्नुहोस्',
'remembermypassword' => 'यो कम्प्युटरमा मेरो प्रवेश याद गर । (धेरैमा $1 {{PLURAL:$1|दिन|दिनहरु}})',
+'userlogin-remembermypassword' => 'मलाई प्रवेश गराइराख्ने',
+'userlogin-signwithsecure' => 'सुक्षित जडान प्रयोग गर्ने',
'yourdomainname' => 'तपाईंको ज्ञानक्षेत्र(डोमेन)',
+'password-change-forbidden' => 'यो विकिमा पासवर्ड परिवर्तन गर्न सक्नुहुन्न ।',
'externaldberror' => 'यहाँ प्रमाणिकरण डेटाबेस त्रुटि भयो या त तपाईंलाई आफ्नो बाहिरी खाता अद्यतन गर्ने अनुमति छैन।',
'login' => 'प्रवेश',
'nav-login-createaccount' => 'प्रवेश गर्ने/नयाँ खाता बनाउने',
'logout' => 'निर्गमन',
'userlogout' => 'निर्गमन (लग आउउ)',
'notloggedin' => 'प्रवेश (लग ईन) नगरिएको',
+'userlogin-noaccount' => 'के खाता छैन ?',
+'userlogin-joinproject' => '{{SITENAME}} मा खाता खोल्नुहोस् ।',
'nologin' => 'तपाईको खाता छैन? $1 ।',
'nologinlink' => 'नयाँ खाता खोल्नुहोस्',
'createaccount' => 'खाता खोल्नुहोस्',
'gotaccount' => "के तपाईँसँग पहिले देखि नै खाता छ ? '''$1''' ।",
'gotaccountlink' => 'लग इन',
'userlogin-resetlink' => 'प्रवेश सम्बन्धी विवरणहरु बिर्सनु भयो?',
-'createaccountmail' => 'इ-मेलबाट',
+'userlogin-resetpassword-link' => 'पासवर्ड परिवर्तन गर्नुहोस्',
+'userlogin-createanother' => 'अर्को खाता खोल्नुहोस्',
+'createacct-join' => 'तपाईँका जानकारीहरू तल थप्नुहोस् ।',
+'createacct-another-join' => 'नयाँ खाताको जानकारी तल थप्नुहोस ।',
+'createacct-emailrequired' => 'इमेल ठेगाना',
+'createacct-emailoptional' => 'इमेल ठेगाना (ऐच्छिक)',
+'createacct-email-ph' => 'तपाईँको इमेल ठेगाना भर्नुहोस्',
+'createacct-another-email-ph' => 'इमेल ठेगाना भर्नुहोस्',
+'createaccountmail' => 'कुनै अस्थाई र श्रिजित पासवर्ड प्रयोग गर्ने र खुलाईएको इमेलमा पठाउने',
+'createacct-realname' => 'वास्तविक नाम(ऐच्छिक)',
'createaccountreason' => 'कारण :',
+'createacct-reason' => 'कारण',
+'createacct-reason-ph' => 'किन नयाँ खाता खोलिरहनु भएको हो ?',
+'createacct-captcha' => 'सुरक्षा जाँच',
+'createacct-imgcaptcha-ph' => 'माथि देखिए अनुसारको पाठ भर्नुहोस्',
+'createacct-submit' => 'तपाईँको खाता सिर्जना गर्नुहोस',
+'createacct-another-submit' => 'अर्को खाता सिर्जना गर्नुहोस्',
+'createacct-benefit-heading' => '{{SITENAME}} तपाईँ जस्तै मानिसहरूद्वारा सिर्जना गरिएको हो ।',
+'createacct-benefit-body1' => '{{PLURAL:$1|सम्पादन|सम्पादनहरू}}',
'badretype' => 'तपाईंले दिनुभएको पासवर्ड मिल्दैन।',
'userexists' => 'तपाईले प्रविष्ट गर्नुभएको प्रयोगकर्ताको नाम पहिले देखिनै प्रयोगमा छ ।
कृपया फरक नाम छान्नुहोस् ।',
'cannotchangeemail' => 'यस विकिमा तपाईको खातासँग सम्बन्धित इमेल ठेगाना परिवर्तन गर्न सकिन्न ।',
'emaildisabled' => 'यो साइटले इमेलहरु पठाउन सक्तैन।',
'accountcreated' => 'खाता खोलियो',
-'accountcreatedtext' => '$1 कोलागि प्रयोगकर्ता खाता खोलियो।',
+'accountcreatedtext' => '[[{{ns:User}}:$1|$1]] ([[{{ns:User talk}}:$1|वार्ता]])$1 प्रयोगकर्ताको लागि खाता खोलिएको छ ।',
'createaccount-title' => '{{SITENAME}}कोलागि खाता खोल्ने काम',
'createaccount-text' => 'कसैले तपाईको इमेल ठेगानालाई {{SITENAME}} ($4) मा "$2" नामको खाता बनाएको छ, जसको पासवर्ड "$3" छ।',
'usernamehasherror' => 'प्रयोगकर्तानाममा ह्यास अक्षरहरु राख्न मिल्दैन।',
-'login-throttled' => 'तपाईंले भर्खरै धेरै पल्ट प्रवेशको निम्ति प्रयास गर्नुभयो।
-कृपया पर्खेर केही समयपछि मात्र प्रयास गर्नुहोस्।',
+'login-throttled' => 'तपाईंले भर्खरै धेरै पल्ट प्रवेशको निम्ति प्रयास गर्नुभएको छ ,कृपया $1 पर्खेर मात्र प्रयास गर्नुहोस्।',
'login-abort-generic' => 'तपाईंको प्रवेश असफल भयो - छोड़ियो',
'loginlanguagelabel' => 'भाषा: $1',
'suspicious-userlogout' => 'तपाईंको निर्गमन अनुरोध अस्विकार गरिन्छ किन कि यो खराब ब्राउजर वा क्यासिङ प्रोक्सिले पठाएको जस्तो देखिन्छ।',
'newpassword' => 'नयाँ पासवर्ड:',
'retypenew' => 'प्रवेश शव्द पुन: दिनुहोस् :',
'resetpass_submit' => 'पासवर्ड व्यवस्थित गरी र प्रवेशगर्ने',
-'changepassword-success' => 'तपाà¤\88à¤\81à¤\95à¥\8b पà¥\8dरवà¥\87शशवà¥\8dद सफलतापà¥\82रà¥\8dवà¤\95 परिवरà¥\8dतन à¤à¤¯à¥\8b ! तपाà¤\88लाà¤\88 पà¥\8dरवà¥\87श à¤\97राà¤\87à¤\81दà¥\88à¤\9b ...',
+'changepassword-success' => 'तपाà¤\88à¤\81à¤\95à¥\8b पासवरà¥\8dड सफलतापà¥\82रà¥\8dवà¤\95 परिवरà¥\8dतन à¤à¤¯à¥\8b !',
'resetpass_forbidden' => 'प्रवेशशव्द परिवर्तन गर्न मिल्दैन',
'resetpass-no-info' => 'यो पृष्ठ सिधै हेर्नको लागि तपाईँले प्रवेश गर्नुपर्छ ।',
'resetpass-submit-loggedin' => 'प्रवेशशव्द परिवर्तन गर्ने',
तपाईंले प्रवेश गरेर अहिले नैं नयाँ पासवर्ड चुन्नुहोस्। यदि अरु कसैले अनुरोध गरेको भए अथवा यदि तपाईंलाई मूल पासवर्ड याद भए अनि यसलाई परिवर्तन गर्न चाहनु हुन्न भनें, तपाईंले यस सन्देशलाई अनदेखा गर्नुहोस् र पुरानै पासवर्डलाई चालू राख्नुहोस्।',
'passwordreset-emailelement' => 'प्रयोगकर्ताको नाम: $1
अस्थाई पासवर्ड: $2',
-'passwordreset-emailsent' => 'à¤\8fà¤\89à¤\9fा à¤\85नà¥\81सà¥\8dमारà¤\95 à¤\87मà¥\87ल पठाà¤\87यà¥\8b।',
-'passwordreset-emailsent-capture' => 'à¤\85नà¥\81सà¥\8dमारà¤\95 à¤\87मà¥\87ल पठाà¤\87यà¥\8b, à¤\9cà¥\8b तल देखाइएकोछ।',
+'passwordreset-emailsent' => 'पासवरà¥\8dड परिवरà¥\8dतनà¤\95à¥\8b लाà¤\97ि à¤\87मà¥\87ल पठाà¤\87à¤\8fà¤\95à¥\8b à¤\9b।',
+'passwordreset-emailsent-capture' => 'पासवरà¥\8dड परिवरà¥\8dतनà¤\95à¥\8b लाà¤\97ि à¤\87मà¥\87ल पठाà¤\87यà¥\8b, à¤\9cà¥\81न तल देखाइएकोछ।',
# Special:ChangeEmail
'changeemail' => 'इमेल ठेगाना परिवर्तन गर्नुहोस',
लिजेंड: (चालू): '''({{int:cur}})''' = अवतरणको बीचमा अंतर, '''({{int:last}})''' = पहिलाका अवतरणको बीचमा अंतर, '''{{int:minoreditletter}}''' = सानो परिवर्तन।",
'history-fieldset-title' => 'इतिहासको विचरण गर्ने',
'history-show-deleted' => 'मेटिएका मात्र',
-'histfirst' => 'पहिलो',
-'histlast' => 'à¤\85नà¥\8dतिम',
+'histfirst' => 'पà¥\81रानो',
+'histlast' => 'नयाà¤\81',
'historysize' => '({{PLURAL:$1|१ बाइट |$1 बाइटहरु}})',
'historyempty' => '(खाली)',
'search-interwiki-default' => '$1 नतिजाहरु:',
'search-interwiki-more' => '(अझै)',
'search-relatedarticle' => 'सम्बन्धित',
-'mwsuggest-disable' => 'AJAX सुझाव निस्क्रिय पार्नुहोस्',
+'mwsuggest-disable' => 'खोज सुझावहरु अक्षम पार्ने',
'searcheverything-enable' => 'सबै नेमस्पेसेजहरुमा खोज्नुहोस्',
'searchrelated' => 'सम्बन्धित',
'searchall' => 'सबै',
'prefs-rendering' => 'स्वरुप',
'saveprefs' => 'संग्रह',
'resetprefs' => 'संग्रह नगरिएका परिवर्तनहरु सफागर्ने',
-'restoreprefs' => 'सबै पूर्वनिर्धारित स्थिती कायम गर्ने',
+'restoreprefs' => 'सबै पूर्वनिर्धारित स्थिती कायम गर्ने(सबै खण्डहरूमा)',
'prefs-editing' => 'सम्पादन',
'rows' => 'हरफहरु :',
'columns' => 'स्तम्भहरु :',
'prefs-emailconfirm-label' => 'इ-मेल एकिन प्रक्रिया :',
'youremail' => 'ईमेल',
'username' => '{{GENDER:$1|प्रयोगकर्ता नाम}}:',
-'uid' => 'प्रोगकर्ता आइडी:',
-'prefs-memberingroups' => 'निम्न {{PLURAL:$1|समूह | समूहहरू}}को सदस्य :',
+'uid' => '{{GENDER:$1|प्रयोगकर्ता}} ID:',
+'prefs-memberingroups' => 'निम्न {{PLURAL:$1|समूह | समूहहरू}}को {{GENDER:$2|सदस्य}} :',
'prefs-memberingroups-type' => '$1',
'prefs-registration' => 'दर्ता समय:',
'prefs-registration-date-time' => '$1',
HTML ट्यागहरु जाँच्नुहोस् ।',
'badsiglength' => 'तपाईको दस्तखत धेरै लामो छ।
यो $1 {{PLURAL:$1|अक्षर|अक्षरहरू}} भन्दा लामो हुनु हुँदैन ।',
-'yourgender' => 'लिà¤\99à¥\8dà¤\97:',
-'gender-unknown' => 'नà¤\96à¥\81लà¥\87à¤\95à¥\8b',
-'gender-male' => 'पà¥\81रà¥\82ष',
-'gender-female' => 'महिला',
+'yourgender' => 'à¤\95सरà¥\80 वताà¤\89न à¤\9aाहनà¥\81हà¥\81नà¥\8dà¤\9b ?',
+'gender-unknown' => 'म à¤\96à¥\81लाà¤\89न à¤\9aाहनà¥\8dन',
+'gender-male' => 'à¤\89सलà¥\87 विà¤\95ि पà¥\83षà¥\8dठहरà¥\82 समà¥\8dपादन à¤\97रà¥\8dà¤\9b',
+'gender-female' => 'à¤\89नलà¥\87 विà¤\95ि पà¥\83षà¥\8dठसमà¥\8dपादन à¤\97रà¥\8dà¤\9bिन',
'prefs-help-gender' => 'वैकल्पिक: सफ्टवेयरले लिङगानुसार सम्बोधन गर्नको लागि प्रयोग गरिन्छ ।
यो जानकारी सार्वजनिक हुनेछ ।',
'email' => 'ईमेल',
'prefs-signature' => 'हस्ताक्षर',
'prefs-dateformat' => 'मिति ढाँचा',
'prefs-timeoffset' => 'समय अफसेट',
-'prefs-advancedediting' => 'सामान्य',
+'prefs-advancedediting' => 'सामान्य विकल्पहरू',
'prefs-advancedrc' => 'उन्नत विकल्पहरू',
'prefs-advancedrendering' => 'उन्नत विकल्पहरु',
'prefs-advancedsearchoptions' => 'उन्नत विकल्पहरू',
'prefs-signature' => 'Ondertekening',
'prefs-dateformat' => 'Datumopmaak:',
'prefs-timeoffset' => 'Tijdverschil',
-'prefs-advancedediting' => 'Algemene opties',
+'prefs-advancedediting' => 'Algemene instellingen',
'prefs-editor' => 'Tekstverwerker',
'prefs-preview' => 'Voorvertoning',
'prefs-advancedrc' => 'Gevorderde instellingen',
'spam_reverting' => 'Teruggedraaid naar de laatste versie die geen koppeling bevat naar $1',
'spam_blanking' => 'Alle versies bevatten een koppeling naar $1. Pagina leeggemaakt',
'spam_deleting' => 'Alle versies bevatten koppelingen naar $1. Pagina verwijderd',
+'simpleantispam-label' => "Antispamcontrole.
+Vul dit veld '''NIET''' in!",
# Info page
'pageinfo-title' => 'Informatie over "$1"',
'spam_reverting' => 'Attenderullar til siste versjon utan lenkje til $1',
'spam_blanking' => 'Alle versjonar inneheldt lenkje til $1, tømmer sida',
'spam_deleting' => 'Alle versjonane inneheldt lenkjer til $1, slettar.',
+'simpleantispam-label' => "Antispam-kontroll.
+'''IKKJE''' fyll ut dette feltet!",
# Info page
'pageinfo-title' => 'Informasjon om «$1»',
'spam_reverting' => 'Restabliment de la darrièra version que conten pas de ligam cap a $1',
'spam_blanking' => 'Totas las versions que contenon de ligams cap a $1 son blanquidas',
'spam_deleting' => 'Totas las versions contenonián de ligams cap a $1, supression',
+'simpleantispam-label' => "Verificacion antispam.
+Inscrigatz '''PAS RES''' dedins !",
# Info page
'pageinfo-title' => 'Informacions per « $1 »',
'spam_reverting' => '$1 ସହ ଯୋଡ଼ା ନଥିବା ଶେଷ ସଂସ୍କରଣକୁ ଲେଉଟାଇ ଦେଉଅଛୁଁ',
'spam_blanking' => '$1 ସହ ଯୋଡ଼ାଥିବା ସବୁଯାକ ସଂସ୍କରଣ ଖାଲି କରିଦିଆଗଲା',
'spam_deleting' => '$1 ସହ ଯୋଡ଼ାଥିବା ସବୁଯାକ ସଂସ୍କରଣ ଖାଲି କରିଦିଆଗଲା',
+'simpleantispam-label' => "ସ୍ପାମ-ବିରୋଧି ପରଖ ।
+ଏହାକୁ ଭରନ୍ତୁ '''ନାହିଁ''' !",
# Info page
'pageinfo-title' => '"$1"ର ବିବରଣୀ',
ਸਧਾਰਨ ਝਲਕ ਦੀ ਕੋਸ਼ਿਸ਼ ਕਰੋ।',
# Watchlist editor
-'watchlistedit-noitems' => 'ਤੁਹਾਡੀ ਨਿਗਰਾਨੀ-ਲਿਸਟ ਵਿਚ ਕੋਈ ਸਿਰਲੇਖ ਨਹੀਂ ਹਨ।',
+'watchlistedit-numitems' => 'ਗੱਲ-ਬਾਤ ਸਫ਼ਿਆਂ ਤੋਂ ਬਿਨਾਂ, ਤੁਹਾਡੀ ਨਿਗਰਾਨੀ-ਲਿਸਟ ਵਿੱਚ {{PLURAL:$1|1 ਸਿਰਲੇਖ ਹੈ|$1 ਸਿਰਲੇਖ ਹਨ}}।',
+'watchlistedit-noitems' => 'ਤੁਹਾਡੀ ਨਿਗਰਾਨੀ-ਲਿਸਟ ਵਿੱਚ ਕੋਈ ਸਿਰਲੇਖ ਨਹੀਂ ਹਨ।',
'watchlistedit-normal-title' => 'ਨਿਗਰਾਨੀ-ਲਿਸਟ ਸੋਧੋ',
-'watchlistedit-normal-legend' => 'ਨਿà¨\97ਰਾਨà©\80-ਲਿਸà¨\9f ਤà©\8bà¨\82 ਸਿਰਲà©\87à¨\96 ਹਟਾਓ',
+'watchlistedit-normal-legend' => 'ਸਿਰਲà©\87à¨\96ਾà¨\82 ਨà©\82à©° ਨਿà¨\97ਰਾਨà©\80-ਲਿਸà¨\9f ਵਿੱà¨\9aà©\8bà¨\82 ਹਟਾਓ',
'watchlistedit-normal-submit' => 'ਸਿਰਲੇਖ ਹਟਾਓ',
+'watchlistedit-normal-done' => 'ਤੁਹਾਡੀ ਨਿਗਰਾਨੀ-ਲਿਸਟ ਵਿੱਚੋਂ {{PLURAL:$1|1 ਸਿਰਲੇਖ ਹਟਾਇਆ ਗਿਆ|$1 ਸਿਰਲੇਖ ਹਟਾਏ ਗਏ}}:',
'watchlistedit-raw-title' => 'ਕੱਚੀ ਨਿਗਰਾਨ-ਸੂਚੀ ਸੋਧੋ',
-'watchlistedit-raw-legend' => 'ਕੱਚੀ ਨਿਗਰਾਨ-ਸੂਚੀ ਸੋਧੋ',
+'watchlistedit-raw-legend' => 'ਕੱਚੀ ਨਿਗਰਾਨੀ-ਲਿਸਟ ਸੋਧੋ',
+'watchlistedit-raw-explain' => 'ਤੁਹਾਡੀ ਨਿਗਰਾਨੀ-ਲਿਸਟ ਵਿੱਚ ਮੌਜੂਦ ਸਫ਼ੇ ਹਟਾਏ ਜਾਂ ਹੋਰ ਜੋੜੇ ਜਾ ਸਕਦੇ ਹਨ। ਹਟਾਉਣ ਜਾਂ ਜੋੜਨ ਤੋਂ ਬਾਅਦ "{{int:Watchlistedit-raw-submit}}" ’ਤੇ ਕਲਿੱਕ ਕਰੋ।
+ਤੁਸੀਂ [[Special:EditWatchlist|ਮਿਆਰੀ ਐਡੀਟਰ]] ਵੀ ਵਰਤ ਸਕਦੇ ਹੋ।',
'watchlistedit-raw-titles' => 'ਸਿਰਲੇਖ:',
'watchlistedit-raw-submit' => 'ਨਿਗਰਾਨੀ-ਲਿਸਟ ਤਾਜ਼ੀ ਕਰੋ',
-'watchlistedit-raw-done' => 'ਤੁਹਾਡੀ ਨਿਗਰਾਨ-ਸੂਚੀ ਅੱਪਡੇਟ ਹੋ ਗਈ ਹੈ।',
-'watchlistedit-raw-added' => '{{PLURAL:$1|1 title was|$1 titles were}} ਸ਼ਾਮਲ:',
-'watchlistedit-raw-removed' => '{{PLURAL:$1|1 title was|$1 titles were}} ਹਟਾਓ:',
+'watchlistedit-raw-done' => 'ਤੁਹਾਡੀ ਨਿਗਰਾਨੀ-ਲਿਸਟ ਅੱਪਡੇਟ ਹੋ ਗਈ ਹੈ।',
+'watchlistedit-raw-added' => '{{PLURAL:$1|1 ਸਿਰਲੇਖ ਸ਼ਾਮਲ ਕੀਤਾ|$1 ਸਿਰਲੇਖ ਸ਼ਾਮਲ ਕੀਤੇ}}:',
+'watchlistedit-raw-removed' => '{{PLURAL:$1|1 ਸਿਰਲੇਖ ਹਟਾਇਆ|$1 ਸਿਰਲੇਖ ਹਟਾਏ}}:',
# Watchlist editing tools
'watchlisttools-view' => 'ਸਬੰਧਤ ਤਬਦੀਲੀਆਂ ਵੇਖੋ',
'userlogin-resetpassword-link' => 'Nie pamiętasz hasła?',
'helplogin-url' => 'Help:Logowanie',
'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Pomoc z logowaniem]]',
+'userlogin-loggedin' => 'Zalogowano jako {{GENDER:$1|$1}}.
+Użyj poniższego formularza, aby zalogować się jako inny użytkownik.',
+'userlogin-createanother' => 'Załóż nowe konto',
'createacct-join' => 'Wpisz poniżej swoje dane.',
'createacct-another-join' => 'Wprowadź szczegóły nowego konta poniżej.',
'createacct-emailrequired' => 'Adres e‐mail',
'spam_reverting' => 'Przywracanie ostatniej wersji nie zawierającej linków do $1',
'spam_blanking' => 'Wszystkie wersje zawierały odnośniki do $1. Czyszczenie strony.',
'spam_deleting' => 'Wszystkie wersje zawierały linki do $1, usuwam.',
+'simpleantispam-label' => "Filtr antyspamowy.
+'''NIE''' wpisuj tu nic!",
# Info page
'pageinfo-title' => 'Informacje o „$1“',
'articlepage' => 'Vëdde la pàgina ëd contnù',
'talk' => 'Discussion',
'views' => 'Vìsite',
-'toolbox' => "Bòita dj'utiss",
+'toolbox' => 'Utiss',
'userpage' => 'Che a varda la pàgina Utent',
'projectpage' => 'Che a varda la pàgina ëd proget',
'imagepage' => "Vëdde la pàgina dl'archivi",
L'ùltima vos dël registr a l'é smonùa sì-sota për arferiment:",
'semiprotectedpagewarning' => "'''Nòta:''' Costa pàgina-sì a l'é stàita blocà an manera che mach j'utent registrà a peulo modifichela.
L'ùltima vos dël registr a l'é smonùa sì-sota për arferiment:",
-'cascadeprotectedwarning' => "'''Tension:''' sta pàgina-sì a l'é stàita blocà an manera che mach j'utent con la qualìfica da aministrator a peulo modifichela, për via che {{PLURAL:\$1|a l'é proteta|a-i intra ant le pàgine protete}} col sistema \"a cascada\":",
+'cascadeprotectedwarning' => "'''Tension:''' Sta pàgina a l'é stàita blocà an manera che mach j'utent con la qualìfica da aministrator a peulo modifichela, për via che a l'é comprèisa an {{PLURAL:$1|costa pàgina-sì|an coste pàgine-sì}} ch'a l'han ël sistema ëd protession a cascada:",
'titleprotectedwarning' => "'''Avis: sta pàgina-sì a l'é stàita blocà an manera che a-i é dabzògn ëd [[Special:ListGroupRights|drit specìfich]] për creela.'''
L'ùltima vos dël registr a l'é smonùa sì-sota për arferiment:",
-'templatesused' => '{{PLURAL:$1|Stamp|Stamp}} dovrà dzora a sta pàgina-sì:',
-'templatesusedpreview' => '{{PLURAL:$1|Stamp|Stamp}} dovrà ant sta preuva-sì:',
-'templatesusedsection' => '{{PLURAL:$1|Stamp|Stamp}} dovrà ant sta session-sì:',
+'templatesused' => '{{PLURAL:$1|Stamp}} dovrà da costa pàgina-sì:',
+'templatesusedpreview' => '{{PLURAL:$1|Stamp}} dovrà an costa preuva:',
+'templatesusedsection' => '{{PLURAL:$1|Stamp}} dovrà an costa session-sì:',
'template-protected' => '(protet)',
'template-semiprotected' => '(mes-protet)',
'hiddencategories' => 'Sta pàgina-sì a fa part ëd {{PLURAL:$1|na categorìa|$1 categorìe}} stërmà:',
-'edittools' => "<!-- Test ch'a së s-ciàira sot a ij mòduj ëd mòdifica e 'd càrich d'archivi. -->",
-'nocreatetext' => "Cost sit-sì a l'ha limità la possibilità ëd creé dle pàgine neuve.
+'edittools' => "<!-- Test ch'a së s-ciàira sot a ij mòduj ëd modìfica e 'd carie d'archivi. -->",
+'nocreatetext' => "{{SITENAME}} a l'ha limità la possibilità ëd creé dle pàgine neuve.
A peul torné andaré e modifiché na pàgina che a-i é già, ò pura [[Special:UserLogin|rintré ant ël sistema ò deurb-se un cont]].",
-'nocreate-loggedin' => "A l'ha pa ij përmess për creé dle pàgine neuve.",
+'nocreate-loggedin' => "A l'ha pa ël përmess ëd creé dle pàgine neuve.",
'sectioneditnotsupported-title' => "La modìfica dla session a l'é nen prevëdùa",
'sectioneditnotsupported-text' => "La modìfica dla session a l'é nen prevëdùa an costa pàgina ëd modìfica.",
'permissionserrors' => 'Eror ant ij përmess',
'spam_reverting' => "Butà andaré a l'ùltima version che a l'avèissa pa andrinta dj'anliure a $1",
'spam_blanking' => "Pàgina dësvujdà, che tute le version a l'avìo andrinta dj'anliure a $1",
'spam_deleting' => 'Scancelà, dagià che tute le revision a contnisìo dle liure a $1',
+'simpleantispam-label' => "Control anti-spam.
+Vemp '''PA''' sòn-sì!",
# Info page
'pageinfo-title' => 'Anformassion për «$1»',
'spambot_username' => 'میڈیاوکی سپام سفائی',
'spam_reverting' => 'آخری ریوین ول جیدے چ $1 دے جوڑ ناں ہون۔',
'spam_blanking' => 'سارے ریوین جناں چ $1 نوں جوڑ نیں، طاف کیتا جاریا اے۔',
+'simpleantispam-label' => 'سپام روک پھاٹک
+ایدے تے ناں لکھو۔',
# Info page
'pageinfo-title' => '"$1" لئی جانکاری',
'compareselectedversions' => 'Comparar as versões selecionadas',
'showhideselectedversions' => 'Mostrar/ocultar versões selecionadas',
'editundo' => 'desfazer',
+'diff-empty' => '(Sem diferenças)',
'diff-multi' => '({{PLURAL:$1|Uma edição intermédia|$1 edições intermédias}} de {{PLURAL:$2|um utilizador|$2 utilizadores}} {{PLURAL:$1|não apresentada|não apresentadas}})',
'diff-multi-manyusers' => '({{PLURAL:$1|Uma edição intermédia|$1 edições intermédias}} de mais de {{PLURAL:$2|um utilizador|$2 utilizadores}} não {{PLURAL:$1|apresentada|apresentadas}})',
'difference-missing-revision' => '{{PLURAL:$2|Uma revisão|$2 revisões}} desta diferença ($1) não {{PLURAL:$2|foi encontrada|foram encontradas}}.
'listfiles_size' => 'Tamanho',
'listfiles_description' => 'Descrição',
'listfiles_count' => 'Versões',
+'listfiles-show-all' => 'Incluir versões antigas de imagens',
+'listfiles-latestversion-no' => 'Não',
# File description page
'file-anchor-link' => 'Ficheiro',
'randompage-nopages' => 'Não há páginas {{PLURAL:$2|no seguinte espaço nominal|nos seguintes espaços nominais}}: $1.',
# Random page in category
+'randomincategory-nopages' => 'Não há páginas na categoria [[:Category:$1|$1]].',
'randomincategory-selectcategory-submit' => 'Ir',
# Random redirect
'spam_reverting' => 'A reverter para a última revisão que não contém links para $1',
'spam_blanking' => 'Todas as revisões continham links para $1; a esvaziar',
'spam_deleting' => 'Todas as revisões continham links para $1; a eliminar',
+'simpleantispam-label' => "Verificação de spam
+'''NÃO''' preencha isto!",
# Info page
'pageinfo-title' => 'Informações sobre "$1"',
'tags-tag' => 'Nome da etiqueta',
'tags-display-header' => 'Aparência nas listas de modificações',
'tags-description-header' => 'Descrição completa do significado',
+'tags-active-header' => 'Ativa?',
'tags-hitcount-header' => 'Modificações etiquetadas',
'tags-edit' => 'editar',
'tags-hitcount' => '$1 {{PLURAL:$1|modificação|modificações}}',
# Limit report
'limitreport-cputime-value' => '$1 {{PLURAL:$1|segundo|segundos}}',
'limitreport-postexpandincludesize-value' => '$1/$2 {{PLURAL:$2|byte|bytes}}',
+'limitreport-templateargumentsize' => 'Tamanho dos argumentos da predefinição',
'limitreport-templateargumentsize-value' => '$1/$2 {{PLURAL:$2|byte|bytes}}',
);
* @author Sir Lestaty de Lioncourt
* @author Teles
* @author TheGabrielZaum
+ * @author Titoncio
* @author Urhixidur
* @author Vivaelcelta
* @author Vuln
'spam_reverting' => 'Revertendo para a última versão que não contém links para $1',
'spam_blanking' => 'Todas revisões contendo links para $1, limpando',
'spam_deleting' => 'Eliminada por todas as suas edições conterem links para $1',
+'simpleantispam-label' => "Verificação de spam
+'''NÃO''' preencha isto!",
# Info page
'pageinfo-title' => 'Informações sobre "$1"',
Parameters:
* $1 - a spammed domain name',
+'simpleantispam-label' => 'Used as label for the input box in "Edit" page.
+
+The label and the input box are always hidden.',
# Info page
'pageinfo-title' => 'Page title for action=info. Parameters:
'tog-hidepatrolled' => "Patrullasqa llamk'apusqakunata ñaqha hukchasqapi pakay",
'tog-newpageshidepatrolled' => "Patrullasqa llamk'apusqakunata musuq p'anqakunapi pakay",
'tog-extendwatchlist' => "Watiqana sutisuyuta tukuy rurachinalla hukchaykunaman mast'ay, ama lliwmanta aswan ñaqhallachu",
-'tog-usenewrc' => "Huñu hukchasqakuna p'anqallakama ñaqha hukchasqakunapi watiqasqakunapipas (JavaScript nisqallawanmi llamk'an)",
+'tog-usenewrc' => "Huñu hukchasqakuna p'anqallakama ñaqha hukchasqakunapi watiqasqakunapipas",
'tog-numberheadings' => "Uma siq'ikunata kikinmanta yupay",
'tog-showtoolbar' => "Llamk'apuna sillwita rikuchiy",
-'tog-editondblclick' => "P'anqakunata llamk'apuy iskaylla ñit'iywan (JavaScript)",
+'tog-editondblclick' => "P'anqakunata llamk'apuy iskaylla ñit'iywan",
'tog-editsection' => "Rakirilla llamk'apuyta saqillay [qillqay] t'inkiwan",
-'tog-editsectiononrightclick' => "Rakirilla llamk'apuyta saqillay paña butunta rakirip sutinpi ñit'ispa (JavaScript)",
+'tog-editsectiononrightclick' => "Rakirilla llamk'apuyta saqillay paña butunta rakirip sutinpi ñit'ispa",
'tog-showtoc' => "Yuyarina wachuchasqata rikuchiy (kimsamanta aswan uma siq'iyuq p'anqakunapaq)",
'tog-rememberpassword' => "Ruraqpa sutiyta yaykuna rimaytapas yuyaykuy kay llika wamp'unapi ({{PLURAL:$1|huk p'unchawkama|$1 p'unchawkama}})",
'tog-watchcreations' => "Qallarisqay p'anqakunata churkusqay willañiqikunatapas watiqay",
'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-uselivepreview' => "''Live preview'' nisqa ñawpaq qhawayta llamk'achiy (JavaScript) (llamiy aknaraq)",
+'tog-uselivepreview' => "''Live preview'' nisqa ñawpaq qhawayta llamk'achiy (llamiy aknaraq)",
'tog-forceeditsummary' => "Ch'usaq llamk'apuy waqaychasqa kachkaptinqa ch'itiyay.",
'tog-watchlisthideown' => "Watiqasqaykunapiqa ñuqap llamk'apusqaykunata pakay",
'tog-watchlisthidebots' => "Watiqasqaykunapiqa rurana antachakunap llamk'apusqankunata pakay",
'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.",
+'tog-prefershttps' => "Yaykurqaspaqa hayk'appas takyasqa t'inkiwan llamk'ay",
'underline-always' => "Hayk'appas",
'underline-never' => "Mana hayk'appas",
'newwindow' => '(Musuq wintanam kichakun)',
'cancel' => 'Ama niy',
'moredotdotdot' => 'Aswan...',
-'morenotlisted' => 'Aswanqa sutisuyupi manam kanchu...',
+'morenotlisted' => "Kay sutisuyuqa manaraqmi hunt'asqachu.",
'mypage' => "P'anqay",
'mytalk' => 'Rimachinay',
'anontalk' => 'Kay IP huchhapaq rimanakuy',
# 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).
'aboutsite' => '{{SITENAME}}manta',
'aboutpage' => 'Project:{{SITENAME}}manta',
-'copyright' => "Ch'aqtasqakunataqa llamk'achinkiman <i>$1</i> nisqap ruraq hayñinkama",
+'copyright' => "Samiqwanqa llamk'ankiman $1 nisqa ruraq hayñikama, mana wakin hina willaptinqa.",
'copyrightpage' => '{{ns:project}}:Ruraqpa hayñin',
'currentevents' => 'Kunan pacha',
'currentevents-url' => 'Project:Kunan pacha',
# General errors
'error' => 'Pantasqa',
'databaseerror' => 'Willañiqintin pantasqa',
+'databaseerror-text' => "Willañiqintin maskana pantasqam tukurqan. Llamp'u kaqpi pantasqachá kachkan.",
+'databaseerror-textcl' => 'Willañiqintin maskana pantasqam tukurqan.',
+'databaseerror-query' => 'Maskana: $1',
+'databaseerror-function' => 'Ruray paqtachi: $1',
+'databaseerror-error' => 'Pantasqa: $1',
'laggedslavemode' => "'''Paqtataq''': Kay p'anqapiqa manaraqchá kachkanchu aswan qayna musuqchasqakuna.",
'readonly' => "Willañiqintinqa hark'asqam",
'enterlockreason' => "Qillqamuy imarayku hark'asqa karqan, hayk'appas manañachá hark'asqachu kanqa",
'cannotdelete-title' => 'Manam atinichu "$1" sutiyuq p\'anqata qulluyta',
'delete-hook-aborted' => "Ch'iwinam qulluyta t'ipirqan.
Manam nirqanchu imarayku.",
+'no-null-revision' => 'Manam atinichu "$1" p\'anqapaq musuq ch\'usaq musuqchasqata kamariyta.',
'badtitle' => "P'anqap sutinqa manam allinchu",
'badtitletext' => "Kay p'anqap sutinqa manam allinchu, mana allin interwiki t'inkichá icha ch'usaqchá, p'anqa sutipaq mana saqillasqa sananchayuqchá.",
'perfcached' => "Kay qatiq willakunaqa ''cache'' nisqa pakasqa hallch'apim kachkan, chayrayku manañachá musuqchasqachu. {{PLURAL:$1|Huklla|$1-lla}} taripasqam pakasqa hallch'api aypalla kachkan, manam aswanchu.",
'customjsprotected' => "Manam saqillasunkichu kay JavaScript p'anqata llamk'apuyta, huk ruraqpa kikin tiyachisqankunayuq kaptinmi.",
'mycustomcssprotected' => "Kay CSS p'anqataqa manam llamk'apuyta atinkichu.",
'mycustomjsprotected' => "Kay JavaScript p'anqataqa manam llamk'apuyta atinkichu.",
+'myprivateinfoprotected' => "Manam saqillasqachu kanki kikiykip akuna willaykikunata llamk'apunaykipaq.",
+'mypreferencesprotected' => "Manam saqillasqachu kanki allinkachinaykikunata llamk'apunaykipaq.",
'ns-specialprotected' => "{{ns:special}} suti k'itipi p'anqakunaqa manam llamk'apunallachu.",
'titleprotected' => "Kay p'anqa sutitaqa [[User:$1|$1]] sutiyuq ruraq kamariymanta hark'arqanmi, kayraykum nispa: ''$2''.",
'filereadonlyerror' => 'Manam atinichu "$1" sutiyuq willañiqita hukchayta, "$2" sutiyuq willañiqi churamuna ñawirillanapaq kachkaptinmi.
# Login and logout pages
'logouttext' => "'''Llamk'apuy tiyayniykiqa puchukasqañam.'''
-Sutinnaq kaspaykipas {{SITENAME}}pi wamp'uytam atinki. Mana hinataq munaspaykiqa, <span class='plainlinks'>[$1 musuqmanta yaykuy]</span> ñawpaq icha huk sutiwan. Huk p'anqakunaqa kaqllam rikch'akunqa, ''cache'' nisqa pakasqa hallch'ata mana ch'usaqchaptiykiqa.",
+Huk p'anqakunaqa kaqllam rikch'akunqa, ''cache'' nisqa pakasqa hallch'ata mana ch'usaqchaptiykiqa.",
'welcomeuser' => 'Allinmi hamusqayki, $1!',
'welcomecreation-msg' => 'Rakiqunaykiqa kamarisqañam.
Ama qunqaychu [[Special:Preferences|{{SITENAME}} allinkachinaykikunata]] hukchayta.',
'yourname' => 'Ruraq sutiyki:',
'userlogin-yourname' => 'Ruraqpa sutin',
'userlogin-yourname-ph' => 'Ruraqpa sutiykita yaykuchiy',
+'createacct-another-username-ph' => 'Ruraqpa sutinta yaykuchiy',
'yourpassword' => 'Yaykuna rimayki',
'userlogin-yourpassword' => 'Yaykuna rima',
'userlogin-yourpassword-ph' => 'Yaykuna rimaykita yaykuchiy',
'userlogin-resetpassword-link' => 'Yaykuna rimaykita kutichiy',
'helplogin-url' => 'Help:Yaykuy',
'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Yaykunapaq yanapa]]',
+'userlogin-createanother' => 'Huk rakiqunata kamariy',
'createacct-join' => 'Kay qatiqpi willaykita yaykuchiy.',
'createacct-emailrequired' => 'E-chaski imamayta',
'createacct-emailoptional' => 'E-chaski imamayta (munaspayki)',
'createacct-email-ph' => 'E-chaski imamaytaykita yaykuchiy',
-'createaccountmail' => "Kikinmanta tukusqa mit'alla yaykuna rimata llamk'achispa kay qatiqpi kaq e-chaski imamaytaman kachay",
+'createacct-another-email-ph' => 'E-chaski imamaytata yaykuchiy',
+'createaccountmail' => "Kikinmanta tukusqa mit'alla yaykuna rimata llamk'achispa akllasqa e-chaski imamaytaman kachay",
'createacct-realname' => 'Chiqap suti (munaspayki)',
'createaccountreason' => 'Kayrayku:',
'createacct-reason' => 'Kayrayku',
'createacct-captcha' => 'Amachana llanchiy',
'createacct-imgcaptcha-ph' => 'Hanaqpi rikusqayki qillqata yaykuchiy',
'createacct-submit' => 'Rakiqunaykita kamariy',
+'createacct-another-submit' => 'Huk rakiqunata kamariy',
'createacct-benefit-heading' => '{{SITENAME}}taqa qam hina runakunam ruran.',
'createacct-benefit-body1' => "{{PLURAL:$1|llamk'apusqa|llamk'apusqakuna}}",
'createacct-benefit-body2' => "{{PLURAL:$1|p'anqa|p'anqakuna}}",
Kay willay pantasqa kaptinqa, qhawarparillay.',
'usernamehasherror' => 'Ruraqpa sutinqa ama iskaychakana (<nowiki>#</nowiki>) sananchayuqchu kachun',
-'login-throttled' => 'Nisyu kutitachá kay rakiqunapaq yaykuna rimawan ñaqha yaykuykachanki. Ama hina kaspa, suyariy manaraq musuqmanta yaykuykachaspa.',
+'login-throttled' => 'Nisyu kutitachá kay rakiqunapaq yaykuna rimawan ñaqha yaykuykachanki. Ama hina kaspa, $1 suyariy manaraq musuqmanta yaykuykachaspa.',
'login-abort-generic' => 'Yaykuykachaspayki manam ayparqankichu - Allqasqa',
'loginlanguagelabel' => 'Rimay: $1',
'suspicious-userlogout' => "Lluqsiy mañakuyniykiqa mananchasqam karqan, waqllisqa wamp'unamanta icha pakaq proksimanta kachasqa kaspanchá.",
+'createacct-another-realname-tip' => "* Chiqap sutiqa munanallapaqmi. Quwaptiykiqa, llamk'apusqakunam paywan sananchasqa kanqa.",
# Email sending
'php-mail-error-unknown' => 'Mana riqsisqa pantasqa PHP mail() rurananpi',
'newpassword' => 'Musuq yaykuna rima:',
'retypenew' => 'Musuq yaykuna rimaykita takyachiy:',
'resetpass_submit' => 'Yaykuna rimata hukchaspa yaykuy',
-'changepassword-success' => 'Yaykuna rimaykiqa hukchasqañam. Yaykamuchkankim...',
+'changepassword-success' => 'Yaykuna rimaykiqa aypalla hukchasqañam.',
'resetpass_forbidden' => 'Manam saqillanchu yaykuna rimata hukchayta',
'resetpass-no-info' => "Yaykunaykim tiyan kay p'anqata chiqalla aypanaykipaq.",
'resetpass-submit-loggedin' => 'Yaykuna rimata hukchay',
# Special:PasswordReset
'passwordreset' => 'Yaykuna rimata kutichiy',
'passwordreset-text-one' => "Kay hunt'ana p'anqata hunt'ay, yaykuna rimaykita kutichinaykipaq.",
-'passwordreset-text-many' => '{{PLURAL:$1|Kay willa rakikunamanta hukta yaykuchiy, yaykuna rimaykita kutichinaykipaq.}}',
+'passwordreset-text-many' => "{{PLURAL:$1|Kay k'itichakunamanta hukta hunt'achiy, yaykuna rimaykita kutichinaykipaq.}}",
'passwordreset-legend' => 'Yaykuna rimata kutichiy',
'passwordreset-disabled' => 'Kay wikipiqa yaykuna rimata manam kutichiyta atinkichu.',
'passwordreset-emaildisabled' => "Kay wikipiqa e-chaski llamk'anakunaman ama nisqam.",
'changeemail-submit' => 'E-chaskita wakinchay',
'changeemail-cancel' => 'Ama niy',
+# Special:ResetTokens
+'resettokens' => 'Llawikunata kutichiy',
+'resettokens-no-tokens' => 'Manam kanchu kutichina llawikuna.',
+'resettokens-legend' => 'Llawikunata kutichiy',
+'resettokens-tokens' => 'Llawikuna:',
+'resettokens-token-label' => '$1 (kunan chani: $2)',
+'resettokens-done' => 'Llawikunaqa kutichimusqañam.',
+'resettokens-resetbutton' => 'Akllasqa llawikunata kutichimuy',
+
# Edit page toolbar
'bold_sample' => 'Yanasapa qillqa',
'bold_tip' => 'Yanasapa qillqa',
'accmailtitle' => 'Yaykuna rimaqa kachasqañam.',
'accmailtext' => "Kikinmanta kamarisqa [[User talk:$1|$1]]-paq yaykuna rimaqa $2-manmi kachasqaña.
-Yaykurqaspaqa ''[[Special:ChangePassword|yaykuna rima hukchana]]'' p'anqapi kay musuq rakiqunapaq yaykuna rimata hukchaytam atinki.",
+Yaykurqaspaqa ''[[Special:ChangePassword|yaykuna rima hukchana]]'' p'anqapi kay yaykuna rimata hukchaytam atinki.",
'newarticle' => '(Musuq)',
'newarticletext' => "Manaraq kachkaq p'anqatam llamk'apuchkanki. Musuq p'anqata kamariyta munaspaykiqa, qillqarillay. Astawan ñawiriyta munaspaykiqa, [[{{MediaWiki:Helppage}}|yanapana p'anqata]] qhaway. Mana munaspaykitaq, ñawpaq p'anqaman ripuy.",
'anontalkpagetext' => "---- ''Kayqa huk sutinnaq icha mana sutinta llamk'achiq ruraqpa rimanakuyninmi. IP huchhantam hallch'asunchik payta sutinchanapaq. Achka ruraqkunam huklla IP huchhanta llamk'achiyta atin. Sutinnaq ruraq kaspaykiqa, mana qampa rurasqaykimanta willamusqakunata rikuspaykiqa, ama hina kaspa [[Special:UserLogin/signup|rakiqunaykita kamariy]] icha [[Special:UserLogin|yaykuy]] huk sutinnaq ruraqkunawan ama pantasqa kanaykipaq.''",
'nocreate-loggedin' => "Manam saqillasunkichu musuq p'anqakunata kamariyta.",
'sectioneditnotsupported-title' => "Raki allichayqa manam q'imisqachu",
'sectioneditnotsupported-text' => "Raki allichayqa kay p'anqapi manam q'imisqachu.",
-'permissionserrors' => 'Saqillay pantasqakuna',
+'permissionserrors' => 'Saqillay pantasqa',
'permissionserrorstext' => 'Manam saqillasunkichu, {{PLURAL:$1|kayraykum|kayraykum}}:',
'permissionserrorstext-withaction' => 'Manam saqillasunkichu $2-ta, {{PLURAL:$1|kayraykum|kayraykum}}:',
'recreate-moveddeleted-warn' => "'''Paqtataq: Ñawpaqta qullusqaña p'anqatam musuqmanta kamarichkanki.'''
'undo-failure' => "Manam atinichu llamk'apusqata kutichiyta, huk ruraqtaq musuqta llamk'apurquptinñam.",
'undo-norev' => "Manam atinichu llamk'apusqata kutichiyta, mana kaptinmi icha qullusqa kaptinmi.",
'undo-summary' => '[[Special:Contributions/$2|$2]]-pa $1 hukchasqanta kutichisqa ([[User talk:$2|rimay]])',
+'undo-summary-username-hidden' => 'Pakasqa ruraqpa $1 nisqa musuqchasqata kutichiy',
# Account creation failure
'cantcreateaccounttitle' => 'Manam atinichu rakiqunata kichayta',
(ñawpaq) = ñawpaq kachkasqanwan huk kaykuna, a = aslla hukchasqa",
'history-fieldset-title' => 'Wiñay kawsaypi maskay',
'history-show-deleted' => 'Qullusqalla',
-'histfirst' => 'Ã\91awpaqkuna',
-'histlast' => 'Qhipaqkuna',
+'histfirst' => 'ñawpaqkuna',
+'histlast' => 'qhipaqkuna',
'historysize' => '({{PLURAL:$1|1 byte|$1 byte}})',
'historyempty' => "(ch'usaq)",
'compareselectedversions' => "Akllasqa llamk'apusqakunata wakichay",
'showhideselectedversions' => 'Akllasqa musuqchasqakunata rikuchiy/pakay',
'editundo' => 'kutichiy',
+'diff-empty' => '(Manam wak hina kanchu)',
'diff-multi' => "({{PLURAL:$2|Huk ruraqpa|$2 ruraqpa}} {{PLURAL:$1|chawpipi huk llamk'apusqanqa manam rikuchisqachu|chawpipi $1 llamk'apusqankunaqa manam rikuchisqachu}})",
'diff-multi-manyusers' => "({{PLURAL:$2|Hukmanta|$2-manta}} aswan ruraqkunap {{PLURAL:$1|chawpipi huk llamk'apusqanqa manam rikuchisqachu|chawpipi $1 llamk'apusqankunaqa manam rikuchisqachu}})",
'difference-missing-revision' => "Kay wakin kaymanta ($1) {{PLURAL:$2|huk musuqchasqa|$2 musuqchasqakuna}} manam tarisqachu.
'prefs-rendering' => "Rikch'akuynin",
'saveprefs' => 'Allinkachinakunata waqaychay',
'resetprefs' => 'Mana waqaychasqa hukchasqakunaman ama niy',
-'restoreprefs' => 'Tukuy kikinmanta allinkachinakunata kutichimuy',
+'restoreprefs' => 'Tukuy kikinmanta allinkachinakunata kutichimuy (tukuy rakirikunapi)',
'prefs-editing' => "Llamk'apusqa",
'rows' => 'Sinrukuna:',
'columns' => 'Wachukuna:',
'badsig' => "Chawa silq'usqaykiqa manam allinchu; HTML sananchakunata llanchiy.",
'badsiglength' => 'Chutu sutiykiqa nisyu sunim.
$1 {{PLURAL:$1|sanampamanta|sanampakunamanta}} aswan pisi kananmi.',
-'yourgender' => 'Qhari icha warmi:',
-'gender-unknown' => 'Mana riqsisqa',
-'gender-male' => 'Qhari',
-'gender-female' => 'Warmi',
-'prefs-help-gender' => "Munaspaykiqa: llamp'u kaqpa allinlla warmi icha qhari nispa napaykusunaykipaq. Kay willayqa sapsim kanqa.",
+'yourgender' => 'Ima hina nisunkikutaq munanki?',
+'gender-unknown' => 'Manam willayta munanichu',
+'gender-male' => "Qharim wikita llamk'apun",
+'gender-female' => "Warmim wikita llamk'apun",
+'prefs-help-gender' => "Munaspaykiqa: llamp'u kaqpa allinlla warmi icha qhari nispa napaykusunaykipaq huk runakunaman willananpaqpas. Kay willayqa sapsim kanqa.",
'email' => 'E-chaski',
'prefs-help-realname' => "* Chiqap sutiyki (munaspaqa): quwaptiykiqa, llamk'apusqaykikunam paywan sananchasqa kanqa.",
'prefs-help-email' => 'E-chaskita munaspayki akllayta atinki. Arí nispaykiqa, yaykuna rimata qunqaspayki musuq yaykuna rimata e-chaski imamaytaykiman kachachikamuyta atinki.',
'prefs-signature' => "Silq'uy",
'prefs-dateformat' => "P'unchaw rikch'ay",
'prefs-timeoffset' => 'Pacha wakinyay',
-'prefs-advancedediting' => 'Ñawparikusqa akllanakuna',
+'prefs-advancedediting' => 'Sapsi akllanakuna',
+'prefs-editor' => "P'anqachaq",
+'prefs-preview' => 'Ñawpaqta qhawallay',
'prefs-advancedrc' => 'Ñawparikusqa akllanakuna',
'prefs-advancedrendering' => 'Ñawparikusqa akllanakuna',
'prefs-advancedsearchoptions' => 'Ñawparikusqa akllanakuna',
'prefs-displayrc' => 'Akllanakunata rikuchiy',
'prefs-displaysearchoptions' => 'Akllanakunata rikuchiy',
'prefs-displaywatchlist' => 'Akllanakunata rikuchiy',
+'prefs-tokenwatchlist' => 'Llawi',
'prefs-diffs' => 'Wakin kaykuna',
# User preference: email validation using jQuery
'userrights-notallowed' => 'Qampa rakiqunaykiwanqa manam ruraqkunap hayñinkunata yapayta icha qichuyta atinkichu.',
'userrights-changeable-col' => 'Hukchanayki huñukuna',
'userrights-unchangeable-col' => 'Mana hukchanayki huñukuna',
-'userrights-conflict' => 'Ruraqpa hayñin tupanakuymi. Ama hina kaspa, hukchasqaykikunata musuqmanta quy.',
+'userrights-conflict' => 'Ruraqpa hayñin hukchay tupanakuymi. Ama hina kaspa, hukchasqaykikunata musuqmanta quy.',
# Groups
'group' => 'Huñu:',
'right-reupload-shared' => 'Rakinakusqa midya waqaychanallapi kaq willañiqikunata huknachay',
'right-upload_by_url' => 'URL tiyaymanta willañiqita churkuy',
'right-purge' => "''Cache'' nisqa pakasqa hallch'ata ch'usaqchay mana takyachina p'anqawan",
-'right-autoconfirmed' => "Kuskan amachasqa p'anqakunata llamk'apuy",
+'right-autoconfirmed' => 'IP-pi tiksisqa achura saywakunapa manam saywachasqan kanqachu',
'right-bot' => 'Rurana antachap ruraykachasqanta hina hatalliy',
'right-nominornewtalk' => 'Kikinpa rimachinanpi uchuylla hukchasqakunata "musuq willaykuna" nisqapi mana rikuy',
'right-apihighlimits' => "API maskanakunapi aswan hanaq saywakunata llamk'achiy",
'right-ipblock-exempt' => "IP hark'ayta, kikinmanta hark'ayta, tawqa hark'aytapas pulqaspa pasay",
'right-proxyunbannable' => "Kikinmanta ''proxy'' nisqa sirwiq hark'ayta pulqaspa pasay",
'right-unblockself' => "Kikinta hark'asqamanta qispikuy",
-'right-protect' => "Amachasqa kachkayta hukchay, amachasqa p'anqakunata llamk'apuy",
-'right-editprotected' => "Amachasqa p'anqakunata llamk'apuy (mana phaqcha amachasqa)",
+'right-protect' => "Amachasqa kachkayta hukchay, ch'aqtasqa amachasqa p'anqakunata llamk'apuy",
+'right-editprotected' => 'Amachasqa p\'anqakunata "{{int:protect-level-sysop}}" hina llamk\'apuy',
+'right-editsemiprotected' => '"{{int:protect-level-autoconfirmed}}" hina amachasqa p\'anqakunata llamk\'apuy',
'right-editinterface' => "Ruraqpaq uyapurata llamk'apuy",
'right-editusercssjs' => "Huk ruraqkunap CSS, JS willañiqinkunata llamk'apuy",
'right-editusercss' => "Huk ruraqkunap CSS willañiqinkunata llamk'apuy",
'right-edituserjs' => "Huk ruraqkunap JS willañiqinkunata llamk'apuy",
'right-editmyusercss' => "Kikiykip ruraqpaq CSS willañiqiykikunata llamk'apuy",
'right-editmyuserjs' => "Kikiykip ruraqpaq JavaScript willañiqiykikunata llamk'apuy",
+'right-viewmywatchlist' => 'Kikiykip watiqasqayki sutisuyuykita qhaway',
+'right-editmywatchlist' => "Kikiykip watiqasqayki sutisuyuykita llamk'apuy. Paqtataq, huk ruranakunaqa p'anqakunata yapanqaraqmi kay hañi mana kaptinpas.",
+'right-viewmyprivateinfo' => 'Kikiykip akuna willaykikunata qhaway (ahinataq e-chaski imamaytayki, chiqap sutiyki)',
+'right-editmyprivateinfo' => "Kikiykip akuna willaykikunata llamk'apuy (ahinataq e-chaski imamaytayki, chiqap sutiyki)",
+'right-editmyoptions' => "Kikiykip allinkachinaykikunata llamk'apuy",
'right-rollback' => "Huk p'anqapi qhipaq llamk'apuqpa hukchasqankunata utqaylla kutichiy",
'right-markbotedits' => "Kutichisqa llamk'apusqakunata rurana antachap llamk'apusqankunata hina sananchay",
'right-noratelimit' => 'Achura saywakunap manam chayachisqanchu',
'action-block' => "kay ruraqta llamk'apuymanta hark'ay",
'action-protect' => "kay p'anqapaq amachana kamachisqakunata hukchay",
'action-rollback' => "huk p'anqapi qhipaq llamk'apuqpa hukchasqankunata utqaylla kutichiy",
-'action-import' => "kay p'anqata hawa wikimanta chaskimuy",
-'action-importupload' => "kay p'anqata willañiqi churkusqamanta chaskimuy",
+'action-import' => "p'anqakunata hawa wikimanta chaskimuy",
+'action-importupload' => "p'anqakunata willañiqi churkusqamanta chaskimuy",
'action-patrol' => "huk ruraqpa llamk'apusqanta patrullasqa nispa sananchay",
'action-autopatrol' => "kikiykip llamk'apusqaykita patrullasqa nispa sananchakuy",
'action-unwatchedpages' => "mana watiqasqa p'anqa sutisuyuta qhaway",
'action-userrights-interwiki' => "hawa wikikunapi ruraqkunap hayñinkunata llamk'apuy",
'action-siteadmin' => "willañiqintinta hark'ay icha paskay",
'action-sendemail' => 'e-chaskikunata kachay',
+'action-editmywatchlist' => "watiqasqayki sutisuyuta llamk'apuy",
+'action-viewmywatchlist' => 'watiqasqayki sutisuyuta qhaway',
+'action-viewmyprivateinfo' => 'kikiykip akuna willaykikunata qhaway',
+'action-editmyprivateinfo' => "kikiykip akuna willaykikunata llamk'apuy",
# Recent changes
'nchanges' => '$1 {{PLURAL:$1|hukchasqa|hukchasqakuna}}',
+'enhancedrc-since-last-visit' => '$1 {{PLURAL:$1|qhipaq watukusqamantapacha}}',
+'enhancedrc-history' => 'wiñay kawsay',
'recentchanges' => 'Ñaqha hukchasqa',
'recentchanges-legend' => 'Ñaqha hukchasqapaq allinkachinakuna',
'recentchanges-summary' => "Kay p'anqapiqa aswan qhipaq ñaqha hukchasqakunam.",
+'recentchanges-noresult' => "Kay taripanakama hukchasqakunaqa akllasqa mit'api manam kanchu.",
'recentchanges-feed-description' => 'Kay mikhuchinapi wikipi qhipaq ñaqha hukchasqakunata qatiy.',
'recentchanges-label-newpage' => "Kayta llamk'apuptiykim musuq p'anqam tukukurqun",
'recentchanges-label-minor' => "Kayqa aslla llamk'apuymi",
'rc_categories_any' => 'Imallapas',
'rc-change-size-new' => '$1 {{PLURAL:$1|byte|byte}} hukchasqa kaptinña',
'newsectionsummary' => 'Musuq raki: /* $1 */',
-'rc-enhanced-expand' => 'Imaymanachakunata rikuchiy (JavaScript kananmi)',
+'rc-enhanced-expand' => 'Imaymanachakunata rikuchiy',
'rc-enhanced-hide' => 'Imaymanachakunata pakay',
'rc-old-title' => 'ñawpaqta "$1" sutiwan kamarisqa',
'reuploaddesc' => "Churkuna hunt'ana p'anqaman kutimuy.",
'upload-tryagain' => 'Hukchasqa willañiqimanta willaykunata kachay',
'uploadnologin' => 'Manaraqmi yaykurqunkichu',
-'uploadnologintext' => '[[Special:UserLogin|Yaykunaykim]] tiyan willañiqikunata churkunaykipaq.',
+'uploadnologintext' => '$1 tiyan willañiqikunata churkunaykipaq.',
'upload_directory_missing' => 'Churkuna willañiqi churanaqa ($1) manam kanchu. Llika sirwiqpas manam atinchu churkuna willañiqi churanata kamariyta.',
'upload_directory_read_only' => "Llika sirwiqqa manam atinchu churkuna hallch'aman ($1) qillqayta.",
'uploaderror' => 'Willañiqita churkunayaptiyki pantasqam tukurqan',
'upload_source_file' => ' (antañiqiqniykipi willañiqi)',
# Special:ListFiles
-'listfiles-summary' => "Kay sapaq p'anqapiqa tukuy churkusqa willañiqikunatam rikunki.
-Ruraqkama ch'illchispaykiqa, chay ruraq qhipaq churkuq kaptillan willañiqikunatam sutisuyup patanpi rikunki.",
+'listfiles-summary' => "Kay sapaq p'anqapiqa tukuy churkusqa willañiqikunatam rikunki.",
'listfiles_search_for' => 'Rikchap sutinta maskay:',
'imgfile' => 'willañiqi',
'listfiles' => 'Rikchakuna',
'listfiles_size' => 'Hatun kay',
'listfiles_description' => "T'iktuna",
'listfiles_count' => 'Musuqchasqakuna',
+'listfiles-show-all' => "Rikchakunamanta mawk'a musuqchasqakunata ch'aqtay",
+'listfiles-latestversion' => 'Kunan musuqchasqa',
+'listfiles-latestversion-yes' => 'Arí',
+'listfiles-latestversion-no' => 'Mana',
# File description page
'file-anchor-link' => 'Rikcha',
'randompage' => "Mayninpi p'anqa",
'randompage-nopages' => "Manam ima p'anqapas kanchu kay suti {{PLURAL:$2|k'itipi|k'itikunapi}}: $1.",
+# Random page in category
+'randomincategory' => "Katiguriyapi kikinmanta p'anqa",
+'randomincategory-invalidcategory' => '"$1" nisqaqa katiguriyapaq manam allin sutinchu.',
+'randomincategory-nopages' => "[[:Category:$1|$1]] katiguriyapiqa manam p'anqakuna kanchu.",
+'randomincategory-selectcategory' => "Katiguriyamanta kikinmanta p'anqata chaskiy: $1 $2.",
+'randomincategory-selectcategory-submit' => 'Riy',
+
# Random redirect
'randomredirect' => "Mayninpi pusapuna p'anqa",
'randomredirect-nopages' => 'Manam kanchu "$1" nisqa suti k\'itipi pusapuna p\'anqakuna.',
'listgrouprights' => 'Ruraq huñup hayñinkuna',
'listgrouprights-summary' => "Kay qatiq sutisuyupiqa kay wikipi sut'ichasqa ruraq huñukunatam, kikinpa chayamuna hayñinkunatawan rikunki.
Chay kikinkunap hayñinkunamanta astawan ñawirinaykipaqqa [[{{MediaWiki:Listgrouprights-helppage}}|kaypi qhaway]].",
-'listgrouprights-key' => '* <span class="listgrouprights-granted">Qusqa hayñi</span>
+'listgrouprights-key' => 'T\'iktuna:
+* <span class="listgrouprights-granted">Qusqa hayñi</span>
* <span class="listgrouprights-revoked">Qichusqa hayñi</span>',
'listgrouprights-group' => 'Huñu',
'listgrouprights-rights' => 'Hayñikuna',
'deleteotherreason' => 'Huk rayku:',
'deletereasonotherlist' => 'Huk rayku',
'deletereason-dropdown' => "*Qulluypaq sapsi raykukuna
-** Kikin kamariqpa mañakusqan
+** Spam nisqa millay rurasqa
+** Wandaluchasqa
** Ruraqpa hayñinta k'irisqa
-** Wandaluchasqa",
+** Kikin kamariqpa mañakusqan
+** P'itisqa pusapuna",
'delete-edit-reasonlist' => "Qullusqapaq raykukunata llamk'apuy",
'delete-toobig' => "Kay p'anqaqa ancha wiñay kawsaysapa, $1-manta aswan {{PLURAL:$1|musuqchasqayuq|musuqchasqayuq}}. Kay hina p'anqakunata qulluyqa saywachasqam, {{SITENAME}}ta mana waqllinapaq.",
'delete-warning-toobig' => "Kay p'anqaqa ancha wiñay kawsaysapa, $1-manta aswan {{PLURAL:$1|musuqchasqayuq|musuqchasqayuq}}. Kay hina p'anqata qulluspaykiqa, {{SITENAME}}ta waqllinkimanchá. Kay ruraymanta anchata yuyaychakuspa hamut'ay.",
Qhipaq kaq llamk'apusqaqa [[User:$3|$3]]-pa ([[User talk:$3|rimanakuy]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]) rurasqanmi.",
'editcomment' => "Llamk'apusqakunamanta pisichasqaqa kay hinam: \"''\$1''\".",
'revertpage' => '[[Special:Contributions/$2|$2]] ([[User talk:$2|rimachina]]) sutiyuq ruraqpa hukchasqankunaqa kutichisqam [[User:$1|$1]]-pa ñawpaq hukchasqanman',
-'revertpage-nouser' => "Ruraqpa hukchasqankunaqa (sutinqa qichusqam) kutichisqañam [[User:$1|$1]]-pa ñawpaq llamk'apusqanta paqarichispa",
+'revertpage-nouser' => "Ruraqpa hukchasqankunaqa (sutinqa qichusqam) kutichisqañam {{GENDER:$1|[[User:$1|$1]]}}-pa ñawpaq llamk'apusqanta paqarichispa",
'rollback-success' => "$1-pa hukchasqankunaqa kutichisqañam $2-pa ñawpaq llamk'apusqanta paqarichispa.",
# Edit tokens
'contributions' => "{{GENDER:$1|Ruraqpa}} llamk'apusqankuna",
'contributions-title' => "$1 sutiyuq ruraqpa llamk'apusqankuna",
'mycontris' => "Llamk'apusqaykuna",
-'contribsub2' => '$1 ($2)',
+'contribsub2' => '{{GENDER:$3|$1}}paq ($2)',
'nocontribs' => 'Manam kay hina hukchasqakuna kanchu.',
'uctop' => '(qhipaq hukchasqa)',
'month' => 'Kay killamanta (ñawpaqmantapas):',
'pageinfo-length' => "P'anqap chhikan (byte)",
'pageinfo-article-id' => "P'anqap ID-nin",
'pageinfo-language' => "P'anqap rimaynin",
-'pageinfo-robot-policy' => 'Maskana kuyuchinap kachkaynin',
-'pageinfo-robot-index' => 'Maskana yuyarinapaqpas',
-'pageinfo-robot-noindex' => 'Mana maskana yuyarinapaq',
+'pageinfo-robot-policy' => 'Maskana kuyuchinam yuyarinachan',
+'pageinfo-robot-index' => 'Saqillasqa',
+'pageinfo-robot-noindex' => 'Mana saqillasqa',
'pageinfo-views' => "Hayk'a qhawaykuna",
'pageinfo-watchers' => "P'anqata hayk'a watiqaqkuna",
'pageinfo-few-watchers' => '$1-manta aswan pisi {{PLURAL:$1|qhawaq|qhawaqkuna}}',
-'pageinfo-redirects-name' => "Kay p'anqaman pusampuqkuna",
+'pageinfo-redirects-name' => "Kay p'anqaman hayk'a pusampuqkuna",
'pageinfo-subpages-name' => "Kay p'anqap urin p'anqankuna",
'pageinfo-subpages-value' => '$1 ($2 {{PLURAL:$2|pusapuna|pusapunakuna}}; $3 {{PLURAL:$3|mana pusapuna|mana pusapunakuna}})',
'pageinfo-firstuser' => "P'anqap kamariqnin",
'exif-compression-4' => 'CCITT Huñu 4 tilifaks llawiy',
'exif-copyrighted-true' => 'Iskaychay hayñi kan',
-'exif-copyrighted-false' => 'Sapsi kapuy',
+'exif-copyrighted-false' => "Ruraqpa iskaychay hayñin kachkayqa mana sut'ichasqachu",
'exif-unknowndate' => "Mana riqsisqa p'unchaw",
'confirmemail_body_set' => 'Pipas, qamchiki, $1 IP huchhayuq tiyaymanta,
hukcharqan {{SITENAME}}pi "$2" sutiyuq rakiqunapaq e-chaski imamaytatam kay imamaytaman.
-Kay rakiquna chiqapta qamman kapuptinqa, kay t\'inkita qatiy {{SITENAME}}pi e-chaski ruranaykita musuqmanta takyachinaykipaq:
+Kay rakiquna chiqapta qamman kapuptinqa, kay t\'inkita qatiy {{SITENAME}}pi e-chaski ruranaykita takyachinaykipaq:
$3
'tags-tag' => 'Unanchachap sutin',
'tags-display-header' => "Hukchasqakunamanta sutisuyup rikch'akuynin",
'tags-description-header' => "Sut'inmanta hunt'a ch'uyanchaynin",
+'tags-active-header' => 'Ruraqllachu?',
'tags-hitcount-header' => 'Unanchasqa hukchasqakuna',
+'tags-active-yes' => 'Arí',
+'tags-active-no' => 'Mana',
'tags-edit' => "llamk'apuy",
'tags-hitcount' => '$1 {{PLURAL:$1|hukchasqa|hukchasqakuna}}',
# Image rotation
'rotate-comment' => "Rikch'aqa pacha rikuchiqwan $1 {{PLURAL:$1|k'atma}} muyusqam",
+# Limit report
+'limitreport-cputime-value' => '$1 {{PLURAL:$1|sikundu|sikundukuna}}',
+'limitreport-walltime-value' => '$1 {{PLURAL:$1|sikundu|sikundukuna}}',
+'limitreport-postexpandincludesize-value' => '$1/$2 {{PLURAL:$2|byte}}',
+'limitreport-templateargumentsize-value' => '$1/$2 {{PLURAL:$2|byte}}',
+
);
'articlepage' => 'Vedeți articolul',
'talk' => 'Discuție',
'views' => 'Vizualizări',
-'toolbox' => 'Trusa de unelte',
+'toolbox' => 'Unelte',
'userpage' => 'Vizualizați pagina utilizatorului',
'projectpage' => 'Vizualizați pagina proiectului',
'imagepage' => 'Vizualizați pagina fișierului',
'spam_reverting' => 'Revenire la ultima versiune care nu conține legături către $1',
'spam_blanking' => 'Toate versiunile conținând legături către $1 au fost golite',
'spam_deleting' => 'Toate versiunile conținând legături către $1 au fost șterse',
+'simpleantispam-label' => "Verificare antispam.
+'''NU''' completați !",
# Info page
'pageinfo-title' => 'Informații pentru „$1”',
'spam_reverting' => "Turnanne a l'urtema revisione no ge condiene collegaminde a $1",
'spam_blanking' => 'Tutte le revisiune condènene collegaminde a $1, vacande',
'spam_deleting' => 'Tutte le revisiune condènene collegaminde a $1, stoche a scangelle',
+'simpleantispam-label' => "Verifiche andi-spam.
+'''NO''' anghiè quiste!",
# Info page
'pageinfo-title' => '\'Mbormaziune pe "$1"',
'spam_reverting' => 'Откат к последней версии, не содержащей ссылки на $1',
'spam_blanking' => 'Все версии содержат ссылки на $1, очистка',
'spam_deleting' => 'Все версии содержали ссылки на $1, производится удаление',
+'simpleantispam-label' => 'Анти-спам проверка.
+НЕ заполняйте это!',
# Info page
'pageinfo-title' => 'Сведения по «$1»',
'spam_reverting' => 'Реверт на послїдню верзію необсягуючу одказы на $1',
'spam_blanking' => 'Вшыткы ревізії обсяговали одказы на $1, выпорожнєны',
'spam_deleting' => 'Вшыткы ревізії обсяговали одказы на $1, змазане',
+'simpleantispam-label' => "Перевірка на спам.
+'''НЕ''' заповнюйте тото!",
# Info page
'pageinfo-title' => 'Інформація про "$1"',
'spam_reverting' => '$1 इत्यनेन नानुबद्धनां प्राचीनपुनरावृत्तीनां पुनस्थापनं कुर्वन्ति ।',
'spam_blanking' => 'सर्वाः पुनरावृत्तयः $1 इत्यस्य अनुबन्धाः पूर्णपाठाः अपनीयन्ते ।',
'spam_deleting' => 'सर्वाः पुनरावृत्तयः $1 इत्यस्य अनुबन्धाः । पूर्णपाठाः अपनीयन्ते ।',
+'simpleantispam-label' => "अनिष्टसन्देशविरोधपरीक्षणम् ।
+अस्मिन् '''नहि''' पूर्यताम् !",
# Info page
'pageinfo-title' => '"$1" कृते सूचनाः ।',
'spam_reverting' => 'Манна: $1 ыйынньыга суох бүтэһик торуму сөргүтүү (төннөрүү)',
'spam_blanking' => 'Бары торумнар манна "$1" ыйынньыктаахтар, барытын суох оҥоруу',
'spam_deleting' => 'Бары барыллар манна "$1" сигэнэллэр эит, сотуу бара турар',
+'simpleantispam-label' => "Анти-спам бэрэбиэркэтэ.
+Маны '''толорумаҥ'''!",
# Info page
'pageinfo-title' => '"$1" туһунан',
'spambot_username' => 'මීඩියාවිකි ස්පෑම් ඉවත්කිරීම',
'spam_reverting' => ' $1 හට සබැඳියන් නොමැති අවසන් අනුවාදය වෙත ප්රතිවර්තනය වෙමින්',
'spam_blanking' => 'සියළු සංශෝධනයන්හි $1 වෙතවූ සබැඳියන් අඩංගු විය, හිස්කරමින්',
+'simpleantispam-label' => "ප්රති-ස්පෑම පරීක්ෂාව.
+කරුණාකර මෙය පුරවන්න '''එපා'''!",
# Info page
'pageinfo-title' => '"$1" සඳහා තොරතුරු',
'spam_reverting' => 'Vraciam poslednú verziu, ktorá neobsahuje odkazy na $1',
'spam_blanking' => 'Všetky revízie obsahovali odkaz na $1, odstraňujem obsah',
'spam_deleting' => 'Všetky revízie obsahovali odkaz na $1, odstraňuje sa',
+'simpleantispam-label' => "Antispamová kontrola.
+'''NEVYPĹŇAJTE''' nasledovné!",
# Info page
'pageinfo-title' => 'Informácie o „$1“',
'spam_reverting' => 'Vračanje na zadnjo redakcijo brez povezav na $1',
'spam_blanking' => 'Vse redakcije so vsebovale povezave na $1, izpraznjujem',
'spam_deleting' => 'Vse redakcije so vsebovale povezave na $1, brišem',
+'simpleantispam-label' => "Preverjanje proti smetju.
+'''NE''' izpolnite tega!",
# Info page
'pageinfo-title' => 'Informacije o »$1«',
'spam_reverting' => "U kthye tek versioni i fundit që s'ka lidhje tek $1",
'spam_blanking' => 'U boshatis sepse të gjitha versionet kanë lidhje tek $1',
'spam_deleting' => 'Të gjitha inspektimet përmbanin lidhje në $1, duke fshirë',
+'simpleantispam-label' => "Kontroll anti-spam.
+'''MOS''' e plotësoni këtë!",
# Info page
'pageinfo-title' => 'Informacion për " $1 "',
'userlogin-resetpassword-link' => 'Ресетујте лозинку',
'helplogin-url' => 'Help:Logging in',
'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Помоћ при пријављивању]]',
+'userlogin-createanother' => 'Отвори још један налог',
'createacct-join' => 'Унесите своје податке испод',
'createacct-another-join' => 'Унесите податке за нови налог испод.',
'createacct-emailrequired' => 'Адреса е-поште',
'contributions' => '{{GENDER:$1|Кориснички}} доприноси',
'contributions-title' => 'Доприноси {{GENDER:$1|корисника|кориснице|корисника}} $1',
'mycontris' => 'Доприноси',
-'contribsub2' => 'За $1 ($2)',
+'contribsub2' => 'За {{GENDER:$3|$1}} ($2)',
'nocontribs' => 'Измене које одговарају овим условима нису пронађене.',
'uctop' => '(последња)',
'month' => 'од месеца (и раније):',
'spam_reverting' => 'Враћам на последњу измену која не садржи везе до $1',
'spam_blanking' => 'Све измене садрже везе до $1. Чистим',
'spam_deleting' => 'Све измене садрже везе до $1. Бришем',
+'simpleantispam-label' => "Провера спама. '''НЕ''' попуњавај ово унутра!",
# Info page
'pageinfo-title' => 'Подаци о „$1“',
'contributions' => '{{GENDER:$1|Korisnički}} doprinosi',
'contributions-title' => 'Doprinosi {{GENDER:$1|korisnika|korisnice|korisnika}} $1',
'mycontris' => 'Doprinosi',
-'contribsub2' => 'Za $1 ($2)',
+'contribsub2' => 'Za {{GENDER:$3|$1}} ($2)',
'nocontribs' => 'Izmene koje odgovaraju ovim uslovima nisu pronađene.',
'uctop' => '(poslednja)',
'month' => 'od meseca (i ranije):',
'spam_reverting' => 'Vraćam na poslednju izmenu koja ne sadrži veze do $1',
'spam_blanking' => 'Sve izmene sadrže veze do $1. Čistim',
'spam_deleting' => 'Sve izmene sadrže veze do $1. Brišem',
+'simpleantispam-label' => "Provera spama. '''NE''' popunjavaj ovo unutra!",
# Info page
'pageinfo-title' => 'Podaci o „$1“',
'spambot_username' => 'MediaWiki Spam-Süüwerenge',
'spam_reverting' => 'Lääste Version sunner Links tou $1 wier häärstoald.',
'spam_blanking' => 'Aal Versione äntheelden Links tou $1, skeenmoaked.',
+'simpleantispam-label' => "Spamskuts-Wröige. Hier '''niks''' iendreege!",
# Info page
'pageinfo-title' => 'Informatione tou „$1“',
'articlepage' => 'Visa innehållssida',
'talk' => 'Diskussion',
'views' => 'Visningar',
-'toolbox' => 'Verktygslåda',
+'toolbox' => 'Verktyg',
'userpage' => 'Visa användarsida',
'projectpage' => 'Visa projektsida',
'imagepage' => 'Visa filsida',
'prefs-help-realname' => 'Riktigt namn behöver inte anges.
Om du väljer att ange ditt riktiga namn, kommer det att användas för att tillskriva dig ditt arbete.',
'prefs-help-email' => 'Att ange e-postadress är valfritt, men gör det möjligt att få ditt lösenord mejlat till dig om du glömmer det.',
-'prefs-help-email-others' => 'Du kan också välja att låta andra användare kontakta dig genom din användar-eller diskussionssida utan att avslöja din identitet.',
+'prefs-help-email-others' => 'Du kan också välja att låta andra användare kontakta dig genom din användar- eller diskussionssida utan att avslöja din identitet.',
'prefs-help-email-required' => 'E-postadress måste anges.',
'prefs-info' => 'Grundläggande information',
'prefs-i18n' => 'Internationalisering',
'spam_reverting' => 'Återställer till den senaste versionen som inte innehåller länkar till $1',
'spam_blanking' => 'Alla versioner innehöll en länk till $1, blankar',
'spam_deleting' => 'Alla ändringar innehöll länkar till $1, raderar',
+'simpleantispam-label' => "Anti-spam koll.
+Fyll '''INTE''' i det här!",
# Info page
'pageinfo-title' => 'Information om "$1"',
'spambot_username' => 'MediaWiki spam arassalaýyş',
'spam_reverting' => '$1 sahypasyna çykgytlary bolmadyk iň soňky wersiýasyna yzyna getirilýär',
'spam_blanking' => 'Ähli wersiýalarda $1 sahypasyna çykgytlar bar, boşadylýar',
+'simpleantispam-label' => "Anti-spam barlagy.
+Muny '''DOLDURMAŇ'''!",
# Patrolling
'markaspatrolleddiff' => 'Patrullyk edilen diýip belle',
'spam_reverting' => "Ibinabalik sa huling bersyon na 'di-naglalaman ng mga kawing sa $1",
'spam_blanking' => 'Lahat ng mga pagbabago ay naglalaman ng mga kawing sa $1, pagpapatlang',
'spam_deleting' => 'Lahat ng mga pagbabago ay naglalaman ng mga kawing sa $1, binubura',
+'simpleantispam-label' => "Pagsusuring panlaban sa \"manlulusob\" (''spam'').
+'''HUWAG''' itong lagyan ng laman!",
# Info page
'pageinfo-title' => 'Kabatiran para sa "$1"',
* @author LuCKY
* @author Mach
* @author Manco Capac
+ * @author Meelo
* @author Metal Militia
* @author Mirzali
* @author Mskyrider
$1 {{PLURAL:$1|karakterin|karakterin}} altında olmalı.',
'yourgender' => 'Nasıl açıklamayı tercih edersiniz?',
'gender-unknown' => 'Söylemek istemiyorsanız',
-'gender-male' => 'Wiki düzenlemelerinde erkek olarak',
-'gender-female' => 'Wiki düzenlemelerinde kadın olarak',
+'gender-male' => 'Viki sayfalarını erkek olarak düzenliyorum',
+'gender-female' => 'Viki sayfalarını kadın olarak düzenliyorum',
'prefs-help-gender' => 'Bu tercih ayarı isteğe bağlıdır.
Yazılımda söz değerlerinin başlarında bulunan cinsiyete uygun gramerler için kullanılır.
Bu bilgiler herkes tarafından görülebilir.',
'morelinkstoimage' => 'Bu dosyaya [[Special:WhatLinksHere/$1|daha fazla bağlantıları]] gör.',
'linkstoimage-redirect' => '$1 (dosya yönlendirme) $2',
'duplicatesoffile' => 'Şu {{PLURAL:$1|dosya|$1 dosya}}, bu dosyanın kopyası ([[Special:FileDuplicateSearch/$2|daha fazla ayrıntı]]):',
-'sharedupload' => 'Bu dosya $1 deposundan ve diğer projelerde kullanılıyor olabilir.',
+'sharedupload' => 'Bu dosya $1 projesinden olup, diğer projelerde kullanılıyor olabilir.',
'sharedupload-desc-there' => 'Bu dosya $1 deposundan ve diğer projeler tarafından kullanılıyor olabilir. Daha fazla bilgi için lütfen [$2 dosya açıklama sayfasına] bakın.',
'sharedupload-desc-here' => 'Bu dosya $1 deposundan ve diğer projeler tarafından kullanılıyor olabilir.
Aşağıda [$2 dosya açıklama sayfasındaki] açıklama gösteriliyor.',
-'sharedupload-desc-create' => 'Bu dosya, $1 ve diğer projeler tarafından kullanılıyor olabilir.
-Dosya açıklamasını düzenlemek isterseniz, [$2 dosya açıklama sayfası] bulunmaktadır.',
+'sharedupload-desc-edit' => 'Bu dosya $1 projesinden olup, diğer projelerde kullanılıyor olabilir.
+Dosyanın açıklama sayfasında değişiklik yapmak için ilgili sayfaya [$2 buradan] gidebilirsiniz.',
+'sharedupload-desc-create' => 'Bu dosya $1 projesinden olup, diğer projelerde kullanılıyor olabilir.
+Dosyanın açıklama sayfasında değişiklik yapmak için ilgili sayfaya [$2 buradan] gidebilirsiniz.',
'filepage-nofile' => 'Bu isimde bir dosya yok.',
'filepage-nofile-link' => 'Bu isimde bir dosya yok, ama siz [$1 yükleyebilirsiniz].',
'uploadnewversion-linktext' => 'Dosyanın yenisini yükleyin',
'spambot_username' => 'Medyaviki spam temizleme',
'spam_reverting' => '$1 ile bağlantı içermeyen son sürüme geri dönülüyor',
'spam_blanking' => 'Tüm revizyonlar $1 sayfasına bağlantı içeriyor, boşaltılıyor',
+'simpleantispam-label' => "Anti-spam denetimi.
+Bunu '''doldurmayın'''!",
# Info page
'pageinfo-title' => 'Bilgi için "$1"',
'index-category' => 'Индексировать кароно бамъёс',
'noindex-category' => 'Индексировать каронтэм бамъёс',
-'linkprefix' => '/^(.*?)(„|«)$/sDu',
+'linkprefix' => '/^((?>.*(?<!(?:„|«)$)))(.+)$/sDu',
'about' => 'Та сярысь',
'article' => 'Статья',
'spam_reverting' => 'Відкинути до останньої версії, що не містить посилання на $1',
'spam_blanking' => 'Всі версії містять посилання на $1, очистка',
'spam_deleting' => 'Все версії, що містили посилання на $1, вилучаються',
+'simpleantispam-label' => "Перевірка на спам.
+'''НЕ''' заповнюйте це!",
# Info page
'pageinfo-title' => 'Інформація про " $1 "',
'spam_reverting' => "Ripristinà l'ultima version priva de colegamenti a $1",
'spam_blanking' => 'Pàxena svodà, tute łe version le contegneva cołegamenti a $1',
'spam_deleting' => 'Pàjina scansełà, tute łe version łe contegneva ligamenti a $1',
+'simpleantispam-label' => "Controlo anti spam.
+'''NO STA''' scrivar gnente qua de soto!",
# Info page
'pageinfo-title' => 'Informasion par "$1"',
Xin hãy bỏ qua thông điệp này nếu tài khoản này không phải do bạn tạo ra.',
'usernamehasherror' => 'Tên người dùng không thể chứa dấu rào',
-'login-throttled' => 'Bạn đã hết quyền thử mật khẩu tài khoản này vì bạn đã nhập sai quá nhiều. Xin hãy đợi $1 giây rồi hãy thử lại.',
+'login-throttled' => 'Bạn đã hết quyền thử mật khẩu tài khoản này vì bạn đã nhập sai quá nhiều. Xin hãy đợi $1 rồi hãy thử lại.',
'login-abort-generic' => 'Thất bại khi đăng nhập',
'loginlanguagelabel' => 'Ngôn ngữ: $1',
'suspicious-userlogout' => 'Đã bỏ qua yêu cầu đăng xuất bạn, hình như được gửi từ trình duyệt hoặc máy proxy nhớ đệm hư.',
'accmailtitle' => 'Đã gửi mật khẩu.',
'accmailtext' => "Một mật khẩu được tạo ngẫu nhiên cho [[User talk:$1|$1]] đã được gửi đến $2. Có thể đổi mật khẩu tại trang ''[[Special:ChangePassword|đổi mật khẩu]]'' sau khi đã đăng nhập.",
'newarticle' => '(Mới)',
-'newarticletext' => '<div style="margin-top: 0px;" class="emptymwmsg mediawiki_newarticletext[[{{MediaWiki:Helppage}}|help page]]"></div>',
+'newarticletext' => "Bạn đi đến đây từ một liên kết đến một trang chưa tồn tại. Để tạo trang, hãy bắt đầu gõ vào ô bên dưới (xem [[{{MediaWiki:Helppage}}|trang trợ giúp]] để có thêm thông tin). Nếu bạn đến đây do nhầm lẫn, chỉ cần nhấn vào nút '''Lùi''' (''Back'') trong trình duyệt của bạn.",
'anontalkpagetext' => "----''Đây là trang thảo luận của một người dùng vô danh chưa tạo tài khoản hoặc có tài khoản nhưng không đăng nhập.
Do đó chúng ta phải dùng một dãy số gọi là địa chỉ IP để xác định anh/chị ta.
Một địa chỉ IP như vậy có thể có nhiều người cùng dùng chung.
'deletereason-dropdown' => '*Các lý do xóa phổ biến
** Đăng tỉ thư rác
** Phá hoại
-** Vi phạ bản quyền
-** Thiếu tôn trọng tác giả
+** Vi phạm bản quyền
+** Tác giả yêu cầu
** Chuyển hướng sai',
'delete-edit-reasonlist' => 'Sửa lý do xóa',
'delete-toobig' => 'Trang này có lịch sử sửa đổi lớn, đến hơn {{PLURAL:$1|lần|lần}} sửa đổi.
'ipbreason' => 'Lý do:',
'ipbreasonotherlist' => 'Lý do khác',
'ipbreason-dropdown' => '*Một số lý do cấm thường gặp
-** Phá hoại
-** Thêm thông tin nội dung sai lệch
-** Tẩy trống nội dung trang
-** Quảng cáo vớ vẩn
-** Đăng liên kết thư rác đến trang web bên ngoài
+** Thêm thông tin sai lệch
+** Xóa nội dung trang
+** Đăng liên kết thư rác đến trang Web bên ngoài
** Cho thông tin rác vào trang
** Có thái độ dọa dẫm/quấy rối
-** Tên thành viên không được chấp nhận
-** Tạo nhiều trang mới vi phạm bản quyền, bỏ qua thảo luận và cảnh báo
-** Truyền nhiều hình ảnh thiếu nguồn gốc hoặc bản quyền
-** Con rối của thành viên bị cấm',
+** Lạm dụng nhiều tài khoản
+** Tên thành viên không thể chấp nhận',
'ipb-hardblock' => 'Ngăn không cho thành viên đã đăng nhập sửa đổi từ địa chỉ IP này',
'ipbcreateaccount' => 'Cấm mở tài khoản',
'ipbemailban' => 'Không cho gửi thư điện tử',
'spam_reverting' => 'Lùi lại đến phiên bản cuối không chứa liên kết đến $1',
'spam_blanking' => 'Tất cả các phiên bản có liên kết đến $1; tẩy trống',
'spam_deleting' => 'Tất cả các phiên bản có liên kết đến $1; xóa',
+'simpleantispam-label' => "Kiểm tra chống spam.
+Xin '''ĐỪNG''' điền gì vào!",
# Info page
'pageinfo-title' => 'Thông tin về “$1”',
* @file
*
* @author Altaileopard
+ * @author Bua333
* @author Matma Rex
* @author Midnight Gambler
* @author Silvicola
'friday' => 'Freidooch',
'saturday' => 'Samsdooch',
'sun' => 'Su',
+'mon' => 'Mon',
+'tue' => 'Die',
+'wed' => 'Mid',
'thu' => 'Du',
+'fri' => 'Fre',
+'sat' => 'Sam',
'january' => 'Januaar',
'february' => 'Feebruaar',
'march' => 'Märds',
'hidden-categories' => '{{PLURAL:$1|Fârschdegde ghadegorii|Fârschdegde ghadegoriin}}',
'category-subcat-count' => 'Di ghadegorii umfasd {{PLURAL:$2|bloos a undâr-ghadegorii|dsam $2 undâr-ghadegoriâ, wofoo {{PLURAL:$1|nôr ôône| $1}}}} undn ôôdsajchd wärn.',
'category-article-count' => 'Di ghadegorii umfasd {{PLURAL:$2|bloos a sajdn|$2 sajdn, wofoo hiir {{PLURAL:$1|aane undn ôôdsajchd wärd|l$1 ôôdsajchd undn wärn}}}}.',
+'category-file-count' => '{{PLURAL:$2|Di Gadegorii umfasd bloos a Dadei.|Di folgende {{PLURAL:$1|Dadei is|$1 Dadein sind}} in der Gadegorii, von insgsamd $2 Dadein anzeichd.}}',
'listingcontinuesabbrev' => '(Fôrdsedsung)',
'noindex-category' => 'Seidn, wou net indexierd sin',
'articlepage' => "D'inhalds-sajdn dsajchn",
'talk' => 'Disghusjoon',
'views' => 'Ôôsichdn',
-'toolbox' => 'Werchdsajch-ghisdn',
+'toolbox' => 'Werchdsajch',
'userpage' => "D'benudsârsajdn dsajchn",
'projectpage' => "D'brojägdsajdn dsjachn",
'imagepage' => "D'dadhaj-sajdn dsajchn",
# Login and logout pages
'yourname' => 'Benudsârnôômâ',
'yourpassword' => 'Bhaswôrd:',
-'remembermypassword' => 'Af dem ghombjuudâr schdändich ôôgmäld blajm (for a maximum of $1 {{PLURAL:$1|day|days}})',
+'yourpasswordagain' => 'Bassworrd widderhulln:',
+'remembermypassword' => 'Miid den Brauser dauerhafd ogmeld bleim (maximal $1 {{PLURAL:$1|Dooch|Dooch}})',
'login' => 'Ôômeldn',
'nav-login-createaccount' => 'Oomeldn / Ghondoo ooleeng',
'loginprompt' => 'Zum Omelldn mäin Guggies agdivierd sei.',
'userlogout' => 'Abmeldn',
'nologin' => 'Du hast ka Nutzergonto? $1',
'nologinlink' => 'Sich als najâr Ôôgmeldâr ôômäldn',
+'createaccount' => 'Nutzergonto olegn',
+'gotaccount' => 'Du host scho a Benudtzergondo? $1',
'gotaccountlink' => 'Omeldn',
+'userlogin-resetlink' => 'Omeldedadn vergessn?',
'mailmypassword' => 'Â najs passwôrd iwâr iimejl dsuschign lasn',
'loginlanguagelabel' => 'Sproch: $1',
'noarticletext' => 'Dii sajdn gibd\'s bis eds no ned.
Duu ghâusch nach däm ausdrug aa [[Special:Search/{{PAGENAME}}|in alle sajdn suchng]],
<span class="plainlinks"> [{{fullurl:{{#special:Log}}|page={{FULLPAGENAMEE}}}} in di dsugheerichng log-biichâr suchng] odâr dii sajdn [{{fullurl:{{FULLPAGENAME}}|action=edit}} ôôleeng un najschrajm]</span>.',
-'previewnote' => "'''Hiir siggsd bloos, wii's wärn dääd, dii sajdn is ôbâr no ned gschbaichärd!'''",
+'noarticletext-nopermission' => 'Däi Seidn endhäld momendan nu kan Dexd, [[Special:Search/{{PAGENAME}}|Du derfsd däi Seidn a net derschdelln]].',
+'previewnote' => "'''Des is blouss a Vuurschau.''' Däi Seidn is nu net gschbeicherd worrn.",
'editing' => 'Beärbâdn fon $1',
'editingsection' => 'Beärwâdn fo $1 (bloos abschnid)',
'copyrightwarning' => "''Ghobhiir jôô ghâ web-sajdn, dii där ned ghärn, un benuds ghâ uurheewarrechdlich gschidsde wärgghe oone geneemichung fom uurheewâr!'''<br />
'template-semiprotected' => '(ned ôôgmeldede un naje benudsär däfn hiir ned schrajm)',
'hiddencategories' => 'Dii sajdn ghäärd dsu {{PLURAL:$1|aanâr fârschdegdn|$1 fârschdegde}} ghadegoriin:',
'permissionserrorstext-withaction' => 'Du däfsd ned $2, des{{PLURAL:$1||}}dâsweechn:',
+'recreate-moveddeleted-warn' => "'''Achdung: Du derschdellsd a Seidn, däi wou bereids fräiers glöschd worrn is.'''
+
+Bidde dou sorgfälldig ieberbriefen, ob die erneide Seidnderschdellung die Richdlinien endschbrechn doud.
+
+Zu deiner Informadion folchd des Lösch- un Verschäibungs-Logbuch miid der Begrindung vo der vuurherichen Löschung:",
+'moveddeleted-notice' => 'Däi Seidn is glöschd worrn. Zur Informadion folchds Lösch- un Verschäibungslogbuch vo dera Seidn.',
# Parser/template warnings
'post-expand-template-inclusion-warning' => "'''Wannung''': Däi Gräiss vo eibundne Vuurloong is zu grouss, einiche Vuurloong könna net eibundn werrn.",
'post-expand-template-inclusion-category' => 'Seidn, in dena wou däi maximale Gräiss vo eibundne Vuurloong ieberschriddn is.',
+'post-expand-template-argument-warning' => "'''Wannung:''' Däi Seidn endhäld mindesdens an Barameder in anner Vuurlooch, der wou exbandierd zu grouß is.",
+'post-expand-template-argument-category' => 'Seidn miid ignorierde Vuurloongbarameder',
# History pages
'viewpagelogs' => 'Logbicher fär dii sajdn dsajchn',
'currentrev-asof' => 'Jedsiche wärsjoon, am $2 um $3 gmachd',
'revisionasof' => 'Wärsjoon fom $2 um $3 Uur',
+'revision-info' => 'Version vom $1 Uhr von $2',
'previousrevision' => '← wärsjoon dâfoor',
'nextrevision' => 'Nägsdnajâre wärsjoon →',
'currentrevisionlink' => 'Geechnwärdiche wärsjoon',
* '''({{int:cur}})''' = undârschiid dsur geechnwärdichn wärsjoon, '''({{int:last}})''' = undârschiid dsur foorichn wärsjoon
* Uurdsajd/Daadum = wärsjoon dsu dära dsajd, '''{{int:minoreditletter}}''' = glane ändärung.",
'history-fieldset-title' => 'Suchng in där wärsjoonsfolche',
+'history-show-deleted' => 'Blouss glöschde Versiona zeing',
'histfirst' => 'älldsde',
'histlast' => 'neisde',
+# Revision feed
+'history-feed-item-nocomment' => '$1 bis $2',
+
# Revision deletion
'rev-delundel' => 'ôôdsajng/fârbärng',
'revdel-restore' => 'Ändârn, was oodsajchd wäd',
'revertmerge' => 'Dsrig fôr dii fârajnichung',
# Diffs
-'history-title' => 'Wärsjoonsfolche fo „$1“',
+'history-title' => '$1: Versionsgschichd',
'lineno' => 'Dsajln $1:',
'compareselectedversions' => 'Ausgwäälde wärsjoona fârglajchn',
'editundo' => 'riggängich machng',
+'diff-multi' => '({{PLURAL:$1|A dazwischaliengde Version|$1 dazwischaliengde Versiona}} von {{PLURAL:$2|am Nutzer|$2 Nutzern}} {{PLURAL:$1|wird|werrn}} ned ozeichd)',
# Search results
'searchresults' => 'Bam suchng gfundne sachng',
'prevn' => '{{PLURAL:$1|foorichâr|fooriche $1}}',
'nextn' => '{{PLURAL:$1|nägschdâr|nägschde $1}}',
'prevn-title' => '{{PLURAL:$1|Vuurherichs Ergebnis|Vuurheriche $1 Ergebniss}}',
+'nextn-title' => '{{PLURAL:$1|Folngnds Ergebnis|Folngnde $1 Ergebniss}}',
'shown-title' => 'Zeich mer $1 {{PLURAL:$1|Ergebnis|Ergebniss}} bro Seidn',
'viewprevnext' => 'Dsajch ($1 {{int:pipe-separator}} $2) ($3)',
+'searchmenu-exists' => "'''Es gidd a Seidn, däi wou´n Nooma „[[:$1]]“ hodd.'''",
'searchmenu-new' => "'''Derschdell dai Seidn „[[:$1]]“ in diesn Wigi.'''",
'searchprofile-articles' => 'Inhaldsseidn',
'searchprofile-project' => 'Hilf- un Brojegdseidn',
'searchprofile-everything-tooltip' => 'Gsamdn Inhald durchsoung (aa Disgussionsseidn)',
'searchprofile-advanced-tooltip' => 'Soung in weidere Namensraim',
'search-result-size' => '$1 ({{PLURAL:$2|1 wôrd|$2 wärdâr}})',
+'search-result-category-size' => '{{PLURAL:$1|1 Seidn|$1 Seidn}} ({{PLURAL:$2|1 Untergadegorii|$2 Untergadegoriin}}, {{PLURAL:$3|1 Dadei|$3 Dadein}})',
'search-result-score' => 'Âjschleechich: $1 %',
'search-redirect' => '(Wajdalajdung fon „$1“ häa)',
'search-section' => '(Abschnid $1)',
'allowemail' => 'Iimejl-embfang fon andrâ ôôschdeln',
'youremail' => 'E-mail:',
'yourrealname' => 'Bürcherlicher Noma:',
+'prefs-help-email' => 'Des Ogeem vo anner E-Mail-Adressn is obdional, ermöglichd obber däi Zusendung vo an Ersatzbassworrd, wennsd dei Bassworrd vergessn hosd.',
+'prefs-help-email-others' => 'Miid andre Benutzer koost a iber däi Benutzerdisgussionsseidn Kondagd afneha, ohne dass dei Idendidäd offenleeng moussd.',
# Groups
'group-sysop' => 'Adminisdradoorn',
'recentchanges' => 'ledsde änderunga',
'recentchanges-legend' => 'Âjschdelunga, wii di ledsdn ändrunga dsajchd wärn solln',
'recentchanges-feed-description' => 'Fârfolch mid dem Fiid dii ledsdn ändrungn in {{SITENAME}}.',
+'recentchanges-label-newpage' => 'Neie Seidn',
'recentchanges-label-minor' => 'Blos a weng wôs is gändârd wôrn',
+'recentchanges-label-bot' => 'Ändrung durch an Bot',
+'recentchanges-label-unpatrolled' => 'Net-kondrollierde Ändrung',
'rcnote' => "Des {{Plural:$1|is dii aane ändrung|sin dii '''$1''' ändrunga}}, dii in di {{Plural:$2|ledsdn 24 schdundn|ledsdn '''$2''' doochn}} gmachd wôrn {{Plural:$1|is|sin}}. Schdand is fom $4, $5 uur.",
+'rcnotefrom' => "Oozeichd werrn däi Ändrunga seid '''$2''' (max. '''$1''' Eidrääch).",
'rclistfrom' => 'Bloos di ändrunga dsajchn sajd $1',
'rcshowhideminor' => 'Glenâre Ändrungn $1',
'rcshowhidebots' => 'Bods (bearbajdâr, dii ajchendlich brograme san) $1',
'rcshowhideliu' => 'Ôôgmäldâde bearbajdâr $1',
'rcshowhideanons' => '$1 uuôôgmäldâde bearbajdâr',
+'rcshowhidepatr' => 'Gondrollierde Ändrunga $1',
'rcshowhidemine' => 'Ajchne bajdrääch $1',
'rclinks' => 'Dsajch dii ledsdn $1 ändrunga fo di ledsdn $2 dooch.<br />$3',
'diff' => 'undârschiid',
'minoreditletter' => 'g',
'newpageletter' => 'N',
'boteditletter' => 'B',
-'rc-enhanced-expand' => 'Ajndslhajdn ôôdsajchn (gäd bloos mid JavaScript)',
+'rc-enhanced-expand' => 'Eindslheidn oodseichn (gäd bloos mid JavaScript)',
'rc-enhanced-hide' => 'Glaanichghajdn ned dsajng',
# Recent changes linked
'uploadedimage' => 'had „[[$1]]“ naufglôôdn',
'license' => 'Lizenz',
+'license-header' => 'Lizenz',
# File description page
'file-anchor-link' => 'Daddei',
'filehist' => 'Wärsjoona bis eds',
'filehist-help' => 'Glig af ân dsajdbhungd, um dii dôômôôliche fasung ôôdsuschaua',
+'filehist-revert' => 'zricksedzn',
'filehist-current' => 'agduäl',
'filehist-datetime' => 'Âjschdlungs-daadum un -dsajd',
'filehist-thumb' => 'Schbigbildlâ',
'ncategories' => '$1 {{PLURAL:$1|GhadegoriiGhadegoriin}}',
'nmembers' => '{{PLURAL:$1|1 âjdrôôch|$1 âjdrääch}}',
'prefixindex' => 'Ale sajdn mid brääfigs',
+'usercreated' => '{{GENDER:$3|Ersschdelld}} am $1 um $2 Uhr',
'newpages' => 'Naje sajdn',
'move' => 'Umdaafn',
'movethispage' => 'Sajdn umdaafn',
# Special:LinkSearch
'linksearch' => 'Linggs nach ausârhalb',
+'linksearch-line' => '$1 is verlingt vo $2',
# Special:ListGroupRights
'listgrouprights-members' => '(Lisdn fon dâ midgliidâr)',
# Watchlist
'watchlist' => 'Beoobachdungslisdn',
'mywatchlist' => 'Beoobachdungslisdn',
+'watchlistfor2' => 'Fär $1 ($2)',
'addedwatchtext' => "Di sajdn „[[:$1]]“ schdäd eds mid af dajnâr [[Special:Watchlist|beoobachdungs-lisdn]] .
Wen sich af der sajdn oda iirâr disghusjoons-sajdn was duud, wärd se ab eds
'deletepage' => 'Sajdn leschn',
'confirmdeletetext' => "Duu bisd grôd dâbaj, â sajdn midsamd alle dsugheeriche alde wärsjoona ds'leschn. Bide beschdäädich, das De wasd, was des als bewirgd, un das De Dich dâbaj aa an d'[[{{MediaWiki:Policy-url}}|richliinjen]] fo dem wighi hiir häldsd.",
'actioncomplete' => 'Erleedichd',
+'actionfailed' => 'Agdsion fehlgschloong',
'deletedtext' => '„$1“ is gleschd wôrn. Im $2 findsd â lisdn mid dâ ledsdn leschunga.',
'dellogpage' => 'Logbuch fo di leschunga',
'deletecomment' => 'Grund:',
'blanknamespace' => '(Sajdn)',
# Contributions
-'contributions' => 'Ajchne bajdrääch',
+'contributions' => 'Eichne Beidrääch',
'contributions-title' => 'Bajdrääch fo „$1“',
'mycontris' => 'Bajdreech',
-'contribsub2' => 'Fär $1 ($2)',
+'contribsub2' => 'Von {{GENDER:$3|$1}} ($2)',
'uctop' => '(agduell)',
'month' => 'bis moonad:',
'year' => 'bis dsum jôôr:',
'sp-contributions-talk' => 'Disgussion',
'sp-contributions-search' => 'Bajdreech suchng',
'sp-contributions-username' => 'IP-adresn odär nôômâ fom Ôôgmeldn:',
+'sp-contributions-toponly' => 'Blouss agduelle Versiona zeing',
'sp-contributions-submit' => 'Suchng',
# What links here
'whatlinkshere-title' => 'Sajdn, di af „$1“ fârwajsn',
'whatlinkshere-page' => 'Sajdn:',
'linkshere' => "Dii afgfiirdn sajdn fârwajsn af ''„[[:$1]]“''':",
+'nolinkshere' => "Ka Seidn verlingt af '''„[[:$1]]“'''.",
'isredirect' => 'Wajdârlajdungssajdn',
'istemplate' => 'Foorlaachn-ajbindung',
'isimage' => 'Daddeilink',
'whatlinkshere-hideredirs' => '$1 wajdârlajdungn',
'whatlinkshere-hidetrans' => '$1 Foorlaachn-ajbindunga',
'whatlinkshere-hidelinks' => '$1 Fârwajse',
-'whatlinkshere-hideimages' => '$1 Bild-fârwajse',
+'whatlinkshere-hideimages' => 'Daddeilings $1',
'whatlinkshere-filters' => 'Fildhâr',
# Block/unblock
# Thumbnails
'thumbnail-more' => 'Grässär machng',
+'thumbnail_error' => 'Fehler beim Derschdelln von Vuurschaubilld: $1',
# Tooltip help for the actions
'tooltip-pt-userpage' => 'Daj benudsâr-sajdn',
'watchlisttools-edit' => 'Beobachdungslisdn dsajchn un ändârn',
'watchlisttools-raw' => "In där beoobachdungslisdn ds'fuâs rumworschdln",
+# Core parser functions
+'duplicate-defaultsort' => 'Der Sordierungsschlissl „$2“ ieberschreibt den vuurher verwendten Schlissl „$1“.',
+
# Special:SpecialPages
'specialpages' => 'Schbedsjaal-sajdn',
+# External image whitelist
+'external_image_whitelist' => ' # Däi Zeiln net verändern.<pre>
+# Undnstehnd könna Fragmende vo reguläre Asdrigg (der Deil zwischa die //) eigeem werrn.
+# Däi werrn miid die URLs vo Bilder aus egsderne Gwelln verglichng.
+# A bositiver Vergleich fiehrt zur Ozeich vom Bild, sunsd werrds Bild blouss als Link ozeichd.
+# Zeiln, däi wou miid an # ofanga, werrn als Gommendar behandld.
+# Zwischa Grouß- un Klaaschreibung werrd net underschiedn.
+
+# Fragmende vo reguläre Asdrigg nach dera Zeiln eidroong. Däi Zeiln net verändern.</pre>',
+
+# Special:Tags
+'tag-filter' => '[[Special:Tags|Marrgierungs]]-Fillder:',
+
);
'articlepage' => 'זען אינהאַלט בלאַט',
'talk' => 'שמועס',
'views' => 'קוקן',
-'toolbox' => 'געצייג קאסטן',
+'toolbox' => 'געצייג',
'userpage' => 'זען באַניצער בלאַט',
'projectpage' => 'זען פראיעקט בלאַט',
'imagepage' => 'זען טעקע בלאט',
'passwordsent' => '新嘅密碼已經寄咗畀呢位用戶 "$1" 嘅電郵地址。收到之後請重新登入。',
'blocked-mailpassword' => '你嘅IP地址被鎖住,唔可以用密碼復原功能以防止濫用。',
'eauthentsent' => '確認電郵已經傳送到指定嘅電郵地址。喺其它嘅郵件傳送到呢個戶口之前,你需要按電郵嘅指示,嚟確認呢個戶口真係屬於你嘅。',
-'throttled-mailpassword' => '一個密碼提醒已經響$1個鐘頭之前發送咗。為咗防止濫用,響$1個鐘頭之內只可以發送一個密碼提醒。',
+'throttled-mailpassword' => '一個密碼提醒已經響$1{{PLURAL:$1|個鐘頭}}之前發送咗。為咗防止濫用,響$1{{PLURAL:$1|個鐘頭}}之內只可以發送一個密碼提醒。',
'mailerror' => '傳送電郵錯誤: $1',
'acct_creation_throttle_hit' => '利用你呢個IP地址嘅訪客響上一日已經開咗 $1 個戶口,係響呢段時間嘅上限。
結果,利用呢個IP地址嘅訪客唔可以響呢段時間再開多個戶口。',
'spambot_username' => 'MediaWiki垃圾清除',
'spam_reverting' => '恢復返去最後一個唔包含指去$1嘅連結嘅嗰個修訂。',
'spam_blanking' => '全部版本都含有指去$1嘅連結,留空',
+'simpleantispam-label' => "反垃圾檢查。
+'''唔好'''加入呢個!",
# Skin names
'skinname-cologneblue' => '科隆藍',
'bydate' => '以時間',
'sp-newimages-showfrom' => '顯示由$1 $2嘅新檔',
+# Video information, used by Language::formatTimePeriod() to format lengths in the above messages
+'hours' => '$1{{PLURAL:$1|個鐘}}',
+
+# Human-readable timestamps
+'hours-ago' => '$1{{PLURAL:$1|個鐘}}之前',
+
# Bad image list
'bad_image_list' => '請根據下面嘅格式去寫:
'exif-gpsmeasuremode-3' => '三維量度',
# Pseudotags used for GPSSpeedRef
-'exif-gpsspeed-k' => 'å\8d\83ç±³/小時',
+'exif-gpsspeed-k' => 'å\85¬é\87\8c/小時',
'exif-gpsspeed-m' => '英里/小時',
'exif-gpsspeed-n' => '浬/小時',
'searchsuggest-search' => '搵嘢',
'searchsuggest-containing' => '名單傳送緊...',
+# Durations
+'duration-hours' => '$1{{PLURAL:$1|個鐘}}',
+
);
'articlepage' => '查看内容页面',
'talk' => '讨论',
'views' => '查看',
-'toolbox' => '工具箱',
+'toolbox' => '工具',
'userpage' => '查看用户页面',
'projectpage' => '查看项目页面',
'imagepage' => '查看文件页面',
# Random redirect
'randomredirect' => '随机重定向',
-'randomredirect-nopages' => '在 "$1" 名字空间中没有重定向页面。',
+'randomredirect-nopages' => '“$1”名字空间中没有重定向。',
# Statistics
'statistics' => '统计',
'spam_reverting' => '恢复到不包含链接的最近修订版本$1',
'spam_blanking' => '消隐所有包含链接至$1的修订',
'spam_deleting' => '正在删除所有包含至$1的版本',
+'simpleantispam-label' => "反垃圾检查。
+'''不要'''加入这个!",
# Info page
'pageinfo-title' => '“$1”的信息',
'spam_reverting' => '恢復到不包含連結至$1的最近修訂版本',
'spam_blanking' => '所有包含連結至$1的修訂,清空',
'spam_deleting' => '所有包含連結至$1的修訂,刪除中',
+'simpleantispam-label' => "反垃圾檢查。
+'''不要'''加入這個!",
# Info page
'pageinfo-title' => '「$1」的信息',
'spam_reverting',
'spam_blanking',
'spam_deleting',
+ 'simpleantispam-label',
),
'info' => array(
'pageinfo-header',
),
'mediawiki.inspect' => array(
'scripts' => 'resources/mediawiki/mediawiki.inspect.js',
- 'dependencies' => 'jquery.byteLength',
+ 'dependencies' => array(
+ 'jquery.byteLength',
+ 'jquery.json',
+ ),
'targets' => array( 'desktop', 'mobile' ),
),
'mediawiki.feedback' => array(
var name = mw.language.months.names[i].toLowerCase();
ts.monthNames[name] = i + 1;
regex.push( $.escapeRE( name ) );
- name = mw.language.months.genitive[i].toLowerCase().replace( '.', '' );
+ name = mw.language.months.genitive[i].toLowerCase();
ts.monthNames[name] = i + 1;
regex.push( $.escapeRE( name ) );
- name = mw.language.months.abbrev[i].toLowerCase();
+ name = mw.language.months.abbrev[i].toLowerCase().replace( '.', '' );
ts.monthNames[name] = i + 1;
regex.push( $.escapeRE( name ) );
}
tokenCache[tokenType] = params.token = undefined;
return api.post( params );
}
+ // Pass the promise forward, so the caller gets error codes
+ return this;
}
);
} else {
*/
auditSelectors: function ( css ) {
var selectors = { total: 0, matched: 0 },
- style = document.createElement( 'style' );
+ style = document.createElement( 'style' ),
+ sheet, rules;
style.textContent = css;
document.body.appendChild( style );
- $.each( style.sheet.cssRules, function ( index, rule ) {
+ // Standards-compliant browsers use .sheet.cssRules, IE8 uses .styleSheet.rules…
+ sheet = style.sheet || style.styleSheet;
+ rules = sheet.cssRules || sheet.rules;
+ $.each( rules, function ( index, rule ) {
selectors.total++;
if ( document.querySelector( rule.selectorText ) !== null ) {
selectors.matched++;
try {
// Bartosz made me put this here.
if ( window.opera ) { throw window.opera; }
- console.table( data );
+ // Use Function.prototype#call to force an exception on Firefox,
+ // which doesn't define console#table but doesn't complain if you
+ // try to invoke it.
+ console.table.call( console.table, data );
return;
} catch (e) {}
try {
- console.log( JSON.stringify( data, null, 2 ) );
+ console.log( $.toJSON( data, null, 2 ) );
return;
} catch (e) {}
mw.log( data );
* (don't call before document ready)
*/
init: function () {
- var profile, $tocTitle, $tocToggleLink, hideTocCookie;
+ var profile;
/* Set tooltipAccessKeyPrefix */
profile = $.client.profile();
} )();
// Table of contents toggle
- $tocTitle = $( '#toctitle' );
- $tocToggleLink = $( '#togglelink' );
- // Only add it if there is a TOC and there is no toggle added already
- if ( $( '#toc' ).length && $tocTitle.length && !$tocToggleLink.length ) {
- hideTocCookie = $.cookie( 'mw_hidetoc' );
+ mw.hook( 'wikipage.content' ).add( function () {
+ var $tocTitle, $tocToggleLink, hideTocCookie;
+ $tocTitle = $( '#toctitle' );
+ $tocToggleLink = $( '#togglelink' );
+ // Only add it if there is a TOC and there is no toggle added already
+ if ( $( '#toc' ).length && $tocTitle.length && !$tocToggleLink.length ) {
+ hideTocCookie = $.cookie( 'mw_hidetoc' );
$tocToggleLink = $( '<a href="#" class="internal" id="togglelink"></a>' )
.text( mw.msg( 'hidetoc' ) )
.click( function ( e ) {
e.preventDefault();
util.toggleToc( $(this) );
} );
- $tocTitle.append(
- $tocToggleLink
- .wrap( '<span class="toctoggle"></span>' )
- .parent()
- .prepend( ' [' )
- .append( '] ' )
- );
-
- if ( hideTocCookie === '1' ) {
- util.toggleToc( $tocToggleLink );
+ $tocTitle.append(
+ $tocToggleLink
+ .wrap( '<span class="toctoggle"></span>' )
+ .parent()
+ .prepend( ' [' )
+ .append( '] ' )
+ );
+
+ if ( hideTocCookie === '1' ) {
+ util.toggleToc( $tocToggleLink );
+ }
}
- }
+ } );
},
/* Main body */
'MediaWikiPHPUnitCommand' => "$testDir/phpunit/MediaWikiPHPUnitCommand.php",
'MediaWikiPHPUnitTestListener' => "$testDir/phpunit/MediaWikiPHPUnitTestListener.php",
'MediaWikiLangTestCase' => "$testDir/phpunit/MediaWikiLangTestCase.php",
- 'MediaWikiProvide' => "$testDir/phpunit/includes/Providers.php",
'TestUser' => "$testDir/phpunit/includes/TestUser.php",
# tests/phpunit/includes
# tests/phpunit/includes/api
'ApiFormatTestBase' => "$testDir/phpunit/includes/api/format/ApiFormatTestBase.php",
'ApiTestCase' => "$testDir/phpunit/includes/api/ApiTestCase.php",
- 'ApiTestContext' => "$testDir/phpunit/includes/api/ApiTestCase.php",
- 'MockApi' => "$testDir/phpunit/includes/api/ApiTestCase.php",
+ 'ApiTestContext' => "$testDir/phpunit/includes/api/ApiTestContext.php",
+ 'MockApi' => "$testDir/phpunit/includes/api/MockApi.php",
+ 'UserWrapper' => "$testDir/phpunit/includes/api/UserWrapper.php",
'RandomImageGenerator' => "$testDir/phpunit/includes/api/RandomImageGenerator.php",
- 'UserWrapper' => "$testDir/phpunit/includes/api/ApiTestCase.php",
# tests/phpunit/includes/content
'DummyContentHandlerForTesting' => "$testDir/phpunit/includes/content/ContentHandlerTest.php",
# tests/phpunit/includes/libs
'GenericArrayObjectTest' => "$testDir/phpunit/includes/libs/GenericArrayObjectTest.php",
+ # tests/phpunit/media
+ 'FakeDimensionFile' => "$testDir/phpunit/includes/media/FakeDimensionFile.php",
+
# tests/phpunit/includes/site
'SiteTest' => "$testDir/phpunit/includes/site/SiteTest.php",
'TestSites' => "$testDir/phpunit/includes/site/TestSites.php",
*/
class ParserTest {
/**
- * boolean $color whereas output should be colorized
+ * @var bool $color whereas output should be colorized
*/
private $color;
/**
- * boolean $showOutput Show test output
+ * @var bool $showOutput Show test output
*/
private $showOutput;
/**
- * boolean $useTemporaryTables Use temporary tables for the temporary database
+ * @var bool $useTemporaryTables Use temporary tables for the temporary database
*/
private $useTemporaryTables = true;
/**
- * boolean $databaseSetupDone True if the database has been set up
+ * @var bool $databaseSetupDone True if the database has been set up
*/
private $databaseSetupDone = false;
private $dbClone;
/**
- * string $oldTablePrefix Original table prefix
+ * @var string $oldTablePrefix Original table prefix
*/
private $oldTablePrefix;
/**
* Get a Parser object
+ *
+ * @param string $preprocessor
+ * @return Parser
*/
function getParser( $preprocessor = null ) {
global $wgParserConf;
$out = $parser->getPreloadText( $input, $title, $options );
} else {
$output = $parser->parse( $input, $title, $options, true, true, 1337 );
+ $output->setTOCEnabled( !isset( $opts['notoc'] ) );
$out = $output->getText();
if ( isset( $opts['showtitle'] ) ) {
/**
* Use a regex to find out the value of an option
* @param $key String: name of option val to retrieve
- * @param $opts Options array to look in
+ * @param $opts array: Options array to look in
* @param $default Mixed: default value returned if not found
*/
private static function getOptionValue( $key, $opts, $default ) {
# showtitle make the first line the title
# comment run through Linker::formatComment() instead of main parser
# local format section links in edit comment text as local links
+# notoc disable table of contents
#
# You can also set the following parser properties via test options:
# wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
</li>
</ul>
</div>
+
<h2><span class="mw-headline" id="Headline_1">Headline 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<h3><span class="mw-headline" id="Subheadline_1">Subheadline 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Subheadline 1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<h5><span class="mw-headline" id="Skipping_a_level">Skipping a level</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Skipping a level">edit</a><span class="mw-editsection-bracket">]</span></span></h5>
</li>
</ul>
</div>
+
<h1><span class="mw-headline" id="Level_1_Heading">Level 1 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Level 1 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
<h2><span class="mw-headline" id="Level_2_Heading">Level 2 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Level 2 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<h3><span class="mw-headline" id="Level_3_Heading">Level 3 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Level 3 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
</li>
</ul>
</div>
+
<h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<h4><span class="mw-headline" id="title_1.1.1">title 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
</li>
</ul>
</div>
+
<h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<h4><span class="mw-headline" id="title_1.1.1">title 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
<li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
</ul>
</div>
+
<h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<h3><span class="mw-headline" id="Section_1.1">Section 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<h4><span class="mw-headline" id="Section_1.1.1">Section 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Section 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
<li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
</ul>
</div>
+
<h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
</ul>
</div>
+
<h2><span class="mw-headline" id="text_.3E_text">text > text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: text > text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<p>section 1
</p>
<li class="toclevel-1 tocsection-4"><a href="#.3Ditalic_heading"><span class="tocnumber">4</span> <span class="toctext">=<i>italic</i> heading</span></a></li>
</ul>
</div>
+
<h1><span class="mw-headline" id="foo.3D">foo=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: foo=">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
<h1><span class="mw-headline" id=".3Dfoo">=foo</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: =foo">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
<h1><span class="mw-headline" id="italic_heading.3D"><i>italic</i> heading=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: italic heading=">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
</li>
</ul>
</div>
+
<h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
<h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
<h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
</ul>
</div>
+
!! end
!! test
</li>
</ul>
</div>
+
<h2><span class="mw-headline" id="2">2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<h6><span class="mw-headline" id="6">6</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: 6">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
<h3><span class="mw-headline" id="3">3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: 3">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
</p>
!! end
+!! test
+Link to a section of a variant of this title shouldn't be parsed as self-link
+!! options
+title=[[Duna]] language=sr
+!! input
+[[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
+!! result
+<p><strong class="selflink">Dуна</strong> is a self-link while <a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Dunа#Foo</a> and <a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Dуна#Foo</a> are not self-links.
+</p>
+!! end
+
!! test
Link to pages in language variants
!! options
<li class="toclevel-1 tocsection-1"><a href="#Lost_episodes"><span class="tocnumber">1</span> <span class="toctext"><i>Lost</i> episodes</span></a></li>
</ul>
</div>
+
<h2><span class="mw-headline" id="Lost_episodes"><i>Lost</i> episodes</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Lost episodes">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
!! end
<li class="toclevel-1 tocsection-1"><a href="#should_be_bold_then_normal_text"><span class="tocnumber">1</span> <span class="toctext"><b>should be bold</b> then normal text</span></a></li>
</ul>
</div>
+
<h2><span class="mw-headline" id="should_be_bold_then_normal_text"><b>should be bold</b> then normal text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: should be bold then normal text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
!! end
<li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
</ul>
</div>
+
<h2><span class="mw-headline" id="Image">Image <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Image">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
!! end
<li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
</ul>
</div>
+
<h2><span class="mw-headline" id="Quote"><blockquote>Quote</blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Quote">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
!! end
<li class="toclevel-1 tocsection-1"><a href="#Proof:_2_.3C_3"><span class="tocnumber">1</span> <span class="toctext">Proof: 2 < 3</span></a></li>
</ul>
</div>
+
<h2><span class="mw-headline" id="Proof:_2_.3C_3">Proof: 2 < 3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Proof: 2 < 3">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<p><small>Hanc marginis exiguitas non caperet.</small>
QED
<li class="toclevel-1 tocsection-2"><a href="#Foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext"><i>Foo</i> Bar</span></a></li>
</ul>
</div>
+
<h2><span class="mw-headline" id="Foo_Bar"><i>Foo</i> <b>Bar</b></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i> <blockquote>Bar</blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<li class="toclevel-1 tocsection-2"><a href="#b.22.3EEvilbye"><span class="tocnumber">2</span> <span class="toctext"><sup> b">Evilbye</sup></span></a></li>
</ul>
</div>
+
<h2><span class="mw-headline" id="Hello"><sup class="in-h2">Hello</sup></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Hello">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<h2><span class="mw-headline" id="b.22.3EEvilbye"><sup> b">Evilbye</sup></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">Evilbye">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<li class="toclevel-1 tocsection-5"><a href="#Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC"><span class="tocnumber">5</span> <span class="toctext"><span dir="ltr">Attributes after dir on these span tags must be deleted from the TOC</span></span></a></li>
</ul>
</div>
+
<h2><span class="mw-headline" id="C.2B.2B"><span dir="ltr">C++</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: C++">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<h2><span class="mw-headline" id=".D7.96.D7.91.D7.A0.D7.92.21"><span dir="rtl">זבנג!</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: זבנג!">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<h2><span class="mw-headline" id="The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: The attributes on these span tags must be deleted from the TOC">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
</p>
!! end
+!!test
+Disable TOC
+!! options
+notoc
+!! input
+Lead
+== Section 1 ==
+== Section 2 ==
+== Section 3 ==
+== Section 4 ==
+== Section 5 ==
+!! result
+<p>Lead
+</p>
+
+<h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Section_3">Section 3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Section 3">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Section_4">Section 4</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Section 4">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Section_5">Section 5</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Section 5">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
###
### Parsoids-specific tests
}
/**
- * Returns true iff the given namespace defaults to Wikitext
+ * Returns true if the given namespace defaults to Wikitext
* according to $wgNamespaceContentModels
*
* @param int $ns The namespace ID to check
*/
class ArticleTablesTest extends MediaWikiLangTestCase {
- function testbug14404() {
+ /**
+ * @covers Title::getTemplateLinksFrom
+ * @covers Title::getLinksFrom
+ */
+ public function testbug14404() {
global $wgContLang, $wgLanguageCode, $wgLang;
$title = Title::newFromText( 'Bug 14404' );
$this->article = null;
}
- function testImplementsGetMagic() {
+ /**
+ * @covers Article::__get
+ */
+ public function testImplementsGetMagic() {
$this->assertEquals( false, $this->article->mLatest, "Article __get magic" );
}
/**
* @depends testImplementsGetMagic
+ * @covers Article::__set
*/
- function testImplementsSetMagic() {
+ public function testImplementsSetMagic() {
$this->article->mLatest = 2;
$this->assertEquals( 2, $this->article->mLatest, "Article __set magic" );
}
/**
* @depends testImplementsSetMagic
+ * @covers Article::__call
*/
- function testImplementsCallMagic() {
+ public function testImplementsCallMagic() {
$this->article->mLatest = 33;
$this->article->mDataLoaded = true;
$this->assertEquals( 33, $this->article->getLatest(), "Article __call magic" );
}
- function testGetOrSetOnNewProperty() {
+ /**
+ * @covers Article::__get
+ * @covers Article::__set
+ */
+ public function testGetOrSetOnNewProperty() {
$this->article->ext_someNewProperty = 12;
$this->assertEquals( 12, $this->article->ext_someNewProperty,
"Article get/set magic on new field" );
/**
* Checks for the existence of the backwards compatibility static functions (forwarders to WikiPage class)
+ * @covers Article::selectFields
+ * @covers Article::onArticleCreate
+ * @covers Article::onArticleDelete
+ * @covers Article::onArticleEdit
+ * @covers Article::getAutosummary
*/
- function testStaticFunctions() {
+ public function testStaticFunctions() {
$this->hideDeprecated( 'Article::getAutosummary' );
$this->hideDeprecated( 'WikiPage::getAutosummary' );
$this->hideDeprecated( 'CategoryPage::getAutosummary' ); // Inherited from Article
$this->assertTrue( is_string( CategoryPage::getAutosummary( '', '', 0 ) ),
"Article static functions" );
}
-
- function testWikiPageFactory() {
- $title = Title::makeTitle( NS_FILE, 'Someimage.png' );
- $page = WikiPage::factory( $title );
- $this->assertEquals( 'WikiFilePage', get_class( $page ) );
-
- $title = Title::makeTitle( NS_CATEGORY, 'SomeCategory' );
- $page = WikiPage::factory( $title );
- $this->assertEquals( 'WikiCategoryPage', get_class( $page ) );
-
- $title = Title::makeTitle( NS_MAIN, 'SomePage' );
- $page = WikiPage::factory( $title );
- $this->assertEquals( 'WikiPage', get_class( $page ) );
- }
}
*/
class BlockTest extends MediaWikiLangTestCase {
- private $block, $madeAt;
+ /** @var Block */
+ private $block;
+ private $madeAt;
/* variable used to save up the blockID we insert in this test suite */
private $blockId;
}
}
- function testInitializerFunctionsReturnCorrectBlock() {
- // $this->dumpBlocks();
-
+ /**
+ * @covers Block::newFromTarget
+ */
+ public function testINewFromTargetReturnsCorrectBlock() {
$this->assertTrue( $this->block->equals( Block::newFromTarget( 'UTBlockee' ) ), "newFromTarget() returns the same block as the one that was made" );
+ }
+ /**
+ * @covers Block::newFromID
+ */
+ public function testINewFromIDReturnsCorrectBlock() {
$this->assertTrue( $this->block->equals( Block::newFromID( $this->blockId ) ), "newFromID() returns the same block as the one that was made" );
}
/**
* per bug 26425
*/
- function testBug26425BlockTimestampDefaultsToTime() {
+ public function testBug26425BlockTimestampDefaultsToTime() {
// delta to stop one-off errors when things happen to go over a second mark.
$delta = abs( $this->madeAt - $this->block->mTimestamp );
$this->assertLessThan( 2, $delta, "If no timestamp is specified, the block is recorded as time()" );
* This stopped working with r84475 and friends: regression being fixed for bug 29116.
*
* @dataProvider provideBug29116Data
+ * @covers Block::load
*/
- function testBug29116LoadWithEmptyIp( $vagueTarget ) {
+ public function testBug29116LoadWithEmptyIp( $vagueTarget ) {
$this->hideDeprecated( 'Block::load' );
$uid = User::idFromName( 'UTBlockee' );
* had. Regression bug 29116.
*
* @dataProvider provideBug29116Data
+ * @covers Block::newFromTarget
*/
- function testBug29116NewFromTargetWithEmptyIp( $vagueTarget ) {
+ public function testBug29116NewFromTargetWithEmptyIp( $vagueTarget ) {
$block = Block::newFromTarget( 'UTBlockee', $vagueTarget );
$this->assertTrue( $this->block->equals( $block ), "newFromTarget() returns the same block as the one that was made when given empty vagueTarget param " . var_export( $vagueTarget, true ) );
}
);
}
- function testBlockedUserCanNotCreateAccount() {
+ /**
+ * @covers Block::prevents
+ */
+ public function testBlockedUserCanNotCreateAccount() {
$username = 'BlockedUserToCreateAccountWith';
$u = User::newFromName( $username );
$u->setPassword( 'NotRandomPass' );
);
}
- function testCrappyCrossWikiBlocks() {
+ /**
+ * @covers Block::insert
+ */
+ public function testCrappyCrossWikiBlocks() {
// Delete the last round's block if it's still there
$oldBlock = Block::newFromTarget( 'UserOnForeignWiki' );
if ( $oldBlock ) {
/**
* @dataProvider providerXff
+ * @covers Block::getBlocksForIPList
+ * @covers Block::chooseBlock
*/
- function testBlocksOnXff( $xff, $exCount, $exResult ) {
+ public function testBlocksOnXff( $xff, $exCount, $exResult ) {
$list = array_map( 'trim', explode( ',', $xff ) );
$xffblocks = Block::getBlocksForIPList( $list, true );
$this->assertEquals( $exCount, count( $xffblocks ), 'Number of blocks for ' . $xff );
/**
* Test the CDB reader/writer
+ * @covers CdbWriter_PHP
+ * @covers CdbWriter_DBA
*/
class CdbTest extends MediaWikiTestCase {
<?php
+
+/**
+ * Class CollationTest
+ * @covers Collation
+ * @covers IcuCollation
+ * @covers IdentityCollation
+ * @covers UppercaseCollation
+ */
class CollationTest extends MediaWikiLangTestCase {
protected function setUp() {
parent::setUp();
*
* @dataProvider prefixDataProvider
*/
- function testIsPrefix( $lang, $base, $extended ) {
+ public function testIsPrefix( $lang, $base, $extended ) {
$cp = Collator::create( $lang );
$cp->setStrength( Collator::PRIMARY );
$baseBin = $cp->getSortKey( $base );
$this->assertStringStartsWith( $baseBin, $extendedBin, "$base is not a prefix of $extended" );
}
- function prefixDataProvider() {
+ public static function prefixDataProvider() {
return array(
array( 'en', 'A', 'AA' ),
array( 'en', 'A', 'AAA' ),
*
* @dataProvider notPrefixDataProvider
*/
- function testNotIsPrefix( $lang, $base, $extended ) {
+ public function testNotIsPrefix( $lang, $base, $extended ) {
$cp = Collator::create( $lang );
$cp->setStrength( Collator::PRIMARY );
$baseBin = $cp->getSortKey( $base );
$this->assertStringStartsNotWith( $baseBin, $extendedBin, "$base is a prefix of $extended" );
}
- function notPrefixDataProvider() {
+ public static function notPrefixDataProvider() {
return array(
array( 'en', 'A', 'B' ),
array( 'en', 'AC', 'ABC' ),
*
* @dataProvider firstLetterProvider
*/
- function testGetFirstLetter( $collation, $string, $firstLetter ) {
+ public function testGetFirstLetter( $collation, $string, $firstLetter ) {
$col = Collation::factory( $collation );
$this->assertEquals( $firstLetter, $col->getFirstLetter( $string ) );
}
/**
* Test for DiffHistoryBlob::xdiffAdler32()
* @dataProvider provideXdiffAdler32
+ * @covers DiffHistoryBlob::xdiffAdler32
*/
- function testXdiffAdler32( $input ) {
+ public function testXdiffAdler32( $input ) {
$xdiffHash = substr( xdiff_string_rabdiff( $input, '' ), 0, 4 );
$dhb = new DiffHistoryBlob;
$myHash = $dhb->xdiffAdler32( $input );
/**
* @dataProvider provideExtractSectionTitle
+ * @covers EditPage::extractSectionTitle
*/
- function testExtractSectionTitle( $section, $title ) {
+ public function testExtractSectionTitle( $section, $title ) {
$extracted = EditPage::extractSectionTitle( $section );
$this->assertEquals( $title, $extracted );
}
* wrapper around assertEquals() which calls rrtrim() to normalize the
* expected and actual texts.
*/
- function assertEditedTextEquals( $expected, $actual, $msg = '' ) {
+ protected function assertEditedTextEquals( $expected, $actual, $msg = '' ) {
return $this->assertEquals( rtrim( $expected ), rtrim( $actual ), $msg );
}
return $page;
}
+ /**
+ * @todo split into a dataprovider and test method
+ * @covers EditPage
+ */
public function testCreatePage() {
$this->assertEdit(
'EditPageTest_testCreatePage',
/**
* @dataProvider provideSectionEdit
+ * @covers EditPage
*/
public function testSectionEdit( $base, $section, $text, $summary, $expected ) {
$edit = array(
/**
* @dataProvider provideAutoMerge
+ * @covers EditPage
*/
public function testAutoMerge( $baseUser, $text, $adamsEdit, $bertasEdit,
$expectedCode, $expectedText, $message = null
class ExternalStoreTest extends MediaWikiTestCase {
- function testExternalFetchFromURL() {
+ /**
+ * @covers ExternalStore::fetchFromURL
+ */
+ public function testExternalFetchFromURL() {
$this->setMwGlobals( 'wgExternalStores', false );
$this->assertFalse(
*/
class ExtraParserTest extends MediaWikiTestCase {
+ /** @var ParserOptions */
+ protected $options;
+ /** @var Parser */
+ protected $parser;
+
protected function setUp() {
parent::setUp();
MagicWord::clearCache();
}
- // Bug 8689 - Long numeric lines kill the parser
- function testBug8689() {
+ /**
+ * Bug 8689 - Long numeric lines kill the parser
+ * @covers Parser::parse
+ */
+ public function testBug8689() {
global $wgUser;
$longLine = '1.' . str_repeat( '1234567890', 100000 ) . "\n";
$this->parser->parse( $longLine, $t, $options )->getText() );
}
- /* Test the parser entry points */
- function testParse() {
+ /**
+ * Test the parser entry points
+ * @covers Parser::parse
+ */
+ public function testParse() {
$title = Title::newFromText( __FUNCTION__ );
$parserOutput = $this->parser->parse( "Test\n{{Foo}}\n{{Bar}}", $title, $this->options );
$this->assertEquals( "<p>Test\nContent of <i>Template:Foo</i>\nContent of <i>Template:Bar</i>\n</p>", $parserOutput->getText() );
}
- function testPreSaveTransform() {
+ /**
+ * @covers Parser::preSaveTransform
+ */
+ public function testPreSaveTransform() {
global $wgUser;
$title = Title::newFromText( __FUNCTION__ );
$outputText = $this->parser->preSaveTransform( "Test\r\n{{subst:Foo}}\n{{Bar}}", $title, $wgUser, $this->options );
$this->assertEquals( "Test\nContent of ''Template:Foo''\n{{Bar}}", $outputText );
}
- function testPreprocess() {
+ /**
+ * @covers Parser::preprocess
+ */
+ public function testPreprocess() {
$title = Title::newFromText( __FUNCTION__ );
$outputText = $this->parser->preprocess( "Test\n{{Foo}}\n{{Bar}}", $title, $this->options );
/**
* cleanSig() makes all templates substs and removes tildes
+ * @covers Parser::cleanSig
*/
- function testCleanSig() {
+ public function testCleanSig() {
$title = Title::newFromText( __FUNCTION__ );
$outputText = $this->parser->cleanSig( "{{Foo}} ~~~~" );
/**
* cleanSig() should do nothing if disabled
+ * @covers Parser::cleanSig
*/
- function testCleanSigDisabled() {
+ public function testCleanSigDisabled() {
$this->setMwGlobals( 'wgCleanSignatures', false );
$title = Title::newFromText( __FUNCTION__ );
/**
* cleanSigInSig() just removes tildes
* @dataProvider provideStringsForCleanSigInSig
+ * @covers Parser::cleanSigInSig
*/
- function testCleanSigInSig( $in, $out ) {
+ public function testCleanSigInSig( $in, $out ) {
$this->assertEquals( Parser::cleanSigInSig( $in ), $out );
}
);
}
- function testGetSection() {
+ /**
+ * @covers Parser::getSection
+ */
+ public function testGetSection() {
$outputText2 = $this->parser->getSection( "Section 0\n== Heading 1 ==\nSection 1\n=== Heading 2 ===\nSection 2\n== Heading 3 ==\nSection 3\n", 2 );
$outputText1 = $this->parser->getSection( "Section 0\n== Heading 1 ==\nSection 1\n=== Heading 2 ===\nSection 2\n== Heading 3 ==\nSection 3\n", 1 );
$this->assertEquals( "== Heading 1 ==\nSection 1\n=== Heading 2 ===\nSection 2", $outputText1 );
}
- function testReplaceSection() {
+ /**
+ * @covers Parser::replaceSection
+ */
+ public function testReplaceSection() {
$outputText = $this->parser->replaceSection( "Section 0\n== Heading 1 ==\nSection 1\n=== Heading 2 ===\nSection 2\n== Heading 3 ==\nSection 3\n", 1, "New section 1" );
$this->assertEquals( "Section 0\nNew section 1\n\n== Heading 3 ==\nSection 3", $outputText );
/**
* Templates and comments are not affected, but noinclude/onlyinclude is.
+ * @covers Parser::getPreloadText
*/
- function testGetPreloadText() {
+ public function testGetPreloadText() {
$title = Title::newFromText( __FUNCTION__ );
$outputText = $this->parser->getPreloadText( "{{Foo}}<noinclude> censored</noinclude> information <!-- is very secret -->", $title, $this->options );
/**
* @group Database
+ * @covers Parser::parse
*/
- function testTrackingCategory() {
+ public function testTrackingCategory() {
$title = Title::newFromText( __FUNCTION__ );
$catName = wfMessage( 'broken-file-category' )->inContentLanguage()->text();
$cat = Title::makeTitleSafe( NS_CATEGORY, $catName );
/**
* @group Database
+ * @covers Parser::parse
*/
- function testTrackingCategorySpecial() {
+ public function testTrackingCategorySpecial() {
// Special pages shouldn't have tracking cats.
$title = SpecialPage::getTitleFor( 'Contributions' );
$parserOutput = $this->parser->parse( "[[file:nonexistent]]", $title, $this->options );
--- /dev/null
+<?php
+
+/**
+ * @covers Fallback
+ */
+class FallbackTest extends MediaWikiTestCase {
+
+ public function testFallbackMbstringFunctions() {
+
+ if ( !extension_loaded( 'mbstring' ) ) {
+ $this->markTestSkipped( "The mb_string functions must be installed to test the fallback functions" );
+ }
+
+ $sampleUTF = "Östergötland_coat_of_arms.png";
+
+ //mb_substr
+ $substr_params = array(
+ array( 0, 0 ),
+ array( 5, -4 ),
+ array( 33 ),
+ array( 100, -5 ),
+ array( -8, 10 ),
+ array( 1, 1 ),
+ array( 2, -1 )
+ );
+
+ foreach ( $substr_params as $param_set ) {
+ $old_param_set = $param_set;
+ array_unshift( $param_set, $sampleUTF );
+
+ $this->assertEquals(
+ call_user_func_array( 'mb_substr', $param_set ),
+ call_user_func_array( 'Fallback::mb_substr', $param_set ),
+ 'Fallback mb_substr with params ' . implode( ', ', $old_param_set )
+ );
+ }
+
+ //mb_strlen
+ $this->assertEquals(
+ mb_strlen( $sampleUTF ),
+ Fallback::mb_strlen( $sampleUTF ),
+ 'Fallback mb_strlen'
+ );
+
+ //mb_str(r?)pos
+ $strpos_params = array(
+ //array( 'ter' ),
+ //array( 'Ö' ),
+ //array( 'Ö', 3 ),
+ //array( 'oat_', 100 ),
+ //array( 'c', -10 ),
+ //Broken for now
+ );
+
+ foreach ( $strpos_params as $param_set ) {
+ $old_param_set = $param_set;
+ array_unshift( $param_set, $sampleUTF );
+
+ $this->assertEquals(
+ call_user_func_array( 'mb_strpos', $param_set ),
+ call_user_func_array( 'Fallback::mb_strpos', $param_set ),
+ 'Fallback mb_strpos with params ' . implode( ', ', $old_param_set )
+ );
+
+ $this->assertEquals(
+ call_user_func_array( 'mb_strrpos', $param_set ),
+ call_user_func_array( 'Fallback::mb_strrpos', $param_set ),
+ 'Fallback mb_strrpos with params ' . implode( ', ', $old_param_set )
+ );
+ }
+ }
+
+}
\ No newline at end of file
class FauxRequestTest extends MediaWikiTestCase {
- function testGetSetHeader() {
+ /**
+ * @covers FauxRequest::setHeader
+ * @covers FauxRequest::getHeader
+ */
+ public function testGetSetHeader() {
$value = 'test/test';
$request = new FauxRequest();
*/
class FauxResponseTest extends MediaWikiTestCase {
- var $response;
+ /** @var FauxResponse */
+ protected $response;
protected function setUp() {
parent::setUp();
$this->response = new FauxResponse;
}
- function testCookie() {
+ /**
+ * @covers FauxResponse::getcookie
+ * @covers FauxResponse::setcookie
+ */
+ public function testCookie() {
$this->assertEquals( null, $this->response->getcookie( 'key' ), 'Non-existing cookie' );
$this->response->setcookie( 'key', 'val' );
$this->assertEquals( 'val', $this->response->getcookie( 'key' ), 'Existing cookie' );
}
- function testHeader() {
+ /**
+ * @covers FauxResponse::getheader
+ * @covers FauxResponse::header
+ */
+ public function testHeader() {
$this->assertEquals( null, $this->response->getheader( 'Location' ), 'Non-existing header' );
$this->response->header( 'Location: http://localhost/' );
$this->assertEquals( 'http://localhost/', $this->response->getheader( 'LOCATION' ), 'Get header case insensitive' );
}
- function testResponseCode() {
+ /**
+ * @covers FauxResponse::getStatusCode
+ */
+ public function testResponseCode() {
$this->response->header( 'HTTP/1.1 200' );
$this->assertEquals( 200, $this->response->getStatusCode(), 'Header with no message' );
*/
protected $object;
-
/**
* A new fresh and empty FormOptions object to test initialization
* with.
$this->object = new FormOptionsExposed();
}
+ /**
+ * @covers FormOptionsExposed::add
+ */
public function testAddStringOption() {
$this->object->add( 'foo', 'string value' );
$this->assertEquals(
);
}
+ /**
+ * @covers FormOptionsExposed::add
+ */
public function testAddIntegers() {
$this->object->add( 'one', 1 );
$this->object->add( 'negone', -1 );
/**
* Reuse helpers above assertGuessBoolean assertGuessInt assertGuessString
+ * @covers FormOptions::guessType
*/
public function testGuessTypeDetection() {
$this->assertGuessBoolean( true );
/**
* @expectedException MWException
+ * @covers FormOptions::guessType
*/
public function testGuessTypeOnArrayThrowException() {
$this->object->guessType( array( 'foo' ) );
}
/**
* @expectedException MWException
+ * @covers FormOptions::guessType
*/
public function testGuessTypeOnNullThrowException() {
$this->object->guessType( null );
parent::tearDown();
}
- /** @dataProvider provideForWfArrayDiff2 */
+ /**
+ * @dataProvider provideForWfArrayDiff2
+ * @covers ::wfArrayDiff2
+ */
public function testWfArrayDiff2( $a, $b, $expected ) {
$this->assertEquals(
wfArrayDiff2( $a, $b ), $expected
);
}
- function testRandom() {
+ /**
+ * @covers ::wfRandom
+ */
+ public function testRandom() {
# This could hypothetically fail, but it shouldn't ;)
$this->assertFalse(
wfRandom() == wfRandom() );
}
- function testUrlencode() {
+ /**
+ * @covers ::wfUrlencode
+ */
+ public function testUrlencode() {
$this->assertEquals(
"%E7%89%B9%E5%88%A5:Contributions/Foobar",
wfUrlencode( "\xE7\x89\xB9\xE5\x88\xA5:Contributions/Foobar" ) );
}
- function testExpandIRI() {
+ /**
+ * @covers ::wfExpandIRI
+ */
+ public function testExpandIRI() {
$this->assertEquals(
"https://te.wikibooks.org/wiki/ఉబుంటు_వాడుకరి_మార్గదర్శని",
wfExpandIRI( "https://te.wikibooks.org/wiki/%E0%B0%89%E0%B0%AC%E0%B1%81%E0%B0%82%E0%B0%9F%E0%B1%81_%E0%B0%B5%E0%B0%BE%E0%B0%A1%E0%B1%81%E0%B0%95%E0%B0%B0%E0%B0%BF_%E0%B0%AE%E0%B0%BE%E0%B0%B0%E0%B1%8D%E0%B0%97%E0%B0%A6%E0%B0%B0%E0%B1%8D%E0%B0%B6%E0%B0%A8%E0%B0%BF" ) );
}
- function testReadOnlyEmpty() {
+ /**
+ * @covers ::wfReadOnly
+ */
+ public function testReadOnlyEmpty() {
global $wgReadOnly;
$wgReadOnly = null;
$this->assertFalse( wfReadOnly() );
}
- function testReadOnlySet() {
+ /**
+ * @covers ::wfReadOnly
+ */
+ public function testReadOnlySet() {
global $wgReadOnly, $wgReadOnlyFile;
$f = fopen( $wgReadOnlyFile, "wt" );
$this->assertFalse( wfReadOnly() );
}
- function testQuotedPrintable() {
- $this->assertEquals(
- "=?UTF-8?Q?=C4=88u=20legebla=3F?=",
- UserMailer::quotedPrintable( "\xc4\x88u legebla?", "UTF-8" ) );
- }
-
public static function provideArrayToCGI() {
return array(
array( array(), '' ), // empty
/**
* @dataProvider provideArrayToCGI
+ * @covers ::wfArrayToCgi
*/
- function testArrayToCGI( $array, $result ) {
+ public function testArrayToCGI( $array, $result ) {
$this->assertEquals( $result, wfArrayToCgi( $array ) );
}
- function testArrayToCGI2() {
+ /**
+ * @covers ::testWfArrayDiff2
+ */
+ public function testArrayToCGI2() {
$this->assertEquals(
"baz=bar&foo=bar",
wfArrayToCgi(
/**
* @dataProvider provideCgiToArray
+ * @covers ::wfCgiToArray
*/
- function testCgiToArray( $cgi, $result ) {
+ public function testCgiToArray( $cgi, $result ) {
$this->assertEquals( $result, wfCgiToArray( $cgi ) );
}
/**
* @dataProvider provideCgiRoundTrip
+ * @covers ::wfArrayToCgi
*/
- function testCgiRoundTrip( $cgi ) {
+ public function testCgiRoundTrip( $cgi ) {
$this->assertEquals( $cgi, wfArrayToCgi( wfCgiToArray( $cgi ) ) );
}
- function testMimeTypeMatch() {
+ /**
+ * @covers ::mimeTypeMatch
+ */
+ public function testMimeTypeMatch() {
$this->assertEquals(
'text/html',
mimeTypeMatch( 'text/html',
'image/svg+xml' => 0.5 ) ) );
}
- function testNegotiateType() {
+ /**
+ * @covers ::wfNegotiateType
+ */
+ public function testNegotiateType() {
$this->assertEquals(
'text/html',
wfNegotiateType(
array( 'application/xhtml+xml' => 1.0 ) ) );
}
- function testFallbackMbstringFunctions() {
-
- if ( !extension_loaded( 'mbstring' ) ) {
- $this->markTestSkipped( "The mb_string functions must be installed to test the fallback functions" );
- }
-
- $sampleUTF = "Östergötland_coat_of_arms.png";
-
- //mb_substr
- $substr_params = array(
- array( 0, 0 ),
- array( 5, -4 ),
- array( 33 ),
- array( 100, -5 ),
- array( -8, 10 ),
- array( 1, 1 ),
- array( 2, -1 )
- );
-
- foreach ( $substr_params as $param_set ) {
- $old_param_set = $param_set;
- array_unshift( $param_set, $sampleUTF );
-
- $this->assertEquals(
- call_user_func_array( 'mb_substr', $param_set ),
- call_user_func_array( 'Fallback::mb_substr', $param_set ),
- 'Fallback mb_substr with params ' . implode( ', ', $old_param_set )
- );
- }
-
- //mb_strlen
- $this->assertEquals(
- mb_strlen( $sampleUTF ),
- Fallback::mb_strlen( $sampleUTF ),
- 'Fallback mb_strlen'
- );
-
- //mb_str(r?)pos
- $strpos_params = array(
- //array( 'ter' ),
- //array( 'Ö' ),
- //array( 'Ö', 3 ),
- //array( 'oat_', 100 ),
- //array( 'c', -10 ),
- //Broken for now
- );
-
- foreach ( $strpos_params as $param_set ) {
- $old_param_set = $param_set;
- array_unshift( $param_set, $sampleUTF );
-
- $this->assertEquals(
- call_user_func_array( 'mb_strpos', $param_set ),
- call_user_func_array( 'Fallback::mb_strpos', $param_set ),
- 'Fallback mb_strpos with params ' . implode( ', ', $old_param_set )
- );
-
- $this->assertEquals(
- call_user_func_array( 'mb_strrpos', $param_set ),
- call_user_func_array( 'Fallback::mb_strrpos', $param_set ),
- 'Fallback mb_strrpos with params ' . implode( ', ', $old_param_set )
- );
- }
- }
-
-
- function testDebugFunctionTest() {
+ /**
+ * @covers ::wfDebug
+ * @covers ::wfDebugMem
+ */
+ public function testDebugFunctionTest() {
global $wgDebugLogFile, $wgDebugTimestamps;
$wgDebugTimestamps = $old_wgDebugTimestamps;
}
- function testClientAcceptsGzipTest() {
+ /**
+ * @covers ::wfClientAcceptsGzip
+ */
+ public function testClientAcceptsGzipTest() {
$settings = array(
'gzip' => true,
}
}
- function testSwapVarsTest() {
+ /**
+ * @covers ::swap
+ */
+ public function testSwapVarsTest() {
$var1 = 1;
$var2 = 2;
$this->assertEquals( $var2, 1, 'var2 is swapped' );
}
- function testWfPercentTest() {
+ /**
+ * @covers ::wfPercent
+ */
+ public function testWfPercentTest() {
$pcts = array(
array( 6 / 7, '0.86%', 2, false ),
/**
* test @see wfShorthandToInteger()
* @dataProvider provideShorthand
+ * @covers ::wfShorthandToInteger
*/
public function testWfShorthandToInteger( $shorthand, $expected ) {
$this->assertEquals( $expected,
*
* @dataProvider provideMerge()
* @group medium
+ * @covers ::wfMerge
*/
public function testMerge( $old, $mine, $yours, $expectedMergeResult, $expectedText ) {
$this->checkHasDiff3();
/**
* @dataProvider provideMakeUrlIndexes()
+ * @covers ::wfMakeUrlIndexes
*/
- function testMakeUrlIndexes( $url, $expected ) {
+ public function testMakeUrlIndexes( $url, $expected ) {
$index = wfMakeUrlIndexes( $url );
$this->assertEquals( $expected, $index, "wfMakeUrlIndexes(\"$url\")" );
}
/**
* @dataProvider provideWfMatchesDomainList
+ * @covers ::wfMatchesDomainList
*/
- function testWfMatchesDomainList( $url, $domains, $expected, $description ) {
+ public function testWfMatchesDomainList( $url, $domains, $expected, $description ) {
$actual = wfMatchesDomainList( $url, $domains );
$this->assertEquals( $expected, $actual, $description );
}
return $a;
}
- function testWfMkdirParents() {
+ /**
+ * @covers ::wfMkdirParents
+ */
+ public function testWfMkdirParents() {
// Should not return true if file exists instead of directory
$fname = $this->getNewTempFile();
wfSuppressWarnings();
/**
* @dataProvider provideWfShellMaintenanceCmdList
+ * @covers ::wfShellMaintenanceCmd
*/
- function testWfShellMaintenanceCmd( $script, $parameters, $options, $expected, $description ) {
+ public function testWfShellMaintenanceCmd( $script, $parameters, $options, $expected, $description ) {
if ( wfIsWindows() ) {
// Approximation that's good enough for our purposes just now
$expected = str_replace( "'", '"', $expected );
"Called eval.php --help --test with wrapper and php option" ),
);
}
- /* TODO: many more! */
+ /* @TODO many more! */
}
class GlobalWithDBTest extends MediaWikiTestCase {
/**
* @dataProvider provideWfIsBadImageList
+ * @covers ::wfIsBadImage
*/
- function testWfIsBadImage( $name, $title, $blacklist, $expected, $desc ) {
+ public function testWfIsBadImage( $name, $title, $blacklist, $expected, $desc ) {
$this->assertEquals( $expected, wfIsBadImage( $name, $title, $blacklist ), $desc );
}
<?php
/**
- * Tests for wfAssembleUrl()
+ * @covers ::wfAssembleUrl
*/
class WfAssembleUrlTest extends MediaWikiTestCase {
- /** @dataProvider provideURLParts */
+ /**
+ * @dataProvider provideURLParts
+ */
public function testWfAssembleUrl( $parts, $output ) {
$partsDump = print_r( $parts, true );
$this->assertEquals(
<?php
/**
- * Tests for wfBCP47()
+ * @covers ::wfBCP47
*/
class WfBCP47Test extends MediaWikiTestCase {
/**
* @see http://tools.ietf.org/html/bcp47
* @dataProvider provideLanguageCodes()
*/
- function testBCP47( $code, $expected ) {
+ public function testBCP47( $code, $expected ) {
$code = strtolower( $code );
$this->assertEquals( $expected, wfBCP47( $code ),
"Applying BCP47 standard to lower case '$code'"
<?php
/**
- * Tests for wfBaseConvert()
+ * @covers ::wfBaseConvert
*/
class WfBaseConvertTest extends MediaWikiTestCase {
public static function provideSingleDigitConversions() {
<?php
/**
- * Tests for wfBaseName()
+ * @covers ::wfBaseName
*/
class WfBaseNameTest extends MediaWikiTestCase {
/**
* @dataProvider providePaths
*/
- function testBaseName( $fullpath, $basename ) {
+ public function testBaseName( $fullpath, $basename ) {
$this->assertEquals( $basename, wfBaseName( $fullpath ),
"wfBaseName('$fullpath') => '$basename'" );
}
<?php
/**
- * Tests for wfExpandUrl()
+ * @covers ::wfExpandUrl
*/
class WfExpandUrlTest extends MediaWikiTestCase {
- /** @dataProvider provideExpandableUrls */
+ /**
+ * @dataProvider provideExpandableUrls
+ */
public function testWfExpandUrl( $fullUrl, $shortUrl, $defaultProto, $server, $canServer, $httpsMode, $message ) {
// Fake $wgServer and $wgCanonicalServer
$this->setMwGlobals( array(
<?php
+/**
+ * @covers ::wfGetCaller
+ */
class WfGetCallerTest extends MediaWikiTestCase {
- function testZero() {
+ public function testZero() {
$this->assertEquals( __METHOD__, wfGetCaller( 1 ) );
}
return wfGetCaller();
}
- function testOne() {
+ public function testOne() {
$this->assertEquals( 'WfGetCallerTest::testOne', self::callerOne() );
}
return wfGetCaller( $level );
}
- function testTwo() {
+ public function testTwo() {
$this->assertEquals( 'WfGetCallerTest::testTwo', self::intermediateFunction() );
}
- function testN() {
+ public function testN() {
$this->assertEquals( 'WfGetCallerTest::testN', self::intermediateFunction( 2, 0 ) );
$this->assertEquals( 'WfGetCallerTest::intermediateFunction', self::intermediateFunction( 1, 0 ) );
<?php
/**
- * Tests for wfParseUrl()
- *
* Copyright © 2013 Alexandre Emsenhuber
*
* This program is free software; you can redistribute it and/or modify
* @file
*/
+/**
+ * @covers ::wfParseUrl
+ */
class WfParseUrlTest extends MediaWikiTestCase {
protected function setUp() {
parent::setUp();
) );
}
- /** @dataProvider provideURLs */
+ /**
+ * @dataProvider provideURLs
+ */
public function testWfParseUrl( $url, $parts ) {
$partsDump = var_export( $parts, true );
$this->assertEquals(
<?php
/**
- * Tests for wfRemoveDotSegments()
+ *@covers ::wfRemoveDotSegments
*/
class WfRemoveDotSegmentsTest extends MediaWikiTestCase {
- /** @dataProvider providePaths */
+ /**
+ * @dataProvider providePaths
+ */
public function testWfRemoveDotSegments( $inputPath, $outputPath ) {
$this->assertEquals(
$outputPath,
<?php
+/**
+ * @covers ::wfShorthandToInteger
+ */
class WfShorthandToIntegerTest extends MediaWikiTestCase {
/**
* @dataProvider provideABunchOfShorthands
*/
- function testWfShorthandToInteger( $input, $output, $description ) {
+ public function testWfShorthandToInteger( $input, $output, $description ) {
$this->assertEquals(
wfShorthandToInteger( $input ),
$output,
<?php
/*
- * Tests for wfTimestamp()
+ * @covers ::wfTimestamp
*/
class WfTimestampTest extends MediaWikiTestCase {
/**
* @dataProvider provideNormalTimestamps
*/
- function testNormalTimestamps( $input, $format, $output, $desc ) {
+ public function testNormalTimestamps( $input, $format, $output, $desc ) {
$this->assertEquals( $output, wfTimestamp( $format, $input ), $desc );
}
* See r74778 and bug 25451
* @dataProvider provideOldTimestamps
*/
- function testOldTimestamps( $input, $format, $output, $desc ) {
+ public function testOldTimestamps( $input, $format, $output, $desc ) {
$this->assertEquals( $output, wfTimestamp( $format, $input ), $desc );
}
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1
* @dataProvider provideHttpDates
*/
- function testHttpDate( $input, $output, $desc ) {
+ public function testHttpDate( $input, $output, $desc ) {
$this->assertEquals( $output, wfTimestamp( TS_MW, $input ), $desc );
}
* There are a number of assumptions in our codebase where wfTimestamp()
* should give the current date but it is not given a 0 there. See r71751 CR
*/
- function testTimestampParameter() {
+ public function testTimestampParameter() {
$now = wfTimestamp( TS_UNIX );
// We check that wfTimestamp doesn't return false (error) and use a LessThan assert
// for the cases where the test is run in a second boundary.
<?php
/**
- * Tests for wfUrlencode()
- *
* The function only need a string parameter and might react to IIS7.0
+ * @covers ::wfUrlencode
*/
class WfUrlencodeTest extends MediaWikiTestCase {
#### TESTS ##############################################################
- /** @dataProvider provideURLS */
+ /**
+ * @dataProvider provideURLS
+ */
public function testEncodingUrlWith( $input, $expected ) {
$this->verifyEncodingFor( 'Apache', $input, $expected );
}
- /** @dataProvider provideURLS */
+ /**
+ * @dataProvider provideURLS
+ */
public function testEncodingUrlWithMicrosoftIis7( $input, $expected ) {
$this->verifyEncodingFor( 'Microsoft-IIS/7', $input, $expected );
}
<?php
/**
- * Unit tests for the HTMLCheckMatrix form field
+ * Unit tests for the HTMLCheckMatrix + HTMLFormField
+ * @todo the tests for the two classes could be split up
*/
class HtmlCheckMatrixTest extends MediaWikiTestCase {
static private $defaultOptions = array(
'fieldname' => 'test',
);
+ /**
+ * @covers HTMLCheckMatrix::__construct
+ */
public function testPlainInstantiation() {
try {
$form = new HTMLCheckMatrix( array() );
$this->fail( 'Expected MWException indicating missing parameters but none was thrown.' );
}
+ /**
+ * @covers HTMLCheckMatrix::__construct
+ */
public function testInstantiationWithMinimumRequiredParameters() {
$form = new HTMLCheckMatrix( self::$defaultOptions );
$this->assertTrue( true ); // form instantiation must throw exception on failure
}
+ /**
+ * @covers HTMLFormField::validate
+ */
public function testValidateCallsUserDefinedValidationCallback() {
$called = false;
$field = new HTMLCheckMatrix( self::$defaultOptions + array(
$this->assertTrue( $called );
}
+ /**
+ * @covers HTMLFormField::validate
+ */
public function testValidateRequiresArrayInput() {
$field = new HTMLCheckMatrix( self::$defaultOptions );
$this->assertEquals( false, $this->validate( $field, null ) );
$this->assertEquals( true, $this->validate( $field, array() ) );
}
+ /**
+ * @covers HTMLFormField::validate
+ */
public function testValidateAllowsOnlyKnownTags() {
$field = new HTMLCheckMatrix( self::$defaultOptions );
$this->assertInternalType( 'string', $this->validate( $field, array( 'foo' ) ) );
}
+ /**
+ * @covers HTMLFormField::validate
+ */
public function testValidateAcceptsPartialTagList() {
$field = new HTMLCheckMatrix( self::$defaultOptions );
$this->assertTrue( $this->validate( $field, array() ) );
* foreach ( $field->filterDataForSubmit( $data ) as $k => $v ) {
* $user->setOption( $k, $v );
* }
+ * @covers HTMLFormField::filterDataForSubmit
*/
public function testValuesForcedOnRemainOn() {
$field = new HTMLCheckMatrix( self::$defaultOptions + array(
$this->assertEquals( $expected, $field->filterDataForSubmit( array() ) );
}
+ /**
+ * @covers HTMLFormField::filterDataForSubmit
+ */
public function testValuesForcedOffRemainOff() {
$field = new HTMLCheckMatrix( self::$defaultOptions + array(
'force-options-off' => array( 'c1-r2', 'c2-r2' ),
* @group HashRing
*/
class HashRingTest extends MediaWikiTestCase {
- function testHashRing() {
+ /**
+ * @covers HashRing
+ */
+ public function testHashRing() {
$ring = new HashRing( array( 's1' => 1, 's2' => 1, 's3' => 2, 's4' => 2, 's5' => 2, 's6' => 3 ) );
$locations = array();
/**
* @dataProvider provideHooks
+ * @covers ::wfRunHooks
*/
public function testOldStyleHooks( $msg, array $hook, $expectedFoo, $expectedBar ) {
global $wgHooks;
/**
* @dataProvider provideHooks
+ * @covers Hooks::register
+ * @covers Hooks::run
*/
public function testNewStyleHooks( $msg, $hook, $expectedFoo, $expectedBar ) {
$foo = $bar = 'original';
$this->assertSame( $expectedBar, $bar, $msg );
}
+ /**
+ * @covers Hooks::isRegistered
+ * @covers Hooks::register
+ * @covers Hooks::getHandlers
+ * @covers Hooks::run
+ */
public function testNewStyleHookInteraction() {
global $wgHooks;
/**
* @expectedException MWException
+ * @covers Hooks::run
*/
public function testUncallableFunction() {
Hooks::register( 'MediaWikiHooksTest001', 'ThisFunctionDoesntExist' );
Hooks::run( 'MediaWikiHooksTest001', array() );
}
+ /**
+ * @covers Hooks::run
+ */
public function testFalseReturn() {
Hooks::register( 'MediaWikiHooksTest001', function ( &$foo ) {
return false;
/**
* @expectedException FatalError
+ * @covers Hooks::run
*/
public function testFatalError() {
Hooks::register( 'MediaWikiHooksTest001', function () {
class HtmlFormatterTest extends MediaWikiTestCase {
/**
* @dataProvider getHtmlData
+ * @covers HtmlFormatter::getText
*/
public function testTransform( $input, $expected, $callback = false ) {
$input = self::normalize( $input );
) );
}
+ /**
+ * @covers Html::element
+ */
public function testElementBasics() {
$this->assertEquals(
'<img>',
/**
* @dataProvider dataXmlMimeType
+ * @covers Html::isXmlMimeType
*/
public function testXmlMimeType( $mimetype, $isXmlMimeType ) {
$this->assertEquals( $isXmlMimeType, Html::isXmlMimeType( $mimetype ) );
}
+ /**
+ * @covers HTML::expandAttributes
+ */
public function testExpandAttributesSkipsNullAndFalse() {
### EMPTY ########
);
}
+ /**
+ * @covers HTML::expandAttributes
+ */
public function testExpandAttributesForBooleans() {
$this->assertEquals(
'',
/**
* Test for Html::expandAttributes()
* Please note it output a string prefixed with a space!
+ * @covers Html::expandAttributes
*/
public function testExpandAttributesVariousExpansions() {
### NOT EMPTY ####
* Html::expandAttributes has special features for HTML
* attributes that use space separated lists and also
* allows arrays to be used as values.
+ * @covers Html::expandAttributes
*/
public function testExpandAttributesListValueAttributes() {
### STRING VALUES
/**
* Test feature added by r96188, let pass attributes values as
* a PHP array. Restricted to class,rel, accesskey.
+ * @covers Html::expandAttributes
*/
- function testExpandAttributesSpaceSeparatedAttributesWithBoolean() {
+ public function testExpandAttributesSpaceSeparatedAttributesWithBoolean() {
$this->assertEquals(
' class="booltrue one"',
Html::expandAttributes( array( 'class' => array(
* The later will take precedence.
*
* Feature added by r96188
+ * @covers Html::expandAttributes
*/
- function testValueIsAuthoritativeInSpaceSeparatedAttributesArrays() {
+ public function testValueIsAuthoritativeInSpaceSeparatedAttributesArrays() {
$this->assertEquals(
' class=""',
Html::expandAttributes( array( 'class' => array(
);
}
- function testNamespaceSelector() {
+ /**
+ * @covers Html::namespaceSelector
+ */
+ public function testNamespaceSelector() {
$this->assertEquals(
'<select id=namespace name=namespace>' . "\n" .
'<option value=0>(Main)</option>' . "\n" .
);
}
- function testCanFilterOutNamespaces() {
+ public function testCanFilterOutNamespaces() {
$this->assertEquals(
'<select id=namespace name=namespace>' . "\n" .
'<option value=2>User</option>' . "\n" .
);
}
- function testCanDisableANamespaces() {
+ public function testCanDisableANamespaces() {
$this->assertEquals(
'<select id=namespace name=namespace>' . "\n" .
'<option disabled value=0>(Main)</option>' . "\n" .
/**
* @dataProvider provideHtml5InputTypes
+ * @covers Html::element
*/
- function testHtmlElementAcceptsNewHtml5TypesInHtml5Mode( $HTML5InputType ) {
+ public function testHtmlElementAcceptsNewHtml5TypesInHtml5Mode( $HTML5InputType ) {
$this->assertEquals(
'<input type=' . $HTML5InputType . '>',
Html::element( 'input', array( 'type' => $HTML5InputType ) ),
* @covers Html::dropDefaults
* @dataProvider provideElementsWithAttributesHavingDefaultValues
*/
- function testDropDefaults( $expected, $element, $attribs, $message = '' ) {
+ public function testDropDefaults( $expected, $element, $attribs, $message = '' ) {
$this->assertEquals( $expected, Html::element( $element, $attribs ), $message );
}
return $ret;
}
+ /**
+ * @covers Html::expandAttributes
+ */
public function testFormValidationBlacklist() {
$this->assertEmpty(
Html::expandAttributes( array( 'min' => 1, 'max' => 100, 'pattern' => 'abc', 'required' => true, 'step' => 2 ) ),
class HttpTest extends MediaWikiTestCase {
/**
* @dataProvider cookieDomains
+ * @covers Cookie::validateCookieDomain
*/
- function testValidateCookieDomain( $expected, $domain, $origin = null ) {
+ public function testValidateCookieDomain( $expected, $domain, $origin = null ) {
if ( $origin ) {
$ok = Cookie::validateCookieDomain( $domain, $origin );
$msg = "$domain against origin $origin";
* Test Http::isValidURI()
* @bug 27854 : Http::isValidURI is too lax
* @dataProvider provideURI
+ * @covers Http::isValidURI
*/
- function testIsValidUri( $expect, $URI, $message = '' ) {
+ public function testIsValidUri( $expect, $URI, $message = '' ) {
$this->assertEquals(
$expect,
(bool)Http::isValidURI( $URI ),
* rewritten when bug 29232 is taken care of (high-level handling of
* HTTP redirects).
*/
- function testRelativeRedirections() {
+ public function testRelativeRedirections() {
$h = MWHttpRequestTester::factory( 'http://oldsite/file.ext' );
# Forge a Location header
<?php
/**
- * Tests for IP validity functions. Ported from /t/inc/IP.t by avar.
+ * Tests for IP validity functions.
+ *
+ * Ported from /t/inc/IP.t by avar.
+ *
* @group IP
+ * @todo Test methods in this call should be split into a method and a
+ * dataprovider.
*/
class IPTest extends MediaWikiTestCase {
* representing the network mask and the bit mask.
* @covers IP::parseCIDR
*/
- function testCIDRParsing() {
+ public function testCIDRParsing() {
$this->assertFalseCIDR( '192.0.2.0', "missing mask" );
$this->assertFalseCIDR( '192.0.2.0/', "missing bitmask" );
* Test for IP::splitHostAndPort().
* @dataProvider provideSplitHostAndPort
*/
- function testSplitHostAndPort( $expected, $input, $description ) {
+ public function testSplitHostAndPort( $expected, $input, $description ) {
$this->assertEquals( $expected, IP::splitHostAndPort( $input ), $description );
}
* Test for IP::combineHostAndPort()
* @dataProvider provideCombineHostAndPort
*/
- function testCombineHostAndPort( $expected, $input, $description ) {
+ public function testCombineHostAndPort( $expected, $input, $description ) {
list( $host, $port, $defaultPort ) = $input;
$this->assertEquals(
$expected,
* Test for IP::sanitizeRange()
* @dataProvider provideIPCIDRs
*/
- function testSanitizeRange( $input, $expected, $description ) {
+ public function testSanitizeRange( $input, $expected, $description ) {
$this->assertEquals( $expected, IP::sanitizeRange( $input ), $description );
}
* Test for IP::prettifyIP()
* @dataProvider provideIPsToPrettify
*/
- function testPrettifyIP( $ip, $prettified ) {
+ public function testPrettifyIP( $ip, $prettified ) {
$this->assertEquals( $prettified, IP::prettifyIP( $ip ), "Prettify of $ip" );
}
<?php
class LanguageConverterTest extends MediaWikiLangTestCase {
+ /** @var LanguageToTest */
protected $lang = null;
+ /** @var TestConverter */
protected $lc = null;
protected function setUp() {
parent::tearDown();
}
- function testGetPreferredVariantDefaults() {
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ */
+ public function testGetPreferredVariantDefaults() {
$this->assertEquals( 'tg', $this->lc->getPreferredVariant() );
}
- function testGetPreferredVariantHeaders() {
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ * @covers LanguageConverter::getHeaderVariant
+ */
+ public function testGetPreferredVariantHeaders() {
global $wgRequest;
$wgRequest->setHeader( 'Accept-Language', 'tg-latn' );
$this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
}
- function testGetPreferredVariantHeaderWeight() {
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ * @covers LanguageConverter::getHeaderVariant
+ */
+ public function testGetPreferredVariantHeaderWeight() {
global $wgRequest;
$wgRequest->setHeader( 'Accept-Language', 'tg;q=1' );
$this->assertEquals( 'tg', $this->lc->getPreferredVariant() );
}
- function testGetPreferredVariantHeaderWeight2() {
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ * @covers LanguageConverter::getHeaderVariant
+ */
+ public function testGetPreferredVariantHeaderWeight2() {
global $wgRequest;
$wgRequest->setHeader( 'Accept-Language', 'tg-latn;q=1' );
$this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
}
- function testGetPreferredVariantHeaderMulti() {
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ * @covers LanguageConverter::getHeaderVariant
+ */
+ public function testGetPreferredVariantHeaderMulti() {
global $wgRequest;
$wgRequest->setHeader( 'Accept-Language', 'en, tg-latn;q=1' );
$this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
}
- function testGetPreferredVariantUserOption() {
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ */
+ public function testGetPreferredVariantUserOption() {
global $wgUser;
$wgUser = new User;
$this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
}
- function testGetPreferredVariantUserOptionForForeignLanguage() {
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ * @covers LanguageConverter::getUserVariant
+ */
+ public function testGetPreferredVariantUserOptionForForeignLanguage() {
global $wgContLang, $wgUser;
$wgContLang = Language::factory( 'en' );
$this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
}
- function testGetPreferredVariantHeaderUserVsUrl() {
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ * @covers LanguageConverter::getUserVariant
+ * @covers LanguageConverter::getURLVariant
+ */
+ public function testGetPreferredVariantHeaderUserVsUrl() {
global $wgContLang, $wgRequest, $wgUser;
$wgContLang = Language::factory( 'tg-latn' );
$this->assertEquals( 'tg', $this->lc->getPreferredVariant() );
}
-
- function testGetPreferredVariantDefaultLanguageVariant() {
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ */
+ public function testGetPreferredVariantDefaultLanguageVariant() {
global $wgDefaultLanguageVariant;
$wgDefaultLanguageVariant = 'tg-latn';
$this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
}
- function testGetPreferredVariantDefaultLanguageVsUrlVariant() {
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ * @covers LanguageConverter::getURLVariant
+ */
+ public function testGetPreferredVariantDefaultLanguageVsUrlVariant() {
global $wgDefaultLanguageVariant, $wgRequest, $wgContLang;
$wgContLang = Language::factory( 'tg-latn' );
<?php
+/**
+ * @covers Licenses
+ */
class LicensesTest extends MediaWikiTestCase {
- function testLicenses() {
+ public function testLicenses() {
$str = "
* Free licenses:
** GFDL|Debian disagrees
* @dataProvider provideCasesForUserLink
* @covers Linker::userLink
*/
- function testUserLink( $expected, $userId, $userName, $altUserName = false, $msg = '' ) {
+ public function testUserLink( $expected, $userId, $userName, $altUserName = false, $msg = '' ) {
$this->setMwGlobals( array(
'wgArticlePath' => '/wiki/$1',
'wgWellFormedXml' => true,
return array( $t, $po );
}
+ /**
+ * @covers LinksUpdate::addLink
+ */
public function testUpdate_pagelinks() {
list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
), $update->getRemovedLinks() );
}
+ /**
+ * @covers LinksUpdate::addExternalLink
+ */
public function testUpdate_externallinks() {
list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
) );
}
+ /**
+ * @covers LinksUpdate::addCategory
+ */
public function testUpdate_categorylinks() {
$this->setMwGlobals( 'wgCategoryCollation', 'uppercase' );
) );
}
+ /**
+ * @covers LinksUpdate::addInterwikiLink
+ */
public function testUpdate_iwlinks() {
list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
) );
}
+ /**
+ * @covers LinksUpdate::addTemplate
+ */
public function testUpdate_templatelinks() {
list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
) );
}
+ /**
+ * @covers LinksUpdate::addImage
+ */
public function testUpdate_imagelinks() {
list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
) );
}
+ /**
+ * @covers LinksUpdate::addLanguageLink
+ */
public function testUpdate_langlinks() {
list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
) );
}
+ /**
+ * @covers LinksUpdate::setProperty
+ */
public function testUpdate_page_props() {
list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
/**
* These tests should work regardless of $wgCapitalLinks
* @group Database
+ * @todo Split tests into providers and test methods
*/
class LocalFileTest extends MediaWikiTestCase {
$this->file_lc = $this->repo_lc->newFile( 'test!' );
}
- function testGetHashPath() {
+ /**
+ * @covers File::getHashPath
+ */
+ public function testGetHashPath() {
$this->assertEquals( '', $this->file_hl0->getHashPath() );
$this->assertEquals( 'a/a2/', $this->file_hl2->getHashPath() );
$this->assertEquals( 'c/c4/', $this->file_lc->getHashPath() );
}
- function testGetRel() {
+ /**
+ * @covers File::getRel
+ */
+ public function testGetRel() {
$this->assertEquals( 'Test!', $this->file_hl0->getRel() );
$this->assertEquals( 'a/a2/Test!', $this->file_hl2->getRel() );
$this->assertEquals( 'c/c4/test!', $this->file_lc->getRel() );
}
- function testGetUrlRel() {
+ /**
+ * @covers File::getUrlRel
+ */
+ public function testGetUrlRel() {
$this->assertEquals( 'Test%21', $this->file_hl0->getUrlRel() );
$this->assertEquals( 'a/a2/Test%21', $this->file_hl2->getUrlRel() );
$this->assertEquals( 'c/c4/test%21', $this->file_lc->getUrlRel() );
}
- function testGetArchivePath() {
+ /**
+ * @covers File::getArchivePath
+ */
+ public function testGetArchivePath() {
$this->assertEquals( 'mwstore://local-backend/test-public/archive', $this->file_hl0->getArchivePath() );
$this->assertEquals( 'mwstore://local-backend/test-public/archive/a/a2', $this->file_hl2->getArchivePath() );
$this->assertEquals( 'mwstore://local-backend/test-public/archive/!', $this->file_hl0->getArchivePath( '!' ) );
$this->assertEquals( 'mwstore://local-backend/test-public/archive/a/a2/!', $this->file_hl2->getArchivePath( '!' ) );
}
- function testGetThumbPath() {
+ /**
+ * @covers File::getThumbPath
+ */
+ public function testGetThumbPath() {
$this->assertEquals( 'mwstore://local-backend/test-thumb/Test!', $this->file_hl0->getThumbPath() );
$this->assertEquals( 'mwstore://local-backend/test-thumb/a/a2/Test!', $this->file_hl2->getThumbPath() );
$this->assertEquals( 'mwstore://local-backend/test-thumb/Test!/x', $this->file_hl0->getThumbPath( 'x' ) );
$this->assertEquals( 'mwstore://local-backend/test-thumb/a/a2/Test!/x', $this->file_hl2->getThumbPath( 'x' ) );
}
- function testGetArchiveUrl() {
+ /**
+ * @covers File::getArchiveUrl
+ */
+ public function testGetArchiveUrl() {
$this->assertEquals( '/testurl/archive', $this->file_hl0->getArchiveUrl() );
$this->assertEquals( '/testurl/archive/a/a2', $this->file_hl2->getArchiveUrl() );
$this->assertEquals( '/testurl/archive/%21', $this->file_hl0->getArchiveUrl( '!' ) );
$this->assertEquals( '/testurl/archive/a/a2/%21', $this->file_hl2->getArchiveUrl( '!' ) );
}
- function testGetThumbUrl() {
+ /**
+ * @covers File::getThumbUrl
+ */
+ public function testGetThumbUrl() {
$this->assertEquals( '/testurl/thumb/Test%21', $this->file_hl0->getThumbUrl() );
$this->assertEquals( '/testurl/thumb/a/a2/Test%21', $this->file_hl2->getThumbUrl() );
$this->assertEquals( '/testurl/thumb/Test%21/x', $this->file_hl0->getThumbUrl( 'x' ) );
$this->assertEquals( '/testurl/thumb/a/a2/Test%21/x', $this->file_hl2->getThumbUrl( 'x' ) );
}
- function testGetArchiveVirtualUrl() {
+ /**
+ * @covers File::getArchiveVirtualUrl
+ */
+ public function testGetArchiveVirtualUrl() {
$this->assertEquals( 'mwrepo://test/public/archive', $this->file_hl0->getArchiveVirtualUrl() );
$this->assertEquals( 'mwrepo://test/public/archive/a/a2', $this->file_hl2->getArchiveVirtualUrl() );
$this->assertEquals( 'mwrepo://test/public/archive/%21', $this->file_hl0->getArchiveVirtualUrl( '!' ) );
$this->assertEquals( 'mwrepo://test/public/archive/a/a2/%21', $this->file_hl2->getArchiveVirtualUrl( '!' ) );
}
- function testGetThumbVirtualUrl() {
+ /**
+ * @covers File::getThumbVirtualUrl
+ */
+ public function testGetThumbVirtualUrl() {
$this->assertEquals( 'mwrepo://test/thumb/Test%21', $this->file_hl0->getThumbVirtualUrl() );
$this->assertEquals( 'mwrepo://test/thumb/a/a2/Test%21', $this->file_hl2->getThumbVirtualUrl() );
$this->assertEquals( 'mwrepo://test/thumb/Test%21/%21', $this->file_hl0->getThumbVirtualUrl( '!' ) );
$this->assertEquals( 'mwrepo://test/thumb/a/a2/Test%21/%21', $this->file_hl2->getThumbVirtualUrl( '!' ) );
}
- function testGetUrl() {
+ /**
+ * @covers File::getUrl
+ */
+ public function testGetUrl() {
$this->assertEquals( '/testurl/Test%21', $this->file_hl0->getUrl() );
$this->assertEquals( '/testurl/a/a2/Test%21', $this->file_hl2->getUrl() );
}
- function testWfLocalFile() {
+ /**
+ * @covers ::wfLocalFile
+ */
+ public function testWfLocalFile() {
$file = wfLocalFile( "File:Some_file_that_probably_doesn't exist.png" );
$this->assertThat( $file, $this->isInstanceOf( 'LocalFile' ), 'wfLocalFile() returns LocalFile for valid Titles' );
}
<?php
+/**
+ * @covers LocalisationCache
+ */
class LocalisationCacheTest extends MediaWikiTestCase {
public function testPuralRulesFallback() {
$cache = Language::getLocalisationCache();
<?php
+/**
+ * @covers MWFunction
+ */
class MWFunctionTest extends MediaWikiTestCase {
- function testNewObjFunction() {
+ public function testNewObjFunction() {
$arg1 = 'Foo';
$arg2 = 'Bar';
$arg3 = array( 'Baz' );
/**
* Test class for MWNamespace.
* Generated by PHPUnit on 2011-02-20 at 21:01:55.
+ * @todo covers tags
+ * @FIXME this test file is a mess
*
*/
class MWNamespaceTest extends MediaWikiTestCase {
/**
* @todo Write more texts, handle $wgAllowImageMoving setting
+ * @covers MWNamespace::isMovable
*/
public function testIsMovable() {
$this->assertFalse( MWNamespace::isMovable( NS_CATEGORY ) );
/**
* Please make sure to change testIsTalk() if you change the assertions below
+ * @covers MWNamespace::isSubject
*/
public function testIsSubject() {
// Special namespaces
/**
* Reverse of testIsSubject().
* Please update testIsSubject() if you change assertions below
+ * @covers MWNamespace::isTalk
*/
public function testIsTalk() {
// Special namespaces
}
/**
+ * @covers MWNamespace::getSubject
*/
public function testGetSubject() {
// Special namespaces are their own subjects
* Regular getTalk() calls
* Namespaces without a talk page (NS_MEDIA, NS_SPECIAL) are tested in
* the function testGetTalkExceptions()
+ * @covers MWNamespace::getTalk
*/
public function testGetTalk() {
$this->assertEquals( NS_TALK, MWNamespace::getTalk( NS_MAIN ) );
* Exceptions with getTalk()
* NS_MEDIA does not have talk pages. MediaWiki raise an exception for them.
* @expectedException MWException
+ * @covers MWNamespace::getTalk
*/
public function testGetTalkExceptionsForNsMedia() {
$this->assertNull( MWNamespace::getTalk( NS_MEDIA ) );
* Exceptions with getTalk()
* NS_SPECIAL does not have talk pages. MediaWiki raise an exception for them.
* @expectedException MWException
+ * @covers MWNamespace::getTalk
*/
public function testGetTalkExceptionsForNsSpecial() {
$this->assertNull( MWNamespace::getTalk( NS_SPECIAL ) );
* Regular getAssociated() calls
* Namespaces without an associated page (NS_MEDIA, NS_SPECIAL) are tested in
* the function testGetAssociatedExceptions()
+ * @covers MWNamespace::getAssociated
*/
public function testGetAssociated() {
$this->assertEquals( NS_TALK, MWNamespace::getAssociated( NS_MAIN ) );
### an exception for them.
/**
* @expectedException MWException
+ * @covers MWNamespace::getAssociated
*/
public function testGetAssociatedExceptionsForNsMedia() {
$this->assertNull( MWNamespace::getAssociated( NS_MEDIA ) );
/**
* @expectedException MWException
+ * @covers MWNamespace::getAssociated
*/
public function testGetAssociatedExceptionsForNsSpecial() {
$this->assertNull( MWNamespace::getAssociated( NS_SPECIAL ) );
* Note if we add a namespace registration system with keys like 'MAIN'
* we should add tests here for equivilance on things like 'MAIN' == 0
* and 'MAIN' == NS_MAIN.
+ * @covers MWNamespace::equals
*/
public function testEquals() {
$this->assertTrue( MWNamespace::equals( NS_MAIN, NS_MAIN ) );
}
/**
- * Test MWNamespace::subjectEquals
+ * @covers MWNamespace::subjectEquals
*/
public function testSubjectEquals() {
$this->assertSameSubject( NS_MAIN, NS_MAIN );
$this->assertDifferentSubject( NS_SPECIAL, NS_MAIN );
}
+ /**
+ * @covers MWNamespace::subjectEquals
+ */
public function testSpecialAndMediaAreDifferentSubjects() {
$this->assertDifferentSubject(
NS_MEDIA, NS_SPECIAL,
*/
/**
+ * @covers MWNamespace::canTalk
*/
public function testCanTalk() {
$this->assertCanNotTalk( NS_MEDIA );
}
/**
+ * @covers MWNamespace::isContent
*/
public function testIsContent() {
// NS_MAIN is a content namespace per DefaultSettings.php
/**
* Similar to testIsContent() but alters the $wgContentNamespaces
* global variable.
+ * @covers MWNamespace::isContent
*/
public function testIsContentAdvanced() {
global $wgContentNamespaces;
$this->assertIsContent( NS_MAIN );
}
+ /**
+ * @covers MWNamespace::isWatchable
+ */
public function testIsWatchable() {
// Specials namespaces are not watchable
$this->assertIsNotWatchable( NS_MEDIA );
$this->assertIsWatchable( 101 );
}
+ /**
+ * @covers MWNamespace::hasSubpages
+ */
public function testHasSubpages() {
global $wgNamespacesWithSubpages;
}
/**
+ * @covers MWNamespace::getContentNamespaces
*/
public function testGetContentNamespaces() {
global $wgContentNamespaces;
}
/**
+ * @covers MWNamespace::getSubjectNamespaces
*/
public function testGetSubjectNamespaces() {
$subjectsNS = MWNamespace::getSubjectNamespaces();
}
/**
+ * @covers MWNamespace::getTalkNamespaces
*/
public function testGetTalkNamespaces() {
$talkNS = MWNamespace::getTalkNamespaces();
/**
* Some namespaces are always capitalized per code definition
* in MWNamespace::$alwaysCapitalizedNamespaces
+ * @covers MWNamespace::isCapitalized
*/
public function testIsCapitalizedHardcodedAssertions() {
// NS_MEDIA and NS_FILE are treated the same
*
* Global setting correctness is tested against the NS_PROJECT and
* NS_PROJECT_TALK namespaces since they are not hardcoded nor specials
+ * @covers MWNamespace::isCapitalized
*/
public function testIsCapitalizedWithWgCapitalLinks() {
global $wgCapitalLinks;
* testing the $wgCapitalLinkOverrides global.
*
* @todo split groups of assertions in autonomous testing functions
+ * @covers MWNamespace::isCapitalized
*/
public function testIsCapitalizedWithWgCapitalLinkOverrides() {
global $wgCapitalLinkOverrides;
$this->assertIsCapitalized( NS_PROJECT );
}
+ /**
+ * @covers MWNamespace::hasGenderDistinction
+ */
public function testHasGenderDistinction() {
// Namespaces with gender distinctions
$this->assertTrue( MWNamespace::hasGenderDistinction( NS_USER ) );
$this->assertFalse( MWNamespace::hasGenderDistinction( NS_TALK ) );
}
+ /**
+ * @covers MWNamespace::isNonincludable
+ */
public function testIsNonincludable() {
global $wgNonincludableNamespaces;
) );
}
- function testExists() {
+ /**
+ * @covers Message::exists
+ */
+ public function testExists() {
$this->assertTrue( wfMessage( 'mainpage' )->exists() );
$this->assertTrue( wfMessage( 'mainpage' )->params( array() )->exists() );
$this->assertTrue( wfMessage( 'mainpage' )->rawParams( 'foo', 123 )->exists() );
$this->assertFalse( wfMessage( 'i-dont-exist-evar' )->rawParams( 'foo', 123 )->exists() );
}
- function testKey() {
+ /**
+ * @covers Message::__construct
+ */
+ public function testKey() {
$this->assertInstanceOf( 'Message', wfMessage( 'mainpage' ) );
$this->assertInstanceOf( 'Message', wfMessage( 'i-dont-exist-evar' ) );
$this->assertEquals( 'Main Page', wfMessage( 'mainpage' )->text() );
$this->assertEquals( '<i-dont-exist-evar>', wfMessage( 'i-dont-exist-evar' )->escaped() );
}
- function testInLanguage() {
+ /**
+ * @covers Message::inLanguage
+ */
+ public function testInLanguage() {
$this->assertEquals( 'Main Page', wfMessage( 'mainpage' )->inLanguage( 'en' )->text() );
$this->assertEquals( 'Заглавная страница', wfMessage( 'mainpage' )->inLanguage( 'ru' )->text() );
$this->assertEquals( 'Main Page', wfMessage( 'mainpage' )->inLanguage( Language::factory( 'en' ) )->text() );
$this->assertEquals( 'Заглавная страница', wfMessage( 'mainpage' )->inLanguage( Language::factory( 'ru' ) )->text() );
}
- function testMessageParams() {
+ /**
+ * @covers Message::__construct
+ */
+ public function testMessageParams() {
$this->assertEquals( 'Return to $1.', wfMessage( 'returnto' )->text() );
$this->assertEquals( 'Return to $1.', wfMessage( 'returnto', array() )->text() );
$this->assertEquals( 'You have foo (bar).', wfMessage( 'youhavenewmessages', 'foo', 'bar' )->text() );
$this->assertEquals( 'You have foo (bar).', wfMessage( 'youhavenewmessages', array( 'foo', 'bar' ) )->text() );
}
- function testMessageParamSubstitution() {
+ /**
+ * @covers Message::__construct
+ * @covers Message::rawParams
+ */
+ public function testMessageParamSubstitution() {
$this->assertEquals( '(Заглавная страница)', wfMessage( 'parentheses', 'Заглавная страница' )->plain() );
$this->assertEquals( '(Заглавная страница $1)', wfMessage( 'parentheses', 'Заглавная страница $1' )->plain() );
$this->assertEquals( '(Заглавная страница)', wfMessage( 'parentheses' )->rawParams( 'Заглавная страница' )->plain() );
$this->assertEquals( '(Заглавная страница $1)', wfMessage( 'parentheses' )->rawParams( 'Заглавная страница $1' )->plain() );
}
- function testDeliciouslyManyParams() {
+ /**
+ * @covers Message::__construct
+ * @covers Message::params
+ */
+ public function testDeliciouslyManyParams() {
$msg = new RawMessage( '$1$2$3$4$5$6$7$8$9$10$11$12' );
// One less than above has placeholders
$params = array( 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k' );
/**
* FIXME: This should not need database, but Language#formatExpiry does (bug 55912)
* @group Database
+ * @todo this should be split up into multiple test methods
+ * @covers Message::numParams
+ * @covers Message::durationParams
+ * @covers Message::expiryParams
+ * @covers Message::timeperiodParams
+ * @covers Message::sizeParams
+ * @covers Message::bitrateParams
*/
- function testMessageParamTypes() {
+ public function testMessageParamTypes() {
$lang = Language::factory( 'en' );
$msg = new RawMessage( '$1' );
);
}
- function testInContentLanguageDisabled() {
+ /**
+ * @covers Message::inContentLanguage
+ */
+ public function testInContentLanguageDisabled() {
$this->setMwGlobals( 'wgLang', Language::factory( 'fr' ) );
$this->assertEquals( 'Main Page', wfMessage( 'mainpage' )->inContentLanguage()->plain(), 'ForceUIMsg disabled' );
}
- function testInContentLanguageEnabled() {
+ /**
+ * @covers Message::inContentLanguage
+ */
+ public function testInContentLanguageEnabled() {
$this->setMwGlobals( array(
'wgLang' => Language::factory( 'fr' ),
'wgForceUIMsgAsContentMsg' => array( 'mainpage' ),
/**
* @expectedException MWException
+ * @covers Message::inLanguage
*/
- function testInLanguageThrows() {
+ public function testInLanguageThrows() {
wfMessage( 'foo' )->inLanguage( 123 );
}
}
*
* @group Output
*
+ * @todo factor tests in this class into providers and test methods
+ *
*/
class OutputPageTest extends MediaWikiTestCase {
const SCREEN_MEDIA_QUERY = 'screen and (min-width: 982px)';
/**
* Tests print requests
+ * @covers OutputPage::transformCssMedia
*/
public function testPrintRequests() {
$this->assertTransformCssMediaCase( array(
/**
* Tests screen requests, without either query parameter set
+ * @covers OutputPage::transformCssMedia
*/
public function testScreenRequests() {
$this->assertTransformCssMediaCase( array(
/**
* Tests handheld behavior
+ * @covers OutputPage::transformCssMedia
*/
public function testHandheld() {
$this->assertTransformCssMediaCase( array(
<?php
+
/**
- * Tests for the PathRouter parsing
+ * Tests for the PathRouter parsing.
+ *
+ * @covers PathRouter
*/
-
class PathRouterTest extends MediaWikiTestCase {
+ /**
+ * @var PathRouter
+ */
+ protected $basicRouter;
+
protected function setUp() {
parent::setUp();
$router = new PathRouter;
* @group Database
*/
class PreferencesTest extends MediaWikiTestCase {
- /** Array of User objects */
+ /**
+ * @var User[]
+ */
private $prefUsers;
+ /**
+ * @var RequestContext
+ */
private $context;
- function __construct() {
+ public function __construct() {
parent::__construct();
$this->prefUsers['noemail'] = new User;
* Placeholder to verify bug 34302
* @covers Preferences::profilePreferences
*/
- function testEmailFieldsWhenUserHasNoEmail() {
+ public function testEmailFieldsWhenUserHasNoEmail() {
$prefs = $this->prefsFor( 'noemail' );
$this->assertArrayHasKey( 'cssclass',
$prefs['emailaddress']
* Placeholder to verify bug 34302
* @covers Preferences::profilePreferences
*/
- function testEmailFieldsWhenUserEmailNotAuthenticated() {
+ public function testEmailFieldsWhenUserEmailNotAuthenticated() {
$prefs = $this->prefsFor( 'notauth' );
$this->assertArrayHasKey( 'cssclass',
$prefs['emailaddress']
* Placeholder to verify bug 34302
* @covers Preferences::profilePreferences
*/
- function testEmailFieldsWhenUserEmailIsAuthenticated() {
+ public function testEmailFieldsWhenUserEmailIsAuthenticated() {
$prefs = $this->prefsFor( 'auth' );
$this->assertArrayHasKey( 'cssclass',
$prefs['emailaddress']
}
/** Helper */
- function prefsFor( $user_key ) {
+ protected function prefsFor( $user_key ) {
$preferences = array();
Preferences::profilePreferences(
$this->prefUsers[$user_key]
+++ /dev/null
-<?php
-/**
- * Generic providers for the MediaWiki PHPUnit test suite
- *
- * @author Antoine Musso
- * @copyright Copyright © 2011, Antoine Musso
- * @file
- */
-
-/** */
-class MediaWikiProvide {
-
- /* provide an array of numbers from 1 up to @param $num */
- private static function createProviderUpTo( $num ) {
- $ret = array();
- for ( $i = 1; $i <= $num; $i++ ) {
- $ret[] = array( $i );
- }
-
- return $ret;
- }
-
- /* array of months numbers (as an integer) */
- public static function Months() {
- return self::createProviderUpTo( 12 );
- }
-
- /* array of days numbers (as an integer) */
- public static function Days() {
- return self::createProviderUpTo( 31 );
- }
-
- public static function DaysMonths() {
- $ret = array();
-
- $months = self::Months();
- $days = self::Days();
- foreach ( $months as $month ) {
- foreach ( $days as $day ) {
- $ret[] = array( $day[0], $month[0] );
- }
- }
-
- return $ret;
- }
-}
protected $user_comment;
protected $context;
- function __construct() {
+ public function __construct() {
parent::__construct();
$this->title = Title::newFromText( 'SomeTitle' );
/**
* @covers LogFormatter::getIRCActionText
*/
- function testIrcMsgForLogTypeBlock() {
+ public function testIrcMsgForLogTypeBlock() {
$sep = $this->context->msg( 'colon-separator' )->text();
# block/block
/**
* @covers LogFormatter::getIRCActionText
*/
- function testIrcMsgForLogTypeDelete() {
+ public function testIrcMsgForLogTypeDelete() {
$sep = $this->context->msg( 'colon-separator' )->text();
# delete/delete
/**
* @covers LogFormatter::getIRCActionText
*/
- function testIrcMsgForLogTypeNewusers() {
+ public function testIrcMsgForLogTypeNewusers() {
$this->assertIRCComment(
'New user account',
'newusers', 'newusers',
/**
* @covers LogFormatter::getIRCActionText
*/
- function testIrcMsgForLogTypeMove() {
+ public function testIrcMsgForLogTypeMove() {
$move_params = array(
'4::target' => $this->target->getPrefixedText(),
'5::noredir' => 0,
/**
* @covers LogFormatter::getIRCActionText
*/
- function testIrcMsgForLogTypePatrol() {
+ public function testIrcMsgForLogTypePatrol() {
# patrol/patrol
$this->assertIRCComment(
$this->context->msg( 'patrol-log-line', 'revision 777', '[[SomeTitle]]', '' )->plain(),
/**
* @covers LogFormatter::getIRCActionText
*/
- function testIrcMsgForLogTypeProtect() {
+ public function testIrcMsgForLogTypeProtect() {
$protectParams = array(
'[edit=sysop] (indefinite) [move=sysop] (indefinite)'
);
/**
* @covers LogFormatter::getIRCActionText
*/
- function testIrcMsgForLogTypeUpload() {
+ public function testIrcMsgForLogTypeUpload() {
$sep = $this->context->msg( 'colon-separator' )->text();
# upload/upload
* --
*/
/*
- function testIrcMsgForBlankingAES() {
+ public function testIrcMsgForBlankingAES() {
// $this->context->msg( 'autosumm-blank', .. );
}
- function testIrcMsgForReplaceAES() {
+ public function testIrcMsgForReplaceAES() {
// $this->context->msg( 'autosumm-replace', .. );
}
- function testIrcMsgForRollbackAES() {
+ public function testIrcMsgForRollbackAES() {
// $this->context->msg( 'revertpage', .. );
}
- function testIrcMsgForUndoAES() {
+ public function testIrcMsgForUndoAES() {
// $this->context->msg( 'undo-summary', .. );
}
*/
* @param $expected String Expected IRC text without colors codes
* @param $type String Log type (move, delete, suppress, patrol ...)
* @param $action String A log type action
+ * @param $params
* @param $comment String (optional) A comment for the log action
* @param $msg String (optional) A message for PHPUnit :-)
*/
- function assertIRCComment( $expected, $type, $action, $params, $comment = null, $msg = '' ) {
+ protected function assertIRCComment( $expected, $type, $action, $params, $comment = null, $msg = '' ) {
$logEntry = new ManualLogEntry( $type, $action );
$logEntry->setPerformer( $this->user );
/**
* Test the relationship between title and wikipage in RequestContext
+ * @covers RequestContext::getWikiPage
+ * @covers RequestContext::getTitle
*/
public function testWikiPageTitle() {
$context = new RequestContext();
"When a title is updated the WikiPage should be purged and recreated on-demand with the new title." );
}
+ /**
+ * @covers RequestContext::importScopedSession
+ */
public function testImportScopedSession() {
$context = RequestContext::getMain();
/**
* @dataProvider providePackedModules
+ * @covers ResourceLoader::makePackedModulesString
*/
public function testMakePackedModulesString( $desc, $modules, $packed ) {
$this->assertEquals( $packed, ResourceLoader::makePackedModulesString( $modules ), $desc );
/**
* @dataProvider providePackedModules
+ * @covers ResourceLoaderContext::expandModuleNames
*/
public function testexpandModuleNames( $desc, $modules, $packed ) {
$this->assertEquals( $modules, ResourceLoaderContext::expandModuleNames( $packed ), $desc );
'iwlinks' ) );
}
- public function setUp() {
+ protected function setUp() {
global $wgExtraNamespaces, $wgNamespaceContentModels, $wgContentHandlers, $wgContLang;
parent::setUp();
* @dataProvider provideUserWasLastToEdit
*/
public function testUserWasLastToEdit( $sinceIdx, $expectedLast ) {
- $userA = \User::newFromName( "RevisionStorageTest_userA" );
- $userB = \User::newFromName( "RevisionStorageTest_userB" );
+ $userA = User::newFromName( "RevisionStorageTest_userA" );
+ $userB = User::newFromName( "RevisionStorageTest_userB" );
if ( $userA->getId() === 0 ) {
- $userA = \User::createNew( $userA->getName() );
+ $userA = User::createNew( $userA->getName() );
}
if ( $userB->getId() === 0 ) {
- $userB = \User::createNew( $userB->getName() );
+ $userB = User::createNew( $userB->getName() );
}
$ns = $this->getDefaultWikitextNS();
*/
class RevisionTest_ContentHandlerUseDB extends RevisionStorageTest {
- function setUp() {
+ protected function setUp() {
$this->setMwGlobals( 'wgContentHandlerUseDB', false );
$dbw = wfGetDB( DB_MASTER );
parent::tearDown();
}
- function testGetRevisionText() {
+ /**
+ * @covers Revision::getRevisionText
+ */
+ public function testGetRevisionText() {
$row = new stdClass;
$row->old_flags = '';
$row->old_text = 'This is a bunch of revision text.';
Revision::getRevisionText( $row ) );
}
- function testGetRevisionTextGzip() {
+ /**
+ * @covers Revision::getRevisionText
+ */
+ public function testGetRevisionTextGzip() {
$this->checkPHPExtension( 'zlib' );
$row = new stdClass;
Revision::getRevisionText( $row ) );
}
- function testGetRevisionTextUtf8Native() {
+ /**
+ * @covers Revision::getRevisionText
+ */
+ public function testGetRevisionTextUtf8Native() {
$row = new stdClass;
$row->old_flags = 'utf-8';
$row->old_text = "Wiki est l'\xc3\xa9cole superieur !";
Revision::getRevisionText( $row ) );
}
- function testGetRevisionTextUtf8Legacy() {
+ /**
+ * @covers Revision::getRevisionText
+ */
+ public function testGetRevisionTextUtf8Legacy() {
$row = new stdClass;
$row->old_flags = '';
$row->old_text = "Wiki est l'\xe9cole superieur !";
Revision::getRevisionText( $row ) );
}
- function testGetRevisionTextUtf8NativeGzip() {
+ /**
+ * @covers Revision::getRevisionText
+ */
+ public function testGetRevisionTextUtf8NativeGzip() {
$this->checkPHPExtension( 'zlib' );
$row = new stdClass;
Revision::getRevisionText( $row ) );
}
- function testGetRevisionTextUtf8LegacyGzip() {
+ /**
+ * @covers Revision::getRevisionText
+ */
+ public function testGetRevisionTextUtf8LegacyGzip() {
$this->checkPHPExtension( 'zlib' );
$row = new stdClass;
Revision::getRevisionText( $row ) );
}
- function testCompressRevisionTextUtf8() {
+ /**
+ * @covers Revision::compressRevisionText
+ */
+ public function testCompressRevisionTextUtf8() {
$row = new stdClass;
$row->old_text = "Wiki est l'\xc3\xa9cole superieur !";
$row->old_flags = Revision::compressRevisionText( $row->old_text );
Revision::getRevisionText( $row ), "getRevisionText" );
}
- function testCompressRevisionTextUtf8Gzip() {
+ /**
+ * @covers Revision::compressRevisionText
+ */
+ public function testCompressRevisionTextUtf8Gzip() {
$this->checkPHPExtension( 'zlib' );
$this->setMwGlobals( 'wgCompressRevisions', true );
* @param string $text
* @param string $title
* @param string $model
+ * @param null $format
+ *
* @return Revision
*/
function newTestRevision( $text, $title = "Test", $model = CONTENT_MODEL_WIKITEXT, $format = null ) {
/**
* @group Database
* @dataProvider dataGetContentModel
+ * @covers Revision::getContentModel
*/
- function testGetContentModel( $text, $title, $model, $format, $expectedModel ) {
+ public function testGetContentModel( $text, $title, $model, $format, $expectedModel ) {
$rev = $this->newTestRevision( $text, $title, $model, $format );
$this->assertEquals( $expectedModel, $rev->getContentModel() );
/**
* @group Database
* @dataProvider dataGetContentFormat
+ * @covers Revision::getContentFormat
*/
- function testGetContentFormat( $text, $title, $model, $format, $expectedFormat ) {
+ public function testGetContentFormat( $text, $title, $model, $format, $expectedFormat ) {
$rev = $this->newTestRevision( $text, $title, $model, $format );
$this->assertEquals( $expectedFormat, $rev->getContentFormat() );
/**
* @group Database
* @dataProvider dataGetContentHandler
+ * @covers Revision::getContentHandler
*/
- function testGetContentHandler( $text, $title, $model, $format, $expectedClass ) {
+ public function testGetContentHandler( $text, $title, $model, $format, $expectedClass ) {
$rev = $this->newTestRevision( $text, $title, $model, $format );
$this->assertEquals( $expectedClass, get_class( $rev->getContentHandler() ) );
/**
* @group Database
* @dataProvider dataGetContent
+ * @covers Revision::getContent
*/
- function testGetContent( $text, $title, $model, $format, $audience, $expectedSerialization ) {
+ public function testGetContent( $text, $title, $model, $format, $audience, $expectedSerialization ) {
$rev = $this->newTestRevision( $text, $title, $model, $format );
$content = $rev->getContent( $audience );
/**
* @group Database
* @dataProvider dataGetText
+ * @covers Revision::getText
*/
- function testGetText( $text, $title, $model, $format, $audience, $expectedText ) {
+ public function testGetText( $text, $title, $model, $format, $audience, $expectedText ) {
$this->hideDeprecated( 'Revision::getText' );
$rev = $this->newTestRevision( $text, $title, $model, $format );
/**
* @group Database
* @dataProvider dataGetText
+ * @covers Revision::getRawText
*/
- function testGetRawText( $text, $title, $model, $format, $audience, $expectedText ) {
+ public function testGetRawText( $text, $title, $model, $format, $audience, $expectedText ) {
$this->hideDeprecated( 'Revision::getRawText' );
$rev = $this->newTestRevision( $text, $title, $model, $format );
$this->assertEquals( $expected_hash, $rev->getSha1() );
}
+ /**
+ * @covers Revision::__construct
+ */
public function testConstructWithText() {
$this->hideDeprecated( "Revision::getText" );
$this->assertEquals( CONTENT_MODEL_JAVASCRIPT, $rev->getContentModel() );
}
+ /**
+ * @covers Revision::__construct
+ */
public function testConstructWithContent() {
$this->hideDeprecated( "Revision::getText" );
* Tests whether $rev->getContent() returns a clone when needed.
*
* @group Database
+ * @covers Revision::getContent
*/
- function testGetContentClone() {
+ public function testGetContentClone() {
$content = new RevisionTestModifyableContent( "foo" );
$rev = new Revision(
* Tests whether $rev->getContent() returns the same object repeatedly if appropriate.
*
* @group Database
+ * @covers Revision::getContent
*/
- function testGetContentUncloned() {
+ public function testGetContentUncloned() {
$rev = $this->newTestRevision( "hello", "testGetContentUncloned_dummy", CONTENT_MODEL_WIKITEXT );
$content = $rev->getContent( Revision::RAW );
$content2 = $rev->getContent( Revision::RAW );
* "Agile Documentation" at
* http://www.phpunit.de/manual/3.4/en/other-uses-for-tests.html
*/
- function testTitleObjectStringConversion() {
+ public function testTitleObjectStringConversion() {
$title = Title::newFromText( "text" );
$this->assertInstanceOf( 'Title', $title, "Title creation" );
$this->assertEquals( "Text", $title, "Automatic string conversion" );
* @expectedException MWException object
* See http://www.phpunit.de/manual/3.4/en/appendixes.annotations.html#appendixes.annotations.expectedException
*/
- function testTitleObjectFromObject() {
+ public function testTitleObjectFromObject() {
$title = Title::newFromText( Title::newFromText( "test" ) );
$this->assertEquals( "Test", $title->isLocal() );
}
<?php
+/**
+ * @todo Tests covering decodeCharReferences can be refactored into a single
+ * method and dataprovider.
+ */
class SanitizerTest extends MediaWikiTestCase {
protected function setUp() {
AutoLoader::loadClass( 'Sanitizer' );
}
- function testDecodeNamedEntities() {
+ /**
+ * @covers Sanitizer::decodeCharReferences
+ */
+ public function testDecodeNamedEntities() {
$this->assertEquals(
"\xc3\xa9cole",
Sanitizer::decodeCharReferences( 'école' ),
);
}
- function testDecodeNumericEntities() {
+ /**
+ * @covers Sanitizer::decodeCharReferences
+ */
+ public function testDecodeNumericEntities() {
$this->assertEquals(
"\xc4\x88io bonas dans l'\xc3\xa9cole!",
Sanitizer::decodeCharReferences( "Ĉio bonas dans l'école!" ),
);
}
- function testDecodeMixedEntities() {
+ /**
+ * @covers Sanitizer::decodeCharReferences
+ */
+ public function testDecodeMixedEntities() {
$this->assertEquals(
"\xc4\x88io bonas dans l'\xc3\xa9cole!",
Sanitizer::decodeCharReferences( "Ĉio bonas dans l'école!" ),
);
}
- function testDecodeMixedComplexEntities() {
+ /**
+ * @covers Sanitizer::decodeCharReferences
+ */
+ public function testDecodeMixedComplexEntities() {
$this->assertEquals(
"\xc4\x88io bonas dans l'\xc3\xa9cole! (mais pas Ĉio dans l'école)",
Sanitizer::decodeCharReferences(
);
}
- function testInvalidAmpersand() {
+ /**
+ * @covers Sanitizer::decodeCharReferences
+ */
+ public function testInvalidAmpersand() {
$this->assertEquals(
'a & b',
Sanitizer::decodeCharReferences( 'a & b' ),
);
}
- function testInvalidEntities() {
+ /**
+ * @covers Sanitizer::decodeCharReferences
+ */
+ public function testInvalidEntities() {
$this->assertEquals(
'&foo;',
Sanitizer::decodeCharReferences( '&foo;' ),
);
}
- function testInvalidNumberedEntities() {
+ /**
+ * @covers Sanitizer::decodeCharReferences
+ */
+ public function testInvalidNumberedEntities() {
$this->assertEquals( UTF8_REPLACEMENT, Sanitizer::decodeCharReferences( "�" ), 'Invalid numbered entity' );
}
* @param String $tag Name of an HTML5 element (ie: 'video')
* @param Boolean $escaped Wheter sanitizer let the tag in or escape it (ie: '<video>')
*/
- function testRemovehtmltagsOnHtml5Tags( $tag, $escaped ) {
+ public function testRemovehtmltagsOnHtml5Tags( $tag, $escaped ) {
$this->setMwGlobals( array(
'wgUseTidy' => false
) );
/**
* @dataProvider dataRemoveHTMLtags
+ * @covers Sanitizer::removeHTMLtags
*/
- function testRemoveHTMLtags( $input, $output, $msg = null ) {
+ public function testRemoveHTMLtags( $input, $output, $msg = null ) {
$GLOBALS['wgUseTidy'] = false;
$this->assertEquals( $output, Sanitizer::removeHTMLtags( $input ), $msg );
}
* @dataProvider provideTagAttributesToDecode
* @covers Sanitizer::decodeTagAttributes
*/
- function testDecodeTagAttributes( $expected, $attributes, $message = '' ) {
+ public function testDecodeTagAttributes( $expected, $attributes, $message = '' ) {
$this->assertEquals( $expected,
Sanitizer::decodeTagAttributes( $attributes ),
$message
* @dataProvider provideDeprecatedAttributes
* @covers Sanitizer::fixTagAttributes
*/
- function testDeprecatedAttributesUnaltered( $inputAttr, $inputEl, $message = '' ) {
+ public function testDeprecatedAttributesUnaltered( $inputAttr, $inputEl, $message = '' ) {
$this->assertEquals( " $inputAttr",
Sanitizer::fixTagAttributes( $inputAttr, $inputEl ),
$message
* @dataProvider provideCssCommentsFixtures
* @covers Sanitizer::checkCss
*/
- function testCssCommentsChecking( $expected, $css, $message = '' ) {
+ public function testCssCommentsChecking( $expected, $css, $message = '' ) {
$this->assertEquals( $expected,
Sanitizer::checkCss( $css ),
$message
/**
* @dataProvider provideAttributeSupport
+ * @covers Sanitizer::fixTagAttributes
*/
- function testAttributeSupport( $tag, $attributes, $expected, $message ) {
+ public function testAttributeSupport( $tag, $attributes, $expected, $message ) {
$this->assertEquals( $expected,
Sanitizer::fixTagAttributes( $attributes, $tag ),
$message
<?php
+/**
+ * @covers Sanitizer::validateEmail
+ * @TODO all test methods in this class should be refactored and...
+ * use a single test method and a single data provider...
+ */
class SanitizerValidateEmailTest extends MediaWikiTestCase {
private function checkEmail( $addr, $expected = true, $msg = '' ) {
$this->checkEmail( $addr, false, $msg );
}
- function testEmailWellKnownUserAtHostDotTldAreValid() {
+ public function testEmailWellKnownUserAtHostDotTldAreValid() {
$this->valid( 'user@example.com' );
$this->valid( 'user@example.museum' );
}
- function testEmailWithUpperCaseCharactersAreValid() {
+ public function testEmailWithUpperCaseCharactersAreValid() {
$this->valid( 'USER@example.com' );
$this->valid( 'user@EXAMPLE.COM' );
$this->valid( 'user@Example.com' );
$this->valid( 'USER@eXAMPLE.com' );
}
- function testEmailWithAPlusInUserName() {
+ public function testEmailWithAPlusInUserName() {
$this->valid( 'user+sub@example.com' );
$this->valid( 'user+@example.com' );
}
- function testEmailDoesNotNeedATopLevelDomain() {
+ public function testEmailDoesNotNeedATopLevelDomain() {
$this->valid( "user@localhost" );
$this->valid( "FooBar@localdomain" );
$this->valid( "nobody@mycompany" );
}
- function testEmailWithWhiteSpacesBeforeOrAfterAreInvalids() {
+ public function testEmailWithWhiteSpacesBeforeOrAfterAreInvalids() {
$this->invalid( " user@host.com" );
$this->invalid( "user@host.com " );
$this->invalid( "\tuser@host.com" );
$this->invalid( "user@host.com\t" );
}
- function testEmailWithWhiteSpacesAreInvalids() {
+ public function testEmailWithWhiteSpacesAreInvalids() {
$this->invalid( "User user@host" );
$this->invalid( "first last@mycompany" );
$this->invalid( "firstlast@my company" );
}
- // bug 26948 : comma were matched by an incorrect regexp range
- function testEmailWithCommasAreInvalids() {
+ /**
+ * bug 26948 : comma were matched by an incorrect regexp range
+ */
+ public function testEmailWithCommasAreInvalids() {
$this->invalid( "user,foo@example.org" );
$this->invalid( "userfoo@ex,ample.org" );
}
- function testEmailWithHyphens() {
+ public function testEmailWithHyphens() {
$this->valid( "user-foo@example.org" );
$this->valid( "userfoo@ex-ample.org" );
}
- function testEmailDomainCanNotBeginWithDot() {
+ public function testEmailDomainCanNotBeginWithDot() {
$this->invalid( "user@." );
$this->invalid( "user@.localdomain" );
$this->invalid( "user@localdomain." );
$this->invalid( ".@a............" );
}
- function testEmailWithFunnyCharacters() {
+ public function testEmailWithFunnyCharacters() {
$this->valid( "\$user!ex{this}@123.com" );
}
- function testEmailTopLevelDomainCanBeNumerical() {
+ public function testEmailTopLevelDomainCanBeNumerical() {
$this->valid( "user@example.1234" );
}
- function testEmailWithoutAtSignIsInvalid() {
+ public function testEmailWithoutAtSignIsInvalid() {
$this->invalid( 'useràexample.com' );
}
- function testEmailWithOneCharacterDomainIsValid() {
+ public function testEmailWithOneCharacterDomainIsValid() {
$this->valid( 'user@a' );
}
}
}
class SiteConfigurationTest extends MediaWikiTestCase {
- var $mConf;
+
+ /**
+ * @var SiteConfiguration
+ */
+ protected $mConf;
protected function setUp() {
parent::setUp();
$GLOBALS['global'] = array( 'global' => 'global' );
}
- function testSiteFromDb() {
+ /**
+ * @covers SiteConfiguration::siteFromDB
+ */
+ public function testSiteFromDb() {
$this->assertEquals(
array( 'wikipedia', 'en' ),
$this->mConf->siteFromDB( 'enwiki' ),
);
}
- function testGetLocalDatabases() {
+ /**
+ * @covers SiteConfiguration::getLocalDatabases
+ */
+ public function testGetLocalDatabases() {
$this->assertEquals(
array( 'enwiki', 'dewiki', 'frwiki' ),
$this->mConf->getLocalDatabases(),
);
}
- function testGetConfVariables() {
+ /**
+ * @covers SiteConfiguration::get
+ */
+ public function testGetConfVariables() {
$this->assertEquals(
'enwiki',
$this->mConf->get( 'simple', 'enwiki', 'wiki' ),
);
}
- function testSiteFromDbWithCallback() {
+ /**
+ * @covers SiteConfiguration::siteFromDB
+ */
+ public function testSiteFromDbWithCallback() {
$this->mConf->siteParamsCallback = 'getSiteParams';
$this->assertEquals(
);
}
- function testParameterReplacement() {
+ /**
+ * @covers SiteConfiguration::get
+ */
+ public function testParameterReplacement() {
$this->mConf->siteParamsCallback = 'getSiteParams';
$this->assertEquals(
);
}
- function testGetAllGlobals() {
+ /**
+ * @covers SiteConfiguration::getAll
+ */
+ public function testGetAllGlobals() {
$this->mConf->siteParamsCallback = 'getSiteParams';
$getall = array(
--- /dev/null
+<?php
+
+/**
+ * @author Adam Shorland
+ */
+class StatusTest extends MediaWikiTestCase {
+
+ public function testCanConstruct(){
+ new Status();
+ $this->assertTrue( true );
+ }
+
+ /**
+ * @dataProvider provideValues
+ * @covers Status::newGood
+ * @covers Status::getValue
+ * @covers Status::isGood
+ * @covers Status::isOK
+ */
+ public function testNewGood( $value = null ){
+ $status = Status::newGood( $value );
+ $this->assertTrue( $status->isGood() );
+ $this->assertTrue( $status->isOK() );
+ $this->assertEquals( $value, $status->getValue() );
+ }
+
+ public static function provideValues(){
+ return array(
+ array(),
+ array( 'foo' ),
+ array( array( 'foo' => 'bar' ) ),
+ array( new Exception() ),
+ array( 1234 ),
+ );
+ }
+
+ /**
+ * @covers Status::newFatal
+ * @covers Status::isGood
+ * @covers Status::isOK
+ * @covers Status::getMessage
+ */
+ public function testNewFatalWithMessage() {
+ $message = $this->getMockBuilder( 'Message' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $status = Status::newFatal( $message );
+ $this->assertFalse( $status->isGood() );
+ $this->assertFalse( $status->isOK() );
+ $this->assertEquals( $message, $status->getMessage() );
+ }
+
+ /**
+ * @covers Status::newFatal
+ * @covers Status::isGood
+ * @covers Status::isOK
+ * @covers Status::getMessage
+ */
+ public function testNewFatalWithString() {
+ $message = 'foo';
+ $status = Status::newFatal( $message );
+ $this->assertFalse( $status->isGood() );
+ $this->assertFalse( $status->isOK() );
+ $newMessage = $status->getMessage();
+ $this->assertEquals( $message, $newMessage->getKey() );
+ }
+
+ /**
+ * @dataProvider provideSetResult
+ * @covers Status::getValue
+ * @covers Status::isOK
+ */
+ public function testSetResult( $ok, $value = null ) {
+ $status = new Status();
+ $status->setResult( $ok, $value );
+ $this->assertEquals( $ok, $status->isOK() );
+ $this->assertEquals( $value, $status->getValue() );
+ }
+
+ public static function provideSetResult() {
+ return array(
+ array( true ),
+ array( false ),
+ array( true, 'value' ),
+ array( false, 'value' ),
+ );
+ }
+
+ /**
+ * @dataProvider provideMockMessageDetails
+ * @covers Status::warning
+ * @covers Status::getWarningsArray
+ */
+ public function testWarningWithMessage( $mockDetails ) {
+ $status = new Status();
+ $messages = $this->getMockMessages( $mockDetails );
+
+ foreach( $messages as $message ){
+ $status->warning( $message );
+ }
+ $warnings = $status->getWarningsArray();
+
+ $this->assertEquals( count( $messages ), count( $warnings ) );
+ foreach( $messages as $key => $message ) {
+ $expectedArray = array_merge( array( $message->getKey() ), $message->getParams() );
+ $this->assertEquals( $warnings[$key], $expectedArray );
+ }
+ }
+
+ /**
+ * @dataProvider provideMockMessageDetails
+ * @covers Status::error
+ * @covers Status::getErrorsArray
+ */
+ public function testErrorWithMessage( $mockDetails ) {
+ $status = new Status();
+ $messages = $this->getMockMessages( $mockDetails );
+
+ foreach( $messages as $message ){
+ $status->error( $message );
+ }
+ $errors = $status->getErrorsArray();
+
+ $this->assertEquals( count( $messages ), count( $errors ) );
+ foreach( $messages as $key => $message ) {
+ $expectedArray = array_merge( array( $message->getKey() ), $message->getParams() );
+ $this->assertEquals( $errors[$key], $expectedArray );
+ }
+ }
+
+ protected function getMockMessage( $key = 'key', $params = array() ) {
+ $message = $this->getMockBuilder( 'Message' )
+ ->disableOriginalConstructor()
+ ->getMock();
+ $message->expects( $this->atLeastOnce() )
+ ->method( 'getKey' )
+ ->will( $this->returnValue( $key ) );
+ $message->expects( $this->atLeastOnce() )
+ ->method( 'getParams' )
+ ->will( $this->returnValue( $params ) );
+ return $message;
+ }
+
+ /**
+ * @param array $messageDetails eg. array( 'KEY' => array(/PARAMS/) )
+ * @return Message[]
+ */
+ protected function getMockMessages( $messageDetails ){
+ $messages = array();
+ foreach( $messageDetails as $key => $paramsArray ){
+ $messages[] = $this->getMockMessage( $key, $paramsArray );
+ }
+ return $messages;
+ }
+
+ public static function provideMockMessageDetails(){
+ return array(
+ array( array( 'key1' => array( 'foo' => 'bar' ) ) ),
+ array( array( 'key1' => array( 'foo' => 'bar' ), 'key2' => array( 'foo2' => 'bar2' ) ) ),
+ );
+ }
+
+ /**
+ * @covers Status::merge
+ * @todo test merge with $overwriteValue true
+ */
+ public function testMerge(){
+ $status1 = new Status();
+ $status2 = new Status();
+ $message1 = $this->getMockMessage( 'warn1' );
+ $message2 = $this->getMockMessage( 'error2' );
+ $status1->warning( $message1 );
+ $status2->error( $message2 );
+
+ $status1->merge( $status2 );
+ $this->assertEquals( 2, count( $status1->getWarningsArray() ) + count( $status1->getErrorsArray() ) );
+ }
+
+ //todo test cleanParams
+ //todo test getWikiText
+ //todo test getMessage
+ //todo test getErrorMessage
+ //todo test getHTML
+ //todo test getErrorMessageArray
+ //todo test getStatusArray
+ //todo test getErrorsByType
+ //todo test hasMessage
+ //todo test replaceMessage
+ //todo test replaceMessage
+
+}
* @covers StringUtils::isUtf8
* @dataProvider provideStringsForIsUtf8Check
*/
- function testIsUtf8WithMbstring( $expected, $string ) {
+ public function testIsUtf8WithMbstring( $expected, $string ) {
if ( !function_exists( 'mb_check_encoding' ) ) {
$this->markTestSkipped( 'Test requires the mbstring PHP extension' );
}
* @covers StringUtils::isUtf8
* @dataProvider provideStringsForIsUtf8Check
*/
- function testIsUtf8WithPhpFallbackImplementation( $expected, $string ) {
+ public function testIsUtf8WithPhpFallbackImplementation( $expected, $string ) {
$this->assertEquals( $expected,
StringUtils::isUtf8( $string, /** disable mbstring: */true ),
'Testing string "' . $this->escaped( $string ) . '" with pure PHP implementation'
class TemplateCategoriesTest extends MediaWikiLangTestCase {
- function testTemplateCategories() {
+ /**
+ * @covers Title::getParentCategories
+ */
+ public function testTemplateCategories() {
$title = Title::newFromText( "Categorized from template" );
$page = WikiPage::factory( $title );
$user = new User();
$user->mRights = array( 'createpage', 'edit', 'purge' );
- $page->doEditContent( new WikitextContent( '{{Categorising template}}' ), 'Create a page with a template', 0, false, $user );
+ $page->doEditContent(
+ new WikitextContent( '{{Categorising template}}' ),
+ 'Create a page with a template',
+ 0,
+ false,
+ $user
+ );
+
$this->assertEquals(
array()
, $title->getParentCategories()
);
$template = WikiPage::factory( Title::newFromText( 'Template:Categorising template' ) );
- $template->doEditContent( new WikitextContent( '[[Category:Solved bugs]]' ), 'Add a category through a template', 0, false, $user );
+
+ $template->doEditContent(
+ new WikitextContent( '[[Category:Solved bugs]]' ),
+ 'Add a category through a template',
+ 0,
+ false,
+ $user
+ );
// Run the job queue
JobQueueGroup::destroySingletons();
<?php
-/* Wraps the user object, so we can also retain full access to properties like password if we log in via the API */
+/**
+ * Wraps the user object, so we can also retain full access to properties like password if we log in via the API
+ */
class TestUser {
public $username;
public $password;
public $groups;
public $user;
- function __construct( $username, $realname = 'Real Name', $email = 'sample@example.com', $groups = array() ) {
+ public function __construct( $username, $realname = 'Real Name', $email = 'sample@example.com', $groups = array() ) {
$this->username = $username;
$this->realname = $realname;
$this->email = $email;
}
/**
- * Test offset usage for a given language::userAdjust
+ * Test offset usage for a given Language::userAdjust
* @dataProvider dataUserAdjust
+ * @covers Language::userAdjust
*/
public function testUserAdjust( $date, $localTZoffset, $expected ) {
global $wgContLang;
/**
* Test parsing of valid timestamps and outputing to MW format.
* @dataProvider provideValidTimestamps
+ * @covers MWTimestamp::getTimestamp
*/
- function testValidParse( $format, $original, $expected ) {
+ public function testValidParse( $format, $original, $expected ) {
$timestamp = new MWTimestamp( $original );
$this->assertEquals( $expected, $timestamp->getTimestamp( TS_MW ) );
}
/**
* Test outputting valid timestamps to different formats.
* @dataProvider provideValidTimestamps
+ * @covers MWTimestamp::getTimestamp
*/
- function testValidOutput( $format, $expected, $original ) {
+ public function testValidOutput( $format, $expected, $original ) {
$timestamp = new MWTimestamp( $original );
$this->assertEquals( $expected, (string)$timestamp->getTimestamp( $format ) );
}
/**
* Test an invalid timestamp.
* @expectedException TimestampException
+ * @covers MWTimestamp
*/
- function testInvalidParse() {
+ public function testInvalidParse() {
new MWTimestamp( "This is not a timestamp." );
}
/**
* Test requesting an invalid output format.
* @expectedException TimestampException
+ * @covers MWTimestamp::getTimestamp
*/
- function testInvalidOutput() {
+ public function testInvalidOutput() {
$timestamp = new MWTimestamp( '1343761268' );
$timestamp->getTimestamp( 98 );
}
}
/**
- * @test
* @dataProvider provideHumanTimestampTests
+ * @covers MWTimestamp::getHumanTimestamp
*/
public function testHumanTimestamp(
$tsTime, // The timestamp to format
}
/**
- * @test
* @dataProvider provideRelativeTimestampTests
+ * @covers MWTimestamp::getRelativeTimestamp
*/
public function testRelativeTimestamp(
$tsTime, // The timestamp to format
*
* @note: We don't make assumptions about the main namespace.
* But we do expect the Help namespace to contain Wikitext.
- *
*/
class TitleMethodsTest extends MediaWikiTestCase {
/**
* @dataProvider provideEquals
+ * @covers Title::equals
*/
public function testEquals( $titleA, $titleB, $expectedBool ) {
$titleA = Title::newFromText( $titleA );
/**
* @dataProvider provideInNamespace
+ * @covers Title::inNamespace
*/
public function testInNamespace( $title, $ns, $expectedBool ) {
$title = Title::newFromText( $title );
$this->assertEquals( $expectedBool, $title->inNamespace( $ns ) );
}
+ /**
+ * @covers Title::inNamespaces
+ */
public function testInNamespaces() {
$mainpage = Title::newFromText( 'Main Page' );
$this->assertTrue( $mainpage->inNamespaces( NS_MAIN, NS_USER ) );
/**
* @dataProvider provideHasSubjectNamespace
+ * @covers Title::hasSubjectNamespace
*/
public function testHasSubjectNamespace( $title, $ns, $expectedBool ) {
$title = Title::newFromText( $title );
/**
* @dataProvider dataGetContentModel
+ * @covers Title::getContentModel
*/
public function testGetContentModel( $title, $expectedModelId ) {
$title = Title::newFromText( $title );
/**
* @dataProvider dataGetContentModel
+ * @covers Title::hasContentModel
*/
public function testHasContentModel( $title, $expectedModelId ) {
$title = Title::newFromText( $title );
/**
* @dataProvider provideIsCssOrJsPage
+ * @covers Title::isCssOrJsPage
*/
public function testIsCssOrJsPage( $title, $expectedBool ) {
$title = Title::newFromText( $title );
$this->assertEquals( $expectedBool, $title->isCssOrJsPage() );
}
-
public static function provideIsCssJsSubpage() {
return array(
array( 'Help:Foo', false ),
/**
* @dataProvider provideIsCssJsSubpage
+ * @covers Title::isCssJsSubpage
*/
public function testIsCssJsSubpage( $title, $expectedBool ) {
$title = Title::newFromText( $title );
/**
* @dataProvider provideIsCssSubpage
+ * @covers Title::isCssSubpage
*/
public function testIsCssSubpage( $title, $expectedBool ) {
$title = Title::newFromText( $title );
/**
* @dataProvider provideIsJsSubpage
+ * @covers Title::isJsSubpage
*/
public function testIsJsSubpage( $title, $expectedBool ) {
$title = Title::newFromText( $title );
/**
* @dataProvider provideIsWikitextPage
+ * @covers Title::isWikitextPage
*/
public function testIsWikitextPage( $title, $expectedBool ) {
$title = Title::newFromText( $title );
/**
* @group Database
+ *
+ * @covers Title::getUserPermissionsErrors
+ * @covers Title::getUserPermissionsErrorsInternal
*/
class TitlePermissionTest extends MediaWikiLangTestCase {
}
}
- function setUserPerm( $perm ) {
+ protected function setUserPerm( $perm ) {
// Setting member variables is evil!!!
if ( is_array( $perm ) ) {
}
}
- function setTitle( $ns, $title = "Main_Page" ) {
+ protected function setTitle( $ns, $title = "Main_Page" ) {
$this->title = Title::makeTitle( $ns, $title );
}
- function setUser( $userName = null ) {
+ protected function setUser( $userName = null ) {
if ( $userName === 'anon' ) {
$this->user = $this->anonUser;
} elseif ( $userName === null || $userName === $this->userName ) {
}
}
- function testQuickPermissions() {
+ /**
+ * @todo This test method should be split up into separate test methods and
+ * data providers
+ */
+ public function testQuickPermissions() {
global $wgContLang;
$prefix = $wgContLang->getFormattedNsText( NS_PROJECT );
}
}
- function runGroupPermissions( $action, $result, $result2 = null ) {
+ protected function runGroupPermissions( $action, $result, $result2 = null ) {
global $wgGroupPermissions;
if ( $result2 === null ) {
$this->assertEquals( $result2, $res );
}
- function testSpecialsAndNSPermissions() {
+ /**
+ * @todo This test method should be split up into separate test methods and
+ * data providers
+ */
+ public function testSpecialsAndNSPermissions() {
global $wgNamespaceProtection;
$this->setUser( $this->userName );
$this->title->userCan( 'bogus', $this->user ) );
}
- function testCssAndJavascriptPermissions() {
+ /**
+ * @todo This test method should be split up into separate test methods and
+ * data providers
+ */
+ public function testCssAndJavascriptPermissions() {
$this->setUser( $this->userName );
$this->setTitle( NS_USER, $this->userName . '/test.js' );
);
}
- function runCSSandJSPermissions( $result0, $result1, $result2, $result3, $result4 ) {
+ protected function runCSSandJSPermissions( $result0, $result1, $result2, $result3, $result4 ) {
$this->setUserPerm( '' );
$this->assertEquals( $result0,
$this->title->getUserPermissionsErrors( 'bogus',
$this->user ) );
}
- function testPageRestrictions() {
+ /**
+ * @todo This test method should be split up into separate test methods and
+ * data providers
+ */
+ public function testPageRestrictions() {
global $wgContLang;
$prefix = $wgContLang->getFormattedNsText( NS_PROJECT );
$this->user ) );
}
- function testCascadingSourcesRestrictions() {
+ public function testCascadingSourcesRestrictions() {
$this->setTitle( NS_MAIN, "test page" );
$this->setUserPerm( array( "edit", "bogus" ) );
$this->title->getUserPermissionsErrors( 'edit', $this->user ) );
}
- function testActionPermissions() {
+ /**
+ * @todo This test method should be split up into separate test methods and
+ * data providers
+ */
+ public function testActionPermissions() {
$this->setUserPerm( array( "createpage" ) );
$this->setTitle( NS_MAIN, "test page" );
$this->title->mTitleProtection['pt_create_perm'] = '';
$this->title->userCan( 'move-target', $this->user ) );
}
- function testUserBlock() {
+ public function testUserBlock() {
global $wgEmailConfirmToEdit, $wgEmailAuthentication;
$wgEmailConfirmToEdit = true;
$wgEmailAuthentication = true;
<?php
/**
- *
* @group Database
* ^--- needed for language cache stuff
*/
) );
}
- function testLegalChars() {
+ /**
+ * @covers Title::legalChars
+ */
+ public function testLegalChars() {
$titlechars = Title::legalChars();
foreach ( range( 1, 255 ) as $num ) {
/**
* See also mediawiki.Title.test.js
+ * @covers Title::secureAndSplit
+ * @todo This method should be split into 2 separate tests each with a provider
*/
- function testSecureAndSplit() {
+ public function testSecureAndSplit() {
// Valid
foreach ( array(
'Sandbox',
/**
* @dataProvider provideConvertByteClassToUnicodeClass
+ * @covers Title::convertByteClassToUnicodeClass
*/
- function testConvertByteClassToUnicodeClass( $byteClass, $unicodeClass ) {
+ public function testConvertByteClassToUnicodeClass( $byteClass, $unicodeClass ) {
$this->assertEquals( $unicodeClass, Title::convertByteClassToUnicodeClass( $byteClass ) );
}
/**
* @dataProvider provideBug31100
+ * @covers Title::fixSpecialName
*/
- function testBug31100FixSpecialName( $text, $expectedParam ) {
+ public function testBug31100FixSpecialName( $text, $expectedParam ) {
$title = Title::newFromText( $text );
$fixed = $title->fixSpecialName();
$stuff = explode( '/', $fixed->getDBkey(), 2 );
* @group Database
* @param string $source
* @param string $target
- * @param array|string|true $expected Required error
+ * @param array|string|bool $expected Required error
* @dataProvider provideTestIsValidMoveOperation
+ * @covers Title::isValidMoveOperation
*/
- function testIsValidMoveOperation( $source, $target, $expected ) {
+ public function testIsValidMoveOperation( $source, $target, $expected ) {
$title = Title::newFromText( $source );
$nt = Title::newFromText( $target );
$errors = $title->isValidMoveOperation( $nt, false );
/**
* Provides test parameter values for testIsValidMoveOperation()
*/
- function dataTestIsValidMoveOperation() {
+ public function dataTestIsValidMoveOperation() {
return array(
array( 'Test', 'Test', 'selfmove' ),
array( 'File:Test.jpg', 'Page', 'imagenocrossnamespace' )
* @param array $whitelistRegexp
* @param string $source
* @param string $action
- * @param array|string|true $expected Required error
+ * @param array|string|bool $expected Required error
*
* @covers Title::checkReadPermissions
* @dataProvider dataWgWhitelistReadRegexp
*/
- function testWgWhitelistReadRegexp( $whitelistRegexp, $source, $action, $expected ) {
+ public function testWgWhitelistReadRegexp( $whitelistRegexp, $source, $action, $expected ) {
// $wgWhitelistReadRegexp must be an array. Since the provided test cases
// usually have only one regex, it is more concise to write the lonely regex
// as a string. Thus we cast to an array() to honor $wgWhitelistReadRegexp
/**
* Provides test parameter values for testWgWhitelistReadRegexp()
*/
- function dataWgWhitelistReadRegexp() {
+ public function dataWgWhitelistReadRegexp() {
$ALLOWED = true;
$DISALLOWED = false;
);
}
- function flattenErrorsArray( $errors ) {
+ public function flattenErrorsArray( $errors ) {
$result = array();
foreach ( $errors as $error ) {
$result[] = $error[0];
}
/**
- * @dataProvider provideCasesForGetpageviewlanguage
+ * @dataProvider provideGetPageViewLanguage
+ * @covers Title::getPageViewLanguage
*/
- function testGetpageviewlanguage( $expected, $titleText, $contLang, $lang, $variant, $msg = '' ) {
+ public function testGetPageViewLanguage( $expected, $titleText, $contLang, $lang, $variant, $msg = '' ) {
global $wgLanguageCode, $wgContLang, $wgLang, $wgDefaultLanguageVariant, $wgAllowUserJs;
// Setup environnement for this test
);
}
- public static function provideCasesForGetpageviewlanguage() {
+ public static function provideGetPageViewLanguage() {
# Format:
# - expected
# - Title name
/**
* @dataProvider provideBaseTitleCases
+ * @covers Title::getBaseText
*/
- function testExtractingBaseTextFromTitle( $title, $expected, $msg = '' ) {
+ public function testGetBaseText( $title, $expected, $msg = '' ) {
$title = Title::newFromText( $title );
$this->assertEquals( $expected,
$title->getBaseText(),
/**
* @dataProvider provideRootTitleCases
+ * @covers Title::getRootText
*/
- function testExtractingRootTextFromTitle( $title, $expected, $msg = '' ) {
+ public function testGetRootText( $title, $expected, $msg = '' ) {
$title = Title::newFromText( $title );
$this->assertEquals( $expected,
$title->getRootText(),
/**
* @todo Handle $wgNamespacesWithSubpages cases
* @dataProvider provideSubpageTitleCases
+ * @covers Title::getSubpageText
*/
- function testExtractingSubpageTextFromTitle( $title, $expected, $msg = '' ) {
+ public function testGetSubpageText( $title, $expected, $msg = '' ) {
$title = Title::newFromText( $title );
$this->assertEquals( $expected,
$title->getSubpageText(),
<?php
class UIDGeneratorTest extends MediaWikiTestCase {
+
/**
* @dataProvider provider_testTimestampedUID
+ * @covers UIDGenerator::newTimestampedUID128
+ * @covers UIDGenerator::newTimestampedUID88
*/
public function testTimestampedUID( $method, $digitlen, $bits, $tbits, $hostbits ) {
$id = call_user_func( array( 'UIDGenerator', $method ) );
/**
* array( method, length, bits, hostbits )
+ * NOTE: When adding a new method name here please update the covers tags for the tests!
*/
public static function provider_testTimestampedUID() {
return array(
);
}
+ /**
+ * @covers UIDGenerator::newUUIDv4
+ */
public function testUUIDv4() {
for ( $i = 0; $i < 100; $i++ ) {
$id = UIDGenerator::newUUIDv4();
$this->assertEquals( true,
preg_match( '!^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$!', $id ),
"UID $id has the right format" );
+ }
+ }
+ /**
+ * @covers UIDGenerator::newRawUUIDv4
+ */
+ public function testRawUUIDv4() {
+ for ( $i = 0; $i < 100; $i++ ) {
$id = UIDGenerator::newRawUUIDv4();
$this->assertEquals( true,
preg_match( '!^[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15}$!', $id ),
"UID $id has the right format" );
+ }
+ }
+ /**
+ * @covers UIDGenerator::newRawUUIDv4
+ */
+ public function testRawUUIDv4QuickRand() {
+ for ( $i = 0; $i < 100; $i++ ) {
$id = UIDGenerator::newRawUUIDv4( UIDGenerator::QUICK_RAND );
$this->assertEquals( true,
preg_match( '!^[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15}$!', $id ),
"UID $id has the right format" );
}
}
+
}
--- /dev/null
+<?php
+
+class UserMailerTest extends MediaWikiLangTestCase {
+
+ /**
+ * @covers UserMailer::quotedPrintable
+ */
+ public function testQuotedPrintable() {
+ $this->assertEquals(
+ "=?UTF-8?Q?=C4=88u=20legebla=3F?=",
+ UserMailer::quotedPrintable( "\xc4\x88u legebla?", "UTF-8" ) );
+ }
+
+}
\ No newline at end of file
);
}
+ /**
+ * @covers User::getGroupPermissions
+ */
public function testGroupPermissions() {
$rights = User::getGroupPermissions( array( 'unittesters' ) );
$this->assertContains( 'runtest', $rights );
$this->assertNotContains( 'nukeworld', $rights );
}
+ /**
+ * @covers User::getGroupPermissions
+ */
public function testRevokePermissions() {
$rights = User::getGroupPermissions( array( 'unittesters', 'formertesters' ) );
$this->assertNotContains( 'runtest', $rights );
$this->assertNotContains( 'nukeworld', $rights );
}
+ /**
+ * @covers User::getRights
+ */
public function testUserPermissions() {
$rights = $this->user->getRights();
$this->assertContains( 'runtest', $rights );
/**
* @dataProvider provideGetGroupsWithPermission
+ * @covers User::getGroupsWithPermission
*/
public function testGetGroupsWithPermission( $expected, $right ) {
$result = User::getGroupsWithPermission( $right );
/**
* @dataProvider provideUserNames
+ * @covers User::isValidUserName
*/
public function testIsValidUserName( $username, $result, $message ) {
$this->assertEquals( $this->user->isValidUserName( $username ), $result, $message );
/**
* Test User::editCount
* @group medium
+ * @covers User::getEditCount
*/
public function testEditCount() {
$user = User::newFromName( 'UnitTestUser' );
/**
* Test changing user options.
+ * @covers User::setOption
+ * @covers User::getOption
*/
public function testOptions() {
$user = User::newFromName( 'UnitTestUser' );
/**
* Bug 37963
* Make sure defaults are loaded when setOption is called.
+ * @covers User::loadOptions
*/
public function testAnonOptions() {
global $wgDefaultUserOptions;
/**
* @dataProvider provideDetectServer
+ * @covers WebRequest::detectServer
*/
- function testDetectServer( $expected, $input, $description ) {
+ public function testDetectServer( $expected, $input, $description ) {
$_SERVER = $input;
$result = WebRequest::detectServer();
$this->assertEquals( $expected, $result, $description );
/**
* @dataProvider provideGetIP
+ * @covers WebRequest::getIP
*/
- function testGetIP( $expected, $input, $squid, $xffList, $private, $description ) {
+ public function testGetIP( $expected, $input, $squid, $xffList, $private, $description ) {
$_SERVER = $input;
$this->setMwGlobals( array(
'wgSquidServersNoPurge' => $squid,
/**
* @expectedException MWException
+ * @covers WebRequest::getIP
*/
- function testGetIpLackOfRemoteAddrThrowAnException() {
+ public function testGetIpLackOfRemoteAddrThrowAnException() {
$request = new WebRequest();
# Next call throw an exception about lacking an IP
$request->getIP();
/**
* @dataProvider provideLanguageData
+ * @covers WebRequest::getAcceptLang
*/
- function testAcceptLang( $acceptLanguageHeader, $expectedLanguages, $description ) {
+ public function testAcceptLang( $acceptLanguageHeader, $expectedLanguages, $description ) {
$_SERVER = array( 'HTTP_ACCEPT_LANGUAGE' => $acceptLanguageHeader );
$request = new WebRequest();
$this->assertSame( $request->getAcceptLang(), $expectedLanguages, $description );
<?php
+
/**
* @group ContentHandler
* @group Database
* ^--- important, causes temporary tables to be used instead of the real database
* @group medium
**/
-
class WikiPageTest extends MediaWikiLangTestCase {
- var $pages_to_delete;
+ protected $pages_to_delete;
function __construct( $name = null, array $data = array(), $dataName = '' ) {
parent::__construct( $name, $data, $dataName );
return $page;
}
+ /**
+ * @covers WikiPage::doEditContent
+ */
public function testDoEditContent() {
$page = $this->newPage( "WikiPageTest_testDoEditContent" );
$title = $page->getTitle();
$this->assertEquals( 2, $n, 'pagelinks should contain two links from the page' );
}
+ /**
+ * @covers WikiPage::doEdit
+ */
public function testDoEdit() {
$this->hideDeprecated( "WikiPage::doEdit" );
$this->hideDeprecated( "WikiPage::getText" );
$this->assertEquals( 2, $n, 'pagelinks should contain two links from the page' );
}
+ /**
+ * @covers WikiPage::doQuickEdit
+ */
public function testDoQuickEdit() {
global $wgUser;
$this->assertEquals( $text, $page->getText() );
}
+ /**
+ * @covers WikiPage::doQuickEditContent
+ */
public function testDoQuickEditContent() {
global $wgUser;
$this->assertTrue( $content->equals( $page->getContent() ) );
}
+ /**
+ * @covers WikiPage::doDeleteArticle
+ */
public function testDoDeleteArticle() {
$page = $this->createPage( "WikiPageTest_testDoDeleteArticle", "[[original text]] foo", CONTENT_MODEL_WIKITEXT );
$id = $page->getId();
$this->assertEquals( 0, $n, 'pagelinks should contain no more links from the page' );
}
+ /**
+ * @covers WikiPage::doDeleteUpdates
+ */
public function testDoDeleteUpdates() {
$page = $this->createPage( "WikiPageTest_testDoDeleteArticle", "[[original text]] foo", CONTENT_MODEL_WIKITEXT );
$id = $page->getId();
$this->assertEquals( 0, $n, 'pagelinks should contain no more links from the page' );
}
+ /**
+ * @covers WikiPage::getRevision
+ */
public function testGetRevision() {
$page = $this->newPage( "WikiPageTest_testGetRevision" );
$this->assertEquals( "some text", $rev->getContent()->getNativeData() );
}
+ /**
+ * @covers WikiPage::getContent
+ */
public function testGetContent() {
$page = $this->newPage( "WikiPageTest_testGetContent" );
$this->assertEquals( "some text", $content->getNativeData() );
}
+ /**
+ * @covers WikiPage::getText
+ */
public function testGetText() {
$this->hideDeprecated( "WikiPage::getText" );
$this->assertEquals( "some text", $text );
}
+ /**
+ * @covers WikiPage::getRawText
+ */
public function testGetRawText() {
$this->hideDeprecated( "WikiPage::getRawText" );
$this->assertEquals( "some text", $text );
}
+ /**
+ * @covers WikiPage::getContentModel
+ */
public function testGetContentModel() {
global $wgContentHandlerUseDB;
$this->assertEquals( CONTENT_MODEL_JAVASCRIPT, $page->getContentModel() );
}
+ /**
+ * @covers WikiPage::getContentHandler
+ */
public function testGetContentHandler() {
global $wgContentHandlerUseDB;
$this->assertEquals( 'JavaScriptContentHandler', get_class( $page->getContentHandler() ) );
}
+ /**
+ * @covers WikiPage::exists
+ */
public function testExists() {
$page = $this->newPage( "WikiPageTest_testExists" );
$this->assertFalse( $page->exists() );
/**
* @dataProvider provideHasViewableContent
+ * @covers WikiPage::hasViewableContent
*/
public function testHasViewableContent( $title, $viewable, $create = false ) {
$page = $this->newPage( $title );
/**
* @dataProvider provideGetRedirectTarget
+ * @covers WikiPage::getRedirectTarget
*/
public function testGetRedirectTarget( $title, $model, $text, $target ) {
$page = $this->createPage( $title, $text, $model );
/**
* @dataProvider provideGetRedirectTarget
+ * @covers WikiPage::isRedirect
*/
public function testIsRedirect( $title, $model, $text, $target ) {
$page = $this->createPage( $title, $text, $model );
/**
* @dataProvider provideIsCountable
+ * @covers WikiPage::isCountable
*/
public function testIsCountable( $title, $model, $text, $mode, $expected ) {
global $wgContentHandlerUseDB;
/**
* @dataProvider provideGetParserOutput
+ * @covers WikiPage::getParserOutput
*/
public function testGetParserOutput( $model, $text, $expectedHtml ) {
$page = $this->createPage( 'WikiPageTest_testGetParserOutput', $text, $model );
return $po;
}
+ /**
+ * @covers WikiPage::getParserOutput
+ */
public function testGetParserOutput_nonexisting() {
static $count = 0;
$count++;
$this->assertFalse( $po, "getParserOutput() shall return false for non-existing pages." );
}
+ /**
+ * @covers WikiPage::getParserOutput
+ */
public function testGetParserOutput_badrev() {
$page = $this->createPage( 'WikiPageTest_testGetParserOutput', "dummy", CONTENT_MODEL_WIKITEXT );
/**
* @dataProvider dataReplaceSection
+ * @covers WikiPage::replaceSection
*/
public function testReplaceSection( $title, $model, $text, $section, $with, $sectionTitle, $expected ) {
$this->hideDeprecated( "WikiPage::replaceSection" );
/**
* @dataProvider dataReplaceSection
+ * @covers WikiPage::replaceSectionContent
*/
public function testReplaceSectionContent( $title, $model, $text, $section, $with, $sectionTitle, $expected ) {
$page = $this->createPage( $title, $text, $model );
/**
* @todo FIXME: the above rollback test is better, but it keeps failing in jenkins for some reason.
+ * @covers WikiPage::doRollback
*/
public function testDoRollback() {
$admin = new User();
/**
* @dataProvider provideGetAutoSummary
+ * @covers WikiPage::getAutosummary
*/
public function testGetAutosummary( $old, $new, $flags, $expected ) {
$this->hideDeprecated( "WikiPage::getAutosummary" );
/**
* @dataProvider provideGetAutoDeleteReason
+ * @covers WikiPage::getAutoDeleteReason
*/
public function testGetAutoDeleteReason( $edits, $expectedResult, $expectedHistory ) {
global $wgUser;
/**
* @dataProvider providePreSaveTransform
+ * @covers WikiPage::preSaveTransform
*/
public function testPreSaveTransform( $text, $expected ) {
$this->hideDeprecated( 'WikiPage::preSaveTransform' );
$this->assertEquals( $expected, $text );
}
+
+ /**
+ * @covers WikiPage::factory
+ */
+ public function testWikiPageFactory() {
+ $title = Title::makeTitle( NS_FILE, 'Someimage.png' );
+ $page = WikiPage::factory( $title );
+ $this->assertEquals( 'WikiFilePage', get_class( $page ) );
+
+ $title = Title::makeTitle( NS_CATEGORY, 'SomeCategory' );
+ $page = WikiPage::factory( $title );
+ $this->assertEquals( 'WikiCategoryPage', get_class( $page ) );
+
+ $title = Title::makeTitle( NS_MAIN, 'SomePage' );
+ $page = WikiPage::factory( $title );
+ $this->assertEquals( 'WikiPage', get_class( $page ) );
+ }
}
*/
class WikiPageTest_ContentHandlerUseDB extends WikiPageTest {
- function setUp() {
+ protected function setUp() {
parent::setUp();
$this->setMwGlobals( 'wgContentHandlerUseDB', false );
}
}
+ /**
+ * @covers WikiPage::getContentModel
+ */
public function testGetContentModel() {
$page = $this->createPage( "WikiPageTest_testGetContentModel", "some text", CONTENT_MODEL_JAVASCRIPT );
$this->assertEquals( CONTENT_MODEL_WIKITEXT, $page->getContentModel() );
}
+ /**
+ * @covers WikiPage::getContentHandler
+ */
public function testGetContentHandler() {
$page = $this->createPage( "WikiPageTest_testGetContentHandler", "some text", CONTENT_MODEL_JAVASCRIPT );
<?php
+
+/**
+ * @group Xml
+ */
class XmlJs extends MediaWikiTestCase {
- public function testConstruction() {
- $obj = new XmlJsCode( null );
- $this->assertNull( $obj->value );
- $obj = new XmlJsCode( '' );
- $this->assertSame( $obj->value, '' );
+
+ /**
+ * @covers XmlJsCode::__construct
+ * @dataProvider provideConstruction
+ */
+ public function testConstruction( $value ) {
+ $obj = new XmlJsCode( $value );
+ $this->assertEquals( $value, $obj->value );
}
+
+ public function provideConstruction(){
+ return array(
+ array( null ),
+ array( '' ),
+ );
+ }
+
}
<?php
-// TODO
+/**
+ * @group Xml
+ */
class XmlSelectTest extends MediaWikiTestCase {
+
+ /**
+ * @var XmlSelect
+ */
protected $select;
protected function setUp() {
$this->select = null;
}
- ### START OF TESTS ###
-
+ /**
+ * @covers XmlSelect::__construct
+ */
public function testConstructWithoutParameters() {
$this->assertEquals( '<select></select>', $this->select->getHTML() );
}
/**
* Parameters are $name (false), $id (false), $default (false)
* @dataProvider provideConstructionParameters
+ * @covers XmlSelect::__construct
*/
public function testConstructParameters( $name, $id, $default, $expected ) {
$this->select = new XmlSelect( $name, $id, $default );
* - $id (default: false)
* - $default (default: false)
* Provides a fourth parameters representing the expected HTML output
- *
*/
public static function provideConstructionParameters() {
return array(
);
}
- # Begin XmlSelect::addOption() similar to Xml::option
+ /**
+ * @covers XmlSelect::addOption
+ */
public function testAddOption() {
$this->select->addOption( 'foo' );
$this->assertEquals( '<select><option value="foo">foo</option></select>', $this->select->getHTML() );
}
+ /**
+ * @covers XmlSelect::addOption
+ */
public function testAddOptionWithDefault() {
$this->select->addOption( 'foo', true );
$this->assertEquals( '<select><option value="1">foo</option></select>', $this->select->getHTML() );
}
+ /**
+ * @covers XmlSelect::addOption
+ */
public function testAddOptionWithFalse() {
$this->select->addOption( 'foo', false );
$this->assertEquals( '<select><option value="foo">foo</option></select>', $this->select->getHTML() );
}
+ /**
+ * @covers XmlSelect::addOption
+ */
public function testAddOptionWithValueZero() {
$this->select->addOption( 'foo', 0 );
$this->assertEquals( '<select><option value="0">foo</option></select>', $this->select->getHTML() );
}
- # End XmlSelect::addOption() similar to Xml::option
-
+ /**
+ * @covers XmlSelect::setDefault
+ */
public function testSetDefault() {
$this->select->setDefault( 'bar1' );
$this->select->addOption( 'foo1' );
* Adding default later on should set the correct selection or
* raise an exception.
* To handle this, we need to render the options in getHtml()
+ * @covers XmlSelect::setDefault
*/
public function testSetDefaultAfterAddingOptions() {
$this->select->addOption( 'foo1' );
'<option value="foo2">foo2</option></select>', $this->select->getHTML() );
}
+ /**
+ * @covers XmlSelect::setAttribute
+ * @covers XmlSelect::getAttribute
+ */
public function testGetAttributes() {
# create some attributes
$this->select->setAttribute( 'dummy', 0x777 );
<?php
+/**
+ * @group Xml
+ */
class XmlTest extends MediaWikiTestCase {
protected function setUp() {
/**
* @covers Xml::element
*/
- function testElementOpen() {
+ public function testElementOpen() {
$this->assertEquals(
'<element>',
Xml::element( 'element', null, null ),
/**
* @covers Xml::element
*/
- function testElementEmpty() {
+ public function testElementEmpty() {
$this->assertEquals(
'<element />',
Xml::element( 'element', null, '' ),
/**
* @covers Xml::input
*/
- function testElementInputCanHaveAValueOfZero() {
+ public function testElementInputCanHaveAValueOfZero() {
$this->assertEquals(
'<input name="name" value="0" />',
Xml::input( 'name', false, 0 ),
/**
* @covers Xml::element
*/
- function testElementEscaping() {
+ public function testElementEscaping() {
$this->assertEquals(
'<element>hello <there> you & you</element>',
Xml::element( 'element', null, 'hello <there> you & you' ),
/**
* @covers Xml::element
*/
- function testElementAttributes() {
+ public function testElementAttributes() {
$this->assertEquals(
'<element key="value" <>="<>">',
Xml::element( 'element', array( 'key' => 'value', '<>' => '<>' ), null ),
/**
* @covers Xml::openElement
*/
- function testOpenElement() {
+ public function testOpenElement() {
$this->assertEquals(
'<element k="v">',
Xml::openElement( 'element', array( 'k' => 'v' ) ),
/**
* @covers Xml::closeElement
*/
- function testCloseElement() {
+ public function testCloseElement() {
$this->assertEquals( '</element>', Xml::closeElement( 'element' ), 'closeElement() shortcut' );
}
/**
* @covers Xml::textarea
*/
- function testTextareaNoContent() {
+ public function testTextareaNoContent() {
$this->assertEquals(
'<textarea name="name" id="name" cols="40" rows="5"></textarea>',
Xml::textarea( 'name', '' ),
/**
* @covers Xml::textarea
*/
- function testTextareaAttribs() {
+ public function testTextareaAttribs() {
$this->assertEquals(
'<textarea name="name" id="name" cols="20" rows="10"><txt></textarea>',
Xml::textarea( 'name', '<txt>', 20, 10 ),
/**
* @covers Xml::label
*/
- function testLabelCreation() {
+ public function testLabelCreation() {
$this->assertEquals(
'<label for="id">name</label>',
Xml::label( 'name', 'id' ),
/**
* @covers Xml::label
*/
- function testLabelAttributeCanOnlyBeClassOrTitle() {
+ public function testLabelAttributeCanOnlyBeClassOrTitle() {
$this->assertEquals(
'<label for="id">name</label>',
Xml::label( 'name', 'id', array( 'generated' => true ) ),
/**
* @covers Xml::languageSelector
*/
- function testLanguageSelector() {
+ public function testLanguageSelector() {
$select = Xml::languageSelector( 'en', true, null,
array( 'id' => 'testlang' ), wfMessage( 'yourlanguage' ) );
$this->assertEquals(
/**
* @covers Xml::escapeJsString
*/
- function testEscapeJsStringSpecialChars() {
+ public function testEscapeJsStringSpecialChars() {
$this->assertEquals(
'\\\\\r\n',
Xml::escapeJsString( "\\\r\n" ),
/**
* @covers Xml::encodeJsVar
*/
- function testEncodeJsVarBoolean() {
+ public function testEncodeJsVarBoolean() {
$this->assertEquals(
'true',
Xml::encodeJsVar( true ),
/**
* @covers Xml::encodeJsVar
*/
- function testEncodeJsVarNull() {
+ public function testEncodeJsVarNull() {
$this->assertEquals(
'null',
Xml::encodeJsVar( null ),
/**
* @covers Xml::encodeJsVar
*/
- function testEncodeJsVarArray() {
+ public function testEncodeJsVarArray() {
$this->assertEquals(
'["a",1]',
Xml::encodeJsVar( array( 'a', 1 ) ),
/**
* @covers Xml::encodeJsVar
*/
- function testEncodeJsVarObject() {
+ public function testEncodeJsVarObject() {
$this->assertEquals(
'{"a":"a","b":1}',
Xml::encodeJsVar( (object)array( 'a' => 'a', 'b' => 1 ) ),
/**
* @covers Xml::encodeJsVar
*/
- function testEncodeJsVarInt() {
+ public function testEncodeJsVarInt() {
$this->assertEquals(
'123456',
Xml::encodeJsVar( 123456 ),
/**
* @covers Xml::encodeJsVar
*/
- function testEncodeJsVarFloat() {
+ public function testEncodeJsVarFloat() {
$this->assertEquals(
'1.23456',
Xml::encodeJsVar( 1.23456 ),
/**
* @covers Xml::encodeJsVar
*/
- function testEncodeJsVarIntString() {
+ public function testEncodeJsVarIntString() {
$this->assertEquals(
'"123456"',
Xml::encodeJsVar( '123456' ),
/**
* @covers Xml::encodeJsVar
*/
- function testEncodeJsVarFloatString() {
+ public function testEncodeJsVarFloatString() {
$this->assertEquals(
'"1.23456"',
Xml::encodeJsVar( '1.23456' ),
/**
* PHPUnit tests for XMLTypeCheck.
* @author physikerwelt
- * @group ?
+ * @group Xml
* @covers XMLTypeCheck
*/
class XmlTypeCheckTest extends MediaWikiTestCase {
* NOTE: this test is more like an integration test than a unit test
*/
class ZipDirectoryReaderTest extends MediaWikiTestCase {
- var $zipDir, $entries;
+ protected $zipDir;
+ protected $entries;
protected function setUp() {
parent::setUp();
$this->assertTrue( $status->isOK(), $assertMessage );
}
- function testEmpty() {
+ public function testEmpty() {
$this->readZipAssertSuccess( 'empty.zip', 'Empty zip' );
}
- function testMultiDisk0() {
+ public function testMultiDisk0() {
$this->readZipAssertError( 'split.zip', 'zip-unsupported',
'Split zip error' );
}
- function testNoSignature() {
+ public function testNoSignature() {
$this->readZipAssertError( 'nosig.zip', 'zip-wrong-format',
'No signature should give "wrong format" error' );
}
- function testSimple() {
+ public function testSimple() {
$this->readZipAssertSuccess( 'class.zip', 'Simple ZIP' );
$this->assertEquals( $this->entries, array( array(
'name' => 'Class.class',
) ) );
}
- function testBadCentralEntrySignature() {
+ public function testBadCentralEntrySignature() {
$this->readZipAssertError( 'wrong-central-entry-sig.zip', 'zip-bad',
'Bad central entry error' );
}
- function testTrailingBytes() {
+ public function testTrailingBytes() {
$this->readZipAssertError( 'trail.zip', 'zip-bad',
'Trailing bytes error' );
}
- function testWrongCDStart() {
+ public function testWrongCDStart() {
$this->readZipAssertError( 'wrong-cd-start-disk.zip', 'zip-unsupported',
'Wrong CD start disk error' );
}
- function testCentralDirectoryGap() {
+ public function testCentralDirectoryGap() {
$this->readZipAssertError( 'cd-gap.zip', 'zip-bad',
'CD gap error' );
}
- function testCentralDirectoryTruncated() {
+ public function testCentralDirectoryTruncated() {
$this->readZipAssertError( 'cd-truncated.zip', 'zip-bad',
'CD truncated error (should hit unpack() overrun)' );
}
- function testLooksLikeZip64() {
+ public function testLooksLikeZip64() {
$this->readZipAssertError( 'looks-like-zip64.zip', 'zip-unsupported',
'A file which looks like ZIP64 but isn\'t, should give error' );
}
+++ /dev/null
-<?php
-
-/**
- * @group Database
- * @group API
- * @group medium
- */
-class ApiCreateAccountTest extends ApiTestCase {
- function setUp() {
- parent::setUp();
- LoginForm::setCreateaccountToken();
- $this->setMwGlobals( array( 'wgEnableEmail' => true ) );
- }
-
- /**
- * Test the account creation API with a valid request. Also
- * make sure the new account can log in and is valid.
- *
- * This test does multiple API requests so it might end up being
- * a bit slow. Raise the default timeout.
- * @group medium
- */
- function testValid() {
- global $wgServer;
-
- if ( !isset( $wgServer ) ) {
- $this->markTestIncomplete( 'This test needs $wgServer to be set in LocalSettings.php' );
- }
-
- $password = User::randomPassword();
-
- $ret = $this->doApiRequest( array(
- 'action' => 'createaccount',
- 'name' => 'Apitestnew',
- 'password' => $password,
- 'email' => 'test@domain.test',
- 'realname' => 'Test Name'
- ) );
-
- $result = $ret[0];
- $this->assertNotInternalType( 'bool', $result );
- $this->assertNotInternalType( 'null', $result['createaccount'] );
-
- // Should first ask for token.
- $a = $result['createaccount'];
- $this->assertEquals( 'needtoken', $a['result'] );
- $token = $a['token'];
-
- // Finally create the account
- $ret = $this->doApiRequest(
- array(
- 'action' => 'createaccount',
- 'name' => 'Apitestnew',
- 'password' => $password,
- 'token' => $token,
- 'email' => 'test@domain.test',
- 'realname' => 'Test Name'
- ),
- $ret[2]
- );
-
- $result = $ret[0];
- $this->assertNotInternalType( 'bool', $result );
- $this->assertEquals( 'success', $result['createaccount']['result'] );
-
- // Try logging in with the new user.
- $ret = $this->doApiRequest( array(
- 'action' => 'login',
- 'lgname' => 'Apitestnew',
- 'lgpassword' => $password,
- ) );
-
- $result = $ret[0];
- $this->assertNotInternalType( 'bool', $result );
- $this->assertNotInternalType( 'null', $result['login'] );
-
- $a = $result['login']['result'];
- $this->assertEquals( 'NeedToken', $a );
- $token = $result['login']['token'];
-
- $ret = $this->doApiRequest(
- array(
- 'action' => 'login',
- 'lgtoken' => $token,
- 'lgname' => 'Apitestnew',
- 'lgpassword' => $password,
- ),
- $ret[2]
- );
-
- $result = $ret[0];
-
- $this->assertNotInternalType( 'bool', $result );
- $a = $result['login']['result'];
-
- $this->assertEquals( 'Success', $a );
-
- // log out to destroy the session
- $ret = $this->doApiRequest(
- array(
- 'action' => 'logout',
- ),
- $ret[2]
- );
- $this->assertEquals( array(), $ret[0] );
- }
-
- /**
- * Make sure requests with no names are invalid.
- * @expectedException UsageException
- */
- function testNoName() {
- $this->doApiRequest( array(
- 'action' => 'createaccount',
- 'token' => LoginForm::getCreateaccountToken(),
- 'password' => 'password',
- ) );
- }
-
- /**
- * Make sure requests with no password are invalid.
- * @expectedException UsageException
- */
- function testNoPassword() {
- $this->doApiRequest( array(
- 'action' => 'createaccount',
- 'name' => 'testName',
- 'token' => LoginForm::getCreateaccountToken(),
- ) );
- }
-
- /**
- * Make sure requests with existing users are invalid.
- * @expectedException UsageException
- */
- function testExistingUser() {
- $this->doApiRequest( array(
- 'action' => 'createaccount',
- 'name' => 'Apitestsysop',
- 'token' => LoginForm::getCreateaccountToken(),
- 'password' => 'password',
- 'email' => 'test@domain.test',
- ) );
- }
-
- /**
- * Make sure requests with invalid emails are invalid.
- * @expectedException UsageException
- */
- function testInvalidEmail() {
- $this->doApiRequest( array(
- 'action' => 'createaccount',
- 'name' => 'Test User',
- 'token' => LoginForm::getCreateaccountToken(),
- 'password' => 'password',
- 'email' => 'invalid',
- ) );
- }
-}
* @group API
* @group Database
* @group medium
+ *
+ * @covers ApiBlock
*/
class ApiBlockTest extends ApiTestCase {
protected function setUp() {
$this->doLogin();
}
- function getTokens() {
+ protected function getTokens() {
return $this->getTokenList( self::$users['sysop'] );
}
* Which made the Block/Unblock API to actually verify the token
* previously always considered valid (bug 34212).
*/
- function testMakeNormalBlock() {
+ public function testMakeNormalBlock() {
$tokens = $this->getTokens();
$user = User::newFromName( 'UTApiBlockee' );
}
/**
- * Attempting to block without a token should give a UsageException with
- * error message:
- * "The token parameter must be set"
- *
- * @dataProvider provideBlockUnblockAction
* @expectedException UsageException
+ * @expectedExceptionMessage The token parameter must be set
*/
- function testBlockingActionWithNoToken( $action ) {
+ public function testBlockingActionWithNoToken( ) {
$this->doApiRequest(
array(
- 'action' => $action,
+ 'action' => 'block',
'user' => 'UTApiBlockee',
'reason' => 'Some reason',
),
self::$users['sysop']->user
);
}
-
- /**
- * Just provide the 'block' and 'unblock' action to test both API calls
- */
- public static function provideBlockUnblockAction() {
- return array(
- array( 'block' ),
- array( 'unblock' ),
- );
- }
}
--- /dev/null
+<?php
+
+/**
+ * @group Database
+ * @group API
+ * @group medium
+ *
+ * @covers ApiCreateAccount
+ */
+class ApiCreateAccountTest extends ApiTestCase {
+ protected function setUp() {
+ parent::setUp();
+ LoginForm::setCreateaccountToken();
+ $this->setMwGlobals( array( 'wgEnableEmail' => true ) );
+ }
+
+ /**
+ * Test the account creation API with a valid request. Also
+ * make sure the new account can log in and is valid.
+ *
+ * This test does multiple API requests so it might end up being
+ * a bit slow. Raise the default timeout.
+ * @group medium
+ */
+ public function testValid() {
+ global $wgServer;
+
+ if ( !isset( $wgServer ) ) {
+ $this->markTestIncomplete( 'This test needs $wgServer to be set in LocalSettings.php' );
+ }
+
+ $password = User::randomPassword();
+
+ $ret = $this->doApiRequest( array(
+ 'action' => 'createaccount',
+ 'name' => 'Apitestnew',
+ 'password' => $password,
+ 'email' => 'test@domain.test',
+ 'realname' => 'Test Name'
+ ) );
+
+ $result = $ret[0];
+ $this->assertNotInternalType( 'bool', $result );
+ $this->assertNotInternalType( 'null', $result['createaccount'] );
+
+ // Should first ask for token.
+ $a = $result['createaccount'];
+ $this->assertEquals( 'needtoken', $a['result'] );
+ $token = $a['token'];
+
+ // Finally create the account
+ $ret = $this->doApiRequest(
+ array(
+ 'action' => 'createaccount',
+ 'name' => 'Apitestnew',
+ 'password' => $password,
+ 'token' => $token,
+ 'email' => 'test@domain.test',
+ 'realname' => 'Test Name'
+ ),
+ $ret[2]
+ );
+
+ $result = $ret[0];
+ $this->assertNotInternalType( 'bool', $result );
+ $this->assertEquals( 'success', $result['createaccount']['result'] );
+
+ // Try logging in with the new user.
+ $ret = $this->doApiRequest( array(
+ 'action' => 'login',
+ 'lgname' => 'Apitestnew',
+ 'lgpassword' => $password,
+ ) );
+
+ $result = $ret[0];
+ $this->assertNotInternalType( 'bool', $result );
+ $this->assertNotInternalType( 'null', $result['login'] );
+
+ $a = $result['login']['result'];
+ $this->assertEquals( 'NeedToken', $a );
+ $token = $result['login']['token'];
+
+ $ret = $this->doApiRequest(
+ array(
+ 'action' => 'login',
+ 'lgtoken' => $token,
+ 'lgname' => 'Apitestnew',
+ 'lgpassword' => $password,
+ ),
+ $ret[2]
+ );
+
+ $result = $ret[0];
+
+ $this->assertNotInternalType( 'bool', $result );
+ $a = $result['login']['result'];
+
+ $this->assertEquals( 'Success', $a );
+
+ // log out to destroy the session
+ $ret = $this->doApiRequest(
+ array(
+ 'action' => 'logout',
+ ),
+ $ret[2]
+ );
+ $this->assertEquals( array(), $ret[0] );
+ }
+
+ /**
+ * Make sure requests with no names are invalid.
+ * @expectedException UsageException
+ */
+ public function testNoName() {
+ $this->doApiRequest( array(
+ 'action' => 'createaccount',
+ 'token' => LoginForm::getCreateaccountToken(),
+ 'password' => 'password',
+ ) );
+ }
+
+ /**
+ * Make sure requests with no password are invalid.
+ * @expectedException UsageException
+ */
+ public function testNoPassword() {
+ $this->doApiRequest( array(
+ 'action' => 'createaccount',
+ 'name' => 'testName',
+ 'token' => LoginForm::getCreateaccountToken(),
+ ) );
+ }
+
+ /**
+ * Make sure requests with existing users are invalid.
+ * @expectedException UsageException
+ */
+ public function testExistingUser() {
+ $this->doApiRequest( array(
+ 'action' => 'createaccount',
+ 'name' => 'Apitestsysop',
+ 'token' => LoginForm::getCreateaccountToken(),
+ 'password' => 'password',
+ 'email' => 'test@domain.test',
+ ) );
+ }
+
+ /**
+ * Make sure requests with invalid emails are invalid.
+ * @expectedException UsageException
+ */
+ public function testInvalidEmail() {
+ $this->doApiRequest( array(
+ 'action' => 'createaccount',
+ 'name' => 'Test User',
+ 'token' => LoginForm::getCreateaccountToken(),
+ 'password' => 'password',
+ 'email' => 'invalid',
+ ) );
+ }
+}
* @group API
* @group Database
* @group medium
+ *
+ * @covers ApiEditPage
*/
class ApiEditPageTest extends ApiTestCase {
parent::tearDown();
}
- function testEdit() {
+ public function testEdit() {
$name = 'Help:ApiEditPageTest_testEdit'; // assume Help namespace to default to wikitext
// -- test new page --------------------------------------------
);
}
- function testNonTextEdit() {
+ public function testNonTextEdit() {
$name = 'Dummy:ApiEditPageTest_testNonTextEdit';
$data = serialize( 'some bla bla text' );
/**
* @dataProvider provideEditAppend
*/
- function testEditAppend( $text, $op, $append, $expected ) {
+ public function testEditAppend( $text, $op, $append, $expected ) {
static $count = 0;
$count++;
/**
* Test editing of sections
*/
- function testEditSection() {
+ public function testEditSection() {
$name = 'Help:ApiEditPageTest_testEditSection';
$page = WikiPage::factory( Title::newFromText( $name ) );
$text = "==section 1==\ncontent 1\n==section 2==\ncontent2";
* page that doesn't exist (bug 52830) and one that
* does exist
*/
- function testEditNewSection() {
+ public function testEditNewSection() {
$name = 'Help:ApiEditPageTest_testEditNewSection';
// Test on a page that does not already exist
$this->assertEquals( $text, "== header ==\n\ntest\n\n== header ==\n\ntest" );
}
- function testEditConflict() {
+ public function testEditConflict() {
static $count = 0;
$count++;
}
}
- function testEditConflict_redirect() {
+ public function testEditConflict_redirect() {
static $count = 0;
$count++;
}
}
- function testEditConflict_bug41990() {
+ public function testEditConflict_bug41990() {
static $count = 0;
$count++;
* @group API
* @group Database
* @group medium
+ *
+ * @covers ApiOptions
*/
class ApiOptionsTest extends MediaWikiLangTestCase {
- private $mTested, $mUserMock, $mContext, $mSession;
+ /** @var PHPUnit_Framework_MockObject_MockObject */
+ private $mUserMock ;
+ /** @var ApiOptions */
+ private $mTested;
+ private $mSession;
+ /** @var DerivativeContext */
+ private $mContext;
private $mOldGetPreferencesHooks = false;
* @group API
* @group Database
* @group medium
+ *
+ * @covers ApiParse
*/
class ApiParseTest extends ApiTestCase {
$this->doLogin();
}
- function testParseNonexistentPage() {
+ public function testParseNonexistentPage() {
$somePage = mt_rand();
try {
* @group API
* @group Database
* @group medium
+ *
+ * @covers ApiPurge
*/
class ApiPurgeTest extends ApiTestCase {
/**
* @group Broken
*/
- function testPurgeMainPage() {
+ public function testPurgeMainPage() {
if ( !Title::newFromText( 'UTPage' )->exists() ) {
$this->markTestIncomplete( "The article [[UTPage]] does not exist" );
}
*/
class ApiTest extends ApiTestCase {
- function testRequireOnlyOneParameterDefault() {
+ public function testRequireOnlyOneParameterDefault() {
$mock = new MockApi();
$this->assertEquals(
/**
* @expectedException UsageException
*/
- function testRequireOnlyOneParameterZero() {
+ public function testRequireOnlyOneParameterZero() {
$mock = new MockApi();
$this->assertEquals(
/**
* @expectedException UsageException
*/
- function testRequireOnlyOneParameterTrue() {
+ public function testRequireOnlyOneParameterTrue() {
$mock = new MockApi();
$this->assertEquals(
*
* @expectedException UsageException
*/
- function testApi() {
+ public function testApi() {
$api = new ApiMain(
new FauxRequest( array( 'action' => 'help', 'format' => 'xml' ) )
);
/**
* Test result of attempted login with an empty username
*/
- function testApiLoginNoName() {
+ public function testApiLoginNoName() {
$data = $this->doApiRequest( array( 'action' => 'login',
'lgname' => '', 'lgpassword' => self::$users['sysop']->password,
) );
$this->assertEquals( 'NoName', $data[0]['login']['result'] );
}
- function testApiLoginBadPass() {
+ public function testApiLoginBadPass() {
global $wgServer;
$user = self::$users['sysop'];
$this->assertEquals( "WrongPass", $a );
}
- function testApiLoginGoodPass() {
+ public function testApiLoginGoodPass() {
global $wgServer;
if ( !isset( $wgServer ) ) {
/**
* @group Broken
*/
- function testApiGotCookie() {
+ public function testApiGotCookie() {
$this->markTestIncomplete( "The server can't do external HTTP requests, and the internal one won't give cookies" );
global $wgServer, $wgScriptPath;
return $cj;
}
- function testRunLogin() {
+ public function testRunLogin() {
$sysopUser = self::$users['sysop'];
$data = $this->doApiRequest( array(
'action' => 'login',
return $data;
}
- function testGettingToken() {
+ public function testGettingToken() {
foreach ( self::$users as $user ) {
$this->runTokenTest( $user );
}
* @param $params Array: key-value API params
* @param $session Array|null: session array
* @param $user User|null A User object for the context
- * @return result of the API call
+ * @return mixed result of the API call
* @throws Exception in case wsToken is not set in the session
*/
protected function doApiRequestWithToken( array $params, array $session = null, User $user = null ) {
);
}
}
-
-class UserWrapper {
- public $userName;
- public $password;
- public $user;
-
- public function __construct( $userName, $password, $group = '' ) {
- $this->userName = $userName;
- $this->password = $password;
-
- $this->user = User::newFromName( $this->userName );
- if ( !$this->user->getID() ) {
- $this->user = User::createNew( $this->userName, array(
- "email" => "test@example.com",
- "real_name" => "Test User" ) );
- }
- $this->user->setPassword( $this->password );
-
- if ( $group !== '' ) {
- $this->user->addGroup( $group );
- }
- $this->user->saveSettings();
- }
-}
-
-class MockApi extends ApiBase {
- public function execute() {
- }
-
- public function getVersion() {
- }
-
- public function __construct() {
- }
-
- public function getAllowedParams() {
- return array(
- 'filename' => null,
- 'enablechunks' => false,
- 'sessionkey' => null,
- );
- }
-}
-
-class ApiTestContext extends RequestContext {
-
- /**
- * Returns a DerivativeContext with the request variables in place
- *
- * @param $request WebRequest request object including parameters and session
- * @param $user User or null
- * @return DerivativeContext
- */
- public function newTestContext( WebRequest $request, User $user = null ) {
- $context = new DerivativeContext( $this );
- $context->setRequest( $request );
- if ( $user !== null ) {
- $context->setUser( $user );
- }
-
- return $context;
- }
-}
--- /dev/null
+<?php
+
+class ApiTestContext extends RequestContext {
+
+ /**
+ * Returns a DerivativeContext with the request variables in place
+ *
+ * @param $request WebRequest request object including parameters and session
+ * @param $user User or null
+ * @return DerivativeContext
+ */
+ public function newTestContext( WebRequest $request, User $user = null ) {
+ $context = new DerivativeContext( $this );
+ $context->setRequest( $request );
+ if ( $user !== null ) {
+ $context->setUser( $user );
+ }
+
+ return $context;
+ }
+}
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+ * @group API
+ * @group Database
+ * @group medium
+ *
+ * @covers ApiUnblock
+ */
+class ApiUnblockTest extends ApiTestCase {
+ protected function setUp() {
+ parent::setUp();
+ $this->doLogin();
+ }
+
+ /**
+ * @expectedException UsageException
+ */
+ public function testWithNoToken( ) {
+ $this->doApiRequest(
+ array(
+ 'action' => 'unblock',
+ 'user' => 'UTApiBlockee',
+ 'reason' => 'Some reason',
+ ),
+ null,
+ false,
+ self::$users['sysop']->user
+ );
+ }
+}
* Testing login
* XXX this is a funny way of getting session context
*/
- function testLogin() {
+ public function testLogin() {
$user = self::$users['uploader'];
$params = array(
/**
*/
- function testWatchEdit() {
+ public function testWatchEdit() {
$tokens = $this->getTokens();
$data = $this->doApiRequest( array(
/**
* @depends testWatchEdit
*/
- function testWatchClear() {
+ public function testWatchClear() {
$tokens = $this->getTokens();
$data = $this->doApiRequest( array(
/**
*/
- function testWatchProtect() {
+ public function testWatchProtect() {
$tokens = $this->getTokens();
$data = $this->doApiRequest( array(
/**
*/
- function testGetRollbackToken() {
+ public function testGetRollbackToken() {
$this->getTokens();
if ( !Title::newFromText( 'Help:UTPage' )->exists() ) {
*
* @depends testGetRollbackToken
*/
- function testWatchRollback( $data ) {
+ public function testWatchRollback( $data ) {
$keys = array_keys( $data[0]['query']['pages'] );
$key = array_pop( $keys );
$pageinfo = $data[0]['query']['pages'][$key];
--- /dev/null
+<?php
+
+class MockApi extends ApiBase {
+ public function execute() {
+ }
+
+ public function getVersion() {
+ }
+
+ public function __construct() {
+ }
+
+ public function getAllowedParams() {
+ return array(
+ 'filename' => null,
+ 'enablechunks' => false,
+ 'sessionkey' => null,
+ );
+ }
+}
\ No newline at end of file
* @group API
*/
class PrefixUniquenessTest extends MediaWikiTestCase {
+
public function testPrefixes() {
$main = new ApiMain( new FauxRequest() );
$query = new ApiQuery( $main, 'foo', 'bar' );
$prefixes = array();
foreach ( $modules as $name => $class ) {
+ /** @var ApiMain $module */
$module = new $class( $main, $name );
$prefix = $module->getModulePrefix();
if ( isset( $prefixes[$prefix] ) ) {
--- /dev/null
+<?php
+
+class UserWrapper {
+ public $userName;
+ public $password;
+ public $user;
+
+ public function __construct( $userName, $password, $group = '' ) {
+ $this->userName = $userName;
+ $this->password = $password;
+
+ $this->user = User::newFromName( $this->userName );
+ if ( !$this->user->getID() ) {
+ $this->user = User::createNew( $this->userName, array(
+ "email" => "test@example.com",
+ "real_name" => "Test User" ) );
+ }
+ $this->user->setPassword( $this->password );
+
+ if ( $group !== '' ) {
+ $this->user->addGroup( $group );
+ }
+ $this->user->saveSettings();
+ }
+}
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+ * @group API
+ * @group Database
+ * @group medium
+ * @covers ApiFormatJson
+ */
+class ApiFormatJsonTest extends ApiFormatTestBase {
+
+ public function testValidSyntax( ) {
+ $data = $this->apiRequest( 'json', array( 'action' => 'query', 'meta' => 'siteinfo' ) );
+
+ $this->assertInternalType( 'array', json_decode( $data, true ) );
+ $this->assertGreaterThan( 0, count( (array)$data ) );
+ }
+}
* @group API
* @group Database
* @group medium
+ * @covers ApiFormatPhp
*/
class ApiFormatPhpTest extends ApiFormatTestBase {
- function testValidPhpSyntax() {
-
+ public function testValidyntax( ) {
$data = $this->apiRequest( 'php', array( 'action' => 'query', 'meta' => 'siteinfo' ) );
$this->assertInternalType( 'array', unserialize( $data ) );
<?php
abstract class ApiFormatTestBase extends ApiTestCase {
+
+ /**
+ * @param string $format
+ * @param array $params
+ * @param $data
+ *
+ * @return string
+ */
protected function apiRequest( $format, $params, $data = null ) {
$data = parent::doApiRequest( $params, $data, true );
+ /** @var ApiMain $module */
$module = $data[3];
$printer = $module->createPrinterByName( $format );
return $out;
}
+
}
--- /dev/null
+<?php
+
+/**
+ * @group API
+ * @group Database
+ * @group medium
+ * @covers ApiFormatWddx
+ */
+class ApiFormatWddxTest extends ApiFormatTestBase {
+
+ public function testValidSyntax( ) {
+ $data = $this->apiRequest( 'wddx', array( 'action' => 'query', 'meta' => 'siteinfo' ) );
+
+ $this->assertInternalType( 'array', wddx_deserialize( $data ) );
+ $this->assertGreaterThan( 0, count( (array)$data ) );
+ }
+}
require_once 'ApiQueryTestBase.php';
-/** These tests validate basic functionality of the api query module
+/**
+ * These tests validate basic functionality of the api query module
*
* @group API
* @group Database
* @group medium
+ * @covers ApiQuery
*/
class ApiQueryBasicTest extends ApiQueryTestBase {
/**
* @group API
* @group Database
* @group medium
+ * @covers ApiQuery
*/
class ApiQueryContinue2Test extends ApiQueryContinueTestBase {
/**
* @group API
* @group Database
* @group medium
+ * @covers ApiQuery
*/
class ApiQueryContinueTest extends ApiQueryContinueTestBase {
/**
<?php
/**
- *
- *
* Created on Jan 1, 2013
*
* Copyright © 2013 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
* @group API
* @group Database
* @group medium
+ * @covers ApiQueryRevisions
*/
class ApiQueryRevisionsTest extends ApiTestCase {
/**
* @group medium
*/
- function testContentComesWithContentModelAndFormat() {
+ public function testContentComesWithContentModelAndFormat() {
$pageName = 'Help:' . __METHOD__;
$title = Title::newFromText( $pageName );
$page = WikiPage::factory( $title );
* @group API
* @group Database
* @group medium
+ * @covers ApiQuery
*/
class ApiQueryTest extends ApiTestCase {
$this->doLogin();
}
- function testTitlesGetNormalized() {
+ public function testTitlesGetNormalized() {
global $wgMetaNamespace;
);
}
- function testTitlesAreRejectedIfInvalid() {
+ public function testTitlesAreRejectedIfInvalid() {
$title = false;
while ( !$title || Title::newFromText( $title )->exists() ) {
$title = md5( mt_rand( 0, 10000 ) + rand( 0, 999000 ) );
<?php
/**
- *
- *
* Created on Feb 10, 2013
*
* Copyright © 2013 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
* @dataProvider provideUserGenders
* @covers GenderCache::getGenderOf
*/
- function testUserName( $username, $expectedGender ) {
+ public function testUserName( $username, $expectedGender ) {
$genderCache = GenderCache::singleton();
$gender = $genderCache->getGenderOf( $username );
$this->assertEquals( $gender, $expectedGender, "GenderCache normal" );
* @dataProvider provideUserGenders
* @covers GenderCache::getGenderOf
*/
- function testUserObjects( $username, $expectedGender ) {
+ public function testUserObjects( $username, $expectedGender ) {
$genderCache = GenderCache::singleton();
$user = User::newFromName( $username );
$gender = $genderCache->getGenderOf( $user );
* @dataProvider provideStripSubpages
* @covers GenderCache::getGenderOf
*/
- function testStripSubpages( $pageWithSubpage, $expectedGender ) {
+ public function testStripSubpages( $pageWithSubpage, $expectedGender ) {
$genderCache = GenderCache::singleton();
$gender = $genderCache->getGenderOf( $pageWithSubpage );
$this->assertEquals( $gender, $expectedGender, "GenderCache must strip of subpages" );
*
* @dataProvider provideMessagesForFallback
*/
- function testMessageFallbacks( $message, $lang, $expectedContent ) {
+ public function testMessageFallbacks( $message, $lang, $expectedContent ) {
$result = MessageCache::singleton()->get( $message, true, $lang );
$this->assertEquals( $expectedContent, $result, "Message fallback failed." );
}
*
* @dataProvider provideMessagesForFullKeys
*/
- function testFullKeyBehaviour( $message, $lang, $expectedContent ) {
+ public function testFullKeyBehaviour( $message, $lang, $expectedContent ) {
$result = MessageCache::singleton()->get( $message, true, $lang, true );
$this->assertEquals( $expectedContent, $result, "Full key message fallback failed." );
}
/**
* Highlight diff between assertEquals and assertNotSame
*/
- function testPhpUnitArrayEquality() {
+ public function testPhpUnitArrayEquality() {
$one = array( 'A' => 1, 'B' => 2 );
$two = array( 'B' => 2, 'A' => 1 );
$this->assertEquals( $one, $two ); // ==
* @dataProvider provideInvalidConstructorArg
* @expectedException MWException
*/
- function testConstructorGivenInvalidValue( $maxSize ) {
+ public function testConstructorGivenInvalidValue( $maxSize ) {
new ProcessCacheLRUTestable( $maxSize );
}
);
}
- function testAddAndGetAKey() {
+ public function testAddAndGetAKey() {
$oneCache = new ProcessCacheLRUTestable( 1 );
$this->assertCacheEmpty( $oneCache );
$this->assertEquals( 'value1', $oneCache->get( 'cache-key', 'prop1' ) );
}
- function testDeleteOldKey() {
+ public function testDeleteOldKey() {
$oneCache = new ProcessCacheLRUTestable( 1 );
$this->assertCacheEmpty( $oneCache );
* @param $cacheMaxEntries Maximum entry the created cache will hold
* @param $entryToFill Number of entries to insert in the created cache.
*/
- function testFillingCache( $cacheMaxEntries, $entryToFill, $msg = '' ) {
+ public function testFillingCache( $cacheMaxEntries, $entryToFill, $msg = '' ) {
$cache = new ProcessCacheLRUTestable( $cacheMaxEntries );
$this->fillCache( $cache, $entryToFill );
* Create a cache with only one remaining entry then update
* the first inserted entry. Should bump it to the top.
*/
- function testReplaceExistingKeyShouldBumpEntryToTop() {
+ public function testReplaceExistingKeyShouldBumpEntryToTop() {
$maxEntries = 3;
$cache = new ProcessCacheLRUTestable( $maxEntries );
);
}
- function testRecentlyAccessedKeyStickIn() {
+ public function testRecentlyAccessedKeyStickIn() {
$cache = new ProcessCacheLRUTestable( 2 );
$cache->set( 'first', 'prop1', 'value1' );
$cache->set( 'second', 'prop2', 'value2' );
* Given a cache having 1,2,3 as key, updating 2 should bump 2 to
* the top of the queue with the new value: 1,3,2* (* = updated).
*/
- function testReplaceExistingKeyInAFullCacheShouldBumpToTop() {
+ public function testReplaceExistingKeyInAFullCacheShouldBumpToTop() {
$maxEntries = 3;
$cache = new ProcessCacheLRUTestable( $maxEntries );
);
}
- function testBumpExistingKeyToTop() {
+ public function testBumpExistingKeyToTop() {
$cache = new ProcessCacheLRUTestable( 3 );
$this->fillCache( $cache, 3 );
* @dataProvider provideDiapers
* @covers DatabaseMysqlBase::addIdentifierQuotes
*/
- function testAddIdentifierQuotes( $expected, $in ) {
+ public function testAddIdentifierQuotes( $expected, $in ) {
$db = new FakeDatabaseMysqlBase();
$quoted = $db->addIdentifierQuotes( $in );
$this->assertEquals($expected, $quoted);
* @dataProvider provideSelect
* @covers DatabaseBase::select
*/
- function testSelect( $sql, $sqlText ) {
+ public function testSelect( $sql, $sqlText ) {
$this->database->select(
$sql['tables'],
$sql['fields'],
* @dataProvider provideUpdate
* @covers DatabaseBase::update
*/
- function testUpdate( $sql, $sqlText ) {
+ public function testUpdate( $sql, $sqlText ) {
$this->database->update(
$sql['table'],
$sql['values'],
* @dataProvider provideDelete
* @covers DatabaseBase::delete
*/
- function testDelete( $sql, $sqlText ) {
+ public function testDelete( $sql, $sqlText ) {
$this->database->delete(
$sql['table'],
$sql['conds'],
* @dataProvider provideUpsert
* @covers DatabaseBase::upsert
*/
- function testUpsert( $sql, $sqlText ) {
+ public function testUpsert( $sql, $sqlText ) {
$this->database->upsert(
$sql['table'],
$sql['rows'],
* @dataProvider provideDeleteJoin
* @covers DatabaseBase::deleteJoin
*/
- function testDeleteJoin( $sql, $sqlText ) {
+ public function testDeleteJoin( $sql, $sqlText ) {
$this->database->deleteJoin(
$sql['delTable'],
$sql['joinTable'],
* @dataProvider provideInsert
* @covers DatabaseBase::insert
*/
- function testInsert( $sql, $sqlText ) {
+ public function testInsert( $sql, $sqlText ) {
$this->database->insert(
$sql['table'],
$sql['rows'],
* @dataProvider provideInsertSelect
* @covers DatabaseBase::insertSelect
*/
- function testInsertSelect( $sql, $sqlText ) {
+ public function testInsertSelect( $sql, $sqlText ) {
$this->database->insertSelect(
$sql['destTable'],
$sql['srcTable'],
* @dataProvider provideReplace
* @covers DatabaseBase::replace
*/
- function testReplace( $sql, $sqlText ) {
+ public function testReplace( $sql, $sqlText ) {
$this->database->replace(
$sql['table'],
$sql['uniqueIndexes'],
* @dataProvider provideNativeReplace
* @covers DatabaseBase::nativeReplace
*/
- function testNativeReplace( $sql, $sqlText ) {
+ public function testNativeReplace( $sql, $sqlText ) {
$this->database->nativeReplace(
$sql['table'],
$sql['rows'],
* @dataProvider provideConditional
* @covers DatabaseBase::conditional
*/
- function testConditional( $sql, $sqlText ) {
+ public function testConditional( $sql, $sqlText ) {
$this->assertEquals( trim( $this->database->conditional(
$sql['conds'],
$sql['true'],
* @dataProvider provideBuildConcat
* @covers DatabaseBase::buildConcat
*/
- function testBuildConcat( $stringList, $sqlText ) {
+ public function testBuildConcat( $stringList, $sqlText ) {
$this->assertEquals( trim( $this->database->buildConcat(
$stringList
) ), $sqlText );
* @dataProvider provideBuildLike
* @covers DatabaseBase::buildLike
*/
- function testBuildLike( $array, $sqlText ) {
+ public function testBuildLike( $array, $sqlText ) {
$this->assertEquals( trim( $this->database->buildLike(
$array
) ), $sqlText );
* @dataProvider provideUnionQueries
* @covers DatabaseBase::unionQueries
*/
- function testUnionQueries( $sql, $sqlText ) {
+ public function testUnionQueries( $sql, $sqlText ) {
$this->assertEquals( trim( $this->database->unionQueries(
$sql['sqls'],
$sql['all']
/**
* @covers DatabaseBase::commit
*/
- function testTransactionCommit() {
+ public function testTransactionCommit() {
$this->database->begin( __METHOD__ );
$this->database->commit( __METHOD__ );
$this->assertLastSql( 'BEGIN; COMMIT' );
/**
* @covers DatabaseBase::rollback
*/
- function testTransactionRollback() {
+ public function testTransactionRollback() {
$this->database->begin( __METHOD__ );
$this->database->rollback( __METHOD__ );
$this->assertLastSql( 'BEGIN; ROLLBACK' );
/**
* @covers DatabaseBase::dropTable
*/
- function testDropTable() {
+ public function testDropTable() {
$this->database->setExistingTables( array( 'table' ) );
$this->database->dropTable( 'table', __METHOD__ );
$this->assertLastSql( 'DROP TABLE table' );
/**
* @covers DatabaseBase::dropTable
*/
- function testDropNonExistingTable() {
+ public function testDropNonExistingTable() {
$this->assertFalse(
$this->database->dropTable( 'non_existing', __METHOD__ )
);
return $indexes;
}
- function testCaseInsensitiveLike() {
+ public function testCaseInsensitiveLike() {
// TODO: Test this for all databases
$db = new DatabaseSqliteStandalone( ':memory:' );
$res = $db->query( 'SELECT "a" LIKE "A" AS a' );
/**
* @covers DatabaseBase::dropTable
*/
- function testAddQuotesNull() {
+ public function testAddQuotesNull() {
$check = "NULL";
if ( $this->db->getType() === 'sqlite' || $this->db->getType() === 'oracle' ) {
$check = "''";
$this->assertEquals( $check, $this->db->addQuotes( null ) );
}
- function testAddQuotesInt() {
+ public function testAddQuotesInt() {
# returning just "1234" should be ok too, though...
# maybe
$this->assertEquals(
$this->db->addQuotes( 1234 ) );
}
- function testAddQuotesFloat() {
+ public function testAddQuotesFloat() {
# returning just "1234.5678" would be ok too, though
$this->assertEquals(
"'1234.5678'",
$this->db->addQuotes( 1234.5678 ) );
}
- function testAddQuotesString() {
+ public function testAddQuotesString() {
$this->assertEquals(
"'string'",
$this->db->addQuotes( 'string' ) );
}
- function testAddQuotesStringQuote() {
+ public function testAddQuotesStringQuote() {
$check = "'string''s cause trouble'";
if ( $this->db->getType() === 'mysql' ) {
$check = "'string\'s cause trouble'";
}
}
- function testTableNameLocal() {
+ public function testTableNameLocal() {
$this->assertEquals(
$this->prefixAndQuote( 'tablename' ),
$this->db->tableName( 'tablename' )
);
}
- function testTableNameRawLocal() {
+ public function testTableNameRawLocal() {
$this->assertEquals(
$this->prefixAndQuote( 'tablename', null, null, 'raw' ),
$this->db->tableName( 'tablename', 'raw' )
);
}
- function testTableNameShared() {
+ public function testTableNameShared() {
$this->assertEquals(
$this->prefixAndQuote( 'tablename', 'sharedatabase', 'sh_' ),
$this->getSharedTableName( 'tablename', 'sharedatabase', 'sh_' )
);
}
- function testTableNameRawShared() {
+ public function testTableNameRawShared() {
$this->assertEquals(
$this->prefixAndQuote( 'tablename', 'sharedatabase', 'sh_', 'raw' ),
$this->getSharedTableName( 'tablename', 'sharedatabase', 'sh_', 'raw' )
);
}
- function testTableNameForeign() {
+ public function testTableNameForeign() {
$this->assertEquals(
$this->prefixAndQuote( 'tablename', 'databasename', '' ),
$this->db->tableName( 'databasename.tablename' )
);
}
- function testTableNameRawForeign() {
+ public function testTableNameRawForeign() {
$this->assertEquals(
$this->prefixAndQuote( 'tablename', 'databasename', '', 'raw' ),
$this->db->tableName( 'databasename.tablename', 'raw' )
);
}
- function testFillPreparedEmpty() {
+ public function testFillPreparedEmpty() {
$sql = $this->db->fillPrepared(
'SELECT * FROM interwiki', array() );
$this->assertEquals(
$sql );
}
- function testFillPreparedQuestion() {
+ public function testFillPreparedQuestion() {
$sql = $this->db->fillPrepared(
'SELECT * FROM cur WHERE cur_namespace=? AND cur_title=?',
array( 4, "Snicker's_paradox" ) );
$this->assertEquals( $check, $sql );
}
- function testFillPreparedBang() {
+ public function testFillPreparedBang() {
$sql = $this->db->fillPrepared(
'SELECT user_id FROM ! WHERE user_name=?',
array( '"user"', "Slash's Dot" ) );
$this->assertEquals( $check, $sql );
}
- function testFillPreparedRaw() {
+ public function testFillPreparedRaw() {
$sql = $this->db->fillPrepared(
"SELECT * FROM cur WHERE cur_title='This_\\&_that,_WTF\\?\\!'",
array( '"user"', "Slash's Dot" ) );
$sql );
}
- function testStoredFunctions() {
+ public function testStoredFunctions() {
if ( !in_array( wfGetDB( DB_MASTER )->getType(), array( 'mysql', 'postgres' ) ) ) {
$this->markTestSkipped( 'MySQL or Postgres required' );
}
);
}
- function testUnknownTableCorruptsResults() {
+ public function testUnknownTableCorruptsResults() {
$res = $this->db->select( 'page', '*', array( 'page_id' => 1 ) );
$this->assertFalse( $this->db->tableExists( 'foobarbaz' ) );
$this->assertInternalType( 'int', $res->numRows() );
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
* @author Daniel Kinzler
*/
+
+/**
+ * @covers PageORMTableForTesting
+ */
class ORMTableTest extends MediaWikiTestCase {
/**
*/
require_once __DIR__ . "/ORMRowTest.php";
+/**
+ * @covers TestORMRow
+ */
class TestORMRowTest extends ORMRowTest {
/**
parent::tearDown();
}
- function testAddLog() {
+ /**
+ * @covers MWDebug::log
+ */
+ public function testAddLog() {
MWDebug::log( 'logging a string' );
$this->assertEquals(
array( array(
);
}
- function testAddWarning() {
+ /**
+ * @covers MWDebug::warning
+ */
+ public function testAddWarning() {
MWDebug::warning( 'Warning message' );
$this->assertEquals(
array( array(
);
}
- function testAvoidDuplicateDeprecations() {
+ /**
+ * @covers MWDebug::deprecated
+ */
+ public function testAvoidDuplicateDeprecations() {
MWDebug::deprecated( 'wfOldFunction', '1.0', 'component' );
MWDebug::deprecated( 'wfOldFunction', '1.0', 'component' );
);
}
- function testAvoidNonConsecutivesDuplicateDeprecations() {
+ /**
+ * @covers MWDebug::deprecated
+ */
+ public function testAvoidNonConsecutivesDuplicateDeprecations() {
MWDebug::deprecated( 'wfOldFunction', '1.0', 'component' );
MWDebug::warning( 'some warning' );
MWDebug::log( 'we could have logged something too' );
* @expectedException MWException
* @covers FileRepo::__construct
*/
- function testFileRepoConstructionOptionCanNotBeNull() {
+ public function testFileRepoConstructionOptionCanNotBeNull() {
new FileRepo();
}
* @expectedException MWException
* @covers FileRepo::__construct
*/
- function testFileRepoConstructionOptionCanNotBeAnEmptyArray() {
+ public function testFileRepoConstructionOptionCanNotBeAnEmptyArray() {
new FileRepo( array() );
}
* @expectedException MWException
* @covers FileRepo::__construct
*/
- function testFileRepoConstructionOptionNeedNameKey() {
+ public function testFileRepoConstructionOptionNeedNameKey() {
new FileRepo( array(
'backend' => 'foobar'
) );
* @expectedException MWException
* @covers FileRepo::__construct
*/
- function testFileRepoConstructionOptionNeedBackendKey() {
+ public function testFileRepoConstructionOptionNeedBackendKey() {
new FileRepo( array(
'name' => 'foobar'
) );
/**
* @covers FileRepo::__construct
*/
- function testFileRepoConstructionWithRequiredOptions() {
+ public function testFileRepoConstructionWithRequiredOptions() {
$f = new FileRepo( array(
'name' => 'FileRepoTestRepository',
'backend' => new FSFileBackend( array(
* @covers InstallDocFormatter::format
* @dataProvider provideDocFormattingTests
*/
- function testFormat( $expected, $unformattedText, $message = '' ) {
+ public function testFormat( $expected, $unformattedText, $message = '' ) {
$this->assertEquals(
$expected,
InstallDocFormatter::format( $unformattedText ),
* @dataProvider provideOracleConnectStrings
* @covers OracleInstaller::checkConnectStringFormat
*/
- function testCheckConnectStringFormat( $expected, $connectString, $msg = '' ) {
+ public function testCheckConnectStringFormat( $expected, $connectString, $msg = '' ) {
$validity = $expected ? 'should be valid' : 'should NOT be valid';
$msg = "'$connectString' ($msg) $validity.";
$this->assertEquals( $expected,
/**
* @dataProvider provider_queueLists
+ * @covers JobQueue::getWiki
*/
- function testProperties( $queue, $recycles, $desc ) {
+ public function testGetWiki( $queue, $recycles, $desc ) {
$queue = $this->$queue;
if ( !$queue ) {
$this->markTestSkipped( $desc );
}
-
$this->assertEquals( wfWikiID(), $queue->getWiki(), "Proper wiki ID ($desc)" );
+ }
+
+ /**
+ * @dataProvider provider_queueLists
+ * @covers JobQueue::getType
+ */
+ public function testGetType( $queue, $recycles, $desc ) {
+ $queue = $this->$queue;
+ if ( !$queue ) {
+ $this->markTestSkipped( $desc );
+ }
$this->assertEquals( 'null', $queue->getType(), "Proper job type ($desc)" );
}
/**
* @dataProvider provider_queueLists
+ * @covers JobQueue
*/
- function testBasicOperations( $queue, $recycles, $desc ) {
+ public function testBasicOperations( $queue, $recycles, $desc ) {
$queue = $this->$queue;
if ( !$queue ) {
$this->markTestSkipped( $desc );
/**
* @dataProvider provider_queueLists
+ * @covers JobQueue
*/
- function testBasicDeduplication( $queue, $recycles, $desc ) {
+ public function testBasicDeduplication( $queue, $recycles, $desc ) {
$queue = $this->$queue;
if ( !$queue ) {
$this->markTestSkipped( $desc );
/**
* @dataProvider provider_queueLists
+ * @covers JobQueue
*/
- function testRootDeduplication( $queue, $recycles, $desc ) {
+ public function testRootDeduplication( $queue, $recycles, $desc ) {
$queue = $this->$queue;
if ( !$queue ) {
$this->markTestSkipped( $desc );
/**
* @dataProvider provider_fifoQueueLists
+ * @covers JobQueue
*/
- function testJobOrder( $queue, $recycles, $desc ) {
+ public function testJobOrder( $queue, $recycles, $desc ) {
$queue = $this->$queue;
if ( !$queue ) {
$this->markTestSkipped( $desc );
<?php
+/**
+ * @covers FormatJson
+ */
class FormatJsonTest extends MediaWikiTestCase {
public function testEncoderPrettyPrinting() {
* CSSJanus libary:
* http://code.google.com/p/cssjanus/source/browse/trunk/cssjanus_test.py
* Ported to PHP for ResourceLoader and has been extended since.
+ *
+ * @covers CSSJanus
*/
class CSSJanusTest extends MediaWikiTestCase {
/**
* @dataProvider provideTransformCases
*/
- function testTransform( $cssA, $cssB = null ) {
+ public function testTransform( $cssA, $cssB = null ) {
if ( $cssB ) {
$transformedA = CSSJanus::transform( $cssA );
/**
* @dataProvider provideTransformAdvancedCases
*/
- function testTransformAdvanced( $code, $expectedOutput, $options = array() ) {
+ public function testTransformAdvanced( $code, $expectedOutput, $options = array() ) {
$swapLtrRtlInURL = isset( $options['swapLtrRtlInURL'] ) ? $options['swapLtrRtlInURL'] : false;
$swapLeftRightInURL = isset( $options['swapLeftRightInURL'] ) ? $options['swapLeftRightInURL'] : false;
* @dataProvider provideTransformBrokenCases
* @group Broken
*/
- function testTransformBroken( $code, $expectedOutput ) {
+ public function testTransformBroken( $code, $expectedOutput ) {
$flipped = CSSJanus::transform( $code );
$this->assertEquals( $expectedOutput, $flipped, 'Test flipping' );
/**
* @dataProvider provideMinifyCases
+ * @covers CSSMin::minify
*/
- function testMinify( $code, $expectedOutput ) {
+ public function testMinify( $code, $expectedOutput ) {
$minified = CSSMin::minify( $code );
$this->assertEquals( $expectedOutput, $minified, 'Minified output should be in the form expected.' );
/**
* @dataProvider provideRemapCases
+ * @covers CSSMin::remap
*/
- function testRemap( $message, $params, $expectedOutput ) {
+ public function testRemap( $message, $params, $expectedOutput ) {
$remapped = call_user_func_array( 'CSSMin::remap', $params );
$messageAdd = " Case: $message";
*
* @group Broken
* @dataProvider provideStringCases
+ * @covers CSSMin::remap
*/
- function testMinifyWithCSSStringValues( $code, $expectedOutput ) {
+ public function testMinifyWithCSSStringValues( $code, $expectedOutput ) {
$this->testMinifyOutput( $code, $expectedOutput );
}
* @since 1.20
*
* @param array $elements
+ *
+ * @covers GenericArrayObject::__construct
*/
public function testConstructor( array $elements ) {
$arrayObject = $this->getNew( $elements );
* @since 1.20
*
* @param array $elements
+ *
+ * @covers GenericArrayObject::isEmpty
*/
public function testIsEmpty( array $elements ) {
$arrayObject = $this->getNew( $elements );
* @since 1.20
*
* @param GenericArrayObject $list
+ *
+ * @covers GenericArrayObject::offsetUnset
*/
public function testUnset( GenericArrayObject $list ) {
if ( $list->isEmpty() ) {
* @since 1.20
*
* @param array $elements
+ *
+ * @covers GenericArrayObject::append
*/
public function testAppend( array $elements ) {
$list = $this->getNew();
* @since 1.20
*
* @param callback $function
+ *
+ * @covers GenericArrayObject::getObjectType
*/
protected function checkTypeChecks( $function ) {
$excption = null;
* @since 1.20
*
* @param array $elements
+ *
+ * @covers GenericArrayObject::offsetSet
*/
public function testOffsetSet( array $elements ) {
if ( $elements === array() ) {
* @since 1.21
*
* @param GenericArrayObject $list
+ *
+ * @covers GenericArrayObject::getSerializationData
+ * @covers GenericArrayObject::serialize
+ * @covers GenericArrayObject::unserialize
*/
public function testSerialization( GenericArrayObject $list ) {
$serialization = serialize( $list );
/**
* Tests for IEUrlExtension::findIE6Extension
+ * @todo tests below for findIE6Extension should be split into...
+ * ...a dataprovider and test method.
*/
class IEUrlExtensionTest extends MediaWikiTestCase {
- function testSimple() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testSimple() {
$this->assertEquals(
'y',
IEUrlExtension::findIE6Extension( 'x.y' ),
);
}
- function testSimpleNoExt() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testSimpleNoExt() {
$this->assertEquals(
'',
IEUrlExtension::findIE6Extension( 'x' ),
);
}
- function testEmpty() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testEmpty() {
$this->assertEquals(
'',
IEUrlExtension::findIE6Extension( '' ),
);
}
- function testQuestionMark() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testQuestionMark() {
$this->assertEquals(
'',
IEUrlExtension::findIE6Extension( '?' ),
);
}
- function testExtQuestionMark() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testExtQuestionMark() {
$this->assertEquals(
'x',
IEUrlExtension::findIE6Extension( '.x?' ),
);
}
- function testQuestionMarkExt() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testQuestionMarkExt() {
$this->assertEquals(
'x',
IEUrlExtension::findIE6Extension( '?.x' ),
);
}
- function testInvalidChar() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testInvalidChar() {
$this->assertEquals(
'',
IEUrlExtension::findIE6Extension( '.x*' ),
);
}
- function testInvalidCharThenExtension() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testInvalidCharThenExtension() {
$this->assertEquals(
'x',
IEUrlExtension::findIE6Extension( '*.x' ),
);
}
- function testMultipleQuestionMarks() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testMultipleQuestionMarks() {
$this->assertEquals(
'c',
IEUrlExtension::findIE6Extension( 'a?b?.c?.d?e?f' ),
);
}
- function testExeException() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testExeException() {
$this->assertEquals(
'd',
IEUrlExtension::findIE6Extension( 'a?b?.exe?.d?.e' ),
);
}
- function testExeException2() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testExeException2() {
$this->assertEquals(
'exe',
IEUrlExtension::findIE6Extension( 'a?b?.exe' ),
);
}
- function testHash() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testHash() {
$this->assertEquals(
'',
IEUrlExtension::findIE6Extension( 'a#b.c' ),
);
}
- function testHash2() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testHash2() {
$this->assertEquals(
'',
IEUrlExtension::findIE6Extension( 'a?#b.c' ),
);
}
- function testDotAtEnd() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testDotAtEnd() {
$this->assertEquals(
'',
IEUrlExtension::findIE6Extension( '.' ),
);
}
- function testTwoDots() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testTwoDots() {
$this->assertEquals(
'z',
IEUrlExtension::findIE6Extension( 'x.y.z' ),
/**
* @dataProvider provideCases
+ * @covers JavaScriptMinifier::minify
*/
- function testJavaScriptMinifierOutput( $code, $expectedOutput ) {
+ public function testJavaScriptMinifierOutput( $code, $expectedOutput ) {
$minified = JavaScriptMinifier::minify( $code );
// JSMin+'s parser will throw an exception if output is not valid JS.
/**
* @dataProvider provideBug32548
+ * @covers JavaScriptMinifier::minify
*/
- function testBug32548Exponent( $num ) {
+ public function testBug32548Exponent( $num ) {
// Long line breaking was being incorrectly done between the base and
// exponent part of a number, causing a syntax error. The line should
// instead break at the start of the number.
return $logEntry;
}
+ /**
+ * @covers LogFormatter::newFromEntry
+ */
public function testNormalLogParams() {
$entry = $this->newLogEntry( 'test', array() );
$formatter = LogFormatter::newFromEntry( $entry );
$this->assertEquals( $titleLink, $paramsWithoutTools[2]['raw'] );
}
+ /**
+ * @covers LogFormatter::newFromEntry
+ * @covers LogFormatter::getActionText
+ */
public function testLogParamsTypeRaw() {
$params = array( '4:raw:raw' => Linker::link( $this->title, null, array(), array() ) );
$expected = Linker::link( $this->title, null, array(), array() );
$this->assertEquals( $expected, $logParam );
}
+ /**
+ * @covers LogFormatter::newFromEntry
+ * @covers LogFormatter::getActionText
+ */
public function testLogParamsTypeMsg() {
$params = array( '4:msg:msg' => 'log-description-phpunit' );
$expected = wfMessage( 'log-description-phpunit' )->text();
$this->assertEquals( $expected, $logParam );
}
+ /**
+ * @covers LogFormatter::newFromEntry
+ * @covers LogFormatter::getActionText
+ */
public function testLogParamsTypeMsgContent() {
$params = array( '4:msg-content:msgContent' => 'log-description-phpunit' );
$expected = wfMessage( 'log-description-phpunit' )->inContentLanguage()->text();
$this->assertEquals( $expected, $logParam );
}
+ /**
+ * @covers LogFormatter::newFromEntry
+ * @covers LogFormatter::getActionText
+ */
public function testLogParamsTypeNumber() {
global $wgLang;
$this->assertEquals( $expected, $logParam );
}
+ /**
+ * @covers LogFormatter::newFromEntry
+ * @covers LogFormatter::getActionText
+ */
public function testLogParamsTypeUserLink() {
$params = array( '4:user-link:userLink' => $this->user->getName() );
$expected = Linker::userLink(
$this->assertEquals( $expected, $logParam );
}
+ /**
+ * @covers LogFormatter::newFromEntry
+ * @covers LogFormatter::getActionText
+ */
public function testLogParamsTypeTitleLink() {
$params = array( '4:title-link:titleLink' => $this->title->getText() );
$expected = Linker::link( $this->title, null, array(), array() );
$this->assertEquals( $expected, $logParam );
}
+ /**
+ * @covers LogFormatter::newFromEntry
+ * @covers LogFormatter::getActionText
+ */
public function testLogParamsTypePlain() {
$params = array( '4:plain:plain' => 'Some plain text' );
$expected = 'Some plain text';
$this->assertEquals( $expected, $logParam );
}
+ /**
+ * @covers LogFormatter::newFromEntry
+ * @covers LogFormatter::getComment
+ */
public function testLogComment() {
$entry = $this->newLogEntry( 'test', array() );
$formatter = LogFormatter::newFromEntry( $entry );
* Basically the file has IPTC and XMP metadata, the
* IPTC should override the XMP, except for the multilingual
* translation (to en) where XMP should win.
+ * @covers BitmapMetadataHandler::Jpeg
*/
public function testMultilingualCascade() {
if ( !extension_loaded( 'exif' ) ) {
*
* There's more extensive tests of comment extraction in
* JpegMetadataExtractorTests.php
+ * @covers BitmapMetadataHandler::Jpeg
*/
public function testJpegComment() {
$meta = BitmapMetadataHandler::Jpeg( $this->filePath .
/**
* Make sure a bad iptc block doesn't stop the other metadata
* from being extracted.
+ * @covers BitmapMetadataHandler::Jpeg
*/
public function testBadIPTC() {
$meta = BitmapMetadataHandler::Jpeg( $this->filePath .
$this->assertEquals( 'Created with GIMP', $meta['JPEGFileComment'][0] );
}
+ /**
+ * @covers BitmapMetadataHandler::Jpeg
+ */
public function testIPTCDates() {
$meta = BitmapMetadataHandler::Jpeg( $this->filePath .
'iptc-timetest.jpg' );
/**
* File has an invalid time (+ one valid but really weird time)
* that shouldn't be included
+ * @covers BitmapMetadataHandler::Jpeg
*/
public function testIPTCDatesInvalid() {
$meta = BitmapMetadataHandler::Jpeg( $this->filePath .
* XMP data should take priority over iptc data
* when hash has been updated, but not when
* the hash is wrong.
+ * @covers BitmapMetadataHandler::addMetadata
+ * @covers BitmapMetadataHandler::getMetadataArray
*/
public function testMerging() {
$merger = new BitmapMetadataHandler();
$this->assertEquals( $expected, $actual );
}
+ /**
+ * @covers BitmapMetadataHandler::png
+ */
public function testPNGXMP() {
if ( !extension_loaded( 'xml' ) ) {
$this->markTestSkipped( "This test needs the xml extension." );
$this->assertEquals( $expected, $result );
}
+ /**
+ * @covers BitmapMetadataHandler::png
+ */
public function testPNGNative() {
$handler = new BitmapMetadataHandler();
$result = $handler->png( $this->filePath . 'Png-native-test.png' );
$this->assertEquals( $expected, $result['metadata']['Identifier']['x-default'] );
}
+ /**
+ * @covers BitmapMetadataHandler::getTiffByteOrder
+ */
public function testTiffByteOrder() {
$handler = new BitmapMetadataHandler();
$res = $handler->getTiffByteOrder( $this->filePath . 'test.tiff' );
/**
* @dataProvider provideNormaliseParams
+ * @covers BitmapHandler::normaliseParams
*/
- function testNormaliseParams( $fileDimensions, $expectedParams, $params, $msg ) {
+ public function testNormaliseParams( $fileDimensions, $expectedParams, $params, $msg ) {
$file = new FakeDimensionFile( $fileDimensions );
$handler = new BitmapHandler;
$valid = $handler->normaliseParams( $file, $params );
);
}
- function testTooBigImage() {
+ /**
+ * @covers BitmapHandler::doTransform
+ */
+ public function testTooBigImage() {
$file = new FakeDimensionFile( array( 4000, 4000 ) );
$handler = new BitmapHandler;
$params = array( 'width' => '3700' ); // Still bigger than max size.
get_class( $handler->doTransform( $file, 'dummy path', '', $params ) ) );
}
- function testTooBigMustRenderImage() {
+ /**
+ * @covers BitmapHandler::doTransform
+ */
+ public function testTooBigMustRenderImage() {
$file = new FakeDimensionFile( array( 4000, 4000 ) );
$file->mustRender = true;
$handler = new BitmapHandler;
get_class( $handler->doTransform( $file, 'dummy path', '', $params ) ) );
}
- function testImageArea() {
+ /**
+ * @covers BitmapHandler::getImageArea
+ */
+ public function testImageArea() {
$file = new FakeDimensionFile( array( 7, 9 ) );
$handler = new BitmapHandler;
$this->assertEquals( 63, $handler->getImageArea( $file ) );
}
}
-
-class FakeDimensionFile extends File {
- public $mustRender = false;
-
- public function __construct( $dimensions ) {
- parent::__construct( Title::makeTitle( NS_FILE, 'Test' ),
- new NullRepo( null ) );
-
- $this->dimensions = $dimensions;
- }
-
- public function getWidth( $page = 1 ) {
- return $this->dimensions[0];
- }
-
- public function getHeight( $page = 1 ) {
- return $this->dimensions[1];
- }
-
- public function mustRender() {
- return $this->mustRender;
- }
-
- public function getPath() {
- return '';
- }
-}
class ExifBitmapTest extends MediaWikiTestCase {
+ /**
+ * @var ExifBitmapHandler
+ */
+ protected $handler;
+
protected function setUp() {
parent::setUp();
if ( !extension_loaded( 'exif' ) ) {
}
+ /**
+ * @covers ExifBitmapHandler::isMetadataValid
+ */
public function testIsOldBroken() {
$res = $this->handler->isMetadataValid( null, ExifBitmapHandler::OLD_BROKEN_FILE );
$this->assertEquals( ExifBitmapHandler::METADATA_COMPATIBLE, $res );
}
+ /**
+ * @covers ExifBitmapHandler::isMetadataValid
+ */
public function testIsBrokenFile() {
$res = $this->handler->isMetadataValid( null, ExifBitmapHandler::BROKEN_FILE );
$this->assertEquals( ExifBitmapHandler::METADATA_GOOD, $res );
}
+ /**
+ * @covers ExifBitmapHandler::isMetadataValid
+ */
public function testIsInvalid() {
$res = $this->handler->isMetadataValid( null, 'Something Invalid Here.' );
$this->assertEquals( ExifBitmapHandler::METADATA_BAD, $res );
}
+ /**
+ * @covers ExifBitmapHandler::isMetadataValid
+ */
public function testGoodMetadata() {
$meta = 'a:16:{s:10:"ImageWidth";i:20;s:11:"ImageLength";i:20;s:13:"BitsPerSample";a:3:{i:0;i:8;i:1;i:8;i:2;i:8;}s:11:"Compression";i:5;s:25:"PhotometricInterpretation";i:2;s:16:"ImageDescription";s:17:"Created with GIMP";s:12:"StripOffsets";i:8;s:11:"Orientation";i:1;s:15:"SamplesPerPixel";i:3;s:12:"RowsPerStrip";i:64;s:15:"StripByteCounts";i:238;s:11:"XResolution";s:19:"1207959552/16777216";s:11:"YResolution";s:19:"1207959552/16777216";s:19:"PlanarConfiguration";i:1;s:14:"ResolutionUnit";i:2;s:22:"MEDIAWIKI_EXIF_VERSION";i:2;}';
$res = $this->handler->isMetadataValid( null, $meta );
$this->assertEquals( ExifBitmapHandler::METADATA_GOOD, $res );
}
+ /**
+ * @covers ExifBitmapHandler::isMetadataValid
+ */
public function testIsOldGood() {
$meta = 'a:16:{s:10:"ImageWidth";i:20;s:11:"ImageLength";i:20;s:13:"BitsPerSample";a:3:{i:0;i:8;i:1;i:8;i:2;i:8;}s:11:"Compression";i:5;s:25:"PhotometricInterpretation";i:2;s:16:"ImageDescription";s:17:"Created with GIMP";s:12:"StripOffsets";i:8;s:11:"Orientation";i:1;s:15:"SamplesPerPixel";i:3;s:12:"RowsPerStrip";i:64;s:15:"StripByteCounts";i:238;s:11:"XResolution";s:19:"1207959552/16777216";s:11:"YResolution";s:19:"1207959552/16777216";s:19:"PlanarConfiguration";i:1;s:14:"ResolutionUnit";i:2;s:22:"MEDIAWIKI_EXIF_VERSION";i:1;}';
$res = $this->handler->isMetadataValid( null, $meta );
$this->assertEquals( ExifBitmapHandler::METADATA_COMPATIBLE, $res );
}
- // Handle metadata from paged tiff handler (gotten via instant commons)
- // gracefully.
+ /**
+ * Handle metadata from paged tiff handler (gotten via instant commons) gracefully.
+ * @covers ExifBitmapHandler::isMetadataValid
+ */
public function testPagedTiffHandledGracefully() {
$meta = 'a:6:{s:9:"page_data";a:1:{i:1;a:5:{s:5:"width";i:643;s:6:"height";i:448;s:5:"alpha";s:4:"true";s:4:"page";i:1;s:6:"pixels";i:288064;}}s:10:"page_count";i:1;s:10:"first_page";i:1;s:9:"last_page";i:1;s:4:"exif";a:9:{s:10:"ImageWidth";i:643;s:11:"ImageLength";i:448;s:11:"Compression";i:5;s:25:"PhotometricInterpretation";i:2;s:11:"Orientation";i:1;s:15:"SamplesPerPixel";i:4;s:12:"RowsPerStrip";i:50;s:19:"PlanarConfiguration";i:1;s:22:"MEDIAWIKI_EXIF_VERSION";i:1;}s:21:"TIFF_METADATA_VERSION";s:3:"1.4";}';
$res = $this->handler->isMetadataValid( null, $meta );
$this->assertEquals( ExifBitmapHandler::METADATA_BAD, $res );
}
- function testConvertMetadataLatest() {
+ /**
+ * @covers ExifBitmapHandler::convertMetadataVersion
+ */
+ public function testConvertMetadataLatest() {
$metadata = array(
'foo' => array( 'First', 'Second', '_type' => 'ol' ),
'MEDIAWIKI_EXIF_VERSION' => 2
$this->assertEquals( $metadata, $res );
}
- function testConvertMetadataToOld() {
+ /**
+ * @covers ExifBitmapHandler::convertMetadataVersion
+ */
+ public function testConvertMetadataToOld() {
$metadata = array(
'foo' => array( 'First', 'Second', '_type' => 'ol' ),
'bar' => array( 'First', 'Second', '_type' => 'ul' ),
$this->assertEquals( $expected, $res );
}
- function testConvertMetadataSoftware() {
+ /**
+ * @covers ExifBitmapHandler::convertMetadataVersion
+ */
+ public function testConvertMetadataSoftware() {
$metadata = array(
'Software' => array( array( 'GIMP', '1.1' ) ),
'MEDIAWIKI_EXIF_VERSION' => 2,
$this->assertEquals( $expected, $res );
}
- function testConvertMetadataSoftwareNormal() {
+ /**
+ * @covers ExifBitmapHandler::convertMetadataVersion
+ */
+ public function testConvertMetadataSoftwareNormal() {
$metadata = array(
'Software' => array( "GIMP 1.2", "vim" ),
'MEDIAWIKI_EXIF_VERSION' => 2,
* Tests related to auto rotation.
*
* @group medium
+ *
+ * @todo covers tags
*/
class ExifRotationTest extends MediaWikiTestCase {
}
/**
- *
* @dataProvider provideFiles
*/
- function testMetadata( $name, $type, $info ) {
+ public function testMetadata( $name, $type, $info ) {
if ( !BitmapHandler::canRotate() ) {
$this->markTestSkipped( "This test needs a rasterizer that can auto-rotate." );
}
*
* @dataProvider provideFiles
*/
- function testRotationRendering( $name, $type, $info, $thumbs ) {
+ public function testRotationRendering( $name, $type, $info, $thumbs ) {
if ( !BitmapHandler::canRotate() ) {
$this->markTestSkipped( "This test needs a rasterizer that can auto-rotate." );
}
* Same as before, but with auto-rotation disabled.
* @dataProvider provideFilesNoAutoRotate
*/
- function testMetadataNoAutoRotate( $name, $type, $info ) {
+ public function testMetadataNoAutoRotate( $name, $type, $info ) {
$this->setMwGlobals( 'wgEnableAutoRotation', false );
$file = $this->dataFile( $name, $type );
*
* @dataProvider provideFilesNoAutoRotate
*/
- function testRotationRenderingNoAutoRotate( $name, $type, $info, $thumbs ) {
+ public function testRotationRenderingNoAutoRotate( $name, $type, $info, $thumbs ) {
$this->setMwGlobals( 'wgEnableAutoRotation', false );
foreach ( $thumbs as $size => $out ) {
/**
* @dataProvider provideBitmapExtractPreRotationDimensions
*/
- function testBitmapExtractPreRotationDimensions( $rotation, $expected ) {
+ public function testBitmapExtractPreRotationDimensions( $rotation, $expected ) {
$result = $this->handler->extractPreRotationDimensions( array(
'physicalWidth' => self::TEST_WIDTH,
'physicalHeight' => self::TEST_HEIGHT,
<?php
+
+/**
+ * @covers Exif
+ */
class ExifTest extends MediaWikiTestCase {
+ /** @var string */
+ protected $mediaPath;
+
protected function setUp() {
parent::setUp();
if ( !extension_loaded( 'exif' ) ) {
--- /dev/null
+<?php
+
+class FakeDimensionFile extends File {
+ public $mustRender = false;
+
+ public function __construct( $dimensions ) {
+ parent::__construct( Title::makeTitle( NS_FILE, 'Test' ),
+ new NullRepo( null ) );
+
+ $this->dimensions = $dimensions;
+ }
+
+ public function getWidth( $page = 1 ) {
+ return $this->dimensions[0];
+ }
+
+ public function getHeight( $page = 1 ) {
+ return $this->dimensions[1];
+ }
+
+ public function mustRender() {
+ return $this->mustRender;
+ }
+
+ public function getPath() {
+ return '';
+ }
+}
\ No newline at end of file
<?php
+
class FormatMetadataTest extends MediaWikiTestCase {
+ /** @var FSFileBackend */
+ protected $backend;
+ /** @var FSRepo */
+ protected $repo;
+
protected function setUp() {
parent::setUp();
$this->setMwGlobals( 'wgShowEXIF', true );
}
+ /**
+ * @covers File::formatMetadata
+ */
public function testInvalidDate() {
$file = $this->dataFile( 'broken_exif_date.jpg', 'image/jpeg' );
* @param $filename String
* @param $expected Array The extracted metadata.
* @dataProvider provideGetMetadata
+ * @covers GIFMetadataExtractor::getMetadata
*/
public function testGetMetadata( $filename, $expected ) {
$actual = GIFMetadataExtractor::getMetadata( $this->mediaPath . $filename );
<?php
class GIFHandlerTest extends MediaWikiTestCase {
+ /** @var FSFileBackend */
+ protected $backend;
+ /** @var GIFHandler */
+ protected $handler;
+ /** @var FSRepo */
+ protected $repo;
+ /** @var string */
+ protected $filePath;
+
protected function setUp() {
parent::setUp();
$this->handler = new GIFHandler();
}
+ /**
+ * @covers GIFHandler::getMetadata
+ */
public function testInvalidFile() {
$res = $this->handler->getMetadata( null, $this->filePath . '/README' );
$this->assertEquals( GIFHandler::BROKEN_FILE, $res );
* @param $filename String basename of the file to check
* @param $expected boolean Expected result.
* @dataProvider provideIsAnimated
+ * @covers GIFHandler::isAnimatedImage
*/
public function testIsAnimanted( $filename, $expected ) {
$file = $this->dataFile( $filename, 'image/gif' );
* @param $filename String
* @param $expected Integer Total image area
* @dataProvider provideGetImageArea
+ * @covers GIFHandler::getImageArea
*/
public function testGetImageArea( $filename, $expected ) {
$file = $this->dataFile( $filename, 'image/gif' );
* @param $metadata String Serialized metadata
* @param $expected Integer One of the class constants of GIFHandler
* @dataProvider provideIsMetadataValid
+ * @covers GIFHandler::isMetadataValid
*/
public function testIsMetadataValid( $metadata, $expected ) {
$actual = $this->handler->isMetadataValid( null, $metadata );
* @param $filename String
* @param $expected String Serialized array
* @dataProvider provideGetMetadata
+ * @covers GIFHandler::getMetadata
*/
public function testGetMetadata( $filename, $expected ) {
$file = $this->dataFile( $filename, 'image/gif' );
<?php
+
class IPTCTest extends MediaWikiTestCase {
+
+ /**
+ * @covers IPTC::getCharset
+ */
public function testRecognizeUtf8() {
// utf-8 is the only one used in practise.
$res = IPTC::getCharset( "\x1b%G" );
$this->assertEquals( 'UTF-8', $res );
}
+ /**
+ * @covers IPTC::Parse
+ */
public function testIPTCParseNoCharset88591() {
// basically IPTC for keyword with value of 0xBC which is 1/4 in iso-8859-1
// This data doesn't specify a charset. We're supposed to guess
$this->assertEquals( array( '¼' ), $res['Keywords'] );
}
- /* This one contains a sequence that's valid iso 8859-1 but not valid utf8 */
- /* \xC3 = Ã, \xB8 = ¸ */
+ /**
+ * @covers IPTC::Parse
+ */
public function testIPTCParseNoCharset88591b() {
+ /* This one contains a sequence that's valid iso 8859-1 but not valid utf8 */
+ /* \xC3 = Ã, \xB8 = ¸ */
$iptcData = "Photoshop 3.0\08BIM\4\4\0\0\0\0\0\x09\x1c\x02\x19\x00\x04\xC3\xC3\xC3\xB8";
$res = IPTC::Parse( $iptcData );
$this->assertEquals( array( 'ÃÃø' ), $res['Keywords'] );
}
- /* Same as testIPTCParseNoCharset88591b, but forcing the charset to utf-8.
+ /**
+ * Same as testIPTCParseNoCharset88591b, but forcing the charset to utf-8.
* What should happen is the first "\xC3\xC3" should be dropped as invalid,
* leaving \xC3\xB8, which is ø
+ * @covers IPTC::Parse
*/
public function testIPTCParseForcedUTFButInvalid() {
$iptcData = "Photoshop 3.0\08BIM\4\4\0\0\0\0\0\x11\x1c\x02\x19\x00\x04\xC3\xC3\xC3\xB8"
$this->assertEquals( array( 'ø' ), $res['Keywords'] );
}
+ /**
+ * @covers IPTC::Parse
+ */
public function testIPTCParseNoCharsetUTF8() {
$iptcData = "Photoshop 3.0\08BIM\4\4\0\0\0\0\0\x07\x1c\x02\x19\x00\x02¼";
$res = IPTC::Parse( $iptcData );
$this->assertEquals( array( '¼' ), $res['Keywords'] );
}
- // Testing something that has 2 values for keyword
+ /**
+ * Testing something that has 2 values for keyword
+ * @covers IPTC::Parse
+ */
public function testIPTCParseMulti() {
$iptcData = /* identifier */ "Photoshop 3.0\08BIM\4\4"
/* length */ . "\0\0\0\0\0\x0D"
$this->assertEquals( array( '¼', '¼½' ), $res['Keywords'] );
}
+ /**
+ * @covers IPTC::Parse
+ */
public function testIPTCParseUTF8() {
// This has the magic "\x1c\x01\x5A\x00\x03\x1B\x25\x47" which marks content as UTF8.
$iptcData = "Photoshop 3.0\08BIM\4\4\0\0\0\0\0\x0F\x1c\x02\x19\x00\x02¼\x1c\x01\x5A\x00\x03\x1B\x25\x47";
* serve as a very good "test". (Adobe photoshop probably creates such files
* but it costs money). The implementation of it currently in MediaWiki is based
* solely on reading the standard, without any real world test files.
+ *
+ * @covers JpegMetadataExtractor
*/
class JpegMetadataExtractorTest extends MediaWikiTestCase {
+ protected $filePath;
+
protected function setUp() {
parent::setUp();
* We also use this test to test padding bytes don't
* screw stuff up
*
- * @param $file filename
+ * @param string $file filename
*
* @dataProvider provideUtf8Comment
*/
<?php
+/**
+ * @covers JpegHandler
+ */
class JpegTest extends MediaWikiTestCase {
+ protected $filePath;
+
protected function setUp() {
parent::setUp();
if ( !extension_loaded( 'exif' ) ) {
<?php
class MediaHandlerTest extends MediaWikiTestCase {
- function testFitBoxWidth() {
+
+ /**
+ * @covers MediaHandler::fitBoxWidth
+ * @todo split into a dataprovider and test method
+ */
+ public function testFitBoxWidth() {
$vals = array(
array(
'width' => 50,
<?php
+
+/**
+ * @covers PNGMetadataExtractor
+ */
class PNGMetadataExtractorTest extends MediaWikiTestCase {
protected function setUp() {
/**
* Tests zTXt tag (compressed textual metadata)
*/
- function testPngNativetZtxt() {
+ public function testPngNativetZtxt() {
$this->checkPHPExtension( 'zlib' );
$meta = PNGMetadataExtractor::getMetadata( $this->filePath .
/**
* Test tEXt tag (Uncompressed textual metadata)
*/
- function testPngNativeText() {
+ public function testPngNativeText() {
$meta = PNGMetadataExtractor::getMetadata( $this->filePath .
'Png-native-test.png' );
$expected = "Some long image desc";
* tEXt tags must be encoded iso-8859-1 (vs iTXt which are utf-8)
* Make sure non-ascii characters get converted properly
*/
- function testPngNativeTextNonAscii() {
+ public function testPngNativeTextNonAscii() {
$meta = PNGMetadataExtractor::getMetadata( $this->filePath .
'Png-native-test.png' );
* actual resolution of the image is (aka in dots per meter).
*/
/*
- function testPngPhysTag() {
+ public function testPngPhysTag() {
$meta = PNGMetadataExtractor::getMetadata( $this->filePath .
'Png-native-test.png' );
/**
* Given a normal static PNG, check the animation metadata returned.
*/
- function testStaticPngAnimationMetadata() {
+ public function testStaticPngAnimationMetadata() {
$meta = PNGMetadataExtractor::getMetadata( $this->filePath .
'Png-native-test.png' );
* Given an animated APNG image file
* check it gets animated metadata right.
*/
- function testApngAnimationMetadata() {
+ public function testApngAnimationMetadata() {
$meta = PNGMetadataExtractor::getMetadata( $this->filePath .
'Animated_PNG_example_bouncing_beach_ball.png' );
$this->assertEquals( 1.5, $meta['duration'], '', 0.00001 );
}
- function testPngBitDepth8() {
+ public function testPngBitDepth8() {
$meta = PNGMetadataExtractor::getMetadata( $this->filePath .
'Png-native-test.png' );
$this->assertEquals( 8, $meta['bitDepth'] );
}
- function testPngBitDepth1() {
+ public function testPngBitDepth1() {
$meta = PNGMetadataExtractor::getMetadata( $this->filePath .
'1bit-png.png' );
$this->assertEquals( 1, $meta['bitDepth'] );
}
- function testPngIndexColour() {
+ public function testPngIndexColour() {
$meta = PNGMetadataExtractor::getMetadata( $this->filePath .
'Png-native-test.png' );
$this->assertEquals( 'index-coloured', $meta['colorType'] );
}
- function testPngRgbColour() {
+ public function testPngRgbColour() {
$meta = PNGMetadataExtractor::getMetadata( $this->filePath .
'rgb-png.png' );
$this->assertEquals( 'truecolour-alpha', $meta['colorType'] );
}
- function testPngRgbNoAlphaColour() {
+ public function testPngRgbNoAlphaColour() {
$meta = PNGMetadataExtractor::getMetadata( $this->filePath .
'rgb-na-png.png' );
$this->assertEquals( 'truecolour', $meta['colorType'] );
}
- function testPngGreyscaleColour() {
+ public function testPngGreyscaleColour() {
$meta = PNGMetadataExtractor::getMetadata( $this->filePath .
'greyscale-png.png' );
$this->assertEquals( 'greyscale-alpha', $meta['colorType'] );
}
- function testPngGreyscaleNoAlphaColour() {
+ public function testPngGreyscaleNoAlphaColour() {
$meta = PNGMetadataExtractor::getMetadata( $this->filePath .
'greyscale-na-png.png' );
$this->assertEquals( 'greyscale', $meta['colorType'] );
<?php
class PNGHandlerTest extends MediaWikiTestCase {
+ /** @var PNGHandler */
+ protected $handler;
+ /** @var FSRepo */
+ protected $repo;
+ /** @var FSFileBackend */
+ protected $backend;
+ /** @var string */
+ protected $filePath;
+
protected function setUp() {
parent::setUp();
$this->handler = new PNGHandler();
}
+ /**
+ * @covers PNGHandler::getMetadata
+ */
public function testInvalidFile() {
$res = $this->handler->getMetadata( null, $this->filePath . '/README' );
$this->assertEquals( PNGHandler::BROKEN_FILE, $res );
* @param $filename String basename of the file to check
* @param $expected boolean Expected result.
* @dataProvider provideIsAnimated
+ * @covers PNGHandler::isAnimatedImage
*/
public function testIsAnimanted( $filename, $expected ) {
$file = $this->dataFile( $filename, 'image/png' );
* @param $filename String
* @param $expected Integer Total image area
* @dataProvider provideGetImageArea
+ * @covers PNGHandler::getImageArea
*/
public function testGetImageArea( $filename, $expected ) {
$file = $this->dataFile( $filename, 'image/png' );
* @param $metadata String Serialized metadata
* @param $expected Integer One of the class constants of PNGHandler
* @dataProvider provideIsMetadataValid
+ * @covers PNGHandler::isMetadataValid
*/
public function testIsMetadataValid( $metadata, $expected ) {
$actual = $this->handler->isMetadataValid( null, $metadata );
* @param $filename String
* @param $expected String Serialized array
* @dataProvider provideGetMetadata
+ * @covers PNGHandler::getMetadata
*/
public function testGetMetadata( $filename, $expected ) {
$file = $this->dataFile( $filename, 'image/png' );
<?php
+/**
+ * @covers SVGMetadataExtractor
+ */
class SVGMetadataExtractorTest extends MediaWikiTestCase {
protected function setUp() {
/**
* @dataProvider provideSvgFiles
*/
- function testGetMetadata( $infile, $expected ) {
+ public function testGetMetadata( $infile, $expected ) {
$this->assertMetadata( $infile, $expected );
}
/**
* @dataProvider provideSvgFilesWithXMLMetadata
*/
- function testGetXMLMetadata( $infile, $expected ) {
+ public function testGetXMLMetadata( $infile, $expected ) {
$r = new XMLReader();
if ( !method_exists( $r, 'readInnerXML' ) ) {
$this->markTestSkipped( 'XMLReader::readInnerXML() does not exist (libxml >2.6.20 needed).' );
<?php
class TiffTest extends MediaWikiTestCase {
+ /** @var TiffHandler */
+ protected $handler;
+ /** @var string */
+ protected $filePath;
+
protected function setUp() {
parent::setUp();
if ( !extension_loaded( 'exif' ) ) {
$this->handler = new TiffHandler;
}
+ /**
+ * @covers TiffHandler::getMetadata
+ */
public function testInvalidFile() {
$res = $this->handler->getMetadata( null, $this->filePath . 'README' );
$this->assertEquals( ExifBitmapHandler::BROKEN_FILE, $res );
}
+ /**
+ * @covers TiffHandler::getMetadata
+ */
public function testTiffMetadataExtraction() {
$res = $this->handler->getMetadata( null, $this->filePath . 'test.tiff' );
$expected = 'a:16:{s:10:"ImageWidth";i:20;s:11:"ImageLength";i:20;s:13:"BitsPerSample";a:3:{i:0;i:8;i:1;i:8;i:2;i:8;}s:11:"Compression";i:5;s:25:"PhotometricInterpretation";i:2;s:16:"ImageDescription";s:17:"Created with GIMP";s:12:"StripOffsets";i:8;s:11:"Orientation";i:1;s:15:"SamplesPerPixel";i:3;s:12:"RowsPerStrip";i:64;s:15:"StripByteCounts";i:238;s:11:"XResolution";s:19:"1207959552/16777216";s:11:"YResolution";s:19:"1207959552/16777216";s:19:"PlanarConfiguration";i:1;s:14:"ResolutionUnit";i:2;s:22:"MEDIAWIKI_EXIF_VERSION";i:2;}';
<?php
+
+/**
+ * @todo covers tags
+ */
class XMPTest extends MediaWikiTestCase {
protected function setUp() {
* @param $expected Array expected result of parsing the xmp.
* @param $info String Short sentence on what's being tested.
*
+ * @throws Exception
* @dataProvider provideXMPParse
+ *
+ * @covers XMPReader::parse
*/
public function testXMPParse( $xmp, $expected, $info ) {
if ( !is_string( $xmp ) || !is_array( $expected ) ) {
*
* @todo This is based on what the standard says. Need to find a real
* world example file to double check the support for this is right.
+ *
+ * @covers XMPReader::parseExtended
*/
- function testExtendedXMP() {
+ public function testExtendedXMP() {
$xmpPath = __DIR__ . '/../../data/xmp/';
$standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
$extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
/**
* This test has an extended XMP block with a wrong guid (md5sum)
* and thus should only return the StandardXMP, not the ExtendedXMP.
+ *
+ * @covers XMPReader::parseExtended
*/
- function testExtendedXMPWithWrongGUID() {
+ public function testExtendedXMPWithWrongGUID() {
$xmpPath = __DIR__ . '/../../data/xmp/';
$standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
$extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
/**
* Have a high offset to simulate a missing packet,
* which should cause it to ignore the ExtendedXMP packet.
+ *
+ * @covers XMPReader::parseExtended
*/
- function testExtendedXMPMissingPacket() {
+ public function testExtendedXMPMissingPacket() {
$xmpPath = __DIR__ . '/../../data/xmp/';
$standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
$extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
/**
* @dataProvider provideDates
+ * @covers XMPValidate::validateDate
*/
- function testValidateDate( $value, $expected ) {
+ public function testValidateDate( $value, $expected ) {
// The method should modify $value.
XMPValidate::validateDate( array(), $value, true );
$this->assertEquals( $expected, $value );
* @ingroup UtfNormal
* @group Large
*
+ * @todo covers tags, will be UtfNormal::cleanUp once the below is resolved
+ * @todo split me into test methods and providers per the below comment
+ *
* We ignore code coverage for this test suite until they are rewritten
* to use data providers (bug 46561).
* @codeCoverageIgnore
*/
class CleanUpTest extends MediaWikiTestCase {
/** @todo document */
- function testAscii() {
+ public function testAscii() {
$text = 'This is plain ASCII text.';
$this->assertEquals( $text, UtfNormal::cleanUp( $text ) );
}
/** @todo document */
- function testNull() {
+ public function testNull() {
$text = "a \x00 null";
$expect = "a \xef\xbf\xbd null";
$this->assertEquals(
}
/** @todo document */
- function testLatin() {
+ public function testLatin() {
$text = "L'\xc3\xa9cole";
$this->assertEquals( $text, UtfNormal::cleanUp( $text ) );
}
/** @todo document */
- function testLatinNormal() {
+ public function testLatinNormal() {
$text = "L'e\xcc\x81cole";
$expect = "L'\xc3\xa9cole";
$this->assertEquals( $expect, UtfNormal::cleanUp( $text ) );
}
/** @todo document */
- function testAllBytes() {
+ public function testAllBytes() {
$this->doTestBytes( '', '' );
$this->doTestBytes( 'x', '' );
$this->doTestBytes( '', 'x' );
}
/** @todo document */
- function testDoubleBytes() {
+ public function testDoubleBytes() {
$this->doTestDoubleBytes( '', '' );
$this->doTestDoubleBytes( 'x', '' );
$this->doTestDoubleBytes( '', 'x' );
}
/** @todo document */
- function testTripleBytes() {
+ public function testTripleBytes() {
$this->doTestTripleBytes( '', '' );
$this->doTestTripleBytes( 'x', '' );
$this->doTestTripleBytes( '', 'x' );
}
/** @todo document */
- function testChunkRegression() {
+ public function testChunkRegression() {
# Check for regression against a chunking bug
$text = "\x46\x55\xb8" .
"\xdc\x96" .
}
/** @todo document */
- function testInterposeRegression() {
+ public function testInterposeRegression() {
$text = "\x4e\x30" .
"\xb1" . # bad tail
"\x3a" .
}
/** @todo document */
- function testOverlongRegression() {
+ public function testOverlongRegression() {
$text = "\x67" .
"\x1a" . # forbidden ascii
"\xea" . # bad head
}
/** @todo document */
- function testSurrogateRegression() {
+ public function testSurrogateRegression() {
$text = "\xed\xb4\x96" . # surrogate 0xDD16
"\x83" . # bad tail
"\xb4" . # bad tail
}
/** @todo document */
- function testBomRegression() {
+ public function testBomRegression() {
$text = "\xef\xbf\xbe" . # U+FFFE, illegal char
"\xb2" . # bad tail
"\xef" . # bad head
}
/** @todo document */
- function testForbiddenRegression() {
+ public function testForbiddenRegression() {
$text = "\xef\xbf\xbf"; # U+FFFF, illegal char
$expect = "\xef\xbf\xbd";
$this->assertEquals(
}
/** @todo document */
- function testHangulRegression() {
+ public function testHangulRegression() {
$text = "\xed\x9c\xaf" . # Hangul char
"\xe1\x87\x81"; # followed by another final jamo
$expect = $text; # Should *not* change.
$this->assertEquals( $this->cache->get( $key ), $value );
}
+ /**
+ * @covers BagOStuff::incr
+ */
+ public function testIncr() {
+ $key = wfMemcKey( 'test' );
+ $this->cache->add( $key, 0 );
+ $this->cache->incr( $key );
+ $expectedValue = 1;
+ $actualValue = $this->cache->get( $key );
+ $this->assertEquals( $expectedValue, $actualValue, 'Value should be 1 after incrementing' );
+ }
+
public function testGetMulti() {
$value1 = array( 'this' => 'is', 'a' => 'test' );
$value2 = array( 'this' => 'is', 'another' => 'test' );
* @author Antoine Musso
* @copyright Copyright © 2011, Antoine Musso
* @file
+ * @todo covers tags
*/
-/** */
class MagicVariableTest extends MediaWikiTestCase {
- /** Will contains a parser object*/
+ /**
+ * @var Parser
+ */
private $testParser = null;
/**
$this->testParser->setTitle( $title );
}
- /** destroy parser (TODO: is it really neded?)*/
- protected function tearDown() {
- unset( $this->testParser );
+ /**
+ * @param int $num upper limit for numbers
+ * @return array of numbers from 1 up to $num
+ */
+ private static function createProviderUpTo( $num ) {
+ $ret = array();
+ for ( $i = 1; $i <= $num; $i++ ) {
+ $ret[] = array( $i );
+ }
+
+ return $ret;
+ }
+
+ /**
+ * @return array of months numbers (as an integer)
+ */
+ public static function provideMonths() {
+ return self::createProviderUpTo( 12 );
+ }
- parent::tearDown();
+ /**
+ * @return array of days numbers (as an integer)
+ */
+ public static function provideDays() {
+ return self::createProviderUpTo( 31 );
}
############### TESTS #############################################
# day
- /** @dataProvider MediaWikiProvide::Days */
- function testCurrentdayIsUnPadded( $day ) {
+ /** @dataProvider provideDays */
+ public function testCurrentdayIsUnPadded( $day ) {
$this->assertUnPadded( 'currentday', $day );
}
- /** @dataProvider MediaWikiProvide::Days */
- function testCurrentdaytwoIsZeroPadded( $day ) {
+ /** @dataProvider provideDays */
+ public function testCurrentdaytwoIsZeroPadded( $day ) {
$this->assertZeroPadded( 'currentday2', $day );
}
- /** @dataProvider MediaWikiProvide::Days */
- function testLocaldayIsUnPadded( $day ) {
+ /** @dataProvider provideDays */
+ public function testLocaldayIsUnPadded( $day ) {
$this->assertUnPadded( 'localday', $day );
}
- /** @dataProvider MediaWikiProvide::Days */
- function testLocaldaytwoIsZeroPadded( $day ) {
+ /** @dataProvider provideDays */
+ public function testLocaldaytwoIsZeroPadded( $day ) {
$this->assertZeroPadded( 'localday2', $day );
}
# month
- /** @dataProvider MediaWikiProvide::Months */
- function testCurrentmonthIsZeroPadded( $month ) {
+ /** @dataProvider provideMonths */
+ public function testCurrentmonthIsZeroPadded( $month ) {
$this->assertZeroPadded( 'currentmonth', $month );
}
- /** @dataProvider MediaWikiProvide::Months */
- function testCurrentmonthoneIsUnPadded( $month ) {
+ /** @dataProvider provideMonths */
+ public function testCurrentmonthoneIsUnPadded( $month ) {
$this->assertUnPadded( 'currentmonth1', $month );
}
- /** @dataProvider MediaWikiProvide::Months */
- function testLocalmonthIsZeroPadded( $month ) {
+ /** @dataProvider provideMonths */
+ public function testLocalmonthIsZeroPadded( $month ) {
$this->assertZeroPadded( 'localmonth', $month );
}
- /** @dataProvider MediaWikiProvide::Months */
- function testLocalmonthoneIsUnPadded( $month ) {
+ /** @dataProvider provideMonths */
+ public function testLocalmonthoneIsUnPadded( $month ) {
$this->assertUnPadded( 'localmonth1', $month );
}
-
# revision day
- /** @dataProvider MediaWikiProvide::Days */
- function testRevisiondayIsUnPadded( $day ) {
+ /** @dataProvider provideDays */
+ public function testRevisiondayIsUnPadded( $day ) {
$this->assertUnPadded( 'revisionday', $day );
}
- /** @dataProvider MediaWikiProvide::Days */
- function testRevisiondaytwoIsZeroPadded( $day ) {
+ /** @dataProvider provideDays */
+ public function testRevisiondaytwoIsZeroPadded( $day ) {
$this->assertZeroPadded( 'revisionday2', $day );
}
# revision month
- /** @dataProvider MediaWikiProvide::Months */
- function testRevisionmonthIsZeroPadded( $month ) {
+ /** @dataProvider provideMonths */
+ public function testRevisionmonthIsZeroPadded( $month ) {
$this->assertZeroPadded( 'revisionmonth', $month );
}
- /** @dataProvider MediaWikiProvide::Months */
- function testRevisionmonthoneIsUnPadded( $month ) {
+ /** @dataProvider provideMonths */
+ public function testRevisionmonthoneIsUnPadded( $month ) {
$this->assertUnPadded( 'revisionmonth1', $month );
}
* Rough tests for {{SERVERNAME}} magic word
* Bug 31176
* @group Database
- * @dataProvider dataServernameFromDifferentProtocols
+ * @dataProvider provideDataServernameFromDifferentProtocols
*/
- function testServernameFromDifferentProtocols( $server ) {
+ public function testServernameFromDifferentProtocols( $server ) {
$this->setMwGlobals( 'wgServer', $server );
$this->assertMagic( 'localhost', 'servername' );
}
- function dataServernameFromDifferentProtocols() {
+ public static function provideDataServernameFromDifferentProtocols() {
return array(
array( 'http://localhost/' ),
array( 'https://localhost/' ),
############### HELPERS ############################################
/** assertion helper expecting a magic output which is zero padded */
- PUBLIC function assertZeroPadded( $magic, $value ) {
+ public function assertZeroPadded( $magic, $value ) {
$this->assertMagicPadding( $magic, $value, '%02d' );
}
/** assertion helper expecting a magic output which is unpadded */
- PUBLIC function assertUnPadded( $magic, $value ) {
+ public function assertUnPadded( $magic, $value ) {
$this->assertMagicPadding( $magic, $value, '%d' );
}
* @group Database
* @group Parser
* @group Stub
+ *
+ * @todo covers tags
*/
class NewParserTest extends MediaWikiTestCase {
static protected $articles = array(); // Array of test articles defined by the tests
$out = $parser->getPreloadText( $input, $title, $options );
} else {
$output = $parser->parse( $input, $title, $options, true, true, 1337 );
+ $output->setTOCEnabled( !isset( $opts['notoc'] ) );
$out = $output->getText();
if ( isset( $opts['showtitle'] ) ) {
*
* @group ParserFuzz
*/
- function testFuzzTests() {
+ public function testFuzzTests() {
global $wgParserTestFiles;
$files = $wgParserTestFiles;
/**
* @dataProvider providePreSaveTransform
+ * @covers Parser::preSaveTransform
*/
public function testPreSaveTransform( $text, $expected ) {
global $wgParser;
$this->assertEquals( $expected, $text );
}
+ /**
+ * @covers Parser::callParserFunction
+ */
public function testCallParserFunction() {
global $wgParser;
), $ret, 'callParserFunction works for {{#tag:pre|foo|style=margin-left: 1.6em}}' );
}
+ /**
+ * @covers Parser::parse
+ * @covers ParserOutput::getSections
+ */
public function testGetSections() {
global $wgParser;
),
), $out->getSections(), 'getSections() with proper value when <h2> is used' );
}
- // TODO: Add tests for cleanSig() / cleanSigInSig(), getSection(), replaceSection(), getPreloadText()
+ //@Todo Add tests for cleanSig() / cleanSigInSig(), getSection(), replaceSection(), getPreloadText()
}
class ParserOutputTest extends MediaWikiTestCase {
- function dataIsLinkInternal() {
+ public static function provideIsLinkInternal() {
return array(
// Different domains
array( false, 'http://example.org', 'http://mediawiki.org' ),
/**
* Test to make sure ParserOutput::isLinkInternal behaves properly
- * @dataProvider dataIsLinkInternal
+ * @dataProvider provideIsLinkInternal
+ * @covers ParserOutput::isLinkInternal
*/
- function testIsLinkInternal( $shouldMatch, $server, $url ) {
-
+ public function testIsLinkInternal( $shouldMatch, $server, $url ) {
$this->assertEquals( $shouldMatch, ParserOutput::isLinkInternal( $server, $url ) );
}
+ /**
+ * @covers ParserOutput::setExtensionData
+ * @covers ParserOutput::getExtensionData
+ */
public function testExtensionData() {
$po = new ParserOutput();
* @author Antoine Musso
*/
class ParserPreloadTest extends MediaWikiTestCase {
+ /**
+ * @var Parser
+ */
private $testParser;
+ /**
+ * @var ParserOptions
+ */
private $testParserOptions;
+ /**
+ * @var Title
+ */
private $title;
protected function setUp() {
/**
* @covers Parser::getPreloadText
*/
- function testPreloadSimpleText() {
+ public function testPreloadSimpleText() {
$this->assertPreloaded( 'simple', 'simple' );
}
/**
* @covers Parser::getPreloadText
*/
- function testPreloadedPreIsUnstripped() {
+ public function testPreloadedPreIsUnstripped() {
$this->assertPreloaded(
'<pre>monospaced</pre>',
'<pre>monospaced</pre>',
/**
* @covers Parser::getPreloadText
*/
- function testPreloadedNowikiIsUnstripped() {
+ public function testPreloadedNowikiIsUnstripped() {
$this->assertPreloaded(
'<nowiki>[[Dummy title]]</nowiki>',
'<nowiki>[[Dummy title]]</nowiki>',
);
}
- function assertPreloaded( $expected, $text, $msg = '' ) {
+ protected function assertPreloaded( $expected, $text, $msg = '' ) {
$this->assertEquals(
$expected,
$this->testParser->getPreloadText(
<?php
class PreprocessorTest extends MediaWikiTestCase {
- var $mTitle = 'Page title';
- var $mPPNodeCount = 0;
- var $mOptions;
+ protected $mTitle = 'Page title';
+ protected $mPPNodeCount = 0;
+ /**
+ * @var ParserOptions
+ */
+ protected $mOptions;
+ /**
+ * @var Preprocessor
+ */
+ protected $mPreprocessor;
protected function setUp() {
global $wgParserConf, $wgContLang;
* @param string $wikiText
* @return string
*/
- function preprocessToXml( $wikiText ) {
+ protected function preprocessToXml( $wikiText ) {
if ( method_exists( $this->mPreprocessor, 'preprocessToXml' ) ) {
return $this->normalizeXml( $this->mPreprocessor->preprocessToXml( $wikiText ) );
}
* @param string $xml
* @return string
*/
- function normalizeXml( $xml ) {
+ protected function normalizeXml( $xml ) {
return preg_replace( '!<([a-z]+)/>!', '<$1></$1>', str_replace( ' />', '/>', $xml ) );
}
/**
* @dataProvider provideCases
+ * @covers Preprocessor_DOM::preprocessToXml
*/
- function testPreprocessorOutput( $wikiText, $expectedXml ) {
+ public function testPreprocessorOutput( $wikiText, $expectedXml ) {
$this->assertEquals( $this->normalizeXml( $expectedXml ), $this->preprocessToXml( $wikiText ) );
}
/**
* @dataProvider provideFiles
+ * @covers Preprocessor_DOM::preprocessToXml
*/
- function testPreprocessorOutputFiles( $filename ) {
+ public function testPreprocessorOutputFiles( $filename ) {
$folder = __DIR__ . "/../../../parser/preprocess";
$wikiText = file_get_contents( "$folder/$filename.txt" );
$output = $this->preprocessToXml( $wikiText );
/**
* @dataProvider provideHeadings
+ * @covers Preprocessor_DOM::preprocessToXml
*/
- function testHeadings( $wikiText, $expectedXml ) {
+ public function testHeadings( $wikiText, $expectedXml ) {
$this->assertEquals( $this->normalizeXml( $expectedXml ), $this->preprocessToXml( $wikiText ) );
}
}
/**
* @dataProvider provideValidNames
+ * @covers Parser::setHook
*/
- function testTagHooks( $tag ) {
+ public function testTagHooks( $tag ) {
global $wgParserConf, $wgContLang;
$parser = new Parser( $wgParserConf );
/**
* @dataProvider provideBadNames
* @expectedException MWException
+ * @covers Parser::setHook
*/
- function testBadTagHooks( $tag ) {
+ public function testBadTagHooks( $tag ) {
global $wgParserConf, $wgContLang;
$parser = new Parser( $wgParserConf );
/**
* @dataProvider provideValidNames
+ * @covers Parser::setFunctionTagHook
*/
- function testFunctionTagHooks( $tag ) {
+ public function testFunctionTagHooks( $tag ) {
global $wgParserConf, $wgContLang;
$parser = new Parser( $wgParserConf );
/**
* @dataProvider provideBadNames
* @expectedException MWException
+ * @covers Parser::setFunctionTagHook
*/
- function testBadFunctionTagHooks( $tag ) {
+ public function testBadFunctionTagHooks( $tag ) {
global $wgParserConf, $wgContLang;
$parser = new Parser( $wgParserConf );
/**
* @group Search
* @group Database
+ *
+ * @covers SearchEngine<extended>
+ * @note Coverage will only ever show one of on of the Search* classes
*/
class SearchEngineTest extends MediaWikiLangTestCase {
- protected $search, $pageList;
+ /**
+ * @var SearchEngine
+ */
+ protected $search;
+ protected $pageList;
/**
* Checks for database type & version.
return true;
}
- function testFullWidth() {
+ public function testFullWidth() {
$this->assertEquals(
array( 'FullOneUp', 'FullTwoLow', 'HalfOneUp', 'HalfTwoLow' ),
$this->fetchIds( $this->search->searchText( 'AZ' ) ),
"Search for normalized from Full-width Lower" );
}
- function testTextSearch() {
+ public function testTextSearch() {
$this->assertEquals(
array( 'Smithee' ),
$this->fetchIds( $this->search->searchText( 'smithee' ) ),
"Plain search failed" );
}
- function testTextPowerSearch() {
+ public function testTextPowerSearch() {
$this->search->setNamespaces( array( 0, 1, 4 ) );
$this->assertEquals(
array(
"Power search failed" );
}
- function testTitleSearch() {
+ public function testTitleSearch() {
$this->assertEquals(
array(
'Alan Smithee',
"Title search failed" );
}
- function testTextTitlePowerSearch() {
+ public function testTextTitlePowerSearch() {
$this->search->setNamespaces( array( 0, 1, 4 ) );
$this->assertEquals(
array(
return trim( SearchUpdate::updateText( $text ) );
}
- function testUpdateText() {
+ /**
+ * @covers SearchUpdate::updateText
+ */
+ public function testUpdateText() {
$this->assertEquals(
'test',
$this->updateText( '<div>TeSt</div>' ),
);
}
- function testBug32712() {
+ /**
+ * @covers SearchUpdate::updateText
+ */
+ public function testBug32712() {
$text = "text „http://example.com“ text";
$result = $this->updateText( $text );
$processed = preg_replace( '/Q/u', 'Q', $result );
global $IP;
require_once "$IP/includes/QueryPage.php"; // Needed to populate $wgQueryPages
+/**
+ * @covers QueryPage<extended>
+ */
class QueryAllSpecialPagesTest extends MediaWikiTestCase {
/** List query pages that can not be tested automatically */
* Test SQL for each of our QueryPages objects
* @group Database
*/
- function testQuerypageSqlQuery() {
+ public function testQuerypageSqlQuery() {
global $wgDBtype;
foreach ( $this->queryPages as $page ) {
*
*/
+/**
+ * @covers SpecialPreferences
+ */
class SpecialPreferencesTest extends MediaWikiTestCase {
/**
*
* Test specifications by Alexandre "ialex" Emsenhuber.
*/
- function testBug41337() {
+ public function testBug41337() {
// Set a low limit
$this->setMwGlobals( 'wgMaxSigChars', 2 );
*
* @author Antoine Musso
* @group Database
+ *
+ * @covers SpecialRecentChanges
*/
class SpecialRecentchangesTest extends MediaWikiTestCase {
* @param $expectedProfile An expected search profile name
* @param $expectedNs Array Expected namespaces
*/
- function testProfileAndNamespaceLoading(
+ public function testProfileAndNamespaceLoading(
$requested, $userOptions, $expectedProfile, $expectedNS,
$message = 'Profile name and namespaces mismatches!'
) {
* Verify we do not expand search term in <title> on search result page
* https://gerrit.wikimedia.org/r/4841
*/
- function testSearchTermIsNotExpanded() {
+ public function testSearchTermIsNotExpanded() {
# Initialize [[Special::Search]]
$search = new SpecialSearch();
* @group Broken
* @group Upload
* @group Database
+ *
+ * @covers UploadFromUrl
*/
class UploadFromUrlTest extends ApiTestCase {
protected function setUp() {
/**
* @todo Document why we test login, since the $wgUser hack used doesn't
* require login
+ *
+ * @coversNothing
*/
public function testLogin() {
$data = $this->doApiRequest( array(
<?php
/**
* @group Database
+ *
+ * @covers UploadStash
*/
class UploadStashTest extends MediaWikiTestCase {
/**
/** Tests for MediaWiki languages/LanguageAm.php */
class LanguageAmTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/LanguageAr.php */
class LanguageArTest extends LanguageClassesTestCase {
- function testFormatNum() {
+ /**
+ * @covers Language::formatNum
+ * @todo split into a test and a dataprovider
+ */
+ public function testFormatNum() {
$this->assertEquals( '١٬٢٣٤٬٥٦٧', $this->getLang()->formatNum( '1234567' ) );
$this->assertEquals( '-١٢٫٨٩', $this->getLang()->formatNum( -12.89 ) );
}
/**
* Mostly to test the raw ascii feature.
* @dataProvider providerSprintfDate
+ * @covers Language::sprintfDate
*/
- function testSprintfDate( $format, $date, $expected ) {
+ public function testSprintfDate( $format, $date, $expected ) {
$this->assertEquals( $expected, $this->getLang()->sprintfDate( $format, $date ) );
}
);
}
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'zero', 'one', 'two', 'few', 'many', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/LanguageBe.php */
class LanguageBeTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'few', 'many', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
* be-tarask. This is to ensure LanguageClassesTestCase
* does not give us the wrong language.
*/
- function testBeTaraskTestsUsesBeTaraskCode() {
+ public function testBeTaraskTestsUsesBeTaraskCode() {
$this->assertEquals( 'be-tarask',
$this->getLang()->getCode()
);
}
- /** see bug 23156 & r64981 */
- function testSearchRightSingleQuotationMarkAsApostroph() {
+ /**
+ * @see bug 23156 & r64981
+ * @covers Language::commafy
+ */
+ public function testSearchRightSingleQuotationMarkAsApostroph() {
$this->assertEquals(
"'",
$this->getLang()->normalizeForSearch( '’' ),
);
}
- /** see bug 23156 & r64981 */
- function testCommafy() {
+ /**
+ * @see bug 23156 & r64981
+ * @covers Language::commafy
+ */
+ public function testCommafy() {
$this->assertEquals( '1,234,567', $this->getLang()->commafy( '1234567' ) );
$this->assertEquals( '12,345', $this->getLang()->commafy( '12345' ) );
}
- /** see bug 23156 & r64981 */
- function testDoesNotCommafyFourDigitsNumber() {
+ /**
+ * @see bug 23156 & r64981
+ * @covers Language::commafy
+ */
+ public function testDoesNotCommafyFourDigitsNumber() {
$this->assertEquals( '1234', $this->getLang()->commafy( '1234' ) );
}
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'few', 'many', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
);
}
- /** @dataProvider providePluralTwoForms */
- function testPluralTwoForms( $result, $value ) {
+ /**
+ * @dataProvider providePluralTwoForms
+ * @covers Language::convertPlural
+ */
+ public function testPluralTwoForms( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
/** Tests for MediaWiki languages/LanguageBho.php */
class LanguageBhoTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/LanguageBs.php */
class LanguageBsTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'few', 'many', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
*/
private $languageObject;
+ /**
+ * @return Language
+ */
protected function getLang() {
return $this->languageObject;
}
. "out of " . get_called_class() . " failling back to 'en'\n"
);
}
- // TODO: validate $m[1] which should be a valid language code
+ // @todo validate $m[1] which should be a valid language code
$this->languageObject = Language::factory( $m[1] );
}
/** Tests for MediaWiki languages/classes/Languagecs.php */
class LanguageCsTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'few', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/LanguageCu.php */
class LanguageCuTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'two', 'few', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguageCy.php */
class LanguageCyTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'zero', 'one', 'two', 'few', 'many', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguageDsb.php */
class LanguageDsbTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'two', 'few', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguageFr.php */
class LanguageFrTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguageGa.php */
class LanguageGaTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'two', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguageGd.php */
class LanguageGdTest extends LanguageClassesTestCase {
- /** @dataProvider providerPlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providerPlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'two', 'few', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
);
}
- /** @dataProvider providerPluralExplicit */
- function testExplicitPlural( $result, $value ) {
+ /**
+ * @dataProvider providerPluralExplicit
+ * @covers Language::convertPlural
+ */
+ public function testExplicitPlural( $result, $value ) {
$forms = array( 'one', 'two', 'few', 'other', '11=Form11', '12=Form12' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
/** Tests for MediaWiki languages/classes/LanguageGv.php */
class LanguageGvTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
// This is not compatible with CLDR plural rules http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#gv
// What does this mean? Is there a hard-coded override for gv somewhere? -Ryan Kaldari 2013-01-28
$forms = array( 'Form 1', 'Form 2', 'Form 3', 'Form 4' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->markTestSkipped( "This test won't work since convertPlural for gv doesn't seem to actually follow our plural rules." );
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguageHe.php */
class LanguageHeTest extends LanguageClassesTestCase {
- /*
- The most common usage for the plural forms is two forms,
- for singular and plural. In this case, the second form
- is technically dual, but in practice it's used as plural.
- In some cases, usually with expressions of time, three forms
- are needed - singular, dual and plural.
- CLDR also specifies a fourth form for multiples of 10,
- which is very rare. It also has a mistake, because
- the number 10 itself is supposed to be just plural,
- so currently it's overridden in MediaWiki.
+ /**
+ * The most common usage for the plural forms is two forms,
+ * for singular and plural. In this case, the second form
+ * is technically dual, but in practice it's used as plural.
+ * In some cases, usually with expressions of time, three forms
+ * are needed - singular, dual and plural.
+ * CLDR also specifies a fourth form for multiples of 10,
+ * which is very rare. It also has a mistake, because
+ * the number 10 itself is supposed to be just plural,
+ * so currently it's overridden in MediaWiki.
*/
- /** @dataProvider provideTwoPluralForms */
- function testTwoPluralForms( $result, $value ) {
+ // @todo the below test*PluralForms test methods can be refactored
+ // to use a single test method and data provider..
+
+ /**
+ * @dataProvider provideTwoPluralForms
+ * @covers Language::convertPlural
+ */
+ public function testTwoPluralForms( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider provideThreePluralForms */
- function testThreePluralForms( $result, $value ) {
+ /**
+ * @dataProvider provideThreePluralForms
+ * @covers Language::convertPlural
+ */
+ public function testThreePluralForms( $result, $value ) {
$forms = array( 'one', 'two', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider provideFourPluralForms */
- function testFourPluralForms( $result, $value ) {
+ /**
+ * @dataProvider provideFourPluralForms
+ * @covers Language::convertPlural
+ */
+ public function testFourPluralForms( $result, $value ) {
$forms = array( 'one', 'two', 'many', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider provideFourPluralForms */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider provideFourPluralForms
+ * @covers Language::convertPlural
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
);
}
- /** @dataProvider provideGrammar */
- function testGrammar( $result, $word, $case ) {
+ /**
+ * @dataProvider provideGrammar
+ * @covers Language::convertGrammar
+ */
+ public function testGrammar( $result, $word, $case ) {
$this->assertEquals( $result, $this->getLang()->convertGrammar( $word, $case ) );
}
/** Tests for MediaWiki languages/LanguageHi.php */
class LanguageHiTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguageHr.php */
class LanguageHrTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'few', 'many', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguageHsb.php */
class LanguageHsbTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'two', 'few', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/LanguageHu.php */
class LanguageHuTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/LanguageHy.php */
class LanguageHyTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
// This fails for 0, but I'm not sure why. Some voodoo going on here.
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguageKsh.php */
class LanguageKshTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'other', 'zero' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguageLn.php */
class LanguageLnTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/LanguageLt.php */
class LanguageLtTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'few', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
);
}
- /** @dataProvider providePluralTwoForms */
- function testOneFewPlural( $result, $value ) {
+ /**
+ * @dataProvider providePluralTwoForms
+ * @covers Language::convertPlural
+ */
+ public function testOneFewPlural( $result, $value ) {
$forms = array( 'one', 'other' );
// This fails for 21, but not sure why.
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
/** Tests for MediaWiki languages/classes/LanguageLv.php */
class LanguageLvTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'zero', 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguageMg.php */
class LanguageMgTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguageMk.php */
class LanguageMkTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/LanguageMl.php */
class LanguageMlTest extends LanguageClassesTestCase {
- /** see bug 29495 */
- /** @dataProvider providerFormatNum */
- function testFormatNum( $result, $value ) {
+ /**
+ * @dataProvider providerFormatNum
+ * @see bug 29495
+ * @covers Language::formatNum
+ */
+ public function testFormatNum( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->formatNum( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguageMo.php */
class LanguageMoTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'few', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguageMt.php */
class LanguageMtTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'few', 'many', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
);
}
- /** @dataProvider providerPluralTwoForms */
- function testPluralTwoForms( $result, $value ) {
+ /**
+ * @dataProvider providePluralTwoForms
+ * @covers Language::convertPlural
+ */
+ public function testPluralTwoForms( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- public static function providerPluralTwoForms() {
+ public static function providePluralTwoForms() {
return array(
array( 'other', 0 ),
array( 'one', 1 ),
/** Tests for MediaWiki languages/LanguageNl.php */
class LanguageNlTest extends LanguageClassesTestCase {
- function testFormatNum() {
+ /**
+ * @covers Language::formatNum
+ * @todo split into a test and a dataprovider
+ */
+ public function testFormatNum() {
$this->assertEquals( '1.234.567', $this->getLang()->formatNum( '1234567' ) );
$this->assertEquals( '12.345', $this->getLang()->formatNum( '12345' ) );
$this->assertEquals( '1', $this->getLang()->formatNum( '1' ) );
/** Tests for MediaWiki languages/classes/LanguageNso.php */
class LanguageNsoTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguagePl.php */
class LanguagePlTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'few', 'many' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
);
}
- /** @dataProvider providerPluralTwoForms */
- function testPluralTwoForms( $result, $value ) {
+ /**
+ * @dataProvider providePluralTwoForms
+ * @covers Language::convertPlural
+ */
+ public function testPluralTwoForms( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- public static function providerPluralTwoForms() {
+ public static function providePluralTwoForms() {
return array(
array( 'other', 0 ),
array( 'one', 1 ),
/** Tests for MediaWiki languages/classes/LanguageRo.php */
class LanguageRoTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'few', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguageRu.php */
class LanguageRuTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'few', 'many', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
);
}
- /** @dataProvider providePluralTwoForms */
- function testPluralTwoForms( $result, $value ) {
+ /**
+ * @dataProvider providePluralTwoForms
+ * @covers Language::convertPlural
+ */
+ public function testPluralTwoForms( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
);
}
- /** @dataProvider providerGrammar */
- function testGrammar( $result, $word, $case ) {
+ /**
+ * @dataProvider providerGrammar
+ * @covers Language::convertGrammar
+ */
+ public function testGrammar( $result, $word, $case ) {
$this->assertEquals( $result, $this->getLang()->convertGrammar( $word, $case ) );
}
/** Tests for MediaWiki languages/classes/LanguageSe.php */
class LanguageSeTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'two', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
);
}
- /** @dataProvider providerPluralTwoForms */
- function testPluralTwoForms( $result, $value ) {
+ /**
+ * @dataProvider providePluralTwoForms
+ * @covers Language::convertPlural
+ */
+ public function testPluralTwoForms( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- public static function providerPluralTwoForms() {
+ public static function providePluralTwoForms() {
return array(
array( 'other', 0 ),
array( 'one', 1 ),
/** Tests for MediaWiki languages/classes/LanguageSgs.php */
class LanguageSgsTest extends LanguageClassesTestCase {
- /** @dataProvider providePluralAllForms */
- function testPluralAllForms( $result, $value ) {
+ /**
+ * @dataProvider providePluralAllForms
+ * @covers Language::convertPlural
+ */
+ public function testPluralAllForms( $result, $value ) {
$forms = array( 'one', 'two', 'few', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePluralAllForms */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePluralAllForms
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
);
}
- /** @dataProvider providePluralTwoForms */
- function testPluralTwoForms( $result, $value ) {
+ /**
+ * @dataProvider providePluralTwoForms
+ * @covers Language::convertPlural
+ */
+ public function testPluralTwoForms( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
/** Tests for MediaWiki languages/classes/LanguageSh.php */
class LanguageShTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'few', 'many', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguageSk.php */
class LanguageSkTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'few', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguageSl.php */
class LanguageSlTest extends LanguageClassesTestCase {
- /** @dataProvider providerPlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providerPlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'two', 'few', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providerPlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providerPlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguageSma.php */
class LanguageSmaTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'two', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
);
}
- /** @dataProvider providerPluralTwoForms */
- function testPluralTwoForms( $result, $value ) {
+ /**
+ * @dataProvider providePluralTwoForms
+ * @covers Language::convertPlural
+ */
+ public function testPluralTwoForms( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- public static function providerPluralTwoForms() {
+ public static function providePluralTwoForms() {
return array(
array( 'other', 0 ),
array( 'one', 1 ),
* @author Antoine Musso <hashar at free dot fr>
* @copyright Copyright © 2011, Antoine Musso <hashar at free dot fr>
* @file
+ *
+ * @todo methods in test class should be tidied:
+ * - Should be split into separate test methods and data providers
+ * - Tests for LanguageConverter and Language should probably be separate..
*/
/** Tests for MediaWiki languages/LanguageSr.php */
class LanguageSrTest extends LanguageClassesTestCase {
- function testEasyConversions() {
+ /**
+ * @covers LanguageConverter::convertTo
+ */
+ public function testEasyConversions() {
$this->assertCyrillic(
'шђчћжШЂЧЋЖ',
'Cyrillic guessing characters'
);
}
- function testMixedConversions() {
+ /**
+ * @covers LanguageConverter::convertTo
+ */
+ public function testMixedConversions() {
$this->assertCyrillic(
'шђчћжШЂЧЋЖ - šđčćž',
'Mostly cyrillic characters'
);
}
- function testSameAmountOfLatinAndCyrillicGetConverted() {
+ /**
+ * @covers LanguageConverter::convertTo
+ */
+ public function testSameAmountOfLatinAndCyrillicGetConverted() {
$this->assertConverted(
'4 latin: šđčć | 4 cyrillic: шђчћ',
'sr-ec'
/**
* @author Nikola Smolenski
+ * @covers LanguageConverter::convertTo
*/
- function testConversionToCyrillic() {
+ public function testConversionToCyrillic() {
//A simple convertion of Latin to Cyrillic
$this->assertEquals( 'абвг',
$this->convertToCyrillic( 'abvg' )
);
}
- function testConversionToLatin() {
+ /**
+ * @covers LanguageConverter::convertTo
+ */
+ public function testConversionToLatin() {
//A simple convertion of Latin to Latin
$this->assertEquals( 'abcd',
$this->convertToLatin( 'abcd' )
);
}
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'few', 'many', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
);
}
- /** @dataProvider providePluralTwoForms */
- function testPluralTwoForms( $result, $value ) {
+ /**
+ * @dataProvider providePluralTwoForms
+ * @covers Language::convertPlural
+ */
+ public function testPluralTwoForms( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
* @param $variant string Language variant 'sr-ec' or 'sr-el'
* @param $msg string Optional message
*/
- function assertUnConverted( $text, $variant, $msg = '' ) {
+ protected function assertUnConverted( $text, $variant, $msg = '' ) {
$this->assertEquals(
$text,
$this->convertTo( $text, $variant ),
* @param $variant string Language variant 'sr-ec' or 'sr-el'
* @param $msg string Optional message
*/
- function assertConverted( $text, $variant, $msg = '' ) {
+ protected function assertConverted( $text, $variant, $msg = '' ) {
$this->assertNotEquals(
$text,
$this->convertTo( $text, $variant ),
* using the cyrillic variant and converted to Latin when using
* the Latin variant.
*/
- function assertCyrillic( $text, $msg = '' ) {
+ protected function assertCyrillic( $text, $msg = '' ) {
$this->assertUnConverted( $text, 'sr-ec', $msg );
$this->assertConverted( $text, 'sr-el', $msg );
}
* using the Latin variant and converted to Cyrillic when using
* the Cyrillic variant.
*/
- function assertLatin( $text, $msg = '' ) {
+ protected function assertLatin( $text, $msg = '' ) {
$this->assertUnConverted( $text, 'sr-el', $msg );
$this->assertConverted( $text, 'sr-ec', $msg );
}
/** Wrapper for converter::convertTo() method*/
- function convertTo( $text, $variant ) {
+ protected function convertTo( $text, $variant ) {
return $this->getLang()
->mConverter
->convertTo(
);
}
- function convertToCyrillic( $text ) {
+ protected function convertToCyrillic( $text ) {
return $this->convertTo( $text, 'sr-ec' );
}
- function convertToLatin( $text ) {
+ protected function convertToLatin( $text ) {
return $this->convertTo( $text, 'sr-el' );
}
}
<?php
class LanguageTest extends LanguageClassesTestCase {
- function testLanguageConvertDoubleWidthToSingleWidth() {
+ /**
+ * @covers Language::convertDoubleWidth
+ * @covers Language::normalizeForSearch
+ */
+ public function testLanguageConvertDoubleWidthToSingleWidth() {
$this->assertEquals(
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
$this->getLang()->normalizeForSearch(
}
/**
- * @dataProvider provideFormattableTimes
+ * @dataProvider provideFormattableTimes#
+ * @covers Language::formatTimePeriod
*/
- function testFormatTimePeriod( $seconds, $format, $expected, $desc ) {
+ public function testFormatTimePeriod( $seconds, $format, $expected, $desc ) {
$this->assertEquals( $expected, $this->getLang()->formatTimePeriod( $seconds, $format ), $desc );
}
);
}
- function testTruncate() {
+ /**
+ * @covers Language::truncate
+ */
+ public function testTruncate() {
$this->assertEquals(
"XXX",
$this->getLang()->truncate( "1234567890", 0, 'XXX' ),
}
/**
- * @dataProvider provideHTMLTruncateData()
+ * @dataProvider provideHTMLTruncateData
+ * @covers Language::truncateHTML
*/
- function testTruncateHtml( $len, $ellipsis, $input, $expected ) {
+ public function testTruncateHtml( $len, $ellipsis, $input, $expected ) {
// Actual HTML...
$this->assertEquals(
$expected,
}
/**
- * Array format is ($len, $ellipsis, $input, $expected)
+ * @return array format is ($len, $ellipsis, $input, $expected)
*/
public static function provideHTMLTruncateData() {
return array(
/**
* Test Language::isWellFormedLanguageTag()
* @dataProvider provideWellFormedLanguageTags
+ * @covers Language::isWellFormedLanguageTag
*/
- function testWellFormedLanguageTag( $code, $message = '' ) {
+ public function testWellFormedLanguageTag( $code, $message = '' ) {
$this->assertTrue(
Language::isWellFormedLanguageTag( $code ),
"validating code $code $message"
/**
* Negative test for Language::isWellFormedLanguageTag()
* @dataProvider provideMalformedLanguageTags
+ * @covers Language::isWellFormedLanguageTag
*/
- function testMalformedLanguageTag( $code, $message = '' ) {
+ public function testMalformedLanguageTag( $code, $message = '' ) {
$this->assertFalse(
Language::isWellFormedLanguageTag( $code ),
"validating that code $code is a malformed language tag - $message"
/**
* Negative test for Language::isWellFormedLanguageTag()
+ * @covers Language::isWellFormedLanguageTag
*/
- function testLenientLanguageTag() {
+ public function testLenientLanguageTag() {
$this->assertTrue(
Language::isWellFormedLanguageTag( 'pa_guru', true ),
'pa_guru is a well-formed language tag in lenient mode'
/**
* Test Language::isValidBuiltInCode()
* @dataProvider provideLanguageCodes
+ * @covers Language::isValidBuiltInCode
*/
- function testBuiltInCodeValidation( $code, $message = '' ) {
+ public function testBuiltInCodeValidation( $code, $message = '' ) {
$this->assertTrue(
(bool)Language::isValidBuiltInCode( $code ),
"validating code $code $message"
);
}
- function testBuiltInCodeValidationRejectUnderscore() {
+ /**
+ * @covers Language::isValidBuiltInCode
+ */
+ public function testBuiltInCodeValidationRejectUnderscore() {
$this->assertFalse(
(bool)Language::isValidBuiltInCode( 'be_tarask' ),
"reject underscore in language code"
/**
* Test Language::isKnownLanguageTag()
* @dataProvider provideKnownLanguageTags
+ * @covers Language::isKnownLanguageTag
*/
- function testKnownLanguageTag( $code, $message = '' ) {
+ public function testKnownLanguageTag( $code, $message = '' ) {
$this->assertTrue(
(bool)Language::isKnownLanguageTag( $code ),
"validating code $code - $message"
}
/**
- * Test Language::isKnownLanguageTag()
+ * @covers Language::isKnownLanguageTag
*/
- function testKnownCldrLanguageTag() {
+ public function testKnownCldrLanguageTag() {
if ( !class_exists( 'LanguageNames' ) ) {
$this->markTestSkipped( 'The LanguageNames class is not available. The cldr extension is probably not installed.' );
}
/**
* Negative tests for Language::isKnownLanguageTag()
* @dataProvider provideUnKnownLanguageTags
+ * @covers Language::isKnownLanguageTag
*/
- function testUnknownLanguageTag( $code, $message = '' ) {
+ public function testUnknownLanguageTag( $code, $message = '' ) {
$this->assertFalse(
(bool)Language::isKnownLanguageTag( $code ),
"checking that code $code is invalid - $message"
/**
* Test too short timestamp
* @expectedException MWException
+ * @covers Language::sprintfDate
*/
- function testSprintfDateTooShortTimestamp() {
+ public function testSprintfDateTooShortTimestamp() {
$this->getLang()->sprintfDate( 'xiY', '1234567890123' );
}
/**
* Test too long timestamp
* @expectedException MWException
+ * @covers Language::sprintfDate
*/
- function testSprintfDateTooLongTimestamp() {
+ public function testSprintfDateTooLongTimestamp() {
$this->getLang()->sprintfDate( 'xiY', '123456789012345' );
}
/**
* Test too short timestamp
* @expectedException MWException
+ * @covers Language::sprintfDate
*/
- function testSprintfDateNotAllDigitTimestamp() {
+ public function testSprintfDateNotAllDigitTimestamp() {
$this->getLang()->sprintfDate( 'xiY', '-1234567890123' );
}
/**
* @dataProvider provideSprintfDateSamples
+ * @covers Language::sprintfDate
*/
- function testSprintfDate( $format, $ts, $expected, $msg ) {
+ public function testSprintfDate( $format, $ts, $expected, $msg ) {
$this->assertEquals(
$expected,
$this->getLang()->sprintfDate( $format, $ts ),
/**
* sprintfDate should always use UTC when no zone is given.
* @dataProvider provideSprintfDateSamples
+ * @covers Language::sprintfDate
*/
- function testSprintfDateNoZone( $format, $ts, $expected, $ignore, $msg ) {
+ public function testSprintfDateNoZone( $format, $ts, $expected, $ignore, $msg ) {
$oldTZ = date_default_timezone_get();
$res = date_default_timezone_set( 'Asia/Seoul' );
if ( !$res ) {
/**
* sprintfDate should use passed timezone
* @dataProvider provideSprintfDateSamples
+ * @covers Language::sprintfDate
*/
- function testSprintfDateTZ( $format, $ts, $ignore, $expected, $msg ) {
+ public function testSprintfDateTZ( $format, $ts, $ignore, $expected, $msg ) {
$tz = new DateTimeZone( 'Asia/Seoul' );
if ( !$tz ) {
$this->markTestSkipped( "Error getting Timezone" );
/**
* @dataProvider provideFormatSizes
+ * @covers Language::formatSize
*/
- function testFormatSize( $size, $expected, $msg ) {
+ public function testFormatSize( $size, $expected, $msg ) {
$this->assertEquals(
$expected,
$this->getLang()->formatSize( $size ),
/**
* @dataProvider provideFormatBitrate
+ * @covers Language::formatBitrate
*/
- function testFormatBitrate( $bps, $expected, $msg ) {
+ public function testFormatBitrate( $bps, $expected, $msg ) {
$this->assertEquals(
$expected,
$this->getLang()->formatBitrate( $bps ),
/**
* @dataProvider provideFormatDuration
+ * @covers Language::formatDuration
*/
- function testFormatDuration( $duration, $expected, $intervals = array() ) {
+ public function testFormatDuration( $duration, $expected, $intervals = array() ) {
$this->assertEquals(
$expected,
$this->getLang()->formatDuration( $duration, $intervals ),
/**
* @dataProvider provideCheckTitleEncodingData
+ * @covers Language::checkTitleEncoding
*/
- function testCheckTitleEncoding( $s ) {
+ public function testCheckTitleEncoding( $s ) {
$this->assertEquals(
$s,
$this->getLang()->checkTitleEncoding( $s ),
/**
* @dataProvider provideRomanNumeralsData
+ * @covers Language::romanNumeral
*/
- function testRomanNumerals( $num, $numerals ) {
+ public function testRomanNumerals( $num, $numerals ) {
$this->assertEquals(
$numerals,
Language::romanNumeral( $num ),
/**
* @dataProvider providePluralData
+ * @covers Language::convertPlural
*/
- function testConvertPlural( $expected, $number, $forms ) {
+ public function testConvertPlural( $expected, $number, $forms ) {
$chosen = $this->getLang()->convertPlural( $number, $forms );
$this->assertEquals( $expected, $chosen );
}
* @covers Language::translateBlockExpiry()
* @dataProvider provideTranslateBlockExpiry
*/
- function testTranslateBlockExpiry( $expectedData, $str, $desc ) {
+ public function testTranslateBlockExpiry( $expectedData, $str, $desc ) {
$lang = $this->getLang();
if ( is_array( $expectedData ) ) {
list( $func, $arg ) = $expectedData;
* @covers Language::commafy()
* @dataProvider provideCommafyData
*/
- function testCommafy( $number, $numbersWithCommas ) {
+ public function testCommafy( $number, $numbersWithCommas ) {
$this->assertEquals(
$numbersWithCommas,
$this->getLang()->commafy( $number ),
);
}
- function testListToText() {
+ /**
+ * @covers Language::listToText
+ */
+ public function testListToText() {
$lang = $this->getLang();
$and = $lang->getMessageFromDB( 'and' );
$s = $lang->getMessageFromDB( 'word-separator' );
/**
* @dataProvider provideIsSupportedLanguage
+ * @covers Language::isSupportedLanguage
*/
- function testIsSupportedLanguage( $code, $expected, $comment ) {
+ public function testIsSupportedLanguage( $code, $expected, $comment ) {
$this->assertEquals( $expected, Language::isSupportedLanguage( $code ), $comment );
}
/**
* @dataProvider provideGetParentLanguage
+ * @covers Language::getParentLanguage
*/
- function testGetParentLanguage( $code, $expected, $comment ) {
+ public function testGetParentLanguage( $code, $expected, $comment ) {
$lang = Language::factory( $code );
if ( is_null( $expected ) ) {
$this->assertNull( $lang->getParentLanguage(), $comment );
/**
* @dataProvider provideGetNamespaceAliases
+ * @covers Language::getNamespaceAliases
*/
- function testGetNamespaceAliases( $languageCode, $subset ) {
+ public function testGetNamespaceAliases( $languageCode, $subset ) {
$language = Language::factory( $languageCode );
$aliases = $language->getNamespaceAliases();
foreach ( $subset as $alias => $nsId ) {
}
}
- function provideGetNamespaceAliases() {
+ public static function provideGetNamespaceAliases() {
// TODO: Add tests for NS_PROJECT_TALK and GenderNamespaces
return array(
array(
/** Tests for MediaWiki languages/classes/LanguageTi.php */
class LanguageTiTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
/** Tests for MediaWiki languages/classes/LanguageTl.php */
class LanguageTlTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
* - Emperyan
* @see http://en.wikipedia.org/wiki/Dotted_and_dotless_I
* @dataProvider provideDottedAndDotlessI
+ * @covers Language::ucfirst
+ * @covers Language::lcfirst
*/
- function testDottedAndDotlessI( $func, $input, $inputCase, $expected ) {
+ public function testDottedAndDotlessI( $func, $input, $inputCase, $expected ) {
if ( $func == 'ucfirst' ) {
$res = $this->getLang()->ucfirst( $input );
} elseif ( $func == 'lcfirst' ) {
/** Tests for MediaWiki languages/classes/LanguageUk.php */
class LanguageUkTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'few', 'many', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
);
}
- /** @dataProvider providePluralTwoForms */
- function testPluralTwoForms( $result, $value ) {
+ /**
+ * @dataProvider providePluralTwoForms
+ * @covers Language::convertPlural
+ */
+ public function testPluralTwoForms( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
* @copyright Copyright © 2012, Robin Pepermans
* @copyright Copyright © 2011, Antoine Musso <hashar at free dot fr>
* @file
+ *
+ * @todo methods in test class should be tidied:
+ * - Should be split into separate test methods and data providers
+ * - Tests for LanguageConverter and Language should probably be separate..
*/
/** Tests for MediaWiki languages/LanguageUz.php */
/**
* @author Nikola Smolenski
+ * @covers LanguageConverter::convertTo
*/
- function testConversionToCyrillic() {
+ public function testConversionToCyrillic() {
// A convertion of Latin to Cyrillic
$this->assertEquals( 'абвгғ',
$this->convertToCyrillic( 'abvggʻ' )
);
}
- function testConversionToLatin() {
+ /**
+ * @covers LanguageConverter::convertTo
+ */
+ public function testConversionToLatin() {
// A simple convertion of Latin to Latin
$this->assertEquals( 'abdef',
$this->convertToLatin( 'abdef' )
* @param $variant string Language variant 'uz-cyrl' or 'uz-latn'
* @param $msg string Optional message
*/
- function assertUnConverted( $text, $variant, $msg = '' ) {
+ protected function assertUnConverted( $text, $variant, $msg = '' ) {
$this->assertEquals(
$text,
$this->convertTo( $text, $variant ),
* @param $variant string Language variant 'uz-cyrl' or 'uz-latn'
* @param $msg string Optional message
*/
- function assertConverted( $text, $variant, $msg = '' ) {
+ protected function assertConverted( $text, $variant, $msg = '' ) {
$this->assertNotEquals(
$text,
$this->convertTo( $text, $variant ),
* using the cyrillic variant and converted to Latin when using
* the Latin variant.
*/
- function assertCyrillic( $text, $msg = '' ) {
+ protected function assertCyrillic( $text, $msg = '' ) {
$this->assertUnConverted( $text, 'uz-cyrl', $msg );
$this->assertConverted( $text, 'uz-latn', $msg );
}
* using the Latin variant and converted to Cyrillic when using
* the Cyrillic variant.
*/
- function assertLatin( $text, $msg = '' ) {
+ protected function assertLatin( $text, $msg = '' ) {
$this->assertUnConverted( $text, 'uz-latn', $msg );
$this->assertConverted( $text, 'uz-cyrl', $msg );
}
/** Wrapper for converter::convertTo() method*/
- function convertTo( $text, $variant ) {
+ protected function convertTo( $text, $variant ) {
return $this->getLang()->mConverter->convertTo( $text, $variant );
}
- function convertToCyrillic( $text ) {
+ protected function convertToCyrillic( $text ) {
return $this->convertTo( $text, 'uz-cyrl' );
}
- function convertToLatin( $text ) {
+ protected function convertToLatin( $text ) {
return $this->convertTo( $text, 'uz-latn' );
}
}
/** Tests for MediaWiki languages/classes/LanguageWa.php */
class LanguageWaTest extends LanguageClassesTestCase {
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testGetPluralRuleType( $result, $value ) {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
* @file
*/
+/**
+ * @covers CLDRPluralRuleEvaluator
+ */
class CLDRPluralRuleEvaluatorTest extends MediaWikiTestCase {
/**
* @dataProvider validTestCases
* @param $name string: name of the closing element to look for
* (e.g.: "mediawiki" when looking for </mediawiki>)
*
- * @return bool: true iff the end node could be found. false otherwise.
+ * @return bool: true if the end node could be found. false otherwise.
*/
protected function skipToNodeEnd( $name ) {
while ( $this->xml->read() ) {
private $testCase;
/**
- * shutdownSimulated === true iff simulateShutdown has done it's work
+ * shutdownSimulated === true if simulateShutdown has done it's work
*
* @var bool
*/
}
}
+/**
+ * @covers Maintenance
+ */
class MaintenanceTest extends MediaWikiTestCase {
* Tests for BaseDump
*
* @group Dump
+ * @covers BaseDump
*/
class BaseDumpTest extends MediaWikiTestCase {
*
* @group Database
* @group Dump
+ * @covers TextPassDumper
*/
class TextPassDumperTest extends DumpTestCase {
*
* @group Database
* @group Dump
+ * @covers BackupDumper
*/
class BackupDumperLoggerTest extends DumpTestCase {
*
* @group Database
* @group Dump
+ * @covers BackupDumper
*/
class BackupDumperPageTest extends DumpTestCase {
*
* @group Database
* @group Dump
+ * @covers FetchText
*/
class FetchTextTest extends MediaWikiTestCase {
* Tests for getSlaveServer
*
* @group Database
+ * @covers GetSlaveServer
*/
class GetSlaveServerTest extends MediaWikiTestCase {
*/
class SideBarTest extends MediaWikiLangTestCase {
- /** A skin template, reinitialized before each test */
+ /**
+ * A skin template, reinitialized before each test
+ * @var SkinTemplate
+ */
private $skin;
/** Local cache for sidebar messages */
private $messages;
$this->skin->getContext()->setLanguage( Language::factory( 'en' ) );
}
- protected function tearDown() {
- parent::tearDown();
- $this->skin = null;
- }
-
/**
* Internal helper to test the sidebar
* @param $expected
* @param $text
* @param $message (Default: '')
+ * @todo this assert method to should be converted to a test using a dataprovider..
*/
private function assertSideBar( $expected, $text, $message = '' ) {
$bar = array();
$this->assertEquals( $expected, $bar, $message );
}
- function testSidebarWithOnlyTwoTitles() {
+ /**
+ * @covers SkinTemplate::addToSidebarPlain
+ */
+ public function testSidebarWithOnlyTwoTitles() {
$this->assertSideBar(
array(
'Title1' => array(),
);
}
- function testExpandMessages() {
+ /**
+ * @covers SkinTemplate::addToSidebarPlain
+ */
+ public function testExpandMessages() {
$this->assertSidebar(
array( 'Title' => array(
array(
);
}
- function testExternalUrlsRequireADescription() {
+ /**
+ * @covers SkinTemplate::addToSidebarPlain
+ */
+ public function testExternalUrlsRequireADescription() {
$this->assertSidebar(
array( 'Title' => array(
# ** http://www.mediawiki.org/| Home
/**
* bug 33321 - Make sure there's a | after transforming.
* @group Database
+ * @covers SkinTemplate::addToSidebarPlain
*/
- function testTrickyPipe() {
+ public function testTrickyPipe() {
$this->assertSidebar(
array( 'Title' => array(
# The first 2 are skipped
/**
* Simple test to verify our helper assertAttribs() is functional
*/
- function testTestAttributesAssertionHelper() {
+ public function testTestAttributesAssertionHelper() {
$this->setMwGlobals( array(
'wgNoFollowLinks' => true,
'wgExternalLinkTarget' => false,
/**
* Test $wgNoFollowLinks in sidebar
*/
- function testRespectWgnofollowlinks() {
+ public function testRespectWgnofollowlinks() {
$this->setMwGlobals( 'wgNoFollowLinks', false );
$attribs = $this->getAttribs();
* Test $wgExternaLinkTarget in sidebar
* @dataProvider dataRespectExternallinktarget
*/
- function testRespectExternallinktarget( $externalLinkTarget ) {
+ public function testRespectExternallinktarget( $externalLinkTarget ) {
$this->setMwGlobals( 'wgExternalLinkTarget', $externalLinkTarget );
$attribs = $this->getAttribs();
$this->assertEquals( $attribs['target'], $externalLinkTarget );
}
- function dataRespectExternallinktarget() {
+ public static function dataRespectExternallinktarget() {
return array(
array( '_blank' ),
array( '_self' ),