lhc/web/wiklou.git
8 years agotests: add structure and less tests to 'skins' suite
Antoine Musso [Tue, 25 Aug 2015 12:51:34 +0000 (14:51 +0200)]
tests: add structure and less tests to 'skins' suite

To add integration jobs for the MediaWiki skins, we will use the 'skins'
test suite.  Add the structure and less validator tests to it.  The
skins would then be tested using something like:

 php tests/phpunit/phpunit.php --testsuite skins

Bug: T68926
Change-Id: I1be4454b1aa7935ec2e9ac3703eee3907e5101e8

8 years agoMerge "Added reentrant lock support to BagOStuff"
jenkins-bot [Tue, 25 Aug 2015 01:28:24 +0000 (01:28 +0000)]
Merge "Added reentrant lock support to BagOStuff"

8 years agoMerge "objectcache: Document the primary entry points people should use"
jenkins-bot [Tue, 25 Aug 2015 01:25:47 +0000 (01:25 +0000)]
Merge "objectcache: Document the primary entry points people should use"

8 years agoAdded reentrant lock support to BagOStuff
Aaron Schulz [Fri, 21 Aug 2015 21:03:48 +0000 (14:03 -0700)]
Added reentrant lock support to BagOStuff

* Also fixed HashBagOStuff::delete() return value for non-keys

Change-Id: I9a977750c6fc6b8406bc1c9366a6b1b34bf48b6b

8 years agoobjectcache: Document the primary entry points people should use
Timo Tijhof [Mon, 24 Aug 2015 21:21:56 +0000 (23:21 +0200)]
objectcache: Document the primary entry points people should use

There are imho too many ObjectCache methods, $wg*Cache* variables,
CACHE_ types, and wfGet*Cache() functions to know which ones
should actually be used publicly. This should make it easier to
know which ones should be used.

The difference between them was also harder to understand with the
main documentation sections about each of these living in
conceptually different places:
- classes (WANObjectCache)
- methods (ObjectCache::getMainStashInstance)
- variables (DefaultSettings: wgMainCacheType, wgMainWANCache, wgMainStash)

Also:
* Correct wfGetCache() documentation.
* Add the missing keywords for 'public' visibility.

Change-Id: I3b05fdb8b7888bf7e3f05bdca36538f3484556b8

8 years agoMerge "objectcache: Use newAccelerator() fallback instead of try/catch"
jenkins-bot [Mon, 24 Aug 2015 23:31:52 +0000 (23:31 +0000)]
Merge "objectcache: Use newAccelerator() fallback instead of try/catch"

8 years agomediawiki.ForeignApi: Module should target mobile
jdlrobson [Mon, 24 Aug 2015 23:06:56 +0000 (16:06 -0700)]
mediawiki.ForeignApi: Module should target mobile

Bug: T66636
Change-Id: Ib5f8d5060bbf66d57c34bc8573061b69e5034b85

8 years agoobjectcache: Use newAccelerator() fallback instead of try/catch
Timo Tijhof [Mon, 24 Aug 2015 20:53:16 +0000 (22:53 +0200)]
objectcache: Use newAccelerator() fallback instead of try/catch

Also remove confusing use of $wgMemc in LoadMonitorMySQL which
should always be the same as wfGetMainCache().

Change-Id: I4fb9d075a37d3d45af71a5026ccf2eb17f24d7b0

8 years agoMerge "Fixed usage of ChronologyProtector in MediaWiki"
jenkins-bot [Mon, 24 Aug 2015 22:54:50 +0000 (22:54 +0000)]
Merge "Fixed usage of ChronologyProtector in MediaWiki"

8 years agoFixed usage of ChronologyProtector in MediaWiki
Aaron Schulz [Mon, 24 Aug 2015 21:46:19 +0000 (14:46 -0700)]
Fixed usage of ChronologyProtector in MediaWiki

* Placed an LB shutdown() call in dePreOutputCommit() so that the
  positions are properly included in sessions before session write().
  They need to be part of the synchronous updates that happen before
  the user gets the response, otherwise it defeats the whole point of
  the system.

Bug: T101224
Change-Id: Idf367c2aa9aae432a0c4d7cc697366aa544d77f2

8 years agoobjectcache: Make first parameter of newAccelerator optional
Timo Tijhof [Mon, 24 Aug 2015 20:46:54 +0000 (22:46 +0200)]
objectcache: Make first parameter of newAccelerator optional

Makes it more convenient to use.

Change-Id: I1e11f7a759bd2816e47d1c2453cbe39b8f44b2f0

