lhc/web/wiklou.git
8 years agoMerge "Change bug ID to Phabricator task ID"
jenkins-bot [Thu, 4 Feb 2016 01:28:01 +0000 (01:28 +0000)]
Merge "Change bug ID to Phabricator task ID"

8 years agoChange bug ID to Phabricator task ID
wctaiwan [Thu, 4 Feb 2016 01:13:10 +0000 (20:13 -0500)]
Change bug ID to Phabricator task ID

Change-Id: I8e1fc6ed9434a331eb7c66273305576eebed3125

8 years agoMerge "Revert "Preprocessor: Don't allow unclosed extension tags (matching until...
Bartosz Dziewoński [Thu, 4 Feb 2016 01:10:58 +0000 (01:10 +0000)]
Merge "Revert "Preprocessor: Don't allow unclosed extension tags (matching until end of input)""

8 years agoRevert "Preprocessor: Don't allow unclosed extension tags (matching until end of...
Legoktm [Thu, 4 Feb 2016 00:38:35 +0000 (00:38 +0000)]
Revert "Preprocessor: Don't allow unclosed extension tags (matching until end of input)"

This reverts commit f51d0d9a819f8f1c181350ced2f015ce97985fcc.

Breaks templates with non-closed </noinclude> tags, which
were previously acceptable.

Bug: T125754
Change-Id: I8bafb15eefac4e1d3e727c1c84782636d8b82c2b

8 years agoClean up after Ie161e0f
Brad Jorsch [Sat, 30 Jan 2016 01:09:57 +0000 (20:09 -0500)]
Clean up after Ie161e0f

Ie161e0f was done in a hurry, and so didn't do things in the best ways.
This introduces a new "CachedBagOStuff" that transparently handles all
the logic that had been copy-pasted all over in Ie161e0f.

The differences between CachedBagOStuff and MultiWriteBagOStuff are:
* CachedBagOStuff supports only one "backend".
* There's a flag for writes to only go to the in-memory cache.
* The in-memory cache is always updated.
* Locks go to the backend cache (with MultiWriteBagOStuff, it would wind
  up going to the HashBagOStuff used for the in-memory cache).

Change-Id: Iea494729bd2e8c6c5ab8facf4c241232e31e8215

8 years agoRevert "Remove SessionManager, temporarily"
Brad Jorsch [Mon, 1 Feb 2016 20:44:03 +0000 (15:44 -0500)]
Revert "Remove SessionManager, temporarily"

This reverts commit 823db5d63dd5200d04c63da50ba6bf16f928e70b.

Change-Id: Ibb3e023e4eb6715295586dea87d0725c344a8271

