lhc/web/wiklou.git
5 years agodoc: Modernise parameter names and documentation for 'replica' DBs
James D. Forrester [Wed, 31 Oct 2018 17:36:48 +0000 (10:36 -0700)]
doc: Modernise parameter names and documentation for 'replica' DBs

Non-breaking change. Remaining uses are public interfaces (a constant, two
globals, a config sub-parameter, SQL queries, storage function names), one i18n
message key, and a whole lot of maintenance scripts with calls to the deprecated
function wfWaitForSlaves().

Change-Id: I6ee5ca92ccf6a80c08f53d9efe38ebb4b05064d7

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 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::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 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 agoFix OutputPage::parseInternal() by stripping <div> wrapper
C. Scott Ananian [Fri, 26 Oct 2018 14:05:34 +0000 (10:05 -0400)]
Fix OutputPage::parseInternal() by stripping <div> wrapper

We should probably strip the <div> wrapper in OutputPage::parse() as
well: this behavior was added in 1.30, but it only applies when
$interface is false.  However, that requires a more careful audit
(a lot more places call parse() than parseInline()) and so I'll defer
that for now.

Change-Id: Iad5412f03af29c04deb653969dd71f6c86f0ae50

5 years ago.gitignore: Fix .vscode
Zoranzoki21 [Fri, 26 Oct 2018 13:33:53 +0000 (13:33 +0000)]
.gitignore: Fix .vscode

.vscode is directory

Change-Id: I82d1da1b51b4bd32423ad0bb70d30df109fae1ae

5 years agoMerge "RCFilters: Apply same distance to FilterItemHighlightButtons as other elements"
jenkins-bot [Fri, 26 Oct 2018 10:50:38 +0000 (10:50 +0000)]
Merge "RCFilters: Apply same distance to FilterItemHighlightButtons as other elements"

5 years agoMerge "RCFilters: Cleanup 'Namespaces' dropdown borders appearance"
jenkins-bot [Fri, 26 Oct 2018 10:50:33 +0000 (10:50 +0000)]
Merge "RCFilters: Cleanup 'Namespaces' dropdown borders appearance"

5 years agoMerge "Remove unnecessary, unoptimized, unused overview SVG"
jenkins-bot [Fri, 26 Oct 2018 03:04:20 +0000 (03:04 +0000)]
Merge "Remove unnecessary, unoptimized, unused overview SVG"

5 years agoHard deprecate $wgTidyConfig['driver'] = 'disabled'
C. Scott Ananian [Fri, 26 Oct 2018 02:02:47 +0000 (22:02 -0400)]
Hard deprecate $wgTidyConfig['driver'] = 'disabled'

This was already deprecated in the release notes, and is not used in
production, but I'd overlooked adding an appropriate hard deprecation
notice in MWTidy::factory() to notify downstream users.

Change-Id: I8f4d8154a1d8a233017f54f0fb4bcfdf4a0373e1

5 years agoFix use of non-existent variable Parser::$config
Tim Starling [Thu, 25 Oct 2018 23:14:15 +0000 (16:14 -0700)]
Fix use of non-existent variable Parser::$config

Fix bug from Ib4394f370cb561ccf195338a1c2e9e465dcb3dc3

Add test.

Bug: T208000
Change-Id: Ia81cca1b64afef2af3cb8dff19719a7f0de9d306

5 years agoRCFilters: Apply same distance to FilterItemHighlightButtons as other elements
Volker E [Thu, 25 Oct 2018 22:59:17 +0000 (15:59 -0700)]
RCFilters: Apply same distance to FilterItemHighlightButtons as other elements

FilterItemHighlightButtons have lost vertical alignment with
“Highlight results”. This patch reintroduces it.

Change-Id: If5578564efced5f0ba4d3ca7ed3d6787b5b0ce3a

5 years agoMove user_editcount updates to a mergeable deferred update
Aaron Schulz [Mon, 22 Oct 2018 22:58:02 +0000 (15:58 -0700)]
Move user_editcount updates to a mergeable deferred update

This should reduce excess contention and lock timeouts.
Previously, it used a pre-commit hook which ran just before the
end of the DB transaction round.

Also removed unused User::incEditCountImmediate() method.

Bug: T202715
Depends-on: I6d239a5ea286afb10d9e317b2ee1436de60f7e4f
Depends-on: I0ad3d17107efc7b0e59f1dd54d5733cd1572a2b7
Change-Id: I0d6d7ddd91bbb21995142808248d162e05696d47

5 years agordbms: add transaction comment to IDatabase::masterPosWait()
Aaron Schulz [Tue, 23 Oct 2018 04:08:44 +0000 (21:08 -0700)]
rdbms: add transaction comment to IDatabase::masterPosWait()

Change-Id: I95aa3b678b76cd06439d1feaba7f09a9c13f8931

