lhc/web/wiklou.git
8 years agoFix comment in mediawiki.page.gallery.css
umherirrender [Wed, 2 Sep 2015 16:08:18 +0000 (18:08 +0200)]
Fix comment in mediawiki.page.gallery.css

It no longer has styles in commonPrint.css

Follow-Up: Ib1aef04dc4fece78e6615386ecaef6a9f368f49e
Change-Id: If3446e656456b9d0142a368bd24685520316d2a1

8 years agoRemove non-existing param PHPDoc tag from Title
Thiemo Mättig [Wed, 2 Sep 2015 12:16:59 +0000 (14:16 +0200)]
Remove non-existing param PHPDoc tag from Title

Change-Id: Ie05be75b3e1a20e241206fdae8d1496fcbffeaae

8 years agoMerge "ApiLogin: Don't try to add block info if there's no block"
jenkins-bot [Wed, 2 Sep 2015 14:23:14 +0000 (14:23 +0000)]
Merge "ApiLogin: Don't try to add block info if there's no block"

8 years agoMerge "Allow stop characters as quoted attribute delimiters"
jenkins-bot [Wed, 2 Sep 2015 13:27:37 +0000 (13:27 +0000)]
Merge "Allow stop characters as quoted attribute delimiters"

8 years agoApiLogin: Don't try to add block info if there's no block
Brad Jorsch [Wed, 2 Sep 2015 13:14:20 +0000 (09:14 -0400)]
ApiLogin: Don't try to add block info if there's no block

Extensions such as CentralAuth can use various hooks to return
USER_BLOCKED or CREATE_BLOCKED despite there being no local block.

Bug: T111082
Change-Id: I3433a35547967852fc30bd56274392a186004a38

8 years agoMerge "resourceloader: Use increment() for resourceloader_cache miss metric"
jenkins-bot [Wed, 2 Sep 2015 12:23:45 +0000 (12:23 +0000)]
Merge "resourceloader: Use increment() for resourceloader_cache miss metric"

8 years agomediawiki.Upload: Consistently use getters rather than direct property access
Bartosz Dziewoński [Wed, 2 Sep 2015 11:15:31 +0000 (13:15 +0200)]
mediawiki.Upload: Consistently use getters rather than direct property access

Using this.text instead of this.getText() in this.upload() resulted in the
text of mw.ForeignStructuredUpload being entirely ignored. Fix this
and other properties too for consistency.

Change-Id: I8282260474f4e7d010766be3f2a7ba8641313571

8 years agoresourceloader: Use increment() for resourceloader_cache miss metric
Timo Tijhof [Tue, 1 Sep 2015 19:15:53 +0000 (21:15 +0200)]
resourceloader: Use increment() for resourceloader_cache miss metric

This makes it consistent with how we handle the resourceloader_cache hit metric.

When I added the miss metric I figured it was nice to get both counts and timings
in a single metric, but I can't trust StatsD/Graphite not to screw this up so
let's untangle them to be sure.

Change-Id: I24f68e34a9fa491806fdb6023bdd757f6688c2ed

8 years agoMerge "Implement wfArrayPlus2d which combines 2d arrays"
jenkins-bot [Wed, 2 Sep 2015 03:31:10 +0000 (03:31 +0000)]
Merge "Implement wfArrayPlus2d which combines 2d arrays"

8 years agoMerge "Update OOjs UI to v0.12.7"
jenkins-bot [Tue, 1 Sep 2015 23:57:43 +0000 (23:57 +0000)]
Merge "Update OOjs UI to v0.12.7"

8 years agoMerge "Deprecate unconditional loading of mediawiki.ui.button on all pages"
jenkins-bot [Tue, 1 Sep 2015 23:46:18 +0000 (23:46 +0000)]
Merge "Deprecate unconditional loading of mediawiki.ui.button on all pages"

8 years agoUpdate OOjs UI to v0.12.7
James D. Forrester [Tue, 1 Sep 2015 23:31:54 +0000 (16:31 -0700)]
Update OOjs UI to v0.12.7

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

Change-Id: Iea667a717e4694e28fcfafdc7111076682cc6a4a

8 years agoMerge "Reword 'stub-threshold' message in Special:Preferences advanced section"
jenkins-bot [Tue, 1 Sep 2015 23:25:19 +0000 (23:25 +0000)]
Merge "Reword 'stub-threshold' message in Special:Preferences advanced section"

8 years agoMerge "Link DB docs from tables.sql"
jenkins-bot [Tue, 1 Sep 2015 22:21:43 +0000 (22:21 +0000)]
Merge "Link DB docs from tables.sql"

