Commit graph

70994 commits

Author SHA1 Message Date
jenkins-bot
fe922d470f Merge "registration: Remove broken ResourceLoaderLESSImportPaths support" 2016-07-06 02:23:46 +00:00
Matthew Flaschen
3354e8d550 Show parser output for diffs unless extension aborts
It was backwards.

Bug: T139433
Change-Id: Ie370da9d77e1d7608e2d5492f9d34094af233d0b
2016-07-05 20:08:32 -04:00
jenkins-bot
f54c6dc189 Merge "Revert "Convert Special:MergeHistory to use OOUI."" 2016-07-05 23:42:34 +00:00
Ori Livneh
dfd046412f resourceloader: Replace SHA1 with 32-bit FNV-1 as hash function
SHA-1 is not secure enough to be used as a cryptographic hash function, and its
implementation in JavaScript is too long and too slow for it to be a good
general-purpose hash function. And we currently throw away most of the work:
SHA-1 produces 160-bit hash values, of which we keep 48.

Although the JavaScript implementation is not exported, SHA-1 is a well-known
hash function, and I'm willing to bet that sooner or later someone will move to
make it accessible to other modules, at which point usage will start to spread.

For ResourceLoader, the qualities we're looking for in a hash function are:

* Already implemented in PHP
* Easy to implement in JavaScript
* Fast
* Collision-resistant

The requirement that hashes be cheap to compute in JavaScript narrows the field
to 32-bit hash functions, because in JavaScript bitwise operators treat their
operands as 32 bits, and arithmetic uses double-precision floats, which have a
total precision of 53 bits. It's possible to work around these limitations, but
it's a lot of extra work.

The best match I found is the 32-bit variant of FNV-1, which is available in
PHP as of version 5.4 (as 'fnv1a32'). The fnv132 JavaScript function is
around ten times faster and eight times shorter than sha1.

Change-Id: I1e4fb08d17948538d96f241b2464d594fdc14578
2016-07-05 21:14:03 +00:00
jenkins-bot
78c1c6de07 Merge "Fixes to LocalFile::lock()" 2016-07-05 20:08:53 +00:00
Translation updater bot
ef3fb7d02e Localisation updates from https://translatewiki.net.
Change-Id: Ia097accd2d28baec1f7932cdb30299e0dc1a7781
2016-07-05 21:56:28 +02:00
David Lynch
dfeefec1f0 TitleOptionWidget: don't subvert OptionWidget's tabindex
OptionWidget takes steps to not interfere in the tab order. TitleOptionWidget
uses links as its labels, which has a side-effect of reintroducing a tab-
focusable element into the OptionWidget. Explicitly set tabindex="-1" on these
links, to maintain the OptionWidget behavior.

Bug: T129792
Change-Id: Ia6b1361e7183e253b7abc58037f007936dfa60ff
2016-07-05 12:08:10 -05:00
Thiemo Mättig
028d7a0891 Remove unused imports
Change-Id: I3b2ede8a11863c0fb775d851abb251e44ad616db
2016-07-05 16:52:22 +02:00
Bartosz Dziewoński
7221d37d32 Revert "Convert Special:MergeHistory to use OOUI."
The new form doesn't check the CSRF token. We should use either just
HTMLForm (which checks the token automatically) or just FormOptions
(and check it ourselves), not a mix of the two.

This reverts commit 598068334e.
This reverts commit 475e78c377.

Bug: T138346
Change-Id: Icc100552f3fba2e5e17ae6a2f57c2bfed32fbe83
2016-07-05 12:02:10 +02:00
jenkins-bot
04d89c3f2a Merge "Update the way captions show up in packed-overlay and packed-hover" 2016-07-05 09:44:14 +00:00
Aaron Schulz
d70b081011 Fixes to LocalFile::lock()
* Added onTransactionResolution() DB method.
* Use this method so that file unlocks fire on unlockAndRollback()
  as well as on DB errors (via MWExceptionHandler::handleException).
  This prevents locks from getting stuck for minutes when deadlocks
  happen, since the LockManager::destruct() method is not reliable.
* Fix broken reference counting which always released locks on the
  first unlock() call, even if there were 2+ lock() calls.
* Added some type hints to IDatabase methods.
* Fixed DatabaseBase::__destruct() logging to include all callbacks.