5 years agoRCFilters: Cleanup 'Namespaces' dropdown borders appearance
Volker E [Thu, 25 Oct 2018 22:06:56 +0000 (15:06 -0700)]
RCFilters: Cleanup 'Namespaces' dropdown borders appearance

Cleaning-up by
- adding border only between namespace and talk options
- adding namespace border on all but the first occurrence

Change-Id: Icfc87757deda9b7655c4ea5c919b5c2f2e2ae09e

5 years agoMerge "Clear the title cache in MutableRevisionRecordTest"
jenkins-bot [Thu, 25 Oct 2018 21:50:51 +0000 (21:50 +0000)]
Merge "Clear the title cache in MutableRevisionRecordTest"

5 years agoMerge "Make testFormatValueRestrictions() account for $wgArticlePath to avoid failures"
jenkins-bot [Thu, 25 Oct 2018 21:45:32 +0000 (21:45 +0000)]
Merge "Make testFormatValueRestrictions() account for $wgArticlePath to avoid failures"

5 years agoMerge "Move timing code out of the try/catch in doPostOutputShutdown()"
jenkins-bot [Thu, 25 Oct 2018 21:45:27 +0000 (21:45 +0000)]
Merge "Move timing code out of the try/catch in doPostOutputShutdown()"

5 years agoMerge "Silence transaction profiler master queries notices for rollback"
jenkins-bot [Thu, 25 Oct 2018 21:27:08 +0000 (21:27 +0000)]
Merge "Silence transaction profiler master queries notices for rollback"

5 years agoMerge "rdbms: remove duplicate @params in IDatabase::select()"
jenkins-bot [Thu, 25 Oct 2018 21:17:19 +0000 (21:17 +0000)]
Merge "rdbms: remove duplicate @params in IDatabase::select()"

5 years agoMerge "filerepo: Inject the WAN cache info FileRepo instances"
jenkins-bot [Thu, 25 Oct 2018 21:17:09 +0000 (21:17 +0000)]
Merge "filerepo: Inject the WAN cache info FileRepo instances"

5 years agoMerge "Remove unused fields in ForeignDBViaLBRepo"
jenkins-bot [Thu, 25 Oct 2018 21:17:04 +0000 (21:17 +0000)]
Merge "Remove unused fields in ForeignDBViaLBRepo"

5 years agoMerge "rdbms: Use "mixed" type for $profiler field in LoadBalancer"
jenkins-bot [Thu, 25 Oct 2018 21:16:59 +0000 (21:16 +0000)]
Merge "rdbms: Use "mixed" type for $profiler field in LoadBalancer"

5 years agoClear the title cache in MutableRevisionRecordTest
Aaron Schulz [Thu, 25 Oct 2018 04:31:58 +0000 (21:31 -0700)]
Clear the title cache in MutableRevisionRecordTest

Also do so in various other test classes.

Follows-up 170c49d61cb8. Fixes Travis CI regression:

> 1) MediaWiki\Tests\Revision\MutableRevisionRecordTest::testSetGetPageId
> Failed asserting that 2 is identical to 0.
> tests/phpunit/includes/Revision/MutableRevisionRecordTest.php:129

Change-Id: I41c8bda8e620ebe7608a393d81f3b0f13af68ba7

5 years agoMake testFormatValueRestrictions() account for $wgArticlePath to avoid failures
Aaron Schulz [Thu, 25 Oct 2018 03:34:41 +0000 (20:34 -0700)]
Make testFormatValueRestrictions() account for $wgArticlePath to avoid failures

Follows-up 170c49d61cb84411.

Change-Id: I37a57b5ece939c5743b7d08d02ce41c71daee5eb

5 years agofilerepo: Inject the WAN cache info FileRepo instances
Aaron Schulz [Sun, 21 Oct 2018 12:07:44 +0000 (05:07 -0700)]
filerepo: Inject the WAN cache info FileRepo instances

Also fixed some intellij IDEA warnings.

Change-Id: I667ed7ef9b49c1da1c8c7c9914daadb7c74b3c79

5 years agordbms: Use "mixed" type for $profiler field in LoadBalancer
Aaron Schulz [Wed, 24 Oct 2018 11:05:41 +0000 (04:05 -0700)]
rdbms: Use "mixed" type for $profiler field in LoadBalancer

