lhc/web/wiklou.git
8 years agobuild: Bump npm development dependencies to latest
James D. Forrester [Thu, 17 Mar 2016 19:45:21 +0000 (19:45 +0000)]
build: Bump npm development dependencies to latest

 grunt-contrib-copy     0.8.2  →    1.0.0
 grunt-contrib-watch    0.6.1  →    1.0.0
 karma                0.13.19  →  0.13.22

Change-Id: Idc5c1ac97580e91d9c958c55cdfdda681330c254

8 years agoMerge "Handle HTTPS when running jobs asynchronously"
jenkins-bot [Sat, 19 Mar 2016 16:27:43 +0000 (16:27 +0000)]
Merge "Handle HTTPS when running jobs asynchronously"

8 years agoListFiles: Call Skin::setRelevantUser() when applicable
rillke [Mon, 14 Mar 2016 05:28:04 +0000 (06:28 +0100)]
ListFiles: Call Skin::setRelevantUser() when applicable

Also validate user name before calling `User::newFromName()`

Bug: T129825
Change-Id: I7481ab0fc1720e5e840f0d552934324f676c0241

8 years agoMerge "Many more function case mismatches"
jenkins-bot [Sat, 19 Mar 2016 00:37:53 +0000 (00:37 +0000)]
Merge "Many more function case mismatches"

8 years agoMany more function case mismatches
Reedy [Sat, 19 Mar 2016 00:08:06 +0000 (00:08 +0000)]
Many more function case mismatches

Change-Id: I5d3a5eb8adea1ecbf136415bb9fd7a162633ccca

8 years agoMerge "MediaWikiTestCase::assertException() was removed"
jenkins-bot [Sat, 19 Mar 2016 00:15:13 +0000 (00:15 +0000)]
Merge "MediaWikiTestCase::assertException() was removed"

8 years agoMediaWikiTestCase::assertException() was removed
Siebrand Mazeland [Tue, 8 Mar 2016 23:46:51 +0000 (00:46 +0100)]
MediaWikiTestCase::assertException() was removed

Deprecated since 1.22. No uses in core or Gerrit extensions remaining.

Change-Id: Icae4077078c73d766d3c1c9e9e569922151296d9

8 years agoUpdate grunt-karma to 0.12.2
Paladox [Fri, 18 Mar 2016 23:38:07 +0000 (23:38 +0000)]
Update grunt-karma to 0.12.2

Reason because this update will include a fix for incompatibility with
grunt 1.0.0 when it is released.

Change-Id: I39f01e3a68b764a4638c3465a1d116aefd517ef5

8 years agoFix numerous class/function casing
Reedy [Fri, 18 Mar 2016 13:55:54 +0000 (13:55 +0000)]
Fix numerous class/function casing

Change-Id: I23982bfa0548c9ea3bdb432be7982f1563930715

8 years agoMerge "API: Allow fetching login token from action=query&meta=tokens on private wikis"
jenkins-bot [Fri, 18 Mar 2016 22:19:25 +0000 (22:19 +0000)]
Merge "API: Allow fetching login token from action=query&meta=tokens on private wikis"

8 years agoMerge "resetUserEmail: Allow resetting email without scrambling password"
jenkins-bot [Fri, 18 Mar 2016 22:04:52 +0000 (22:04 +0000)]
Merge "resetUserEmail: Allow resetting email without scrambling password"

8 years agoMerge "Actually make $wgNoReplyAddress default to $wgPasswordSender"
jenkins-bot [Fri, 18 Mar 2016 21:30:58 +0000 (21:30 +0000)]
Merge "Actually make $wgNoReplyAddress default to $wgPasswordSender"

8 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Fri, 18 Mar 2016 21:23:55 +0000 (21:23 +0000)]
Merge "Localisation updates from https://translatewiki.net."

8 years agoMerge "Try to fix some other broken-looking legacy maintenance script options"
jenkins-bot [Fri, 18 Mar 2016 21:13:39 +0000 (21:13 +0000)]
Merge "Try to fix some other broken-looking legacy maintenance script options"

8 years agoMerge "Register importImages options without arguments as actual maintenance script...
jenkins-bot [Fri, 18 Mar 2016 21:13:35 +0000 (21:13 +0000)]
Merge "Register importImages options without arguments as actual maintenance script options so they are usable"