Bug: T132921
Change-Id: I684706957f4d794cb6fe61505b0d26b7893de706
2016-07-04 18:11:55 -07:00
Translation updater bot
1023f61599 Localisation updates from https://translatewiki.net.
Change-Id: I46a80dc4344a68d51e8e20e330d95231ce004beb
2016-07-04 21:57:01 +02:00
jenkins-bot
5df0d51482 Merge "Follow-up 6af8dcf: Remove duplicate styles in shared.css" 2016-07-04 19:07:03 +00:00
aude
7e57732470 Fix comment typos in mediawiki.js
Change-Id: I40f90913f62f611f1bd940130751355f34dac5bf
2016-07-04 14:10:50 +02:00
jenkins-bot
50edcecda9 Merge "registration: Add schema validation ResourceLoaderWikiModule" 2016-07-04 06:53:05 +00:00
Prateek Saxena
b88cc6edd1 Follow-up 6af8dcf: Remove duplicate styles in shared.css
Bug: T138721
Change-Id: I1733fcf1b3155b43dee8b79036f91b8d6cc25d05
2016-07-04 11:29:31 +05:30
Translation updater bot
9d8240ca78 Localisation updates from https://translatewiki.net.
Change-Id: Ic18771748bb4ac83b3d7810a1cb123345da8c452
2016-07-03 21:53:33 +02:00
jenkins-bot
66e0757587 Merge "API: Log non-whitelisted CORS requests with session cookies" 2016-07-02 22:07:28 +00:00
Kunal Mehta
0625f4e161 registration: Remove broken ResourceLoaderLESSImportPaths support
It never worked to begin with since it did not prefix paths, and the
documentation for it says it should not be used by extensions, so
let's stop pretending it works.

Bug: T108271
Change-Id: I665d4439d14406038f2ac767ee5ec6eb5b67fca6
2016-07-02 14:38:05 -07:00
Kunal Mehta
155b6e0f1d registration: Add schema validation ResourceLoaderWikiModule
And improve the "groups" description for ResourceLoaderFileModule.

Bug: T134213
Change-Id: I03ecc56d1af565ace556ba579a9a9c495334da9c
2016-07-02 14:37:34 -07:00
Translation updater bot
455beb2407 Localisation updates from https://translatewiki.net.
Change-Id: I1b12a0e7251d41e3eeb7f000dc2b766b9ac0c637
2016-07-02 22:13:07 +02:00
Timo Tijhof
dd5e19a37b mediawiki.action.edit.stash: Document ignored key codes
Follows-up eca800c7f0.

Change-Id: Ic0d9620eb3a5e371cc9825248ebb40abb0dea965
2016-07-01 22:09:20 +01:00
Translation updater bot
b720befeb1 Localisation updates from https://translatewiki.net.
Change-Id: If018806a6e265fdbea44aa5812b17ceb40e7dbc9
2016-07-01 22:44:22 +02:00
jenkins-bot
a553dcbd3b Merge "Sync up with Parsoid parserTests." 2016-07-01 14:45:23 +00:00
James D. Forrester
9c83f632ef SearchInputWidget: Use isset on dataLocation in case it isn't
Change-Id: I88f4d1624ee0e1f64d8f591dd8936e875211c53d
2016-07-01 12:34:51 +01:00
Erik Bernhardson
49a1b9d9f3 Remove Profiler specific code from fileOpPerfTest
This code was referencing classes that no longer exist, so it was
removed. Profiling can still be accomplished the same way normal maint
scripts are profiled, by populating StartProfiler.php and passing
'--profiler ProfilerOutputText', or something similar, on the maint
script command line.

Change-Id: Ie037f6b224ec361c86b86369e2a4fff641908053
2016-07-01 01:36:33 +00:00
Erik Bernhardson
dd3b9a3343 Fix a few incorrect annotations
Found by applying etsy/phan to the mediawiki codebase, in preparation
for getting it running more regularly via CI. Has no effect on how the
code runs, simply does a better job of documenting the code.

Change-Id: I4c844a51df3ffe4fbb96cac25f3eff2f7a9faca2
2016-06-30 17:50:40 -07:00
Erik Bernhardson
5a25b01376 Repair interwiki search via api
This was throwing exceptions, probably for many months now, when
requesting and finding interwiki search results. Probably this went
unnoticed due to interwiki search only being enabled on itwiki, and
the requirement to pass a special parameter to turn it on.

Change-Id: I68ec35bb072b5ad62dd66789936bc2ae47d5256f
2016-06-30 15:55:20 -07:00
Subramanya Sastry
6cff819815 Sync up with Parsoid parserTests.
This now aligns with Parsoid commit dd8e644d320aec076f76da4e2bd70a8527e0dfd8

