lhc/web/wiklou.git
8 years agoUse HTMLForm in Special:AllPages
Glaisher [Wed, 28 Oct 2015 12:29:45 +0000 (17:29 +0500)]
Use HTMLForm in Special:AllPages

Renamed namespaceForm to outputHTMLForm and make it protected
Also made sure that this is the only place where it's used
https://github.com/search?q=namespaceForm+%40wikimedia&ref=reposearch&type=Code

Also make HTMLSelectNamespace's work when 'all' is set to null.

Change-Id: Ia559b52464bceaf1202e3a6696728781bb62cdbc

8 years agoMerge "Don't link to title on "htmlform-title-not-exists""
jenkins-bot [Thu, 5 Nov 2015 13:48:30 +0000 (13:48 +0000)]
Merge "Don't link to title on "htmlform-title-not-exists""

8 years agoMerge "Add example of help for all query submodules"
jenkins-bot [Thu, 5 Nov 2015 13:43:26 +0000 (13:43 +0000)]
Merge "Add example of help for all query submodules"

8 years agoAdd example of help for all query submodules
S Page [Thu, 5 Nov 2015 02:38:28 +0000 (18:38 -0800)]
Add example of help for all query submodules

It's useful and shows difference from recursivesubmodules.

Change-Id: I85cb5c89fde0063bbd9dfc86d00c14553035f053

8 years agoRemoved raw HTML from tags-create-explanation message in SpecialTags.php
This, that and the other [Wed, 4 Nov 2015 23:47:23 +0000 (10:47 +1100)]
Removed raw HTML from tags-create-explanation message in SpecialTags.php

Bug: T111754
Change-Id: I0d1e84fae279845d1fa4f273e7c718010230eb36

8 years agoMerge "Allow passing detailed permission errors data to API"
jenkins-bot [Wed, 4 Nov 2015 22:38:47 +0000 (22:38 +0000)]
Merge "Allow passing detailed permission errors data to API"

8 years agoFindOrphanedFiles cleanups
Aaron Schulz [Wed, 4 Nov 2015 22:04:56 +0000 (14:04 -0800)]
FindOrphanedFiles cleanups

* Avoid empty DB list errors for some batches
* Use more convenient cannonical URLs

Change-Id: I37f59e0747525603828897196eabd6c64740aa02

8 years agoMerge "ApiQueryInfo.php: Add code and direction of the page content language"
jenkins-bot [Wed, 4 Nov 2015 21:02:30 +0000 (21:02 +0000)]
Merge "ApiQueryInfo.php: Add code and direction of the page content language"

8 years agoAPI: Forwards-compatibility for ApiTokens
Brad Jorsch [Wed, 4 Nov 2015 20:31:19 +0000 (15:31 -0500)]
API: Forwards-compatibility for ApiTokens

To make it easier for stuff to transition, allow action=tokens to return
the new types that action=query&meta=tokens supports.

