/**
* Debugging for MediaWiki
*/
+
global $wgDevelopmentWarnings, $wgShowExceptionDetails, $wgShowHostnames,
- $wgDebugRawPage, $wgSQLMode, $wgCommandLineMode, $wgDebugLogFile,
+ $wgDebugRawPage, $wgCommandLineMode, $wgDebugLogFile,
$wgDBerrorLog, $wgDebugLogGroups;
// Use of wfWarn() should cause tests to fail
$wgShowHostnames = true;
$wgDebugRawPage = true; // T49960
-// Enable MariaDB/MySQL strict mode
-$wgSQLMode = 'TRADITIONAL';
-
// Enable log files
$logDir = getenv( 'MW_LOG_DIR' );
if ( $logDir ) {
}
unset( $logDir );
+/**
+ * Make testing possible (or easier)
+ */
+
+global $wgRateLimits;
+
// Disable rate-limiting to allow integration tests to run unthrottled
// in CI and for devs locally (T225796)
$wgRateLimits = [];
+/**
+ * Experimental changes that may later become the default.
+ * (Must reference a Phabricator ticket)
+ */
+
+global $wgSQLMode, $wgLegacyJavaScriptGlobals;
+
+// Enable MariaDB/MySQL strict mode (T108255)
+$wgSQLMode = 'TRADITIONAL';
+
// Disable legacy javascript globals in CI and for devs (T72470)
$wgLegacyJavaScriptGlobals = false;
* Definitions of the NS_ constants are in Defines.php
* @private
*/
-$wgCanonicalNamespaceNames = [
- NS_MEDIA => 'Media',
- NS_SPECIAL => 'Special',
- NS_TALK => 'Talk',
- NS_USER => 'User',
- NS_USER_TALK => 'User_talk',
- NS_PROJECT => 'Project',
- NS_PROJECT_TALK => 'Project_talk',
- NS_FILE => 'File',
- NS_FILE_TALK => 'File_talk',
- NS_MEDIAWIKI => 'MediaWiki',
- NS_MEDIAWIKI_TALK => 'MediaWiki_talk',
- NS_TEMPLATE => 'Template',
- NS_TEMPLATE_TALK => 'Template_talk',
- NS_HELP => 'Help',
- NS_HELP_TALK => 'Help_talk',
- NS_CATEGORY => 'Category',
- NS_CATEGORY_TALK => 'Category_talk',
-];
+$wgCanonicalNamespaceNames = NamespaceInfo::$canonicalNames;
/// @todo UGLY UGLY
if ( is_array( $wgExtraNamespaces ) ) {
$startOpts .= ' /*! STRAIGHT_JOIN */';
}
- if ( isset( $noKeyOptions['HIGH_PRIORITY'] ) ) {
- $startOpts .= ' HIGH_PRIORITY';
- }
-
if ( isset( $noKeyOptions['SQL_BIG_RESULT'] ) ) {
$startOpts .= ' SQL_BIG_RESULT';
}
$startOpts .= ' SQL_CALC_FOUND_ROWS';
}
- if ( isset( $noKeyOptions['SQL_CACHE'] ) ) {
- $startOpts .= ' SQL_CACHE';
- }
-
- if ( isset( $noKeyOptions['SQL_NO_CACHE'] ) ) {
- $startOpts .= ' SQL_NO_CACHE';
- }
-
if ( isset( $options['USE INDEX'] ) && is_string( $options['USE INDEX'] ) ) {
$useIndex = $this->useIndexClause( $options['USE INDEX'] );
} else {
*
* @param array $options An array of UPDATE options, can be:
* - IGNORE: Ignore unique key conflicts
- * - LOW_PRIORITY: MySQL-specific, see MySQL manual.
* @return bool
* @throws DBUnexpectedError
* @throws Exception
return "IGNORE INDEX (" . $this->indexName( $index ) . ")";
}
- /**
- * @return string
- */
- function lowPriorityOption() {
- return 'LOW_PRIORITY';
- }
-
/**
* @return string
*/
* and then the first rows are taken until the limit is reached. LIMIT
* is applied to a result set after OFFSET.
*
- * - FOR UPDATE: Boolean: lock the returned rows so that they can't be
+ * - LOCK IN SHARE MODE: Boolean: lock the returned rows so that they can't be
* changed until the next COMMIT. Cannot be used with aggregate functions
* (COUNT, MAX, etc., but also DISTINCT).
*
+ * - FOR UPDATE: Boolean: lock the returned rows so that they can't be
+ * changed nor read with LOCK IN SHARE MODE until the next COMMIT.
+ * Cannot be used with aggregate functions (COUNT, MAX, etc., but also DISTINCT).
+ *
* - DISTINCT: Boolean: return only unique result rows.
*
* - GROUP BY: May be either an SQL fragment string naming a field or
* And also the following boolean MySQL extensions, see the MySQL manual
* for documentation:
*
- * - LOCK IN SHARE MODE
* - STRAIGHT_JOIN
- * - HIGH_PRIORITY
* - SQL_BIG_RESULT
* - SQL_BUFFER_RESULT
* - SQL_SMALL_RESULT
* - SQL_CALC_FOUND_ROWS
- * - SQL_CACHE
- * - SQL_NO_CACHE
- *
*
* @param string|array $join_conds Join conditions
*
* for logging and profiling.
* @param array $options An array of UPDATE options, can be:
* - IGNORE: Ignore unique key conflicts
- * - LOW_PRIORITY: MySQL-specific, see MySQL manual.
* @return bool Return true if no exception was thrown (deprecated since 1.33)
* @throws DBError
*/
}
/**
- * Print out the various links at the bottom of the image page, e.g. reupload,
- * external editing (and instructions link) etc.
+ * Add the re-upload link (or message about not being able to re-upload) to the output.
*/
protected function uploadLinksBox() {
- global $wgEnableUploads;
-
- if ( !$wgEnableUploads ) {
+ if ( !$this->getContext()->getConfig()->get( 'EnableUploads' ) ) {
return;
}
return;
}
- $out = $this->getContext()->getOutput();
- $out->addHTML( "<ul>\n" );
-
- # "Upload a new version of this file" link
$canUpload = $this->getTitle()->quickUserCan( 'upload', $this->getContext()->getUser() );
if ( $canUpload && UploadBase::userCanReUpload(
$this->getContext()->getUser(),
$this->mPage->getFile() )
) {
+ // "Upload a new version of this file" link
$ulink = Linker::makeExternalLink(
$this->getUploadUrl(),
$this->getContext()->msg( 'uploadnewversion-linktext' )->text()
);
- $out->addHTML( "<li id=\"mw-imagepage-reupload-link\">"
- . "<div class=\"plainlinks\">{$ulink}</div></li>\n" );
+ $attrs = [ 'class' => 'plainlinks', 'id' => 'mw-imagepage-reupload-link' ];
+ $linkPara = Html::rawElement( 'p', $attrs, $ulink );
} else {
- $out->addHTML( "<li id=\"mw-imagepage-upload-disallowed\">"
- . $this->getContext()->msg( 'upload-disallowed-here' )->escaped() . "</li>\n" );
+ // "You cannot overwrite this file." message
+ $attrs = [ 'id' => 'mw-imagepage-upload-disallowed' ];
+ $msg = $this->getContext()->msg( 'upload-disallowed-here' )->text();
+ $linkPara = Html::element( 'p', $attrs, $msg );
}
- $out->addHTML( "</ul>\n" );
+ $uploadLinks = Html::rawElement( 'div', [ 'class' => 'mw-imagepage-upload-links' ], $linkPara );
+ $this->getContext()->getOutput()->addHTML( $uploadLinks );
}
/**
'type' => 'text',
'name' => 'page',
'label-message' => 'newsection-page',
+ 'required' => true,
],
], $this->getContext(), 'newsection' );
$form->setSubmitTextMsg( 'newsection-submit' );
}
public function onFormSubmit( $formData ) {
- $page = $formData['page'];
+ $title = $formData['page'];
+ $page = Title::newFromText( $title );
$query = [ 'action' => 'edit', 'section' => 'new' ];
$url = $page->getFullUrlForRedirect( $query );
$this->getOutput()->redirect( $url );
/** @var ServiceOptions */
private $options;
+ /**
+ * Definitions of the NS_ constants are in Defines.php
+ *
+ * @todo Make this const when HHVM support is dropped (T192166)
+ *
+ * @var array
+ * @internal
+ */
+ public static $canonicalNames = [
+ NS_MEDIA => 'Media',
+ NS_SPECIAL => 'Special',
+ NS_TALK => 'Talk',
+ NS_USER => 'User',
+ NS_USER_TALK => 'User_talk',
+ NS_PROJECT => 'Project',
+ NS_PROJECT_TALK => 'Project_talk',
+ NS_FILE => 'File',
+ NS_FILE_TALK => 'File_talk',
+ NS_MEDIAWIKI => 'MediaWiki',
+ NS_MEDIAWIKI_TALK => 'MediaWiki_talk',
+ NS_TEMPLATE => 'Template',
+ NS_TEMPLATE_TALK => 'Template_talk',
+ NS_HELP => 'Help',
+ NS_HELP_TALK => 'Help_talk',
+ NS_CATEGORY => 'Category',
+ NS_CATEGORY_TALK => 'Category_talk',
+ ];
+
/**
* TODO Make this const when HHVM support is dropped (T192166)
*
return 'page';
}
}
+
+ /**
+ * Retrieve the indexes for the namespaces defined by core.
+ *
+ * @since 1.34
+ *
+ * @return int[]
+ */
+ public static function getCommonNamespaces() {
+ return array_keys( self::$canonicalNames );
+ }
}
"databaseerror": "حطا دیتابیس",
"databaseerror-text": "یک ارورء مان دیتابیسء شوهازیگء ودی بیت. هنچوش بیتء کنت ائ یک نکسء مان سفتورء هن پیداگ بکنت انت.",
"databaseerror-textcl": "یک ارورء مان دیتابیسء شوهازیگء پیداگ بوت.",
- "databaseerror-query": "شوهاز: $1",
+ "databaseerror-query": "پٹ ءُ پۏل: $1",
"databaseerror-function": "Function: $1",
"databaseerror-error": "ارور: $1",
"laggedslavemode": "هوژاری: صفحه شاید نوکین په روچ بییگان داشته می بیت",
"shown-title": "پیش دار $1 {{PLURAL:$1|نتیجه|نتیجه}} ته هر صفحه",
"viewprevnext": "($1 {{int:pipe-separator}} $2) ($3) دیدگ",
"searchmenu-exists": "'''صفحه گون نام \"[[$1]]\" ته ای ویکی نیستن'''",
- "searchmenu-new": "<strong>ائ تاکء اڈ کتن «[[:$1]]» مان ائ ویکی!</strong> {{PLURAL:$2|0=|ءُ هنچوش شمئی ودیگ بیتگین تاک گون شمئی شوهاز.|هنچوش شمئی شوهازء آسر.}}",
+ "searchmenu-new": "<strong>اے تاکء جۏڑݔنگ«[[:$1]]» مہ اے ویکیئا!</strong> {{PLURAL:$2|0=|ءُ هنچۏش شمئی درگپتگݔـں تاک گۏں شمئی شۏھازا.|هنچۏش شمئی شۏھاز.}}",
"searchprofile-articles": "صفحات محتوا",
"searchprofile-images": "ملتیمدیا",
"searchprofile-everything": "هر چیز",
"timezoneregion-indian": "اقیانوس هند",
"timezoneregion-pacific": "اقیانوس آرام",
"allowemail": "فعال کن ایمیل چه دگه کابران",
- "prefs-searchoptions": "شوهاز",
+ "prefs-searchoptions": "شۏھاز",
"prefs-namespaces": "نام فصا",
"default": "پیش فرض",
"prefs-files": "فایلان",
"usereditcount": "$1 {{PLURAL:$1|اصلاح|اصلاحات}}",
"usercreated": "شربوتگ $1 ته $2",
"newpages": "نوکین صفحات",
- "newpages-username": "نام کاربری:",
+ "newpages-username": "کارزورۏکی نام:",
"ancientpages": "صفحات قدیمی",
"move": "جاه په جاه",
"movethispage": "ای صفحه جاه په جاه کن",
"blockedtext-composite": "<strong>Tu nombre de usuario o dirección IP han sido bloqueados.</strong>\n\nLa razón es:\n\n:<em>$2</em>.\n\n* Inicio del bloqueo: $8\n* Vencimiento del bloqueo más largo: $6\n\n* $5\n\nTu dirección IP actual es $3.\nPor favor, incluye todos los detalles anteriores en cualquier consulta que realices.",
"blockedtext-composite-ids": "Identificadores de bloqueo relevantes: $1 (tu dirección IP puede encontrarse también en alguna lista negra)",
"blockedtext-composite-no-ids": "Tu dirección IP figura en varias listas negras",
- "blockedtext-composite-reason": "Existen múltiples bloqueos contra tu cuenta y/o dirección IP",
+ "blockedtext-composite-reason": "Existen varios bloqueos contra tu cuenta o dirección IP",
"whitelistedittext": "Tienes que $1 para editar páginas.",
"confirmedittext": "Debes confirmar tu dirección de correo electrónico antes de poder editar páginas. Por favor, configura y confirma tu dirección de correo a través de tus [[Special:Preferences|preferencias de usuario]].",
"nosuchsectiontitle": "Sección no encontrada",
"Ukabia",
"아라",
"Uzoma Ozurumba",
- "Oby Ezeilo"
+ "Oby Ezeilo",
+ "Amire80"
]
},
"tog-underline": "Ahịrịàlà òjikọ:",
"copyright": "Ihe di ime nọr okpúrụ $1",
"copyrightpage": "{{ns:project}}:Iwu maka ijë ihe",
"currentevents": "Ihe ne me ubuwá",
- "currentevents-url": "Project:I ne me ubüwá",
+ "currentevents-url": "Project:Ihe ne me ubwá",
"disclaimers": "Ńwepụ̀aka",
"disclaimerpage": "Project:Ihe I kweshiri ma",
"edithelp": "Inyetuáká I rüwa",
"navigation-heading": "បញ្ជីណែនាំ",
"errorpagetitle": "មានបញ្ហា",
"returnto": "ត្រឡប់ទៅ $1 វិញ ។",
- "tagline": "á\9e\8aá\9f\84á\9e\99{{SITENAME}}",
+ "tagline": "á\9e\96á\9e¸{{SITENAME}}",
"help": "ជំនួយ",
"search": "ស្វែងរក",
"searchbutton": "ស្វែងរក",
"redirectedfrom": "(ត្រូវបានបញ្ជូនបន្តពី $1)",
"redirectpagesub": "ទំព័របញ្ជូនបន្ត",
"redirectto": "បញ្ជូនបន្តទៅ៖",
- "lastmodifiedat": "ទំព័រនេះត្រូវបានកែចុងក្រោយនៅ$2 $1។",
+ "lastmodifiedat": "ទំព័រនេះត្រូវបានកែចុងក្រោយនៅម៉ោង$2 $1។",
"viewcount": "ទំព័រនេះត្រូវបានចូលមើលចំនួន'''{{PLURAL:$1|ម្ដង|$1ដង}}'''",
"protectedpage": "ទំព័រដែលត្រូវបានការពារ",
"jumpto": "លោតទៅ៖",
"recentchanges-notargetpage": "វាយបញ្ចូលចំណងជើងទំព័រមួយខាងលើដើម្បីមើលបន្លាស់ប្ដូរដែលទាក់ទិននឹងទំព័រនោះ។",
"recentchanges-feed-description": "តាមដានបន្លាស់ប្ដូរថ្មីៗបំផុតនៃវិគីនេះក្នុងមតិព័ត៌មាននេះ។",
"recentchanges-label-newpage": "ការកែប្រែនេះបានបង្កើតទំព័រថ្មីមួយ",
- "recentchanges-label-minor": "á\9e\93á\9f\81á\9f\87á\9e\87á\9e¶á\9e\80á\9e¶á\9e\9aá\9e\80á\9f\82á\9e\94á\9f\92á\9e\9aá\9f\82á\9e\8fá\9e·á\9e\85á\9e\8fá\9e½á\9e\85á\9e\98á\9e½á\9e\99ប៉ុណ្ណោះ",
+ "recentchanges-label-minor": "á\9e\93á\9f\81á\9f\87á\9e\87á\9e¶á\9e\80á\9f\86á\9e\8eá\9f\82á\9e\94á\9f\92á\9e\9aá\9f\82á\9e\8fá\9e·á\9e\85á\9e\8fá\9e½á\9e\85ប៉ុណ្ណោះ",
"recentchanges-label-bot": "ការកែប្រែនេះត្រូវបានធ្វើឡើងដោយរូបយន្ត",
"recentchanges-label-unpatrolled": "ការកែប្រែនេះមិនទាន់ត្រូវបានល្បាតទេ",
"recentchanges-label-plusminus": "ទំហំទំព័រត្រូវបានផ្លាស់ប្ដូរគិតជាចំនួនបៃ",
"hide": "លាក់",
"show": "បង្ហាញ",
"minoreditletter": "ត",
- "newpageletter": "ថ្មី",
+ "newpageletter": "ថ",
"boteditletter": "យ",
"rc-change-size": "$1",
"rc-change-size-new": "$1 {{PLURAL:$1|បៃ|បៃ}} បន្ទាប់ពីបន្លាស់ប្ដូរ",
"undelete-show-file-confirm": "តើអ្នកប្រាកដហើយថាអ្នកពិតជាចង់មើលកំណែដែលត្រូវបានលុបចោលរបស់ឯកសារ \"<nowiki>$1</nowiki>\" ពីថ្ងៃ $2 ម៉ោង $3?",
"undelete-show-file-submit": "បាទ/ចាស៎",
"namespace": "លំហឈ្មោះ:",
- "invert": "á\9e\80á\9f\92á\9e\9aá\9f\85á\9e\96á\9e¸á\9e\93á\9f\84á\9f\87",
+ "invert": "á\9e\94á\9e\89á\9f\92á\9e\85á\9f\92á\9e\9aá\9e¶á\9e\9fâ\80\8bá\9e\87á\9e\98á\9f\92á\9e\9aá\9e¾á\9e\9f",
"tooltip-invert": "គូសធីកប្រអប់នេះដើម្បីលាក់បន្លាស់ប្ដូរទំព័រដែលស្ថិតនៅក្នុងលំហឈ្មោះដែលបានជ្រើសយក (និងលំហឈ្មោះដែលទាក់ទិន ប្រសិនបើគូសធីក)",
"namespace_association": "លំហឈ្មោះដែលទាក់ទិន",
"tooltip-namespace_association": "គូសធីកប្រអប់នេះដើម្បីដាក់លំហឈ្មោះការពិភាក្សានិងប្រធានបទភ្ជាប់ទាក់ទិនទៅលំហឈ្មោះដែលបានជ្រើសយក",
"tooltip-p-logo": "ទំព័រដើម",
"tooltip-n-mainpage": "ចូលមើលទំព័រដើម",
"tooltip-n-mainpage-description": "ចូលមើលទំព័រដើម",
- "tooltip-n-portal": "á\9e¢á\9f\86á\9e\96á\9e¸á\9e\82á\9e\98á\9f\92á\9e\9aá\9f\84á\9e\84 á\9e\9cá\9e·á\9e\92á\9e¸á\9e\94á\9f\92á\9e\9aá\9e¾á\9e\94á\9f\92á\9e\9aá\9e¶á\9e\9fá\9f\8b á\9e\93á\9e·á\9e\84á\9e\80á\9e¶á\9e\9aស្វែងរកព័ត៌មាន",
+ "tooltip-n-portal": "á\9e¢á\9f\86á\9e\96á\9e¸á\9e\82á\9e\98á\9f\92á\9e\9aá\9f\84á\9e\84 á\9e¢á\9f\92á\9e\9cá\9e¸á\9e\8aá\9f\82á\9e\9bá\9e¢á\9f\92á\9e\93á\9e\80á\9e¢á\9e¶á\9e\85á\9e\92á\9f\92á\9e\9cá\9e¾á\9e\94á\9e¶á\9e\93 á\9e\93á\9e·á\9e\84á\9e\80á\9e\93á\9f\92á\9e\9bá\9f\82á\9e\84ស្វែងរកព័ត៌មាន",
"tooltip-n-currentevents": "រកមើលព័ត៌មានទាក់ទិននឹងព្រឹត្តិការណ៍បច្ចុប្បន្ន",
"tooltip-n-recentchanges": "បញ្ជីបន្លាស់ប្ដូរថ្មីៗនៅក្នុងវិគីនេះ",
"tooltip-n-randompage": "ផ្ទុកទំព័រចៃដន្យមួយទំព័រ",
"tooltip-n-help": "ជំនួយបន្ថែម",
- "tooltip-t-whatlinkshere": "á\9e\94á\9e\89á\9f\92á\9e\87á\9e¸â\80\8bá\9e\91á\9f\86á\9e\96á\9f\90á\9e\9cá\9e·á\9e\82á\9e¸â\80\8bá\9e\91á\9e¶á\9f\86á\9e\84á\9e¢á\9e\9fá\9f\8bâ\80\8bá\9e\8aá\9f\82á\9e\9bá\9e\8fá\9e\97á\9f\92á\9e\87á\9e¶á\9e\94á\9f\8bâ\80\8bá\9e\93á\9e¹á\9e\84ទីនេះ",
+ "tooltip-t-whatlinkshere": "á\9e\94á\9e\89á\9f\92á\9e\87á\9e¸â\80\8bá\9e\91á\9f\86á\9e\96á\9f\90á\9e\9cá\9e·á\9e\82á\9e¸â\80\8bá\9e\91á\9e¶á\9f\86á\9e\84á\9e¢á\9e\9fá\9f\8bâ\80\8bá\9e\8aá\9f\82á\9e\9bá\9e\97á\9f\92á\9e\87á\9e¶á\9e\94á\9f\8bâ\80\8bá\9e\98á\9e\80ទីនេះ",
"tooltip-t-recentchangeslinked": "បន្លាស់ប្ដូរថ្មីៗក្នុងទំព័រដែលត្រូវបានភ្ជាប់មកទំព័រនេះ",
"tooltip-feed-rss": "បម្រែបម្រួល RSS ចំពោះទំព័រនេះ",
"tooltip-feed-atom": "បម្រែបម្រួល Atom ចំពោះទំព័រនេះ",