Change-Id: Id41989ae0973804c51ed10353d0ac81cef5a6211
2016-06-30 17:39:35 -05:00
Erik Bernhardson
af6e349f67 Don't reuse variable names
This code was rather hard to follow due to reusing the same variable
multiple times. Lets give them unique names.

Change-Id: I8f134b6314d593a3e40b19765c7b71496b8e524d
2016-06-30 15:17:21 -07:00
Erik Bernhardson
248b74afb9 Fix undefined classes
Applying static analysis to mediawiki core found a short list of classes
that were undefined. Fix those up.

Change-Id: Ib7f9dbd847ada287b35afb799782fc04a3b39ce4
2016-06-30 15:08:35 -07:00
Erik Bernhardson
4aca0ce803 Fix reference to undefined class
This error class was moved into wikimedia/cldr-plural-rule-parser
project, but in the conversion process this exception was not
converted over.

Change-Id: I36a2466a89e2ed6f0b98b45fcb945b6fdf56fbcf
2016-06-30 14:39:50 -07:00
jenkins-bot
932d711243 Merge "Correct two mistaken htmlform annotations" 2016-06-30 21:37:31 +00:00
Erik Bernhardson
a572de85c3 Correct two mistaken htmlform annotations
Change-Id: Ica807b656af0eb5a82ec0b1ec2d7894fd79a6639
2016-06-30 21:17:34 +00:00
jenkins-bot
94818adfb7 Merge "Factor out preview parse" 2016-06-30 20:06:55 +00:00
jenkins-bot
3275128cc9 Merge "Use a log group for LocalFile lock errors" 2016-06-30 19:49:55 +00:00
Ori Livneh
e5a0d6a183 Drop check for mbstring in copyFileBackend maintenance script
Already checked in PHPVersionCheck.php as of 41d1fa1c3a.

Change-Id: I35e55b63378f1768076be0c45392fdc5d48168bf
2016-06-30 11:58:20 -07:00
jenkins-bot
08c80624c6 Merge "Changed array instances from "array()" to "[..]"" 2016-06-30 18:24:49 +00:00
jenkins-bot
3a1f172a6a Merge "Try to predict the rev_id when preparing edits" 2016-06-30 18:10:47 +00:00
jenkins-bot
c3b7687aed Merge "jquery.makeCollapsible: Special case of content inside <li>" 2016-06-30 18:08:23 +00:00
Victor Porton
0eb8eeabd4 jquery.makeCollapsible: Special case of content inside <li>
Bug: T137676
Change-Id: Ie4228e63a63157e3909e938a4086f46dcbbf6767
2016-06-30 19:35:01 +02:00
jenkins-bot
d5334fe036 Merge "mw.action.view.filepage: Remove higher than necessary specific selectors" 2016-06-30 16:42:26 +00:00
jenkins-bot
7160234ab2 Merge "Move EXIF metadata CSS from mediawiki.legacy.shared" 2016-06-30 16:38:50 +00:00
jenkins-bot
a3209e467b Merge "Prepare to split create/modify button label" 2016-06-30 14:49:44 +00:00
jenkins-bot
87526d7ea8 Merge "Make non-existent messages be html safe regardless of output format" 2016-06-30 14:26:16 +00:00
James D. Forrester
4675cb3847 Prepare to split create/modify button label
Doing the i18n change in advance to allow translators lots of time to
create the translations before the following commit uses them in
practice.

Change-Id: If86485354da4e48a02aaabd0b1642ccea6a0b462
2016-06-30 13:01:05 +01:00
Prateek Saxena
3deb494f2d mw.action.view.filepage: Remove higher than necessary specific selectors
Change-Id: I0479fc3e75842f468f25448912acafa8021f8582
2016-06-30 16:58:31 +05:30
Prateek Saxena
360e89dd5e Move EXIF metadata CSS from mediawiki.legacy.shared
* ...to mediawiki.action.view.filepage.
* Also move the mw-metadata-show-hide-extended class
  from mediawiki.action.view.metadata to
  mediawiki.action.view.filepage.

Bug: T89981
Change-Id: I62cdcb625d0a5c280b8ac1ac989c7b8fa6cce47e
2016-06-30 16:54:33 +05:30
jenkins-bot
d3a51a690c Merge "Special:MergeHistory: Merge all revisions if no particular box/button is ticked" 2016-06-30 00:33:10 +00:00
Aaron Schulz
e43fe2a3e8 Use a log group for LocalFile lock errors
Bug: T132921
Change-Id: I55cafc9e2fff302e55d40a678bf7e25b4bf24026
2016-06-29 17:22:03 -07:00