Change-Id: I8d110d0420a155bb62f4212933d9de2562dc7661

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 25 Oct 2018 20:16:19 +0000 (22:16 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I67923401760c77676ed4e674170335333ac15d15

5 years agoMerge "Fix code style in EmailNotification.php"
jenkins-bot [Thu, 25 Oct 2018 19:30:22 +0000 (19:30 +0000)]
Merge "Fix code style in EmailNotification.php"

5 years agoFix code style in EmailNotification.php
Alangi Derick [Tue, 23 Oct 2018 13:50:51 +0000 (14:50 +0100)]
Fix code style in EmailNotification.php

Code style fix for namespace "use" statement.

Change-Id: I0755481f640aae535c8328824812e25db467e528

5 years agoMerge "MailAddress->toString(): Reduce complexity by inverting ifs"
jenkins-bot [Thu, 25 Oct 2018 17:49:09 +0000 (17:49 +0000)]
Merge "MailAddress->toString(): Reduce complexity by inverting ifs"

5 years agoMailAddress->toString(): Reduce complexity by inverting ifs
Reedy [Sat, 20 Oct 2018 22:31:00 +0000 (23:31 +0100)]
MailAddress->toString(): Reduce complexity by inverting ifs

Change-Id: I5185c0231a0944f36d960211e78cf36273c94d52

5 years agoMove timing code out of the try/catch in doPostOutputShutdown()
Aaron Schulz [Thu, 25 Oct 2018 16:22:30 +0000 (09:22 -0700)]
Move timing code out of the try/catch in doPostOutputShutdown()

Change-Id: Idc24fdaff5bbcb98445cc4dee8c94cc75cd00573

5 years agordbms: avoid transaction status errors from ping() in rollback()
Aaron Schulz [Thu, 25 Oct 2018 15:34:39 +0000 (08:34 -0700)]
rdbms: avoid transaction status errors from ping() in rollback()

Change-Id: I38658cbf90518d9818824674da371637db15e156

5 years agoAPI: Set robots noindex,nofollow on HTML output
Brad Jorsch [Thu, 25 Oct 2018 13:31:31 +0000 (09:31 -0400)]
API: Set robots noindex,nofollow on HTML output

There's probably not much benefit in search engines indexing the API
auto-generated help or various random "format=jsonfm" outputs.

On Wikimedia wikis we already have a robots.txt entry denying indexing
of everything under /w/, which includes api.php.

Bug: T207818
Change-Id: I196d401eeb5fcf49844265df41ad3cce83ffdcdf

5 years agoMerge "WikiPage: Truncate redirect fragments before inserting them into the DB"
jenkins-bot [Thu, 25 Oct 2018 04:43:50 +0000 (04:43 +0000)]
Merge "WikiPage: Truncate redirect fragments before inserting them into the DB"

5 years agoMerge "RCFilters: Fix centering of "no results" message"
jenkins-bot [Thu, 25 Oct 2018 03:13:49 +0000 (03:13 +0000)]
Merge "RCFilters: Fix centering of "no results" message"

5 years agoRCFilters: Fix centering of "no results" message
Roan Kattouw [Thu, 25 Oct 2018 00:50:47 +0000 (17:50 -0700)]
RCFilters: Fix centering of "no results" message

Was caused by a stray margin-right rule that applied to the wrong divs,
and wasn't needed anyway.

Bug: T207808
Change-Id: Ib6cf518653fbadb0c7d67d6a175b4af92c8f8d87
Follows-Up: I76fec57ff237ba02afefcea28916d8348bac9b0e

5 years agoWikiPage: Truncate redirect fragments before inserting them into the DB
Roan Kattouw [Thu, 25 Oct 2018 00:09:59 +0000 (17:09 -0700)]
WikiPage: Truncate redirect fragments before inserting them into the DB

The rd_fragment field is 255 bytes wide, but there is no limit on how
long title fragments can be. We don't want to let the database silently
truncate the fragment for us, because that can result in invalid UTF-8.
Instead, truncate it before insertion in a UTF-8-aware way.

Bug: T207876
Change-Id: I12745f3f4c174eaced56d80f3661a71d0e5637e6

5 years agoMerge "composer.json, require ext-fileinfo"
jenkins-bot [Wed, 24 Oct 2018 23:35:56 +0000 (23:35 +0000)]
Merge "composer.json, require ext-fileinfo"

5 years agoDisable $wgEnableImageWhitelist by default
Kunal Mehta [Wed, 24 Oct 2018 22:39:53 +0000 (15:39 -0700)]
Disable $wgEnableImageWhitelist by default

This opens up a hole for administrators to load images from external resources,
potentially leaking user's private information to external servers (IP address,
User-Agent, etc.).

Change-Id: Ie780637b292493e664e4d54671a5bb81046106f4

5 years agoMerge "Use a pre-commit hook for change_tag_def count updates"
jenkins-bot [Wed, 24 Oct 2018 22:14:03 +0000 (22:14 +0000)]
Merge "Use a pre-commit hook for change_tag_def count updates"

5 years agoMerge "Hard deprecate functionality replaced with random_bytes()"
jenkins-bot [Wed, 24 Oct 2018 22:13:06 +0000 (22:13 +0000)]
Merge "Hard deprecate functionality replaced with random_bytes()"