lhc/web/wiklou.git
8 years agoMerge "Hygiene: Use strtr() instead of str_replace() for character swapping"
jenkins-bot [Wed, 15 Jul 2015 09:39:45 +0000 (09:39 +0000)]
Merge "Hygiene: Use strtr() instead of str_replace() for character swapping"

8 years agoMerge "mediawiki.jqueryMsg: Use load urls instead of file urls for debug"
jenkins-bot [Wed, 15 Jul 2015 07:40:36 +0000 (07:40 +0000)]
Merge "mediawiki.jqueryMsg: Use load urls instead of file urls for debug"

8 years agoMerge "Upgraded User::saveSettings logged errors to exceptions"
jenkins-bot [Wed, 15 Jul 2015 07:36:56 +0000 (07:36 +0000)]
Merge "Upgraded User::saveSettings logged errors to exceptions"

8 years agoMerge "Add MediaWiki-Timestamp header to ResourceLoader requests"
jenkins-bot [Wed, 15 Jul 2015 07:30:24 +0000 (07:30 +0000)]
Merge "Add MediaWiki-Timestamp header to ResourceLoader requests"

8 years agoMerge "Fixed User class IDE warnings"
jenkins-bot [Wed, 15 Jul 2015 07:30:21 +0000 (07:30 +0000)]
Merge "Fixed User class IDE warnings"

8 years agoAdd MediaWiki-Timestamp header to ResourceLoader requests
Ori Livneh [Fri, 3 Jul 2015 02:20:41 +0000 (19:20 -0700)]
Add MediaWiki-Timestamp header to ResourceLoader requests

To help distinguish cache hits from cache misses, send a MediaWiki-Timestamp
header on ResourceLoader responses, indicating the current time as fractional
seconds since epoch, with microsecond precision.

Change-Id: I954a96ced1435a47d458de12411b257fe6b4ea34

8 years agoMerge "resourceloader: Make tests less susceptible to timestamp races"
jenkins-bot [Wed, 15 Jul 2015 05:30:24 +0000 (05:30 +0000)]
Merge "resourceloader: Make tests less susceptible to timestamp races"

8 years agoMerge "Record timing of thumbnail generation and store pull"
jenkins-bot [Wed, 15 Jul 2015 05:28:38 +0000 (05:28 +0000)]
Merge "Record timing of thumbnail generation and store pull"

8 years agoMerge "SpecialLinkSearch: Switch to OOUI form"
jenkins-bot [Wed, 15 Jul 2015 05:15:08 +0000 (05:15 +0000)]
Merge "SpecialLinkSearch: Switch to OOUI form"

8 years agoMerge "OOUIHTMLForm: Implement HTMLSelectNamespace"
jenkins-bot [Wed, 15 Jul 2015 05:14:20 +0000 (05:14 +0000)]
Merge "OOUIHTMLForm: Implement HTMLSelectNamespace"

8 years agoMerge "OOUIHTMLForm: Support setWrapperLegend()"
jenkins-bot [Wed, 15 Jul 2015 04:59:00 +0000 (04:59 +0000)]
Merge "OOUIHTMLForm: Support setWrapperLegend()"

8 years agoMerge "TitleInputWidget: Correct CSS class name in PHP code to match JS code"
jenkins-bot [Wed, 15 Jul 2015 04:08:05 +0000 (04:08 +0000)]
Merge "TitleInputWidget: Correct CSS class name in PHP code to match JS code"

8 years agoMerge "TitleInputWidget: Override getJavaScriptClassName and remove infuse hack"
jenkins-bot [Wed, 15 Jul 2015 03:29:59 +0000 (03:29 +0000)]
Merge "TitleInputWidget: Override getJavaScriptClassName and remove infuse hack"

8 years agoMerge "Fix MultiHttpClient to return correct errors"
jenkins-bot [Tue, 14 Jul 2015 21:38:06 +0000 (21:38 +0000)]
Merge "Fix MultiHttpClient to return correct errors"

8 years agoFix MultiHttpClient to return correct errors
Niklas Laxström [Wed, 13 May 2015 09:38:21 +0000 (11:38 +0200)]
Fix MultiHttpClient to return correct errors

Bug: T89758
Change-Id: Ia1f1986d150df1a9f463d48f1a914a04608550f8