8 years agoAPI: Allow fetching login token from action=query&meta=tokens on private wikis
Brad Jorsch [Wed, 16 Mar 2016 14:34:40 +0000 (10:34 -0400)]
API: Allow fetching login token from action=query&meta=tokens on private wikis

The problem is that ApiQuery requires the 'read' right even though
ApiQueryTokens doesn't.

So, we introduce an exception: if action=query gets only meta=tokens
(and optionally rawcontinue and indexpageids, since they don't affect
anything), no other modules and nothing in the ApiPageSet,
ApiQuery::isReadMode() will return false.

Bug: T130112
Change-Id: I83dafb0305ff0cb1fc3bac668b88b5d2022e5880

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 18 Mar 2016 20:57:36 +0000 (21:57 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I935a1d0bbc9fa5028f2fa1c9b05272ec2e416a7a

8 years agoMerge "ApiQueryStashImageInfo: Don't throw exceptions when the user is not logged in"
jenkins-bot [Fri, 18 Mar 2016 18:19:46 +0000 (18:19 +0000)]
Merge "ApiQueryStashImageInfo: Don't throw exceptions when the user is not logged in"

8 years agoMerge "Use imported namespaces, don't fully qualify"
jenkins-bot [Fri, 18 Mar 2016 18:15:39 +0000 (18:15 +0000)]
Merge "Use imported namespaces, don't fully qualify"

8 years agoMerge "Remove $wgAllowMicroDataAttributes and $wgAllowRdfaAttributes"
jenkins-bot [Fri, 18 Mar 2016 18:03:04 +0000 (18:03 +0000)]
Merge "Remove $wgAllowMicroDataAttributes and $wgAllowRdfaAttributes"

8 years agoRemove $wgAllowMicroDataAttributes and $wgAllowRdfaAttributes
Sébastien Santoro [Tue, 15 Mar 2016 18:23:10 +0000 (18:23 +0000)]
Remove $wgAllowMicroDataAttributes and $wgAllowRdfaAttributes

$wgAllowMicroDataAttributes and $wgAllowRdfaAttributes have been
introduced in MediaWiki 1.16 and required at this moment $wgHTML5
to be true. This last setting has been removed in MediaWiki 1.22.

To simplify the code maintenance and the configuration complexity,
those settings are removed and the features are always available.

RDFa users must now explicitly set $wgHtml5Version to a RDFa
version. Currently the correct values are:

  - HTML+RDFa 1.0
  - XHTML+RDFa 1.0

Bug: T130040
Change-Id: I17a7bff2cad170e381eabf0aec4e26e4fd0cddc3

8 years agoMerge "skins: Minor doc and code clean up in getCategories()"
jenkins-bot [Fri, 18 Mar 2016 16:31:14 +0000 (16:31 +0000)]
Merge "skins: Minor doc and code clean up in getCategories()"

8 years agoMerge "Change "COMMIT ENQUEUED" warnings to level INFO"
jenkins-bot [Fri, 18 Mar 2016 16:30:52 +0000 (16:30 +0000)]
Merge "Change "COMMIT ENQUEUED" warnings to level INFO"

8 years agoMerge "Make spreadAnyEditBlock() calls respect read-only mode"
jenkins-bot [Fri, 18 Mar 2016 16:28:41 +0000 (16:28 +0000)]
Merge "Make spreadAnyEditBlock() calls respect read-only mode"

8 years agoMerge "SpecialUploadStash: Convert form to OOUI"
jenkins-bot [Fri, 18 Mar 2016 16:17:23 +0000 (16:17 +0000)]
Merge "SpecialUploadStash: Convert form to OOUI"

8 years agoApiQueryStashImageInfo: Don't throw exceptions when the user is not logged in
Bartosz Dziewoński [Fri, 18 Mar 2016 00:14:35 +0000 (01:14 +0100)]
ApiQueryStashImageInfo: Don't throw exceptions when the user is not logged in

Bug: T130253
Change-Id: If70b919c65a21b57b3022d495756bf250b0ba786

8 years agoMerge "Link to Special:WhatLinksHere in CatWatch bundeled summary"
jenkins-bot [Fri, 18 Mar 2016 14:21:24 +0000 (14:21 +0000)]
Merge "Link to Special:WhatLinksHere in CatWatch bundeled summary"

8 years agoActually make $wgNoReplyAddress default to $wgPasswordSender
Reedy [Fri, 18 Mar 2016 14:19:07 +0000 (14:19 +0000)]
Actually make $wgNoReplyAddress default to $wgPasswordSender

Bug: T130368
Change-Id: Ifc32f0cf82ea80361822f612b0c6aeb427721606

8 years agoUse imported namespaces, don't fully qualify
Reedy [Fri, 18 Mar 2016 14:02:26 +0000 (14:02 +0000)]
Use imported namespaces, don't fully qualify

Remove unused import in CachedBagOStuff

Change-Id: I60ca8acc0e34384ce6ad6cde1cfb3a5dc8021e5f

8 years agobuild: Remove redundant jscs rule 'disallowQuotedKeysInObjects'
Ricordisamoa [Fri, 18 Mar 2016 09:54:44 +0000 (10:54 +0100)]
build: Remove redundant jscs rule 'disallowQuotedKeysInObjects'

{ "allExcept": [ "reserved" ] } found in the wikimedia preset is
the same as the customized "allButReserved" present in MediaWiki,
except that the latter is deprecated as stated at:
http://jscs.info/rule/disallowQuotedKeysInObjects

Change-Id: I5de2a8f7ad42857ccdc793551d08c77e2aae8156

8 years agoMake spreadAnyEditBlock() calls respect read-only mode
Aaron Schulz [Fri, 18 Mar 2016 01:16:18 +0000 (18:16 -0700)]
Make spreadAnyEditBlock() calls respect read-only mode

Bug: T129968
Change-Id: Ib391bd880fa9e04777a355634035183065de5b0a

8 years agoMerge "Log slow diffs"
jenkins-bot [Fri, 18 Mar 2016 00:52:59 +0000 (00:52 +0000)]
Merge "Log slow diffs"

8 years agoChange "COMMIT ENQUEUED" warnings to level INFO
Aaron Schulz [Fri, 18 Mar 2016 00:50:19 +0000 (17:50 -0700)]
Change "COMMIT ENQUEUED" warnings to level INFO

These are too unimportant and spammy

Change-Id: I2205d9b42014f138ac523967f91df6d340234256

8 years agoMerge "Rename ApiRequest to ApiAction"
jenkins-bot [Fri, 18 Mar 2016 00:08:57 +0000 (00:08 +0000)]
Merge "Rename ApiRequest to ApiAction"

8 years agoSpecialUploadStash: Convert form to OOUI
Bartosz Dziewoński [Thu, 17 Mar 2016 22:45:20 +0000 (23:45 +0100)]
SpecialUploadStash: Convert form to OOUI

Bug: T130328
Change-Id: I2ebbc783ff93dd47c552fa88230ea5ab2dbefb1e

8 years agoMerge "SpecialUploadStash: Disable output gzipping when outputting remove scaled...
jenkins-bot [Thu, 17 Mar 2016 22:51:33 +0000 (22:51 +0000)]
Merge "SpecialUploadStash: Disable output gzipping when outputting remove scaled thumb"

8 years agoRename ApiRequest to ApiAction
Bryan Davis [Thu, 17 Mar 2016 22:43:50 +0000 (16:43 -0600)]
Rename ApiRequest to ApiAction

Half of the work needed for handling this logging stream was done using
the channel name "ApiRequest" and the other half was done under the name
"ApiAction". The ApiRequest naming is easier to change at this point.

Bug: T108618
Change-Id: I5797731abeba22ef6ced7c8407ee670344d35b3d

8 years agoSpecialUploadStash: Disable output gzipping when outputting remove scaled thumb
Bartosz Dziewoński [Thu, 17 Mar 2016 22:22:00 +0000 (23:22 +0100)]
SpecialUploadStash: Disable output gzipping when outputting remove scaled thumb

This is the only code path that wasn't calling wfResetOutputBuffers()
already. All other ones end up in outputLocalFile(), which calls
it via StreamFile::prepareForStream().

I can't really tell why this causes Varnish stuff to go bust, but it's
definitely the right thing to do anyway.

Bug: T130204
Change-Id: Ib6bc9c64c6c893fd7f5a5d906da32d9bee509a98

8 years agoCast API timeSpentBackend to an int
Bryan Davis [Thu, 17 Mar 2016 22:16:25 +0000 (16:16 -0600)]
Cast API timeSpentBackend to an int

Fixes {"timeSpentBackend":"Expected integer, but received double"} Avro
encoding error.

Bug: T108618
Change-Id: Iea79d14afe0ef0d1a9ea88096b7bbd90083df757

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 17 Mar 2016 21:37:47 +0000 (22:37 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I610b8736afb5cc84d6a057c521a241c3656b73b8

8 years agoskins: Minor doc and code clean up in getCategories()
Timo Tijhof [Thu, 17 Mar 2016 19:53:42 +0000 (19:53 +0000)]
skins: Minor doc and code clean up in getCategories()

* Clarify @return as being a string of HTML.
* Use Html class instead of inline string concatenation.

Change-Id: If3ff352aca897c3952b1f4d6c1b9416f9db35ae6

8 years agoMention that 'APIEditBeforeSave' is also being run on undo
Marius Hoch [Thu, 17 Mar 2016 19:11:30 +0000 (20:11 +0100)]
Mention that 'APIEditBeforeSave' is also being run on undo

This came up in T126861 where we identified this as desired
behavior.

Change-Id: I37e8f59b4b88cc289709da9802df3a0f123939b1

8 years agoAdd WatchedItemStore::countVisitingWatchersMultiple
Leszek Manicki [Tue, 15 Mar 2016 10:39:22 +0000 (11:39 +0100)]
Add WatchedItemStore::countVisitingWatchersMultiple

This is for batch counting of visiting watchers, following the change
made in I2868c31fc09121de381d822e8f49194e3022bb42.
Query/logic has been extracted from ApiQueryInfo.

Bug: T129482
Change-Id: Ia9a534f5edb7af3cb7bf86be358dddb5d8c259cf

8 years agoLink to Special:WhatLinksHere in CatWatch bundeled summary
addshore [Fri, 26 Feb 2016 10:28:16 +0000 (10:28 +0000)]
Link to Special:WhatLinksHere in CatWatch bundeled summary

This link could probably also include
&hidelinks=1&hideredirs=1 options
at a later stage

Bug: T119712
Change-Id: I578d550d25d92e20360bcaaf5392ef75a868a483

8 years agoAdd --with-phpunitclass arg to phpunit.php
Adrian Heine [Thu, 17 Mar 2016 12:28:34 +0000 (13:28 +0100)]
Add --with-phpunitclass arg to phpunit.php

This would allow to easily use stuff like
https://github.com/fiunchinho/phpunit-randomizer.

Change-Id: I28e8b1d261de0395366b18465a0adc4d7c4fde4a

8 years agoMerge "Fix ApiQueryInfo response for prop=watchers"
jenkins-bot [Thu, 17 Mar 2016 10:09:03 +0000 (10:09 +0000)]
Merge "Fix ApiQueryInfo response for prop=watchers"

8 years agoMerge "Fix documentation lies about debug toolbar / cache interaction"
jenkins-bot [Thu, 17 Mar 2016 10:04:59 +0000 (10:04 +0000)]
Merge "Fix documentation lies about debug toolbar / cache interaction"

8 years agoFix ApiQueryInfo response for prop=watchers
Leszek Manicki [Wed, 16 Mar 2016 16:07:31 +0000 (17:07 +0100)]
Fix ApiQueryInfo response for prop=watchers

Ie84e6feaa42db1bc7a1f89b56aed37dd7fe95ea4 part of them problem
with incorrect API response but if when no watchers data is
fetched (ie. due to early return in ApiQueryInfo::getWatcherInfo),
response contains "watchers": null instead of skipping "watchers"
key entirely.

Bug: T129482
Change-Id: I9cab120ec4e6a9cf4626678e45ef14ea8efc8cbc

8 years agoMerge "mediawiki.api.parse: Restore support for stringified objects"
jenkins-bot [Thu, 17 Mar 2016 02:04:30 +0000 (02:04 +0000)]
Merge "mediawiki.api.parse: Restore support for stringified objects"

8 years agoMerge "Action::factory: Don't crash on missing Action classes"
jenkins-bot [Thu, 17 Mar 2016 01:05:49 +0000 (01:05 +0000)]
Merge "Action::factory: Don't crash on missing Action classes"

8 years agomediawiki.api.parse: Restore support for stringified objects
Matthew Flaschen [Fri, 11 Mar 2016 00:04:15 +0000 (19:04 -0500)]
mediawiki.api.parse: Restore support for stringified objects

Follows-up 11e6b3d. Don't assume non-string values are mw.Title objects.
mw.Title is the special case. Restore the previous default of assuming wikitext.

This was presumably avoided earlier because 'instanceof' throws if given undefined
as right-hand expression and don't want a needless dependency on mediawiki.Title.

Change-Id: I794ed4105d116e63ed505a17a237f289b80d3b15

8 years agoAction::factory: Don't crash on missing Action classes
Roan Kattouw [Thu, 17 Mar 2016 00:39:54 +0000 (17:39 -0700)]
Action::factory: Don't crash on missing Action classes

Show the "no such action" error message instead.

Normally I wouldn't favor putting this in here, but it's way
too easy to register a missing class by accident, see my rant
on T107921#2128080.

Bug: T107921
Change-Id: I56da8a5810cae3547a0c8f2d3f435dfd790fbeaf

8 years agoMerge "Support multiple extension-dir paths to be passed to mergeMessageFileList"
jenkins-bot [Wed, 16 Mar 2016 22:32:43 +0000 (22:32 +0000)]
Merge "Support multiple extension-dir paths to be passed to mergeMessageFileList"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 16 Mar 2016 20:56:35 +0000 (21:56 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I2cd76699393ba63879babd31f435387593d3a2aa

8 years agoSupport multiple extension-dir paths to be passed to mergeMessageFileList
Mukunda Modell [Thu, 4 Feb 2016 01:06:02 +0000 (19:06 -0600)]
Support multiple extension-dir paths to be passed to mergeMessageFileList

If scap is modified to pass the path to both extensions/ and skins/ then
the extension-list file in wmf-config will no longer be needed, eliminating
many headaches. (refs T125678)

Bug: T125678

Change-Id: I4fd0c99d68fa32bf2378691955850a1be2c022df

8 years agoUpdate OOjs UI to v0.16.3
James D. Forrester [Wed, 16 Mar 2016 19:22:40 +0000 (19:22 +0000)]
Update OOjs UI to v0.16.3

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

Change-Id: Idb6d1250bea3041bf6c4d198f21544b1f5bc4893

8 years agoMerge "Make Job::toString() handle array parameters better"
jenkins-bot [Wed, 16 Mar 2016 18:20:27 +0000 (18:20 +0000)]
Merge "Make Job::toString() handle array parameters better"

8 years agoUpgrade Sinon.JS to 1.17.3
Timo Tijhof [Sat, 12 Mar 2016 00:59:30 +0000 (00:59 +0000)]
Upgrade Sinon.JS to 1.17.3

No major changes for us other than a bugfix that makes the
following work as expected:

  var clock = this.sandbox.useFakeTimers();
  setTimeout(function () {
   clock.tick(10);
  });
  click.tick(1);
  // Expected: 11ms is recorded
  // Actual: 1ms is record

This was broken up until Sinon 1.16.0 (Lolex 1.3.0) because it saved the
"clock.now" value before running any pending timeout callbacks. Then it
unconditionally assigned the "clock.now" value to 'oldNow + ticked', which
discarded ticks made by a callback.

Change-Id: I2775f4c6353aef12ced6dc45e73fe8d4e49c2b68

8 years agoMerge "Improve translation for bs namespaces"
jenkins-bot [Wed, 16 Mar 2016 17:30:52 +0000 (17:30 +0000)]
Merge "Improve translation for bs namespaces"

8 years agoMerge "mediawiki.api.test: Refactor to embrace async"
jenkins-bot [Wed, 16 Mar 2016 17:28:51 +0000 (17:28 +0000)]
Merge "mediawiki.api.test: Refactor to embrace async"

8 years agoImprove translation for bs namespaces
Sébastien Santoro [Wed, 9 Mar 2016 21:02:05 +0000 (21:02 +0000)]
Improve translation for bs namespaces

NS_USER_TALK: "Razgovor sa korisnikom" → "Razgovor s korisnikom"

Translation author: Srđan M. (Srdjan m)

Bug: T115812
Change-Id: Ia674baa1476e5977adb77f4b783c20f90925948f

8 years agoDrop deprecated $wgPreloadJavaScriptMwUtil
James D. Forrester [Wed, 16 Mar 2016 10:45:25 +0000 (10:45 +0000)]
Drop deprecated $wgPreloadJavaScriptMwUtil

This was always false since introduction in 3c72b527 released in MediaWiki
1.19, and deprecated in 0ac4f998, released as part of MediaWiki 1.26. Any
code that still needs the mediawiki.util module can continue to use it via
expressing this dependency through their ResourceLoader manifest as usual.

Bug: T111077
Change-Id: Ic838af8727476c047f01ef0dbbeb952c85e263e1

8 years agoMake Job::toString() handle array parameters better
Aaron Schulz [Wed, 16 Mar 2016 10:24:10 +0000 (03:24 -0700)]
Make Job::toString() handle array parameters better

Previously it would result in array(x) in fairly simple cases.

Change-Id: I6bfe67faa45835babb2c7e259b5cd158e0f0a649

8 years agoTrack the # of times remnant refreshLinks jobs divide
Aaron Schulz [Tue, 15 Mar 2016 22:46:56 +0000 (15:46 -0700)]
Track the # of times remnant refreshLinks jobs divide

Change-Id: I32ec09cf1fc6d3a14d99b30ad465fcf6912ce9e0

8 years agoMerge "Add RecursiveLinkPurge log for API requests"
jenkins-bot [Tue, 15 Mar 2016 21:59:19 +0000 (21:59 +0000)]
Merge "Add RecursiveLinkPurge log for API requests"

8 years agoMerge "Adding number of changes info for grouped category changes"
jenkins-bot [Tue, 15 Mar 2016 21:41:42 +0000 (21:41 +0000)]
Merge "Adding number of changes info for grouped category changes"

8 years agoAdd RecursiveLinkPurge log for API requests
Aaron Schulz [Mon, 14 Mar 2016 21:21:47 +0000 (14:21 -0700)]
Add RecursiveLinkPurge log for API requests

Change-Id: I29636c045f7b561b2da0100f5e69050808d1aec7

8 years agoAdding number of changes info for grouped category changes
WMDE-Fisch [Thu, 10 Mar 2016 16:48:59 +0000 (17:48 +0100)]
Adding number of changes info for grouped category changes

This patch addes the summarized number of category changes
for grouped category changes on the EnhancedChangesList.

Bug: T126849
Change-Id: I3c8ccb2ad6310dac19a724b2ce923c1e67e588be

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 15 Mar 2016 21:17:29 +0000 (22:17 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I4830f0116910a4e4bddfd7b0d44e7caea70f1f5c

8 years agoAdd REL NOTES about watchlist wl_id field
addshore [Tue, 15 Mar 2016 20:34:03 +0000 (20:34 +0000)]
Add REL NOTES about watchlist wl_id field

Change-Id: Ib3bfe0d0011d96da6d6cfad5930645d343f7cbb6

8 years agoMerge "Add id field to watchlist db table"
jenkins-bot [Tue, 15 Mar 2016 20:14:23 +0000 (20:14 +0000)]
Merge "Add id field to watchlist db table"

8 years agoMerge "Use WatchedItemStore::removeWatch in SpecialEditWatchlist"
jenkins-bot [Tue, 15 Mar 2016 17:47:12 +0000 (17:47 +0000)]
Merge "Use WatchedItemStore::removeWatch in SpecialEditWatchlist"

8 years agoMerge "Add WatchedItemStore::countWatchedItems"
jenkins-bot [Tue, 15 Mar 2016 17:29:37 +0000 (17:29 +0000)]
Merge "Add WatchedItemStore::countWatchedItems"

8 years agoMerge "WatchedItemStore add db connection helper methods"
jenkins-bot [Tue, 15 Mar 2016 17:22:00 +0000 (17:22 +0000)]
Merge "WatchedItemStore add db connection helper methods"

8 years agoMerge "Reset WatchedItemStore default instance after tests"
jenkins-bot [Tue, 15 Mar 2016 17:18:09 +0000 (17:18 +0000)]
Merge "Reset WatchedItemStore default instance after tests"

8 years agoUse WatchedItemStore::removeWatch in SpecialEditWatchlist
addshore [Tue, 15 Mar 2016 01:12:29 +0000 (01:12 +0000)]
Use WatchedItemStore::removeWatch in SpecialEditWatchlist

Bug: T129481
Change-Id: I12bf46244532195ba19516ba571a1728bd365db9

8 years agoFix ApiQueryInfo break from use of WatchedItemStore
addshore [Tue, 15 Mar 2016 16:08:45 +0000 (16:08 +0000)]
Fix ApiQueryInfo break from use of WatchedItemStore

Fixes an issue introduced in:
I5a465773599cce9f8c9e94847cede6d12282c827

The new code now returns all targets even when 0
watcher have been found.
This patch adjusts the api to expect that.

Bug: T129482
Change-Id: Ie84e6feaa42db1bc7a1f89b56aed37dd7fe95ea4

8 years agoAdd WatchedItemStore::countWatchedItems
addshore [Mon, 14 Mar 2016 16:54:28 +0000 (16:54 +0000)]
Add WatchedItemStore::countWatchedItems

This method counts the number of individual items
that a user is watching.
A subject and corresponding talk page would mean a
count of 2

Unit and integration tests are also added here

Bug: T129481
Change-Id: I4b55318dc1d1c5abab1c5da16cebf1a43ddf9248

8 years agoWatchedItemStore add db connection helper methods
addshore [Tue, 15 Mar 2016 15:45:21 +0000 (15:45 +0000)]
WatchedItemStore add db connection helper methods

As suggested in:
https://gerrit.wikimedia.org/r/#/c/277276/2/includes/WatchedItemStore.php

Change-Id: Id82d987eee025e21efc381bd441cd07fbc50aea0

8 years agoReset WatchedItemStore default instance after tests
addshore [Tue, 15 Mar 2016 00:12:06 +0000 (00:12 +0000)]
Reset WatchedItemStore default instance after tests

Prior to this change in tests the overridden store
would remain in the instance static and thus could
be used in other places.

This patch introduces the used of ScopedCallbacks
in the override methods in WatchedItemStore.
This means that any instance of WatchedItemStore
should return to a regular state after each test.

This is better than requiring the tests to reset
the value back to the origional as this would likely
be forgotten and result in long hunts for failing
tests.

This was found while writing more tests...

Change-Id: I9aa71425642174ae9ea2c6d4f85dcd07d724af11

8 years agoMerge "Use WatchedItemStore::countWatchers in SpecialWatchlist"
jenkins-bot [Tue, 15 Mar 2016 15:30:15 +0000 (15:30 +0000)]
Merge "Use WatchedItemStore::countWatchers in SpecialWatchlist"

8 years agoMerge "Add countUnreadNotifications to WatchedItemStore"
jenkins-bot [Tue, 15 Mar 2016 15:29:59 +0000 (15:29 +0000)]
Merge "Add countUnreadNotifications to WatchedItemStore"

8 years agoMerge "Move countVisitingWatchers to WatchedItemStore"
jenkins-bot [Tue, 15 Mar 2016 15:29:25 +0000 (15:29 +0000)]
Merge "Move countVisitingWatchers to WatchedItemStore"

8 years agoMerge "Move counting of watchers to WatchedItemStore"
jenkins-bot [Tue, 15 Mar 2016 15:29:19 +0000 (15:29 +0000)]
Merge "Move counting of watchers to WatchedItemStore"

8 years agoMerge "Improve cache assertions in WatchedItemStoreUnitTest"
jenkins-bot [Tue, 15 Mar 2016 15:29:15 +0000 (15:29 +0000)]
Merge "Improve cache assertions in WatchedItemStoreUnitTest"

8 years agoMerge "Uncache things in WatchedItemStore::updateNotificationTimestamp"
jenkins-bot [Tue, 15 Mar 2016 15:29:10 +0000 (15:29 +0000)]
Merge "Uncache things in WatchedItemStore::updateNotificationTimestamp"

8 years agoMerge "Make unused variable optional in ChangesList::insertDiffHist"
jenkins-bot [Tue, 15 Mar 2016 14:52:56 +0000 (14:52 +0000)]
Merge "Make unused variable optional in ChangesList::insertDiffHist"

8 years agoMerge "Move dbSetup=true; follow-up d920237"
jenkins-bot [Tue, 15 Mar 2016 07:27:16 +0000 (07:27 +0000)]
Merge "Move dbSetup=true; follow-up d920237"

8 years agoMove dbSetup=true; follow-up d920237
Matthew Flaschen [Tue, 15 Mar 2016 02:49:13 +0000 (22:49 -0400)]
Move dbSetup=true; follow-up d920237

See https://gerrit.wikimedia.org/r/#/c/274643/8/tests/phpunit/MediaWikiTestCase.php

I unintentionally changed it so dbSetup wasn't always set to true
(it was in the early return case in the old code, but not the new)

Bug: T95870
Change-Id: I2119b0233330b88a61d15fe4dc55fe855fce4b6a

8 years agoFix undefined $modelId in MWUnknownContentModelException
Reedy [Mon, 14 Mar 2016 21:57:03 +0000 (21:57 +0000)]
Fix undefined $modelId in MWUnknownContentModelException

Change-Id: I13b93cc1e9d7c050765fab5d8de4e17ca4319dc1

8 years agoMerge "Add a structure test to validate all extension.json files"
jenkins-bot [Mon, 14 Mar 2016 21:21:15 +0000 (21:21 +0000)]
Merge "Add a structure test to validate all extension.json files"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 14 Mar 2016 21:07:09 +0000 (22:07 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ifab2110151643c82611927a45c0a0da9259f07d6

8 years agoAdd a structure test to validate all extension.json files
Kunal Mehta [Sun, 28 Feb 2016 09:19:14 +0000 (01:19 -0800)]
Add a structure test to validate all extension.json files

Adds a structure test to validate that all loaded extension.json and
skin.json files validate against the schema at
docs/extension.schema.json.

Bug: T128307
Change-Id: I2fd1caaa50c288821ab6847dc29d60e6554d9df5

8 years agoSpecialVersion: Just use HTTPS links to mw.org instead of protocol-relative
Chad Horohoe [Mon, 14 Mar 2016 19:09:25 +0000 (12:09 -0700)]
SpecialVersion: Just use HTTPS links to mw.org instead of protocol-relative

No need to make people redirect if they're on HTTP :)

Change-Id: I273be400e3889add553a2f066dfec008c170e6c0

8 years agoMerge "Remove support for non-Composer PHPUnit"
jenkins-bot [Mon, 14 Mar 2016 18:56:21 +0000 (18:56 +0000)]
Merge "Remove support for non-Composer PHPUnit"

8 years agoRemove support for non-Composer PHPUnit
Max Semenik [Sat, 12 Mar 2016 19:59:05 +0000 (11:59 -0800)]
Remove support for non-Composer PHPUnit

Composer is now a standard way to install MediaWiki's PHP dependencies,
no reason for it not to be the same for PHPUnit.

Change-Id: Ibd977eb3480dafaf270ff63abc43c413d7b72144

8 years agoresourceloader: Remove 'require' and 'module' from debug mode
Timo Tijhof [Mon, 14 Mar 2016 17:50:09 +0000 (17:50 +0000)]
resourceloader: Remove 'require' and 'module' from debug mode

Partially reverts 94c116240 and 7fd977b242 as it was incorrectly
split up. This should've been part of Idbd05488 instead of 94c116240.

Bug: T108655
Bug: T129776
Change-Id: Ia5e6e57c9bd651ec913a2543e2df8951ff345ea2

8 years agoMerge "Make use of …::class feature in ContentHandler/DatabaseUpdater"
jenkins-bot [Mon, 14 Mar 2016 17:38:07 +0000 (17:38 +0000)]
Merge "Make use of …::class feature in ContentHandler/DatabaseUpdater"

8 years agoMerge "completionSearch: try an exact match even if the backend returns no result"
jenkins-bot [Mon, 14 Mar 2016 17:21:31 +0000 (17:21 +0000)]
Merge "completionSearch: try an exact match even if the backend returns no result"

8 years agomediawiki.api.test: Refactor to embrace async
Timo Tijhof [Sat, 12 Mar 2016 02:15:14 +0000 (02:15 +0000)]
mediawiki.api.test: Refactor to embrace async

This was using lots of synchronous hacks but those don't work in newer
versions of Sinon.JS (and only worked by accident up until now).

The test will still run pretty quick, but it will yield to some extend because
mw.Api and jQuery.ajax both create XHR objects with async=true.

* Remove redundant QUnit.expect() calls (deprecated).
* Make use of QUnit's new Promise-return feature.
  This simplifies some tests by no longer having to call async() or start()
  manually when only dealing with a single promise.

This blocks upgrade of Sinon.JS.

Change-Id: I08b08ea3c3e8b41f4aea50d86b2c9dc0f579ba67