lhc/web/wiklou.git
8 years agoMerge "Instrument edit failures"
jenkins-bot [Thu, 11 Jun 2015 23:58:53 +0000 (23:58 +0000)]
Merge "Instrument edit failures"

8 years agoInstrument edit failures
Ori Livneh [Thu, 11 Jun 2015 23:38:46 +0000 (16:38 -0700)]
Instrument edit failures

Users on enwiki's VPT are reporting a spike in the frequency of rejected edits
due to loss of session data. It is difficult to corroborate these reports when
we don't have any instrumentation for them in the code, and thus no visibility
into how frequently they are occurring in the wild.

Bug: T102199
Change-Id: I0c99f292002209cf2bf4376f97b8c70a6b1ec021

8 years agoAdd release notes for f6e5079
Kunal Mehta [Thu, 11 Jun 2015 23:34:37 +0000 (16:34 -0700)]
Add release notes for f6e5079

Change-Id: I4ccfebe6a59148c9825521f98b0f3654e87f3e11

8 years agoMerge "Live preview: Don't show empty summary preview"
jenkins-bot [Thu, 11 Jun 2015 22:14:45 +0000 (22:14 +0000)]
Merge "Live preview: Don't show empty summary preview"

8 years agoMerge "Use mediawiki/at-ease library for suppressing warnings"
jenkins-bot [Thu, 11 Jun 2015 18:59:11 +0000 (18:59 +0000)]
Merge "Use mediawiki/at-ease library for suppressing warnings"

8 years agoUse mediawiki/at-ease library for suppressing warnings
Kunal Mehta [Wed, 10 Jun 2015 18:29:05 +0000 (11:29 -0700)]
Use mediawiki/at-ease library for suppressing warnings

wfSuppressWarnings() and wfRestoreWarnings() were split out into a
separate library. All usages in core were replaced with the new
functions, and the wf* global functions are marked as deprecated.

Additionally, some uses of @ were replaced due to composer's autoloader
being loaded even earlier.

Ie1234f8c12693408de9b94bf6f84480a90bd4f8e adds the library to
mediawiki/vendor.