8 years agoTitleInputWidget: Correct CSS class name in PHP code to match JS code
Bartosz Dziewoński [Tue, 14 Jul 2015 18:57:07 +0000 (20:57 +0200)]
TitleInputWidget: Correct CSS class name in PHP code to match JS code

Change-Id: If05c5fbc052310b0b663da6ff283d821ed00ea73

8 years agoAdd "purpose" to password validity check
csteipp [Tue, 14 Jul 2015 19:26:46 +0000 (12:26 -0700)]
Add "purpose" to password validity check

Allow callers to specify why they are checking a passwords validity, so
some checks can be modified. Only check the default policy on creation,
since the account doesn't exist it's not a member of any groups.

Bug: T104615
Change-Id: I56b66002562aaa1493d94a90309bc8e4ae3841c8

8 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Tue, 14 Jul 2015 19:44:31 +0000 (19:44 +0000)]
Merge "Localisation updates from https://translatewiki.net."

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 14 Jul 2015 19:34:56 +0000 (21:34 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia8dd7a672283dc0ea984965ef587ea21375fa9ea

8 years agoMerge "Update OOjs UI to v0.12.0"
jenkins-bot [Tue, 14 Jul 2015 19:33:28 +0000 (19:33 +0000)]
Merge "Update OOjs UI to v0.12.0"

8 years agoMerge "API: improve pageswithprop explanation"
jenkins-bot [Tue, 14 Jul 2015 13:17:48 +0000 (13:17 +0000)]
Merge "API: improve pageswithprop explanation"

8 years agoRecord timing of thumbnail generation and store pull
Gilles Dubuc [Tue, 14 Jul 2015 09:21:21 +0000 (11:21 +0200)]
Record timing of thumbnail generation and store pull

Bug: T105681
Change-Id: If2edf285dc47736abde957a117ac4b40716072aa

8 years agoUpdate OOjs UI to v0.12.0
James D. Forrester [Mon, 13 Jul 2015 23:56:21 +0000 (16:56 -0700)]
Update OOjs UI to v0.12.0

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

Change-Id: I3436db714409adfc844598e36790258667d6d9fd

8 years agoMerge "Set $wgMainWANCache to none for PHPUnit, as is done for $wgMainCacheType"
Aaron Schulz [Mon, 13 Jul 2015 23:25:36 +0000 (23:25 +0000)]
Merge "Set $wgMainWANCache to none for PHPUnit, as is done for $wgMainCacheType"

8 years agoSet $wgMainWANCache to none for PHPUnit, as is done for $wgMainCacheType
Aaron Schulz [Mon, 13 Jul 2015 21:45:11 +0000 (14:45 -0700)]
Set $wgMainWANCache to none for PHPUnit, as is done for $wgMainCacheType

Change-Id: I0518876d7df7027c934d1199543a3185732df663

8 years agoMerge "Revert "Add 'AuthPluginStrict' log to identify users who are unable to authent...
jenkins-bot [Mon, 13 Jul 2015 23:17:50 +0000 (23:17 +0000)]
Merge "Revert "Add 'AuthPluginStrict' log to identify users who are unable to authenticate""

8 years agoRevert "Add 'AuthPluginStrict' log to identify users who are unable to authenticate"
Legoktm [Mon, 13 Jul 2015 23:07:02 +0000 (23:07 +0000)]
Revert "Add 'AuthPluginStrict' log to identify users who are unable to authenticate"

Does not work as it will also log failed login attempts due
to a wrong password.

This reverts commit 9a97a7530f2a637cbb95603cfa4e0b51da753207.

Change-Id: I6abd19da4e6939315a7fe6f7debe5227b68d38a7

8 years agoFixed edit stash inclusion queries
Aaron Schulz [Mon, 13 Jul 2015 19:11:16 +0000 (12:11 -0700)]
Fixed edit stash inclusion queries

* These are hit when the stashed edit is several seconds
  old. The old code was not using makeList() correctly.

Bug: T105597
Change-Id: I265307715996c50d819915a55ea34bbc0ed6c5c9

8 years agoMerge "objectcache: Add WANObjectCache::resetCheckKey() method"
jenkins-bot [Mon, 13 Jul 2015 21:35:12 +0000 (21:35 +0000)]
Merge "objectcache: Add WANObjectCache::resetCheckKey() method"

8 years agoFixed User class IDE warnings
Aaron Schulz [Mon, 13 Jul 2015 21:18:55 +0000 (14:18 -0700)]
Fixed User class IDE warnings

Change-Id: I68c30fd81a266aa1acdf74162bfa864b67922347

8 years agoobjectcache: Add WANObjectCache::resetCheckKey() method
Aaron Schulz [Thu, 28 May 2015 17:04:19 +0000 (10:04 -0700)]
objectcache: Add WANObjectCache::resetCheckKey() method

Change-Id: I6f8b97c1f4511534e1ab2656f472adee491f9d9f

8 years agoAPI: improve pageswithprop explanation
S Page [Mon, 13 Jul 2015 20:09:40 +0000 (13:09 -0700)]
API: improve pageswithprop explanation

Minor rephrase.

Change-Id: I80fb3e3866f2e3e487f5fc980615f34def5558a3

8 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Mon, 13 Jul 2015 19:23:25 +0000 (19:23 +0000)]
Merge "Localisation updates from https://translatewiki.net."

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 13 Jul 2015 19:18:35 +0000 (21:18 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I173f63580cb22316ee1085dc8ef932d28c4e290d

8 years agoMove StatsD key normalization from ProfilerOutputStats to BufferingStatsdDataFactory
Ori Livneh [Mon, 13 Jul 2015 18:26:27 +0000 (11:26 -0700)]
Move StatsD key normalization from ProfilerOutputStats to BufferingStatsdDataFactory

I'm not sure why I stuck `normalizeMetricKey' in ProfilerOutputStats, because
the transformation it applies are suitable for converting any arbitrary string
into a StatsD-safe metric key. This patch moves the method to
BufferingStatsdDataFactory, which ensures it applies to all metrics logged
within MediaWiki, and not just the Profiler.

Supercedes If0237cdd0d.

Change-Id: I496ed748000d28f5399fee6e3cc271a1f68bd058

8 years agoMerge "Remove <code/> from 'linksearch-text' message"
jenkins-bot [Mon, 13 Jul 2015 18:38:22 +0000 (18:38 +0000)]
Merge "Remove <code/> from 'linksearch-text' message"

8 years agoMerge "Add mw.Upload for easy tracking of uploads"
jenkins-bot [Mon, 13 Jul 2015 18:02:46 +0000 (18:02 +0000)]
Merge "Add mw.Upload for easy tracking of uploads"

8 years agoMerge "Add stash support for mw.Api.upload"
jenkins-bot [Mon, 13 Jul 2015 17:53:44 +0000 (17:53 +0000)]
Merge "Add stash support for mw.Api.upload"

8 years agoAdd mw.Upload for easy tracking of uploads
Mark Holmquist [Mon, 6 Jul 2015 20:38:05 +0000 (15:38 -0500)]
Add mw.Upload for easy tracking of uploads

This class will be used in an mw-ooui upload widget, as well
as several other places, to create a simpler upload pipeline.

Bug: T103413
Change-Id: Ifbfa626421b1b55ecaa522c5e5ef1f7ea45c6527

8 years agoMerge "Add support for FormData in mw.Api.upload"
jenkins-bot [Mon, 13 Jul 2015 17:51:48 +0000 (17:51 +0000)]
Merge "Add support for FormData in mw.Api.upload"

8 years agoMerge "Add frontend API for uploading via iframe"
jenkins-bot [Mon, 13 Jul 2015 17:50:15 +0000 (17:50 +0000)]
Merge "Add frontend API for uploading via iframe"

8 years agoAdd stash support for mw.Api.upload
Mark Holmquist [Mon, 29 Jun 2015 14:41:05 +0000 (09:41 -0500)]
Add stash support for mw.Api.upload

Bug: T103399
Change-Id: I2be7d5d874861e4cc24897316cd4933eb85b2c8f

8 years agoAdd support for FormData in mw.Api.upload
Mark Holmquist [Wed, 24 Jun 2015 19:48:12 +0000 (14:48 -0500)]
Add support for FormData in mw.Api.upload

Bug: T103398
Change-Id: I6185551468cf9799127f57e20e5a4134ca2a2a0f

8 years agoAdd frontend API for uploading via iframe
Mark Holmquist [Wed, 24 Jun 2015 19:00:19 +0000 (14:00 -0500)]
Add frontend API for uploading via iframe

Coming next: File API support, stash support

Bug: T64513
Change-Id: I06fa61e7155efe8126ba12cda9376c37f1c45e8e

8 years agoAdd 'AuthPluginStrict' log to identify users who are unable to authenticate
Kunal Mehta [Fri, 10 Jul 2015 16:20:43 +0000 (09:20 -0700)]
Add 'AuthPluginStrict' log to identify users who are unable to authenticate

To be able to identify any users who are unable to log in when switching
from allowing local authentication to strict.

Change-Id: I2ebdccdad9c7794d1c1b13db6a646a43bc770c4e

8 years agoSpecialLinkSearch: Switch to OOUI form
Bartosz Dziewoński [Sat, 11 Jul 2015 17:21:36 +0000 (19:21 +0200)]
SpecialLinkSearch: Switch to OOUI form

This demonstrates two recent features:
* Support for wrapped forms (I847c5e18ae5469aa3a68cc9fa37b2a6614476ca2)
* Support for namespace selector (I5e97e5c661582f726153533ad00695b450caed46)

Change-Id: I46ba066b324e005bf2efa67036e6db739b0dea32

8 years agoOOUIHTMLForm: Implement HTMLSelectNamespace
Bartosz Dziewoński [Sat, 11 Jul 2015 17:12:10 +0000 (19:12 +0200)]
OOUIHTMLForm: Implement HTMLSelectNamespace

* Extracted some common code between this and Html::namespaceSelector
  into a new method Html::namespaceSelectorOptions().

Change-Id: I5e97e5c661582f726153533ad00695b450caed46

8 years agoOOUIHTMLForm: Support setWrapperLegend()
Bartosz Dziewoński [Sat, 11 Jul 2015 16:46:05 +0000 (18:46 +0200)]
OOUIHTMLForm: Support setWrapperLegend()

Changed FormSpecialPage not to call setWrapperLegend() for OOUI
forms to preserve current default behavior.

Bonus:
* Correct documentation of setWrapperLegend() to state that it
  HTML-escapes legend text.
* Remove hard-coded class="visualClear" in getFormAttributes().
* Allow setWrapperLegend( true ) to display the wrapper without
  legend text.
* Rejigger things so that we can put the legend and "header HTML"
  into correct order.

Bug: T103026
Change-Id: I847c5e18ae5469aa3a68cc9fa37b2a6614476ca2

8 years agoMerge "mediawiki.jqueryMsg: Remove toLowerCase from {{int:}} substitution"
jenkins-bot [Mon, 13 Jul 2015 17:06:11 +0000 (17:06 +0000)]
Merge "mediawiki.jqueryMsg: Remove toLowerCase from {{int:}} substitution"

8 years agomediawiki.jqueryMsg: Remove toLowerCase from {{int:}} substitution
Ed Sanders [Fri, 12 Jun 2015 15:09:07 +0000 (16:09 +0100)]
mediawiki.jqueryMsg: Remove toLowerCase from {{int:}} substitution

While it is recommended that message keys be lower case, it is
not a requirement, nor is it enforced anywhere else (including the
PHP version of this function).

Only lowercase the first letter (which is case-insensitive) for
compatibility with messages data provided by ResourceLoader.

Change-Id: I1be039e9c76d114e251baa585b58efd2c8602a8a

8 years agoRemove <code/> from 'linksearch-text' message
Bartosz Dziewoński [Sat, 11 Jul 2015 17:18:12 +0000 (19:18 +0200)]
Remove <code/> from 'linksearch-text' message

It provides no value and looks really ugly.

Would be nice to automatically fix all translations too, if possible.

Change-Id: Ib27e4e94401061bd51f45901d7f9d8246bf35c2c

8 years agobrowsertests: upgrade watir-webdriver
Željko Filipin [Sat, 11 Jul 2015 09:55:41 +0000 (11:55 +0200)]
browsertests: upgrade watir-webdriver

Speed up elements lookup over network (such as with SauceLabs)
by bumping the watir-webdriver version.

Upgrade other Ruby gems to the latest released versions

The latest version of:
- bundler adds it’s version to Gemfile.lock
- watir-webdriver speeds up element lookup
- rubocop found some minor problems (fixed)

Bug: T92613
Change-Id: I06bde19f5a2e0b6b3fc7af9c01a66a137ba352ba

8 years agorebuildLocalisationCache: don't limit memory usage
Ori Livneh [Mon, 13 Jul 2015 09:19:45 +0000 (02:19 -0700)]
rebuildLocalisationCache: don't limit memory usage

The 1000 MB limit seems to have crept in without good reason, and crashing when
crossing an arbitrary threshold like that isn't very useful. LCStoreStaticArray
ends up using more than the default limit allows.

Change-Id: I1d9ab743720f5a1fbe320180c1dcdb4ad03c5aa1

8 years agoMerge "Pass context to parent constructor in PackedImageGallery"
jenkins-bot [Mon, 13 Jul 2015 08:01:02 +0000 (08:01 +0000)]
Merge "Pass context to parent constructor in PackedImageGallery"

8 years agoMerge "Ignore tagfilter url parameter on Special:EditTags"
jenkins-bot [Mon, 13 Jul 2015 08:00:57 +0000 (08:00 +0000)]
Merge "Ignore tagfilter url parameter on Special:EditTags"

8 years agoMerge "Use finite verb (indicative) in pageinfo-visiting-watchers"
jenkins-bot [Mon, 13 Jul 2015 08:00:53 +0000 (08:00 +0000)]
Merge "Use finite verb (indicative) in pageinfo-visiting-watchers"

8 years agoFix variable name (follows Ib2c5856d)
Ori Livneh [Mon, 13 Jul 2015 07:26:44 +0000 (00:26 -0700)]
Fix variable name (follows Ib2c5856d)

Change-Id: I1c673110e35daa6d5e382fad0fd99d6e4daa9f73

8 years agoMerge "Pass function name in SearchMySQL::minSearchLength"
jenkins-bot [Sun, 12 Jul 2015 20:26:45 +0000 (20:26 +0000)]
Merge "Pass function name in SearchMySQL::minSearchLength"

8 years agoPass function name in SearchMySQL::minSearchLength
umherirrender [Sun, 12 Jul 2015 20:05:37 +0000 (22:05 +0200)]
Pass function name in SearchMySQL::minSearchLength

This allow to see the correct function name in the debug logs

Change-Id: Ic18120ead47d4647943473d4aa1c5c795669d2c0

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 12 Jul 2015 19:26:13 +0000 (21:26 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Id82882a8c72480c844e3698ae242a893c26ba531

8 years agoMerge "SpecialLinkSearch: Use 'type' rather than 'class' for HTMLForm's HTMLSelectNam...
jenkins-bot [Sun, 12 Jul 2015 19:15:52 +0000 (19:15 +0000)]
Merge "SpecialLinkSearch: Use 'type' rather than 'class' for HTMLForm's HTMLSelectNamespace"

8 years agoMerge "API: Improve upload error reporting"
jenkins-bot [Sun, 12 Jul 2015 04:46:14 +0000 (04:46 +0000)]
Merge "API: Improve upload error reporting"

8 years agoMerge "Disable browser provided autocomplete function in TitleInputWidget"
jenkins-bot [Sun, 12 Jul 2015 03:53:23 +0000 (03:53 +0000)]
Merge "Disable browser provided autocomplete function in TitleInputWidget"

8 years agoDisable browser provided autocomplete function in TitleInputWidget
Florian [Mon, 6 Jul 2015 23:03:47 +0000 (01:03 +0200)]
Disable browser provided autocomplete function in TitleInputWidget

TitleInputWidget provides its own autocomplete suggestions, the browser
suggestions (of previously entered search terms) would overlap the
own suggestion list.

Disable the browser provided autocomplete function with autocomplete="off".

Depends on cd64c1ad3de in OOUI.

Bug: T105459
Change-Id: I01468395d708d84fbaf73983d95c1461e255c600

8 years agoUse finite verb (indicative) in pageinfo-visiting-watchers
Federico Leva [Sat, 11 Jul 2015 20:46:27 +0000 (22:46 +0200)]
Use finite verb (indicative) in pageinfo-visiting-watchers

Easier to understand; the previous form was a remnant from an
attempt at including more details in the message, abandoned for
excess of lego.

Bug: T105564
Change-Id: Ie5acc16b9d7d1c05dcf6627ff4b135089774a884

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 11 Jul 2015 19:48:41 +0000 (21:48 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Idea12a581189680246c2d986062e4d0d3a28b22b

8 years agoSpecialLinkSearch: Use 'type' rather than 'class' for HTMLForm's HTMLSelectNamespace
Bartosz Dziewoński [Sat, 11 Jul 2015 15:10:12 +0000 (17:10 +0200)]
SpecialLinkSearch: Use 'type' rather than 'class' for HTMLForm's HTMLSelectNamespace

That seems to be the usual convention.

Change-Id: I3afe7510be73178f82c9507ec68964f6e81567d4

8 years agoHTMLForm: Handle Flags in non-OOUI form buttons, too
Florian [Thu, 9 Jul 2015 17:08:21 +0000 (19:08 +0200)]
HTMLForm: Handle Flags in non-OOUI form buttons, too

Flags added to a button or submit field in a non-OOUI form will be
handled now, too.

With activated wgUseMediaWikiUIEverywhere:
All flags will get the 'mw-ui-' prefix.
(mw-ui-button is added to the button automatically)

With deactivated wgUseMediaWikiUIEverywhere:
All flags will get the 'mw-htmlform-' prefix.

This allows HTMLForm users to add flags to only the button, without
setting them as a cssclas, which would be added to the wrapper elements,
too.

Bug: T102838
Change-Id: I121a966fb4db6649a6e1012187148d354b5534f0

8 years agoIgnore tagfilter url parameter on Special:EditTags
umherirrender [Sat, 11 Jul 2015 11:06:47 +0000 (13:06 +0200)]
Ignore tagfilter url parameter on Special:EditTags

There is no need to pre-filter the seleteced revision for a tag.
This avoids use of $wgRequest in ChangeTags::modifyDisplayQuery

Change-Id: I5899a66ad8c500f058ce006c623d3e20c5bf8508

8 years agoUse correct variable in UserCache::doQuery
umherirrender [Sat, 11 Jul 2015 10:19:35 +0000 (12:19 +0200)]
Use correct variable in UserCache::doQuery

The variable $row is set to the last user of the first loop.
It is better to use the $name which is set in the foreach correctly.
This now adds all userpages to the LinkBatch and that avoids some extra
queries on at least Special:ListFiles.

Change-Id: Ied378b1596ec9d38eda41ce5ee413203c65eb21b

8 years agoPass context to parent constructor in PackedImageGallery
umherirrender [Sat, 11 Jul 2015 09:35:34 +0000 (11:35 +0200)]
Pass context to parent constructor in PackedImageGallery

This avoids a "ContextSource::getContext called without context."

Change-Id: Ib17139d4be3bf990acff1a1a435d6a7437b6f443

8 years agoMerge "Allow "." in filebackend container prefixes"
jenkins-bot [Sat, 11 Jul 2015 01:28:04 +0000 (01:28 +0000)]
Merge "Allow "." in filebackend container prefixes"

8 years agoMerge "Made recent changes purge jobs bail more aggressively"
jenkins-bot [Sat, 11 Jul 2015 01:05:11 +0000 (01:05 +0000)]
Merge "Made recent changes purge jobs bail more aggressively"

8 years agoMerge "Avoid postgres IDE error with doQuery() visibility"
jenkins-bot [Sat, 11 Jul 2015 00:42:37 +0000 (00:42 +0000)]
Merge "Avoid postgres IDE error with doQuery() visibility"

8 years agoMerge "Made the prior user existence check in LoginForm use DB_MASTER"
jenkins-bot [Sat, 11 Jul 2015 00:37:31 +0000 (00:37 +0000)]
Merge "Made the prior user existence check in LoginForm use DB_MASTER"

8 years agoMerge "Fixed bitfield check in User::loadFromId()"
jenkins-bot [Sat, 11 Jul 2015 00:37:05 +0000 (00:37 +0000)]
Merge "Fixed bitfield check in User::loadFromId()"

8 years agoFixed bitfield check in User::loadFromId()
Aaron Schulz [Fri, 10 Jul 2015 23:52:26 +0000 (16:52 -0700)]
Fixed bitfield check in User::loadFromId()

* READ_LOCKING is a composite field, so it can yeild 00, 01,
  10, or 11 for the relevant two bits. Only one of them should
  pass the check to avoid locking and snapshot breaking queries
  for no reason.

Change-Id: Ief04ac20c7639fcf79443a3ee39a471542a59551

8 years agoMade the prior user existence check in LoginForm use DB_MASTER
Aaron Schulz [Fri, 10 Jul 2015 23:18:23 +0000 (16:18 -0700)]
Made the prior user existence check in LoginForm use DB_MASTER

* This helps if multiple account creation attempts were made in a row
  and the slave selected was lagged (either too much for Chronology
  Protector or the user did not resend the cookies to link the session).
* The locking also better handles concurrent attempt to make another
  account, especially with CentralAuth trying to make external accounts.
  This assumes that the rate of concurrent account creations with close
  names is low enough given trx speed to avoid gap locking issues. This
  will need to be confirmed with low error log rates to be sure.
* The User::idFromName() method now includes a $flags parameter.

Bug: T104615
Change-Id: I8385526a19efc528a016ad2bbf376b377138966b

8 years agoPass function name in DatabaseMysqlBase::setBigSelects
umherirrender [Fri, 10 Jul 2015 21:03:52 +0000 (23:03 +0200)]
Pass function name in DatabaseMysqlBase::setBigSelects

This allow to see the correct function name in the debug logs

Change-Id: I913acbc39e8e7b21f647b544ef161574c5f720f8

8 years agoMerge "Pass function name in Database::selectRowCount"
jenkins-bot [Fri, 10 Jul 2015 20:55:14 +0000 (20:55 +0000)]
Merge "Pass function name in Database::selectRowCount"

8 years agoPass function name in Database::selectRowCount
umherirrender [Fri, 10 Jul 2015 20:44:03 +0000 (22:44 +0200)]
Pass function name in Database::selectRowCount

This allow to see the correct function name in the debug logs

Change-Id: I84c94edce60efb8f15a7eb178065ee03e85fc282

8 years agoSECURITY: Do not allow data-ooui attributes in wikitext
Kunal Mehta [Thu, 9 Jul 2015 22:56:17 +0000 (15:56 -0700)]
SECURITY: Do not allow data-ooui attributes in wikitext

We now automatically infuse any element with a data-ooui attribute, so
allowing them in wikitext allows rendering any arbitrary OOUI widget,
some of which (ButtonWidget) are unsafe and can lead to XSS.

By blacklisting data-ooui, widgets cannot be created in wikitext.
T101666 will enable a safe-subset of them.

Bug: T105413
Change-Id: I3f63594a41e9cac3219791e181a2f93818178263

8 years agoProtect against non-text output from StripState going into Title::newFromText()
Chad Horohoe [Fri, 10 Jul 2015 18:12:15 +0000 (11:12 -0700)]
Protect against non-text output from StripState going into Title::newFromText()

Non-string input shouldn't be fed into newFromText(). We currently handle this
indirectly with relying on Title to do it. Instead just return earlier and not
try to construct a title from bad input.

Bug: T102321
Change-Id: I9bc96111378d9d4ed5981bffc6f150cbd0c1e331

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 10 Jul 2015 18:59:32 +0000 (20:59 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I2c337f29ca8c60e6b1c912d6ee828b1632ba89b8

8 years agoDon't try to call load() on non-object
Florian [Fri, 10 Jul 2015 14:31:33 +0000 (16:31 +0200)]
Don't try to call load() on non-object

FileRepo::newFile() can return null or false, in addition to a File
object. Calling load() on the returned value in FileRepo::findFile()
can result in an exception. Prevent this with an additional check after
FileRepo::newFile() was called.

Follow up: I1aa4b096c0cad5f5ca34321cc897019005c53a76
Follow up: I60c106b5b27db067b1884af95f5fb74a0a682a9a

Bug: T105497
Change-Id: Iabdae8fd960d19a467dc08a193228978575017ce

8 years agoFix sql.php behavior on error
Brad Jorsch [Fri, 10 Jul 2015 17:38:19 +0000 (13:38 -0400)]
Fix sql.php behavior on error

When an erroneous query is entered into sql.php, it doesn't clear its
line buffer, so the intended next query (often fixing a typo in the
original) winds up concatenated onto the erroneous query. Usually
leading to another error, which repeats the process.

The solution is simple enough: clear the line buffer unconditionally,
not only when no exception is caught.

Change-Id: Ia78e2df8b9c6698c0a225bfb3135274ed8da5303

8 years agoMerge "ApiFeedWatchlist: Handle revdel"
jenkins-bot [Fri, 10 Jul 2015 17:50:30 +0000 (17:50 +0000)]
Merge "ApiFeedWatchlist: Handle revdel"

8 years agoMerge "Fixed BadMethodCallException in FileRepo for bad titles"
jenkins-bot [Fri, 10 Jul 2015 16:54:02 +0000 (16:54 +0000)]
Merge "Fixed BadMethodCallException in FileRepo for bad titles"

8 years agoApiFeedWatchlist: Handle revdel
Brad Jorsch [Fri, 10 Jul 2015 14:04:10 +0000 (10:04 -0400)]
ApiFeedWatchlist: Handle revdel

We might get back rows with no title (log entries with deleted action)
or no user (anything with deleted user). Don't raise warnings for those.

Bug: T105367
Change-Id: I64b4fba478b3e1e86854843965b2ea2b5c1d7933

8 years agoresourceloader: Make tests less susceptible to timestamp races
Timo Tijhof [Thu, 18 Jun 2015 18:57:16 +0000 (19:57 +0100)]
resourceloader: Make tests less susceptible to timestamp races

getDefinitionSummary isn't the authoritive method to detect changes.
Using it as such may false cause something to appear detected or
undetected. Use getVersionHash() instead.

Thanks to Gilles for uncovering this bug.

Bug: T105476
Change-Id: Ibefc9fa8ffd9d45e29901d726801e8d4e008b66f

8 years agoAPI: Improve upload error reporting
Brad Jorsch [Fri, 10 Jul 2015 13:31:04 +0000 (09:31 -0400)]
API: Improve upload error reporting

* Include the detailed message text in the error for verification-error and
  hookaborted
* Actually return the raw "details" for hookaborted and unknown-error
  (previously it was colliding with the standard "error" and "code"
  elements).

Bug: T105224
Change-Id: I13b7b6ad02fbbf46bf3d6b4c683493b2fecf8c58

8 years agoGruntfile.js: Remove unused 'pkg'
Kunal Mehta [Fri, 10 Jul 2015 03:33:53 +0000 (20:33 -0700)]
Gruntfile.js: Remove unused 'pkg'

It's unused and ends up being copied into a bunch of repositories that
also don't need it.

Change-Id: Icf81b3ae13e510670bde38c1c8d7ef42917b7c2a

8 years agorubocop: ignore node_modules and fix a single offense
Antoine Musso [Fri, 10 Jul 2015 10:41:47 +0000 (12:41 +0200)]
rubocop: ignore node_modules and fix a single offense

Make rubocop pass:
- fix a trivial double quotes error
- ignore 'node_modules' useful when one ran 'npm install'

Change-Id: Id1ab83df0bec4fc7b223f33016c8f18316509b7a

8 years agoUpgraded User::saveSettings logged errors to exceptions
Aaron Schulz [Fri, 10 Jul 2015 07:54:40 +0000 (00:54 -0700)]
Upgraded User::saveSettings logged errors to exceptions

* This gives more visibility and the error rate is not
  extreme (and mostly affects certain users due to
  usage patterns).

Change-Id: I3eae28a584e4db8ae40ae80087a97c416b3bd3e8

8 years agoMerge "Ignore tagfilter url parameter on Special:Undelete"
jenkins-bot [Fri, 10 Jul 2015 07:11:00 +0000 (07:11 +0000)]
Merge "Ignore tagfilter url parameter on Special:Undelete"

8 years agoMerge "Sort $wgLogActionsHandlers/$wgLogActions/$wgLogHeaders"
jenkins-bot [Fri, 10 Jul 2015 07:10:56 +0000 (07:10 +0000)]
Merge "Sort $wgLogActionsHandlers/$wgLogActions/$wgLogHeaders"

8 years agoMerge "Check install user's password as sysop/bureaucrat"
jenkins-bot [Thu, 9 Jul 2015 23:41:35 +0000 (23:41 +0000)]
Merge "Check install user's password as sysop/bureaucrat"

8 years agoFixed BadMethodCallException in FileRepo for bad titles
Aaron Schulz [Thu, 9 Jul 2015 22:59:48 +0000 (15:59 -0700)]
Fixed BadMethodCallException in FileRepo for bad titles

* Fixes regression from 7508b86ad3

Change-Id: I60c106b5b27db067b1884af95f5fb74a0a682a9a

8 years agoMerge "Made LoadMonitor use wfGlobalCacheKey() and tweaked the key name"
jenkins-bot [Thu, 9 Jul 2015 21:52:32 +0000 (21:52 +0000)]
Merge "Made LoadMonitor use wfGlobalCacheKey() and tweaked the key name"

8 years agoTitleInputWidget: Override getJavaScriptClassName and remove infuse hack
Kunal Mehta [Thu, 9 Jul 2015 21:50:18 +0000 (14:50 -0700)]
TitleInputWidget: Override getJavaScriptClassName and remove infuse hack

Necessary after 2be338cc99a9e in OOUI.

Change-Id: I402636297b510ed93ed3d38f11b302448c6fd24a