* Added pp_sortkey column to page_props table, so pages can be efficiently
queried and sorted by property value (bug 58032).
See $wgPagePropsHaveSortkey if you want to postpone the schema change.
-* BREAKING CHANGE: The Modern and Cologne Blue skins were moved out of MediaWiki
- core to their own respective repositories. See also
- https://www.mediawiki.org/wiki/Skin:Modern and
- https://www.mediawiki.org/wiki/Skin:CologneBlue.
+* BREAKING CHANGE: All four built-in MediaWiki skins (Vector, MonoBook, Modern
+ and Cologne Blue) were moved out of MediaWiki core to their own respective
+ repositories. They will be installed with the release tarball, but you must
+ install them separately if installing MediaWiki from source code. A warning
+ message displayed until you do it should guide you through the process. See
+ also <https://www.mediawiki.org/wiki/Manual:Skin_configuration>.
* BREAKING CHANGE: Skins built for MediaWiki 1.15 and earlier that do not use
the "headelement" template key are no longer supported. Setting
$useHeadElement = false; is no longer supported and will not cause old keys
&$fields: Current HTMLForm fields
'SpecialContributionsBeforeMainOutput': Before the form on Special:Contributions
-$id: User id number, only provided for backwards-compatability
+$id: User id number, only provided for backwards-compatibility
$user: User object representing user contributions are being fetched for
$sp: SpecialPage instance, providing context
-Extensions (such as the hieroglyphic module WikiHiero) are distributed
-separately. Drop them into this extensions directory and enable as
-per the extension's directions.
+Extensions are distributed separately. Drop them into this directory and enable
+as per the extension's installation instructions.
-You can find a list of extensions and documentation on the MediaWiki website:
- https://www.mediawiki.org/wiki/Category:Extensions
+You can find a list of extensions and documentation at
+<https://www.mediawiki.org/wiki/Category:Extensions>.
-If you are a developer, you want to fetch the extension tree in another
+If you are a developer, you might want to fetch the extension tree in another
directory and make a symbolic link:
- mediawiki/extensions$ ln -s ../../extensions-trunk/FooBarExt
+ mediawiki/extensions$ ln -s ../../extensions-trunk/FooBar
Most extensions are available through Git:
- https://gerrit.wikimedia.org/r/#/admin/projects/
+ https://gerrit.wikimedia.org/r/#/admin/projects/?filter=mediawiki%252Fextensions%252F
https://git.wikimedia.org/project/mediawiki
-Old extensions are on Subversion:
- https://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/
-
Please note that under POSIX systems (Linux...), parent of a symbolic path
refers to the link source, NOT to the target! You should check the env
* - If there are multiple exact or range blocks at the same level, the one chosen
* is random
*
+ * @param array $blocks Array of blocks
* @param array $ipChain List of IPs (strings). This is used to determine how "close"
* a block is to the server, and if a block matches exactly, or is in a range.
* The order is furthest from the server to nearest e.g., (Browser, proxy1, proxy2,
* local-squid, ...)
- * @param array $block Array of blocks
* @return Block|null The "best" block from the list
*/
public static function chooseBlock( array $blocks, array $ipChain ) {
/**
* Format string for the UDP profiler. The UDP profiler invokes sprintf() with
- * (profile id, count, cpu, cpu_sq, real, real_sq, entry name) as arguments.
- * You can use sprintf's argument numbering/swapping capability to repeat,
- * re-order or omit fields.
+ * (profile id, count, cpu, cpu_sq, real, real_sq, entry name, memory) as
+ * arguments. You can use sprintf's argument numbering/swapping capability to
+ * repeat, re-order or omit fields.
*
* @see $wgStatsFormatString
* @since 1.22
* @var bool
* @since 1.24
*/
-$wgUseLinkNamespaceDBFields = false;
+$wgUseLinkNamespaceDBFields = true;
/**
* For really cool vim folding this needs to be at the end:
$cleanSummary = $wgParser->stripSectionName( $this->summary );
return wfMessage( 'newsectionsummary' )
->rawParams( $cleanSummary )->inContentLanguage()->text();
- } else {
- return $this->summary;
}
+ return $this->summary;
}
/**
$wgSkipSkins[] = $wgSkipSkin;
}
-// Register a hidden "fallback" skin
-$wgValidSkinNames['fallback'] = 'Fallback'; // SkinFallback
+// Register skins
+// Use a closure to avoid leaking into global state
+call_user_func( function() use ( $wgValidSkinNames ) {
+ $factory = SkinFactory::getDefaultInstance();
+ foreach ( $wgValidSkinNames as $name => $skin ) {
+ $factory->register( $name, $skin, function() use ( $name, $skin ) {
+ $class = "Skin$skin";
+ return new $class( $name );
+ } );
+ }
+ // Register a hidden "fallback" skin
+ $factory->register( 'fallback', 'Fallback', function() {
+ return new SkinFallback;
+ } );
+} );
$wgSkipSkins[] = 'fallback';
if ( $wgLocalInterwiki ) {
wfProfileIn( $fname . '-session' );
-// If session.auto_start is there, we can't touch session name
-if ( !wfIniGetBool( 'session.auto_start' ) ) {
- session_name( $wgSessionName ? $wgSessionName : $wgCookiePrefix . '_session' );
-}
+if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) {
+ // If session.auto_start is there, we can't touch session name
+ if ( !wfIniGetBool( 'session.auto_start' ) ) {
+ session_name( $wgSessionName ? $wgSessionName : $wgCookiePrefix . '_session' );
+ }
-if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode &&
- ( $wgRequest->checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix . 'Token'] ) )
-) {
- wfSetupSession();
+ if ( $wgRequest->checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix . 'Token'] ) ) {
+ wfSetupSession();
+ }
}
wfProfileOut( $fname . '-session' );
foreach ( $columns as $column ) {
foreach ( $rows as $row ) {
- $checkmatrixOptions["$prefix-$column-$row"] = true;
+ $checkmatrixOptions["$prefix$column-$row"] = true;
}
}
* secure: bool, secure attribute ($wgCookieSecure)
* httpOnly: bool, httpOnly attribute ($wgCookieHttpOnly)
* raw: bool, if true uses PHP's setrawcookie() instead of setcookie()
- * For backwards compatability, if $options is not an array then it and
+ * For backwards compatibility, if $options is not an array then it and
* the following two parameters will be interpreted as values for
* 'prefix', 'domain', and 'secure'
* @since 1.22 Replaced $prefix, $domain, and $forceSecure with $options
global $wgCookieSecure, $wgCookieExpiration, $wgCookieHttpOnly;
if ( !is_array( $options ) ) {
- // Backwards compatability
+ // Backwards compatibility
$options = array( 'prefix' => $options );
if ( func_num_args() >= 5 ) {
$options['domain'] = func_get_arg( 4 );
$this->userLink( $user ) )->params( $user->getName() )->escaped();
}
+ /**
+ * Whether we can display the user's real name (not a hidden pref)
+ *
+ * @since 1.24
+ * @return bool
+ */
+ protected function canShowRealUserName() {
+ $hiddenPrefs = $this->context->getConfig()->get( 'HiddenPrefs' );
+ return !in_array( 'realname', $hiddenPrefs );
+ }
+
/**
* Get a list of contributors of $article
* @param int $cnt Maximum list of contributors to show
* @return string Html
*/
protected function getContributors( $cnt, $showIfMax ) {
- global $wgHiddenPrefs;
-
$contributors = $this->page->getContributors();
$others_link = false;
$cnt--;
if ( $user->isLoggedIn() ) {
$link = $this->link( $user );
- if ( !in_array( 'realname', $wgHiddenPrefs ) && $user->getRealName() ) {
+ if ( $this->canShowRealUserName() && $user->getRealName() ) {
$real_names[] = $link;
} else {
$user_names[] = $link;
* @return string Html
*/
protected function link( User $user ) {
- global $wgHiddenPrefs;
- if ( !in_array( 'realname', $wgHiddenPrefs ) && !$user->isAnon() ) {
+ if ( $this->canShowRealUserName() && !$user->isAnon() ) {
$real = $user->getRealName();
} else {
$real = false;
if ( $user->isAnon() ) {
return $this->msg( 'anonuser' )->rawParams( $link )->parse();
} else {
- global $wgHiddenPrefs;
- if ( !in_array( 'realname', $wgHiddenPrefs ) && $user->getRealName() ) {
+ if ( $this->canShowRealUserName() && $user->getRealName() ) {
return $link;
} else {
return $this->msg( 'siteuser' )->rawParams( $link )->params( $user->getName() )->escaped();
* Print the history page for an article.
*/
function onView() {
- global $wgScript, $wgUseFileCache;
-
$out = $this->getOutput();
$request = $this->getRequest();
$this->preCacheMessages();
# Fill in the file cache if not set already
- if ( $wgUseFileCache && HTMLFileCache::useFileCache( $this->getContext() ) ) {
+ $useFileCache = $this->context->getConfig()->get( 'UseFileCache' );
+ if ( $useFileCache && HTMLFileCache::useFileCache( $this->getContext() ) ) {
$cache = HTMLFileCache::newFromTitle( $this->getTitle(), 'history' );
if ( !$cache->isCacheGood( /* Assume up to date */ ) ) {
ob_start( array( &$cache, 'saveToFileCache' ) );
}
// Add the general form
- $action = htmlspecialchars( $wgScript );
+ $action = htmlspecialchars( wfScript() );
$out->addHTML(
"<form action=\"$action\" method=\"get\" id=\"mw-history-searchform\">" .
Xml::fieldset(
* @param string $type Feed type
*/
function feed( $type ) {
- global $wgFeedClasses, $wgFeedLimit;
if ( !FeedUtils::checkFeedOutput( $type ) ) {
return;
}
$request = $this->getRequest();
+ $feedClasses = $this->context->getConfig()->get( 'FeedClasses' );
/** @var RSSFeed|AtomFeed $feed */
- $feed = new $wgFeedClasses[$type](
+ $feed = new $feedClasses[$type](
$this->getTitle()->getPrefixedText() . ' - ' .
$this->msg( 'history-feed-title' )->inContentLanguage()->text(),
$this->msg( 'history-feed-description' )->inContentLanguage()->text(),
// Get a limit on number of feed entries. Provide a sane default
// of 10 if none is defined (but limit to $wgFeedLimit max)
$limit = $request->getInt( 'limit', 10 );
- $limit = min( max( $limit, 1 ), $wgFeedLimit );
+ $limit = min(
+ max( $limit, 1 ),
+ $this->context->getConfig()->get( 'FeedLimit' )
+ );
$items = $this->fetchRevisions( $limit, 0, self::DIR_NEXT );
* @return string HTML output
*/
function getStartBody() {
- global $wgScript;
$this->lastRow = false;
$this->counter = 1;
$this->oldIdChecked = 0;
$this->getOutput()->wrapWikiMsg( "<div class='mw-history-legend'>\n$1\n</div>", 'histlegend' );
- $s = Html::openElement( 'form', array( 'action' => $wgScript,
+ $s = Html::openElement( 'form', array( 'action' => wfScript(),
'id' => 'mw-history-compare' ) ) . "\n";
$s .= Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) . "\n";
$s .= Html::hidden( 'action', 'historysubmit' ) . "\n";
* @return array
*/
protected function pageInfo() {
- global $wgContLang, $wgRCMaxAge, $wgMemc, $wgMiserMode,
- $wgUnwatchedPageThreshold, $wgPageInfoTransclusionLimit, $wgPageLanguageUseDB;
+ global $wgContLang, $wgMemc;
$user = $this->getUser();
$lang = $this->getLanguage();
$title = $this->getTitle();
$id = $title->getArticleID();
+ $config = $this->context->getConfig();
$memcKey = wfMemcKey( 'infoaction',
sha1( $title->getPrefixedText() ), $this->page->getLatest() );
$version = isset( $pageCounts['cacheversion'] ) ? $pageCounts['cacheversion'] : false;
if ( $pageCounts === false || $version !== self::CACHE_VERSION ) {
// Get page information that would be too "expensive" to retrieve by normal means
- $pageCounts = self::pageCounts( $title );
+ $pageCounts = $this->pageCounts( $title );
$pageCounts['cacheversion'] = self::CACHE_VERSION;
$wgMemc->set( $memcKey, $pageCounts );
// Language in which the page content is (supposed to be) written
$pageLang = $title->getPageLanguage()->getCode();
- if ( $wgPageLanguageUseDB && $this->getTitle()->userCan( 'pagelang' ) ) {
+ if ( $config->get( 'PageLanguageUseDB' ) && $this->getTitle()->userCan( 'pagelang' ) ) {
// Link to Special:PageLanguage with pre-filled page title if user has permissions
$titleObj = SpecialPage::getTitleFor( 'PageLanguage', $title->getPrefixedText() );
$langDisp = Linker::link(
);
}
+ $unwatchedPageThreshold = $config->get( 'UnwatchedPageThreshold' );
if (
$user->isAllowed( 'unwatchedpages' ) ||
- ( $wgUnwatchedPageThreshold !== false &&
- $pageCounts['watchers'] >= $wgUnwatchedPageThreshold )
+ ( $unwatchedPageThreshold !== false &&
+ $pageCounts['watchers'] >= $unwatchedPageThreshold )
) {
// Number of page watchers
$pageInfo['header-basic'][] = array(
$this->msg( 'pageinfo-watchers' ), $lang->formatNum( $pageCounts['watchers'] )
);
- } elseif ( $wgUnwatchedPageThreshold !== false ) {
+ } elseif ( $unwatchedPageThreshold !== false ) {
$pageInfo['header-basic'][] = array(
$this->msg( 'pageinfo-watchers' ),
- $this->msg( 'pageinfo-few-watchers' )->numParams( $wgUnwatchedPageThreshold )
+ $this->msg( 'pageinfo-few-watchers' )->numParams( $unwatchedPageThreshold )
);
}
// Recent number of edits (within past 30 days)
$pageInfo['header-edits'][] = array(
- $this->msg( 'pageinfo-recent-edits', $lang->formatDuration( $wgRCMaxAge ) ),
+ $this->msg( 'pageinfo-recent-edits', $lang->formatDuration( $config->get( 'RCMaxAge' ) ) ),
$lang->formatNum( $pageCounts['recent_edits'] )
);
$pageCounts['transclusion']['from'] > 0 ||
$pageCounts['transclusion']['to'] > 0
) {
- $options = array( 'LIMIT' => $wgPageInfoTransclusionLimit );
+ $options = array( 'LIMIT' => $config->get( 'PageInfoTransclusionLimit' ) );
$transcludedTemplates = $title->getTemplateLinksFrom( $options );
- if ( $wgMiserMode ) {
+ if ( $config->get( 'MiserMode' ) ) {
$transcludedTargets = array();
} else {
$transcludedTargets = $title->getTemplateLinksTo( $options );
);
}
- if ( !$wgMiserMode && $pageCounts['transclusion']['to'] > 0 ) {
+ if ( !$config->get( 'MiserMode' ) && $pageCounts['transclusion']['to'] > 0 ) {
if ( $pageCounts['transclusion']['to'] > count( $transcludedTargets ) ) {
$more = Linker::link(
$whatLinksHere,
* @param Title $title Title to get counts for
* @return array
*/
- protected static function pageCounts( Title $title ) {
- global $wgRCMaxAge, $wgDisableCounters, $wgMiserMode;
-
+ protected function pageCounts( Title $title ) {
wfProfileIn( __METHOD__ );
$id = $title->getArticleID();
+ $config = $this->context->getConfig();
$dbr = wfGetDB( DB_SLAVE );
$result = array();
- if ( !$wgDisableCounters ) {
+ if ( !$config->get( 'DisableCounters' ) ) {
// Number of views
$views = (int)$dbr->selectField(
'page',
);
$result['authors'] = $authors;
- // "Recent" threshold defined by $wgRCMaxAge
- $threshold = $dbr->timestamp( time() - $wgRCMaxAge );
+ // "Recent" threshold defined by RCMaxAge setting
+ $threshold = $dbr->timestamp( time() - $config->get( 'RCMaxAge' ) );
// Recent number of edits
$edits = (int)$dbr->selectField(
}
// Counts for the number of transclusion links (to/from)
- if ( $wgMiserMode ) {
+ if ( $config->get( 'MiserMode' ) ) {
$result['transclusion']['to'] = 0;
} else {
$result['transclusion']['to'] = (int)$dbr->selectField(
* @return string Html
*/
protected function getContributors() {
- global $wgHiddenPrefs;
-
$contributors = $this->page->getContributors();
$real_names = array();
$user_names = array();
? SpecialPage::getTitleFor( 'Contributions', $user->getName() )
: $user->getUserPage();
+ $hiddenPrefs = $this->context->getConfig()->get( 'HiddenPrefs' );
if ( $user->getID() == 0 ) {
$anon_ips[] = Linker::link( $page, htmlspecialchars( $user->getName() ) );
- } elseif ( !in_array( 'realname', $wgHiddenPrefs ) && $user->getRealName() ) {
+ } elseif ( !in_array( 'realname', $hiddenPrefs ) && $user->getRealName() ) {
$real_names[] = Linker::link( $page, htmlspecialchars( $user->getRealName() ) );
} else {
$user_names[] = Linker::link( $page, htmlspecialchars( $user->getName() ) );
}
function onView() {
- global $wgSquidMaxage, $wgForcedRawSMaxage;
-
$this->getOutput()->disable();
$request = $this->getRequest();
+ $config = $this->context->getConfig();
if ( !$request->checkUrlExtension() ) {
return;
if ( $gen == 'css' || $gen == 'js' ) {
$this->mGen = $gen;
if ( $smaxage === null ) {
- $smaxage = $wgSquidMaxage;
+ $smaxage = $config->get( 'SquidMaxage' );
}
} else {
$this->mGen = false;
# Note: If using a canonical url for userpage css/js, we send an HTCP purge.
if ( $smaxage === null ) {
if ( $contentType == 'text/css' || $contentType == 'text/javascript' ) {
- $smaxage = intval( $wgForcedRawSMaxage );
+ $smaxage = intval( $config->get( 'ForcedRawSMaxage' ) );
} else {
$smaxage = 0;
}
}
- $maxage = $request->getInt( 'maxage', $wgSquidMaxage );
+ $maxage = $request->getInt( 'maxage', $config->get( 'SquidMaxage' ) );
$response = $request->response();
$msg = wfMessage( $code, $errors[0] );
}
if ( isset( ApiBase::$messageMap[$code] ) ) {
- // Translate message to code, for backwards compatability
+ // Translate message to code, for backwards compatibility
$code = ApiBase::$messageMap[$code]['code'];
}
/**
* @see self::getPossibleErrors()
* @deprecated since 1.24
- * @retun array
+ * @return array
*/
public function getFinalPossibleErrors() {
wfDeprecated( __METHOD__, '1.24' );
// create instance from factory
$instance = call_user_func( $factory, $this->mParent, $name );
- if ( ! $instance instanceof $class ) {
+ if ( !$instance instanceof $class ) {
throw new MWException( "The factory function for module $name did not return an instance of $class!" );
}
} else {
private $mSpecialTitles = array();
private $mNormalizedTitles = array();
private $mInterwikiTitles = array();
+ /** @var Title[] */
private $mPendingRedirectIDs = array();
private $mConvertedTitles = array();
private $mGoodRevIDs = array();
private $mFakePageId = -1;
private $mCacheMode = 'public';
private $mRequestedPageFields = array();
- /**
- * @var int
- */
+ /** @var int */
private $mDefaultNamespace = NS_MAIN;
/**
/**
* Get a list of redirect resolutions - maps a title to its redirect
* target, as an array of output-ready arrays
- * @return array
+ * @return Title[]
*/
public function getRedirectTitles() {
return $this->mRedirectTitles;
/**
* Get the list of titles with negative namespace
- * @return array Title
+ * @return Title[]
*/
public function getSpecialTitles() {
return $this->mSpecialTitles;
$hasInterwikiResults = false;
if ( $interwiki && $resultPageSet === null && $matches->hasInterwikiResults() ) {
$matches = $matches->getInterwikiResults();
- $iwprefixes = array();
$hasInterwikiResults = true;
// Include number of results if requested
if ( $wgContLang->linkPrefixExtension() ) {
$linkPrefixCharset = $wgContLang->linkPrefixCharset();
$data['linkprefixcharset'] = $linkPrefixCharset;
- // For backwards compatability
+ // For backwards compatibility
$data['linkprefix'] = "/^((?>.*[^$linkPrefixCharset]|))(.+)$/sDu";
} else {
$data['linkprefixcharset'] = '';
*
* @since 1.24
* @param string|null $continue The "continue" parameter, if any
- * @param array $allModules Contains ApiBase instances that will be executed
+ * @param ApiBase[] $allModules Contains ApiBase instances that will be executed
* @param array $generatedModules Names of modules that depend on the generator
* @return array Two elements: a boolean indicating if the generator is done,
* and an array of modules to actually execute.
* @ingroup API
*/
class ApiUpload extends ApiBase {
- /** @var UploadBase */
+ /** @var UploadBase|UploadFromChunks */
protected $mUpload = null;
protected $mParams;
}
} else {
$filekey = $this->mParams['filekey'];
- /** @var $status Status */
$status = $this->mUpload->addChunk(
$chunkPath, $chunkSize, $this->mParams['offset'] );
if ( !$status->isGood() ) {
if ( isset( $warnings['duplicate'] ) ) {
$dupes = array();
+ /** @var File $dupe */
foreach ( $warnings['duplicate'] as $dupe ) {
$dupes[] = $dupe->getName();
}
if ( isset( $warnings['exists'] ) ) {
$warning = $warnings['exists'];
unset( $warnings['exists'] );
+ /** @var LocalFile $localFile */
$localFile = isset( $warning['normalizedFile'] )
? $warning['normalizedFile']
: $warning['file'];
private $readOnly = false;
public function get( $code, $key ) {
- if ( $this->writesDone && $this->dbw ) {
- $db = $this->dbw;
+ if ( $this->writesDone ) {
+ $db = wfGetDB( DB_MASTER );
} else {
$db = wfGetDB( DB_SLAVE );
}
throw new MWException( __METHOD__ . ": Invalid language \"$code\"" );
}
- // We must keep a separate connection to MySQL in order to avoid breaking
- // main transactions. However, SQLite deadlocks when using two connections.
- // @todo get this trick to work on PostgreSQL too
- if ( wfGetDB( DB_MASTER )->getType() == 'mysql' ) {
- $lb = wfGetLBFactory()->newMainLB();
- $this->dbw = $lb->getConnection( DB_MASTER );
- $this->dbw->clearFlag( DBO_TRX ); // auto-commit mode
- } else {
- $this->dbw = wfGetDB( DB_MASTER );
- }
+ $this->dbw = wfGetDB( DB_MASTER );
$this->currentLang = $code;
$this->batch = array();
/**
* Parsing RC_* constants to human-readable test
* @since 1.24
- * @param int $rc_type
+ * @param int $rcType
* @return string $type
*/
public static function parseFromRCType( $rcType ) {
}
/**
* Constructs an HTML representation of a JSON object.
- * @param Array $mapping
- * @return string HTML.
+ * @param array $mapping
+ * @return string HTML
*/
protected function objectTable( $mapping ) {
$rows = array();
return wfTimestamp( TS_POSTGRES, $ts );
}
- /*
+ /**
* Posted by cc[plus]php[at]c2se[dot]com on 25-Mar-2009 09:12
* to http://www.php.net/manual/en/ref.pgsql.php
*
* Fields can be retrieved with $row->fieldname, with fields acting like
* member variables.
*
- * @return object
+ * @return stdClass
* @throws DBUnexpectedError Thrown if the database returns an error
*/
function fetchObject() {
$this->db->dataSeek( $this, $row );
}
- /*********************
- * Iterator functions
+ /*
+ * ======= Iterator functions =======
* Note that using these in combination with the non-iterator functions
* above may cause rows to be skipped or repeated.
*/
}
/**
- * @return int
+ * @return stdClass|array|false
*/
function current() {
if ( is_null( $this->currentRow ) ) {
}
/**
- * @return int
+ * @return stdClass
*/
function next() {
$this->pos++;
return count( $this->result );
}
+ /**
+ * @return array|bool
+ */
function fetchRow() {
if ( $this->pos < count( $this->result ) ) {
$this->currentRow = $this->result[$this->pos];
function free() {
}
- // Callers want to be able to access fields with $this->fieldName
+ /**
+ * Callers want to be able to access fields with $this->fieldName
+ * @return false|stdClass
+ */
function fetchObject() {
$this->fetchRow();
if ( $this->currentRow ) {
$this->currentRow = null;
}
+ /**
+ * @return false|stdClass
+ */
function next() {
return $this->fetchObject();
}
* Sanitize and filter the custom headers from a $params array.
* We only allow certain Content- and X-Content- headers.
*
- * @param array $headers
+ * @param array $params
* @return array Sanitized value of 'headers' field in $params
*/
protected function sanitizeHdrs( array $params ) {
*
* STUB
* @param string $hash SHA-1 hash
- * @return array
+ * @return File[]
*/
public function findBySha1( $hash ) {
return array();
} elseif ( is_array( $triple[2] ) && isset( $triple[2]['headers'] ) ) {
$headers = $triple[2]['headers'];
}
+ // @fixme: $headers might not be defined
$operations[] = array(
'op' => FileBackend::isStoragePath( $src ) ? 'copy' : 'store',
'src' => $src,
/**
* @throws MWException
- * @param array $row
+ * @param stdClass $row
* @return LocalFile
*/
function newFileFromRow( $row ) {
$hashPath = $this->getDeletedHashPath( $key );
$path = "$root/$hashPath$key";
$dbw->begin( __METHOD__ );
- // Check for usage in deleted/hidden files and pre-emptively
+ // Check for usage in deleted/hidden files and preemptively
// lock the key to avoid any future use until we are finished.
$deleted = $this->deletedFileHasKey( $key, 'lock' );
$hidden = $this->hiddenFileHasKey( $key, 'lock' );
* Checks if there is a redirect named as $title
*
* @param Title $title Title of file
- * @return bool
+ * @return bool|Title
*/
function checkRedirect( Title $title ) {
global $wgMemc;
* SHA-1 content hash.
*
* @param string $hash A sha1 hash to look for
- * @return array
+ * @return File[]
*/
function findBySha1( $hash ) {
$dbr = $this->getSlaveDB();
/**
* Interface for FileRepo::checkRedirect()
* @param Title $title
- * @return bool
+ * @return bool|Title
*/
function checkRedirect( Title $title ) {
if ( !$this->reposInitialised ) {
* Find all instances of files with this key
*
* @param string $hash Base 36 SHA-1 hash
- * @return array Array of File objects
+ * @return File[]
*/
function findBySha1( $hash ) {
if ( !$this->reposInitialised ) {
* @note Use getWidth()/getHeight() instead of this method unless you have a
* a good reason. This method skips all caches.
*
- * @param string $fileName The path to the file (e.g. From getLocalPathRef() )
+ * @param string $filePath The path to the file (e.g. From getLocalPathRef() )
* @return array The width, followed by height, with optionally more things after
*/
function getImageSize( $filePath ) {
* @param string $tableName The table name
* @param string $oldIndexName The old index name
* @param string $newIndexName The new index name
+ * @param string $sqlPath The path to the SQL change path
* @param bool $skipBothIndexExistWarning 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
/**
* Try to see if a given fulltext catalog exists
* We assume we already have the appropriate database selected
- * @param string $schemaName Catalog name to check
+ * @param string $catalogName Catalog name to check
* @return bool
*/
private function catalogExists( $catalogName ) {
"config-localsettings-key": "Pihi hoʻopuka hou:",
"config-localsettings-badkey": "Hewa ka pihi.",
"config-upgrade-key-missing": "Loaʻa he hoʻonohona mai mua o MīkiaWiki mai mua.\nNo ka hoʻopuka hou ʻana o kēia hoʻonohona, e ʻoluʻolu, e kau i kēia laina lalo ma lalo o kāu <code>LocalSettings.php</code>:\n\n$1",
+ "config-localsettings-incomplete": "ʻAʻole piha pono kēia <code>LocalSettings.php</code> nei.\nʻAʻole hoʻopaʻa ʻia ka hualau $1.\nE hoʻololi iā <code>LocalSettings.php</code> i hiki ke hoʻopaʻa i ka hualau, a laila e kaomi iā \"{{int:Config-continue}}\" ke ʻoluʻolu.",
+ "config-localsettings-connection-error": "Ua loaʻa i ke kuʻia i ka hoʻokuʻi ʻana i ke hōkeo ʻikepili ma muli o ka hana ʻana o ka makemake e kākau ʻia ma <code>LocalSettings.php</code>. E ʻoluʻolu e hoʻoponopono i kēia makemake a hana hou.\n\n$1",
+ "config-session-error": "Kuʻia ka wā hoʻohana hoʻomaka: $1",
+ "config-session-expired": "Ua pau kāu ʻikepili wā hoʻohana.\nOla ka wā hoʻohana no ka manawa o $1.\nHiki iā ʻoe ke hoʻonui i kēia wā ma o ka hoʻololi ʻana o <code>session.gc_maxlifetime</code> ma php.ini.\nE hana hou i ka hana hoʻoukana.",
+ "config-no-session": "Ua nalo kāu ʻikepili wā hoʻohana!\nE hōʻoia i kāu php.ini a me ka hoʻopaʻa ʻana o <code>session.save_path</code> i ke kumu kūpono.",
"config-your-language": "Kāu ʻōlelo:",
"config-your-language-help": "E koho i kekahi ʻōlelo no ka hoʻohana ʻana ma loko o ka hana hoʻonohona.",
"config-wiki-language": "ʻŌlelo Wiki:",
"config-page-copying": "Kope",
"config-page-upgradedoc": "Ka Hoʻopuka ʻana",
"config-page-existingwiki": "Ka wiki nei",
+ "config-help-restart": "He ʻoiaʻiʻo kāu makemake no ka holoi pono o nā ʻikepili mālamalia a pau āu i kikokiko a hoʻomaka hou i ka hana hoʻouka?",
"config-restart": "ʻAe, e hōʻano hou",
"config-db-type": "ʻAno hōkeo ʻikepili:",
"config-db-name": "Inoa hōkeo ʻikepili",
/** Add misc metadata. Warning: atm if the metadata category
* doesn't have a priority, it will be silently discarded.
*
- * @param array $meta Array of metadata values
+ * @param array $metaArray Array of metadata values
* @param string $type Type. defaults to other. if two things have the same type they're merged
*/
function addMetadata( $metaArray, $type = 'other' ) {
return 2; // We don't need no bloddy constants!
}
- /**#@+
+ /**
* Validates if a tag value is of the type it should be according to the Exif spec
*
* @param mixed $in The input value to check
// Do nothing
}
- /*
+ /**
* True if the handler can rotate the media
* @since 1.21
* @return bool
*
* @param File $file The image object, or false if there isn't one.
* Warning, FSFile::getPropsFromPath might pass an (object)array() instead (!)
- * @param string $path The filename
+ * @param string $filename The filename
* @return string
*/
public function getMetadata( $file, $filename ) {
}
/**
- * @param string $key
* @param mixed $casToken
+ * @param string $key
* @param mixed $value
* @param int $exptime
* @return bool
* @ingroup Cache
*/
class SqlBagOStuff extends BagOStuff {
+ /** @var LoadBalancer */
+ protected $lb;
+
protected $serverInfos;
/** @var array */
$db = DatabaseBase::factory( $type, $info );
$db->clearFlag( DBO_TRX );
} else {
- // We must keep a separate connection to MySQL in order to avoid deadlocks
- // However, SQLite has an opposite behavior.
- // @todo get this trick to work on PostgreSQL too
+ /*
+ * We must keep a separate connection to MySQL in order to avoid deadlocks
+ * However, SQLite has an opposite behavior. And PostgreSQL needs to know
+ * if we are in transaction or no
+ */
if ( wfGetDB( DB_MASTER )->getType() == 'mysql' ) {
- $lb = wfGetLBFactory()->newMainLB();
- $db = $lb->getConnection( DB_MASTER );
+ $this->lb = wfGetLBFactory()->newMainLB();
+ $db = $this->lb->getConnection( DB_MASTER );
$db->clearFlag( DBO_TRX ); // auto-commit mode
} else {
$db = wfGetDB( DB_MASTER );
* Store a value in the WinCache object cache
*
* @param string $key Cache key
- * @param mixed $valueObject Value to store
+ * @param mixed $value Value to store
* @param int $expire Expiration time
* @return bool
*/
$user = $this->getContext()->getUser();
# Check permissions
- $permission_errors = $title->getUserPermissionsErrors( 'delete', $user );
- if ( count( $permission_errors ) ) {
- throw new PermissionsError( 'delete', $permission_errors );
+ $permissionErrors = $title->getUserPermissionsErrors( 'delete', $user );
+ if ( count( $permissionErrors ) ) {
+ throw new PermissionsError( 'delete', $permissionErrors );
}
# Read-only check...
* @param Content $content Content submitted
* @param User $user The relevant user
* @param string $comment Comment submitted
- * @param string $serialisation_format Format for storing the content in the database
* @param bool $minor Whereas it's a minor modification
+ * @param string $serialisation_format Format for storing the content in the database
*/
public function doQuickEditContent( Content $content, User $user, $comment = '', $minor = false,
$serialisation_format = null
/**
* Do something with the error, like showing it to the user.
*
- * @param $status
+ * @param Status $status
*
* @return bool
*/
/**
* @param Page $page
+ * @param ParserOptions $parserOptions ParserOptions to use for the parse
* @param int $revid ID of the revision being parsed.
* @param bool $useParserCache Whether to use the parser cache.
- * @param ParserOptions $parserOptions ParserOptions to use for the parse
* operation.
* @param Content|string $content Content to parse or null to load it; may
* also be given as a wikitext string, for BC.
continue;
}
$pfline = sprintf( $wgUDPProfilerFormatString, $this->getProfileID(), $pfdata['count'],
- $pfdata['cpu'], $pfdata['cpu_sq'], $pfdata['real'], $pfdata['real_sq'], $entry );
+ $pfdata['cpu'], $pfdata['cpu_sq'], $pfdata['real'], $pfdata['real_sq'], $entry,
+ $pfdata['memory'] );
$length = strlen( $pfline );
/* printf("<!-- $pfline -->"); */
if ( $length + $plength > 1400 ) {
* Suggest a target for the revision deletion
* @since 1.22
* @param string $typeName
- * @param Title|null $title User-supplied target
+ * @param Title|null $target User-supplied target
* @param array $ids
* @return Title|null
*/
* Factory method for loading a skin of a given type
* @param string $key 'monobook', 'vector', etc.
* @return Skin
- * @deprecated Use SkinFactory instead
+ * @deprecated since 1.24; Use SkinFactory instead
*/
static function &newFromKey( $key ) {
wfDeprecated( __METHOD__, '1.24' );
return "$numeric $type $name";
}
- /*
+ /**
* Return values for <html> element
* @return array of associative name-to-value elements for <html> element
*/
*/
private $factoryFunctions = array();
/**
- * Map of name => human readable name
+ * Map of name => fallback human-readable name, used when the 'skinname-<skin>' message is not
+ * available
+ *
* @var array
*/
private $displayNames = array();
+ /**
+ * Map of name => class name without "Skin" prefix, for legacy skins using the autodiscovery
+ * mechanism
+ *
+ * @var array
+ */
+ private $legacySkins = array();
/**
* @var SkinFactory
}
/**
- * Register a new Skin factory function
- * Will override if it's already registered
- * @param string $name
- * @param string $displayName
- * @param callable $callback That takes the skin name as an argument
+ * Register a new Skin factory function.
+ *
+ * Will override if it's already registered.
+ *
+ * @param string $name Internal skin name. Should be all-lowercase (technically doesn't have
+ * to be, but doing so would change the case of i18n message keys).
+ * @param string $displayName For backwards-compatibility with old skin loading system. This is
+ * the text used as skin's human-readable name when the 'skinname-<skin>' message is not
+ * available. It should be the same as the skin name provided in $wgExtensionCredits.
+ * @param callable $callback Callback that takes the skin name as an argument
* @throws InvalidArgumentException If an invalid callback is provided
*/
public function register( $name, $displayName, $callback ) {
* @return array
*/
private function getLegacySkinNames() {
- global $wgValidSkinNames;
static $skinsInitialised = false;
- if ( !$skinsInitialised || !count( $wgValidSkinNames ) ) {
+ if ( !$skinsInitialised || !count( $this->legacySkins ) ) {
# Get a list of available skins
# Build using the regular expression '^(.*).php$'
# Array keys are all lower case, array value keep the case used by filename
"The mechanism will be removed in MediaWiki 1.25 and the skin will no longer be recognized. " .
"See https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery for information how to fix this."
);
- $wgValidSkinNames[strtolower( $aSkin )] = $aSkin;
+ $this->legacySkins[strtolower( $aSkin )] = $aSkin;
}
}
$skinDir->close();
$skinsInitialised = true;
wfProfileOut( __METHOD__ . '-init' );
}
- return $wgValidSkinNames;
+ return $this->legacySkins;
}
}
/**
- * Get a legacy skin which uses $wgValidSkinNames
- * or autoloading
+ * Get a legacy skin which uses the autodiscovery mechanism.
*
* @param string $name
* @return Skin|bool false if the skin couldn't be constructed
*/
public function makeSkin( $name ) {
if ( !isset( $this->factoryFunctions[$name] ) ) {
- // Check the legacy method of skin loading
+ // Check the legacy autodiscovery method of skin loading
$legacy = $this->getLegacySkin( $name );
if ( $legacy ) {
return $legacy;
/**
* Add CSS via ResourceLoader
*
- * @param $out OutputPage
+ * @param OutputPage $out
*/
public function setupSkinUserCss( OutputPage $out ) {
parent::setupSkinUserCss( $out );
private function buildHelpfulInformationMessage() {
$defaultSkin = $this->config->get( 'DefaultSkin' );
$installedSkins = $this->findInstalledSkins();
- $enabledSkins = $this->config->get( 'ValidSkinNames' );
+ $enabledSkins = SkinFactory::getDefaultInstance()->getSkinNames();
$enabledSkins = array_change_key_case( $enabledSkins, CASE_LOWER );
if ( $installedSkins ) {
wfProfileIn( __METHOD__ . '-init' );
$this->initPage( $out );
wfProfileOut( __METHOD__ . '-init' );
- $tpl = $this->prepareQuickTemplate( $out );
+ $tpl = $this->prepareQuickTemplate();
// execute template
wfProfileIn( __METHOD__ . '-execute' );
$res = $tpl->execute();
*/
protected $hideRights = array();
+ /**
+ * @var array
+ */
+ private $blockStatusByUid;
+
/**
* @param IContextSource $context
* @param null $group Unused
}
if ( $feedType ) {
- // Maintain some level of backwards compatability
+ // Maintain some level of backwards compatibility
// If people request feeds using the old parameters, redirect to API
$feedParams['feedformat'] = $feedType;
$url = wfAppendQuery( wfScript( 'api' ), $feedParams );
}
}
- /*
+ /**
* @param string|null $subPage
*/
public function execute( $subPage ) {
return null;
}
+ /** @var UploadBase $handler */
$handler = new $className;
$handler->initializeFromRequest( $request );
/**
* Return the local file and initializes if necessary.
*
- * @return LocalFile|null
+ * @return LocalFile|UploadStashFile|null
*/
public function getLocalFile() {
if ( is_null( $this->mLocalFile ) ) {
/**
* Divide the element name passed by the xml parser to the callback into URI and prifix.
- * @param string $name
+ * @param string $element
* @return array Containing the namespace URI and prefix
*/
private static function splitXmlNamespace( $element ) {
* Get the current status of a chunked upload (used for polling).
* The status will be read from the *current* user session.
* @param string $statusKey
- * @return array|bool
+ * @return Status[]|bool
*/
public static function getSessionStatus( $statusKey ) {
return isset( $_SESSION[self::SESSION_STATUS_KEY][$statusKey] )
protected $mChunkIndex;
protected $mFileKey;
protected $mVirtualTempPath;
+ /** @var LocalRepo */
+ private $repo;
/**
* Setup local pointers to stash, repo and user (similar to UploadFromStash)
* and the SKM (source key material) is the "data".
*
* @param string $hash The hashing function to use (e.g., sha256)
- * @param string $ikm The input keying material
* @param string $salt The salt to add to the ikm, to get the prk
+ * @param string $ikm The input keying material
* @return string Binary string (pseudorandm key) used as input to HKDFExpand
*/
private static function HKDFExtract( $hash, $salt, $ikm ) {
}
/**
- * @param array $time (UIDGenerator::millitime(), clock sequence)
+ * @param array $info (UIDGenerator::millitime(), clock sequence)
* @return string 88 bits
*/
protected function getTimestampedID88( array $info ) {
/**
* Returns true if a language code is an IETF tag known to MediaWiki.
*
- * @param string $code
+ * @param string $tag
*
* @since 1.21
* @return bool
* Checks that convertPlural was given an array and pads it to requested
* amount of forms by copying the last one.
*
- * @param int $count How many forms should there be at least
* @param array $forms Array of forms given to convertPlural
+ * @param int $count How many forms should there be at least
* @return array Padded array of forms or an exception if not an array
*/
protected function preConvertPlural( /* Array */ $forms, $count ) {
"hidetoc": "не паказваць",
"collapsible-collapse": "Схаваць",
"collapsible-expand": "Паказаць",
+ "confirmable-confirm": "{{GENDER:$1|Вы}} ўпэўнены?",
+ "confirmable-yes": "Так",
+ "confirmable-no": "Не",
"thisisdeleted": "Паказаць ці аднавіць $1?",
"viewdeleted": "Ці паказаць $1?",
"restorelink": "$1 {{PLURAL:$1|сцёртая праўка|сцёртыя праўкі|сцёртых правак}}",
"delete-edit-reasonlist": "Правіць прычыны сцірання",
"delete-toobig": "Старонка мае вялікую гісторыю правак, больш за $1 {{PLURAL:$1|версію|версій}}. Сціранне такіх старонак было абмежавана, каб пазбегчы ўтварэння выпадковых перашкод працы {{SITENAME}}.",
"delete-warning-toobig": "Старонка мае вялікую гісторыю правак, больш за $1 {{PLURAL:$1|версію|версій}}. Сціранне такіх старонак можа перашкодзіць працы базы даных {{SITENAME}}; будзьце асцярожнымі.",
+ "delete-cantedit": "Вы не можаце сцерці гэту старонку, таму што не маеце дазволу правіць яе.",
"deleting-backlinks-warning": "'''Увага:''' [[Special:WhatLinksHere/{{FULLPAGENAME}}|Іншыя старонкі]] спасылаюцца на ці ўключаюць старонку, якую вы збіраецеся сцерці.",
"rollback": "Адкаціць праўкі",
"rollback_short": "Адкат",
"autoblockid": "Аўтаблакіроўка #$1",
"block": "Заблакаваць удзельніка",
"unblock": "Разблакаваць удзельніка",
- "blockip": "Заблакаваць удзельніка",
+ "blockip": "Заблакаваць {{GENDER:$1|удзельніка|удзельніцу}}",
"blockip-legend": "Заблакаваць удзельніка",
"blockiptext": "Гэты фармуляр дазваляе заблакаваць магчымасць запісу для пэўнага адрасу IP ці імя ўдзельніка.\nГэта трэба рабіць толькі дзеля засцерагання ад вандалізму і ў адпаведнасці з [[{{MediaWiki:Policy-url}}|правіламі]].\nНіжэй трэба ўпісаць канкрэтную прычыну (напрыклад, пералічваючы канкрэтныя старонкі, якія былі вандалізаваныя).",
"ipaddressorusername": "IP-адрас ці імя ўдзельніка:",
"ipb-unblock-addr": "Зняць блок з $1",
"ipb-unblock": "Зняць блок з імя ўдзельніка або адрасу IP",
"ipb-blocklist": "Паказаць наяўныя блокі",
- "ipb-blocklist-contribs": "Уклад $1",
+ "ipb-blocklist-contribs": "Уклад {{GENDER:$1|$1}}",
"unblockip": "Зняць блок з удзельніка",
"unblockiptext": "У форме, што ніжэй, можна вярнуць дазвол на запіс для раней заблакаванага адрасу IP або ўдзельніка.",
"ipusubmit": "Зняць гэты блок",
"log-name-pagelang": "Журнал змянення мовы",
"log-description-pagelang": "Гэта журнал змяненняў у мовах старонкі.",
"logentry-pagelang-pagelang": "$1 {{GENDER:$2|змяніў|змяніла}} мову старонкі $3 з $4 на $5.",
+ "default-skin-not-found": "Упс! Прадвызначаная вокладка для вашай вікі (<code>$wgDefaultSkin</code>), <code>$1</code>, недаступна.\n\nВыглядае на тое, што ваша інсталяцыя ўключае наступныя вокладкі. Гл. [https://www.mediawiki.org/wiki/Manual:Skin_configuration Інструкцыя: Устаноўка вокладак] дзеля інфармацыі па ўключэнні і выбару прадвызначанай вокладкі.\n\n$2\n\n; Калі вы толькі што ўстанавілі MediaWiki:\n: Магчыма, вы ўстанавілі з git, ці наўпрост з зыходнага коду, выкарыстаўшы іншы метад. Гэта нармальна. Паспрабуйце ўстанавіць некалькі вокладак з [https://www.mediawiki.org/wiki/Category:All_skins каталога вокладак mediawiki.org], такім чынам:\n:* Узяўшы [https://www.mediawiki.org/wiki/Download tarball-інсталятар], які ўтрымлівае некалькі вокладак і прыставак. Вы можаце скапіяваць і ўставіць каталог <code>skins/</code> з яго.\n:* Зрабіўшы клон аднаго з сховішчаў <code>mediawiki/skins/*</code> праз git у каталог <code>skins/</code> вашай інсталяцыі MediaWiki.\n: Калі вы распрацоўшчык MediaWiki, гэта не павінна ўплываць на ваша git-сховішча.\n\n; Калі вы толькі што абнавілі MediaWiki:\n: MediaWiki 1.24 і навейшыя больш не падключаюць вокладкі аўтаматычна (гл. [https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery Інструкцыя: Аўтавызначэнне вокладак]). Вы можаце ўставіць наступныя радкі ў <code>LocalSettings.php</code>, каб падключыць усе ўстаноўленыя вокладкі:\n\n<pre>$3</pre>\n\n; Калі вы толькі што змянілі <code>LocalSettings.php</code>:\n: Пераправерце назвы вокладак на прадмет памылак.",
+ "default-skin-not-found-no-skins": "Упс! Прадвызначаная вокладка для вашай вікі (<code>$wgDefaultSkin</code>), <code>$1</code>, недаступна.\n\nВы не ўстанавілі вокладкі.\n\n; Калі вы толькі што ўстанавілі ці абнавілі MediaWiki:\n: Магчыма, вы ўстанавілі з git, ці наўпрост з зыходнага коду, выкарыстаўшы іншы метад. Гэта нармальна. MediaWiki 1.24 і навейшыя не ўключаюць вокладкі ў асноўнае сховішча. Паспрабуйце ўстанавіць некалькі вокладак з [https://www.mediawiki.org/wiki/Category:All_skins каталога вокладак mediawiki.org], такім чынам:\n:* Узяўшы [https://www.mediawiki.org/wiki/Download tarball-інсталятар], які ўтрымлівае некалькі вокладак і прыставак. Вы можаце скапіяваць і ўставіць каталог <code>skins/</code> адтуль.\n:* Зрабіўшы клон аднаго з сховішчаў <code>mediawiki/skins/*</code> праз git у каталог <code>skins/</code> вашай інсталяцыі MediaWiki.\n: Калі вы распрацоўшчык MediaWiki, гэта не павінна адбіцца на вашым git-сховішчы. Гл. [https://www.mediawiki.org/wiki/Manual:Skin_configuration Інструкцыя: Настройка вокладак] дзеля інфармацыі па ўключэнні вокладак і выбары прадвызначэння.",
"default-skin-not-found-row-enabled": "* <code>$1</code> / $2 (уключана)",
"default-skin-not-found-row-disabled": "* <code>$1</code> / $2 ('''выключана''')"
}
"pool-timeout": "সময় উত্তির্ণ লক-এর জন্য অপেক্ষারত",
"pool-queuefull": "পুলের লাইন পূর্ণ",
"pool-errorunknown": "অজানা ত্রুটি",
+ "pool-servererror": "পুল কাউন্টার সার্ভিস নিষ্ক্রিয় ($1)।",
"aboutsite": "{{SITENAME}} বৃত্তান্ত",
"aboutpage": "Project:বৃত্তান্ত",
"copyright": "বিষয়বস্তু $1-এর আওতায় প্রকাশিত যদি না অন্য কিছু নির্ধারিত থাকে।",
"invalidtitle-knownnamespace": "অবৈধ শিরোনাম, যেখানে নামস্থান \"$2\" এবং লেখা হয়েছে \"$3\"",
"invalidtitle-unknownnamespace": "অবৈধ শিরোনাম, যেখানে ব্যবহৃত হয়েছে অপরিচিত নামস্থান সংখ্যা $1 এবং লেখা হয়েছে \"$2\"",
"exception-nologin": "লগইন করা হয়নি",
- "exception-nologin-text": "এই কাজটি করার জন্য উইকিতে [[Special:Userlogin|লগইন]] করা প্রয়োজন।",
+ "exception-nologin-text": "এই কাজ করা বা পাতাটি দেখার জন্য অনুগ্রহ করে প্রবেশ করুন।",
"exception-nologin-text-manual": "অনুগ্রহ করে এই পাতা দেখতে অথবা পরিবর্তন করতে $1 করুন।",
"virus-badscanner": "ভুল কনফিগারেশন: অজ্ঞাত ভাইরাস স্কেনার: ''$1''",
"virus-scanfailed": "স্ক্যান করা যাচ্ছে না (কোড $1)",
"preview": "প্রাকদর্শন",
"showpreview": "প্রাকদর্শন",
"showdiff": "পরিবর্তনসমূহ",
+ "blankarticle": "<strong>সতর্ক বার্তা:</strong> আপনি একটি খালি পাতা তৈরী করতে যাচ্ছেন।\nআপনি যদি পুনরায় \"{{int:savearticle}}\" বাটন ক্লিক করেন তাহলে, পাতাটি তৈরী হবে যেখানে কোনো তথ্য লেখা নেই।",
"anoneditwarning": "আপনি লগ ইন করেননি। এই পাতার সম্পাদনার ইতিহাসে আপনার আইপি সংখ্যা সংরক্ষিত হবে।",
"anonpreviewwarning": "আপনি লগ ইন করেননি। এই পাতার সম্পাদনার ইতিহাসে আপনার আইপি সংখ্যা সংরক্ষিত হবে।",
"missingsummary": "'''খেয়াল করুন''': আপনি কিন্তু সম্পাদনার সারাংশ দেননি। আবার যদি \"সংরক্ষণ\" বোতামে ক্লিক করেন, তাহলে ঐ সারাংশ বাক্যটি ছাড়াই আপনার সম্পাদনা সংরক্ষিত হবে।",
"parser-template-recursion-depth-warning": "টেমপ্লেট পুনরাবৃত্তি (রিকার্শন) ডেপথ্ সীমা অতক্রম করেছে ($1)",
"language-converter-depth-warning": "ভাষা পরিবর্তন ডেপথ্ সীমা অতক্রম করেছে ($1)",
"node-count-exceeded-category": "যে সকল পাতার নোড কাউন্ট সীমানা পার হয়েছে",
+ "node-count-exceeded-category-desc": "পাতার সর্বোচ্চ নোড কাউন্ট সীমানা অতিক্রম করেছে।",
"node-count-exceeded-warning": "পাতাটি নোড কাউন্ট সীমানা পার করেছে",
"expansion-depth-exceeded-category": "যে সকল পাতার এক্সেপশন সীমানা অতিক্রম করেছে",
+ "expansion-depth-exceeded-category-desc": "পাতাটি সর্বোচ্চ এক্সপশন সীমানা অতিক্রম করেছে।",
"expansion-depth-exceeded-warning": "পাতাটি এক্সেপশন সীমানা অতিক্রম করেছে",
"parser-unstrip-loop-warning": "ত্রুটিপূর্ণ লুপ খুঁজে পাওয়া গিয়েছে",
"parser-unstrip-recursion-limit": "লুপ রিকারশন সীমানা অতিক্রম করেছে ($1)",
"rev-deleted-event": "(লগ অ্যাকশন সরানো হয়েছে)",
"rev-deleted-user-contribs": "ব্যবহারকারীর নাম অথবা আইপি ঠিকানা অপসারিত হয়েছে - অবদান থেকে সম্পাদনা আড়াল করা হয়েছে",
"rev-deleted-text-permission": "পাতার এই সংস্করণটি '''অপসারিত''' হয়েছে।\nবিস্তারিত কারণ এর [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} অপসারণ লগে] পাওয়া যেতে পারে।",
+ "rev-suppressed-text-permission": "পাতার এই সংশোধনটি <strong>গোপন</strong> করা হয়েছে।\nআপনি এটি দেখতে পারেন; এ সংক্রাস্ত বিস্তারিত বিবরণ[{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} গোপনকার্যের লগে] থাকতে পারে।",
"rev-deleted-text-unhide": "পাতার এই সংস্করণটি '''অপসারিত''' হয়েছে।\nবিস্তারিত কারণ এর [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} অপসারণ লগে] পাওয়া যেতে পারে।\nআপনি ইচ্ছা পোষণ করলে [$1 এই সংস্করণটি দেখতে পারেন]।",
"rev-suppressed-text-unhide": "পাতার এই সংস্করণটি '''অপসারিত''' হয়েছে।\nবিস্তারিত কারণ এর [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} অপসারণ লগে] পাওয়া যেতে পারে।\nআপনি ইচ্ছা পোষণ করলে [$1 এই সংস্করণটি দেখতে পারেন]।",
"rev-deleted-text-view": "পাতার এই সংশোধনটি অপসারণ করা হয়েছে।\nআপনি এটি দেখতে পারেন; এ সংক্রাস্ত বিস্তারিত বিবরণ [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} অবলুপ্তি লগে] থাকতে পারে।",
"powersearch-togglelabel": "পরীক্ষা:",
"powersearch-toggleall": "সকল",
"powersearch-togglenone": "কিছু নয়",
+ "powersearch-remember": "ভবিষ্যত অনুসন্ধানগুলির জন্য নির্বাচন মনে রাখুন",
"search-external": "বহিঃস্থ অনুসন্ধান",
"searchdisabled": "{{SITENAME}} অনুসন্ধান এখন নিষ্ক্রিয় আছে। আপনি গুগলের মাধ্যমে অনুসন্ধান চালাতে পারেন। লক্ষ্য করুন যে {{SITENAME}}-এর বিষয়বস্তুর উপর গুগলের ইন্ডেক্সগুলি হালনাগাদ না-ও করা থাকতে পারে।",
"search-error": "অনুসন্ধানের সময় একটি ত্রুটি হয়েছে: $1",
"preferences": "আমার পছন্দ",
"mypreferences": "পছন্দসমূহ",
"prefs-edits": "সম্পাদনা সংখ্যা:",
- "prefsnologintext2": "বà§\8dযবহারà¦\95ারà§\80 পà¦\9bনà§\8dদসমà§\82হ নিরà§\8dধারনà§\87র à¦\9cনà§\8dয $1 করুন।",
+ "prefsnologintext2": "à¦\86পনার পà¦\9bনà§\8dদসমà§\82হ পরিবরà§\8dতন à¦\95রতà§\87 পà§\8dরবà§\87শ করুন।",
"prefs-skin": "আবরণ (Skin)",
"skin-preview": "প্রাকদর্শন",
"datedefault": "কোন পছন্দ নেই",
"recentchanges-legend-heading": "'''ব্যাখ্যামূলক বর্ণনা:'''",
"recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (আরও দেখুন [[Special:NewPages|নতুন পাতার তালিকা]])",
"recentchanges-legend-plusminus": "(''±১২৩'')",
- "rcnotefrom": "<strong>$2</strong>টা থেকে সংঘটিত পরিবর্তনগুলি (সর্বোচ্চ <strong>$1টি</strong> দেখানো হয়েছে)",
+ "rcnotefrom": "<strong>$2</strong>টা থেকে সংঘটিত পরিবর্তনগুলি (সর্বোচ্চ <strong>$1টি</strong> দেখানো হয়েছে)।",
"rclistfrom": "$2, $3 তারিখের পর সংঘটিত নতুন পরিবর্তনগুলো দেখাও",
"rcshowhideminor": "অনুল্লেখ্য পরিবর্তনগুলো $1",
"rcshowhideminor-show": "দেখাও",
"license": "লাইসেন্সকরণ:",
"license-header": "লাইসেন্স প্রদান",
"nolicense": "কিছুই নির্বাচন করা হয়নি",
+ "licenses-edit": "লাইসেন্স অপশন সম্পাদনা করুন",
"license-nopreview": "(প্রাকদর্শন লভ্য নয়)",
"upload_source_url": " (একটি বৈধ, উন্মুক্ত URL)",
"upload_source_file": " (আপনার কম্পিউটারের একটি ফাইল)",
"wantedtemplates": "আবশ্যিক টেম্পলেটগুলো",
"mostlinked": "যেসব পাতার প্রতি সবচেয়ে বেশি সংযোগ আছে",
"mostlinkedcategories": "যেসব বিষয়শ্রেণীর প্রতি সবচেয়ে বেশি সংযোগ আছে",
- "mostlinkedtemplates": "যà§\87সব à¦\9fà§\87মপà§\8dলà§\87à¦\9fà§\87 সবà¦\9aà§\87য়à§\87 বà§\87শি সà¦\82যà§\8bà¦\97 à¦\86à¦\9bà§\87",
+ "mostlinkedtemplates": "সবà¦\9aà§\87য়à§\87 বà§\87শি à¦\85নà§\8dতরà§\8dà¦à§\81à¦\95à§\8dত পাতা",
"mostcategories": "সবচেয়ে বেশী বিষয়শ্রেণী-সমৃদ্ধ নিবন্ধসমূহ",
"mostimages": "যেসব ফাইলের দিকে সবচেয়ে বেশি সংযোগ আছে",
"mostinterwikis": "সবচেয়ে বেশী ইন্টারউইকি লিংক-সমৃদ্ধ নিবন্ধসমূহ",
"watchlist-details": "আপনার নজরতালিকাতে {{PLURAL:$1|$1টি পাতা}} আছে (আলাপ পাতাগুলি গণনায় না ধরে)।",
"wlheader-enotif": "ইমেল বিজ্ঞপ্তি সক্রিয় করা আছে।",
"wlheader-showupdated": "আপনার শেষ আগমনের পর থেকে যেসব পাতায় পরিবর্তন হয়েছে সেগুলি '''গাঢ়''' করে দেখানো হয়েছে।",
- "wlnote": "নিচে $3, $4 তারিখ থেকে বিগত {{PLURAL:$2|১ ঘন্টায়|'''$2''' ঘন্টায়}} সংঘটিত {{PLURAL:$1|শেষ ১টি পরিবর্তন|শেষ '''$1'''টি পরিবর্তন}} দেখানো হল।",
+ "wlnote": "নিচে $3, $4 তারিখ থেকে বিগত {{PLURAL:$2|১ ঘন্টায়|<strong>$2</strong> ঘন্টায়}} সংঘটিত {{PLURAL:$1|শেষ ১টি পরিবর্তন|শেষ <strong>$1টি</strong> পরিবর্তন}} দেখানো হল।",
"wlshowlast": "দেখাও সর্বশেষ $1 ঘণ্টা $2 দিন $3",
"watchlist-options": "নজর তালিকা পছন্দসমূহ",
"watching": "নজর রাখা হচ্ছে...",
"autoblockid": "স্বয়ংক্রিয় বাধা #$1",
"block": "ব্যবহারকারীকে বাধা দাও",
"unblock": "ব্যবহারকারীর উপর থেকে বাধা অপসারণ",
- "blockip": "ব্যবহারকারীকে বাধা দাও",
+ "blockip": "{{GENDER:$1|ব্যবহারকারীকে}} বাধা দাও",
"blockip-legend": "ব্যবহারকারীকে বাধা দেওয়া হোক",
"blockiptext": "কোন নির্দিষ্ট আইপি ঠিকানা বা ব্যবহারকারীর লেখার অধিকারে বাধা দিতে নিচের ফর্মটি ব্যবহার করুন।\nএটি কেবলমাত্র ধ্বংসপ্রবণতা প্রতিরোধে ও [[{{MediaWiki:Policy-url}}|নীতিমালা]] মেনে সম্পাদন করা উচিত।\nনিচে একটি নির্দিষ্ট কারণ দিন (উদাহরণস্বরূপ, যেসব পাতার ধ্বংসসাধন করা হয়েছে, সেগুলি উল্লেখ করতে পারেন)।",
"ipaddressorusername": "আইপি ঠিকানা বা ব্যবহারকারীর নাম:",
"ipb-unblock-addr": "$1-এর উপর থেকে বাধা তুলে নেওয়া হোক",
"ipb-unblock": "ব্যবহারকারী বা আইপি ঠিকানার উপর থেকে বাধা তুলে নেওয়া হোক",
"ipb-blocklist": "বিদ্যমান বাধাগুলি দেখুন",
- "ipb-blocklist-contribs": "$1 এর অবদানসমূহ",
+ "ipb-blocklist-contribs": "{{GENDER:$1|$1}}-এর অবদানসমূহ",
"unblockip": "ব্যবহারকারীর উপর থেকে বাধা তুলে নেওয়া হোক",
"unblockiptext": "নিচের ফর্মটি ব্যবহার করে পূর্বে বাধা দেওয়া কোন আইপি ঠিকানা বা ব্যবহারকারীর সাইটে লেখার অধিকার পুনঃপ্রতিষ্ঠা করুন।",
"ipusubmit": "বাধা তুলে নেওয়া হোক",
"logentry-rights-rights": "$1 ব্যবহারকারী, $3 এর দলগত সদস্যপদ $4 থেকে $5 এ {{GENDER:$2|পরিবর্তন}} করেছেন",
"logentry-rights-rights-legacy": "$1 দলের সদস্যপদ পরিবর্তন করেছেন {{GENDER:$2|changed}} এর জন্য $3",
"logentry-rights-autopromote": "$1 সয়ংক্রিয়ভাবে $4 থেকে $5 এ {{GENDER:$2|উন্নীত}} হয়েছে",
+ "logentry-upload-upload": "$1 $3 {{GENDER:$2|আপলোড করেছেন}}",
+ "logentry-upload-overwrite": "$1 $3-এর একটি নতুন সংস্করণ {{GENDER:$2|আপলোড করেছেন}}",
+ "logentry-upload-revert": "$1 $3 {{GENDER:$2|আপলোড করেছেন}}",
"rightsnone": "(কিছু নাই)",
"feedback-bugornote": "কারিগরী ত্রুটির বিস্তারিত বর্ণনা জানতে [$1 বাগ রিপোর্ট করুন]।\nঅথবা নিচের এই সরল ফর্মটি ব্যবহার করতে পারেন। \"[$3 $2]\" পাতায় আপনার ব্যবহারকারী নাম সহ মন্তব্যটি প্রকাশিত হবে।",
"feedback-subject": "বিষয়:",
"hidden-category-category": "Rummadoù kuzhet",
"category-subcat-count": "{{PLURAL:$2|N'eus er rummad-mañ nemet an isrummad da-heul.|{{PLURAL:$1|isrummad|$1 isrummad}} zo d'ar rummad-mañ diwar un hollad a $2.}}",
"category-subcat-count-limited": "Er rummad-mañ e kaver an {{PLURAL:$1|isrummad-se|$1 isrummadoù-se}}.",
- "category-article-count": "{{PLURAL:$2|N'eus er rummad-mañ nemet ar bajenn da-heul.|Emañ ar {{PLURAL:$1|bajenn da-heul|$1 pajenn da-heul}} er rummad-mañ, diwar un hollad a $2.}}",
- "category-article-count-limited": "{{PLURAL:$1|Emañ ar bajenn|Emañ an $1 pajenn}} da-heul er rummad-mañ.",
+ "category-article-count": "{{PLURAL:$2|N'eus er rummad-mañ nemet ar bajenn da-heul.|Emañ {{PLURAL:$1|ar bajenn da-heul|an/ar $1 pajenn da-heul}} er rummad-mañ, diwar un hollad a $2.}}",
+ "category-article-count-limited": "{{PLURAL:$1|Emañ ar bajenn|Emañ an/ar $1 pajenn}} da-heul er rummad-mañ.",
"category-file-count": "{{PLURAL:$2|N'eus er rummad-mañ nemet ar restr da-heul.|Emañ ar {{PLURAL:$1|restr|$1 restr}} da-heul er rummad-mañ, diwar un hollad a $2.}}",
"category-file-count-limited": "{{PLURAL:$1|Emañ ar restr|Emañ an $1 restr}} da-heul er rummad-mañ.",
"listingcontinuesabbrev": "(war-lerc'h)",
"otherlanguages": "Yezhoù all",
"redirectedfrom": "(Adkaset eus $1)",
"redirectpagesub": "Pajenn adkas",
- "lastmodifiedat": "Kemmoù diwezhañ degaset d'ar bajenn-mañ, d'an $1 da $2.",
+ "lastmodifiedat": "Kemmoù diwezhañ degaset d'ar bajenn-mañ, d'an/ar $1 da $2.",
"viewcount": "Sellet ez eus bet {{PLURAL:$1|$1 wezh|$1 gwezh}} ouzh ar bajenn-mañ.",
"protectedpage": "Pajenn warezet",
"jumpto": "Mont da :",
"protectedtitles": "Suojatut sivunimet",
"protectedtitles-summary": "Tällä sivulla on lueteltu ne sivut, jotka on tällä hetkellä suojattu uudelleenluonnilta. Nähdäksesi luettelon olemassaolevista suojatuista sivuista katso [[{{#special:ProtectedPages}}|{{int:protectedpages}}]].",
"protectedtitlesempty": "Ei suojattuja sivunimiä näillä hakuehdoilla.",
- "listusers": "Käyttäjälista",
+ "listusers": "Käyttäjien luettelo",
"listusers-editsonly": "Näytä vain käyttäjät, joilla on muokkauksia",
"listusers-creationsort": "Lajittele tunnuksen luontipäivämäärän mukaan",
"listusers-desc": "Lajittele alenevassa järjestyksessä",
"talkpagelinktext": "Walaʻau",
"specialpage": "‘Ao‘ao kūikawā",
"personaltools": "Hāmeʻa ponoʻī",
- "postcomment": "Māhele hou",
"articlepage": "Nānā i ka ʻaoʻao mealoko",
"talk": "walaʻau",
"views": "Nānaina",
"hidetoc": "hoʻohūnā",
"collapsible-collapse": "Hoʻoliʻi",
"collapsible-expand": "Hoʻākea",
+ "confirmable-confirm": "He ʻoiaʻiʻo nō?",
+ "confirmable-yes": "ʻAe",
+ "confirmable-no": "ʻAʻole",
"thisisdeleted": "Nānā ai‘ole hō‘āla iā $1?",
"viewdeleted": "Nānā iā $1?",
"restorelink": "{{PLURAL:$1|kekahi loli holoi|$1 mau loli holoi}}",
"cascadeprotected": "Ho‘omalu ‘ia kēia ‘ao‘ao mai e ho‘opololei ana, no ka mea, hoʻokomo pū ‘ia ‘oia ma aia {{PLURAL:$1|‘ao‘ao|nā ‘ao‘ao}} i lalo, ho‘omalu ‘ia me ka \"e wailele ana\" koho:\n$2",
"ns-specialprotected": "‘A‘ole hiki ke ho‘ololi i nā ‘ao‘ao kūikawā",
"exception-nologin": "ʻE‘e ʻole",
+ "exception-nologin-text": "E ʻoluʻolu e ʻeʻe no ke komo ʻana i kēia ʻaoʻao a i ʻole ka ʻae no kēia hana.",
+ "exception-nologin-text-manual": "E ʻoluʻolu, e $1 no ke komo ʻana i kēia ʻaoʻao a i ʻole ka ʻae no kēia hana.",
"welcomeuser": "Welina mai e $1!",
"yourname": "Inoa mea ho'ohana:",
"userlogin-yourname": "Inoa mea hoʻohana",
"userlogin-remembermypassword": "Hoʻomanaʻo iaʻu",
"login": "ʻEʻe",
"nav-login-createaccount": "ʻEʻe / Kāinoa",
- "loginprompt": "Pono ʻoe e hoʻā i nā makana no ka ʻeʻe ʻana iā {{SITENAME}}.",
"userlogin": "ʻEʻe / Kāinoa",
"userloginnocreate": "ʻEʻe",
"logout": "Haʻalele",
"pt-createaccount": "Kāinoa",
"pt-userlogout": "Haʻalele",
"changepassword": "E hoʻololi i ka ʻōlelo hūnā",
+ "resetpass_header": "Hoʻololi i ka ʻōlelo hūnā moʻokāki",
"oldpassword": "ʻŌlelo hūnā kahiko:",
"newpassword": "ʻŌlelo hūnā hou:",
"retypenew": "E kikokiko hou i ka ʻōlelo hūnā hou:",
"resetpass_submit": "Kau i ka ʻōlelo hūnā a ʻeʻe",
"changepassword-success": "Ua hoʻololi ‘ia kāu hua‘ōlelo huna!",
+ "changepassword-throttled": "Nui ʻino ka hana ʻeʻe ʻana.\nE kali no $1 ma mua o ka hana hou ʻana ke ʻoluʻolu.",
+ "resetpass_forbidden": "ʻAʻole hiki ke hoʻololi i nā ʻōlelo hūnā",
+ "resetpass-no-info": "Pono ʻoe e ʻeʻe no ke komo pono ʻana o kēia ʻaoʻao.",
"resetpass-submit-loggedin": "Hoʻololi i ka ʻōlelo hūnā",
"resetpass-submit-cancel": "Hoʻōki",
"resetpass-temp-password": "ʻŌlelo hūnā kūikawā:",
+ "resetpass-expired": "Ua pau kāu ʻōlelo hūnā. E ʻoluʻolu, e loaʻa kahi ʻōlelo hūnā hou no ka ʻeʻe ʻana.",
"passwordreset": "Kāinoa hou i ka ʻōlelo hūnā",
"passwordreset-legend": "Kāinoa hou i ka ʻōlelo hūnā",
"passwordreset-username": "Inoa mea ho'ohana:",
"passwordreset-email": "Wahinoho lekauila:",
+ "changeemail": "Hoʻololi i ka wahinoho lekauila",
+ "changeemail-header": "Hoʻololi i ka wahinoho lekauila moʻokāki",
"changeemail-oldemail": "Wahinoho lekauila hananei:",
"changeemail-newemail": "Wahinoho lekauila hou:",
"changeemail-none": "(ʻaʻohe)",
"showpreview": "E hō'ike i ka nāmua",
"showdiff": "E hō'ike i nā loli",
"anoneditwarning": "<strong>E akahele:</strong> ʻAʻole ʻoe ʻeʻe nei.\nE hoʻopaʻa ʻia ana kāu IP ma ko kēia ʻaoʻao mōʻaukala hoʻololi.",
+ "missingcommenttext": "E kikokiko i kekahi kaumanaʻo i lalo, ke ʻoluʻolu.",
"summary-preview": "Nāmua hōʻuluʻulu manaʻo:",
"blockedtitle": "Ua pale ‘ia ka mea ho‘ohana",
"blockednoreason": "‘a‘ohe kumu",
+ "whitelistedittext": "E ʻoluʻolu, e $1 no ka hoʻololi ʻaoʻao ʻana.",
"loginreqtitle": "Noi i ka ʻeʻe ʻana",
"loginreqlink": "ʻeʻe",
"accmailtitle": "Ua ho‘ouna ‘ia ka ‘ōlelo hūnā",
"anontalkpagetext": "----\n<em>ʻO kēia ka ʻaoʻao kūkākūkā no kekahi mea ho‘ohana me ka inoa ʻole.</em>\nNo laila, pono mākou e ho‘ohana i ka IP no ka hōʻoia ʻana iā ia a hiki i kekahi mau mea hoʻohana ke hoʻokaʻana i kēia IP.\nInā he mea ho‘ohana inoa ʻole ʻoe a loaʻa kekahi mau manaʻo nāuʻole, e ʻoluʻolu [[Special:UserLogin/signup|e kāinoa]] a i ʻole [[Special:UserLogin|e ʻeʻe]].''",
"noarticletext": "ʻAʻohe kikokikona a kēia ʻaoʻao.\nHiki iā ʻoe ke [[Special:Search/{{PAGENAME}}|huli no kēia inoa ʻaoʻao]] i nā ʻaoʻao ʻē aʻe, <span class=\"plainlinks\">[{{fullurl:SpecialLog|page={{FULLPAGENAMEE}}}} huli i nā moʻolelo pili], a i ʻole [{{fullurl:{{FULLPAGENAME}}|action=edit}} hoʻololi i kēia ʻaoʻao]</span>.",
"noarticletext-nopermission": "ʻAʻohe kikokikona a kēia ʻaoʻao.\nHiki iā ʻoe ke [[Special:Search/{{PAGENAME}}|huli no kēia inoa ʻaoʻao]] i nā ʻaoʻao ʻē aʻe aiʻole <span class=\"plainlinks\">[{{fullurl:SpecialLog|page={{FULLPAGENAMEE}}}} huli i nā moʻolelo pili]</span>, akā hiki ʻole iā ʻoe ke hoʻololi i kēia ʻaoʻao.",
+ "userpage-userdoesnotexist-view": "ʻAʻole kāinoa ʻia ka moʻokāki mea hoʻohana ʻo \"$1\".",
"updated": "(Hoʻopuka hou ʻia)",
"note": "<strong>E noka:</strong>",
"previewnote": "<strong>ʻO kēia ka nāmua wale nō.</strong>\n‘A‘ole mālama ‘ia nā ho‘ololi!",
"protectedpagewarning": "<strong>E akahele: Ua hoʻomalu ‘ia kēia ‘ao‘ao, pēlā, hiki i nā \"kahu\" ke ho‘ololi wale nō.</strong>\nAia nā loli hanalohi i lalo no ka ʻikena:",
"templatesused": "{{PLURAL:$1|anakuhi|mau anakuhi}} e hana ʻia ma kēia ʻaoʻao:",
"templatesusedpreview": "Hoʻohana ʻia kēia {{PLURAL:$1|anakuhi|mau anakuhi}} i kēia nāmua:",
+ "templatesusedsection": "{{PLURAL:$1|Ka anakuhi|Nā anakuhi}} e hana ʻia i kēia mahele:",
"template-protected": "(ho‘omalu ‘ia)",
"template-semiprotected": "(hapa-ho‘omalu ‘ia)",
"hiddencategories": "ʻO kēia ʻaoʻao he lālā o {{PLURAL:$1|1 mahele hūnā|$1 mau māhele hūnā}}:",
"recreate-moveddeleted-warn": "<strong>E akahele: Ke haku nei ʻoe i kekahi ʻaoʻao i holoi ʻia.</strong>\n\nPono ʻoe e noʻonoʻo e pili ana ka pono o ka hoʻomau ʻana o ka hoʻololi ʻana o kēia ʻaoʻao.\nAia ka moʻolelo holoi a hoʻoneʻe no kēia ʻaoʻao ma ʻaneʻi:",
"moveddeleted-notice": "Ua holoi ʻia kēia ʻaoʻao.\nHoʻolako ʻia ka moʻolelo holoi a hoʻoneʻe no kēia ʻaoʻao i lalo no ke kūmole.",
"log-fulllog": "Nānā i ka moʻolelo piha",
+ "postedit-confirmation-created": "Ua haku ʻia ka ʻaoʻao.",
"postedit-confirmation-saved": "Ua mālama ʻia kāu hoʻololi",
"defaultmessagetext": "Kikokikona pūlono pa‘amau",
"content-model-wikitext": "kikokikonawiki",
"content-model-javascript": "IawaSikulipa",
+ "content-model-css": "CSS",
"post-expand-template-inclusion-warning": "<strong>E akahele:</strong> Hoʻokela ʻia ka palena nui o ke anakuhi.\nHoʻohui ʻole i kekahi mau anakuhi.",
"post-expand-template-inclusion-category": "Nā ʻaoʻao me nā anakuhi e hoʻokela i ka palenanui",
"post-expand-template-argument-warning": "<strong>E akahele:</strong> Aia ma kēia ʻaoʻao i kekahi a ʻoi pilikia anakuhi e loaʻa i kekahi nui hoʻonui nunui loa.\nUa waiho ʻia kēia mau pilikia.",
"history-feed-title": "Mōʻaukala kāmua",
"history-feed-description": "Mōʻaukala kāmua no kēia ʻaoʻao ma ka wiki",
"history-feed-item-nocomment": "$1 ma $3 ma ka hola $4",
+ "rev-deleted-comment": "wehe ʻia ka hōʻuluʻulu manaʻo hoʻololi)",
+ "rev-deleted-user": "(wehe ʻia ka inoa mea hoʻohana)",
"rev-delundel": "hoʻololi ka nānā ʻana",
"rev-showdeleted": "hōʻike",
"revisiondelete": "Holoi/holoi ʻole i nā kāmua",
"revdelete-reasonotherlist": "Nā kumu ʻē aʻe",
"revdelete-edit-reasonlist": "Hoʻololi i nā kumu holoi",
"revdelete-offender": "Mea kākau kāmua:",
+ "mergehistory": "Hoʻokuʻi pū i nā mōʻaukala ʻaoʻao",
"mergehistory-from": "ʻAoʻao kūmole:",
"mergehistory-into": "ʻAoʻao helewahi:",
"mergehistory-reason": "Kumu:",
+ "mergelog": "Moʻolelo hoʻokuʻi pū",
"revertmerge": "Hoʻokuʻipū ʻole",
"history-title": "Mōʻaukala kāmua o \"$1\"",
"lineno": "Laina $1:",
"search-external": "Huli kūwaho",
"preferences": "Kaʻu makemake",
"mypreferences": "Ka‘u makemake",
+ "prefs-edits": "Helu o nā hoʻololi:",
+ "prefsnologintext2": "E ʻeʻe no ka hoʻololi ʻana o kāu makemake, ke ʻoluʻolu.",
"prefs-skin": "ʻIli",
"skin-preview": "Nāmua",
"datedefault": "ʻAʻohe makemake",
"prefs-namespaces": "Lewainoa",
"default": "paʻamau",
"prefs-files": "Waihona",
+ "prefs-emailconfirm-label": "Hōʻoia lekauila:",
"youremail": "Lekauila:",
"username": "{{GENDER:$1|Inoa mea hoʻohana}}:",
"prefs-memberingroups": "{{GENDER:$2|He lālā}} o {{PLURAL:$1|hui|mau hui}}:",
"prefs-diffs": "ʻOkoʻa",
"prefs-help-prefershttps": "E hana ana kēia makemake i ka ʻeʻe hou ana.",
"userrights": "Ho‘oponopono ‘ana o nā kuleana",
+ "userrights-user-editname": "E kikokiko i kekahi inoa mea hoʻohana:",
+ "editusergroup": "Hoʻololi i nā hui mea hoʻohana",
+ "userrights-editusergroup": "Hoʻololi i nā hui mea hoʻohana",
+ "saveusergroups": "Mālama i nā hui mea hoʻohana",
"userrights-groupsmember": "He lālā o:",
"userrights-reason": "Kumu:",
"group": "Hui:",
"right-bigdelete": "Holoi i nā ʻaoʻao me he mōʻaukala nui",
"right-browsearchive": "Huli i nā ʻaoʻao holoi",
"right-undelete": "Holoi ʻole i kekahi ʻaoʻao",
+ "right-suppressionlog": "Nānā i nā moʻolelo pilikino",
"right-block": "Pale i nā mea hoʻohana ʻē aʻe mai ka hoʻololi ʻana",
"right-blockemail": "Pale i nā mea hoʻohana ʻē aʻe mai ka lekauila ʻana",
"right-hideuser": "Pale i ka inoa mea hoʻohana, no laila ʻaʻole hōʻike i ka lehulehu",
"action-createpage": "haku ʻaoʻao",
"action-createtalk": "haku ʻaoʻao kūkākūkā",
"action-createaccount": "kāinoa i kēia moʻokāki mea hoʻohana",
+ "action-move": "hoʻoneʻe i kēia ʻaoʻao",
+ "action-move-subpages": "hoʻoneʻe i kēia ʻaoʻao a me nā ʻaoʻao kūloko hoʻi.",
+ "action-movefile": "hoʻoneʻe i kēia waihona",
+ "action-upload": "hoʻouka i kēia waihona",
+ "action-delete": "holoi i kēia ʻaoʻao",
+ "action-sendemail": "lekauila",
"nchanges": "$1 {{PLURAL:$1|loli|mau loli}}",
"enhancedrc-since-last-visit": "$1 {{PLURAL:$1|mai kāu kipana aku nei}}",
"enhancedrc-history": "mōʻaukala",
"filesource": "Kumu:",
"uploadwarning": "Akahele hoʻouka",
"savefile": "Waihona mālama",
- "uploadedimage": "ua hoʻouka iā \"[[$1]]\"",
"upload-source": "Waihona kūmole",
"sourcefilename": "Inoa waihona kūmole:",
"sourceurl": "URL kūmole:",
"mergehistory-go": "Weis déi Versiounen, déi zesummegeluecht kënne ginn",
"mergehistory-submit": "Versioune verschmelzen",
"mergehistory-empty": "Et kënne keng Versioune zesummegeluecht ginn.",
- "mergehistory-success": "{{PLURAL:$3|1 Versioun gouf|$3 Versioune goufe}} vun [[:$1]] op [[:$2]] zesummegeluecht.",
+ "mergehistory-success": "{{PLURAL:$3|1 Versioun gouf|$3 Versioune goufe}} vu(n) [[:$1]] op [[:$2]] zesummegeluecht.",
"mergehistory-fail": "Versiounszesummeleeung war net méiglech, kuckt w.e.g. d'Säiten an d'Zäit-Parameter no.",
"mergehistory-no-source": "Originalsäit \"$1\" gëtt et net.",
"mergehistory-no-destination": "Zilsäit \"$1\" gëtt et net.",
"previewconflict": "ورگشت پیش سیل د نیسسه د راساگه وارو ویرایشت چی شکل دیار بیین بوئه ار شما وه نه سی اماییه کردن انتخاو بکیت.",
"session_fail_preview": "<strong>د بدبختی ما سی یه که رسینه یا جلسه مونه د دس دئیمه نمی تونیم کار پردازشت ویرایشت شمانه انجوم بیئمو.</strong>\nلطفن هنی تلاش بکیت.\nار هنی کار وه دروس کار نکرد،[[Special:UserLogout|اومائن وه در]] نه ازمایشت بکیت و د نو بیایت وامین.",
"session_fail_preview_html": "<strong>د بدبختی ما سی یه که رسینه یا جلسه مونه د دس دئیمه نمی تونیم کار پردازشت ویرایشت شمانه انجوم بیئمو.</strong>\nلطفن هنی تلاش بکیت.\n\n<em>سی یه که {{نوم دیارگه}} یه گل ردیف اچ تی ام ال کنشتگر بیه داره، پیش سیل سی یه که د دس حمله یا جاوا اسکریپ د امون با قام کرده بیه..</em>\n\n<strong>ار وه گات قانونی تلاش سی ویرایشته،لطفا د نو تلاش بکیت.</strong>\nار هنی کار وه دروس کار نکرد،[[Special:UserLogout|اومائن وه در]] نه ازمایشت بکیت و د نو بیایت وامین.",
+ "token_suffix_mismatch": "<strong>ویرایشتیا شما سی یه که دووارته نئر شما نیسسه یا نقطه نیائن نه د رازینه امنیتی ویرایشت د یک تیچسه.</strong>\nویرایشت سی یه که د خراو بیئن نیسسه بلگه نهاگری با رد بیه.\nای رخ ون د گاتیایی پیش میا که شما د یه گل رسینه جا پروکسی استفاده می کیت.",
+ "edit_form_incomplete": "<strong>پاره ای د ویرایشتا وه رسینه جا نمی رسن، هنی وارسی بکیت سی یه که بوینیت ویرایشتیا شما خوئه و هنی تلاش بکیت .</strong>",
"editing": "د حالت ويرايشت$1",
"creating": "راس كردن $1",
"editingsection": "د حال ویرایشت$1(بشخ)",
"explainconflict": "داوسه که شما شرو د ویرایشت ای بلگه کردیته، یه نفر هنی ای بلگه نه آلشت دئه.\nراساگه روئی متن بلگه متن نه چی یه که وجود داشتوه د ور میئره.\nآلشتیا شما د متن هاری نشو دئه هئ.\nشما با آلشتیاتونه د متن که هئش یکی بکید.\nفقط متنی که ها د رو د وختی که شما\"{{رقم:ذخیره گوتار}}\" نه گزارشت می کید اماییه بوئه",
"yourtext": "متن شما",
"storedversion": "دوواره دیئن انبار بیه.",
+ "nonunicodebrowser": "<strong>زئنار:دووارته نئر شما وا نیسسه یا یونیکد سازگاری ناره.</strong>\nیه گل راحل وه کار گرته بیه سی یه که شما بلگه یا نه وا امنیت ویرایشت بکیت:\nنیسه یا غیر-ASCII د پایه رازینه یا 16 تایی دتو نشو دئه بوئه.",
"editingold": "<strong>زئنار:شما داریت یه گل وانئری نا به هنگوم بیه نه سی ای بلگه ویرایشت می کید</strong>\nار شما ونه اماییه بکیت،هر آلشتی که د اول سی ای وانئری انجوم بیه گم بوئه.",
"yourdiff": "فرخيا",
+ "longpageerror": "<strong>خطا:نیسسه شما {{جمی:$1|یه کلوبایت|$1 کلوبایت}} درازی نه دئه، که ونو د بیشرونه انازه{{جمی:$2|یه کلوبایت|$2 کلوبایت}} گپترن.</strong>\nنبوئه وه اماییه با.",
+ "readonlywarning": "<strong>زئنار:رسینه گا سی واداشت قلف بیه، سی یه نه که شما ایسه نمی تونیت ویرایشتیاتونه اماییه بکیت.</strong>\nشات شما بحایت که نیسسه خوتونه د جانیا نیسسه ای وردار بدیس بکیت و ونه سی نهاتر اماییه بکیت.\n\nدیوونداری که ونه قلف کرده چنی گوته:$1",
+ "protectedpagewarning": "<strong>زئنار:ای بلگه سی یه پر و پیم بیه که کاریاریایی که دسرسی دیوونداری دارن فقط بتونن دش ویرایشت بکن.</strong>\nآخرین سیائه سی سرچشمه یا د هار اماییه کاری بیه:",
"templatesused": "{{جمی:$1|چوئه|چوئه یا}}د ای بلگه استفاده بیه:",
"templatesusedpreview": "{{جمی:$1|چوئه|چوئه یا}}استفاده بیه د ای پیش سیل:",
"templatesusedsection": "{{جمی:$1|چوئه|چوئه یا}} استفاده بیه د ای بخش:",
"Xiaomingyan",
"Yanteng3",
"아라",
- "LNDDYL"
+ "LNDDYL",
+ "Jason924tw"
]
},
"tog-underline": "鏈墊線:",
"shown-title": "每頁示 $1",
"viewprevnext": "見($1 {{int:pipe-separator}} $2)($3)",
"searchmenu-exists": "'''在此wiki中有頁為\"[[:$1]]\"。'''",
- "searchmenu-new": "'''在此wiki上建頁\"[[:$1]]\"!'''",
+ "searchmenu-new": "'''在此共筆上建頁\"[[:$1]]\"!'''",
"searchprofile-articles": "容",
"searchprofile-images": "媒",
"searchprofile-everything": "全",
"unusedtemplates": "墨乾",
"unusedtemplatestext": "此表閒模,篤刪前惠考支鏈。",
"unusedtemplateswlh": "支鏈",
- "randompage": "風掀",
+ "randompage": "清風翻書",
"randompage-nopages": "下列{{PLURAL:$2|名集}}中無頁也:$1",
"randomincategory-selectcategory-submit": "往",
"randomredirect": "任渡",
"mostcategories": "跨船",
"mostimages": "名檔",
"mostrevisions": "屢審",
- "prefixindex": "以é\8f\88å¤\96æ\9f¥",
+ "prefixindex": "ä¾\9då\90\8dç´¢å¼\95",
"shortpages": "短篇",
"longpages": "長言",
"deadendpages": "此無路也",
"revdelete-modify-missing": "Ralat menyunting item ID $1: ia tiada dalam pangkalan data!",
"revdelete-no-change": "'''Amaran:''' item bertarikh $2, $1 telah mempunyai aturan penglihatan yang diminta.",
"revdelete-concurrent-change": "Ralat ketika mengubahsuai item bertarikh $2, $1: kelihatan statusnya telah diubah oleh orang lain ketika anda cuba untuk mengubahsuainya.\nMohon semak log.",
- "revdelete-only-restricted": "Ralat menyembunyikan item bertarikh $2, $1: anda tidak boleh menyekat item-item dari pandangan pentadbir-pentadbir tanpa memilih juga salah satu pilihan pandangan lain.",
+ "revdelete-only-restricted": "Ralat menyembunyikan item bertarikh $2, $1: Anda tidak boleh menyekat item-item dari pandangan penyelia-penyelia tanpa memilih juga salah satu pilihan pandangan yang lain.",
"revdelete-reason-dropdown": "*Sebab penghapusan yang biasa\n** Pencabulan hak cipta\n** Ulasan atau maklumat peribadi tidak sesuai\n** Nama pengguna tidak sesuai\n** Maklumat berkemungkinan fitnah",
"revdelete-otherreason": "Sebab lain/tambahan:",
"revdelete-reasonotherlist": "Sebab lain",
"group-user-member": "{{GENDER:$1|pengguna}}",
"group-autoconfirmed-member": "{{GENDER:$1|pengguna sah automatik}}",
"group-bot-member": "{{GENDER:$1|bot}}",
- "group-sysop-member": "{{GENDER:$1|pentadbir}}",
+ "group-sysop-member": "{{GENDER:$1|penyelia}}",
"group-bureaucrat-member": "{{GENDER:$1|birokrat}}",
"group-suppress-member": "{{GENDER:$1|penyemak}}",
"grouppage-user": "{{ns:project}}:Pengguna",
"activeusers-count": "$1 tindakan sejak {{PLURAL:$3|semalam|$3 hari lalu}}",
"activeusers-from": "Tunjukkan pengguna bermula pada:",
"activeusers-hidebots": "Sorokkan bot",
- "activeusers-hidesysops": "Sorokkan pentadbir",
+ "activeusers-hidesysops": "Sorokkan penyelia",
"activeusers-noresult": "Tiada pengguna dijumpai.",
"listgrouprights": "Hak kumpulan pengguna",
"listgrouprights-summary": "Berikut adalah senarai kumpulan pengguna yang ditubuhkan di wiki ini, dengan hak-hak mereka masing-masing.\nMungkin terdapat [[{{MediaWiki:Listgrouprights-helppage}}|maklumat tambahan]] mengenai setiap hak.",
"protect-default": "Benarkan semua pengguna",
"protect-fallback": "Benarkan pengguna yang berizin \"$1\" sahaja",
"protect-level-autoconfirmed": "Benarkan pengguna yang diautosahkan sahaja",
- "protect-level-sysop": "Benarkan pentadbir sahaja",
+ "protect-level-sysop": "Benarkan penyelia sahaja",
"protect-summary-cascade": "melata",
"protect-expiring": "sehingga $1 (UTC)",
"protect-expiring-local": "luput $1",
"blocklist-timestamp": "Cop masa",
"blocklist-target": "Sasaran",
"blocklist-expiry": "Luput",
- "blocklist-by": "Pentadbir sekatan",
+ "blocklist-by": "Penyelia sekatan",
"blocklist-params": "Parameter sekatan",
"blocklist-reason": "Sebab",
"ipblocklist-submit": "Cari",
"may_long": "مه",
"june": "ژوئن",
"july": "ژوئیه",
- "august": "ئÙ\80Ù\88Ú¯Ù\80Ù\87â\80\8cسÙ\80ت",
+ "august": "Ø¢Ú¯Ù\88ست",
"september": "سـهپـتـهمـبـر",
"october": "اکتبر",
"november": "نـووهمـبـر",
"may-gen": "مه",
"june-gen": "جـون",
"july-gen": "ژوئیه",
- "august-gen": "ئÙ\88Ú¯Ù\80Ù\87â\80\8cسÙ\80ت",
+ "august-gen": "Ø¢Ú¯Ù\88ست",
"september-gen": "سـهپـتـهمـبـر",
"october-gen": "اکتبر",
"november-gen": "نـووهمـبـر",
"uploadbtn": "باربییشتن فایل",
"uploadtext": "فرم زیر جه باربییشتن نو پروندهئون وسّه استفاده هاکنین.\nبدیین پروندهئونی که قبلاً باربییشته بَینه به [[Special:FileList|فهرست پروندهها]] بورین. باربییشتن مجدد [[Special:Log/upload|سیاههٔ بارگذاریها]] و حذف پروندهئون [[Special:Log/delete|deletion log]] دله ثبت وانه.\n\nبعد از این که پروندهیی ره باربییشتنی، به این سه شکل بنشنه وه ره صفحهئون دله بییشتن:\n\n*'''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:File.jpg]]</nowiki></code>''' استفاده از نسخه کامل پرونده وسّه\n*'''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:File.png|200px|thumb|left|alt text]]</nowiki></code>''' استفاده از اتا نسخه ۲۰۰ پیکسلی از پرونده که اتا جعبه سمت چپ متن دله دره و عبارت alt text ونه دله به عنوان توضیح استفاده بیّه وسّه\n*'''<code><nowiki>[[</nowiki>{{ns:media}}<nowiki>:File.ogg]]</nowiki></code>''' بساتن اتا پیوند مستقیم به پرونده بدون نمایش پرونده",
"uploadlogpage": "باربییشتن گزارش",
- "uploadedimage": "\"[[$1]]\" ره باربییشته",
"imgfile": "فایل",
"listfiles": "هارشی ئون ره لیست",
"listfiles_name": "نـوم",
"category-empty": "<div style=\"margin:2em 1em 0 1em; padding:0.5em; border:1px solid #AAA; text-align:center;\">''Ова категорија тренутно не садржи странице или датотеке.''</div>",
"hidden-categories": "{{PLURAL:$1|Сакривена категорија|Сакривене категорије}}",
"hidden-category-category": "Сакривене категорије",
- "category-subcat-count": "{{PLURAL:$2|1=Ова категорија садржи само следећу поткатегорију.|Ова категорија има {{PLURAL:$1|следећу поткатегорију|следеће $1 поткатегорије|следећих $1 поткатегорија}}, од укупно $2.}}",
+ "category-subcat-count": "{{PLURAL:$2|1=Ова категорија садржи само следећу поткатегорију.|Ова категорија има {{PLURAL:$1|1=следећу поткатегорију|следеће $1 поткатегорије|следећих $1 поткатегорија}}, од укупно $2.}}",
"category-subcat-count-limited": "Ова категорија садржи {{PLURAL:$1|следећу поткатегорију|следеће $1 поткатегорије|следећих $1 поткатегорија}}.",
"category-article-count": "{{PLURAL:$2|1=Ова категорија садржи само следећу страницу.|{{PLURAL:$1|Следећа страница је|Следеће $1 странице су|Следећих $1 страница је}} у овој категорији, од укупно $2.}}",
"category-article-count-limited": "{{PLURAL:$1|1=Следећа страница је|Следеће $1 странице су|Следећих $1 страница је}} у овој категорији.",
- "category-file-count": "{{PLURAL:$2|1=Ова категорија садржи само следећу датотеку.|{{PLURAL:$1|Следећа датотека је|Следеће $1 датотеке су|Следећих $1 датотека је}} у овој категорији, од укупно $2.}}",
+ "category-file-count": "{{PLURAL:$2|1=Ова категорија садржи само следећу датотеку.|{{PLURAL:$1|1=Следећа датотека је|Следеће $1 датотеке су|Следећих $1 датотека је}} у овој категорији, од укупно $2.}}",
"category-file-count-limited": "{{PLURAL:$1|1=Следећа датотека је|Следеће $1 датотеке су|Следећих $1 датотека је}} у овој категорији.",
"listingcontinuesabbrev": "наст.",
"index-category": "Пописане странице",
"category-empty": "<div style=\"margin:2em 1em 0 1em; padding:0.5em; border:1px solid #AAA; text-align:center;\">''Ova kategorija trenutno ne sadrži stranice ili datoteke.''</div>",
"hidden-categories": "{{PLURAL:$1|Sakrivena kategorija|Sakrivene kategorije}}",
"hidden-category-category": "Sakrivene kategorije",
- "category-subcat-count": "{{PLURAL:$2|1=Ova kategorija sadrži samo sledeću potkategoriju.|Ova kategorija ima {{PLURAL:$1|sledeću potkategoriju|sledeće $1 potkategorije|sledećih $1 potkategorija}}, od ukupno $2.}}",
+ "category-subcat-count": "{{PLURAL:$2|1=Ova kategorija sadrži samo sledeću potkategoriju.|Ova kategorija ima {{PLURAL:$1|1=sledeću potkategoriju|sledeće $1 potkategorije|sledećih $1 potkategorija}}, od ukupno $2.}}",
"category-subcat-count-limited": "Ova kategorija sadrži {{PLURAL:$1|sledeću potkategoriju|sledeće $1 potkategorije|sledećih $1 potkategorija}}.",
"category-article-count": "{{PLURAL:$2|1=Ova kategorija sadrži samo sledeću stranicu.|{{PLURAL:$1|Sledeća stranica je|Sledeće $1 stranice su|Sledećih $1 stranica je}} u ovoj kategoriji, od ukupno $2.}}",
"category-article-count-limited": "{{PLURAL:$1|1=Sledeća stranica je|Sledeće $1 stranice su|Sledećih $1 stranica je}} u ovoj kategoriji.",
- "category-file-count": "{{PLURAL:$2|1=Ova kategorija sadrži samo sledeću datoteku.|{{PLURAL:$1|Sledeća datoteka je|Sledeće $1 datoteke su|Sledećih $1 datoteka je}} u ovoj kategoriji, od ukupno $2.}}",
+ "category-file-count": "{{PLURAL:$2|1=Ova kategorija sadrži samo sledeću datoteku.|{{PLURAL:$1|1=Sledeća datoteka je|Sledeće $1 datoteke su|Sledećih $1 datoteka je}} u ovoj kategoriji, od ukupno $2.}}",
"category-file-count-limited": "{{PLURAL:$1|1=Sledeća datoteka je|Sledeće $1 datoteke su|Sledećih $1 datoteka je}} u ovoj kategoriji.",
"listingcontinuesabbrev": "nast.",
"index-category": "Popisane stranice",
"userjspreview": "'''Kom ihåg att du bara testar/förhandsgranskar ditt JavaScript.'''\n'''Det har inte sparats än!'''",
"sitecsspreview": "'''Kom ihåg att du bara förhandsgranskar detta CSS.''' \n'''Det har ännu inte sparats!'''",
"sitejspreview": "'''Kom ihåg att du bara förhandsgranskar denna JavaScript-kod.'''\n'''Det har ännu inte sparats!'''",
- "userinvalidcssjstitle": "'''Varning:''' Skalet \"$1\" finns inte. Kom ihåg att .css- och .js-sidor för enskilda användare börjar på liten bokstav. Exempel: {{ns:user}}:Foo/vector.css i stället för {{ns:user}}:Foo/Vector.css.",
+ "userinvalidcssjstitle": "'''Varning:''' Utseendet \"$1\" finns inte. Kom ihåg att .css- och .js-sidor för enskilda användare börjar på liten bokstav. Exempel: {{ns:user}}:Foo/vector.css i stället för {{ns:user}}:Foo/Vector.css.",
"updated": "(Uppdaterad)",
"note": "'''Obs!'''",
"previewnote": "'''Kom ihåg att detta bara är en förhandsvisning.'''\nDina ändringar har ännu inte sparats!",
"prefs-files": "Filer",
"prefs-custom-css": "personlig CSS",
"prefs-custom-js": "personlig JavaScript",
- "prefs-common-css-js": "Delad CSS/JS för alla teman:",
+ "prefs-common-css-js": "Delad CSS/JS för alla utseenden:",
"prefs-reset-intro": "Du kan använda den här sidan till att återställa dina inställningar till webbplatsens standardinställningar.\nDetta kan inte återställas.",
"prefs-emailconfirm-label": "E-postbekräftelse:",
"youremail": "E-post:",
"tooltip-preferences-save": "Spara inställningar",
"tooltip-summary": "Skriv en kort sammanfattning",
"interlanguage-link-title": "$1 - $2",
- "common.css": "/* CSS som skrivs här påverkar alla skal */",
+ "common.css": "/* CSS som skrivs här påverkar alla utseenden */",
"print.css": "/* CSS som skrivs här kommer att påverka utskriftsversionen */",
"noscript.css": "/* CSS som placeras här kommer att påverka användare med JavaScript inaktiverat */",
"group-autoconfirmed.css": "/* CSS som placeras här kommer bara att påverka bekräftade användare */",
"hidetoc": "באַהאַלטן",
"collapsible-collapse": "אײַנציען",
"collapsible-expand": "פֿאַרברייטערן",
+ "confirmable-confirm": "צי זענט {{GENDER:$1|איר}} זיכער?",
+ "confirmable-yes": "יא",
+ "confirmable-no": "ניין",
"thisisdeleted": "זען אדער צוריקשטעלן $1?",
"viewdeleted": "זען $1?",
"restorelink": "{{PLURAL:$1|איין געמעקטע ענדערונג|$1 געמעקטע ענדערונגען}}",
"invalidtitle-knownnamespace": "אומגילטירער טיטל מיט נאמענטייל \"$2\" און טעקסט \"$3\"",
"invalidtitle-unknownnamespace": "אומגילטיקער טיטל מיט אומבאוואוסטן נאמענטייל נומער $1 און טעקסט \"$2\"",
"exception-nologin": "נישט אַרײַנלאגירט",
- "exception-nologin-text": "×\90×\99ר ש×\90פר×\98 ×\96×\99×\99×\9f [[Special:Userlogin|×\90ר×\99×\99× ×\9c×\90×\92×\99ר×\98]] to כדי צו קענען צוקומען צו דעם בלאט אדער דער אקציע.",
+ "exception-nologin-text": "×\96ײַ×\98 ×\90×\96×\95×\99 ×\92×\95×\98 ×\90×¨×²Ö·× ×\9c×\90×\92×\99ר×\9f כדי צו קענען צוקומען צו דעם בלאט אדער דער אקציע.",
"exception-nologin-text-manual": "זייט אזוי גוט $1 כדי צו קענען צוקומען צו דעם בלאט אדער דער אקציע.",
"virus-badscanner": "שלעכטע קאנפֿיגוראציע: אומבאוואוסטער ווירוס איבערקוקער: ''$1''",
"virus-scanfailed": "איבערקוקן נישט געראטן (קאד: $1)",
"parser-template-recursion-depth-warning": "מוסטער רעקורסיע טיף מאקסימום איבערגעשטיגן ($1)",
"language-converter-depth-warning": "אַריבער דעם שפּראַך קאַנווערטער טיף לימיט ($1)",
"node-count-exceeded-category": "בלעטער וואו קנופצאל איז צו פיל",
- "node-count-exceeded-category-desc": "×\90 ק×\90×\98×¢×\92×\90ר×\99×¢ פ×\90ר ×\91×\9c×¢×\98ער ×\95×\95×\90×\95 ×\93×\99 ×§× ×\95פצ×\90×\9c ×\90×\99×\96 צ×\95 פ×\99ל.",
- "node-count-exceeded-warning": "×§× ×\95×¤× ×¦×\90×\9c ×\90×\95×\99פ×\9f ×\91×\9c×\90×\98 צ×\95 ×\94×\95×\99×\9a",
+ "node-count-exceeded-category-desc": "×\93×\99ר ×\91×\9c×\90×\98 ש×\98×\99×\99×\92×\98 ×\90×\99×\91ער ×\93×\99 ×\9e×\90קס×\99×\9e×\95×\9d ×§× ×\95פצ×\90ל.",
+ "node-count-exceeded-warning": "×\93ער ×\91×\9c×\90×\98 ×\90×\99×\96 ×\90×\99×\91ער×\92עש×\98×\99×\92×\9f ×\93×¢×\9d ×§× ×\95×¤× ×¦×\90×\9c",
"expansion-depth-exceeded-category": "בלעטער וואו מ'האט אריבערגעשטיגן די פארברייטערונג טיף",
- "expansion-depth-exceeded-category-desc": "×\93×\90ס ×\90×\99×\96 ×\90 ק×\90×\98×¢×\92×\90ר×\99×¢ פ×\90ר ×\91×\9c×¢×\98ער ×\95×\95×\90ס ש×\98×\99×\92×\9f ×\90×\99×\91ער ×\93ער פארברייטערן־טיף.",
+ "expansion-depth-exceeded-category-desc": "×\93ער ×\91×\9c×\90×\98 ש×\98×\99×\99×\92×\98 ×\90×\99×\91ער ×\93×\99 פארברייטערן־טיף.",
"expansion-depth-exceeded-warning": "בלאט גייט אריבער דער פארברייטערונג טיף",
"parser-unstrip-loop-warning": "פעטליע געטראפֿן",
"converter-manual-rule-error": "געטראפן א גרײַז אין האנטלעכן שפראך־קאנווערטירן כלל",
"preferences": "פרעפֿערענצן",
"mypreferences": "פּרעפֿערענצן",
"prefs-edits": "צאָל ענדערונגען:",
- "prefsnologintext2": "זייט אזוי גוט $1 כדי צו שטעלן באניצער פרעפערענצן.",
+ "prefsnologintext2": "זייט אזוי גוט ארײַנלאגירן כדי צו ענדערן אײַערי באניצער פרעפערענצן.",
"prefs-skin": "סקין",
"skin-preview": "פארויסדיגע ווייזונג",
"datedefault": "נישטא קיין פרעפערענץ",
"upload-options": "אַרויפֿלאָדן ברירה'ס",
"watchthisupload": "אויפֿפאַסן דעם בלאט",
"filewasdeleted": "א טעקע מיט דעם נאמען האט מען שוין ארויפגעלאדן און דערנאך אויסגעמעקט.\nאיר זאלט בודק זיין דעם $1 איידער איר הייבט אן ארויפלאדן ווידעראמאל.",
+ "filename-bad-prefix": "דער נאמען פון דער טעקע וואס איר לאדט ארויף הייבט אן מיט <strong>\"$1\"</strong>, וואס איז אן אלגעמיינער נאמען געשטעלט פון א דיגיטאלישער קאמערע.\nזײַט אזוי גוט קלויבט א נאמען פאר דער טעקע ואס באשרײַבט איר אינהאלט.",
"upload-success-subj": "דערפֿאלגרייכער ארויפֿלאָד",
"upload-success-msg": "אײַער אַרויפֿלאָד פֿון [$2] איז געווען דערפֿאלגרייך. עס איז פֿאַראָן דאָ: [[:{{ns:file}}:$1]]",
"upload-failure-subj": "אַרויפֿלאָדן פראבלעם",
"mywatchlist": "אויפפַּאסונג ליסטע",
"watchlistfor2": "פֿאַר $1 $2",
"nowatchlist": "איר האט נישט קיין שום בלעטער אין אייער אויפפַּאסונג ליסטע.",
- "watchlistanontext": "ביטע $1 כדי צו זען אדער ענדערן בלעטער אין אייער אַכטגעבן ליסטע.",
+ "watchlistanontext": "ביטע לאגירט ארײַן כדי צו זען אדער ענדערן בלעטער אין אייער אַכטגעבן ליסטע.",
"watchnologin": "איר זענט נישט אַרײַנלאגירט",
"addwatch": "צולייגן צו דער אויפֿפאַסונג ליסטע",
"addedwatchtext": "דער בלאט \"[[:$1]]\" איז צוגעלײגט געוואָרן צו אײַער [[Special:Watchlist|אויפֿפאַסונג ליסטע]].\n\nווײַטערע ענדערונגען צו דעם בלאַט און צו זײַן פארבינדענעם רעדן בלאַט וועלן זײַן אויסגערעכנט דארט.",
"autoblockid": "אויטאמאטיש בלאק #$1",
"block": "בלאקירן באַניצער",
"unblock": "אויפֿבלאקירן באניצער",
- "blockip": "בלאקירן באַניצער",
+ "blockip": "בלאקירן {{GENDER:$1|באַניצער}}",
"blockip-legend": "בלאקירן באַניצער",
"blockiptext": "באניצט די פארעם דא אונטן כדי צו בלאקירן שרײַבן רעכטן פֿון איינגעשריבענע באניצער אדער סתם ספעציפישע איי פי אדרעסן.\n\nאזאלכע בלאקירונגען מוזן דורכגעפירט ווערן בלויז צו פֿאַרמײַדן וואַנדאַליזם, און לויט די [[{{MediaWiki:Policy-url}}|פארשריפטן און פאליסיס]].\n\nביטע שרײַבט ארויס קלאָר די ספעציפֿישע סיבה (למשל, ציטירן וועלכע בלעטער מ'האט וואַנדאַליזירט).",
"ipaddressorusername": "IP אדרעס אדער באַניצער נאמען:",
"ipb-unblock-addr": "אויפֿבלאקירן $1",
"ipb-unblock": "אויפֿבלאקירן א באַניצער נאמען אדער IP אדרעס",
"ipb-blocklist": "זעט עקזיסטירנדע בלאקירונגען",
- "ipb-blocklist-contribs": "בײַשטײַערונגען פֿון $1",
+ "ipb-blocklist-contribs": "בײַשטײַערונגען פֿון {{GENDER:$1|$1}}",
"unblockip": "אויפֿבלאקירן באניצער",
"unblockiptext": "מיט דעם פארמולאר קענט איר צוריקשטעלן שרייבן ערלויבניש צו אן IP אדרעס אדער באניצער נאמען וואס איז געווען בלאקירט.",
"ipusubmit": "אוועקנעמען דעם בלאק",
$ns = 0;
}
+ # Namespace which no longer exists. Put the page in the main namespace
+ # since we don't have any idea of the old namespace name. See bug 68501.
+ if ( !MWNamespace::exists( $ns ) ) {
+ $ns = 0;
+ }
+
$clean = 'Broken/' . $prior;
$verified = Title::makeTitleSafe( $ns, $clean );
if ( $verified->exists() ) {
/**
* @todo Do this for real
- * @param int $ns
- * @param string $name
+ * @param int $key
+ * @param string $prefix
* @param bool $fix
* @param string $suffix
* @return bool
public function __construct() {
parent::__construct();
$this->mDescription = "Populate the *_from_namespace fields";
+ $this->addOption( 'lastUpdatedId', "Highest page_id with updated links", false, true );
}
protected function getUpdateKey() {
$this->output( "Updating *_from_namespace fields in links tables.\n" );
- $start = $db->selectField( 'page', 'MIN(page_id)', false, __METHOD__ );
+ $start = $this->getOption( 'lastUpdatedId' );
+ if ( !$start ) {
+ $start = $db->selectField( 'page', 'MIN(page_id)', false, __METHOD__ );
+ }
if ( !$start ) {
$this->output( "Nothing to do." );
return false;
/**
* @class mw.plugin.notify
*/
-( function ( mw, $ ) {
+( function ( mw ) {
'use strict';
/**
* @return {jQuery.Promise}
*/
mw.notify = function ( message, options ) {
- var d = $.Deferred();
// Don't bother loading the whole notification system if we never use it.
- mw.loader.using( 'mediawiki.notification', function () {
- // Call notify with the notification the user requested of us.
- d.resolve( mw.notification.notify( message, options ) );
- }, d.reject );
- return d.promise();
+ return mw.loader.using( 'mediawiki.notification' )
+ .then( function () {
+ // Call notify with the notification the user requested of us.
+ return mw.notification.notify( message, options );
+ } );
};
/**
* @mixins mw.plugin.notify
*/
-}( mediaWiki, jQuery ) );
+}( mediaWiki ) );
--- /dev/null
+Skins, such as the default skin Vector, are distributed separately. Drop them
+into this directory and enable as per the skin's installation instructions.
+
+You can find a list of available skins at
+<https://www.mediawiki.org/wiki/Category:All_skins>,
+and more information about installing and configuring skins at
+<https://www.mediawiki.org/wiki/Manual:Skin_configuration>.
+
+If you are a developer, you might want to fetch the skin tree in another
+directory and make a symbolic link:
+
+ mediawiki/skins$ ln -s ../../skins-trunk/FooBar
+
+Most skins are available through Git:
+ https://gerrit.wikimedia.org/r/#/admin/projects/?filter=mediawiki%252Fskins%252F
+ https://git.wikimedia.org/project/mediawiki
+
+
+Please note that under POSIX systems (Linux...), parent of a symbolic path
+refers to the link source, NOT to the target! You should check the env
+variable MW_INSTALL_PATH in case the extension is not in the default location.
+
+The following code snippet lets you override the default path:
+
+ $IP = getenv( 'MW_INSTALL_PATH' );
+ if( $IP === false ) {
+ $IP = __DIR__ . '/../..';
+ }
+ require_once "$IP/maintenance/Maintenance.php"; // a MediaWiki core file
'TestRecorder' => "$testDir/testHelpers.inc",
'ITestRecorder' => "$testDir/testHelpers.inc",
'DjVuSupport' => "$testDir/testHelpers.inc",
+ 'TidySupport' => "$testDir/testHelpers.inc",
# tests/phpunit
'MediaWikiTestCase' => "$testDir/phpunit/MediaWikiTestCase.php",
*/
private $djVuSupport;
+ /**
+ * @var TidySupport
+ */
+ private $tidySupport;
+
private $maxFuzzTestLength = 300;
private $fuzzSeed = 0;
private $memoryLimit = 50;
$this->runParsoid = isset( $options['run-parsoid'] );
$this->djVuSupport = new DjVuSupport();
+ $this->tidySupport = new TidySupport();
+ if ( !$this->tidySupport->isEnabled() ) {
+ echo "Warning: tidy is not installed, skipping some tests\n";
+ }
$this->hooks = array();
$this->functionHooks = array();
$output = $parser->parse( $input, $title, $options, true, true, 1337 );
$output->setTOCEnabled( !isset( $opts['notoc'] ) );
$out = $output->getText();
+ if ( isset( $opts['tidy'] ) ) {
+ if ( !$this->tidySupport->isEnabled() ) {
+ return $this->showSkipped();
+ }
+ $out = MWTidy::tidy( $out );
+ $out = preg_replace( '/\s+$/', '', $out);
+ }
if ( isset( $opts['showtitle'] ) ) {
if ( $output->getTitleText() ) {
}
if ( isset( $opts['ill'] ) ) {
- $out = $this->tidy( implode( ' ', $output->getLanguageLinks() ) );
+ $out = implode( ' ', $output->getLanguageLinks() );
} elseif ( isset( $opts['cat'] ) ) {
$outputPage = $context->getOutput();
$outputPage->addCategoryLinks( $output->getCategories() );
$cats = $outputPage->getCategoryLinks();
if ( isset( $cats['normal'] ) ) {
- $out = $this->tidy( implode( ' ', $cats['normal'] ) );
+ $out = implode( ' ', $cats['normal'] );
} else {
$out = '';
}
}
-
- $result = $this->tidy( $result );
}
$this->teardownGlobals();
* @param string $config
*/
private function setupGlobals( $opts = '', $config = '' ) {
+ global $IP;
+
# Find out values for some special options.
$lang =
self::getOptionValue( 'language', $opts, 'en' );
) )
),
'wgEnableUploads' => self::getOptionValue( 'wgEnableUploads', $opts, true ),
+ 'wgUploadNavigationUrl' => false,
'wgStylePath' => '/skins',
'wgSitename' => 'MediaWiki',
'wgLanguageCode' => $lang,
'wgLocaltimezone' => 'UTC',
'wgAllowExternalImages' => self::getOptionValue( 'wgAllowExternalImages', $opts, true ),
'wgThumbLimits' => array( self::getOptionValue( 'thumbsize', $opts, 180 ) ),
- 'wgUseTidy' => false,
'wgDefaultLanguageVariant' => $variant,
'wgVariantArticlePath' => false,
'wgGroupPermissions' => array( '*' => array(
'wgLinkHolderBatchSize' => $linkHolderBatchSize,
'wgExperimentalHtmlIds' => false,
'wgExternalLinkTarget' => false,
- 'wgAlwaysUseTidy' => false,
'wgHtml5' => true,
'wgWellFormedXml' => true,
'wgAllowMicrodataAttributes' => true,
'wgAdaptiveMessageCache' => true,
'wgDisableLangConversion' => false,
'wgDisableTitleConversion' => false,
+ // Tidy options.
+ // We always set 'wgUseTidy' to false when parsing, but certain
+ // test-running modes still use tidy if available, so ensure
+ // that the tidy-related options are all set to their defaults.
+ 'wgUseTidy' => false,
+ 'wgAlwaysUseTidy' => false,
+ 'wgDebugTidy' => false,
+ 'wgTidyConf' => $IP . '/includes/tidy.conf',
+ 'wgTidyOpts' => '',
+ 'wgTidyInternal' => $this->tidySupport->isInternal(),
);
if ( $config ) {
return true;
}
- /**
- * Run the "tidy" command on text if the $wgUseTidy
- * global is true
- *
- * @param string $text The text to tidy
- * @return string
- */
- private function tidy( $text ) {
- global $wgUseTidy;
-
- if ( $wgUseTidy ) {
- $text = MWTidy::tidy( $text );
- }
-
- return $text;
- }
-
private function wellFormed( $text ) {
$html =
Sanitizer::hackDocType() .
blah blah
!! endarticle
+!!article
+Foo
+!!text
+FOO
+!!endarticle
+
!!article
Template:Foo
!!text
</p>
!! end
+# Note that the html+tidy output removes the spaces after the <li>,
+# which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
+# This is an issue for all tests with lists. We intentionally do
+# *not* add html+tidy clauses for these, as we don't want to
+# document/test the broken behavior. (Parsoid matches the non-tidy
+# output in these cases.)
+
!! test
Simple list
!! wikitext
parsoid=wt2wt,html2wt
!! wikitext
'''''foo'''''
-!! html/*
+!! html
<p><b><i>foo</i></b>
</p>
!! end
!''a!!''b
|''a||''b
|}
-!! html
+!! html/php+tidy
+<table>
+<tr>
+<th><i>a</i></th>
+<th><i>b</i></th>
+<td><i>a</i></td>
+<td><i>b</i></td>
+</tr>
+</table>
+!! html/parsoid
<table>
<tbody><tr><th><i>a</i></th><th><i>b</i></th>
<td><i>a</i></td><td><i>b</i></td></tr>
</p>
!! end
+# There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
!! test
Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
!! wikitext
a <div>foo</div>
<p>b
</p>
+!! html+tidy
+<p>a</p>
+<div>foo</div>
+<p>b</p>
!! end
!! test
a <blockquote>foo</blockquote>
<p>b
</p>
+!! html+tidy
+<p>a</p>
+<blockquote>
+<p>foo</p>
+</blockquote>
+<p>b</p>
!! end
!! test
a <div>foo</div>
b <div>foo</div>
+!! html+tidy
+<p>a</p>
+<div>foo</div>
+<p>b</p>
+<div>foo</div>
!! end
!! test
a <blockquote>foo</blockquote>
b <blockquote>foo</blockquote>
+!! html+tidy
+<p>a</p>
+<blockquote>
+<p>foo</p>
+</blockquote>
+<p>b</p>
+<blockquote>
+<p>foo</p>
+</blockquote>
!! end
!! test
</p>
x <div>foo</div> z
+!! html+tidy
+<div>foo</div>
+<p>a</p>
+<p>b c d e</p>
+<p>x</p>
+<div>foo</div>
+<p>z</p>
!! end
!! test
</p>
<div>e</div>
+!! html+tidy
+<p><br /></p>
+<p>a</p>
+<p>b</p>
+<div>a</div>
+<p>b</p>
+<div>b</div>
+<p>d</p>
+<p><br /></p>
+<div>e</div>
!! end
## PHP parser emits output which is broken
+## XXX The parsoid output doesn't match the tidy output.
!! test
Unclosed HTML p-tags should be handled properly
!! wikitext
a
b
+!! html/php+tidy
+<div>
+<p>foo</div></p>
+<p>a</p>
+b</div>
!! html/parsoid
<div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
<p>a</p>
<blockquote>Foo <del>bar</del> <ins>baz</ins> quux
</blockquote>
+!! html+tidy
+<blockquote>
+<p>Foo</p>
+<del>bar</del> <ins>baz</ins> quux</blockquote>
!! end
!! test
</pre></div>
<pre></pre>
+!! html+tidy
+<p>a</p>
+<div>
+<pre>
+foo
+</pre></div>
!! end
!! test
a
| b
| c
-!! html/parsoid
+!! html/php
<pre>a
| b
-| c</pre>
+| c
+</pre>
!!end
!!test
a
| b
| c
+!! html/php
+<p>a
+</p>
+<pre>| b
+| c
+</pre>
!! html/parsoid
<p>a</p>
<pre>
c <blockquote> foo </blockquote>
<pre><span> foo </span>
</pre>
-!!end
+!! html+tidy
+<p>a</p>
+<p>foo</p>
+<p>b</p>
+<div>foo</div>
+<p>c</p>
+<blockquote>
+<p>foo</p>
+</blockquote>
+<pre>
+<span> foo </span>
+</pre>
+!! end
!!test
3b. Indent-Pre and block tags (multi-line html)
</pre>
b <div> foo </div>
+!! html+tidy
+<pre>
+a <span>foo</span>
+</pre>
+<p>b</p>
+<div>foo</div>
!!end
!!test
</div></li>
</ul>
+!! html+tidy
+<p>a</p>
+<ul class="gallery mw-gallery-traditional">
+<li class="gallerybox" style="width: 155px">
+<div style="width: 155px">
+<div class="thumb" style="width: 150px;">
+<div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div>
+</div>
+<div class="gallerytext"></div>
+</div>
+</li>
+</ul>
!!end
!! test
## The Parsoid team believes the following three test exposes a
## bug in the PHP parser. (Parsoid team thinks the PHP parser is
## wrong to close the <dl> after the <dt> containing the <ul>.)
+## It also exposes a "misfeature" in tidy, which doesn't like
+## <dl> tags with a single <dt> child; it converts the <dt> into
+## a <dd> in that case. (Parsoid leaves the <dt> alone!)
!! test
Definition Lists: Mixed Lists: Test 1
!! wikitext
<li> bar</li></ul></dt></dl>
<dl><dt> baz</dt></dl></dd></dl>
+!! html/php+tidy
+<dl>
+<dd>
+<dl>
+<dd>
+<ul>
+<li>foo</li>
+<li>bar</li>
+</ul>
+</dd>
+</dl>
+<dl>
+<dt>baz</dt>
+</dl>
+</dd>
+</dl>
!! html/parsoid
<dl>
<dd><dl>
# rules regarding dd/dt on the next two tests. Parsoid is more
# consistent, and recognizes the shared nesting and keeps the
# still-open tags around until the nesting is complete.
+# (And tidy again converts <dt> to <dd> before 'bar'.)
!! test
Definition Lists: Mixed Lists: Test 11
<dl><dt>boo </dt>
<dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
+!! html/php+tidy
+<ul>
+<li>
+<ol>
+<li>
+<ul>
+<li>
+<ol>
+<li>
+<dl>
+<dt>foo </dt>
+<dd>
+<ul>
+<li>
+<dl>
+<dd>
+<dl>
+<dt>bar</dt>
+</dl>
+</dd>
+</dl>
+</li>
+</ul>
+</dd>
+</dl>
+<dl>
+<dt>boo </dt>
+<dd>baz</dd>
+</dl>
+</li>
+</ol>
+</li>
+</ul>
+</li>
+</ol>
+</li>
+</ul>
!! html/parsoid
<ul>
<li>
!! end
+# Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
!! test
Definition Lists: Weird Ones: Test 1
!! wikitext
<ul><li><ol><li><dl><dt> foo </dt>
<dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)</dt></dl></dd></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
+!! html/php+tidy
+<ul>
+<li>
+<ol>
+<li>
+<dl>
+<dt>foo </dt>
+<dd>
+<ul>
+<li>
+<dl>
+<dd>
+<dl>
+<dd>
+<dl>
+<dd>
+<dl>
+<dt>bar (who uses this?)</dt>
+</dl>
+</dd>
+</dl>
+</dd>
+</dl>
+</dd>
+</dl>
+</li>
+</ul>
+</dd>
+</dl>
+</li>
+</ol>
+</li>
+</ul>
!! html/parsoid
<ul>
<li>
[[wikipedia:Foo|Bar]]
[[wikipedia:Foo|<span>Bar</span>]]
+!! html/php
+<p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
+</p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
+</p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
+</p>
!! html/parsoid
<p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
<p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo">Bar</a></p>
!! html/php
<p><a rel="nofollow" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de <a href="/index.php?title=Museo_Picasso_(Par%C3%ADs)&action=edit&redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.</a>
</p>
+!! html/php+tidy
+<p><a rel="nofollow" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de</a> <a href="/index.php?title=Museo_Picasso_(Par%C3%ADs)&action=edit&redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.</p>
!! html/parsoid
<p><a rel="mw:ExtLink" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a rel="mw:WikiLink" href="./Museo_Picasso_(París)">Museo Picasso</a><span>.</span></p>
!! end
{|
| Foo!! ||
|}
+!! html
+<table>
+<tr>
+<td> Foo!! </td>
+<td>
+</td></tr></table>
+
!! html/parsoid
<table data-parsoid='{}'>
<tbody data-parsoid='{}'><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'></td></tr>
<!--c1-->
<!--c2-->| b
|}
+!! html
+<table>
+<tr>
+<td>a
+</td>
+<td> b
+</td></tr></table>
+
!! html/parsoid
<table>
<tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
<td>foo</td></tr></tbody></table>
!! end
+## Note that Parsoid output differs from PHP and PHP+tidy here.
+## The lack of <tr> tags in the PHP output is arguably a bug in the
+## PHP parser, which tidy then compounds by fostering the content
+## entirely out of the table. Parsoid recognizes the table context
+## and generates <tr> and <td> wrappers as needed. Hopefully nobody
+## depends on PHP's treatment of broken table markup!
!! test
Implicit <td> after a |-
-(PHP parser relies on Tidy to add the missing <td> tags)
!! options
parsoid=wt2html,wt2wt
!! wikitext
|-
a
|}
-!! html
+!! html/php
+<table>
+
+a
+</table>
+
+!! html/php+tidy
+<p>a</p>
+!! html/parsoid
<table>
<tr><td>a</td></tr>
</table>
!! end
+# Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
!! test
-Pres should be recognized in an explicit <td> context, but not in an implicit <td> context
-(PHP parser relies on Tidy to add the missing <td> tags)
+<pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
!! options
parsoid=wt2html,wt2wt
!! wikitext
|-
b
|}
-!! html
+!! html/php
+<table>
+
+<tr>
+<td>
+<pre>a
+</pre>
+</td></tr>
+ b
+</table>
+
+!! html/php+tidy
+<p>b</p>
+<table>
+<tr>
+<td>
+<pre>
+a
+</pre></td>
+</tr>
+</table>
+!! html/parsoid
<table>
<tbody>
<tr><td><pre>a</pre></td></tr>
</table>
!! end
+# PHP + Tidy strips the list out of the table; Parsoid wraps it.
!! test
Lists should be recognized in an implicit <td> context
-(PHP parser relies on Tidy to add the missing <td> tags)
!! options
parsoid=wt2html,wt2wt
!! wikitext
|-
*a
|}
-!! html
+!! html/php
+<table>
+
+<ul><li>a</li></ul>
+</table>
+
+!! html/php+tidy
+<ul>
+<li>a</li>
+</ul>
+!! html/parsoid
<table>
<tr>
<td><ul>
! foo || bar
<!-- foo --> || baz || quux
|}
+!! html/php
+<table>
+<tr>
+<th> foo </th>
+<th> bar
+</th>
+<td> baz </td>
+<td> quux
+</td></tr></table>
+
!! html/parsoid
<table>
-<tbody>
-<tr><th>foo </th><th>bar </th>
-<td>baz </td>
-<td>quux</td></tr></tbody></table>
+<tbody><tr><th> foo </th><th> bar
+<!-- foo --> </th><td> baz </td><td> quux</td></tr>
+</tbody></table>
!! end
+# PHP throws away the (semi-broken) "foo" class here; Parsoid
+# preserves it.
!!test
Parsoid: Recover better from broken table attributes
!!options
| class="bar" |
foo
|}
+!!html/php+tidy
+<table>
+<tr>
+<td class="bar">
+<p>foo</p>
+</td>
+</tr>
+</table>
!!html/parsoid
<table class="foo">
<tr>
!! html/php
<p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
</p>
+!! html/php+tidy
+<p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
!! html/parsoid
<p><a rel="mw:WikiLink" href="./Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462">Bug462</a></p>
!! end
title=[[User:test/123]]
!! wikitext
[[#a|b]]
+!! html/php
+<p><a href="#a">b</a>
+</p>
!! html/parsoid
<p data-parsoid='{}'><a rel="mw:WikiLink" href="../User:Test/123#a" data-parsoid='{"stx":"piped","a":{"href":"../User:Test/123#a"},"sa":{"href":"#a"}}'>b</a></p>
!! end
[http://wp.org ''foo'']
!! html
-<p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> bar</a>
-</p><p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> <i>bar</i></a>
+<p><a href="/wiki/Foo" title="Foo"> bar</a>
+</p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
</p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
</p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
</p>
Link with angle bracket after anchor
!! wikitext
[[Foo#<bar>]]
+!! html/php
+<p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
+</p>
!! html/parsoid
<p><a rel="mw:WikiLink" href="./Foo#%3Cbar%3E" data-parsoid='{"stx":"simple","a":{"href":"./Foo#%3Cbar%3E"},"sa":{"href":"Foo#<bar>"}}'>Foo#<bar></a></p>
!! end
<ul><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
<li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li></ul>
+!! html+tidy
+<ul>
+<li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
+<li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
+</ul>
!! end
!! test
!! end
# TODO: Fix html2html mode (bug 51055)!
+# This </br> handling was added as part of bug 50831; but it
+# differs from how PHP+tidy handles this. We should investigate
+# this.
!! test
Parsoid: Broken br tag recognition
!! options
</br>
<br/ >
+!! html/php+tidy
+<p></br></p>
+<p><br /></p>
!! html/parsoid
<p><br></p>
<p><br/></p>
!! html
<hr /> Foo
+!! html+tidy
+<hr />
+<p>Foo</p>
!! end
###
</li>
</li>
+!! html+tidy
+<ul>
+<li>a</li>
+<li>b</li>
+<li>c</li>
+</ul>
!!end
!!test
!!test
Test the li-hack
-(Cannot test this with PHP parser since it relies on Tidy for the hack)
+(The PHP parser relies on Tidy for the hack)
!!options
parsoid=wt2html,wt2wt
!! wikitext
<li><li>not a li-hack
</li>
</ul>
-!! html
+!! html+tidy
<ul>
-<li> foo</li>
+<li>foo</li>
<li>li-hack</li>
-<li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>templated li-hack"}}}}]}'>templated li-hack</li>
-<li> <!--foo--> </li>
-<li> li-hack with preceding comments</li>
+<li>templated li-hack</li>
+<li>unsupported li-hack with preceding comments</li>
</ul>
-
<ul>
-<li></li>
-<li>not a li-hack
-</li>
+<li>not a li-hack</li>
</ul>
!!end
!! test
Unbalanced closing block tags break a list
-(Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
+(php parser relies on Tidy to fix up)
!! wikitext
<div>
*a</div><div>
*b</div>
-!! html/parsoid
+!! html+tidy
<div>
<ul>
-<li>a
-</li>
-</ul></div><div>
+<li>a</li>
+</ul>
+</div>
+<div>
<ul>
-<li>b
-</li>
-</ul></div>
+<li>b</li>
+</ul>
+</div>
!! end
+# Parsoid fails this test, but it might be tricky to support properly.
+# See bug 68395.
!! test
Unbalanced closing non-block tags don't break a list
-(Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
+(php parser relies on Tidy to fix up)
!! wikitext
<span>
*a</span><span>
*b</span>
+!! html/php+tidy
+<ul>
+<li><span>a</span></li>
+<li><span>b</span></li>
+</ul>
!! html/parsoid
-<p><span></span>
-</p>
+<span>
<ul>
<li>a<span></span>
</li>
<li>b
</li>
</ul>
+</span>
!! end
!! test
Unclosed formatting tags that straddle lists are closed and reopened
-(Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
+(php parser relies on Tidy to fix up)
!! wikitext
# <s> a
# b </s>
+!! html/php+tidy
+<ol>
+<li><s>a</s></li>
+<li><s>b</s></li>
+</ol>
!! html/parsoid
<ol>
<li> <s> a </s>
</ol>
!! end
+# Parsoid fails this test, but it might be tricky to support properly.
+# See bug 68395.
!!test
List embedded in a non-block tag
-(Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)
+(Ugly Parsoid output -- worth fixing; PHP parser relies on Tidy)
!! wikitext
<small>
* foo
</small>
+!! html/php+tidy
+<ul>
+<li><small>foo</small></li>
+</ul>
!! html/parsoid
-<p><small></small></p>
<small>
<ul>
<li> foo</li>
</ul>
</small>
-<p><small></small></p>
!!end
+# This is a bug in the PHP parser + tidy combination.
+# (The </tr> tag gets parsed as text and html-escaped by PHP,
+# and then fostered out of the table by tidy.)
+# We believe the Parsoid output to be correct.
!! test
Table with missing opening <tr> tag
!! options
<td>foo</td>
</tr>
</table>
+!! html/php+tidy
+<p></tr></p>
+<table>
+<tr>
+<td>foo</td>
+</tr>
+</table>
!! html/parsoid
<table>
<tr>
title=[['foo & bar = baz']]
!! wikitext
''{{PAGENAME}}''
-!! html
+!! html/php
<p><i>'foo & bar = baz'</i>
</p>
+!! html+tidy
+<p><i>'foo & bar = baz'</i></p>
!! end
!! test
title=[[*RFC 1234 http://example.com/]]
!! wikitext
{{PAGENAME}}
-!! html
+!! html/php
<p>*RFC 1234 http://example.com/
</p>
+!! html+tidy
+<p>*RFC 1234 http://example.com/</p>
!! end
!! test
title=[[*RFC 1234 http://example.com/]]
!! wikitext
{{PAGENAMEE}}
-!! html
+!! html/php
<p>*RFC_1234_http://example.com/
</p>
+!! html+tidy
+<p>*RFC_1234_http://example.com/</p>
!! end
!! test
!! wikitext
{{paramtest|
param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
-!! html
+!! html/php
This is a test template with parameter <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div>
+!! html+tidy
+<p>This is a test template with parameter</p>
+<div class="thumb tright">
+<div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a>
+<div class="thumbcaption"><a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div>
+</div>
+</div>
!! end
!! article
{{{{echo|[[foo}}]]}}
!! html
-<p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
-</p><p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
+<p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
+</p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
</p><p>{{[[foo}}]]
</p>
!! end
<div>Foo</div>
<blockquote>Foo</blockquote>
+!! html+tidy
+<div>Foo</div>
+<blockquote>
+<p>Foo</p>
+</blockquote>
!!end
!!test
</p>
bar <div>baz</div>
-!!end
+!! html+tidy
+<p>Foo</p>
+<p>bar</p>
+<div>baz</div>
+!! end
!!test
Templates: P-wrapping: 1d. Template preceded by comment-only line
!! wikitext
{{echo|[[Foo|bar]]}}
!! html
-<p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
+<p><a href="/wiki/Foo" title="Foo">bar</a>
</p>
!!end
!! wikitext
[[{{echo|Foo}}|bar]]
!! html
-<p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
+<p><a href="/wiki/Foo" title="Foo">bar</a>
</p>
!!end
[[:Foo{{echo|bar}}|bar]]
!! html
-<p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
+<p><a href="/wiki/Foo" title="Foo">bar</a>
</p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
</p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
</p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
!! wikitext
[[Foo|{{echo|bar}}]]
!! html
-<p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
+<p><a href="/wiki/Foo" title="Foo">bar</a>
</p>
!!end
!! wikitext
{{echo|[[{{echo|Foo}}|bar]]}}
!! html
-<p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
+<p><a href="/wiki/Foo" title="Foo">bar</a>
</p>
!!end
a
<tr><td></td></tr></table>
-!!end
+!! html+tidy
+<p>a</p>
+<table>
+<tr>
+<td></td>
+</tr>
+</table>
+!! end
!!test
Templates: Wiki Tables: 1b. Fostering of entire template content
</div>
<tr><td></td></tr></table>
-!!end
+!! html+tidy
+<div>
+<p>foo</p>
+</div>
+<table>
+<tr>
+<td></td>
+</tr>
+</table>
+!! end
!!test
Templates: Wiki Tables: 2. Fostering of partial template content
<div>b</div>
<tr><td></td></tr></table>
-!!end
+!! html+tidy
+<p>a</p>
+<div>b</div>
+<table>
+<tr>
+<td></td>
+</tr>
+</table>
+!! end
!!test
Templates: Wiki Tables: 3. td-content via multiple templates
!! html
a<div>bc</div>de
-!!end
+!! html+tidy
+<p>a</p>
+<div>bc</div>
+<p>de</p>
+!! end
!!test
Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
<figure class="mw-default-size mw-halign-right" typeof="mw:Image mw:Placeholder"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a><figcaption>Caption text</figcaption></figure>
!! end
+# Parsoid's output here is broken (incorrect p-wrapping); see bug 64901.
!! test
Image with link tails
!! options
123<div class="floatright"><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></div>456
123<div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div></div></div></div>456
+!! html/php+tidy
+<p>123<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>456</p>
+<p>123</p>
+<div class="floatright"><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></div>
+<p>456 123</p>
+<div class="thumb tright">
+<div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a>
+<div class="thumbcaption">
+<div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>
+</div>
+</div>
+</div>
+<p>456</p>
!! html/parsoid
<p>123<span class="mw-default-size" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a></span>456</p>
123<figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a></figure>456
!! html
<p>I always thought é was a cute letter.
</p>
+!! html+tidy
+<p>I always thought é was a cute letter.</p>
!! end
!! test
!! end
# This was bug 41545 in the PHP parser.
+# Note that tidy doesn't handle this correctly.
!! test
Nesting of <kbd>
!! wikitext
# The following cases were bug 51081 in the PHP parser.
# Note that there are some other nestable tags (b, i, etc) which are
# not covered; see bug 51081 for discussion.
+
+# Note that tidy doesn't handle this correctly.
!! test
Nesting of <em>
!! wikitext
</p>
!! end
+# Note that tidy doesn't handle this correctly.
!! test
Nesting of <strong>
!! wikitext
Nesting of <q>
!! wikitext
<q>X<q>Y</q>Z</q>
-!! html
-<p><q>X<q>Y</q>Z</q>
-</p>
+!! html+tidy
+<p><q>X<q>Y</q>Z</q></p>
!! end
+# Note that tidy doesn't handle this correctly.
!! test
Nesting of <ruby>
!! wikitext
</p>
!! end
+# Note that tidy doesn't handle this correctly.
!! test
Nesting of <bdo>
!! wikitext
!! html
<a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link<div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div></a>
+!! html+tidy
+<p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link<div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div></a></p>
!! end
!! test
</div>
+!! html+tidy
+<h2><span class="mw-headline" id="onmouseover.3D">onmouseover=</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: onmouseover=">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p>http://</p>
+<div id="toc" class="toc">
+<div id="toctitle">
+<h2>Contents</h2>
+</div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
+</ul>
+</div>
!! end
!! test
<tr><td></td></tr>
</table>
+!! html+tidy
+<h2><span class="mw-headline" id="a">a</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: a">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<table style="__TOC__">
+<tr>
+<td></td>
+</tr>
+</table>
!! end
# Known to produce bogus xml (extra </td>)
</tr>
</table>
+!! html+tidy
+<table>
+<tr>
+<th>https://</th>
+<th></th>
+<th></th>
+<th></th>
+</tr>
+</table>
!! end
!! test
!!test
Fuzz testing: URL adjacent extension (with space, clean)
-!! options
!! wikitext
http://example.com <nowiki>junk</nowiki>
!! html
!!test
Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
-!! options
!! wikitext
http://example.com<nowiki>junk</nowiki>
!! html
!!test
Fuzz testing: URL adjacent extension (no space, dirty; pre)
-!! options
!! wikitext
http://example.com<pre>junk</pre>
!! html
<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
+!! html+tidy
+<p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
+<pre>
+junk
+</pre>
!!end
!!test
!! html/php
<p>JavaScript
</p>
+!! html/php+tidy
+<p>JavaScript</p>
!! html/parsoid
<p><span typeof="mw:Entity">J</span><span typeof="mw:Entity">a</span><span typeof="mw:Entity">v</span><span typeof="mw:Entity">a</span><span typeof="mw:Entity">S</span><span typeof="mw:Entity">c</span><span typeof="mw:Entity">r</span><span typeof="mw:Entity">i</span><span typeof="mw:Entity">p</span><span typeof="mw:Entity">t</span></p>
!! end
!! html/php
<p>îî
</p>
+!! html/php+tidy
+<p>îî</p>
!! html/parsoid
<p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
!! end
!! html
<p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
</p>
+!! html+tidy
+<p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
!! end
!! test
!! html
<p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
</p>
+!! html+tidy
+<p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
!! end
!! test
<blockquote>Line one
Line two</blockquote>
+!! html+tidy
+<blockquote>
+<p>Line one Line two</p>
+</blockquote>
!! end
!! test
</p>
Line two</blockquote>
+!! html+tidy
+<blockquote>
+<p>Line one</p>
+Line two</blockquote>
!! end
!! test
</p>
</blockquote>
+!! html+tidy
+<blockquote>
+<p>Line one</p>
+<p>Line two</p>
+</blockquote>
!! end
!! test
</p>
</blockquote>
+!! html+tidy
+<blockquote>
+<p>Line one</p>
+<p>Line two</p>
+</blockquote>
!! end
!! test
<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>
+!! html+tidy
+<div id="toc" class="toc">
+<div id="toctitle">
+<h2>Contents</h2>
+</div>
+<ul>
+<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"></span></h2>
+<blockquote>
+<p><span class="mw-headline" id="Quote">Quote</span></p>
+</blockquote>
+<p><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></p>
!! end
!! test
<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>
+!! html+tidy
+<div id="toc" class="toc">
+<div id="toctitle">
+<h2>Contents</h2>
+</div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#Foo_Bar"><span class="tocnumber">1</span> <span class="toctext"><i>Foo</i> <b>Bar</b></span></a></li>
+<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></span></h2>
+<blockquote>
+<p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
+</blockquote>
+<p><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></p>
!! end
!! test
!! wikitext
==[[foo|x<nowiki>y</nowiki>z]]==
!! html
-<h2><span class="mw-headline" id="xyz"><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">xyz</a></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: xyz">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="xyz"><a href="/wiki/Foo" title="Foo">xyz</a></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: xyz">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
!! end
{|
|foo
|}
+!! html/php
+ <div>foo</div>
+<table>
+<tr>
+<td>foo
+</td></tr></table>
+
!! html/parsoid
<div data-parsoid='{"stx":"html"}'>foo</div>
<table><tbody>
<!--hi-->|-
| there
|}
+!! html/php
+<table>
+
+<tr>
+<td> there
+</td></tr></table>
+
!! html/parsoid
<table data-parsoid='{}'>
<!--hi--><tbody data-parsoid='{}'><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
/**
* @dataProvider providerGetDisplayWidthHeight
- * @param array $dimensions Array [maxWidth, maxHeight, width, height]
+ * @param array $dim Array [maxWidth, maxHeight, width, height]
* @param array $expected Array [width, height] The width and height we expect to display at
*/
function testGetDisplayWidthHeight( $dim, $expected ) {
'logout',
'action',
'ApiLogout',
- function( ApiMain $main, $action ) {
- return new ApiLogout( $main, $action );
+ function ( ApiMain $main, $action ) {
+ return new ApiLogout( $main, $action );
},
),
);
),
'logout' => array(
'class' => 'ApiLogout',
- 'factory' => function( ApiMain $main, $action ) {
+ 'factory' => function ( ApiMain $main, $action ) {
return new ApiLogout( $main, $action );
},
),
),
'logout' => array(
'class' => 'ApiLogout',
- 'factory' => function( ApiMain $main, $action ) {
- return new ApiLogout( $main, $action );
- },
+ 'factory' => function ( ApiMain $main, $action ) {
+ return new ApiLogout( $main, $action );
+ },
),
);
$session = $wgRequest->getSessionArray();
}
- if ( $session['wsToken'] ) {
+ if ( isset( $session['wsToken'] ) && $session['wsToken'] ) {
// add edit token to fake session
$session['wsEditToken'] = $session['wsToken'];
// add token to request parameters
return $this->doApiRequest( $params, $session, false, $user );
} else {
- throw new Exception( "request data not in right format" );
+ throw new Exception( "Session token not available" );
}
}
* @param array $params Api parameters
* @param int $expectedCount Max number of iterations
* @param string $id Unit test id
- * @param bool $useContinue True to use smart continue
+ * @param bool $continue True to use smart continue
* @return Merged results data array
*/
protected function checkC( $expected, $params, $expectedCount, $id, $continue = true ) {
* @param string $titlePart
* @param int $namespace
* @param string $expected
- * @param string $description
+ * @param string $expectException
* @dataProvider provideTestTitlePartToKey
*/
function testTitlePartToKey( $titlePart, $namespace, $expected, $expectException ) {
* @dataProvider provideDataToEncode
*/
public function testBeautifyUsesFormatJson( $data ) {
- $obj = new JSONContent( FormatJson::encode( $data) );
+ $obj = new JSONContent( FormatJson::encode( $data ) );
$this->assertEquals( FormatJson::encode( $data, true ), $obj->beautifyJSON() );
}
*/
public function testPreSaveTransform( $data ) {
$obj = new JSONContent( FormatJson::encode( $data ) );
- $newObj = $obj->preSaveTransform( $this->getMockTitle(), $this->getMockUser() , $this->getMockParserOptions() );
+ $newObj = $obj->preSaveTransform( $this->getMockTitle(), $this->getMockUser(), $this->getMockParserOptions() );
$this->assertTrue( $newObj->equals( new JSONContent( FormatJson::encode( $data, true ) ) ) );
}
),
);
}
-
-}
\ No newline at end of file
+}
/**
* @param string $filename
* @param int $expectedWidth Width
- * @param int $expectedHeigh Height
+ * @param int $expectedHeight Height
* @dataProvider provideGetImageSize
* @covers XCFHandler::getImageSize
*/
* @var DjVuSupport
*/
private $djVuSupport;
+ /**
+ * @var TidySupport
+ */
+ private $tidySupport;
protected $file = false;
$tmpGlobals['wgExtensionAssetsPath'] = '/extensions';
$tmpGlobals['wgStylePath'] = '/skins';
$tmpGlobals['wgEnableUploads'] = true;
+ $tmpGlobals['wgUploadNavigationUrl'] = false;
$tmpGlobals['wgThumbnailScriptPath'] = false;
$tmpGlobals['wgLocalFileRepo'] = array(
'class' => 'LocalRepo',
$tmpGlobals['wgUseImageResize'] = true;
$tmpGlobals['wgAllowExternalImages'] = true;
$tmpGlobals['wgRawHtml'] = false;
- $tmpGlobals['wgUseTidy'] = false;
- $tmpGlobals['wgAlwaysUseTidy'] = false;
$tmpGlobals['wgWellFormedXml'] = true;
$tmpGlobals['wgAllowMicrodataAttributes'] = true;
$tmpGlobals['wgExperimentalHtmlIds'] = false;
# see https://gerrit.wikimedia.org/r/111390
$tmpGlobals['wgExtraInterlanguageLinkPrefixes'] = array( 'mul' );
- //DjVu support
+ // DjVu support
$this->djVuSupport = new DjVuSupport();
+ // Tidy support
+ $this->tidySupport = new TidySupport();
+ // We always set 'wgUseTidy' to false when parsing, but certain
+ // test-running modes still use tidy if available, so ensure
+ // that the tidy-related options are all set to their defaults.
+ $tmpGlobals['wgUseTidy'] = false;
+ $tmpGlobals['wgAlwaysUseTidy'] = false;
+ $tmpGlobals['wgDebugTidy'] = false;
+ $tmpGlobals['wgTidyConf'] = $IP . '/includes/tidy.conf';
+ $tmpGlobals['wgTidyOpts'] = '';
+ $tmpGlobals['wgTidyInternal'] = $this->tidySupport->isInternal();
$this->setMwGlobals( $tmpGlobals );
$output = $parser->parse( $input, $title, $options, true, true, 1337 );
$output->setTOCEnabled( !isset( $opts['notoc'] ) );
$out = $output->getText();
+ if ( isset( $opts['tidy'] ) ) {
+ if ( !$this->tidySupport->isEnabled() ) {
+ $this->markTestSkipped( "SKIPPED: tidy extension is not installed.\n" );
+ } else {
+ $out = MWTidy::tidy( $out );
+ $out = preg_replace( '/\s+$/', '', $out);
+ }
+ }
if ( isset( $opts['showtitle'] ) ) {
if ( $output->getTitleText() ) {
}
if ( isset( $opts['ill'] ) ) {
- $out = $this->tidy( implode( ' ', $output->getLanguageLinks() ) );
+ $out = implode( ' ', $output->getLanguageLinks() );
} elseif ( isset( $opts['cat'] ) ) {
$outputPage = $context->getOutput();
$outputPage->addCategoryLinks( $output->getCategories() );
$cats = $outputPage->getCategoryLinks();
if ( isset( $cats['normal'] ) ) {
- $out = $this->tidy( implode( ' ', $cats['normal'] ) );
+ $out = implode( ' ', $cats['normal'] );
} else {
$out = '';
}
}
$parser->mPreprocessor = null;
-
- $result = $this->tidy( $result );
}
$this->teardownGlobals();
//Various "cleanup" functions
- /**
- * Run the "tidy" command on text if the $wgUseTidy
- * global is true
- *
- * @param string $text The text to tidy
- * @return string
- */
- protected function tidy( $text ) {
- global $wgUseTidy;
-
- if ( $wgUseTidy ) {
- $text = MWTidy::tidy( $text );
- }
-
- return $text;
- }
-
/**
* Remove last character if it is a newline
* @param string $s
protected function setUp() {
parent::setUp();
- $this->setMwGlobals( array(
- 'wgValidSkinNames' => array( 'vector' => 'Vector' ),
- ) );
+ // The return value of the closure shouldn't matter since this test should
+ // never call it
+ SkinFactory::getDefaultInstance()->register( 'vector', 'Vector', function(){});
}
/**
*/
public function testRegister() {
$factory = new SkinFactory();
- $factory->register( 'fallback', 'Fallback', function() {
+ $factory->register( 'fallback', 'Fallback', function () {
return new SkinFallback();
} );
$this->assertTrue( true ); // No exception thrown
*
* @param Page $page Page to add the revision to
* @param string $text Revisions text
- * @param string $text Revisions summare
+ * @param string $summary Revisions summare
*
* @throws MWException
*/
* Asserts that the xml reader is at the final closing tag of an xml file and
* closes the reader.
*
- * @param string $tag (optional) the name of the final tag
+ * @param string $name (optional) the name of the final tag
* (e.g.: "mediawiki" for </mediawiki>)
*/
protected function assertDumpEnd( $name = "mediawiki" ) {
* @param string $text_sha1 The base36 SHA-1 of the revision's text
* @param string|bool $text (optional) The revision's string, or false to check for a
* revision stub
+ * @param int|bool $parentid (optional) id of the parent revision
* @param string $model The expected content model id (default: CONTENT_MODEL_WIKITEXT)
* @param string $format The expected format model id (default: CONTENT_FORMAT_WIKITEXT)
- * @param int|bool $parentid (optional) id of the parent revision
*/
protected function assertRevision( $id, $summary, $text_id, $text_bytes,
$text_sha1, $text = false, $parentid = false,
*
* @param WikiPage $page The page to add the revision to
* @param string $text The revisions text
- * @param string $text The revisions summare
+ * @param string $summary The revisions summare
*
* @throws MWException
*/
private $sectionData = array();
private $lineNum;
private $eof;
+ # Create a fake parser tests which never run anything unless
+ # asked to do so. This will avoid running hooks for a disabled test
+ private $delayedParserTest;
+ private $nextSubTest = 0;
function __construct( $file, $parserTest ) {
$this->file = $file;
}
$this->parserTest = $parserTest;
+ $this->delayedParserTest = new DelayedParserTest();
$this->lineNum = $this->index = 0;
}
return $this->eof != true;
}
+ function setupCurrentTest() {
+ // "input" and "result" are old section names allowed
+ // for backwards-compatibility.
+ $input = $this->checkSection( array( 'wikitext', 'input' ), false );
+ $result = $this->checkSection( array( 'html/php', 'html/*', 'html', 'result' ), false );
+ // some tests have "with tidy" and "without tidy" variants
+ $tidy = $this->checkSection( array( 'html/php+tidy', 'html+tidy'), false );
+ if ( $tidy != false ) {
+ if ( $this->nextSubTest == 0 ) {
+ if ( $result != false ) {
+ $this->nextSubTest = 1; // rerun non-tidy variant later
+ }
+ $result = $tidy;
+ } else {
+ $this->nextSubTest = 0; // go on to next test after this
+ $tidy = false;
+ }
+ }
+
+ if ( !isset( $this->sectionData['options'] ) ) {
+ $this->sectionData['options'] = '';
+ }
+
+ if ( !isset( $this->sectionData['config'] ) ) {
+ $this->sectionData['config'] = '';
+ }
+
+ $isDisabled = preg_match( '/\\bdisabled\\b/i', $this->sectionData['options'] ) && !$this->parserTest->runDisabled;
+ $isParsoidOnly = preg_match( '/\\bparsoid\\b/i', $this->sectionData['options'] ) && $result == 'html' && !$this->parserTest->runParsoid;
+ $isFiltered = !preg_match( "/" . $this->parserTest->regex . "/i", $this->sectionData['test'] );
+ if ( $input == false || $result == false || $isDisabled || $isParsoidOnly || $isFiltered ) {
+ # disabled test
+ return false;
+ }
+
+ # We are really going to run the test, run pending hooks and hooks function
+ wfDebug( __METHOD__ . " unleashing delayed test for: {$this->sectionData['test']}" );
+ $hooksResult = $this->delayedParserTest->unleash( $this->parserTest );
+ if ( !$hooksResult ) {
+ # Some hook reported an issue. Abort.
+ throw new MWException( "Problem running hook" );
+ }
+
+ $this->test = array(
+ 'test' => ParserTest::chomp( $this->sectionData['test'] ),
+ 'input' => ParserTest::chomp( $this->sectionData[$input] ),
+ 'result' => ParserTest::chomp( $this->sectionData[$result] ),
+ 'options' => ParserTest::chomp( $this->sectionData['options'] ),
+ 'config' => ParserTest::chomp( $this->sectionData['config'] ),
+ );
+ if ( $tidy != false ) {
+ $this->test['options'] .= " tidy";
+ }
+ return true;
+ }
+
function readNextTest() {
- $this->clearSection();
+ # Run additional subtests of previous test
+ while ( $this->nextSubTest > 0 )
+ if ( $this->setupCurrentTest() )
+ return true;
- # Create a fake parser tests which never run anything unless
- # asked to do so. This will avoid running hooks for a disabled test
- $delayedParserTest = new DelayedParserTest();
+ $this->clearSection();
+ # Reset hooks for the delayed test object
+ $this->delayedParserTest->reset();
while ( false !== ( $line = fgets( $this->fh ) ) ) {
$this->lineNum++;
$line = trim( $line );
if ( $line ) {
- $delayedParserTest->requireHook( $line );
+ $this->delayedParserTest->requireHook( $line );
}
}
$line = trim( $line );
if ( $line ) {
- $delayedParserTest->requireFunctionHook( $line );
+ $this->delayedParserTest->requireFunctionHook( $line );
}
}
if ( $this->section == 'end' ) {
$this->checkSection( 'test' );
- // "input" and "result" are old section names allowed
- // for backwards-compatibility.
- $input = $this->checkSection( array( 'wikitext', 'input' ), false );
- $result = $this->checkSection( array( 'html/php', 'html/*', 'html', 'result' ), false );
-
- if ( !isset( $this->sectionData['options'] ) ) {
- $this->sectionData['options'] = '';
- }
-
- if ( !isset( $this->sectionData['config'] ) ) {
- $this->sectionData['config'] = '';
- }
-
- if ( $input == false || $result == false ||
- ( ( preg_match( '/\\bdisabled\\b/i', $this->sectionData['options'] )
- && !$this->parserTest->runDisabled )
- || ( preg_match( '/\\bparsoid\\b/i', $this->sectionData['options'] )
- && $result != 'html/php' && !$this->parserTest->runParsoid )
- || !preg_match( "/" . $this->parserTest->regex . "/i", $this->sectionData['test'] ) )
- ) {
- # disabled test
- $this->clearSection();
-
- # Forget any pending hooks call since test is disabled
- $delayedParserTest->reset();
-
- continue;
- }
-
- # We are really going to run the test, run pending hooks and hooks function
- wfDebug( __METHOD__ . " unleashing delayed test for: {$this->sectionData['test']}" );
- $hooksResult = $delayedParserTest->unleash( $this->parserTest );
- if ( !$hooksResult ) {
- # Some hook reported an issue. Abort.
- return false;
- }
-
- $this->test = array(
- 'test' => ParserTest::chomp( $this->sectionData['test'] ),
- 'input' => ParserTest::chomp( $this->sectionData[$input] ),
- 'result' => ParserTest::chomp( $this->sectionData[$result] ),
- 'options' => ParserTest::chomp( $this->sectionData['options'] ),
- 'config' => ParserTest::chomp( $this->sectionData['config'] ),
- );
-
- return true;
+ do {
+ if ( $this->setupCurrentTest() )
+ return true;
+ } while ( $this->nextSubTest > 0 );
+ # go on to next test (since this was disabled)
+ $this->clearSection();
+ $this->delayedParserTest->reset();
+ continue;
}
if ( isset( $this->sectionData[$this->section] ) ) {
* Throw an exception if it is not set, referencing current section
* and adding the current file name and line number
*
- * @param string|array $token Expected token(s) that should have been
+ * @param string|array $tokens Expected token(s) that should have been
* mentioned before closing this section
* @param bool $fatal True iff an exception should be thrown if
* the section is not found.
/**
* Similar to ParserTest object but does not run anything
* Use unleash() to really execute the hook function
- * @param string $fnHook
+ * @param string $hook
*/
public function requireTransparentHook( $hook ) {
$this->transparentHooks[] = $hook;
}
/**
- * Returns if the DjVu tools are usable
+ * Returns true if the DjVu tools are usable
*
* @return bool
*/
&& is_executable( $wgDjvuTxt );
}
}
+
+/**
+ * Initialize and detect the tidy support
+ */
+class TidySupport {
+ private $internalTidy;
+ private $externalTidy;
+
+ /**
+ * Determine if there is a usable tidy.
+ */
+ public function __construct() {
+ global $wgTidyBin;
+
+ $this->internalTidy = extension_loaded( 'tidy' ) &&
+ class_exists( 'tidy' );
+
+ $this->externalTidy = is_executable( $wgTidyBin ) ||
+ Installer::locateExecutableInDefaultPaths( array( $wgTidyBin ) )
+ !== false;
+ }
+
+ /**
+ * Returns true if we should use internal tidy.
+ *
+ * @return bool
+ */
+ public function isInternal() {
+ return $this->internalTidy;
+ }
+
+ /**
+ * Returns true if tidy is usable
+ *
+ * @return bool
+ */
+ public function isEnabled() {
+ return $this->internalTidy || $this->externalTidy;
+ }
+}
* file handler.
*
* @param File $file File object for file in question
- * @param array $param Array of parameters so far
+ * @param array $params Array of parameters so far
* @return array Parameters array with more parameters
*/
function wfExtractThumbParams( $file, $params ) {