lhc/web/wiklou.git
5 years agoUpdate wikimedia/scoped-callback to 3.0.0
Kunal Mehta [Fri, 2 Nov 2018 00:16:27 +0000 (17:16 -0700)]
Update wikimedia/scoped-callback to 3.0.0

Depends-On: Idf3ee1f785104257dec8c6bfead821244184b126
Change-Id: I005575a341d4eda4595dc36537c4f2996e32eb45

5 years agoUpgrade wikimedia/xmp-reader to 0.6.1
Kunal Mehta [Fri, 2 Nov 2018 00:13:15 +0000 (17:13 -0700)]
Upgrade wikimedia/xmp-reader to 0.6.1

Depends-On: I3eba0c81aed14f1087c46fb11088412cad5a505f
Change-Id: I215ab354b39a276aefc54fabad4e3ddcd792a796

5 years agoReplace deprecated call to OutputPage::parse() in HTMLForm
C. Scott Ananian [Thu, 1 Nov 2018 21:26:10 +0000 (17:26 -0400)]
Replace deprecated call to OutputPage::parse() in HTMLForm

Use OutputPage::parseAsInterface() to tidy the output and make the
selection of user interface language explicit.

Follow-up to Ifeb1ca6eb8b5c743421b8f9e329f1e3658050e47.