Change-Id: I83887e555d54978b392933b4a3f6dada7ed00793

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 4 Nov 2015 20:03:34 +0000 (21:03 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ie228d496a844a954129782cac466cf691be4f3df

8 years agoMonologSpi: add support for customizing Monolog\Logger instances
Bryan Davis [Sun, 25 Oct 2015 21:39:44 +0000 (15:39 -0600)]
MonologSpi: add support for customizing Monolog\Logger instances

Proposed upstream changes to Monolog\Logger will require an ability to
call setter methods on newly created Logger instances to tune them for
use in high volume logging situations. Adding support for making these
types of adjustments to MediaWiki's Monolog integration will benefit
users of the updated library when they land upstream.

Arbitrary setters are called by adding a 'calls' array to the logger
specification. This array uses method names as keys and method arguments
as values. This syntax mirrors the setter invocation behavior of
ObjectFactory with the notable omission of Closure expansion in the
argument list before calling the Logger's setter method.

Bug: T116550
Change-Id: I990c7f00f57451f14954542f5404491b2660a0b7

8 years agoApiQueryInfo.php: Add code and direction of the page content language
Fomafix [Wed, 4 Nov 2015 16:50:48 +0000 (16:50 +0000)]
ApiQueryInfo.php: Add code and direction of the page content language

This change introduces two new keys in the response:
* "pagelanguagehtmlcode" for the BCP 47 conform language code
* "pagelanguagedir" for the direction of the language

Example:
 "pagelanguagehtmlcode": "en-GB"
 "pagelanguagedir": "ltr"

The existing key "pagelanguage" contains the internal language code format:
 "pagelanguage": "en-gb"

This duplication avoids reimplementing wfBCP47() and a mapping from
all language codes to the direction of the languages in JavaScript.

Bug: T117392
Change-Id: I26d033e33bfa60c8ff72ba70bb564cba4303a8b6

8 years agoMerge "HTMLFormField: Do not double-escape label in OOUI mode"
jenkins-bot [Wed, 4 Nov 2015 14:14:42 +0000 (14:14 +0000)]
Merge "HTMLFormField: Do not double-escape label in OOUI mode"

8 years agoRemove deprecated SiteObject and SiteArray classes
aude [Wed, 4 Nov 2015 12:16:10 +0000 (13:16 +0100)]
Remove deprecated SiteObject and SiteArray classes

SiteObject and SiteArray were deprecated in 1.21 and
can't find any use of them anywhere else in gerrit.

Change-Id: Iff3ba8a60ac9566998cce828c4034066fdefe804

8 years agoMerge "hooks.txt: don't use deprecated hooks in examples"
jenkins-bot [Wed, 4 Nov 2015 02:40:24 +0000 (02:40 +0000)]
Merge "hooks.txt: don't use deprecated hooks in examples"

8 years agoMerge "Remove WikiPage::doQuickEdit"
jenkins-bot [Wed, 4 Nov 2015 02:27:33 +0000 (02:27 +0000)]
Merge "Remove WikiPage::doQuickEdit"

8 years agohooks.txt: don't use deprecated hooks in examples
Ori Livneh [Wed, 4 Nov 2015 02:19:10 +0000 (18:19 -0800)]
hooks.txt: don't use deprecated hooks in examples

Change-Id: I01228e066de46f91d452767516ae0a11a9915bef

8 years agoRemove WikiPage::doQuickEdit
Aaron Schulz [Wed, 4 Nov 2015 02:13:45 +0000 (18:13 -0800)]
Remove WikiPage::doQuickEdit

Change-Id: If56f790b8a29b2262cba0feff7a96312c69cdb0c

8 years agoConvert ChangesList from MapCacheLRU to HashBagOStuff
Timo Tijhof [Tue, 3 Nov 2015 06:39:09 +0000 (06:39 +0000)]
Convert ChangesList from MapCacheLRU to HashBagOStuff

Also make use of getWithSetCallback() while at it.

Change-Id: I6bd29db7c6564fcaf4489ec0f226ac83bafc75e8

8 years agoobjectcache: Make HashBagOStuff LRU instead of least-recently-set
Aaron Schulz [Tue, 3 Nov 2015 10:06:40 +0000 (02:06 -0800)]
objectcache: Make HashBagOStuff LRU instead of least-recently-set

Refresh key in get() in addition to just set().

Change-Id: I7985b98b6a346eaed8bf0a7349b95fabea8e8614

8 years agoMerge "resourceloader: Use WAN cache for validateScriptFile cache"
jenkins-bot [Wed, 4 Nov 2015 01:19:57 +0000 (01:19 +0000)]
Merge "resourceloader: Use WAN cache for validateScriptFile cache"

8 years agoresourceloader: Use WAN cache for validateScriptFile cache
Aaron Schulz [Tue, 3 Nov 2015 13:12:28 +0000 (05:12 -0800)]
resourceloader: Use WAN cache for validateScriptFile cache

This keeps core callers more consistent.

Change-Id: I5e06a963a5e10204445a01c00109b46a6971bcfe

8 years agoAdd updateRevisionOn() sanity check for existing pages too
Aaron Schulz [Wed, 4 Nov 2015 00:44:52 +0000 (16:44 -0800)]
Add updateRevisionOn() sanity check for existing pages too

Change-Id: I4f2fc07b0365183efb431a828d40c557b691b18c

8 years agoHTMLFormField: Do not double-escape label in OOUI mode
Bartosz Dziewoński [Wed, 4 Nov 2015 00:15:29 +0000 (01:15 +0100)]
HTMLFormField: Do not double-escape label in OOUI mode

$this->getLabel() returns already parsed HTML. Who'd have thought?
https://www.wikidata.org/wiki/Wikidata:Contact_the_development_team#Display_issue_on_Special:NewItem

Change-Id: I52aa9b78fde27d4a16b3636fa6b70d3c69ff2346

8 years agoMerge "Add Timing interface"
jenkins-bot [Tue, 3 Nov 2015 23:36:57 +0000 (23:36 +0000)]
Merge "Add Timing interface"

8 years agoMerge "Avoid use of rollback() in WikiPage::doEditContent()"
jenkins-bot [Tue, 3 Nov 2015 23:36:53 +0000 (23:36 +0000)]
Merge "Avoid use of rollback() in WikiPage::doEditContent()"

8 years agoAvoid use of rollback() in WikiPage::doEditContent()
Aaron Schulz [Wed, 7 Oct 2015 20:01:20 +0000 (13:01 -0700)]
Avoid use of rollback() in WikiPage::doEditContent()

* Use the CAS style page row checks instead
* This a first step towards switching to startAtomic/endAtomic
* Only a sanity check uses rollback() now, which should never
  be hit unless there is a serious DB layer bug

Change-Id: Ideb189f918dee5d3e3c7b91cb92179df514ef35a

8 years agoAdd Timing interface
Ori Livneh [Tue, 3 Nov 2015 02:26:07 +0000 (18:26 -0800)]
Add Timing interface

* Add `Timing`, an interface which mimics the W3C User Timing API.
  It provides a canonical way to store and retrieve markers (timestamps)
  and measures (timestamps + duration).
* As the initial use-case, use it to record 'requestShutdown'.

Change-Id: I36b29162ffcc091406df025463b0e2797e52f19a

8 years agomw.widgets.ComplexTitleInputWidget: Add infusion helpers
Bartosz Dziewoński [Thu, 1 Oct 2015 23:30:52 +0000 (01:30 +0200)]
mw.widgets.ComplexTitleInputWidget: Add infusion helpers

* reusePreInfuseDOM
* gatherPreInfuseState
* restorePreInfuseState

Depends on I3c21b3710d16dbb4dbcbdd3871a70fdfd0e7b536 in OOjs UI.

Bug: T114134
Bug: T117310
Change-Id: I939551579fe1d03603d65b3562c1c977681994a6

8 years agoMerge "phpcs: Fix some "Single space expected before elseif""
jenkins-bot [Tue, 3 Nov 2015 22:10:54 +0000 (22:10 +0000)]
Merge "phpcs: Fix some "Single space expected before elseif""

8 years agoUpdate OOjs UI to v0.13.1
James D. Forrester [Tue, 3 Nov 2015 21:44:50 +0000 (13:44 -0800)]
Update OOjs UI to v0.13.1

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

Change-Id: Ic8fbb6ee4326c73243ea655708b9cfd09bc7e52a

8 years agoMerge "Add comment to unused EDIT_DEFER_UPDATES in Defines.php"
jenkins-bot [Tue, 3 Nov 2015 20:59:33 +0000 (20:59 +0000)]
Merge "Add comment to unused EDIT_DEFER_UPDATES in Defines.php"

8 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Tue, 3 Nov 2015 20:29:17 +0000 (20:29 +0000)]
Merge "Localisation updates from https://translatewiki.net."