8 years agoMerge "Language: Fix 'pretty' fallback in getDateFormatString()"
jenkins-bot [Tue, 1 Sep 2015 22:16:20 +0000 (22:16 +0000)]
Merge "Language: Fix 'pretty' fallback in getDateFormatString()"

8 years agoLink DB docs from tables.sql
Matthew Flaschen [Tue, 1 Sep 2015 22:11:19 +0000 (18:11 -0400)]
Link DB docs from tables.sql

Change-Id: I720ae3345963414103112fd4b4d2128c569999c2

8 years agoLanguage: Fix 'pretty' fallback in getDateFormatString()
Kunal Mehta [Tue, 1 Sep 2015 17:19:24 +0000 (10:19 -0700)]
Language: Fix 'pretty' fallback in getDateFormatString()

* If using 'default', still fallback to 'date' if 'pretty' is
unavailable.
* Fix instance caching of 'default', which never worked since $pref
would be changed inside the !isset() block.

Bug: T110945
Change-Id: Ic53b279f8741371fa1cb642c53e6d487cb1c6b81

8 years agoMerge "Use wgResourceBasePath instead of wgScriptPath for wgStylePath etc."
jenkins-bot [Tue, 1 Sep 2015 21:55:31 +0000 (21:55 +0000)]
Merge "Use wgResourceBasePath instead of wgScriptPath for wgStylePath etc."

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 1 Sep 2015 19:26:51 +0000 (21:26 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ie07f3d57d81c5b1f645c95397f10a31f18c5d6d1

8 years agoDeprecate unconditional loading of mediawiki.ui.button on all pages
Ori Livneh [Tue, 1 Sep 2015 18:40:27 +0000 (11:40 -0700)]
Deprecate unconditional loading of mediawiki.ui.button on all pages

Formally deprecate the unconditional loading of mediawiki.ui.button on all
pages. During the deprecation period, the styles will be loaded on pages which
contain 'mw-ui-button' in the page HTML. Starting with 1.28, the styles will
only be loaded if explicitly depended upon.

The rationale for the patch was expressed by Spage in a comment on PS4 of
I835f3eb937: "Wikis have too many templates like
[[commons:Template:Clickable_button]] dependent on jquery.ui.button that don't
work if JavaScript isn't enabled.  mediawiki.ui.button is a lighter-weight
piece of CSS that we own and can improve, and transitioning wiki content to it
requires that we provide it." Mattflaschen commented that the added payload was
"justifiable if we announce this widely and make an effort to get wikis to use this."

A year and a half later, [[commons:Template:Clickable_button]] is still not
using mediawiki.ui.button, and usage elsewhere is not sufficiently widespread
to merit loading this stylesheet in the critical path.

Bug: T98395
Change-Id: I290e1db422b7c7b9c1a026aae22e174580cefae9

8 years agoImplement wfArrayPlus2d which combines 2d arrays
Florian [Thu, 27 Aug 2015 17:49:50 +0000 (19:49 +0200)]
Implement wfArrayPlus2d which combines 2d arrays

Moved the logic of ExtensionRegistrations array_plus_2d merge method out
to it's own global function wfArrayPlus2d, so any other function in mediawiki
core and it's extensions can use this method when they need to union
a 2d array.

Change-Id: I56afdf306e399a4a1505828ed76c60c1bfd033b6

8 years agoMerge "EditPage: Add text placeholders to view source page"
jenkins-bot [Tue, 1 Sep 2015 16:45:58 +0000 (16:45 +0000)]
Merge "EditPage: Add text placeholders to view source page"

8 years agoresourceloader: Remove redundant type-checks in internal code
Timo Tijhof [Fri, 28 Aug 2015 23:12:07 +0000 (01:12 +0200)]
resourceloader: Remove redundant type-checks in internal code

The private 'execute()' method only runs for modules that have been
implemented by mw.loader.implement, which already throws if 'messages'
or 'style' is set to a non-object value.

The execute() code for 'templates' already has this check removed.

Change-Id: I65b8a87500388d3d2ca6e495e1e50179639ba27a

8 years agoMerge "resourceloader: Consistently set state=ready after script execution (not before)"
jenkins-bot [Tue, 1 Sep 2015 16:32:11 +0000 (16:32 +0000)]
Merge "resourceloader: Consistently set state=ready after script execution (not before)"

8 years agoMerge "Add ForeignUpload and ForeignStructuredUpload"
jenkins-bot [Tue, 1 Sep 2015 16:27:31 +0000 (16:27 +0000)]
Merge "Add ForeignUpload and ForeignStructuredUpload"

8 years agoresourceloader: Consistently set state=ready after script execution (not before)
Timo Tijhof [Fri, 28 Aug 2015 22:56:24 +0000 (00:56 +0200)]
resourceloader: Consistently set state=ready after script execution (not before)

For the case of 'module.script' being an array, mw.loader already sets state=ready
after execution. For the cases of it being a function or string, we were setting
state=ready before execution.

This looks like it may have intended to prevent double execution where e.g.
some other module may need this module and see it has state 'loading' and start
executing it. However ResourceLoader doesn't expose execute(). The only code
calling execute() is code that also sets 'state=loading', or handlePending.

In fact, this early setting of "ready" could actually cause double execution.
Not of the current module, but of dependent modules. If a module's script loads
other modules that are cache hits, that could may trigger handlePending() which
will assume the current module to be ready, when it isn't.

Now that these code paths match, re-use the markModuleReady callback instead of
repeating this code.

Update tests:
* Make assertion captions less verbose.
* Change load instruction from "test.implement" to "test.implement.import".
  Module "test.implement" doesn't exist. This worked by accident because
  implement() can sometimes run a module immediately if it doesn't exist.
* Update test to reflect internal detail that state=loading during script
  execution.
* Assert afterwards that script ran and state=ready.

Change-Id: I6b0542edb113d58b8f24cc8587e98ee88b514c55

8 years agoUse wgResourceBasePath instead of wgScriptPath for wgStylePath etc.
Timo Tijhof [Tue, 1 Sep 2015 16:13:02 +0000 (18:13 +0200)]
Use wgResourceBasePath instead of wgScriptPath for wgStylePath etc.

This make re-configuring these much easier by only needing to update
one variable instead of four.

Also remove redundant hardcoding of wgStylePath and wgResourceBasePath
in the generated LocalSettings.php file during installation. This way
changing wgScriptPath will naturally result in the other variables
updating too. We already do this for many other variables (such as
wgLoadScript, wgScript, wgExtensionAssetsPath, etc.).

Change-Id: Ide74355b4054c78214c17f3b2d6fa2f5270e0ab9

8 years agoAdd ForeignUpload and ForeignStructuredUpload
Mark Holmquist [Wed, 26 Aug 2015 19:42:21 +0000 (14:42 -0500)]
Add ForeignUpload and ForeignStructuredUpload

These classes will be used to send uploads from one wiki to another,
and the latter includes (partial) adherence to the Commons structured
data system [0].

[0] https://commons.wikimedia.org/wiki/Commons:Structured_data

Change-Id: I96fcb862eb854d23b6f9f553a87fa7ca65bf5a93
Bug: T105071

8 years agoIgnore languages/messages/Messages*.php in line length sniff
Vivek Ghaisas [Tue, 25 Aug 2015 20:27:41 +0000 (01:57 +0530)]
Ignore languages/messages/Messages*.php in line length sniff

Most of these files have very long lines, but that makes them easier to
read. Also, they're generated from a script. It's probably a better idea
to ignore their lengths than to change the lengths.

Bug: T103806
Change-Id: Ic6860520e4cc76f93aa13c364aae11cf14f279d0

8 years agoMerge "Make readonly work for OOUI forms"
jenkins-bot [Tue, 1 Sep 2015 12:51:26 +0000 (12:51 +0000)]
Merge "Make readonly work for OOUI forms"

8 years agoEditPage: Add text placeholders to view source page
Derk-Jan Hartman [Mon, 24 Aug 2015 20:58:33 +0000 (22:58 +0200)]
EditPage: Add text placeholders to view source page

These placeholders are already in use by the edit form, but were not
available to extensions. This gives us equal oppertunity to adapt the
contents surrounding the source textbox as we have in the editform.

I'm reusing the same placeholders. Most extensions fill these
placeholders through the showEditForm:initial hook however, so it
should not cause too many unexpected changes, since the readonly page
uses showReadOnlyForm:initial instead. I left out those that were very
specific to the editpage (afterEditTools etc).

This will be useful for Bug T110050.

Change-Id: Ia03265a907212ee7bac1b839dcdd4d2f24c79bbe

8 years agoMake readonly work for OOUI forms
Glaisher [Tue, 1 Sep 2015 12:37:54 +0000 (17:37 +0500)]
Make readonly work for OOUI forms

This seems like a hack. Copied from HTMLTextField.

Change-Id: I46f3dbd4b60fd9a39ecd7167ec903ae7d1d804bc

8 years agoresourceloader: Don't add "&*" query parameter to load.php urls
Timo Tijhof [Fri, 28 Aug 2015 12:00:58 +0000 (14:00 +0200)]
resourceloader: Don't add "&*" query parameter to load.php urls

Follows-up r88883 (8dab43f703). The IEUrlExtension library only considers the
query string if the base path has no extension (or if the dot is urlencoded).
Neither of which is the case for load.php urls.

If the server doesn't expose undecoded request URIs (per IEUrlExtension)
then it will look in the query string always. However even then it is
only an issue if the last query parameter in the url contains a dot,
which is very unlikely for load.php (they typically end in 'skin' or
'version' which don't contain plain dots).

Ref T30840.

Change-Id: I4a4ef7ef5ad7d74ecb47a44342e6324fa9844173

8 years agoMerge "Fixed and suppressed some thumb.php IDEA errors"
jenkins-bot [Tue, 1 Sep 2015 00:45:12 +0000 (00:45 +0000)]
Merge "Fixed and suppressed some thumb.php IDEA errors"

8 years agoMerge "Clarified WANObjectCache::delete() comments"
jenkins-bot [Tue, 1 Sep 2015 00:44:09 +0000 (00:44 +0000)]
Merge "Clarified WANObjectCache::delete() comments"

8 years agoMerge "Allow to export null values"
jenkins-bot [Mon, 31 Aug 2015 23:01:26 +0000 (23:01 +0000)]
Merge "Allow to export null values"

8 years agoAllow to export null values
Stanislav Malyshev [Mon, 31 Aug 2015 22:45:06 +0000 (15:45 -0700)]
Allow to export null values

Bug: T110960
Change-Id: Idd90c8b6370547b1d9caa8b93e3d5b27942418d8

8 years agoMerge "resourceloader: Improve moduleRegistry documentation"
jenkins-bot [Mon, 31 Aug 2015 21:20:16 +0000 (21:20 +0000)]
Merge "resourceloader: Improve moduleRegistry documentation"

8 years agoMerge "resourceloader: Remove global startUp() callback"
jenkins-bot [Mon, 31 Aug 2015 21:10:50 +0000 (21:10 +0000)]
Merge "resourceloader: Remove global startUp() callback"

8 years agoMerge "objectcache: Correct tempTTL comment for getWithSetCallback()"
jenkins-bot [Mon, 31 Aug 2015 21:01:26 +0000 (21:01 +0000)]
Merge "objectcache: Correct tempTTL comment for getWithSetCallback()"

8 years agoobjectcache: Correct tempTTL comment for getWithSetCallback()
Aaron Schulz [Mon, 31 Aug 2015 20:35:09 +0000 (13:35 -0700)]
objectcache: Correct tempTTL comment for getWithSetCallback()

* This applies regardless of lockTSE

Change-Id: I5adb62fbb956407cd978211a0497e8bd9de3c1a5

8 years agoClarified WANObjectCache::delete() comments
Aaron Schulz [Mon, 31 Aug 2015 20:26:22 +0000 (13:26 -0700)]
Clarified WANObjectCache::delete() comments

Change-Id: I8c1cffa284cf92461045f9163ff1d1e9bf8c2244

8 years agoRemoved READ_LATEST from revision load in getMsgFromNamespace()
Aaron Schulz [Wed, 26 Aug 2015 23:13:49 +0000 (16:13 -0700)]
Removed READ_LATEST from revision load in getMsgFromNamespace()

* The key salting of the invidial keys via the WAN cache makes
  it OK to use slaves here. The salting happens via the delete()
  in the MessageCache::replace() call, which is hit when the
  message page is edited.

Bug: T92357
Change-Id: Ic191f6c3fc49c4c58461d26468dd0fa94a52051e

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 31 Aug 2015 20:05:26 +0000 (22:05 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I734ddd0b235fdfc0983bad6683f8e90367862177

8 years agoMerge "Changing user and user talk namespace name for Latvian wikis"
jenkins-bot [Mon, 31 Aug 2015 19:56:11 +0000 (19:56 +0000)]
Merge "Changing user and user talk namespace name for Latvian wikis"

8 years agoMerge "Don't free the parser in the catch() block of parse()"
jenkins-bot [Mon, 31 Aug 2015 19:30:44 +0000 (19:30 +0000)]
Merge "Don't free the parser in the catch() block of parse()"

8 years agoFixed and suppressed some thumb.php IDEA errors
Aaron Schulz [Wed, 26 Aug 2015 19:19:50 +0000 (12:19 -0700)]
Fixed and suppressed some thumb.php IDEA errors

Change-Id: If5ec6fd1d6d272633296b74d2d8e146feb924229

8 years agoresourceloader: Improve moduleRegistry documentation
Timo Tijhof [Fri, 28 Aug 2015 22:54:27 +0000 (00:54 +0200)]
resourceloader: Improve moduleRegistry documentation

Rename local 'msgs' variable to 'messages' for consistency.

Change-Id: I5d035204ac5d22673a9b9a68ce9ea6cf23aaeba8

8 years agoresourceloader: Remove global startUp() callback
Timo Tijhof [Fri, 28 Aug 2015 22:20:53 +0000 (00:20 +0200)]
resourceloader: Remove global startUp() callback

Instead of a hardcoded JSONP-style global callback, use script
load handlers. This uses the same logic as jQuery uses internally
(ajax/script.js), which we call inside mediawiki.js. Inline those
two lines here since this the code is what loads jQuery itself.

Bug: T39894
Change-Id: I02b0d16a6ec3081dc551bfd9c3ae652707b7edcf

8 years agoComment typo fix
Brad Jorsch [Mon, 31 Aug 2015 14:32:06 +0000 (10:32 -0400)]
Comment typo fix

Change-Id: I52e36f1ecbef8e8c18066d3dde84bda086ef9808

8 years agoMerge "Rephrase tooltip-t-contributions for better grammar"
jenkins-bot [Mon, 31 Aug 2015 13:02:23 +0000 (13:02 +0000)]
Merge "Rephrase tooltip-t-contributions for better grammar"

8 years agoChanging user and user talk namespace name for Latvian wikis
maurelio [Mon, 31 Aug 2015 12:21:25 +0000 (14:21 +0200)]
Changing user and user talk namespace name for Latvian wikis

Added too GENDER support and kept the old NS_USER and NS_USER_TALK values
as $namespacealiases

Bug: T106513
Change-Id: Ibabbf284c5b5fef982d332d3dd5fd06fa76a69dd

8 years agoSkip monolog tests if monolog is not installed
Kunal Mehta [Mon, 31 Aug 2015 06:42:56 +0000 (23:42 -0700)]
Skip monolog tests if monolog is not installed

Change-Id: Ib3f4f76651da183901634a0ac6787666e47d74d4

8 years agoMerge "Workaround fopen lack of SubjectAltName support for instantCommons"
jenkins-bot [Mon, 31 Aug 2015 00:28:44 +0000 (00:28 +0000)]
Merge "Workaround fopen lack of SubjectAltName support for instantCommons"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 30 Aug 2015 18:56:08 +0000 (20:56 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I234526fd75bd75e927c3891988f82081dd05131e

8 years agoMerge "Improve wording of "size-bytes" and "size-pixel" messages"
jenkins-bot [Sun, 30 Aug 2015 07:35:34 +0000 (07:35 +0000)]
Merge "Improve wording of "size-bytes" and "size-pixel" messages"

8 years agoReword 'stub-threshold' message in Special:Preferences advanced section
This, that and the other [Sun, 30 Aug 2015 07:28:44 +0000 (17:28 +1000)]
Reword 'stub-threshold' message in Special:Preferences advanced section

Message changed from "Threshold for stub link formatting bytes" to
"Threshold in bytes for stub link rendering (sample)".

Also convert it to a wikitext message (not raw HTML) and improve the "qqq"
documentation.

Bug: T107732
Change-Id: I493679073b9881c98a068dede2db00b391ab8353

8 years agoImprove wording of "size-bytes" and "size-pixel" messages
This, that and the other [Sun, 30 Aug 2015 05:23:13 +0000 (15:23 +1000)]
Improve wording of "size-bytes" and "size-pixel" messages

"B" and "P" are vanishingly rare abbreviations for "bytes" and "pixels"
respectively. Let's use the full English terms for these, combined with
a PLURAL magic word for good measure.

Change-Id: Id59c4b9dea2c13940ae790b6a236ac08abe0a768

8 years agoWorkaround fopen lack of SubjectAltName support for instantCommons
Brian Wolff [Wed, 1 Jul 2015 08:15:39 +0000 (02:15 -0600)]
Workaround fopen lack of SubjectAltName support for instantCommons

Hacky work around, where on php < 5.6.0 where SubjectAltName is not
supported, if a request to commons.wikimedia.org fails, retry the
request but telling php fopen wrapper to treat it as if it came
from en.wikipedia.org for validation purposes, since as of
c02fab71422a that's what the common name of the cert will be.

In the ideal world, everyone would just have curl installed.

I know this is super hacky, but I'd really like instant commons to
work out of the box even without curl installed.

Note: I'm basing the php 5.6 part on documentation, I have not tested
this with a copy of that version of php.

Bug: T75199
Change-Id: Ibde59be61a5b3d7cd5397ba352dce9be11e1b06f

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 29 Aug 2015 19:33:15 +0000 (21:33 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I11090b4bd770e52ee751b31b3788189e8d40c3f4

8 years agomediawiki.ForeignApi: Use `type === 'POST'` instead of `type !== 'GET'`
Bartosz Dziewoński [Sat, 29 Aug 2015 18:44:08 +0000 (20:44 +0200)]
mediawiki.ForeignApi: Use `type === 'POST'` instead of `type !== 'GET'`

Works better when 'type' is not set (which can happen if someone is
calling #ajax directly rather than #get or #post), is consistent
with code in mediawiki.api, and better reflects what we really mean.

Change-Id: Iea265be5c0e6113e91e700124ac36a0b588ca25c

8 years agoAdd protected getCurrentRow to TablePager
addshore [Sat, 29 Aug 2015 12:08:44 +0000 (14:08 +0200)]
Add protected getCurrentRow to TablePager

This makes unit testing TablePagers easier

Change-Id: I899ec6b056fb1f007a6caf0be320324cffe08326

8 years agoReally actually fix the typo in Parser.php
Kunal Mehta [Sat, 29 Aug 2015 04:39:15 +0000 (21:39 -0700)]
Really actually fix the typo in Parser.php

Change-Id: I9d9c6f13095087ac2c2c6693c6bd1613219bf658

8 years agoFixed parser report typo
Aaron Schulz [Sat, 29 Aug 2015 00:06:45 +0000 (17:06 -0700)]
Fixed parser report typo

Change-Id: Ia549f4e1932bc1196e840e154b8d6fb0b608d10d

8 years agoMerge "Improved getMainStashInstance() docs"
jenkins-bot [Sat, 29 Aug 2015 00:01:58 +0000 (00:01 +0000)]
Merge "Improved getMainStashInstance() docs"

8 years agoMade MessageCache use the WAN cache for individual cache keys
Aaron Schulz [Thu, 27 Aug 2015 09:10:03 +0000 (02:10 -0700)]
Made MessageCache use the WAN cache for individual cache keys

* These keys are used for larger messages not in the main blob,
  and they still use explicit purges as the pages change

Change-Id: I254ddcc9ffe7c49654788d6aabcca2ab7ed4f03f

8 years agoImproved getMainStashInstance() docs
Aaron Schulz [Fri, 28 Aug 2015 23:24:13 +0000 (16:24 -0700)]
Improved getMainStashInstance() docs

Change-Id: I49e5c112478927387244214917fb06907c22186f

8 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Fri, 28 Aug 2015 19:59:26 +0000 (19:59 +0000)]
Merge "Localisation updates from https://translatewiki.net."

8 years agoMerge "Revert "Prevent the jumbling up of autocomments in RTL""
jenkins-bot [Fri, 28 Aug 2015 19:35:20 +0000 (19:35 +0000)]
Merge "Revert "Prevent the jumbling up of autocomments in RTL""

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

Change-Id: I68d4a05bd1404393686d145ba5f46f93f789d52a

8 years agoRevert "Prevent the jumbling up of autocomments in RTL"
TheDJ [Fri, 28 Aug 2015 18:55:38 +0000 (18:55 +0000)]
Revert "Prevent the jumbling up of autocomments in RTL"

This reverts commit 6f8c3359ed6e531edd9eed81dd033514feb6a802.
which was causing page load issues due to a bug in Chrome and Safari.

Bug: T110716
Change-Id: I0ab1bf1f52474d8ab43d34628df5d972e817e8f0

8 years agoCssContentHandler: Fix @return documentation
Kunal Mehta [Fri, 28 Aug 2015 17:40:08 +0000 (10:40 -0700)]
CssContentHandler: Fix @return documentation

Missed this when copying the code from JavaScriptContentHandler...

Change-Id: I6b232e431b4e997b65a698de42473c9b6deae6b1

8 years agoMerge "API: Add ApiResult::META_KVP_MERGE"
jenkins-bot [Fri, 28 Aug 2015 17:17:36 +0000 (17:17 +0000)]
Merge "API: Add ApiResult::META_KVP_MERGE"

8 years agoAPI: Add ApiResult::META_KVP_MERGE
Brad Jorsch [Fri, 28 Aug 2015 15:10:20 +0000 (11:10 -0400)]
API: Add ApiResult::META_KVP_MERGE

This allows for merging the KVP key into the value for the alternative
output format. Specifically,

 { "key": { "foo": "bar" } }

can now be turned into

 [{ "name": "key", "foo": "bar" }]

instead of

 [{ "name": "key", "value": { "foo": "bar" } }]

Change-Id: Ie1f9235893dbbcd2948c46e0356360b5635a3ddd

8 years agoBe a little more conservative with the IPv6 support in the Sanitizer.
C. Scott Ananian [Fri, 28 Aug 2015 14:23:47 +0000 (10:23 -0400)]
Be a little more conservative with the IPv6 support in the Sanitizer.

This isn't strictly necessary, but it matches the production used in
Parsoid better.

Change-Id: I542b1f71fe9e917fef5718a6df8ebb98735f7fb4

8 years agoMerge "Add comments clarifying how calling getters on ParserOutput affects the parser...
jenkins-bot [Fri, 28 Aug 2015 14:00:22 +0000 (14:00 +0000)]
Merge "Add comments clarifying how calling getters on ParserOutput affects the parser cache."

8 years agoMerge "Fixed some doc errors in tryNormaliseRedirect()"
jenkins-bot [Fri, 28 Aug 2015 09:39:33 +0000 (09:39 +0000)]
Merge "Fixed some doc errors in tryNormaliseRedirect()"

8 years agoMerge "Added jobqueue.pickup_root_age metric"
jenkins-bot [Fri, 28 Aug 2015 08:31:22 +0000 (08:31 +0000)]
Merge "Added jobqueue.pickup_root_age metric"

8 years agoFixed some doc errors in tryNormaliseRedirect()
Aaron Schulz [Mon, 24 Aug 2015 20:00:23 +0000 (13:00 -0700)]
Fixed some doc errors in tryNormaliseRedirect()

Change-Id: I8f9397d05de1c0bae33497d1f9e3146939599380

8 years agoMerge "api: Load mediawiki.apipretty with addModuleStyles"
jenkins-bot [Fri, 28 Aug 2015 08:23:02 +0000 (08:23 +0000)]
Merge "api: Load mediawiki.apipretty with addModuleStyles"

8 years agoAdd comments clarifying how calling getters on ParserOutput affects the parser cache.
daniel [Wed, 26 Aug 2015 16:17:05 +0000 (18:17 +0200)]
Add comments clarifying how calling getters on ParserOutput affects the parser cache.

Change-Id: Ie6a4a8989df218f88cfc7c1cf1d4b68cf871abbb

8 years agoMerge "SpecialVersion: Force text credits and license to LTR direction"
jenkins-bot [Fri, 28 Aug 2015 07:08:01 +0000 (07:08 +0000)]
Merge "SpecialVersion: Force text credits and license to LTR direction"

8 years agoMerge "Add date format for Latvian language"
jenkins-bot [Fri, 28 Aug 2015 07:05:56 +0000 (07:05 +0000)]
Merge "Add date format for Latvian language"

8 years agoSpecialVersion: Force text credits and license to LTR direction
Amir E. Aharoni [Thu, 27 Aug 2015 21:23:18 +0000 (00:23 +0300)]
SpecialVersion: Force text credits and license to LTR direction

It's safe to assume that text files with credits or licenses are written
in English, so it should be explicitly set to English/LTR
so that English won't appear in RTL wikis as RTL.

Change-Id: Ic9db006b2d3509de32f01ae04782535ab0183993

8 years agoAdded --status and --limit filters to showJobs.php
Aaron Schulz [Tue, 25 Aug 2015 08:17:43 +0000 (01:17 -0700)]
Added --status and --limit filters to showJobs.php

Change-Id: Ibb3e907061c04a4dd2af23789fd59685240f0876

8 years agoMerge "Add ParserOutput cache and expiry times to NewPP report"
jenkins-bot [Fri, 28 Aug 2015 04:35:59 +0000 (04:35 +0000)]
Merge "Add ParserOutput cache and expiry times to NewPP report"

8 years agoMerge "Use Parsoid v3 API; emulate the RESTBase v1 API"
jenkins-bot [Fri, 28 Aug 2015 03:14:27 +0000 (03:14 +0000)]
Merge "Use Parsoid v3 API; emulate the RESTBase v1 API"

8 years agoMerge "Removed useless $wgUseLocalMessageCache check in MessageCache"
jenkins-bot [Fri, 28 Aug 2015 02:18:43 +0000 (02:18 +0000)]
Merge "Removed useless $wgUseLocalMessageCache check in MessageCache"

8 years agoAdd ParserOutput cache and expiry times to NewPP report
Ori Livneh [Fri, 28 Aug 2015 02:05:27 +0000 (19:05 -0700)]
Add ParserOutput cache and expiry times to NewPP report

The labels are not localized, because I think this ought to be outputted as a
JSON blob, with uniform field names. But not doing that in this patch.

Change-Id: I235839b276632308ddeac7afe763d355b73c2a25

8 years agoMerge "Update namespace names for Sanskrit"
This, that and the other [Fri, 28 Aug 2015 01:36:48 +0000 (01:36 +0000)]
Merge "Update namespace names for Sanskrit"

8 years agoRemoved useless $wgUseLocalMessageCache check in MessageCache
Aaron Schulz [Fri, 28 Aug 2015 01:31:35 +0000 (18:31 -0700)]
Removed useless $wgUseLocalMessageCache check in MessageCache

* The localCache member will use CACHE_NONE if this is off,
  so the set()/get() calls are already no-oped
* Also allow using the local cache if $hash is false
  in "stale mode", which handles the case where the hash
  key fell out of memory for some reason more gracefully

Change-Id: Ie12efcd4088a6dc4a4cdd2fd06646f2881df53d7

8 years agoMerge "Make ParserOptions fields private"
jenkins-bot [Thu, 27 Aug 2015 23:33:07 +0000 (23:33 +0000)]
Merge "Make ParserOptions fields private"

8 years agoMake ParserOptions fields private
Brad Jorsch [Thu, 27 Aug 2015 13:38:53 +0000 (09:38 -0400)]
Make ParserOptions fields private

Now that Ib58e8020 and Ie644854 are merged, there are no direct accesses
to these fields left in core or extensions in Gerrit. So let's make them
private to make sure no more get added before we decide whether we're
going to eliminate them entirely.

Bug: T110269
Change-Id: I82041b88dd0f194716f54d3207649388328805ca

8 years agoregistration: Remove unused 'wgExtraNamespaces' merge strategy
Kunal Mehta [Thu, 27 Aug 2015 23:13:42 +0000 (16:13 -0700)]
registration: Remove unused 'wgExtraNamespaces' merge strategy

As of 9df0672255afd, this is no longer used.

Change-Id: I7e40096cb5173626ba7f2cd3d2be121c8a04768a

8 years agoUse Parsoid v3 API; emulate the RESTBase v1 API
C. Scott Ananian [Wed, 27 May 2015 21:46:45 +0000 (17:46 -0400)]
Use Parsoid v3 API; emulate the RESTBase v1 API

Update the ParsoidVirtualRESTService and the
RestbaseVirtualRESTService to use Parsoid's v3 API, instead of the
deprecated v1/v2 APIs.  Since Visual Editor still issues requests
using the Parsoid v1 API, convert Parsoid v1 API requests into Parsoid
v3 API requests when needed for a smooth transition.  We also add
support for converting RESTBase v1 API requests to Parsoid v3 API
requests.

The next step will be to convert Visual Editor to issue RESTBase v1
API requests (https://gerrit.wikimedia.org/r/217995), and then the
Parsoid v1 conversion code added here can be removed (T100681).

Tested Parsoid v1->v3 conversion, Parsoid v1->RESTBase conversion,
plus Parsoid v3 and RESTBase v1->Parsoid v3 conversion using VE
patched to issue RESTBase v1 API requests.

Bug: T100681
Change-Id: I07ac60cdec7a52ef93187d40099325a069e3239a

8 years agoMerge "XMP: log structured data for halting errors"
jenkins-bot [Thu, 27 Aug 2015 21:10:22 +0000 (21:10 +0000)]
Merge "XMP: log structured data for halting errors"

8 years agoDon't free the parser in the catch() block of parse()
Mukunda Modell [Thu, 27 Aug 2015 19:28:51 +0000 (14:28 -0500)]
Don't free the parser in the catch() block of parse()

This is the solution proposed by @bd808 to address T89532, also, it's
completely untested.

Bug: T89532
Change-Id: I9b5b47eb9d64a3d80f9c49618a362415d15071b4
(cherry picked from commit d34ed1acbe2ea58e5de59d3a18e278be0e384f8f)

8 years agoapi: Load mediawiki.apipretty with addModuleStyles
Timo Tijhof [Wed, 26 Aug 2015 17:37:54 +0000 (19:37 +0200)]
api: Load mediawiki.apipretty with addModuleStyles

Follows-up d25cb99. addModules() is async and causes a flash
of unstyled content. E.g. the h1.firstHeading renders and then
disappears on pages like:

<https://en.wikipedia.org/w/api.php?action=purge>

Change-Id: I74c6386d2c5f318987dac103a76c0bc2af6e2653

8 years agoXMP: log structured data for halting errors
Bryan Davis [Thu, 27 Aug 2015 19:56:57 +0000 (13:56 -0600)]
XMP: log structured data for halting errors

Log structured data for halting errors in XMPReader::parse at warning
level.

Bug: T89532
Change-Id: Iba38fedb4255687742228cf656218b4b633a7f40

8 years agoMerge "Fix spaces in MigrateFileRepoLayoutTest::tearDown"
jenkins-bot [Thu, 27 Aug 2015 19:25:11 +0000 (19:25 +0000)]
Merge "Fix spaces in MigrateFileRepoLayoutTest::tearDown"