Bug: T198214
Change-Id: Ia4b63715380d97ccb3133bf39a260834c20b4f5a

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 1 Nov 2018 21:02:14 +0000 (22:02 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ibbaeb400c9e5a1c744d8690cccc56d8d2fb9d0cf

5 years agoBlockRestriction::update() unnecessarily does a SELECT on the page table.
David Barratt [Thu, 1 Nov 2018 19:37:46 +0000 (15:37 -0400)]
BlockRestriction::update() unnecessarily does a SELECT on the page table.

This unnecessary SELECT causes a performence issue where it takes an
exceedingly long time to perform an update.

Bug: T208526
Change-Id: I0238234146fc838067019351ea97046a7d37d6fc

5 years agoMerge "Only expand `{{...}}` in messages once (part 2)"
jenkins-bot [Thu, 1 Nov 2018 17:20:51 +0000 (17:20 +0000)]
Merge "Only expand `{{...}}` in messages once (part 2)"

5 years agoMerge "Replace deprecated calls to OutputPage::parse()"
jenkins-bot [Thu, 1 Nov 2018 17:20:45 +0000 (17:20 +0000)]
Merge "Replace deprecated calls to OutputPage::parse()"

5 years agoMerge "Use Html:rawElement() where possible in special pages."
jenkins-bot [Thu, 1 Nov 2018 17:20:12 +0000 (17:20 +0000)]
Merge "Use Html:rawElement() where possible in special pages."

5 years agoMerge "RollbackAction/SpecialUndelete: Use OutputPage::addWikiMsg() where possible"
jenkins-bot [Thu, 1 Nov 2018 17:14:53 +0000 (17:14 +0000)]
Merge "RollbackAction/SpecialUndelete: Use OutputPage::addWikiMsg() where possible"

5 years agoFix undefined NS with @covers tags in /includes/auth/
Alangi Derick [Thu, 1 Nov 2018 11:48:52 +0000 (12:48 +0100)]
Fix undefined NS with @covers tags in /includes/auth/

Should MW Codesniffer also handle these as well?

Change-Id: Ieb493bddd5f3674fb889b4a780d51b50d89c4f65

5 years agoMerge "Add docstrings for text search index field types"
jenkins-bot [Thu, 1 Nov 2018 10:21:55 +0000 (10:21 +0000)]
Merge "Add docstrings for text search index field types"

5 years agoMerge "Add langauge 'kjp' Eastern Pwo"
jenkins-bot [Thu, 1 Nov 2018 10:21:49 +0000 (10:21 +0000)]
Merge "Add langauge 'kjp' Eastern Pwo"

5 years agoMerge "Recognize CSS/JS redirects with non-ASCII targets"
jenkins-bot [Thu, 1 Nov 2018 06:38:43 +0000 (06:38 +0000)]
Merge "Recognize CSS/JS redirects with non-ASCII targets"

5 years agoMerge "Improve some queries ordering by rev_timestamp with actor migration READ_NEW"
jenkins-bot [Thu, 1 Nov 2018 06:28:26 +0000 (06:28 +0000)]
Merge "Improve some queries ordering by rev_timestamp with actor migration READ_NEW"

5 years agoRecognize CSS/JS redirects with non-ASCII targets
Kunal Mehta [Tue, 30 Oct 2018 02:30:59 +0000 (19:30 -0700)]
Recognize CSS/JS redirects with non-ASCII targets

The regex in JavaScriptContent and CssContent was trying to pass
urlencoded stuff to Title::newFromText(), which would fail. Make sure we
urldecode it first.

Bug: T208264
Change-Id: I189c4c308da2875839ad8c1061332500f0e6d244

5 years agoMerge "Diff and history link separated via CSS"
jenkins-bot [Thu, 1 Nov 2018 04:04:46 +0000 (04:04 +0000)]
Merge "Diff and history link separated via CSS"

5 years agoMerge "Fix IP handling in DerivativeRequest"
jenkins-bot [Thu, 1 Nov 2018 04:00:29 +0000 (04:00 +0000)]
Merge "Fix IP handling in DerivativeRequest"

5 years agoMerge "Pass $context to 'GetPreferences' hook"
jenkins-bot [Thu, 1 Nov 2018 04:00:23 +0000 (04:00 +0000)]
Merge "Pass $context to 'GetPreferences' hook"

5 years agoMerge "Update OOUI to v0.29.3"
jenkins-bot [Thu, 1 Nov 2018 03:59:21 +0000 (03:59 +0000)]
Merge "Update OOUI to v0.29.3"

5 years agoFix IP handling in DerivativeRequest
Gergő Tisza [Tue, 30 Oct 2018 05:32:13 +0000 (22:32 -0700)]
Fix IP handling in DerivativeRequest

$r->getIP() should return what was set by $r->setIP(); currently
that breaks for DerivativeRequest as get reads from the base but
set writes on the derivative.

Change-Id: If30c233931ceb1ca05da8866da3c3ab78de1a339

5 years agoUpdate OOUI to v0.29.3
Volker E [Thu, 1 Nov 2018 02:57:41 +0000 (19:57 -0700)]
Update OOUI to v0.29.3

Release notes:
 https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.29.3

Bug: T94749
Bug: T112982
Bug: T179755
Bug: T206925
Bug: T206211
Bug: T206768
Bug: T207728
Bug: T207905
Bug: T207917
Depends-on: I4c090cff7b1ec1dbaeefd9d1ed7f9d9ebd8092f5
Change-Id: I9106e927f1b4fd07006df1e3c9d8ef9832cf919d

5 years agoMerge "Fix for missing end tag </page> on some exports"
jenkins-bot [Thu, 1 Nov 2018 03:03:24 +0000 (03:03 +0000)]
Merge "Fix for missing end tag </page> on some exports"

5 years agoAdd docstrings for text search index field types
Adam Wight [Thu, 25 Oct 2018 21:57:01 +0000 (14:57 -0700)]
Add docstrings for text search index field types

Change-Id: Icd34ec79db4d8fd024a82045aaa9bedb6556caa8

5 years agoFix for missing end tag </page> on some exports
Bill Pirkle [Wed, 31 Oct 2018 23:02:02 +0000 (18:02 -0500)]
Fix for missing end tag </page> on some exports

T203424 replaced streaming mode with batched queries.
However, it did not properly handle some values of
the $wgExportMaxHistory config variable, and emitted
broken XML. This change fixes that issue.

Bug: T207974
Change-Id: Iade3fc603e513da51b7a970c16275516c02ede49

5 years agoMerge "User: Don't fail mysteriously when passing a User object to idFromName()"
jenkins-bot [Wed, 31 Oct 2018 23:01:14 +0000 (23:01 +0000)]
Merge "User: Don't fail mysteriously when passing a User object to idFromName()"

5 years agoUser: Don't fail mysteriously when passing a User object to idFromName()
Roan Kattouw [Wed, 31 Oct 2018 22:38:07 +0000 (15:38 -0700)]
User: Don't fail mysteriously when passing a User object to idFromName()

If $name is a User object, some code magically works because the object
gets converted to a string, but other code blows up because objects
aren't valid array keys. Prevent this from happening by explicitly
forcing $name to be a string.

Bug: T208469
Change-Id: Icc9ebec93d18609605e2633ccd23b90478e05e51

5 years agoDoc: add missed return type to Title::getEarliestRevTime()
Stephen Niedzielski [Mon, 22 Oct 2018 15:36:47 +0000 (09:36 -0600)]
Doc: add missed return type to Title::getEarliestRevTime()

Change-Id: I98faa04fb9a4710daffa3c55ba3f61df0e12d71b

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 31 Oct 2018 20:56:39 +0000 (21:56 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I12e9cbefff0b52f7086402f42cbcc5389d692cf9

5 years agoMerge "DatabaseSqlite::insert: Fix affected row count"
jenkins-bot [Wed, 31 Oct 2018 19:37:23 +0000 (19:37 +0000)]
Merge "DatabaseSqlite::insert: Fix affected row count"

5 years agoDatabaseSqlite::insert: Fix affected row count
Marius Hoch [Wed, 31 Oct 2018 15:32:46 +0000 (16:32 +0100)]
DatabaseSqlite::insert: Fix affected row count

Follow up to 633eb437a3b808518469c6eaf4e86a436941d837

Bug: T208331
Change-Id: I142bb8c8abd43242d098932da212aa58323a0863

5 years agoMerge "Follow-up d67121f6d: Blocks can apply to non-User objects too"
jenkins-bot [Wed, 31 Oct 2018 16:10:59 +0000 (16:10 +0000)]
Merge "Follow-up d67121f6d: Blocks can apply to non-User objects too"

5 years agoFollow-up d67121f6d: Blocks can apply to non-User objects too
James D. Forrester [Wed, 31 Oct 2018 15:50:46 +0000 (08:50 -0700)]
Follow-up d67121f6d: Blocks can apply to non-User objects too

Bug: T208398
Change-Id: I1d39f4ff709f37e7047f49964101e83c97cda0e9

5 years agoUse identical check instead of equality check
Alangi Derick [Wed, 31 Oct 2018 12:22:58 +0000 (13:22 +0100)]
Use identical check instead of equality check

$user->getId() returns an int and it's strict on this,
so the check here should be an identical check as "=="
does unnecessary coercion. So "===" will be faster and
improves on speed/performance.

Change-Id: I28a4e86ab339f10251df8846b8d951b673fe4f9e

5 years agoDisplay SVGs in target language
Max Semenik [Sat, 6 Oct 2018 00:56:53 +0000 (17:56 -0700)]
Display SVGs in target language

Previously, they were always displayed in defult language unless
forced explicitly in wikitext, e.g. [[File:Foo.svg|lang=ru]].
This change adds a feature flag that would enable always trying to
display in page language.

* If enabled, Parser will pass a new parameter - 'pagelang' - to
  the media handler.
* SvgHandler uses page language when determining what language to
  render the image in.
* 'pagelang' can always be overridden by 'lang'.
* If no translation in page language is available, the default
  language (English) will be used for thumbnail URLs, to prevent
  cluttering media storage and HTTP caches with useless copies.

Performance: this requires accessing image's metadata during parsing.
My testing indicates there were no code path where this wasn't the
case already, so no performance hit is expected, however we should
still keep an eye on page save performance.

Bug: T205040
Change-Id: I348840ef405e1370cc0c17d69051bce30153c9c0

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 30 Oct 2018 21:08:45 +0000 (22:08 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I7f4659b873f1b238b90bcd59ce9e97ee48990b44

5 years agoFollow-up dcf3eb79: Drop tabs.legacy.js file, unused
James D. Forrester [Tue, 30 Oct 2018 20:18:49 +0000 (13:18 -0700)]
Follow-up dcf3eb79: Drop tabs.legacy.js file, unused

Change-Id: Ifbed79f8be978729fdedef7fce7c72ee20d63087

5 years agomediawiki.special.preferences/tabs.legacy.js: Drop old `jsprefs` class, unused
James D. Forrester [Tue, 30 Oct 2018 19:13:04 +0000 (12:13 -0700)]
mediawiki.special.preferences/tabs.legacy.js: Drop old `jsprefs` class, unused

Change-Id: I91c3069c7588fe9a77af169bab07ae296bccd2e2

5 years agoMerge "Drop the LanguageGetSpecialPageAliases and LanguageGetMagic hooks"
jenkins-bot [Tue, 30 Oct 2018 18:24:45 +0000 (18:24 +0000)]
Merge "Drop the LanguageGetSpecialPageAliases and LanguageGetMagic hooks"

5 years agoMerge "resources: Drop jquery.localize, deprecated in 1.32"
jenkins-bot [Tue, 30 Oct 2018 17:42:58 +0000 (17:42 +0000)]
Merge "resources: Drop jquery.localize, deprecated in 1.32"

5 years agoMerge "Drop six authentication-related hooks, deprecated in 1.27"
jenkins-bot [Tue, 30 Oct 2018 16:28:15 +0000 (16:28 +0000)]
Merge "Drop six authentication-related hooks, deprecated in 1.27"

5 years agoMerge "Remove use of old API doc methods"
jenkins-bot [Tue, 30 Oct 2018 16:20:15 +0000 (16:20 +0000)]
Merge "Remove use of old API doc methods"

5 years agoMerge "Use WikiMap methods for wiki ID logic in more places"
jenkins-bot [Tue, 30 Oct 2018 07:20:29 +0000 (07:20 +0000)]
Merge "Use WikiMap methods for wiki ID logic in more places"

5 years agoMerge "Set the SaveParser logger in RevisionRenderer"
jenkins-bot [Tue, 30 Oct 2018 07:12:19 +0000 (07:12 +0000)]
Merge "Set the SaveParser logger in RevisionRenderer"

5 years agoMerge "rdbms: clean up return values of IDatabase write methods"
jenkins-bot [Tue, 30 Oct 2018 07:12:14 +0000 (07:12 +0000)]
Merge "rdbms: clean up return values of IDatabase write methods"

5 years agoMerge "Use new WikiMap::getCurrentWikiDomain() for objectcache and profiler keyspace"
jenkins-bot [Tue, 30 Oct 2018 07:08:27 +0000 (07:08 +0000)]
Merge "Use new WikiMap::getCurrentWikiDomain() for objectcache and profiler keyspace"

5 years agoUse new WikiMap::getCurrentWikiDomain() for objectcache and profiler keyspace
Aaron Schulz [Tue, 16 Oct 2018 03:00:06 +0000 (20:00 -0700)]
Use new WikiMap::getCurrentWikiDomain() for objectcache and profiler keyspace

Change-Id: I0e77c58a55b7ce908ec1d6399ec6629d00a48953

5 years agoMerge "debug: Allow the DBQuery channel to be used"
jenkins-bot [Tue, 30 Oct 2018 04:34:20 +0000 (04:34 +0000)]
Merge "debug: Allow the DBQuery channel to be used"

5 years agoSet the SaveParser logger in RevisionRenderer
Aaron Schulz [Mon, 29 Oct 2018 22:48:22 +0000 (15:48 -0700)]
Set the SaveParser logger in RevisionRenderer

Change-Id: Iacc28ce583fed8cf2a7f7b931754c64619cb4917

5 years agordbms: clean up return values of IDatabase write methods
Aaron Schulz [Fri, 26 Oct 2018 20:17:34 +0000 (13:17 -0700)]
rdbms: clean up return values of IDatabase write methods

Also improved the atomicity and affected row count logic for
insert/replace with sqlite.

Also remove unused "fileHandle" code from insert().

Change-Id: If7b9148fd44f3a958899885753c7c86ba66bf193

5 years agoMerge "Use WikiMap methods in ClassicInterwikiLookup instead of wfWikiId()"
jenkins-bot [Tue, 30 Oct 2018 00:22:38 +0000 (00:22 +0000)]
Merge "Use WikiMap methods in ClassicInterwikiLookup instead of wfWikiId()"

5 years agoMerge "Add isCurrentWikiId()/isCurrentWikiDomain()/getCurrentWikiDomain() to WikiMap"
jenkins-bot [Mon, 29 Oct 2018 22:27:15 +0000 (22:27 +0000)]
Merge "Add isCurrentWikiId()/isCurrentWikiDomain()/getCurrentWikiDomain() to WikiMap"

5 years agoDrop the LanguageGetSpecialPageAliases and LanguageGetMagic hooks
James D. Forrester [Mon, 11 Jun 2018 23:50:41 +0000 (16:50 -0700)]
Drop the LanguageGetSpecialPageAliases and LanguageGetMagic hooks

Deprecated since 1.16 and unused in known git.

Bug: T199291
Change-Id: Idcaf1b2c24c64653f700be4fe810ed124ba4ab7c

5 years agoresources: Drop jquery.localize, deprecated in 1.32
James D. Forrester [Wed, 29 Aug 2018 23:34:24 +0000 (16:34 -0700)]
resources: Drop jquery.localize, deprecated in 1.32

Change-Id: Iaab8637cd336ab47c789ebcf1d0610695555095f

5 years agoDrop six authentication-related hooks, deprecated in 1.27
James D. Forrester [Thu, 13 Sep 2018 22:20:11 +0000 (15:20 -0700)]
Drop six authentication-related hooks, deprecated in 1.27

AbortAutoAccount, AbortNewAccount, AbortLogin, LoginUserMigrated,
UserCreateForm, and UserLoginForm are all unused in Wikimedia
production and rare in other extensions.

This also scraps the FakeAuthTemplate and LoginForm classes and
the occasional remainig references thereto.

Bug: T193755
Change-Id: I24d6fa963f402d4311fa00fc11536a37ee3bd31e

5 years agoUse WikiMap methods for wiki ID logic in more places
Aaron Schulz [Sun, 21 Oct 2018 07:09:07 +0000 (00:09 -0700)]
Use WikiMap methods for wiki ID logic in more places

Change-Id: I25b53576a8fecb7cfb0e4d684f064bebf6c968fc

5 years agoUse WikiMap methods in ClassicInterwikiLookup instead of wfWikiId()
Aaron Schulz [Sun, 21 Oct 2018 07:02:11 +0000 (00:02 -0700)]
Use WikiMap methods in ClassicInterwikiLookup instead of wfWikiId()

Change-Id: Ia3d843c79fa31fec59a04b92f4619458ae06de62

5 years agoRemove use of old API doc methods
Brad Jorsch [Wed, 10 Oct 2018 17:14:13 +0000 (13:14 -0400)]
Remove use of old API doc methods

The following deprecated methods, intended for overriding by extensions,
are no longer called and are hard deprecated.

* ApiBase::getDescription() (deprecated in 1.25)
* ApiBase::getParamDescription() (deprecated in 1.25)
* ApiBase::getExamples() (deprecated in 1.25)
* ApiBase::getDescriptionMessage() (deprecated in 1.30)

Also, the 'APIGetDescription' and 'APIGetParamDescription' hooks have
been removed, as their only use was to allow extensions to override
values returned by getDescription() and getParamDescription(),
respectively.

Change-Id: I486c4ccab4eca6a85cb17c30dbb2439876123ba1

5 years agoAdd isCurrentWikiId()/isCurrentWikiDomain()/getCurrentWikiDomain() to WikiMap
Aaron Schulz [Tue, 16 Oct 2018 02:18:16 +0000 (19:18 -0700)]
Add isCurrentWikiId()/isCurrentWikiDomain()/getCurrentWikiDomain() to WikiMap

Use these in place of various wfWikiID() calls.

Also cleanup UserRightsProxy wiki ID variable names and removed unused
and poorly named getDBname() method.

Change-Id: Ib28889663989382d845511f8d34712b08317f60e

5 years agoMerge "Parser: Remove markNoConversion for displaytitle error message"
jenkins-bot [Mon, 29 Oct 2018 21:42:40 +0000 (21:42 +0000)]
Merge "Parser: Remove markNoConversion for displaytitle error message"

5 years agoMerge "Localisation updates from https://translatewiki.net."
jenkins-bot [Mon, 29 Oct 2018 21:19:20 +0000 (21:19 +0000)]
Merge "Localisation updates from https://translatewiki.net."

5 years agoMerge "Hard deprecate $wgTidyConfig['driver'] = 'disabled'"
jenkins-bot [Mon, 29 Oct 2018 20:59:59 +0000 (20:59 +0000)]
Merge "Hard deprecate $wgTidyConfig['driver'] = 'disabled'"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 29 Oct 2018 20:53:51 +0000 (21:53 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ibbc40ff8c5e87f4450088ff9b5055f4c6b1738d0

5 years agoMerge "Replace deprecated calls to OutputPage::parseInline()"
jenkins-bot [Mon, 29 Oct 2018 20:39:31 +0000 (20:39 +0000)]
Merge "Replace deprecated calls to OutputPage::parseInline()"

5 years agoMerge "Change ParserOptions `tidy` default to `true`"
jenkins-bot [Mon, 29 Oct 2018 20:38:22 +0000 (20:38 +0000)]
Merge "Change ParserOptions `tidy` default to `true`"

5 years agoMerge "Deprecate OutputPage::parse() and OutputPage::parseInline()"
jenkins-bot [Mon, 29 Oct 2018 20:34:30 +0000 (20:34 +0000)]
Merge "Deprecate OutputPage::parse() and OutputPage::parseInline()"

5 years agoParser: Remove markNoConversion for displaytitle error message
Fomafix [Mon, 29 Oct 2018 20:11:54 +0000 (21:11 +0100)]
Parser: Remove markNoConversion for displaytitle error message

bacd87e49 moved the displaytitle error message from the content to
outside of the content. Only the content is converted by the language
conversion. The error message outside of the content is not converted.
Therefor markNoConversion is not needed here anymore.

This change removes the -{R|...}- around the displaytitle in the error
message when the language converter is active.

Bug: T208249
Change-Id: Ieec43e9af045d19b0b7a82afb889e076b347eed1

5 years agoMerge "Use PHP 7 '??' operator instead of if-then-else"
jenkins-bot [Mon, 29 Oct 2018 19:55:45 +0000 (19:55 +0000)]
Merge "Use PHP 7 '??' operator instead of if-then-else"

5 years agoChange ParserOptions `tidy` default to `true`
C. Scott Ananian [Thu, 20 Sep 2018 21:16:16 +0000 (17:16 -0400)]
Change ParserOptions `tidy` default to `true`

We are deprecating the non-tidy modes of the parser.

ParserOptions::getCanonicalOverrides() has always set `tidy` to `true` at
any rate, so this isn't going to invalidate any parser cache entries.

Change-Id: Ib703a041edf8a8d57e94f136965f72d9bbfcf222

5 years agoReplace deprecated calls to OutputPage::parse()
C. Scott Ananian [Fri, 26 Oct 2018 16:55:52 +0000 (12:55 -0400)]
Replace deprecated calls to OutputPage::parse()

Use OutputPage::parseAsInterface() to tidy the output and make the
selection of user interface language explicit.

Bug: T198214
Change-Id: Ifeb1ca6eb8b5c743421b8f9e329f1e3658050e47

5 years agoReplace deprecated calls to OutputPage::parseInline()
C. Scott Ananian [Fri, 26 Oct 2018 15:39:07 +0000 (11:39 -0400)]
Replace deprecated calls to OutputPage::parseInline()

Every one of these seemed to previously use the wrong value for
`$interface` -- the interface messages in ProtectionForm and
SpecialVersion were being parsed as content language (which is the
default for `OutputPage::parseInline`), and the one place where we
have actual data in the content language (the user signature, which
gets parsed in the content language with the rest of the (talk) page
content, see Parser.php::pstPass2) was being parsed as an interface
message!

Forcing the caller to be very explicit about AsContent() or AsInterface()
will help mitigate this in the future, one hopes.

Bug: T198214
Change-Id: Ib9d5d8d733a47c967bdf7db3e23fa39f11687063

5 years agoDeprecate OutputPage::parse() and OutputPage::parseInline()
C. Scott Ananian [Fri, 26 Oct 2018 15:14:01 +0000 (11:14 -0400)]
Deprecate OutputPage::parse() and OutputPage::parseInline()

The OutputPage::parse() and OutputPage::parseInline() methods behave
misleadingly different from the OutputPage::addWikitext*() methods:
they don't tidy their output, they have different defaults for
interface/content language selection, and they (sometimes) add
wrapper divs.  Deprecate these and add new methods with tidy output,
clear language selection, and consistent defaults:
OutputPage::parseAsContent(), OutputPage::parseAsInterface(),
and OutputPage::parseInlineAsInterface().

Unify the implementation of the parse* methods with the addWikiText*
methods, to reduce the likelihood that the behavior will diverge again
in the future.

Bug: T198214
Change-Id: Ica79c2acbc542ef37f971c0be2582ae771a23bd0

5 years agoMerge "CalendarWidget: Fix left arrow position in header"
jenkins-bot [Mon, 29 Oct 2018 19:34:18 +0000 (19:34 +0000)]
Merge "CalendarWidget: Fix left arrow position in header"

5 years agoMerge "Fix OutputPage::parseInternal() by stripping <div> wrapper"
jenkins-bot [Mon, 29 Oct 2018 18:55:22 +0000 (18:55 +0000)]
Merge "Fix OutputPage::parseInternal() by stripping <div> wrapper"

5 years agoAdd langauge 'kjp' Eastern Pwo
shandrenkoff [Sun, 28 Oct 2018 14:56:39 +0000 (17:56 +0300)]
Add langauge 'kjp' Eastern Pwo

This change adds the Eastern Pwo language with ISO 639-3 code 'kjp' with
'bo' (Tibetian) fallback. The default script is the Burmese script.

Bug: T203908
Change-Id: Ic69c5f1398bcd96674254b69f678f21b71feb475

5 years agoCalendarWidget: Fix left arrow position in header
Volker E [Thu, 25 Oct 2018 23:20:50 +0000 (16:20 -0700)]
CalendarWidget: Fix left arrow position in header

Overwriting OOUI's position out of box.

Change-Id: I7b4f4d65f2046e431d7fa03ffda33fe8d05c3f52

5 years agoMerge "resourceloader: ResourceLoaderGetConfigVars is passed skin"
jenkins-bot [Mon, 29 Oct 2018 01:56:40 +0000 (01:56 +0000)]
Merge "resourceloader: ResourceLoaderGetConfigVars is passed skin"

5 years agoMerge "Avoid using return value of IDatabase::insert()"
jenkins-bot [Mon, 29 Oct 2018 00:30:13 +0000 (00:30 +0000)]
Merge "Avoid using return value of IDatabase::insert()"

5 years agoMerge "Create JobQueueEnqueueUpdate class to call JobQueueGroup::pushLazyJobs()"
jenkins-bot [Sun, 28 Oct 2018 23:10:53 +0000 (23:10 +0000)]
Merge "Create JobQueueEnqueueUpdate class to call JobQueueGroup::pushLazyJobs()"

5 years agoCreate JobQueueEnqueueUpdate class to call JobQueueGroup::pushLazyJobs()
Aaron Schulz [Wed, 24 Oct 2018 19:28:02 +0000 (12:28 -0700)]
Create JobQueueEnqueueUpdate class to call JobQueueGroup::pushLazyJobs()

This assures that MergeableUpdate tasks that lazy push job will actually
have those jobs run instead of being added after the lone callback update
to call JobQueueGroup::pushLazyJobs() already ran.

This also makes it more obvious that push will happen, since a mergeable
update is added each time lazyPush() is called and a job is buffered,
rather than rely on some magic callback enqueued into DeferredUpdates at
just the right point in multiple entry points.

Bug: T207809
Change-Id: I13382ef4a17a9ba0fd3f9964b8c62f564e47e42d

5 years agoAvoid using return value of IDatabase::insert()
Aaron Schulz [Fri, 26 Oct 2018 22:42:26 +0000 (15:42 -0700)]
Avoid using return value of IDatabase::insert()

Change-Id: I5992e4f03cd522b25607947291795d1da60d0291

5 years agoMerge "Avoid broken markup due to conversion table DB queries in Installer:parse()"
jenkins-bot [Sun, 28 Oct 2018 21:42:02 +0000 (21:42 +0000)]
Merge "Avoid broken markup due to conversion table DB queries in Installer:parse()"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 28 Oct 2018 20:54:10 +0000 (21:54 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: If2370cd24814a27fae6bbb7d33a2074c97740df6

5 years agoAvoid broken markup due to conversion table DB queries in Installer:parse()
Aaron Schulz [Sat, 27 Oct 2018 23:41:33 +0000 (16:41 -0700)]
Avoid broken markup due to conversion table DB queries in Installer:parse()

Bug: T207979
Change-Id: I6a196a64865533a073fadc4a07f5627b67924921

5 years agoUse PHP 7 '??' operator instead of if-then-else
Fomafix [Sat, 27 Oct 2018 12:30:02 +0000 (14:30 +0200)]
Use PHP 7 '??' operator instead of if-then-else

Change-Id: Ia86f8433f30a166d38ee63d0d1745b26740767b9

5 years agoMerge "Deprecate hacky wfSplitWikiID() method"
jenkins-bot [Sat, 27 Oct 2018 21:33:07 +0000 (21:33 +0000)]
Merge "Deprecate hacky wfSplitWikiID() method"

5 years agoMake UserEditCountUpdate faster by using auto-commit mode
Aaron Schulz [Sat, 27 Oct 2018 14:34:52 +0000 (07:34 -0700)]
Make UserEditCountUpdate faster by using auto-commit mode

Bug: T202715
Change-Id: I92c08694cb5e1c367809439cff42e33a56ff9878

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 27 Oct 2018 20:43:10 +0000 (22:43 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ib268ee41778efe523367bc2c6aaeecafd56efc85

5 years agoMerge "API: Set robots noindex,nofollow on HTML output"
jenkins-bot [Sat, 27 Oct 2018 05:27:15 +0000 (05:27 +0000)]
Merge "API: Set robots noindex,nofollow on HTML output"

5 years agoDeprecate hacky wfSplitWikiID() method
Aaron Schulz [Sun, 21 Oct 2018 07:47:26 +0000 (00:47 -0700)]
Deprecate hacky wfSplitWikiID() method

Change-Id: I59095ee7cc39f634d124fa711ec01a5a5d188d23

5 years agoMerge "resoureloader: Restore support for plain callbacks in mediawiki.base's RLQ"
jenkins-bot [Sat, 27 Oct 2018 04:03:43 +0000 (04:03 +0000)]
Merge "resoureloader: Restore support for plain callbacks in mediawiki.base's RLQ"

5 years agoIncrement edit count for all page moves
GeoffreyT2000 [Sun, 25 Mar 2018 22:14:06 +0000 (15:14 -0700)]
Increment edit count for all page moves

The user_editcount field should be incremented for all page moves, not just those done using Special:MovePage. Also, if talk pages and/or subpages are moved along with the base page, they will all be included in the edit count.

Bug: T195550
Change-Id: If75a45e4404ca7162b59bf85fa62a996383658b9

5 years agoresoureloader: Restore support for plain callbacks in mediawiki.base's RLQ
Timo Tijhof [Fri, 26 Oct 2018 21:33:26 +0000 (14:33 -0700)]
resoureloader: Restore support for plain callbacks in mediawiki.base's RLQ

Follows-up dec800968e, which moved the processing of callbacks that require
'modules' from startup.js to mediawiki.base.js.

In doing so, it made an incorrect assumption. It assumed that the simple
signature of RLQ.push(Function) is not needed after 'mediawiki.base' loads.

It is true that RLQ.push() is mostly an internal interface, and we only
use it from within the HTML output, and that once the async pipeline has
finished and startup.js has processed the simple callbacks, only calls with
secondary signatures remain in the queue.

But, while it is true that we don't use RLQ.push() outside the HTML, it is
not true that the HTML will fully load and execute inline scripts before
any of the async scripts execute. As such, the call to RLQ.push() in the
HTML footer was sometimes being ignored because 'mediawiki.base' had already
loaded by now.

Bug: T208093
Change-Id: I25012a2c6f41968b1b4f85614a3bc0416512d530

5 years agoMerge "Localisation updates from https://translatewiki.net."
jenkins-bot [Fri, 26 Oct 2018 20:48:49 +0000 (20:48 +0000)]
Merge "Localisation updates from https://translatewiki.net."

5 years agoMerge "Move user_editcount updates to a mergeable deferred update"
jenkins-bot [Fri, 26 Oct 2018 20:32:24 +0000 (20:32 +0000)]
Merge "Move user_editcount updates to a mergeable deferred update"

5 years agoMerge "rdbms: add transaction comment to IDatabase::masterPosWait()"
jenkins-bot [Fri, 26 Oct 2018 20:20:37 +0000 (20:20 +0000)]
Merge "rdbms: add transaction comment to IDatabase::masterPosWait()"

5 years agoMerge "rdbms: fix connection reuse logic in LoadBalancer for postgres"
jenkins-bot [Fri, 26 Oct 2018 20:20:32 +0000 (20:20 +0000)]
Merge "rdbms: fix connection reuse logic in LoadBalancer for postgres"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 26 Oct 2018 19:55:34 +0000 (21:55 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: If9e3c1bf47afc4ee0f0c0afacebf3e32df62fb8c

5 years agoUse Html:rawElement() where possible in special pages.
C. Scott Ananian [Fri, 26 Oct 2018 17:04:36 +0000 (13:04 -0400)]
Use Html:rawElement() where possible in special pages.

Gently discourage building HTML by raw string concatenation.

Fixes for Special{Contributions/Recentchanges*/Undelete/Upload}.

Change-Id: I4a128e902dcce93372b2f188a1f37223c58ebe9a

5 years agoOnly expand `{{...}}` in messages once (part 2)
C. Scott Ananian [Fri, 26 Oct 2018 16:59:01 +0000 (12:59 -0400)]
Only expand `{{...}}` in messages once (part 2)

If we're going to call `OutputPage::addWikiTextAs*` or
`OutputPage::parseAs*` to parse the message, we don't need to
pre-expand `{{...}}` markup before passing it to the parser.

Follow up to I2f68f73365df876e6f9d017e4e3ddea39c4a1284.

Bug: T206574
Change-Id: I0ee493207ea80c1caba7e60a31714805dc54c64e

5 years agoRollbackAction/SpecialUndelete: Use OutputPage::addWikiMsg() where possible
C. Scott Ananian [Fri, 26 Oct 2018 17:03:19 +0000 (13:03 -0400)]
RollbackAction/SpecialUndelete: Use OutputPage::addWikiMsg() where possible

Gently discourage the unnecessary use of OutputPage::addHTML().

Change-Id: Ibb33c056dee2344e9a7a5955408eb56c753acb7b