8 years agoMerge "Add WebResponse::clearCookie()"
jenkins-bot [Tue, 3 Nov 2015 20:25:42 +0000 (20:25 +0000)]
Merge "Add WebResponse::clearCookie()"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 3 Nov 2015 20:24:41 +0000 (21:24 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ifcaf9a55495655536dea379abeab91c265d47e36

8 years agoAdd WebResponse::clearCookie()
Gergő Tisza [Tue, 3 Nov 2015 08:45:41 +0000 (00:45 -0800)]
Add WebResponse::clearCookie()

Easier-to-read alias for setCookie(..., '', time() - 86400).

Change-Id: I0357c4a38085c4754bf6ff7e40756179d19b912d

8 years agoMerge "API: Log all deprecated parameter uses to api-feature-usage.log"
jenkins-bot [Tue, 3 Nov 2015 18:20:43 +0000 (18:20 +0000)]
Merge "API: Log all deprecated parameter uses to api-feature-usage.log"

8 years agoMerge "Change Special:ChangePassword to use OOUI"
jenkins-bot [Tue, 3 Nov 2015 18:03:32 +0000 (18:03 +0000)]
Merge "Change Special:ChangePassword to use OOUI"

8 years agoAPI: Log all deprecated parameter uses to api-feature-usage.log
Brad Jorsch [Tue, 3 Nov 2015 17:18:29 +0000 (12:18 -0500)]
API: Log all deprecated parameter uses to api-feature-usage.log

Some were being logged, and some weren't. Let's log them all
automatically when PARAM_DEPRECATED is processed, instead of requiring
each module to manually log them.

Bug: T117569
Change-Id: Ia38aeeccd0b9857b12b28914f509284483fbcca8

8 years agoMerge "Avoid "$text must be a string" in Linker::formatLinksInComment"
jenkins-bot [Tue, 3 Nov 2015 15:33:17 +0000 (15:33 +0000)]
Merge "Avoid "$text must be a string" in Linker::formatLinksInComment"

8 years agoChange Special:ChangePassword to use OOUI
Florian [Tue, 15 Sep 2015 17:54:02 +0000 (19:54 +0200)]
Change Special:ChangePassword to use OOUI

In order to work with OOUI properly, SpecialChangePassword::attemptReset() doesn't
throw PasswordErrors anymore. It now returns a Status object which
is set to fatal, if some requirement doesn't meet.

In OOUIHTMLForm: Handle Message objects as errors correctly. It's a valid parameter
for fatal to use a Message object instead of a message key, so OOUIHTMLForm needs
to handle Mesage objects as Message objects (can be parsed directly) instead of using
it as a message key (which usually doesn't exist).

Bug: T78373
Change-Id: Id768833bbd966cdeadd5a13fdb64b636ea2062ef

8 years agoMerge "Move brace matching rules to Preprocessor class"
jenkins-bot [Tue, 3 Nov 2015 11:24:03 +0000 (11:24 +0000)]
Merge "Move brace matching rules to Preprocessor class"

8 years agoMerge "Improve BacklinkCache field docs"
jenkins-bot [Tue, 3 Nov 2015 11:10:45 +0000 (11:10 +0000)]
Merge "Improve BacklinkCache field docs"

8 years agoMerge "Improve MIME detection in FileBackend"
jenkins-bot [Tue, 3 Nov 2015 11:10:41 +0000 (11:10 +0000)]
Merge "Improve MIME detection in FileBackend"

8 years agoMerge "Avoid "headers already sent" error in jobs for UseDC cookie"
jenkins-bot [Tue, 3 Nov 2015 10:58:07 +0000 (10:58 +0000)]
Merge "Avoid "headers already sent" error in jobs for UseDC cookie"

8 years agoImprove BacklinkCache field docs
Aaron Schulz [Tue, 3 Nov 2015 10:56:30 +0000 (02:56 -0800)]
Improve BacklinkCache field docs

Change-Id: I8303d5577ac84b8882e5ad79ac3058d6bf49356f

8 years agoMerge "Add script to find orphaned LocalRepo files"
jenkins-bot [Tue, 3 Nov 2015 10:48:31 +0000 (10:48 +0000)]
Merge "Add script to find orphaned LocalRepo files"

8 years agoMerge "resourceloader: Sanitize lang with isValidBuiltInCode(), not isValidCode()"
jenkins-bot [Tue, 3 Nov 2015 10:42:16 +0000 (10:42 +0000)]
Merge "resourceloader: Sanitize lang with isValidBuiltInCode(), not isValidCode()"

8 years agoMerge "objectcache: Add a clear() method to HashBagOStuff"
Aaron Schulz [Tue, 3 Nov 2015 10:16:19 +0000 (10:16 +0000)]
Merge "objectcache: Add a clear() method to HashBagOStuff"

8 years agoMerge "objectcache: Refresh key in HashBagOStuff::set() for maxKeys eviction"
jenkins-bot [Tue, 3 Nov 2015 10:13:08 +0000 (10:13 +0000)]
Merge "objectcache: Refresh key in HashBagOStuff::set() for maxKeys eviction"

8 years agoobjectcache: Add a clear() method to HashBagOStuff
Timo Tijhof [Tue, 3 Nov 2015 06:49:13 +0000 (06:49 +0000)]
objectcache: Add a clear() method to HashBagOStuff

Including tests for delete() and clear().

Change-Id: If39d729838e312523f0df3ae8b235ebe939a17fd

8 years agoobjectcache: Refresh key in HashBagOStuff::set() for maxKeys eviction
Timo Tijhof [Tue, 3 Nov 2015 05:59:07 +0000 (05:59 +0000)]
objectcache: Refresh key in HashBagOStuff::set() for maxKeys eviction

* Match behaviour of MapCacheLRU and ProcessCacheLRU.
* Add missing unit tests for TTL and maxCacheKeys eviction behaviour.

Change-Id: I559eae1cd336274b21728e86775cfbad7e2f2c6d

8 years agoMerge "objectcache: Move unit tests for HashBagOStuff to its own suite"
jenkins-bot [Tue, 3 Nov 2015 09:22:27 +0000 (09:22 +0000)]
Merge "objectcache: Move unit tests for HashBagOStuff to its own suite"

8 years agoMerge "objectcache: Add TTL_INDEFINITE to IExpiringStore"
jenkins-bot [Tue, 3 Nov 2015 09:22:23 +0000 (09:22 +0000)]
Merge "objectcache: Add TTL_INDEFINITE to IExpiringStore"

8 years agoMerge "LinkCache: Remove deprecated getBadLinks and getGoodLinks methods"
jenkins-bot [Tue, 3 Nov 2015 09:12:00 +0000 (09:12 +0000)]
Merge "LinkCache: Remove deprecated getBadLinks and getGoodLinks methods"

8 years agoMerge "OutputPage: documentation for (semi-)deprecated methods"
jenkins-bot [Tue, 3 Nov 2015 07:04:14 +0000 (07:04 +0000)]
Merge "OutputPage: documentation for (semi-)deprecated methods"

8 years agoobjectcache: Add TTL_INDEFINITE to IExpiringStore
Timo Tijhof [Tue, 3 Nov 2015 06:36:06 +0000 (06:36 +0000)]
objectcache: Add TTL_INDEFINITE to IExpiringStore

Especially useful when interacting with getWithSetCallback of
HashBagOStuff where a $exptime is required before the callback.

In set() it is typically left out and thus not as counter-intuitive.

Change-Id: Ic2f7adda3c00cefe701d77bea91a7e8e77ef1439

8 years agoLinkCache: Remove deprecated getBadLinks and getGoodLinks methods
Timo Tijhof [Tue, 3 Nov 2015 06:05:22 +0000 (06:05 +0000)]
LinkCache: Remove deprecated getBadLinks and getGoodLinks methods

Deprecated since MediaWiki 1.26 (32d1017e7d). These methods contain the
only remaining callers of MapCacheLRU::getAllKeys() which is the only odd
method of MapCacheLRU not supported by BagOStuff.

Change-Id: I64e054803595d49a5bd779accc94353924f7d87d

8 years agoobjectcache: Move unit tests for HashBagOStuff to its own suite
Timo Tijhof [Tue, 3 Nov 2015 05:28:18 +0000 (05:28 +0000)]
objectcache: Move unit tests for HashBagOStuff to its own suite

Follows-up 7cddc22.

Also use PHPUnit_Framework_TestCase as parent instead of MediaWikiTestCase
in preparation for library extraction.

Change-Id: I0e68e56ecf8376b52a59c33ba6dd18b671bdcfc9

8 years agoMerge "Make SqlBagOStuff respect WRITE_SYNC flag"
jenkins-bot [Tue, 3 Nov 2015 05:27:38 +0000 (05:27 +0000)]
Merge "Make SqlBagOStuff respect WRITE_SYNC flag"

8 years agoAvoid "headers already sent" error in jobs for UseDC cookie
Aaron Schulz [Mon, 2 Nov 2015 23:52:37 +0000 (15:52 -0800)]
Avoid "headers already sent" error in jobs for UseDC cookie

Bug: T115413
Change-Id: Ic6050bef04adbda2557422bf60b2ebe300c89629

8 years agoMake SqlBagOStuff respect WRITE_SYNC flag
Aaron Schulz [Sat, 31 Oct 2015 10:35:44 +0000 (03:35 -0700)]
Make SqlBagOStuff respect WRITE_SYNC flag

Also remove some pointless newlines in class.

Change-Id: I75880c56b1eac63c9a0616ca10890904ce823a99

8 years agoMove brace matching rules to Preprocessor class
Ori Livneh [Sat, 31 Oct 2015 23:10:54 +0000 (16:10 -0700)]
Move brace matching rules to Preprocessor class

Instead of declaring the array of rules within both Preprocessor_DOM:: and
Preprocessor_Hash::preprocessToXml(), declare it as a protected property of the
parent Preprocessor class.

Change-Id: I6193de66566c164fe85cdd6a88c04fa9c565f1a9

8 years agoMerge "TOC: Separate columns for tocnumber and toctext"
jenkins-bot [Tue, 3 Nov 2015 01:40:43 +0000 (01:40 +0000)]
Merge "TOC: Separate columns for tocnumber and toctext"

8 years agoTOC: Separate columns for tocnumber and toctext
Fomafix [Fri, 13 Mar 2015 07:49:24 +0000 (07:49 +0000)]
TOC: Separate columns for tocnumber and toctext

IE 7 and lower ignores these definitions and shows the TOC as before.

Bug: T92481
Change-Id: Ibed5f02f04e63a4152109ddf9c2a23f4e45880ca

8 years agogallery.js: Do not resize gallery caption
Fomafix [Mon, 2 Nov 2015 05:50:57 +0000 (05:50 +0000)]
gallery.js: Do not resize gallery caption

Resize only gallerybox which contains resized images.

Bug: T91075
Change-Id: Idcaf22fbaabaa26c8d06f5dd0194d4ed7c7b1a60

8 years agoLet Import also read CDATA as content
Matthias Mullie [Wed, 14 Oct 2015 09:14:51 +0000 (11:14 +0200)]
Let Import also read CDATA as content

Change-Id: I55275e20bb2fd589247fca5c44fd54d1ae9ff686

8 years agoMerge "Convert JobQueueDB to using the WAN cache"
jenkins-bot [Tue, 3 Nov 2015 00:29:35 +0000 (00:29 +0000)]
Merge "Convert JobQueueDB to using the WAN cache"

8 years agoMerge "mw.widgets.TitleWidget: Correct documentation"
jenkins-bot [Tue, 3 Nov 2015 00:12:48 +0000 (00:12 +0000)]
Merge "mw.widgets.TitleWidget: Correct documentation"

8 years agoMerge "User: Migrate from foreign cache to global cache for UserRightsProxy"
jenkins-bot [Mon, 2 Nov 2015 23:51:52 +0000 (23:51 +0000)]
Merge "User: Migrate from foreign cache to global cache for UserRightsProxy"

8 years agoMerge "Convert SiteStatsUpdate to using getMainStashInstance()"
jenkins-bot [Mon, 2 Nov 2015 22:47:10 +0000 (22:47 +0000)]
Merge "Convert SiteStatsUpdate to using getMainStashInstance()"

8 years agomw.widgets.TitleWidget: Correct documentation
Bartosz Dziewoński [Mon, 2 Nov 2015 22:35:44 +0000 (23:35 +0100)]
mw.widgets.TitleWidget: Correct documentation

Change-Id: If1ea6d411b57b4cb6e60f400a86351dc3dc7acbc

8 years agoRemove getLocalServerInstance try/catch in UIDGenerator and DBLockManager
Timo Tijhof [Mon, 2 Nov 2015 21:45:43 +0000 (21:45 +0000)]
Remove getLocalServerInstance try/catch in UIDGenerator and DBLockManager

Follows-up 17c91ad610 in which the exception was removed.

Change-Id: If0c8465d0e04f69f29f3f2602dac7ae4538f7542

8 years agoMerge "Replace newAccelerator() with getLocalServerInstance()"
jenkins-bot [Mon, 2 Nov 2015 22:04:21 +0000 (22:04 +0000)]
Merge "Replace newAccelerator() with getLocalServerInstance()"

8 years agoUser: Migrate from foreign cache to global cache for UserRightsProxy
Timo Tijhof [Tue, 27 Oct 2015 23:43:40 +0000 (23:43 +0000)]
User: Migrate from foreign cache to global cache for UserRightsProxy

Avoid having one wiki access another wiki's local keyspace.
Instead, use the global keyspace to share values across wikis.

Also, imitating wfMemcKey from wfForeignMemcKey was semantically
incorrect due to $wgCachePrefix having precedence. Most interfaces
(e.g. UserRightsProxy, FileRepo, JobQueue etc.) only have access
to the wiki id (dbname + prefix). The local cache configuration
for wgCachePrefix is not and shouldn't have to be exposed.

Start enforcing that local cache keys are left private and
to share keys, one must use global keys.

Global keys (prefixed with "global:") have their own space and we
can use the wiki-id as regular key segment for keys about users.

Also:
* Expose a method to keep formatting of this key in one place.
  As it used used in many different places in core, as well
  as in CentralAuth.
* Make use of wfWikiId() in getDefaultKeyspace() to avoid
  duplicating this logic.

Change-Id: I58836a24b9e239f460ab489bd2fe8ced8259833c

8 years agoReplace newAccelerator() with getLocalServerInstance()
Aaron Schulz [Sat, 31 Oct 2015 18:42:48 +0000 (11:42 -0700)]
Replace newAccelerator() with getLocalServerInstance()

The name is clearer and more consistent, with simpler arguments.

Change-Id: I7205a99ce033e8b086a52cd02c8a721e99c84b1e

8 years agoRevert "Add MediaWiki-Timestamp header to ResourceLoader requests"
Ori Livneh [Mon, 2 Nov 2015 21:36:07 +0000 (13:36 -0800)]
Revert "Add MediaWiki-Timestamp header to ResourceLoader requests"

I have not had the time and wherewithal to write the follow-up code that
actually uses this value. So just remove it for now.
This reverts commit 3d5aca4a406424bf69016f9c7c4a94b317b62d25.

Change-Id: Ice9b65f39802b55b3d4ddf801c06d1be3227fd5b

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 2 Nov 2015 21:19:27 +0000 (22:19 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I57ee8f81dffb1b08e3dd37ada05711548fbeeb71

8 years agoMerge "Installer: Validate password against sysop/bureaucrat policies"
jenkins-bot [Mon, 2 Nov 2015 19:35:52 +0000 (19:35 +0000)]
Merge "Installer: Validate password against sysop/bureaucrat policies"

8 years agoAllow passing detailed permission errors data to API
Bartosz Dziewoński [Mon, 19 Oct 2015 12:30:40 +0000 (14:30 +0200)]
Allow passing detailed permission errors data to API

Using the new system introduced in
1c57794e371d74e1d88748de567a1c3358c3ad2e (see T47843).

This change allows Title::getUserPermissionsErrors() to include
MessageSpecifiers instead of string message keys in its return value.
This doesn't seem to have any bad effects, and should work seamlessly as
long as callers aren't trying to do anything stupid and just pass the
value to PermissionsError or OutputPage::showPermissionsErrorPage()
or wfMessage() or some such.

If the callers *are* trying something stupid, nothing worse than
duplicated or otherwise less-than-perfect error messages (in code
which tries to handle some message keys specially) should happen.
(I fixed wfMergeErrorArrays(), but who knows what else lurks in all
this code.) Any problems should only affect new-style errors using
MessageSpecifier, though.

Since MessageSpecifiers tend to be stringable, we probably won't get
fatals, but might get incorrect checks. Should we try to log this
happening somehow?

Goes with I42a0c5b0ea7e61088dd609b764dd7d1396c60cd5 in TitleBlacklist.

Bug: T115258
Change-Id: I1334ba21a2862973a9d8ff5be2c9bec06a82698b

8 years agoMake makeKeyInternal() limit more conservative
Aaron Schulz [Mon, 2 Nov 2015 03:19:38 +0000 (19:19 -0800)]
Make makeKeyInternal() limit more conservative

This should avoid error log entries for long WAN cache keys

Change-Id: I401482d25dd5bf47052a3c6729c5f8bc9fd68770

8 years agoImprove MIME detection in FileBackend
Aaron Schulz [Fri, 14 Nov 2014 06:47:06 +0000 (22:47 -0800)]
Improve MIME detection in FileBackend

The content type detector will now inspect the file contents
to better handle extensionless files.

Also dependency inject the callback and make the default one
use FileInfo.

Change-Id: Iad59bf6c6a416b706f976a4c425763fd30e2debb

8 years agoMerge "Normalize header case for FileBackend operations"
jenkins-bot [Sun, 1 Nov 2015 23:28:22 +0000 (23:28 +0000)]
Merge "Normalize header case for FileBackend operations"

8 years agoMerge "phpcs: Fix some "Assignment expression not allowed""
jenkins-bot [Sun, 1 Nov 2015 22:42:19 +0000 (22:42 +0000)]
Merge "phpcs: Fix some "Assignment expression not allowed""

8 years agoMerge "mw.html: Document mw.html.elements optional parameters"
jenkins-bot [Sun, 1 Nov 2015 22:38:47 +0000 (22:38 +0000)]
Merge "mw.html: Document mw.html.elements optional parameters"

8 years agoMerge "Fixed arguments syntax in hooks.txt"
jenkins-bot [Sun, 1 Nov 2015 20:42:22 +0000 (20:42 +0000)]
Merge "Fixed arguments syntax in hooks.txt"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 1 Nov 2015 20:27:14 +0000 (21:27 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: If418ae5921eefe082e19851a35f6745b25aeda92

8 years agophpcs: Fix some "Assignment expression not allowed"
umherirrender [Sun, 1 Nov 2015 19:56:20 +0000 (20:56 +0100)]
phpcs: Fix some "Assignment expression not allowed"

Found by new version of mediawiki/codesniffer
https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs/1939/consoleFull

Change-Id: I673f71fd0dfc8d6ba1ce6c3d5da21787ff95cb32

8 years agophpcs: Fix some "Single space expected before elseif"
umherirrender [Sun, 1 Nov 2015 20:03:18 +0000 (21:03 +0100)]
phpcs: Fix some "Single space expected before elseif"

Found by new version of mediawiki/codesniffer
https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs/1939/consoleFull

Change-Id: I465bf0d1c89603b3dfc9867be3c0b1190829312d

8 years agoConvert JobQueueDB to using the WAN cache
Aaron Schulz [Sun, 1 Nov 2015 09:05:34 +0000 (01:05 -0800)]
Convert JobQueueDB to using the WAN cache

Change-Id: Ie5820d1439014572ca171c9303d51a8d3938ad00

8 years agoOutputPage: documentation for (semi-)deprecated methods
Derk-Jan Hartman [Sat, 31 Oct 2015 15:16:58 +0000 (16:16 +0100)]
OutputPage: documentation for (semi-)deprecated methods

Deprecated: addExtensionStyle, getExtStyle
These had been deprecated unofficially for a while now. ResourceLoader
is preferred.

Internal/Unpreferred: addHeadItem, addScript, addScriptFile,
addInlineScript, addStyle, addInlineStyle.
All should be used as littel as possible, in favor of ResourceLoader
and a few other higher level accessors. They are not truly deprecated,
but should not really be used unless you have a really good reason.

Also added a few missing wfDeprecated calls to methods marked as
deprecated in the phpdoc.

Bug: T89955
Change-Id: I472d906b6de16257fa34a2f9bfe9e4eb284d02b4

8 years agomw.html: Document mw.html.elements optional parameters
Derk-Jan Hartman [Sat, 31 Oct 2015 15:47:00 +0000 (15:47 +0000)]
mw.html: Document mw.html.elements optional parameters

* Move tests to a separate test suite.
* Unit tests already covered these cases without second and third
  parameter so no extra tests.
* Update code to clearly make attribs optional.

Bug: T88962
Change-Id: I26bb4b0a907f48064f41236972e115ec1f7edf0c

8 years agoMerge "Improve error message from when vendor files don't exist"
jenkins-bot [Sat, 31 Oct 2015 23:09:35 +0000 (23:09 +0000)]
Merge "Improve error message from when vendor files don't exist"

8 years agoImprove error message from when vendor files don't exist
Reedy [Sat, 31 Oct 2015 22:57:07 +0000 (22:57 +0000)]
Improve error message from when vendor files don't exist

Change-Id: Id1caeb487a4e801bd7f0f5377b6c06c6fc7eebe4

8 years agoMerge "Remove search preferences from Special:Preferences JavaScript"
jenkins-bot [Sat, 31 Oct 2015 22:49:15 +0000 (22:49 +0000)]
Merge "Remove search preferences from Special:Preferences JavaScript"

8 years agoEnable WebP uploads by default
Derk-Jan Hartman [Mon, 29 Jun 2015 19:27:40 +0000 (21:27 +0200)]
Enable WebP uploads by default

Initially disabled for WMF I33b7de30c746e36539e9af29e9598e6723d030dd

Bug: T27397
Change-Id: I9604668b0f7108fe52222d7f76854f9d30e637b0

8 years agoRemove search preferences from Special:Preferences JavaScript
saper [Sat, 31 Oct 2015 20:15:05 +0000 (21:15 +0100)]
Remove search preferences from Special:Preferences JavaScript

Search preferences are now handled by Special:Search, not
by Special:Preferences

Bug: T54817
Change-Id: I8faabbed190a46397b35f630c031fc1b4bb6e3e1

8 years agoConvert SiteStatsUpdate to using getMainStashInstance()
Aaron Schulz [Sat, 31 Oct 2015 20:05:03 +0000 (13:05 -0700)]
Convert SiteStatsUpdate to using getMainStashInstance()

Also fixed various $wgMemc related comments

Change-Id: I20602b672f724c8df1e82bbe3c586cb899a54640

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 31 Oct 2015 19:44:53 +0000 (20:44 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I5f61d69577610c47d7054205d6c5e41a1611b315

8 years agoFixed arguments syntax in hooks.txt
umherirrender [Sat, 31 Oct 2015 18:14:29 +0000 (19:14 +0100)]
Fixed arguments syntax in hooks.txt

BaseTemplateAfterPortlet: Add colon to match the other arguments
FileUpload: Adjust spacing to match the other arguments

Change-Id: Iae0285b1a39cf851aaaa735cb22e95c839813997