8 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Wed, 3 Feb 2016 21:44:43 +0000 (21:44 +0000)]
Merge "Localisation updates from https://translatewiki.net."

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 3 Feb 2016 21:40:15 +0000 (22:40 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia72df7f41e81cc99e25bcc9804c6b0bd43bfa61b

8 years agoMerge "resources: Load OOjs UI from its four parts"
jenkins-bot [Wed, 3 Feb 2016 21:38:34 +0000 (21:38 +0000)]
Merge "resources: Load OOjs UI from its four parts"

8 years agomediawiki.widgets: Remove backwards-compatibility dependency on 'mediawiki.widgets...
Bartosz Dziewoński [Wed, 3 Feb 2016 18:40:31 +0000 (19:40 +0100)]
mediawiki.widgets: Remove backwards-compatibility dependency on 'mediawiki.widgets.CategorySelector'

Follow-up to 40a8367fe9cd5fc2a26f1adf8f9e208551a4d7b9.

Change-Id: I28faea785cf13d1e741ae6f746a76bd7aeeaf3eb

8 years agoresources: Load OOjs UI from its four parts
Bartosz Dziewoński [Mon, 1 Feb 2016 22:28:13 +0000 (23:28 +0100)]
resources: Load OOjs UI from its four parts

See the task for more details. This is a backwards-compatible change.
If your script only needs a subset of OOjs UI functionality, you can
use one of the new smaller modules instead of the old big one.

New modules:
  oojs-ui-core
    The core JavaScript library.
  oojs-ui-widgets
    Additional widgets and layouts module.
  oojs-ui-toolbars
    Toolbar and tools module.
  oojs-ui-windows
    Windows and dialogs module.

Changed modules:
  oojs-ui.styles
    Now correctly only loads the styles needed by OOjs UI PHP.
  oojs-ui
    Now just loads core+widgets+toolbars+windows as dependencies.

Using the new modules in I58799e22f9c0a2f78c1b4a02c4b7af576157883a.

Bug: T113677
Change-Id: I0a3bf8fb25fb82325705a473cebd883e20b3ab8d

8 years agoAdd Special:ApiSandbox
Brad Jorsch [Thu, 7 May 2015 17:11:09 +0000 (13:11 -0400)]
Add Special:ApiSandbox

Like Extension:ApiSandbox, but rewritten to use OOJS-UI and to add many
long-requested features.

Bug: T89386
Bug: T92893
Bug: T98457
Bug: T98083
Bug: T89229
Bug: T66008
Bug: T50607
Bug: T47811
Bug: T38875
Bug: T36962
Bug: T34740
Change-Id: Ic42a6c5ef54b811cd63cfef2132942b27a626fe5
Depends-On: I85c0eedcd31a0e419d8055eca0d9cb1ba872ae62
Depends-On: Ic85ff4abbbcd2076ebf5cdfaa0e95e98878e2308

8 years agoMerge "Use LinkTarget in TitleValue only methods"
jenkins-bot [Wed, 3 Feb 2016 13:36:59 +0000 (13:36 +0000)]
Merge "Use LinkTarget in TitleValue only methods"

8 years agoMerge "Add LinkTarget interface"
jenkins-bot [Wed, 3 Feb 2016 13:23:08 +0000 (13:23 +0000)]
Merge "Add LinkTarget interface"

8 years agoSet title on context in ApiDocumentationTest
Brad Jorsch [Tue, 2 Feb 2016 14:27:05 +0000 (09:27 -0500)]
Set title on context in ApiDocumentationTest

For some reason the unit testing infrastructure doesn't set one, and
that makes RequestContext warn.

Bug: T125491
Change-Id: I3e0ec0f567dd06231bca0d3d923e9d4e05ef5514

8 years agoMerge "Pass WikiPage objects to ParserCache"
jenkins-bot [Wed, 3 Feb 2016 12:01:09 +0000 (12:01 +0000)]
Merge "Pass WikiPage objects to ParserCache"

8 years agoCentralise url handling for urls to static resources
Timo Tijhof [Fri, 22 Jan 2016 22:58:03 +0000 (22:58 +0000)]
Centralise url handling for urls to static resources

Keep in CSSMin as-is for back-compat and to ensure library remains
independent of MediaWiki.

Moved down a few lines as there is no need to compute the md5 hash when we're
returning a data URI. Previously md5_file was called twice during module builds
(once for the fallback url, and another time when producing the embedded data uri).

Applied to logo in SkinModule as example. To be applied elsewhere as needed.
Without it, fallback is current behaviour (no cache invalidation).

Bug: T99096
Change-Id: I7f38bfc1bea5c241bc4f8ec4f4b640fd65f2c04f

8 years agoUpdate OOjs UI to v0.15.2
James D. Forrester [Tue, 2 Feb 2016 22:10:54 +0000 (14:10 -0800)]
Update OOjs UI to v0.15.2

Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.15.2/History.md

Change-Id: I8124a726660443ce514c48182871d46e6b086a10

8 years agoMerge "Unroll Article::__call again"
jenkins-bot [Tue, 2 Feb 2016 20:29:19 +0000 (20:29 +0000)]
Merge "Unroll Article::__call again"

8 years agoMerge "Add Blob to accepted types for uploads"
jenkins-bot [Tue, 2 Feb 2016 20:25:34 +0000 (20:25 +0000)]
Merge "Add Blob to accepted types for uploads"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 2 Feb 2016 20:14:54 +0000 (21:14 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Idc128c366bbcbd34e7fb4e75af8400fa11bcd53e

8 years agoAdd Blob to accepted types for uploads
Mark Holmquist [Tue, 2 Feb 2016 17:00:28 +0000 (11:00 -0600)]
Add Blob to accepted types for uploads

From https://developer.mozilla.org/en-US/docs/Web/API/File :

A File object is specific kind of a Blob, and can be used in any
context that a Blob can. In particular, FileReader, URL.createObjectURL(),
createImageBitmap(), and XMLHttpRequest.send() accept both Blobs and Files.

Change-Id: I171f884fc4ada6180e5c605a44b27044fc03f26e

8 years agoPass WikiPage objects to ParserCache
umherirrender [Tue, 2 Feb 2016 19:38:36 +0000 (20:38 +0100)]
Pass WikiPage objects to ParserCache

ParserCache::get is documented for WikiPage, so do it from Article class
This avoids magic calls due Article::__call

Change-Id: I92b91bd112383d1c0132530c3325b39596d95768

8 years agoAdd $wgAuthenticationTokenVersion
Brad Jorsch [Mon, 1 Feb 2016 20:07:09 +0000 (15:07 -0500)]
Add $wgAuthenticationTokenVersion

This allows for quickly invalidating everyone's session all at once by
changing a single value.

As a side effect, setting this also stops the user_token field from
the database from being served to the user as a cookie.

This mitigates but doesn't completely solve T49490, as it allows for
invalidating all existing sessions and token-cookies but does not help
if the user_token field in the database was leaked.

Bug: T49490
Change-Id: I9d316a6bbb36278d138f39a89125ebb8cc71b28f

8 years agoMerge "XMPValidate: fix undefined variable for logger"
jenkins-bot [Tue, 2 Feb 2016 17:06:20 +0000 (17:06 +0000)]
Merge "XMPValidate: fix undefined variable for logger"

8 years agoUnroll Article::__call again
addshore [Tue, 2 Feb 2016 16:48:20 +0000 (17:48 +0100)]
Unroll Article::__call again

Adds all public functions from WikiPage to Article

Adds all public functions from WikiFilePage that
are not in Article to ImagePage

WikiCategoryPage has no methods that need moving

Removed __call from Article

If extensions extend WikiPage and rely on the __call
method in Article they may break with this change.
They cal easily call $article->getPage()->method..

Change-Id: I8cd8d69d0d59c67f4879212535206688387bead4

8 years agoMerge "QA: Upgrade to mediawiki_selenium 1.6.5"
jenkins-bot [Tue, 2 Feb 2016 09:48:45 +0000 (09:48 +0000)]
Merge "QA: Upgrade to mediawiki_selenium 1.6.5"

8 years agofix hardcoded limit on titles in Special:Export
This, that and the other [Mon, 1 Feb 2016 14:16:08 +0000 (01:16 +1100)]
fix hardcoded limit on titles in Special:Export

In Special:Export if you enter a category in the "Add pages from
category" textbox, there was a hardcoded limit of 5000 page titles in
the function getPagesFromCategory().

The same is true for a similar function fetching pages by namespace
instead of category, function getPagesFromNamespace().

I have a couple of wikis where we wish to export a nummber of pages
exceeding 5000, so this is inconvenient. In this commit, I have
introduced one new global configuration variable: $wgExportPagelistLimit.

This new configuration variable has had its default set in
includes/DefaultSettings.php to the values the two affected functions
were hardcoded to prior to this patch; 5000 in both instances.

This way, I can adjust the number of pages returned in the
Special:Export page by adjusting the above new variable in
LocalSettings.php.

Change-Id: I6ca9e26eb6bc4a7a2bafd73b9460f445940c8ecb

8 years agoRevert "Unroll Article::__call"
Tyler Cipriani [Tue, 2 Feb 2016 00:58:27 +0000 (16:58 -0800)]
Revert "Unroll Article::__call"

This reverts commit 6051fcd38374db7e2d984ec535da264cb48d291f.

Bug: T125468
Change-Id: I9456c8e1b95ca3b2b2fa5d306f45a46210c4b1fc

8 years agoQA: Upgrade to mediawiki_selenium 1.6.5
Dan Duvall [Mon, 1 Feb 2016 23:30:44 +0000 (15:30 -0800)]
QA: Upgrade to mediawiki_selenium 1.6.5

Bug: T114241
Change-Id: I2996611d51b5d08c67f7a60d05003db97dffc0b7

8 years agoMerge "New hook for filters on Special:Contributions form"
jenkins-bot [Mon, 1 Feb 2016 22:47:40 +0000 (22:47 +0000)]
Merge "New hook for filters on Special:Contributions form"

8 years agoMerge "Add phpdoc for some ApiQueryInfo properties"
jenkins-bot [Mon, 1 Feb 2016 22:40:29 +0000 (22:40 +0000)]
Merge "Add phpdoc for some ApiQueryInfo properties"

8 years agoRemove SessionManager, temporarily
Brad Jorsch [Mon, 1 Feb 2016 17:28:29 +0000 (12:28 -0500)]
Remove SessionManager, temporarily

The plan here is to take it out of 1.27.0-wmf.12 and put it back in
1.27.0-wmf.13.

Since BotPasswords depends on SessionManager, that's getting temporarily
removed too.

This reverts the following commits:
6acd424e0dbc322e8b9a141bd2625453c1b9b6f1 SessionManager: Notify AuthPlugin before calling hooks
4d1ad32d8acbd443346253d2f6a95024c833295c Close a loophole in CookieSessionProvider
fcdd643a46d87b677f6cdcc3ba9440e1472d8df7 SessionManager: Don't save non-persisted sessions to backend storage
058aec4c76129b7ee8541692a8a48f8046e15bb6 MessageCache: Don't get a ParserOptions for $wgUser before the end of Setup.php
b5c0c03bb708f8dad6e404969df8addc123984db SessionManager: Save user name to metadata even if the user doesn't exist locally
13f2f09a193215aa7a061d10a1955e172d06fa0a SECURITY: Fix User::setToken() call on User::newSystemUser
305bc75b27903237a9683ec1f329bcbec0ecd266 SessionManager: Don't generate user tokens when checking the tokens
7c4bd85d2152fd9fa975ea0fb5ffb1a0b804f99b RequestContext::exportSession() should only export persisted session IDs
296ccfd4a9a6ad3ae412db7e2408c923aaa61f64 SessionManager: Save 'persisted' flag in session metadata
94ba53f67731b0553a6178841d9506e384f74496 Move CSRF token handling into MediaWiki\Session\Session
46a565d6b00174e631d2022b47677e1a78e73897 Avoid false "added in both Session and $_SESSION" when value is null
c00d0b5d94c946b8883dd7062bf7160a199aa5c2 Log backtrace for "User::loadFromSession called before the end of Setup.php"
4eeff5b559e2ae7b8fa1f45572968ba28573a421 Use $wgSecureCookie to decide whether to actually mark secure cookies as 'secure'
7491b52f700e220814a8190781fd794b4dd88a20 Call session_cache_limiter() before starting a session
2c34aeea72471f9a598e67bdbf34bc5f9fb3f0c5 SessionManager: Abstract forceHTTPS cookie setting
9aa53627a53aabec0273cecf45a86e77927ef406 Ignore auth cookies with value 'deleted'
43f904b51a746d7f71ea2ab9951c5c98d269765b SessionManager: Kill getPersistedSessionId()
50c52563528ba3d765c3762211f98d6f3c0e39fd SessionManager: Add SessionBackend::setProviderMetadata()
f640d403154bc0a2b4f6d399582797a9e3bc6fcb SessionManager: Notify AuthPlugin when auto-creating accounts
70b05d1ac1e859bac2185b246e9b93ec9051e4d8 Add checks of $wgEnableBotPasswords in more places
bfed32eb78b6c720b16bc7ed60153fd2fe257a9e Do not raise a PHP warning when session write fails
722a7331ad8d98228511f8da38adc7a3c64dd617 Only check LoggedOut timestamp on the user loaded from session
4f5057b84b36eccd16627a6b29831dfdb4483b02 SessionManager: Change behavior of getSessionById()
66e82e614e157e39b03d813e71ddf23f53cf640b Fix typo in [[MediaWiki:Botpasswords-editexisting/en]]
f9fd9516d922d36291037baca7205a2b0ac9f15f Add "bot passwords"
d7716f1df0b692902571bf415a0984071e3e9a60 Add missing argument for wfDebugLog
a73c5b7395a07d490f7052fd3b2491ebd656b190 Add SessionManager

Change-Id: I2389a8133e25ab929e9f27f41fa9a05df8147a50

8 years agoMerge "Remove use of explodeMarkup"
jenkins-bot [Mon, 1 Feb 2016 21:31:27 +0000 (21:31 +0000)]
Merge "Remove use of explodeMarkup"

8 years agoMerge "Revert "Remove unused functions from unroll of Article::__call""
jenkins-bot [Mon, 1 Feb 2016 20:26:38 +0000 (20:26 +0000)]
Merge "Revert "Remove unused functions from unroll of Article::__call""

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 1 Feb 2016 20:20:52 +0000 (21:20 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I5d76f70102160fdeb8fe596f0f31b04efdcb56d7

8 years agoRevert "Remove unused functions from unroll of Article::__call"
Alex Monk [Mon, 1 Feb 2016 20:05:38 +0000 (20:05 +0000)]
Revert "Remove unused functions from unroll of Article::__call"

This reverts commit 0204a28443606a2b3026d403c625f3a089841430.

Change-Id: Ia058c91f808eedae28946b9561c826fbf09b386e

8 years agoMerge "Fix typo in mw.widgets.CategorySelector.js"
jenkins-bot [Mon, 1 Feb 2016 17:16:28 +0000 (17:16 +0000)]
Merge "Fix typo in mw.widgets.CategorySelector.js"

8 years agoFix typo in mw.widgets.CategorySelector.js
Glaisher [Mon, 1 Feb 2016 16:41:40 +0000 (21:41 +0500)]
Fix typo in mw.widgets.CategorySelector.js

Change-Id: I65aef06fbabab8b3d4d8c6b72847fecb0637f352

8 years agoMerge "Use autoloader for PHP data files instead of include/require"
jenkins-bot [Mon, 1 Feb 2016 15:11:54 +0000 (15:11 +0000)]
Merge "Use autoloader for PHP data files instead of include/require"

8 years agoMerge "Remove unused functions from unroll of Article::__call"
jenkins-bot [Mon, 1 Feb 2016 14:09:36 +0000 (14:09 +0000)]
Merge "Remove unused functions from unroll of Article::__call"

8 years agoXMPValidate: fix undefined variable for logger
Southparkfan [Mon, 1 Feb 2016 13:01:58 +0000 (14:01 +0100)]
XMPValidate: fix undefined variable for logger

Change-Id: I8903e89bd93ef62236023fb07d78ade722eb102a

8 years agoSessionManager: Notify AuthPlugin before calling hooks
Brad Jorsch [Sun, 31 Jan 2016 20:48:23 +0000 (15:48 -0500)]
SessionManager: Notify AuthPlugin before calling hooks

This avoids a race in CentralAuth:
* The user doesn't exist locally, so CA wants to create it
* Auto-creation adds the user to the database
* A hook function tries to access the session; now the user does exist
  locally but isn't yet attached, so CA rejects the session.

Bug: T125283
Change-Id: I6024885e3cf9c85c527fc160577f66ff97451c98

8 years agoAdd myself to CREDITS
Florian [Mon, 1 Feb 2016 00:02:54 +0000 (01:02 +0100)]
Add myself to CREDITS

Change-Id: Ib16b6e91b0ce25bef6b747c90955cf840c63dabf

8 years agoMerge "ResourceLoaderImage: Use DomDocument::loadXml rather than DomDocument::load"
jenkins-bot [Sun, 31 Jan 2016 22:52:52 +0000 (22:52 +0000)]
Merge "ResourceLoaderImage: Use DomDocument::loadXml rather than DomDocument::load"

8 years agoResourceLoaderImage: Use DomDocument::loadXml rather than DomDocument::load
Bartosz Dziewoński [Sun, 31 Jan 2016 22:23:27 +0000 (23:23 +0100)]
ResourceLoaderImage: Use DomDocument::loadXml rather than DomDocument::load

Some users are reporting that DomDocument::load can't read the files
on their setups, while they can be read with file_get_contents. So use
that and pass the string to DomDocument::loadXml. The advantage of
DomDocument::load is supposed to be in handling large files, and the
icons here are supposed to be small.

Bug: T107198
Change-Id: I8e4dc4642f9d0c5f01ec5e4061e83bf09d0a4900

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 31 Jan 2016 20:20:37 +0000 (21:20 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I3e45e4442bad5ddf8bf91b9cf4d2f8c66b143929

8 years agoMerge "Correct messages 'uploaded-href-attribute-svg' and 'uploaded-href-unsafe-targe...
jenkins-bot [Sun, 31 Jan 2016 18:43:52 +0000 (18:43 +0000)]
Merge "Correct messages 'uploaded-href-attribute-svg' and 'uploaded-href-unsafe-target-svg'"

8 years agoCorrect messages 'uploaded-href-attribute-svg' and 'uploaded-href-unsafe-target-svg'
Bartosz Dziewoński [Sun, 31 Jan 2016 18:10:09 +0000 (19:10 +0100)]
Correct messages 'uploaded-href-attribute-svg' and 'uploaded-href-unsafe-target-svg'

Whoops, 'uploaded-href-attribute-svg' was actually telling the user
almost the exact opposite of the truth. I'm also removing all the
translations for it, as they're all wrong.

Change-Id: I56b62c0127cb87707256c8e45d49ce7764f49e31

8 years agoMerge "wfMsgReplaceArgs: Don't use count(), if the actual amount of entries isn't...
jenkins-bot [Sun, 31 Jan 2016 11:39:50 +0000 (11:39 +0000)]
Merge "wfMsgReplaceArgs: Don't use count(), if the actual amount of entries isn't needed"

8 years agoMerge "Give TestCase::checkHasDiff3 a better name"
jenkins-bot [Sun, 31 Jan 2016 11:39:46 +0000 (11:39 +0000)]
Merge "Give TestCase::checkHasDiff3 a better name"

8 years agoMerge "HTMLUserTextField: Enable suggestions for non-OOUI mode"
jenkins-bot [Sun, 31 Jan 2016 11:39:42 +0000 (11:39 +0000)]
Merge "HTMLUserTextField: Enable suggestions for non-OOUI mode"

8 years agoMerge "SpecialMovepage: Use hidden form fields to set hidden data, not the submit...
jenkins-bot [Sun, 31 Jan 2016 11:36:10 +0000 (11:36 +0000)]
Merge "SpecialMovepage: Use hidden form fields to set hidden data, not the submit button"

8 years agoAdd missing ResetUserEmail class to autoload.php
Florian [Sat, 30 Jan 2016 21:45:35 +0000 (22:45 +0100)]
Add missing ResetUserEmail class to autoload.php

The test in I3a426b92892f4c00cab33a13f6a717751120367c would prevent
the need of this commit :P

Follow up: I2b875326a0eb1e6d1f4bc758b8ac97b8f9324c4e

Change-Id: Id5efc5a5b43a1795c133f64025ea04f3e2d159cb

8 years agoClose a loophole in CookieSessionProvider
Brad Jorsch [Sat, 30 Jan 2016 15:54:24 +0000 (10:54 -0500)]
Close a loophole in CookieSessionProvider

There's a crazy-small chance that someone could have a logged-out
session (e.g. by logging out or visiting a page that creates a session
despite being logged out), then the session expires, then someone else
logs in and gets the same session ID (which is about a 1 in a
quindecillion chance), then the first person comes in and picks up the
second person's session.

To avoid that, if there's no UserID cookie set (or the cookie value is
0) then indicate that the SessionInfo is for a logged-out user.

No idea if this is actually what happened in T125283, but it's worth
fixing anyway.

Bug: T125283
Change-Id: I44096c69aa7bd285e4e2472959e8d892200c5f2c

8 years agoHTMLUserTextField: Enable suggestions for non-OOUI mode
Florian [Thu, 29 Oct 2015 18:00:59 +0000 (19:00 +0100)]
HTMLUserTextField: Enable suggestions for non-OOUI mode

Bug: T117067
Change-Id: I03eabf6ed5d5a36534a5eec76c05d0a353ebf6ff

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 30 Jan 2016 21:33:26 +0000 (22:33 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I2610945396e52544782c86e00c34bf64abf2a129

8 years agowfMsgReplaceArgs: Don't use count(), if the actual amount of entries isn't needed
Florian [Wed, 13 Jan 2016 17:55:08 +0000 (18:55 +0100)]
wfMsgReplaceArgs: Don't use count(), if the actual amount of entries isn't needed

The only use of the return value of count() is, to check, if the array is empty or
not. This can be done in an easier way and a bit more performant, especially for
large arrays.

Change-Id: If119ead9230ba1783b8c853c18c379f174910e51

8 years agoRemove unused functions from unroll of Article::__call
umherirrender [Sat, 30 Jan 2016 12:44:01 +0000 (13:44 +0100)]
Remove unused functions from unroll of Article::__call

With I779aa1c017abc9a17047fd5335f2d082148daa6f all public functions from
WikiPage were copied as delegator into Article.

Now remove the unused functions and add a release notes

Change-Id: I9cc79acedecb003048e1add568e8bba96ddbb41a

8 years agoStyle and commenting tweaks to CategoryMembershipChangeJob
Aaron Schulz [Sat, 30 Jan 2016 18:19:36 +0000 (10:19 -0800)]
Style and commenting tweaks to CategoryMembershipChangeJob

Also renamed safeWaitForPos() => safeWaitForMasterPos()

Change-Id: Ic89e2a0b17cd6e6ef09cf703bbbcea1988a5bde9

8 years agoMerge "Do not auto-reconnect to DBs if named locks where lost"
jenkins-bot [Sat, 30 Jan 2016 18:07:35 +0000 (18:07 +0000)]
Merge "Do not auto-reconnect to DBs if named locks where lost"

8 years agoMerge "Use slave for selects in CategoryMembershipJob"
jenkins-bot [Sat, 30 Jan 2016 17:51:10 +0000 (17:51 +0000)]
Merge "Use slave for selects in CategoryMembershipJob"

8 years agoUse slave for selects in CategoryMembershipJob
addshore [Fri, 29 Jan 2016 10:10:52 +0000 (11:10 +0100)]
Use slave for selects in CategoryMembershipJob

This patch switches to using a slave but imediatly
waits for the slave to catch up with master
(so as not to miss things).

This may result in more delay between an edit and
category changes being inserted.

It may be possible to instead wait for the timestamp
that is passed in $this->params['revTimestamp']
which could result in slightly less delay.

I can't see any uses of waitForReplication in quite
this way but see no imediate reason this would not work.

Bug: T125147
Change-Id: Ia0aa722c97f41a3959bcd3cb4210b39db0c3bc45

8 years agoDo not auto-reconnect to DBs if named locks where lost
Aaron Schulz [Sat, 30 Jan 2016 17:17:17 +0000 (09:17 -0800)]
Do not auto-reconnect to DBs if named locks where lost

Otherwise, transactions might be committed without cooperative
locks that were supposed to be present. This is similar to the
logic of not auto-reconnecting if a transaction was started to
avoid committing incomplete changes.

Change-Id: Ia7bc6b188bb5ee53a5bf7c5a30718bc7c4dd0ba9

8 years agoMake sure getScopedLockAndFlush() commits before unlocking
Aaron Schulz [Sat, 30 Jan 2016 16:52:06 +0000 (08:52 -0800)]
Make sure getScopedLockAndFlush() commits before unlocking

This is necessary for callers to see changes from prior callers

Change-Id: I5e05215541e641b5b5a4bc55c91d6ec8ef774ca1

8 years agoUse addDescription in resetUserEmail maint script
addshore [Sat, 30 Jan 2016 13:55:27 +0000 (14:55 +0100)]
Use addDescription in resetUserEmail maint script

Change-Id: Ib1eb8e3adc8deed0d09c1f655218144b2305d137

8 years agoAdd script to reset user emails
Max Semenik [Mon, 23 Nov 2015 23:32:33 +0000 (15:32 -0800)]
Add script to reset user emails

Current way to do it, via eval.php, is slightly scary.

Change-Id: I2b875326a0eb1e6d1f4bc758b8ac97b8f9324c4e

8 years agoMerge "Use addDescription() instead of accessing mDescription directly"
jenkins-bot [Sat, 30 Jan 2016 13:53:11 +0000 (13:53 +0000)]
Merge "Use addDescription() instead of accessing mDescription directly"

8 years agoMerge "Unroll Article::__call"
jenkins-bot [Sat, 30 Jan 2016 13:53:07 +0000 (13:53 +0000)]
Merge "Unroll Article::__call"

8 years agoMerge "Improve safeGetLag() return docs"
jenkins-bot [Sat, 30 Jan 2016 13:35:39 +0000 (13:35 +0000)]
Merge "Improve safeGetLag() return docs"

8 years agoMerge "Code style cleanups to notifyOnPageChange()"
jenkins-bot [Sat, 30 Jan 2016 13:35:34 +0000 (13:35 +0000)]
Merge "Code style cleanups to notifyOnPageChange()"

8 years agoMerge "Fix doc of LogFormatter::newFromRow"
jenkins-bot [Sat, 30 Jan 2016 12:24:49 +0000 (12:24 +0000)]
Merge "Fix doc of LogFormatter::newFromRow"

8 years agoUnroll Article::__call
umherirrender [Sat, 16 Jan 2016 16:44:37 +0000 (17:44 +0100)]
Unroll Article::__call

Add all public function from WikiPage to Article and replace the magic
__call

__call has the problem, that new functions to WikiPage will also be
available through Article.
It also makes deprecating of some functions harder. Having each function
as an own function will allow to add deprecated notice to just some and
maybe delete some functions earlier than others.

Also some static code analyzer can benefit from separately functions.

Change-Id: I779aa1c017abc9a17047fd5335f2d082148daa6f

8 years agoKill vestiges of SVN times
Max Semenik [Sat, 30 Jan 2016 01:02:36 +0000 (17:02 -0800)]
Kill vestiges of SVN times

Change-Id: Ib80c71ea93479eb326ac5afea295d4608f92babe

8 years agoUse addDescription() instead of accessing mDescription directly
Max Semenik [Sat, 30 Jan 2016 02:48:47 +0000 (18:48 -0800)]
Use addDescription() instead of accessing mDescription directly

Change-Id: I0e2aa83024b8abf5298cfea4b21bf45722ad3103

8 years agoMerge "Remove ApiBase::getVersion()"
jenkins-bot [Sat, 30 Jan 2016 02:38:24 +0000 (02:38 +0000)]
Merge "Remove ApiBase::getVersion()"

8 years agoUse autoloader for PHP data files instead of include/require
Tim Starling [Fri, 29 Jan 2016 05:19:58 +0000 (16:19 +1100)]
Use autoloader for PHP data files instead of include/require

Move ZhConversion.php and Names.php to languages/data and make them both
expose their data as static class variables instead of in the local
scope. This means that the autoloader can be used to load the data,
which is efficient and secure. This also makes additional request-local
caching of the arrays unnecessary.

Change-Id: Iafb96ac4165d0965fcb9a69f1d0a91139ea9790c

8 years agoSECURITY: Fix User::setToken() call on User::newSystemUser
Gergő Tisza [Thu, 28 Jan 2016 23:10:00 +0000 (17:10 -0600)]
SECURITY: Fix User::setToken() call on User::newSystemUser

This was supposed to reset the user token but did set it to '1'
because User::setToken accepts bool/string but only treats true
as bool.

Bug: T125161
Change-Id: Ia4196eba92cd4d170a3023db0f540a2972ffad4f

8 years agoRemove ApiBase::getVersion()
Max Semenik [Sat, 30 Jan 2016 01:16:31 +0000 (17:16 -0800)]
Remove ApiBase::getVersion()

Deprecated in 1.21, removal does not break old extensions still overriding
it.

Change-Id: I24028eab8800373410c6b72a74715f3525c2f7ae

8 years agoSessionManager: Don't save non-persisted sessions to backend storage
Brad Jorsch [Fri, 29 Jan 2016 23:02:11 +0000 (18:02 -0500)]
SessionManager: Don't save non-persisted sessions to backend storage

This introduces an in-process cache (using a HashBagOStuff) for session
data, and only saves to the external cache when the session is
persisted.

Bug: T125267
Change-Id: Ie161e0f7522cd68515b060ad8cf8c151b7198b0b

8 years agoCode style cleanups to notifyOnPageChange()
Aaron Schulz [Sat, 30 Jan 2016 00:03:29 +0000 (16:03 -0800)]
Code style cleanups to notifyOnPageChange()

Change-Id: I08593be2eba6417cdfae31b1aa1021da7db00c74

8 years agoImprove safeGetLag() return docs
Aaron Schulz [Fri, 29 Jan 2016 23:09:59 +0000 (15:09 -0800)]
Improve safeGetLag() return docs

Change-Id: I7b2d0d96901412abe8bdf9abee39e6d545c94644

8 years agoFix IDEA error in safeWaitForPos()
Aaron Schulz [Fri, 29 Jan 2016 22:47:38 +0000 (14:47 -0800)]
Fix IDEA error in safeWaitForPos()

Change-Id: Iecb023925177be05282f67e48056aeb8f2a9703c

8 years agoMerge "Add LoadBalancer::safeWaitForPos()"
jenkins-bot [Fri, 29 Jan 2016 22:19:55 +0000 (22:19 +0000)]
Merge "Add LoadBalancer::safeWaitForPos()"

8 years agoMerge "MessageCache: Don't get a ParserOptions for $wgUser before the end of Setup...
jenkins-bot [Fri, 29 Jan 2016 21:55:54 +0000 (21:55 +0000)]
Merge "MessageCache: Don't get a ParserOptions for $wgUser before the end of Setup.php"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 29 Jan 2016 21:16:33 +0000 (22:16 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ic30a1de26fc701c3147e1c324152c35d03fb3645

8 years agoAdd LoadBalancer::safeWaitForPos()
Aaron Schulz [Fri, 29 Jan 2016 21:00:08 +0000 (13:00 -0800)]
Add LoadBalancer::safeWaitForPos()

This is useful for waiting on a specific slave handle to
reach a given master position.

Change-Id: Ia4569c4fc82c25eb4089cf7198f01e349636e2c7

8 years agoMerge "Add IDatabase::getScopedLockAndFlush() method"
jenkins-bot [Fri, 29 Jan 2016 20:54:10 +0000 (20:54 +0000)]
Merge "Add IDatabase::getScopedLockAndFlush() method"

8 years agoMerge "Remove $wgEnotifUseJobQ"
jenkins-bot [Fri, 29 Jan 2016 20:43:10 +0000 (20:43 +0000)]
Merge "Remove $wgEnotifUseJobQ"

8 years agoMerge "Remove $wgDataCenterId/$wgDataCenterRoles"
jenkins-bot [Fri, 29 Jan 2016 20:43:03 +0000 (20:43 +0000)]
Merge "Remove $wgDataCenterId/$wgDataCenterRoles"

8 years agoAdd IDatabase::getScopedLockAndFlush() method
Aaron Schulz [Sun, 17 Jan 2016 10:40:53 +0000 (02:40 -0800)]
Add IDatabase::getScopedLockAndFlush() method

This method is less manual and avoids the usual pitfalls of
not unlocking for a return statement or not flushing out any
prior transaction.

Change-Id: Ib1681244767de860105a68210e181e2f024ee525

8 years agoRemove $wgEnotifUseJobQ
Aaron Schulz [Fri, 22 Jan 2016 04:14:44 +0000 (20:14 -0800)]
Remove $wgEnotifUseJobQ

Always treat this as on and simplify the code.
This will also make it easier to move updateWatchlistTimestamp() into
the EnotifNotifyJob class to avoid query timeouts.

Change-Id: I8ceaa42cdcfe3ad00a26368be6a73052be329045

8 years agoMerge "Use InvalidArgumentException in ActivityUpdateJob"
jenkins-bot [Fri, 29 Jan 2016 20:21:37 +0000 (20:21 +0000)]
Merge "Use InvalidArgumentException in ActivityUpdateJob"

8 years agoRemove $wgDataCenterId/$wgDataCenterRoles
Aaron Schulz [Fri, 29 Jan 2016 20:09:56 +0000 (12:09 -0800)]
Remove $wgDataCenterId/$wgDataCenterRoles

These ended up not getting used after some patch changes

Change-Id: I7c56d58972d1efcca6a249b7fb4d422a4006da88

8 years agoMerge "Make WatchedItem members private"
jenkins-bot [Fri, 29 Jan 2016 19:59:56 +0000 (19:59 +0000)]
Merge "Make WatchedItem members private"

8 years agoUse InvalidArgumentException in ActivityUpdateJob
Aaron Schulz [Fri, 29 Jan 2016 19:56:04 +0000 (11:56 -0800)]
Use InvalidArgumentException in ActivityUpdateJob

Change-Id: Ib73c02868327d5e8f286bce79cdf44ebb1f47ff3

8 years agoMake WatchedItem members private
addshore [Fri, 29 Jan 2016 19:39:23 +0000 (20:39 +0100)]
Make WatchedItem members private

These are only used in this class

Change-Id: I492e7f5b0611f8928b352af983f18f5184bc54bf

8 years agoRemove WatchedItem::IMMEDIATE and DEFERRED
addshore [Fri, 29 Jan 2016 19:10:26 +0000 (20:10 +0100)]
Remove WatchedItem::IMMEDIATE and DEFERRED

It looks like this used to actually be used
since Ie60e20162fd833e64d81763a6aa1dc3faf2162f3
but since the global wgActivityUpdatesUseJobQueue
seems to have been removed from the code.

Thus this stuff is doing nothing and
things are always DEFERRED.

Change-Id: I08cb6051f52e0f0402542d8326f03f115bb00943

8 years agoMessageCache: Don't get a ParserOptions for $wgUser before the end of Setup.php
Brad Jorsch [Fri, 29 Jan 2016 19:30:25 +0000 (14:30 -0500)]
MessageCache: Don't get a ParserOptions for $wgUser before the end of Setup.php

Until Setup.php completes, we can't access the "current" user and trying
to do so logs a warning. So don't try.

Bug: T124367
Change-Id: If31230407829c04f34d9cfefcbb97edacb949b6d

8 years agoMerge "Hide category changes if feature is disabled"
jenkins-bot [Fri, 29 Jan 2016 19:30:10 +0000 (19:30 +0000)]
Merge "Hide category changes if feature is disabled"