"type": "string",
"enum": [
"array_merge_recursive",
+ "array_replace_recursive",
"array_plus_2d",
"array_plus",
"array_merge"
"type": "string",
"enum": [
"array_merge_recursive",
+ "array_replace_recursive",
"array_plus_2d",
"array_plus",
"array_merge"
* 1 => object(Status) # The Status with warning messages, only
* ]
*
- * @return array
+ * @return Status[]
*/
public function splitByErrorType() {
list( $errorsOnlyStatus, $warningsOnlyStatus ) = parent::splitByErrorType();
"apihelp-options-description": "Change preferences of the current user.\n\nOnly options which are registered in core or in one of installed extensions, or options with keys prefixed with <code>userjs-</code> (intended to be used by user scripts), can be set.",
"apihelp-options-param-reset": "Resets preferences to the site defaults.",
"apihelp-options-param-resetkinds": "List of types of options to reset when the <var>$1reset</var> option is set.",
- "apihelp-options-param-change": "List of changes, formatted name=value (e.g. skin=vector). Value cannot contain pipe characters. If no value is given (not even an equals sign), e.g., optionname|otheroption|..., the option will be reset to its default value.",
+ "apihelp-options-param-change": "List of changes, formatted name=value (e.g. skin=vector). If no value is given (not even an equals sign), e.g., optionname|otheroption|..., the option will be reset to its default value. If any value passed contains the pipe character (<kbd>|</kbd>), use the [[Special:ApiHelp/main#main/datatypes|alternative multiple-value separator]] for correct operation.",
"apihelp-options-param-optionname": "The name of the option that should be set to the value given by <var>$1optionvalue</var>.",
- "apihelp-options-param-optionvalue": "The value for the option specified by <var>$1optionname</var>, can contain pipe characters.",
+ "apihelp-options-param-optionvalue": "The value for the option specified by <var>$1optionname</var>.",
"apihelp-options-example-reset": "Reset all preferences.",
"apihelp-options-example-change": "Change <kbd>skin</kbd> and <kbd>hideminor</kbd> preferences.",
"apihelp-options-example-complex": "Reset all preferences, then set <kbd>skin</kbd> and <kbd>nickname</kbd>.",
"apihelp-protect-description": "ページの保護レベルを変更します。",
"apihelp-protect-param-title": "保護(解除)するページ名です。$1pageid とは同時に使用できません。",
"apihelp-protect-param-pageid": "保護(解除)するページIDです。$1title とは同時に使用できません。",
- "apihelp-protect-param-protections": "<kbd>action=level</kbd> の形式 (例えば、<kbd>edit=sysop</kbd>) で整形された、保護レベルの一覧。\n\n<strong>注意: </strong> ここに列挙されなかった操作の制限は解除されます。",
+ "apihelp-protect-param-protections": "<kbd>action=level</kbd> の形式 (例えば、<kbd>edit=sysop</kbd>) で整形された、保護レベルの一覧。レベル <kbd>all</kbd> は誰もが操作できる、言い換えると制限が掛かっていないことを意味します。\n\n<strong>注意: </strong> ここに列挙されなかった操作の制限は解除されます。",
"apihelp-protect-param-expiry": "有効期限です。タイムスタンプがひとつだけ指定された場合は、それがすべての保護に適用されます。無期限の保護を行う場合は<kbd>infinite</kbd>, <kbd>indefinite</kbd>, <kbd>infinity</kbd>, または <kbd>never</kbd> を指定します。",
"apihelp-protect-param-reason": "保護(解除)の理由。",
"apihelp-protect-param-tags": "保護記録の項目に適用する変更タグ。",
"apihelp-query+siteinfo-paramvalue-prop-general": "システム全体の情報。",
"apihelp-query+siteinfo-paramvalue-prop-specialpagealiases": "特別ページの別名の一覧。",
"apihelp-query+siteinfo-paramvalue-prop-magicwords": "マジックワードとこれらの別名の一覧。",
+ "apihelp-query+siteinfo-param-numberingroup": "利用者グループに属する利用者の数を一覧表示します。",
"apihelp-query+siteinfo-example-simple": "サイト情報を取得する。",
"apihelp-query+tags-description": "変更タグを一覧表示します。",
"apihelp-query+tags-param-limit": "一覧表示するタグの最大数。",
"apihelp-query+usercontribs-param-tag": "このタグが付与された版のみを一覧表示する。",
"apihelp-query+usercontribs-param-toponly": "最新の版である変更のみを一覧表示する。",
"apihelp-query+usercontribs-example-user": "利用者 <kbd>Example</kbd> の投稿記録を表示する。",
+ "apihelp-query+usercontribs-example-ipprefix": "<kbd>192.0.2.</kbd> から始まるすべてのIPアドレスからの投稿記録を表示する。",
+ "apihelp-query+userinfo-description": "現在の利用者に関する情報を取得します。",
"apihelp-query+userinfo-param-prop": "どの情報を結果に含めるか:",
"apihelp-query+userinfo-paramvalue-prop-realname": "利用者の本名を追加します。",
"apihelp-query+userinfo-example-simple": "現在の利用者に関する情報を取得します。",
* 1 => object(StatusValue) # The StatusValue with warning messages, only
* ]
*
- * @return array
+ * @return StatusValue[]
*/
public function splitByErrorType() {
$errorsOnlyStatusValue = clone $this;
* @param mixed $value
*/
public function setResult( $ok, $value = null ) {
- $this->ok = $ok;
+ $this->ok = (bool)$ok;
$this->value = $value;
}
/**
* Create a new load balancer for external storage. The resulting object will be
- * untracked, not chronology-protected, and the caller is responsible for
- * cleaning it up.
+ * untracked, not chronology-protected, and the caller is responsible for cleaning it up.
*
* This method is for only advanced usage and callers should almost always use
* getExternalLB() instead. This method can be useful when a table is used as a
* key/value store. In that cases, one might want to query it in autocommit mode
* (DBO_TRX off) but still use DBO_TRX transaction rounds on other tables.
*
- * @param string $cluster External storage cluster, or false for core
- * @param bool|string $domain Domain ID, or false for the current domain
+ * @param string $cluster External storage cluster name
* @return ILoadBalancer
*/
- public function newExternalLB( $cluster, $domain = false );
+ public function newExternalLB( $cluster );
/**
* Get a cached (tracked) load balancer for external storage
*
- * @param string $cluster External storage cluster, or false for core
- * @param bool|string $domain Domain ID, or false for the current domain
+ * @param string $cluster External storage cluster name
* @return ILoadBalancer
*/
- public function getExternalLB( $cluster, $domain = false );
+ public function getExternalLB( $cluster );
/**
* Execute a function for each tracked load balancer
/**
* @see ILBFactory::newExternalLB()
* @param string $cluster
- * @param bool $domain
* @return LoadBalancer
*/
- abstract public function newExternalLB( $cluster, $domain = false );
+ abstract public function newExternalLB( $cluster );
/**
* @see ILBFactory::getExternalLB()
* @param string $cluster
- * @param bool $domain
* @return LoadBalancer
*/
- abstract public function getExternalLB( $cluster, $domain = false );
+ abstract public function getExternalLB( $cluster );
/**
* Call a method of each tracked load balancer
return $this->mainLBs[$section];
}
- /**
- * @param string $cluster
- * @param DatabaseDomain|string|bool $domain Domain ID, or false for the current domain
- * @throws InvalidArgumentException
- * @return LoadBalancer
- */
- public function newExternalLB( $cluster, $domain = false ) {
+ public function newExternalLB( $cluster ) {
if ( !isset( $this->externalLoads[$cluster] ) ) {
throw new InvalidArgumentException( __METHOD__ . ": Unknown cluster \"$cluster\"" );
}
);
}
- /**
- * @param string $cluster External storage cluster, or false for core
- * @param DatabaseDomain|string|bool $domain Domain ID, or false for the current domain
- * @return LoadBalancer
- */
- public function getExternalLB( $cluster, $domain = false ) {
+ public function getExternalLB( $cluster ) {
if ( !isset( $this->extLBs[$cluster] ) ) {
- $this->extLBs[$cluster] = $this->newExternalLB( $cluster, $domain );
+ $this->extLBs[$cluster] = $this->newExternalLB( $cluster );
$this->getChronologyProtector()->initLB( $this->extLBs[$cluster] );
}
return $this->mainLB;
}
- /**
- * @param string $cluster
- * @param bool|string $domain
- * @return LoadBalancer
- * @throws InvalidArgumentException
- */
- public function newExternalLB( $cluster, $domain = false ) {
+ public function newExternalLB( $cluster ) {
if ( !isset( $this->externalClusters[$cluster] ) ) {
throw new InvalidArgumentException( __METHOD__ . ": Unknown cluster \"$cluster\"." );
}
return $this->newLoadBalancer( $this->externalClusters[$cluster] );
}
- /**
- * @param string $cluster
- * @param bool|string $domain
- * @return LoadBalancer
- */
- public function getExternalLB( $cluster, $domain = false ) {
+ public function getExternalLB( $cluster ) {
if ( !isset( $this->extLBs[$cluster] ) ) {
- $this->extLBs[$cluster] = $this->newExternalLB( $cluster, $domain );
+ $this->extLBs[$cluster] = $this->newExternalLB( $cluster );
$this->getChronologyProtector()->initLB( $this->extLBs[$cluster] );
}
throw new InvalidArgumentException( "Missing 'connection' argument." );
}
- $this->lb = new LoadBalancerSingle( array_merge( $this->baseLoadBalancerParams(), $conf ) );
+ $lb = new LoadBalancerSingle( array_merge( $this->baseLoadBalancerParams(), $conf ) );
+ $this->initLoadBalancer( $lb );
+ $this->lb = $lb;
}
/**
}
/**
- * @param bool|string $wiki
+ * @param bool|string $domain (unused)
* @return LoadBalancerSingle
*/
- public function newMainLB( $wiki = false ) {
+ public function newMainLB( $domain = false ) {
return $this->lb;
}
/**
- * @param bool|string $wiki
+ * @param bool|string $domain (unused)
* @return LoadBalancerSingle
*/
- public function getMainLB( $wiki = false ) {
+ public function getMainLB( $domain = false ) {
return $this->lb;
}
/**
- * @param string $cluster External storage cluster, or false for core
- * @param bool|string $wiki Wiki ID, or false for the current wiki
+ * @param string $cluster External storage cluster name (unused)
* @return LoadBalancerSingle
*/
- public function newExternalLB( $cluster, $wiki = false ) {
+ public function newExternalLB( $cluster ) {
return $this->lb;
}
/**
- * @param string $cluster External storage cluster, or false for core
- * @param bool|string $wiki Wiki ID, or false for the current wiki
+ * @param string $cluster External storage cluster name (unused)
* @return LoadBalancerSingle
*/
- public function getExternalLB( $cluster, $wiki = false ) {
+ public function getExternalLB( $cluster ) {
return $this->lb;
}
return new static( [ 'connection' => $db ] + $params );
}
- /**
- *
- * @param string $server
- * @param bool $dbNameOverride
- *
- * @return IDatabase
- */
protected function reallyOpenConnection( array $server, $dbNameOverride = false ) {
return $this->db;
}
case 'array_merge_recursive':
$GLOBALS[$key] = array_merge_recursive( $GLOBALS[$key], $val );
break;
+ case 'array_replace_recursive':
+ $GLOBALS[$key] = array_replace_recursive( $GLOBALS[$key], $val );
+ break;
case 'array_plus_2d':
$GLOBALS[$key] = wfArrayPlus2d( $GLOBALS[$key], $val );
break;
// People think language codes are html safe, so enforce it.
// Ideally we should only allow a-zA-Z0-9-
// but, .+ and other chars are often used for {{int:}} hacks
- // see bugs 37564, 37587, 36938
+ // see bugs T39564, T39587, T38938
$cache[$code] =
// Protect against path traversal
strcspn( $code, ":/\\\000&<>'\"" ) === strlen( $code )
* but uses pairs of regexes and replacements instead of code.
*
* @return array[] Array of grammar transformations.
+ * @throws MWException
* @since 1.28
*/
public function getGrammarTransformations() {
"pageinfo-category-pages": "Númberu de páxines",
"pageinfo-category-subcats": "Númberu de subcategoríes",
"pageinfo-category-files": "Númberu de ficheros",
+ "pageinfo-user-id": "ID d'usuariu",
"markaspatrolleddiff": "Marcar como supervisada",
"markaspatrolledtext": "Marcar esta páxina como supervisada",
"markaspatrolledtext-file": "Marcar esta versión del ficheru como patrullada",
"Ivanhercaz",
"AlvaroMolina",
"Tokvo",
- "Irus"
+ "Irus",
+ "Sophivorus"
]
},
"tog-underline": "Subrayar los enlaces:",
"Purodha",
"Macofe",
"Adeliine",
- "Metsavend"
+ "Metsavend",
+ "Cumbril"
]
},
"tog-underline": "Linkide allakriipsutus:",
"right-managechangetags": "Koostada ja (in)aktiveerida [[Special:Tags|märgiseid]]",
"right-applychangetags": "Rakendada [[Special:Tags|märgiseid]] enda muudatuste suhtes",
"right-changetags": "Lisada ja eemaldada käsitsi rakendatavaid [[Special:Tags|märgiseid]] üksikute redaktsioonide ja logisissekannete juures",
+ "right-deletechangetags": "Kustutada andmebaasist [[Eri:Märgised|märgiseid]]",
"grant-group-page-interaction": "Interaktsioon lehekülgedega",
"grant-group-file-interaction": "Interaktsioon meediafailidega",
"grant-group-watchlist-interaction": "Interaktsioon sinu jälgimisloendiga",
"rollbacklinkcount-morethan": "$1{{PLURAL:$1|編集}}以上を巻き戻し",
"rollbackfailed": "巻き戻しに失敗しました",
"rollback-missingparam": "リクエストに必要なパラメーターが見当たりません。",
+ "rollback-missingrevision": "版の情報を読み込めませんでした。",
"cantrollback": "編集を差し戻せません。\n最後の投稿者が、このページの唯一の作者です。",
"alreadyrolled": "ページ[[:$1]]の[[User:$2|$2]] ([[User talk:$2|トーク]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]]) による編集を巻き戻せません。\n他の利用者が既に編集または巻き戻しを行ったためです。\n\nこのページの最後の編集は[[User:$3|$3]] ([[User talk:$3|トーク]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]) によるものです。",
"editcomment": "編集内容の要約: <em>$1</em>",
"pageinfo-category-pages": "ページ数",
"pageinfo-category-subcats": "下位カテゴリ数",
"pageinfo-category-files": "ファイル数",
+ "pageinfo-user-id": "利用者 ID",
"markaspatrolleddiff": "巡回済みにする",
"markaspatrolledtext": "このページを巡回済みにする",
"markaspatrolledtext-file": "このファイルの版を巡回済みにする",
"feedback-thanks": "ありがとうございます。フィードバックを「[$2 $1]」のページに投稿しました。",
"feedback-thanks-title": "お願いします!",
"feedback-useragent": "ユーザーエージェント:",
- "searchsuggest-search": "検索",
+ "searchsuggest-search": "{{SITENAME}}内を検索",
"searchsuggest-containing": "この語句を全文検索",
"api-error-autoblocked": "あなたの IP アドレスは、過去にブロックされた利用者によって使用されていたため、自動的にブロックされました。",
"api-error-badaccess-groups": "このウィキへのファイルのアップロードが許可されていません。",
"movelogpagetext": "아래는 이동된 모든 문서의 목록입니다.",
"movesubpage": "{{PLURAL:$1|하위 문서}}",
"movesubpagetext": "이 문서에는 다음 {{PLURAL:$1|하위 문서}} $1개가 있습니다.",
+ "movesubpagetalktext": "관련 토론 문서에 속한 $1개의 {{PLURAL:$1|하위 문서}}는 아래와 같습니다.",
"movenosubpage": "이 문서에는 하위 문서가 존재하지 않습니다.",
"movereason": "이유:",
"revertmove": "되돌리기",
"pageinfo-category-pages": "문서 수",
"pageinfo-category-subcats": "하위 분류 수",
"pageinfo-category-files": "파일 수",
+ "pageinfo-user-id": "사용자 ID",
"markaspatrolleddiff": "점검한 문서로 표시",
"markaspatrolledtext": "이 문서를 점검한 것으로 표시",
"markaspatrolledtext-file": "이 파일 버전을 점검한 것으로 표시",
"feedback-thanks": "Din tilbakemelding til siden \"[ $2 $1 ]\" er sendt. Takk skal du ha!",
"feedback-thanks-title": "Takk!",
"feedback-useragent": "Brukeragent",
- "searchsuggest-search": "Søk",
+ "searchsuggest-search": "Søk i {{SITENAME}}",
"searchsuggest-containing": "inneholder …",
"api-error-autoblocked": "Din IP-adresse har blitt blokkert automatisk fordi den ble brukt av en blokkert bruker.",
"api-error-badaccess-groups": "Du har ikke tillatelse til å laste opp filer til denne wikien.",
"right-purge": "Limpar a ''cache'' de uma página no servidor sem confirmação",
"right-autoconfirmed": "Não ser afetado pelos limites de frequência baseados no número de IP",
"right-bot": "Ser tratado como um processo automatizado",
- "right-nominornewtalk": "Não despoletar o aviso de mensagens novas ao fazer edições menores a páginas de discussão",
+ "right-nominornewtalk": "Não desencadear o aviso de mensagens novas ao fazer edições menores a páginas de discussão",
"right-apihighlimits": "Usar limites superiores nas consultas ''(queries)'' via API",
"right-writeapi": "Usar a API de escrita",
"right-delete": "Eliminar páginas",
"anoneditwarning": "<strong>警告:</strong>您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您<strong>[$1 登录]</strong>或<strong>[$2 创建]</strong>一个账户,您的编辑将归属于您的用户名,且将享受其他好处。",
"anonpreviewwarning": "<em>您没有登录。保存将您的IP地址记录至此页面的编辑历史中。</em>",
"missingsummary": "<strong>提示:</strong>您没有提供编辑摘要。如果您再次点击“{{int:savearticle}}”,您的编辑将不带摘要保存。",
- "selfredirect": "<strong>警告:</strong>您正在将此页面重定向至它自己。您可能指定了错误的重定向目标,或者您正在编辑错误的页面。如果您再次点击“{{int:savearticle}}”,重定向将无论如何被创建。",
+ "selfredirect": "<strong>警告:</strong>您正在将此页面重定向至它自己。您可能指定了错误的重定向目标,或者您正在编辑错误的页面。如果您再次点击“{{int:savearticle}}”,重定向仍将被创建。",
"missingcommenttext": "请在下面输入评论。",
"missingcommentheader": "<strong>提示:</strong>您还没有为此评论提供一个标题。如果您再次点击“{{int:savearticle}}”,您的编辑将不带标题保存。",
"summary-preview": "摘要预览:",
'mwtestT100767' => false,
],
],
+ [
+ 'test array_replace_recursive',
+ [
+ 'mwtestJsonConfigs' => [
+ 'JsonZeroConfig' => [
+ 'namespace' => 480,
+ 'nsName' => 'Zero',
+ 'isLocal' => false,
+ ],
+ ],
+ ],
+ [
+ 'mwtestJsonConfigs' => [
+ 'JsonZeroConfig' => [
+ 'isLocal' => false,
+ 'remote' => [
+ 'username' => 'foo',
+ ],
+ ],
+ ExtensionRegistry::MERGE_STRATEGY => 'array_replace_recursive',
+ ],
+ ],
+ [
+ 'mwtestJsonConfigs' => [
+ 'JsonZeroConfig' => [
+ 'namespace' => 480,
+ 'nsName' => 'Zero',
+ 'isLocal' => false,
+ 'remote' => [
+ 'username' => 'foo',
+ ],
+ ],
+ ],
+ ],
+ ],
];
}
}