8 years agoMerge "mediawiki.api.upload: Improve error handling when using #uploadToStash"
jenkins-bot [Mon, 24 Aug 2015 21:07:55 +0000 (21:07 +0000)]
Merge "mediawiki.api.upload: Improve error handling when using #uploadToStash"

8 years agoMerge "mediawiki.api.upload: Expand documentation"
jenkins-bot [Mon, 24 Aug 2015 21:07:51 +0000 (21:07 +0000)]
Merge "mediawiki.api.upload: Expand documentation"

8 years agoMerge "mediawiki.ForeignApi: Use location instead of window.location"
jenkins-bot [Mon, 24 Aug 2015 21:01:52 +0000 (21:01 +0000)]
Merge "mediawiki.ForeignApi: Use location instead of window.location"

8 years agomediawiki.api.upload: Improve error handling when using #uploadToStash
Bartosz Dziewoński [Mon, 24 Aug 2015 19:53:06 +0000 (21:53 +0200)]
mediawiki.api.upload: Improve error handling when using #uploadToStash

The finishUpload() function did not check for errors previously, which
caused errors that only surface at this point (e.g. invalid file name)
to be ignored.

Change-Id: I61a1e6bb93b6db34e875689c5d769a1b7e4db0be

8 years agomediawiki.api.upload: Expand documentation
Bartosz Dziewoński [Mon, 24 Aug 2015 19:53:28 +0000 (21:53 +0200)]
mediawiki.api.upload: Expand documentation

Change-Id: I327f13bd318de6294a865a81600cd7363950ae0b

8 years agoobjectcache: Remove use of deprecated $wgSessionsInMemcached
Timo Tijhof [Mon, 24 Aug 2015 20:06:55 +0000 (22:06 +0200)]
objectcache: Remove use of deprecated $wgSessionsInMemcached

Deprecated since MediaWiki 1.20.

Change-Id: I3b431714e0d2b21b3911c80bbf2b4b4868634510

8 years agomediawiki.ForeignApi: Use location instead of window.location
Timo Tijhof [Mon, 24 Aug 2015 19:41:34 +0000 (21:41 +0200)]
mediawiki.ForeignApi: Use location instead of window.location

Follows-up 2f30ff7a861 per 27dd806.