Bug: T100923
Change-Id: I5c35079a0a656180852be0ae6b1262d40f6534c4

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 11 Jun 2015 18:45:08 +0000 (20:45 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ifee61df93c4c0ceaf8c410e11429ec41d953dd35

8 years agoAdd LCStore implementation that uses static arrays in PHP files
Fred Emmott [Tue, 9 Jun 2015 21:24:15 +0000 (14:24 -0700)]
Add LCStore implementation that uses static arrays in PHP files

Implementation written by Fred Emmott of Facebook. Quoting Fred:

As well as array access being faster, the main advantage is actually
that this significantly reduces the use of unserialize(), which does a
lot of memcpys when making the strings.

Benchmarks compared to LCStoreCDB:
* HHVM (no repo-auth): ~7% improvement
* HHVM (with repo-auth): ~12% improvement
* PHP7: ~1% improvement

My (Legoktm) brief testing noted that the generated PHP files were
noticiably larger than the CDB ones:
* 1.5M en.l10n.php
* 932K l10n_cache-en.cdb

Bug: T99740
Change-Id: Ib2c5856d40cd928cab4a79cb935b3ce08c598300

8 years agoMerge "Made MessageCache::replace() ignore messages with content language suffix"
jenkins-bot [Thu, 11 Jun 2015 15:53:27 +0000 (15:53 +0000)]
Merge "Made MessageCache::replace() ignore messages with content language suffix"

8 years agoAjaxResponse: Fix broken logic for extracting HTTP status codes
Bryan Davis [Thu, 11 Jun 2015 15:13:00 +0000 (09:13 -0600)]
AjaxResponse: Fix broken logic for extracting HTTP status codes

Follows-up 6584cef207 (r16266; 2006; MediaWiki 1.8.0).
This regex was just trimming whitespace from the start of the string. It
matched whitespace, then a match group for a first sequence of digits. The
replacement is just the digits match. This is essentially `ltrim()`. It didn't
account for the content after the match.

> echo preg_replace( '/^ *(\d+)/', '\1', '200 OK' );
> "200 OK"

This was causing:
> Warning: Unknown HTTP status code 200 OK in libs/HttpStatus.php:100
> Warning: Unknown HTTP status code 304 Not Modified OK in libs/HttpStatus.php:100

It defaults to HTTP 200. So presumbaly the impact was low. Though it may've caused
304 responses to have been broken (content body missing).

Bug: T102028
Change-Id: Iafff9982bbbee893c13f891901dde88f998db7a6

8 years agoMerge "Allow users with 'viewsuppressed' to view when limitTitle()d"
jenkins-bot [Thu, 11 Jun 2015 14:01:11 +0000 (14:01 +0000)]
Merge "Allow users with 'viewsuppressed' to view when limitTitle()d"

8 years agoAllow users with 'viewsuppressed' to view when limitTitle()d
Glaisher [Thu, 11 Jun 2015 12:59:33 +0000 (17:59 +0500)]
Allow users with 'viewsuppressed' to view when limitTitle()d

This was probably missed when 'suppressrevision' was split into
'suppressrevision' and 'viewsuppressed'.

It was properly separated in limitPerformer() but not in limitTitle().

Bug: T101982
Change-Id: I9c62599124cbb74d2004b416f6e490c231dbd7b2

8 years agoMerge "Fix the autonym of Northern Luri and change Central to Northern"
jenkins-bot [Thu, 11 Jun 2015 06:52:51 +0000 (06:52 +0000)]
Merge "Fix the autonym of Northern Luri and change Central to Northern"

8 years agoMerge "Update namespaces and special pages for Northern Luri (lrc) from translatewiki"
jenkins-bot [Thu, 11 Jun 2015 06:46:48 +0000 (06:46 +0000)]
Merge "Update namespaces and special pages for Northern Luri (lrc) from translatewiki"

8 years agoFix the autonym of Northern Luri and change Central to Northern
mjbmr [Fri, 5 Jun 2015 11:04:21 +0000 (11:04 +0000)]
Fix the autonym of Northern Luri and change Central to Northern

Change-Id: Ie60524ec5735fce03f0b8add635cf7c17798b0ab

8 years agoMerge "AutoloadGenerator.php: Update 'AutoloadClasses' in extension.json"
jenkins-bot [Thu, 11 Jun 2015 03:23:17 +0000 (03:23 +0000)]
Merge "AutoloadGenerator.php: Update 'AutoloadClasses' in extension.json"

8 years agoLive preview: Don't show empty summary preview
Derk-Jan Hartman [Wed, 10 Jun 2015 23:50:25 +0000 (01:50 +0200)]
Live preview: Don't show empty summary preview

Change-Id: I4334d02cb460fd0f995ba16f1170dd8500744692

8 years agoUse instanceof in ParserCache::getKey to help IDEs
Aaron Schulz [Wed, 10 Jun 2015 21:09:20 +0000 (14:09 -0700)]
Use instanceof in ParserCache::getKey to help IDEs

Change-Id: I772f53ee28ade5da499fe05259a17fed5cc52adb

8 years agoAvoid section profiling in Hooks::run due to high overhead
Aaron Schulz [Wed, 10 Jun 2015 20:32:51 +0000 (13:32 -0700)]
Avoid section profiling in Hooks::run due to high overhead

* This wastes 60-70ms and is not really needed with flame graphs anyway

Change-Id: Ifc20ee6fb6439128195b025c652fa29c6f9fc25e

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 10 Jun 2015 20:22:34 +0000 (22:22 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I699540faabd831a56e46973cf0849dde7c8383e8

8 years agoMerge "Chinese Conversion Table Update 2015-4"
jenkins-bot [Wed, 10 Jun 2015 19:33:55 +0000 (19:33 +0000)]
Merge "Chinese Conversion Table Update 2015-4"

8 years agoMerge "Encapsulate rc_params handling in RecentChange::parseParams"
jenkins-bot [Wed, 10 Jun 2015 19:30:18 +0000 (19:30 +0000)]
Merge "Encapsulate rc_params handling in RecentChange::parseParams"

8 years agoEncapsulate rc_params handling in RecentChange::parseParams
Stephane Bisson [Wed, 10 Jun 2015 12:39:17 +0000 (08:39 -0400)]
Encapsulate rc_params handling in RecentChange::parseParams

* Make MachineReadableRCFeedFormatter use it

* Some unit tests

* Also fixed some line-too-long warnings in RecentChange.php

Change-Id: I443d14f5d4cdac0945cb9c03608d55745bbb865b

8 years agoUpdate namespaces and special pages for Northern Luri (lrc) from translatewiki
mjbmr [Fri, 5 Jun 2015 10:48:19 +0000 (10:48 +0000)]
Update namespaces and special pages for Northern Luri (lrc) from translatewiki

See:
* https://translatewiki.net/wiki/MediaWiki:Sp-translate-data-Namespaces/lrc
* https://translatewiki.net/wiki/MediaWiki:Sp-translate-data-SpecialPageAliases/lrc

Bug: T102026
Change-Id: Ic4cca51a5a59dfe3580b66aa9cfcee3d8e3fea4b

8 years agoMerge "Convert mediawiki.action.edit.collapsibleFooter and mediawiki.special.changesl...
jenkins-bot [Wed, 10 Jun 2015 18:40:37 +0000 (18:40 +0000)]
Merge "Convert mediawiki.action.edit.collapsibleFooter and mediawiki.special.changeslist.legend to using mw.cookie"

8 years agoAdd some more allowedRedirectParams to MyContributions
Glaisher [Tue, 9 Jun 2015 17:53:29 +0000 (22:53 +0500)]
Add some more allowedRedirectParams to MyContributions

+deletedOnly
+nsInvert
+associated
+newOnly
+topOnly

Change-Id: Ibde818e259a5511791dd60a15830973a90468ae8

8 years agoMerge "API: Add api-format-prettyprint-header-only-html"
jenkins-bot [Wed, 10 Jun 2015 17:49:40 +0000 (17:49 +0000)]
Merge "API: Add api-format-prettyprint-header-only-html"

8 years agoMerge "Password validity by policy per group"
jenkins-bot [Wed, 10 Jun 2015 17:46:20 +0000 (17:46 +0000)]
Merge "Password validity by policy per group"

8 years agoPassword validity by policy per group
csteipp [Thu, 23 Apr 2015 01:48:48 +0000 (18:48 -0700)]
Password validity by policy per group

Make password policies defined in a configurable policy, which is
defined by group. A user's password policy will be the maximum of
each group policy that the user belongs to.

Bug: T94774
Change-Id: Iad8e49ffcffed38df6293db0ef31a227d3962003

8 years agoConvert mediawiki.action.edit.collapsibleFooter and mediawiki.special.changeslist...
Bartosz Dziewoński [Wed, 10 Jun 2015 11:42:13 +0000 (13:42 +0200)]
Convert mediawiki.action.edit.collapsibleFooter and mediawiki.special.changeslist.legend to using mw.cookie

Remove redundant parameters, use sane defaults.

This changes the cookie name due to mw.cookie adding the standard
cookie prefix. This will cause existing values to be lost.

Bug: T67384
Change-Id: I00ba66b271cef4635ab4c31226c854583b8ba79e

8 years agoMerge "mediawiki.jqueryMsg: Phase out redundant data module and minor clean up"
jenkins-bot [Wed, 10 Jun 2015 09:35:50 +0000 (09:35 +0000)]
Merge "mediawiki.jqueryMsg: Phase out redundant data module and minor clean up"

8 years agoMerge "Convert mediawiki.toc and mediawiki.user to using mw.cookie"
jenkins-bot [Wed, 10 Jun 2015 09:26:09 +0000 (09:26 +0000)]
Merge "Convert mediawiki.toc and mediawiki.user to using mw.cookie"

8 years agoConvert mediawiki.toc and mediawiki.user to using mw.cookie
Yaroslav Melnychuk [Tue, 2 Dec 2014 15:58:43 +0000 (17:58 +0200)]
Convert mediawiki.toc and mediawiki.user to using mw.cookie

* Remove redundant 'path' parameter (handled by mw.cookie)
* Remove redundant 'expires' parameter (handled by mw.cookie)
* Return value for absent cookie is now reliably 'null'.

This changes the cookie name due to mw.cookie adding the standard
cookie prefix. This will cause existing values to be lost. Make
use of this oppertunity to rename some cookie names.

* mw_hidetoc -> {wikiprefix} hidetoc
* mediaWiki.user.sessionId -> {wikiprefix} mwuser-sessionId
* mediaWiki.user.bucket -> {wikiprefix} mwuser-bucket

This is a re-submission of a4d3d3b427713, which was reverted due
to T101857. Commit amended to use "sessionId" instead of "session".

Bug: T67384
Change-Id: Ibe88778cf3b6db90b3875c89305ffba53ac84104

8 years agoobjectcache: Minor code clean up in ObjectCache.php
Timo Tijhof [Wed, 10 Jun 2015 03:53:41 +0000 (04:53 +0100)]
objectcache: Minor code clean up in ObjectCache.php

* Whitespace.
* Simplify logic.
* Apply coding conventions to documentation blocks (empty line
  before annotations, no empty lines between annotation, consistent
  order of annotations).

Change-Id: I3e5268d6a6295643d5725c66ea2a01bccf610ed8

8 years agoFixed "wfTimestamp() fed bogus time value" errors
Aaron Schulz [Wed, 10 Jun 2015 01:47:49 +0000 (18:47 -0700)]
Fixed "wfTimestamp() fed bogus time value" errors

* This broke OutputPage::checkLastModified() as the touched time was false

Change-Id: I118d3ddf07c7b69ad269f3aee0c70ab4159df192

8 years agoMerge "Fix variants for OO UI images"
jenkins-bot [Tue, 9 Jun 2015 23:02:11 +0000 (23:02 +0000)]
Merge "Fix variants for OO UI images"

8 years agoFix variants for OO UI images
Matthew Flaschen [Tue, 9 Jun 2015 20:55:50 +0000 (16:55 -0400)]
Fix variants for OO UI images

Fixes T101895, caused by https://gerrit.wikimedia.org/r/#/c/212917/

Bug: T101895
Change-Id: Icd9af0d2eba2a62a1761cb9c9dcd90fc736c2b39

8 years agoMerge "Update OOjs UI to v0.11.4"
jenkins-bot [Tue, 9 Jun 2015 22:44:00 +0000 (22:44 +0000)]
Merge "Update OOjs UI to v0.11.4"

8 years agoMerge "Html: Add buttonAttributes() more diligently"
jenkins-bot [Tue, 9 Jun 2015 22:24:44 +0000 (22:24 +0000)]
Merge "Html: Add buttonAttributes() more diligently"

8 years agoUpdate OOjs UI to v0.11.4
James D. Forrester [Tue, 9 Jun 2015 22:05:33 +0000 (15:05 -0700)]
Update OOjs UI to v0.11.4

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

Change-Id: Id329e753412b33d5b4cf55bfc04ee072843bacc0

8 years agoMerge "Move several unit tests to directly subclass PHPUnit_Framework_TestCase"
jenkins-bot [Tue, 9 Jun 2015 22:20:00 +0000 (22:20 +0000)]
Merge "Move several unit tests to directly subclass PHPUnit_Framework_TestCase"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 9 Jun 2015 20:11:11 +0000 (22:11 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Icfa21b09f24744c22245a540daa568a846592786

8 years agomediawiki.jqueryMsg: Phase out redundant data module and minor clean up
Timo Tijhof [Mon, 8 Jun 2015 14:47:21 +0000 (15:47 +0100)]
mediawiki.jqueryMsg: Phase out redundant data module and minor clean up

Follows-up 4a3e50a54.

* Merge mediawiki.jqueryMsg.data and mediawiki.jqueryMsg modules.

  There's no need for this to be a separate module. The data is not for public consumption,
  it's provided to jqueryMsg only.

* Remove unused default-default values for 'allowedHtmlElements'.

* Remove conditionals around data providing at initial run-time. Instead, expose
  private method can call that. This way, we don't have two code paths claim
  ownership over the namespace. And it makes the module easier to test and re-use
  by not requiring the data to exist at first run time.

* Fix getDefinitionSummary() implementation to append data instead of setting
  arbitary keys in parent data. ResourceLoader documentation of getDefinitionSummary()
  has been updated to reflect this practice.

Change-Id: I40006d39514a997dce4930756a3dac84a0c9bb83

8 years agoAPI: Add api-format-prettyprint-header-only-html
umherirrender [Sat, 6 Jun 2015 19:15:36 +0000 (21:15 +0200)]
API: Add api-format-prettyprint-header-only-html

Setting format=rawfm suggest to set format=raw ("To see the non-HTML
representation of the RAW format, set format=raw.") which does not
exists.
Add a new message for this case which does not contains the hint.

Change-Id: I40fe0b6e52dc0c70b07b368a3eace430e0c8f68c

8 years agoMerge "Revert "Implement MalformedTitleException for JS and use in constructor""
jenkins-bot [Tue, 9 Jun 2015 17:07:27 +0000 (17:07 +0000)]
Merge "Revert "Implement MalformedTitleException for JS and use in constructor""

8 years agoMove several unit tests to directly subclass PHPUnit_Framework_TestCase
Chad Horohoe [Tue, 9 Jun 2015 17:02:48 +0000 (10:02 -0700)]
Move several unit tests to directly subclass PHPUnit_Framework_TestCase

Change-Id: I306166c116b9787a5568e5289799440dd1030345

8 years agoMerge "Consistent spacing after colon in apihelp"
jenkins-bot [Tue, 9 Jun 2015 14:07:13 +0000 (14:07 +0000)]
Merge "Consistent spacing after colon in apihelp"

8 years agoapi/i18n: Fix a couple typos
Kevin Israel [Tue, 9 Jun 2015 12:28:56 +0000 (08:28 -0400)]
api/i18n: Fix a couple typos

Change-Id: I5990bd9e92b0ffb592ec7c3eb80280a2d3e2f19f

8 years agoMerge "Improve the srsearch API param doc"
jenkins-bot [Tue, 9 Jun 2015 12:14:25 +0000 (12:14 +0000)]
Merge "Improve the srsearch API param doc"

8 years agoMade MessageCache::replace() ignore messages with content language suffix
Aaron Schulz [Wed, 20 May 2015 22:39:52 +0000 (15:39 -0700)]
Made MessageCache::replace() ignore messages with content language suffix

* This should not be used, and load() does not see them.
  If the content language is 'de', then message overrides
  will not include MediaWiki:<key>/de pages.

Change-Id: Ie4b6b356bd309814dd4a88040a29a7ebd509712a

8 years agoMerge "Fixed race condition in MessageCache::replace"
jenkins-bot [Tue, 9 Jun 2015 09:25:55 +0000 (09:25 +0000)]
Merge "Fixed race condition in MessageCache::replace"

8 years agoMerge "resourceloader: Move packaging to a new getModuleContent() method"
jenkins-bot [Tue, 9 Jun 2015 09:13:49 +0000 (09:13 +0000)]
Merge "resourceloader: Move packaging to a new getModuleContent() method"

8 years agoConsistent spacing after colon in apihelp
Amir E. Aharoni [Tue, 9 Jun 2015 06:17:54 +0000 (09:17 +0300)]
Consistent spacing after colon in apihelp

Change-Id: Ic85554b29f78f1d26878879b9a408bbcbc702d8c

8 years agoMerge "resourceloader: Add context param to ResourceLoaderModule::getDependencies"
jenkins-bot [Tue, 9 Jun 2015 02:20:31 +0000 (02:20 +0000)]
Merge "resourceloader: Add context param to ResourceLoaderModule::getDependencies"

8 years agoMerge "Use assertSame in LogFormatterTestCase"
jenkins-bot [Tue, 9 Jun 2015 02:15:42 +0000 (02:15 +0000)]
Merge "Use assertSame in LogFormatterTestCase"

8 years agoresourceloader: Add context param to ResourceLoaderModule::getDependencies
Andrew Green [Wed, 8 Apr 2015 21:34:08 +0000 (17:34 -0400)]
resourceloader: Add context param to ResourceLoaderModule::getDependencies

By providing context as a parameter in getDependencies, we allow
modules to dyanamically determine dependencies based on context.
Note: To ease rollout, the parameter is optional in this patch. It is expected
that it will be made non-optional in the near future.

The use case is for CentralNotice campaigns to be able to add special
modules ahead of deciding which banner to show a user. The dynamically
chosen RL modules would replace ad-hoc JS currently sent with some banners.
A list of possible campaigns and banners is already sent as a PHP-
implemented RL module; that's the module that will dynamically choose other
modules as dependencies when appropriate. This approach will save a round
trip as compared to dynamically loading the modules client-side.

For compatibility, extensions that override
ResourceLoaderModule::getDependencies() should be updated with the new
method signature. Here are changes for extensions currently deployed on
Wikimedia wikis:

* CentralNotice: I816bffa3815e2eab7e88cb04d1b345070e6aa15f
* Gadgets: I0a10fb0cbf17d095ece493e744296caf13dcee02
* EventLogging: I67e957f74d6ca48cfb9a41fb5144bcc78f885e50
* PageTriage: Ica3ba32aa2fc76d11a44f391b6edfc871e7fbe0d
* UniversalLanguageSelector: Ic63e617f51702c27104e123d4bed91983a726b7f
* VisualEditor: I0ac775ca286e64825e31a9213b94648e41a5bc30

For more on the CentralNotice use case, please see I9f80edcbcacca2.

Bug: T98924
Change-Id: Iee61e5b527321d01287baa03ad9b4d4f526ff3ef

8 years agoImprove the srsearch API param doc
S Page [Tue, 9 Jun 2015 01:21:03 +0000 (18:21 -0700)]
Improve the srsearch API param doc

Mention that it may be a way to invoke fancy search features.
Message-only change.

Change-Id: I6df02b53612f7c55f69a6bcad407a3a28a07bd2b

8 years agoresourceloader: Move packaging to a new getModuleContent() method
Timo Tijhof [Thu, 14 May 2015 19:05:47 +0000 (20:05 +0100)]
resourceloader: Move packaging to a new getModuleContent() method

Centralise the building of module packages into this method so
that it can be easily re-used.

This is in preparation for providing the option for modules to use
content-based hashing (instead of based on meta-data) in the version
string of modules. Having a getModuleContent method allows that to
be implemented in a way that is well-cached (as we'll be calling it
from multiple multiple code paths) and without duplicating this logic.

Bug: T98087
Change-Id: I376233caaabe44b6101565b70a50904abdf8ab4f

8 years agoAvoid parser cache miss that often occurs post-save
Aaron Schulz [Mon, 8 Jun 2015 23:05:54 +0000 (16:05 -0700)]
Avoid parser cache miss that often occurs post-save

* This should not happen as doEditContent() saves the parser cache,
  so only the rare casing if incompatible options should have misses
* The bug could also cause post-save misses with edit stashing
* Avoid the second page parse post-redirect by making sure cache
  timestamps match up instead of calling time() at several points
* Likewise for null edits, which used a different code path
* Removed redundant purge in onArticleCreate() as the new row sets _touched
* Removed pointless purge in onArticleDelete() as there is no row to update
  (the method no-ops in that case to avoid contention already)

Change-Id: I178fe334a3f8691ffd9452bec30561a0c5d37c6c

8 years agoUpdate sinon from 1.10.3 to 1.15.0
paladox [Sat, 6 Jun 2015 19:25:55 +0000 (21:25 +0200)]
Update sinon from 1.10.3 to 1.15.0

Project
* http://sinonjs.org/
* https://github.com/cjohansen/Sinon.JS

Source code
* http://sinonjs.org/releases/sinon-1.15.0.js

Changelog
* https://github.com/cjohansen/Sinon.JS/blob/v1.15.0/Changelog.txt

Notable changes:
* 1.15.0: Deprecate sinon.mock()
* 1.12.0: Fake timers are now extracted as lolex: http://github.com/sinonjs/lolex

Change-Id: Icca3eb7ef42c0a456fd309eb0ebc09a0518517bd

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

Change-Id: Ib07fd19243eb0bca5bd7cb9553f20853d05135ac

8 years agoMerge "LanguageConverter fix of empty and numeric strings"
jenkins-bot [Mon, 8 Jun 2015 16:52:18 +0000 (16:52 +0000)]
Merge "LanguageConverter fix of empty and numeric strings"

8 years agoresourceloader: Audit debug log channels and messages
Timo Tijhof [Thu, 4 Jun 2015 03:53:23 +0000 (04:53 +0100)]
resourceloader: Audit debug log channels and messages

* Change "private module denied" level to 'debug'.
  This is quite unimportant and occupies over 90% of the logstash
  entries for resourceloader.

* Changes all failure signals to 'warning' and using context data.
  Left out method in most case since the messages are unambiguous.

Change-Id: Ibb2faaa54020ab0fd9685551689d9a89161e1ce7

8 years agoLanguageConverter fix of empty and numeric strings
Liangent [Tue, 6 May 2014 16:16:12 +0000 (16:16 +0000)]
LanguageConverter fix of empty and numeric strings

Bug: T51072
Bug: T48634
Bug: T53551
Change-Id: I2c88f1cf7c0014bebf5c798916b660b334a0b78b

8 years agoMerge "Run generateLocalAutoload.php to sort entries in autoload.php"
jenkins-bot [Mon, 8 Jun 2015 10:08:23 +0000 (10:08 +0000)]
Merge "Run generateLocalAutoload.php to sort entries in autoload.php"

8 years agobuild: Updating development dependencies
Kunal Mehta [Mon, 8 Jun 2015 05:41:11 +0000 (22:41 -0700)]
build: Updating development dependencies

* grunt-banana-checker: 0.2.1 → 0.2.2
* grunt-karma: 0.10.1 → 0.11.0
* karma: 0.12.31 → 0.12.36
* karma-chrome-launcher: 0.1.8 → 0.1.12
* karma-firefox-launcher: 0.1.4 → 0.1.6

Change-Id: Ic8bd8563c6f3313a7c8fc936c0753b071441c2b0

8 years agoRun generateLocalAutoload.php to sort entries in autoload.php
Kunal Mehta [Mon, 8 Jun 2015 05:27:24 +0000 (22:27 -0700)]
Run generateLocalAutoload.php to sort entries in autoload.php

Will reduce dirty diffs in future changes.

Change-Id: I4f97c1e4f9eaf0dc807435209b6a0e8494b60db1

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 7 Jun 2015 19:41:03 +0000 (21:41 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ie3ce821ae62fad2938416276ed9a92448731eb39

8 years agoUpdate json2 to revision 2015-05-03
paladox [Sat, 6 Jun 2015 19:25:55 +0000 (21:25 +0200)]
Update json2 to revision 2015-05-03

Project link

* https://github.com/douglascrockford/JSON-js

File link

* https://github.com/douglascrockford/JSON-js/blob/c98948ae19/json2.js

Change-Id: Ifeb41140c13718162d1c0bd7a5a815acaf7bfd56

8 years agoUpdate es5-shim to v4.1.5
Timo Tijhof [Sun, 7 Jun 2015 11:09:59 +0000 (12:09 +0100)]
Update es5-shim to v4.1.5

Project site

* https://github.com/es-shims/es5-shim

File source

* https://github.com/es-shims/es5-shim/tree/v4.1.5

Changelog

* https://github.com/es-shims/es5-shim/blob/v4.1.5/CHANGES

Change-Id: I21ecf04e7ba82d4bd726ce9b5e84eac1046914c0

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 6 Jun 2015 19:25:55 +0000 (21:25 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia5cb16ef86a58a1a39c0856c0261c3801363563b

8 years agoUse assertSame in LogFormatterTestCase
umherirrender [Sat, 6 Jun 2015 18:55:03 +0000 (20:55 +0200)]
Use assertSame in LogFormatterTestCase

Using assertSame also checks for internal types to be correct.

Needs the following fixes:
- MergeLogFormatterTest: Use correct array key order
- NewUsersLogFormatterTest: Input user id as integer
- PatrolLogFormatter: Ensure in LogFormatter that
  integer is not casted to float

Change-Id: I2cab5335d6654f6cda15fc4e9fbae2c1ca1b27ff

8 years agoPatrolLogFormatter: Tag curid and previd as numbers for API
Brad Jorsch [Sat, 6 Jun 2015 12:16:28 +0000 (08:16 -0400)]
PatrolLogFormatter: Tag curid and previd as numbers for API

In the database the values might be strings, depending on the source of
the RecentChanges object when the log entry was created. In
getParametersForApi(), tag the vars as 'number' so they'll always be
output as actual integers.

Bug: T101603
Change-Id: I6d3e8fd2653ce810eec59b94bf75063e5fb6bcab

8 years agoFix tab in en.json
paladox [Fri, 5 Jun 2015 22:47:58 +0000 (22:47 +0000)]
Fix tab in en.json

Change-Id: I152646a368f4b2f0142907a2fbf876f8d27eb694

8 years agoMerge "ResourceLoaderImageModule: Add missing doc stuffs"
jenkins-bot [Fri, 5 Jun 2015 22:47:58 +0000 (22:47 +0000)]
Merge "ResourceLoaderImageModule: Add missing doc stuffs"

8 years agoMerge "resourceloader: Unbreak ResourceLoaderImageModule's rasterization"
jenkins-bot [Fri, 5 Jun 2015 22:43:46 +0000 (22:43 +0000)]
Merge "resourceloader: Unbreak ResourceLoaderImageModule's rasterization"

8 years agoResourceLoaderImageModule: Add missing doc stuffs
Bartosz Dziewoński [Fri, 5 Jun 2015 22:38:06 +0000 (00:38 +0200)]
ResourceLoaderImageModule: Add missing doc stuffs

Follow-up to 1fc57830e257f47ae0508899dc35b80674475859.

Change-Id: I66985fe2edc4d0e92aebcdb39cd56d212fd3270c

8 years agoresourceloader: Unbreak ResourceLoaderImageModule's rasterization
Bartosz Dziewoński [Fri, 5 Jun 2015 22:26:56 +0000 (00:26 +0200)]
resourceloader: Unbreak ResourceLoaderImageModule's rasterization

Follow-up to 1fc57830e257f47ae0508899dc35b80674475859. Forgot to
update a method call.

Change-Id: I2b3113c853a37f802f781a848b495e036971710c

8 years agoMerge "Automatically deduplicate root jobs on insertion"
jenkins-bot [Fri, 5 Jun 2015 20:15:23 +0000 (20:15 +0000)]
Merge "Automatically deduplicate root jobs on insertion"

8 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Fri, 5 Jun 2015 19:32:42 +0000 (19:32 +0000)]
Merge "Localisation updates from https://translatewiki.net."

8 years agoMerge "Various code cleanup to JobRunner"
jenkins-bot [Fri, 5 Jun 2015 18:39:13 +0000 (18:39 +0000)]
Merge "Various code cleanup to JobRunner"

8 years agoVarious code cleanup to JobRunner
Aaron Schulz [Fri, 5 Jun 2015 18:15:57 +0000 (11:15 -0700)]
Various code cleanup to JobRunner

* Made the pickup stats name be similar to other queue stats
* Renamed $jobsRun => $jobPopped
* Simplified some code and comments

Change-Id: I8ab1a68f04fc3ab4c0ba7f6f0b428a5a811a97fb

8 years agoMerge "Make sure job queue partitions use the null aggregator"
jenkins-bot [Fri, 5 Jun 2015 18:11:41 +0000 (18:11 +0000)]
Merge "Make sure job queue partitions use the null aggregator"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 5 Jun 2015 17:49:22 +0000 (19:49 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ie564be94e20109b4972a5392f843ec3fc75658a5

8 years agoMerge "ApiTestCase: Set correct user for derivate requests"
jenkins-bot [Fri, 5 Jun 2015 17:46:02 +0000 (17:46 +0000)]
Merge "ApiTestCase: Set correct user for derivate requests"

8 years agoApiTestCase: Set correct user for derivate requests
Matthias Mullie [Fri, 5 Jun 2015 09:52:40 +0000 (11:52 +0200)]
ApiTestCase: Set correct user for derivate requests

RequestContext::getMain()->getUser() in a (faux) API request doesn't return the
user the (faux) API call is made with, but the user running the tests.

Bug: T101388
Change-Id: Icbbf14a6433edf5c91162a9d67899d6a2d5c33df

8 years agoMerge "Expose RL modules and js config vars in action=expandtemplates"
jenkins-bot [Fri, 5 Jun 2015 16:16:46 +0000 (16:16 +0000)]
Merge "Expose RL modules and js config vars in action=expandtemplates"

8 years agoExpose RL modules and js config vars in action=expandtemplates
Marc Ordinas i Llopis [Thu, 4 Jun 2015 10:32:23 +0000 (03:32 -0700)]
Expose RL modules and js config vars in action=expandtemplates

Adds the 'modules', 'jsconfigvars', and 'encodedjsconfigvars' props
to action=expandtemplates, that output the modules and Javascript
configuration variables added to ResourceLoader by extensions and
parser functions, in the same way action=parse does.

This is needed by Parsoid to correctly include all modules used by
parser functions.

Based on I5c3ccb25385e57633639bb0c7e6f562eb58b05a2 by @Jackmcbarn.

Bug: T69540
Change-Id: Iaf58c66c987a318c0dd1ee2b81774106c40e7561

8 years agoQA: Upgrade mediawiki_selenium for fix to Raita logging
Dan Duvall [Tue, 2 Jun 2015 21:17:41 +0000 (14:17 -0700)]
QA: Upgrade mediawiki_selenium for fix to Raita logging

Bug: T100904
Change-Id: Ibb92e9e5dfc1dc24250f44a9d291b25dac2da0a6

8 years agoAutoloadGenerator.php: Update 'AutoloadClasses' in extension.json
Smriti.Singh [Sun, 24 May 2015 21:53:14 +0000 (00:53 +0300)]
AutoloadGenerator.php: Update 'AutoloadClasses' in extension.json

AutoloadGenerator.php until now only updated autoload.php. As we shift
to extension registration, it would be cleaner if AutoloadGenerator.php
directly updates 'AutoloadClasses' in extension.json.

Bug: T88194
Change-Id: Idd601d7897634fae8c69f4d5338d9fc8f8b8f89b

8 years agoMerge "mw.loader.store: decline to store items > 100 kB"
jenkins-bot [Fri, 5 Jun 2015 01:42:26 +0000 (01:42 +0000)]
Merge "mw.loader.store: decline to store items > 100 kB"

8 years agoMerge "HTMLForm: Break long lines"
jenkins-bot [Fri, 5 Jun 2015 01:21:02 +0000 (01:21 +0000)]
Merge "HTMLForm: Break long lines"

8 years agoHtml: Add buttonAttributes() more diligently
Bartosz Dziewoński [Fri, 5 Jun 2015 01:07:11 +0000 (03:07 +0200)]
Html: Add buttonAttributes() more diligently

It was done only for elements generated with linkButton() or
submitButton(), and not input().

Change-Id: Idd7e01d596997bd5cade5a7851daf64bee10bb49

8 years agoHTMLForm: Break long lines
Florian [Fri, 17 Apr 2015 16:56:32 +0000 (18:56 +0200)]
HTMLForm: Break long lines

Change-Id: Ia09a28ccc361d1a54069bd23a412831fe9c20f34

8 years agomw.loader.store: decline to store items > 100 kB
Ori Livneh [Fri, 5 Jun 2015 00:06:49 +0000 (17:06 -0700)]
mw.loader.store: decline to store items > 100 kB

If the length of the string representation of a module exceeds 100,000
characters, decline to store it in localStorage, due to bug T66721.
(While it is true that string length !== byte length, the skew introduced by
counting multi-byte characters as single bytes is not important enough to merit
the use of $.byteLength).

Based on my analysis, the modules that would be ineligible for caching in local
storage under the new schema are:

- ext.visualEditor.core (624 kB)
- oojs-ui (179 kB)
- oojs-ui.styles.icons (132 kB)

To fix this bug, it is not enough to not store new items; we must also ensure
that any old values cached prior to the introduction of a limit are purged. So
update mw.loader.store#prune to do that, too.

Bug: T66721
Change-Id: Ie45467fc0b2db7cc283f30626af7d587da24bd90

8 years agoMerge "resourceloader: Refactor ResourceLoaderWikiModule to reduce database queries"
jenkins-bot [Fri, 5 Jun 2015 00:16:19 +0000 (00:16 +0000)]
Merge "resourceloader: Refactor ResourceLoaderWikiModule to reduce database queries"

8 years agoMake sure job queue partitions use the null aggregator
Aaron Schulz [Thu, 4 Jun 2015 23:53:56 +0000 (16:53 -0700)]
Make sure job queue partitions use the null aggregator

* Fixes problem from 37042262e32e
* The main class already handles the calls.
* Partitions call notifyQueueNonEmpty() on pop() even
  when the other partitions have jobs, so it is also wrong
  in addition to redundant.

Bug: T101427
Change-Id: Ic3235e1f2038053fabf92f97c663479a21d75317

8 years agoresourceloader: Refactor ResourceLoaderWikiModule to reduce database queries
Timo Tijhof [Thu, 4 Jun 2015 01:52:42 +0000 (02:52 +0100)]
resourceloader: Refactor ResourceLoaderWikiModule to reduce database queries

Wiki modules are special due to their isKnownEmpty implementation and support
for foreign databases. MediaWiki doesn't have convenient ways of making
Revision objects for remote wikis. As such, wiki modules will keep using meta
data to generate the hash.

However minimise needless cache invalidation by refining the implementation.

Impact:
* Remove use of getMsgBlobMtime(). This module doesn't support getMessages().
* In the title info, use the revision content sha1 and size for tracking.
  The page_touched previously used updates too often. It's updated both on edits
  for various types of purges. Using the rev_sha1 means old versions return
  when the content is the same. Regardless of how the content changed via
  revert or actual edits resulting in the same contnet.
* Change in-process cache to be keyed by page list instead of entire
  ResourceLoaderContext.
  Because of this, getTitleInfo() was previously performing its batch query
  twice on the same page. Once for only=styles (top) and only=scripts (bottom).
  Both operate on the full getPages() set but had different context keys.

Clean up:
* Better document the support for foreign databases.
* Move Title construction to getContent to reduce duplication.
* Remove use of getDefinitionMtime(). That method is a no-op since the switch
  to version hashing.
* Remove remaining use of mtime in getModifiedTime(). This is now covered by
  hashing the title info in getDefinitionSummary().

Also refactor the code to be more readable. No intended change in behaviour.

Bug: T98087
Change-Id: Id46740db04c0c42bc5ca87d1487230a32feb34df

8 years agoRevert "Implement MalformedTitleException for JS and use in constructor"
Sn1per [Thu, 4 Jun 2015 21:43:37 +0000 (21:43 +0000)]
Revert "Implement MalformedTitleException for JS and use in constructor"

This reverts commit 52bc467b31066d557ce7263b5bd448fb05742d3e.

Change-Id: I4ccd057559251317134da36d75fa8532ede4c51b

8 years agoFixed race condition in MessageCache::replace
Aaron Schulz [Wed, 20 May 2015 02:34:20 +0000 (19:34 -0700)]
Fixed race condition in MessageCache::replace

* The cache has to reload and *after* locking to avoid
  losing any concurrent changes.
* Also fixed incorrect assumption in MessageCacheTest.
  Message overrides for the content language do not use
  the language suffix.

Change-Id: I98ff158a1575330bc59efe6badb27f8de8717951