Change-Id: Ided57286f773420b18ddc06d5cf63ffbde50077b

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 24 Aug 2015 19:10:42 +0000 (21:10 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ifdb9b09bcfa10bc0d375fe30437192bfdcbfd5ca

8 years agoMerge "mediawiki.api: Correctly handle boolean parameters"
jenkins-bot [Mon, 24 Aug 2015 18:58:57 +0000 (18:58 +0000)]
Merge "mediawiki.api: Correctly handle boolean parameters"

8 years agomediawiki.api.uploadWithFormData: Implement in terms of existing mw.Api functionality
Bartosz Dziewoński [Tue, 18 Aug 2015 22:50:30 +0000 (00:50 +0200)]
mediawiki.api.uploadWithFormData: Implement in terms of existing mw.Api functionality

* mw.Api#ajax can already handle FormData, if instructed to, since
  d19432a332c21935d42087db706e50c5259063ea (which seems to have been a
  part of mobile uploads experiments).
* MobileFrontend's api.js already had code to provide upload progress
  events while using mw.Api, lifted it from there.

With this change, we should be able to just use mw.ForeignApi (being
added in Ic20b9682d28633baa87d22e6e9fb71ce507da58d) to upload to a
different wiki. (Assuming that the browser supports FormData.)

Additionally:

* Improve detection of whether we can use FormData: if we are given a
  HTMLInputElement, try to get a File from it before we fall back to
  iframe form upload.
* mediawiki.api.edit: In #postWithEditToken, pass through the
  ajaxOptions parameter to #postWithToken.

Change-Id: Ib9abe32ee3320c67ac0a4544c942b844a5550562

8 years agoMerge "Fixed HashRing IDE errors"
jenkins-bot [Mon, 24 Aug 2015 17:41:42 +0000 (17:41 +0000)]
Merge "Fixed HashRing IDE errors"

8 years agoMerge "Fixed "undefined class" IDE errror from INF use in @param"
jenkins-bot [Mon, 24 Aug 2015 17:41:31 +0000 (17:41 +0000)]
Merge "Fixed "undefined class" IDE errror from INF use in @param"

8 years agoMerge "Fix classname mismatch between upload js and templates/thumbnail.html"
jenkins-bot [Mon, 24 Aug 2015 14:09:19 +0000 (14:09 +0000)]
Merge "Fix classname mismatch between upload js and templates/thumbnail.html"

8 years agoFixed HashRing IDE errors
Aaron Schulz [Mon, 24 Aug 2015 11:57:26 +0000 (04:57 -0700)]
Fixed HashRing IDE errors

Change-Id: Ia3fa0df6f13adc4788d1414a9bc965fdc4ec1915

8 years agoFixed "undefined class" IDE errror from INF use in @param
Aaron Schulz [Mon, 24 Aug 2015 11:15:28 +0000 (04:15 -0700)]
Fixed "undefined class" IDE errror from INF use in @param

Change-Id: I5d044da0946d046f4a8581445ede39d56973a126

8 years agoMerge "Add Adyghe to Names.php"
jenkins-bot [Mon, 24 Aug 2015 07:45:23 +0000 (07:45 +0000)]
Merge "Add Adyghe to Names.php"

8 years agoFix classname mismatch between upload js and templates/thumbnail.html
Brian Wolff [Mon, 24 Aug 2015 04:43:15 +0000 (22:43 -0600)]
Fix classname mismatch between upload js and templates/thumbnail.html

Classname was changed to use newer jQuery library, but js was still
hardcoding the old classname. This resulted in the preview of the
to be uploaded file, not to be shown.

I added an html comment to the template file to warn future
modifies about the dependency. I'm not sure if html comments in
template files are considered "appropriate".

Bug: T109952
Change-Id: I098a86260453d32644ff9ab06194c13998643de9
Follow-up: 6a70cc6968a3780c0b118e07f02f5ef015e655bb

8 years agoBagOStuff: Don't try to access a protected variable in a closure
Kunal Mehta [Sun, 23 Aug 2015 22:31:36 +0000 (15:31 -0700)]
BagOStuff: Don't try to access a protected variable in a closure

Follows up 78f1fee5593781b.

Change-Id: Id356509cc55a5953351dfd98896cf01055739ee0

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 23 Aug 2015 19:18:53 +0000 (21:18 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Id0a3f0a3da6621cae65780d01079c6d942b4a9a2

8 years agoMerge "SpecialVersion: Handle Closures in $wgHooks nicer"
jenkins-bot [Sat, 22 Aug 2015 23:23:22 +0000 (23:23 +0000)]
Merge "SpecialVersion: Handle Closures in $wgHooks nicer"

8 years agoAdd JamesF to credits in developers section
Brian Wolff [Sat, 22 Aug 2015 20:13:40 +0000 (14:13 -0600)]
Add JamesF to credits in developers section

Change-Id: Ic47f4e49d663d502195bc9661f0e48b57adecf1e

8 years agoMove Tyler and Chris to the developers section of CREDITS.
Brian Wolff [Sat, 22 Aug 2015 20:04:53 +0000 (14:04 -0600)]
Move Tyler and Chris to the developers section of CREDITS.

I think both of them are more than just patch contributors.

Change-Id: I53df9a62cb856ba2afc8cb1570d6da4095032d02

8 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Sat, 22 Aug 2015 20:43:19 +0000 (20:43 +0000)]
Merge "Localisation updates from https://translatewiki.net."

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 22 Aug 2015 20:24:12 +0000 (22:24 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I589bf427e66d94a772e3416d1d2e265dde1a2615

8 years agoAdd Geoffrey Mon (Sn1per/GEOFBOT) to CREDITS
Geoffrey Mon [Sat, 22 Aug 2015 20:20:35 +0000 (20:20 +0000)]
Add Geoffrey Mon (Sn1per/GEOFBOT) to CREDITS

...if no one minds :3

Change-Id: I53ee6a8f6c81f20132c9e44f871fc884a03e6327

8 years agoAdd Adyghe to Names.php
Amir E. Aharoni [Sat, 22 Aug 2015 08:52:55 +0000 (11:52 +0300)]
Add Adyghe to Names.php

The language is now at 30% core localization and is exported.

Change-Id: I3f0a54da076d45ed8a60465cce0b52ba16dc806d

8 years agoMerge "Tiny clean up of Parser::doQuotes()"
jenkins-bot [Fri, 21 Aug 2015 21:31:01 +0000 (21:31 +0000)]
Merge "Tiny clean up of Parser::doQuotes()"

8 years agoMerge "Use stock BagOStuff lock methods in MessageCache"
jenkins-bot [Fri, 21 Aug 2015 20:56:00 +0000 (20:56 +0000)]
Merge "Use stock BagOStuff lock methods in MessageCache"

8 years agoMerge "BagOStuff: Don't use $this in a closure"
jenkins-bot [Fri, 21 Aug 2015 20:50:29 +0000 (20:50 +0000)]
Merge "BagOStuff: Don't use $this in a closure"

8 years agoBagOStuff: Don't use $this in a closure
Kunal Mehta [Fri, 21 Aug 2015 20:32:39 +0000 (13:32 -0700)]
BagOStuff: Don't use $this in a closure

Change-Id: Ib9fb92a70adc2b4d75c30148e17dff6f7765afe1

8 years agoFixed IDE error in mergeViaLock()
Aaron Schulz [Fri, 21 Aug 2015 20:04:09 +0000 (13:04 -0700)]
Fixed IDE error in mergeViaLock()

Change-Id: I50b5a22bf353272ad6960181db07c2f4ec857f3c

8 years agoRevert "Count API and hook calls, with 1:1000 sampling"
Aaron Schulz [Fri, 21 Aug 2015 19:35:48 +0000 (19:35 +0000)]
Revert "Count API and hook calls, with 1:1000 sampling"

This seems to use 3.67% of index.php real time per xenon.

This reverts commit c4cd2399390f7922c88bb521c39bfbefe000338e.

Change-Id: I1eb8dfc72036493e430271f0db3f2f2f96b149c3

8 years agoMerge "Include job attempt count for redis in showJobs.php"
jenkins-bot [Fri, 21 Aug 2015 20:21:49 +0000 (20:21 +0000)]
Merge "Include job attempt count for redis in showJobs.php"

8 years agoMerge "Prevent PRAGMA query spam in debug/DBPerformance logs"
jenkins-bot [Fri, 21 Aug 2015 20:14:39 +0000 (20:14 +0000)]
Merge "Prevent PRAGMA query spam in debug/DBPerformance logs"

8 years agoInclude job attempt count for redis in showJobs.php
Aaron Schulz [Fri, 21 Aug 2015 20:09:14 +0000 (13:09 -0700)]
Include job attempt count for redis in showJobs.php

Change-Id: I791f1520c6d8aed6f8c4c4f09c5f72b130a00a4d

8 years agoMerge "TitleInputWidget: Add 'maxLength' of 255 and use $.byteLimit"
jenkins-bot [Fri, 21 Aug 2015 20:05:39 +0000 (20:05 +0000)]
Merge "TitleInputWidget: Add 'maxLength' of 255 and use $.byteLimit"

8 years agoOOUIHTMLForm: Display errors in a nicer way, part 2
Bartosz Dziewoński [Thu, 6 Aug 2015 11:48:39 +0000 (13:48 +0200)]
OOUIHTMLForm: Display errors in a nicer way, part 2

Now we also handle the form-wide errors, putting them in the FieldLayout
that contains the form's header.

Follow-up to I860a96858c4fcac62d63b46e35a9153f22c0a9c9.

Bug: T98894
Change-Id: Ifbf38878d41906184f97169b22002f788711a311

8 years agoHTMLForm: Move header formatting OOUI-specific code to OOUIHTMLForm
Bartosz Dziewoński [Tue, 28 Jul 2015 22:08:40 +0000 (00:08 +0200)]
HTMLForm: Move header formatting OOUI-specific code to OOUIHTMLForm

* Introduce a getter getHeaderText() and override it in OOUIHTMLForm.
* While we're at it, also introduce getFooterText() (although right
  now we have no need to override this one).
* Use both in HTMLForm where appropriate.

Change-Id: I9a7234ed75b024f24e0a087c9c000bb2024b405f

8 years agoHTMLForm: Move section formatting OOUI-specific code to OOUIHTMLForm
Bartosz Dziewoński [Tue, 28 Jul 2015 22:05:08 +0000 (00:05 +0200)]
HTMLForm: Move section formatting OOUI-specific code to OOUIHTMLForm

* Introduce a new helper function formatSection() and override it
  in OOUIHTMLForm.
  * Bonus: Properly construct the form's FieldsetLayout,
    thanks to I860a96858c4fcac62d63b46e35a9153f22c0a9c9.
  * Bonus: Don't pass silly HTMLForm's classes which don't make
    sense in OOUI mode.

Change-Id: I91af6efa8762e9676efea532381292e221255862

8 years agoMerge "Introduce mediawiki.ForeignApi"
jenkins-bot [Fri, 21 Aug 2015 18:47:13 +0000 (18:47 +0000)]
Merge "Introduce mediawiki.ForeignApi"

8 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Fri, 21 Aug 2015 18:44:49 +0000 (18:44 +0000)]
Merge "Localisation updates from https://translatewiki.net."

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 21 Aug 2015 18:42:45 +0000 (20:42 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I4bab773376e48e325d306bb0889f77e6f12b398c

8 years agoOOUIHTMLForm: Display errors in a nicer way, part 1
Bartosz Dziewoński [Tue, 28 Jul 2015 21:53:49 +0000 (23:53 +0200)]
OOUIHTMLForm: Display errors in a nicer way, part 1

Depends on Ie14a35fac70d62ff7d102caaa56654ebde11d7dd in OOUI.

Part 2 follows after some cleanup in intermediary commits
in Ifbf38878d41906184f97169b22002f788711a311.

As a bonus, HTMLFormField::getOOUI() now always produces a
OOUI\FieldLayout in OOUI mode. This will let us clean up some code
where we had to take errors HTML from HTMLForm
(I91af6efa8762e9676efea532381292e221255862).

Bug: T98894
Change-Id: I860a96858c4fcac62d63b46e35a9153f22c0a9c9

8 years agoresourceloader: Remove old experimental "AsyncLoading" feature
Timo Tijhof [Fri, 21 Aug 2015 15:05:59 +0000 (17:05 +0200)]
resourceloader: Remove old experimental "AsyncLoading" feature

Follows-up d7905627fdc3 which makes all script loading asynchronous,
thus obsoleting this experiment.

We do still have separate top and bottom queues, but that's tracked
under T109837 for later consideration.

Change-Id: I1d6ea47c59bb47977594aff94952a38cc0a9ce34

8 years agoIntroduce mediawiki.ForeignApi
Bartosz Dziewoński [Fri, 14 Aug 2015 23:17:49 +0000 (01:17 +0200)]
Introduce mediawiki.ForeignApi

mw.ForeignApi is an extension of mw.Api, automatically handling
everything required to communicate with another MediaWiki wiki via
cross-origin requests (CORS).

Authentication-related MediaWiki extensions may extend it further to
ensure that the user authenticated on the current wiki will be
automatically authenticated on the foreign one. A CentralAuth
implementation is provided in I0fd05ef8b9c9db0fdb59c6cb248f364259f80456.

Bug: T66636
Change-Id: Ic20b9682d28633baa87d22e6e9fb71ce507da58d

8 years agoMerge "TitleInputWidget, UserInputWidget: Allow overriding 'infusable'"
jenkins-bot [Fri, 21 Aug 2015 15:43:56 +0000 (15:43 +0000)]
Merge "TitleInputWidget, UserInputWidget: Allow overriding 'infusable'"

8 years agoMerge "TitleInputWidget: Allow suppressing search suggestions"
jenkins-bot [Fri, 21 Aug 2015 15:41:29 +0000 (15:41 +0000)]
Merge "TitleInputWidget: Allow suppressing search suggestions"

8 years agoMerge "Refactor NamespaceInputWidget"
jenkins-bot [Fri, 21 Aug 2015 15:32:59 +0000 (15:32 +0000)]
Merge "Refactor NamespaceInputWidget"

8 years agoMerge "mediawiki.api.upload: Use this.defaults.parameters instead of all-custom params"
jenkins-bot [Fri, 21 Aug 2015 15:24:40 +0000 (15:24 +0000)]
Merge "mediawiki.api.upload: Use this.defaults.parameters instead of all-custom params"

8 years agoRemove redundant comment-stripping in OutputPageTest
Timo Tijhof [Fri, 21 Aug 2015 14:52:09 +0000 (16:52 +0200)]
Remove redundant comment-stripping in OutputPageTest

Follows-up 471a3bfb3d which removed the cacheReport from the output.

Change-Id: I3eb701cf5cd5a46f2f9aed23cb830347d999043e

8 years agoMerge "mediawiki.Upload: Allow passing mw.Api objects, not just configs"
jenkins-bot [Fri, 21 Aug 2015 09:16:03 +0000 (09:16 +0000)]
Merge "mediawiki.Upload: Allow passing mw.Api objects, not just configs"

8 years agoFixed ParserCache IDE warnings
Aaron Schulz [Fri, 21 Aug 2015 00:41:27 +0000 (17:41 -0700)]
Fixed ParserCache IDE warnings

Change-Id: I1785f4207379b873e4ce7312c0aae7a4300e7a06

8 years agoMerge "Made MWTimestamp handle UNIX floats"
jenkins-bot [Fri, 21 Aug 2015 00:14:20 +0000 (00:14 +0000)]
Merge "Made MWTimestamp handle UNIX floats"

8 years agoresourceloader: Remove remoteBasePath from FileModule version hash
Timo Tijhof [Thu, 20 Aug 2015 22:34:06 +0000 (00:34 +0200)]
resourceloader: Remove remoteBasePath from FileModule version hash

In Wikimedia production this tends to contain the branch name,
which causes the version to change for no reason after a MediaWiki
deployment. For example:

 ["remoteBasePath"]=>
   string(43) "https://test.wikipedia.org/static/1.26wmf19"

Bug: T102578
Change-Id: I50b8afd72183cae875d4aaa0aaf0da4e7d664284

8 years agoMerge "Revert "Adding release note for category changes in watchlists""
jenkins-bot [Thu, 20 Aug 2015 20:20:41 +0000 (20:20 +0000)]
Merge "Revert "Adding release note for category changes in watchlists""

8 years agoRevert "Adding release note for category changes in watchlists"
Martineznovo [Thu, 20 Aug 2015 20:02:21 +0000 (20:02 +0000)]
Revert "Adding release note for category changes in watchlists"

This reverts commit 52a96db10add4d9faf123b45730d7fc78a0fc184.

Commit that added the feature was reverted in e412ff5ecc900991cce4f99b7a069f625a5694b3

Change-Id: I017b6fed55c876b595134bdd40dc7dbc67179e1e

8 years agoMerge "Remove unreachable block"
jenkins-bot [Thu, 20 Aug 2015 19:15:19 +0000 (19:15 +0000)]
Merge "Remove unreachable block"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 20 Aug 2015 19:13:56 +0000 (21:13 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I64755ef3bdd61f67d9fcb75e4d173491150b135a

8 years agoMerge "API Credits proper ordering"
jenkins-bot [Thu, 20 Aug 2015 18:26:53 +0000 (18:26 +0000)]
Merge "API Credits proper ordering"

8 years agoMerge "Include generated metadata for redirects"
jenkins-bot [Thu, 20 Aug 2015 18:11:47 +0000 (18:11 +0000)]
Merge "Include generated metadata for redirects"

8 years agoRevert "Enable users to watch category membership changes"
CSteipp [Thu, 20 Aug 2015 17:18:54 +0000 (17:18 +0000)]
Revert "Enable users to watch category membership changes"

This reverts commit f6879ea16edf008eb012bd4dbe133e2ba4b9338f.

Bug: T109638
Change-Id: I770d8d33a4cff3829bdea9a4df24de209cbe691b

8 years agoMerge "Skip adding wikitext test pages in PrefixSearchTest if NS_MAIN is not wikitext"
jenkins-bot [Thu, 20 Aug 2015 17:18:37 +0000 (17:18 +0000)]
Merge "Skip adding wikitext test pages in PrefixSearchTest if NS_MAIN is not wikitext"

8 years agomediawiki.api.upload: Use this.defaults.parameters instead of all-custom params
Bartosz Dziewoński [Tue, 18 Aug 2015 22:11:14 +0000 (00:11 +0200)]
mediawiki.api.upload: Use this.defaults.parameters instead of all-custom params

Change-Id: I3326f30a52949bbe85aee9fcff39ca34002aab90

8 years agomediawiki.api.upload: Clean up the iframe and form when done
Bartosz Dziewoński [Tue, 18 Aug 2015 22:10:59 +0000 (00:10 +0200)]
mediawiki.api.upload: Clean up the iframe and form when done

Bug: T107620
Change-Id: I91da424cf9e10d751cfe160fdd650ba9f56ad9f3

8 years agomediawiki.api: Correctly handle boolean parameters
Bartosz Dziewoński [Tue, 18 Aug 2015 17:01:34 +0000 (19:01 +0200)]
mediawiki.api: Correctly handle boolean parameters

Quoting https://www.mediawiki.org/w/api.php#main.2Fdatatypes:

    Boolean parameters work like HTML checkboxes: if the parameter is
    specified, regardless of value, it is considered true. For a false
    value, omit the parameter entirely.

Therefore, omit the parameters if the value is `false`.

The idea is adapted from MobileFrontend's api.js.

Change-Id: I596e14304951f49acc36159cb806b266117fb550

8 years agomediawiki.Upload: Allow passing mw.Api objects, not just configs
Bartosz Dziewoński [Tue, 18 Aug 2015 16:14:23 +0000 (18:14 +0200)]
mediawiki.Upload: Allow passing mw.Api objects, not just configs

This way we'll be able to use a mw.ForeignApi here
(being introduced in Ic20b9682d28633baa87d22e6e9fb71ce507da58d).

Change-Id: Ie49d7dad5abfe567f9b9c7396f8e132875568fd3

8 years agoTitleInputWidget: Add 'maxLength' of 255 and use $.byteLimit
Bartosz Dziewoński [Wed, 12 Aug 2015 14:56:08 +0000 (16:56 +0200)]
TitleInputWidget: Add 'maxLength' of 255 and use $.byteLimit

Integrate $.byteLimit functionality into OOjs UI's value preprocessing
(#cleanUpValue), rather than just calling in on #$input, to avoid
validity state flashing back and forth when the value is limitted.

Bug: T106454
Change-Id: I3d24e4bf7427c9bd922ff2e24edc9583ee0aaecb

8 years agoTitleInputWidget, UserInputWidget: Allow overriding 'infusable'
Bartosz Dziewoński [Tue, 11 Aug 2015 19:13:56 +0000 (21:13 +0200)]
TitleInputWidget, UserInputWidget: Allow overriding 'infusable'

Needed for Ice69df851137e3454ae2c9f4c75494b18cf8a75a.

Change-Id: I34048dbd90dffa0409132946fb2864452ab93827

8 years agoTitleInputWidget: Allow suppressing search suggestions
Bartosz Dziewoński [Tue, 11 Aug 2015 18:29:05 +0000 (20:29 +0200)]
TitleInputWidget: Allow suppressing search suggestions

Needed for Ice69df851137e3454ae2c9f4c75494b18cf8a75a.

Change-Id: Ibc7846bb08abdd1ebf271dfce526dd935f38e111

8 years agoRefactor NamespaceInputWidget
Bartosz Dziewoński [Tue, 11 Aug 2015 15:12:36 +0000 (17:12 +0200)]
Refactor NamespaceInputWidget

* Refactor NamespaceInputWidget into two widgets: NamespaceInputWidget
  and ComplexNamespaceInputWidget. The former is now only the dropdown
  (and inherits from DropdownInputWidget), the latter is the dropdown
  plus two checkboxes.
* Change ComplexNamespaceInputWidget configuration to take nested config
  for `invert`, `associated`, and `namespace`, rather than require
  parameters like `invertName` and so on for every combination.
* Implement standalone JavaScript versions of both widgets (previously
  mw.widgets.NamespaceInputWidget could only be created via infusion
  of the PHP widget).

Bug: T99256
Bug: T106138
Bug: T109559
Change-Id: Ie2fee6d035339ceb934fca991675480db3d630d1

8 years agoMerge "Add public keywords to QueryPage subclasses"
jenkins-bot [Thu, 20 Aug 2015 14:16:24 +0000 (14:16 +0000)]
Merge "Add public keywords to QueryPage subclasses"

8 years agoMerge "CSSMin: remove dot segments in relative local URLs"
jenkins-bot [Thu, 20 Aug 2015 14:11:36 +0000 (14:11 +0000)]
Merge "CSSMin: remove dot segments in relative local URLs"

8 years agoAdd public keywords to QueryPage subclasses
Ricordisamoa [Thu, 20 Aug 2015 13:02:54 +0000 (15:02 +0200)]
Add public keywords to QueryPage subclasses

Follows a5c9c9607e034a00edc79146ec778e3d9c05e50a

Change-Id: I81b1d49e017792dea2c7eb0d98e99656576cf497

8 years agoReplace 'emailpage' with 'emailuser'
mjbmr [Thu, 20 Aug 2015 10:41:09 +0000 (10:41 +0000)]
Replace 'emailpage' with 'emailuser'

Bug: T109614
Change-Id: I345d0091b17ef61499dc7d8c170308fd8194dc00

8 years agoMade MWTimestamp handle UNIX floats
Aaron Schulz [Wed, 19 Aug 2015 21:23:16 +0000 (14:23 -0700)]
Made MWTimestamp handle UNIX floats

* This avoids "wfTimestamp() fed bogus time value" errors
  that show up in the debug log on page views, do to
  User::getTouched() usage.

Change-Id: I899d6edd2b59c02e618ed14f8d29dea53d866f05

8 years agoPrevent PRAGMA query spam in debug/DBPerformance logs
Aaron Schulz [Thu, 20 Aug 2015 00:47:49 +0000 (17:47 -0700)]
Prevent PRAGMA query spam in debug/DBPerformance logs

Change-Id: If567ea573f615e879e062a545c4b619ed8358e76

8 years agoTiny clean up of Parser::doQuotes()
Pavel Astakhov [Mon, 17 Aug 2015 11:13:27 +0000 (17:13 +0600)]
Tiny clean up of Parser::doQuotes()

$firstsingleletterword always is -1 here
because we leave the loop when it's set

Change-Id: I73a430b7ac650bc5919ab95867eec09f723395f2

8 years agoSwitched job run time profiling to context getStats()
Aaron Schulz [Sat, 15 Aug 2015 21:29:39 +0000 (14:29 -0700)]
Switched job run time profiling to context getStats()

* This replaces the scoped profiling calls

Change-Id: I73caffad0e0d31d9ffbd3c0decfe31e17ea85398

8 years agoMerge "API i18n: Split existing non-English prop messages for param-per-value"
jenkins-bot [Wed, 19 Aug 2015 19:45:14 +0000 (19:45 +0000)]
Merge "API i18n: Split existing non-English prop messages for param-per-value"

8 years agoFixed BagOStuff getScopedLock() docs
Aaron Schulz [Wed, 19 Aug 2015 18:31:09 +0000 (11:31 -0700)]
Fixed BagOStuff getScopedLock() docs

Change-Id: I4d6d3211e93ee1c279728ff787acff558a47fbee

8 years agoUse stock BagOStuff lock methods in MessageCache
Aaron Schulz [Wed, 19 Aug 2015 19:27:20 +0000 (12:27 -0700)]
Use stock BagOStuff lock methods in MessageCache

Change-Id: Ic77b1b0f742590a10cddc7db067a4fcff246540f

8 years agoAPI i18n: Split existing non-English prop messages for param-per-value
Brad Jorsch [Wed, 19 Aug 2015 19:24:40 +0000 (15:24 -0400)]
API i18n: Split existing non-English prop messages for param-per-value

A series of recent patches split many prop messages for param-per-value
mode. Per request, do the same for the existing non-English messages.

Bug: T109541
Change-Id: I80bcfc0e0680d71f59373c6bc12ed91168ced16a

8 years agoMerge "Escape return of {{int:}} if message not exists"
jenkins-bot [Wed, 19 Aug 2015 17:31:48 +0000 (17:31 +0000)]
Merge "Escape return of {{int:}} if message not exists"

8 years agoMerge "Remove maintenance script fixSlaveDesync.php"
jenkins-bot [Wed, 19 Aug 2015 17:12:03 +0000 (17:12 +0000)]
Merge "Remove maintenance script fixSlaveDesync.php"

8 years agoRemove maintenance script fixSlaveDesync.php
Kevin Israel [Wed, 19 Aug 2015 10:26:01 +0000 (06:26 -0400)]
Remove maintenance script fixSlaveDesync.php

Though this script was run on Wikimedia sites years ago (see T8399), there
are enough reasons to doubt it will be run again:

* There is a hardcoded maximum page_id value, which would have to be
  changed or removed before reuse.
* It scans the entire page table in a single SELECT query and stores all
  values of page_id and page_latest in a PHP array, which might not be
  feasible on a large wiki.
* It writes directly to slaves. In contrast, the manual page for
  pt-table-sync (from Percona Toolkit) says in general, "[...] it always
  makes the changes on the replication master, never the replication slave
  directly. This is in general the only safe way to bring a replica back
  in sync [...]".
* It only works on the page/revision/text tables. In contrast, pt-table-sync
  can work on any table having a primary key.
* It does try to detect whether revisions are missing on the master (instead
  of on the slave). However, this won't work because of a bug introduced in
  r91243 / bb1df74f8715 (it actually queries the master twice and puts the
  second result set in $slaveIDs).

Change-Id: I85c98821af308abf7dde8068d7cbca17d06b1362

8 years agoMerge "Set 'List-Help' header for watchlist emails"
jenkins-bot [Wed, 19 Aug 2015 10:26:22 +0000 (10:26 +0000)]
Merge "Set 'List-Help' header for watchlist emails"

8 years agoMerge "Avoid full RC table scans in ChangeTags::updateTags()"
jenkins-bot [Wed, 19 Aug 2015 09:46:42 +0000 (09:46 +0000)]
Merge "Avoid full RC table scans in ChangeTags::updateTags()"

8 years agoSet 'List-Help' header for watchlist emails
Kunal Mehta [Tue, 7 Jul 2015 18:44:25 +0000 (11:44 -0700)]
Set 'List-Help' header for watchlist emails

Added an option to UserMailer::sendMail() to allow adding arbitrary
headers to emails.

Bug: T58315
Change-Id: I01a60430bf39f6bd104269b7246767f016eb9cd5

8 years agoAvoid full RC table scans in ChangeTags::updateTags()
Aaron Schulz [Wed, 19 Aug 2015 09:25:18 +0000 (02:25 -0700)]
Avoid full RC table scans in ChangeTags::updateTags()

* Various hooks that add change tags hit this code path now

Change-Id: I0b1fe7bef1e691699b2f6462ba7ac22b23253807