lhc/web/wiklou.git
7 years agoImprove how slashes are stripped from filenames
Bartosz Dziewoński [Sun, 24 Jul 2016 19:44:35 +0000 (21:44 +0200)]
Improve how slashes are stripped from filenames

* Add slash and backslash ('/' and '\') to $wgIllegalFileChars.
* Replace illegal chars before removing paths in wfStripIllegalFilenameChars().

This way users trying to upload a file with slashes in the name will
get a better filename suggestion (e.g. for 'Foo part 1/3.jpg', you
previously got '3.jpg', now you'll get 'Foo part 1-3.jpg'). Uploading
tools that don't special-case slashes will also behave better.

Change-Id: Ib78f48a5f8c92e8ab2dc773ea6789b96b3662177

7 years agoMerge "Use current content model for blank page content (not title default)"
jenkins-bot [Sat, 23 Jul 2016 00:57:15 +0000 (00:57 +0000)]
Merge "Use current content model for blank page content (not title default)"

7 years agoMerge "filebackend: Fix DBLockManager IDEA warnings"
jenkins-bot [Fri, 22 Jul 2016 23:44:02 +0000 (23:44 +0000)]
Merge "filebackend: Fix DBLockManager IDEA warnings"

7 years agofilebackend: Fix DBLockManager IDEA warnings
Aaron Schulz [Fri, 22 Jul 2016 22:38:05 +0000 (15:38 -0700)]
filebackend: Fix DBLockManager IDEA warnings

Change-Id: I5e671bcee0915f65082c139be8f42aafad6413f1

7 years agoMerge "Make statsd counts for MWCallableUpdate actually useful"
jenkins-bot [Fri, 22 Jul 2016 23:30:27 +0000 (23:30 +0000)]
Merge "Make statsd counts for MWCallableUpdate actually useful"

7 years agoobjectcache: Add "busyValue" option to WANObjectCache::getWithSetCallback
Aaron Schulz [Fri, 22 Jul 2016 05:15:21 +0000 (22:15 -0700)]
objectcache: Add "busyValue" option to WANObjectCache::getWithSetCallback

This is useful for avoiding stampedes in the one case that lockTSE
does not alone cover, which is when the key does not exist or is
tombstoned.

Also avoid saving interim values unless the key is tombstoned
since there is no point in doing that otherwise.

Change-Id: I70997e90217a0979e0589afa7a5107b0e623c7cf

7 years agoMerge "Pingback: Show exactly what data is being sent during the installer"
jenkins-bot [Fri, 22 Jul 2016 22:19:42 +0000 (22:19 +0000)]
Merge "Pingback: Show exactly what data is being sent during the installer"

7 years agoMerge "Unbreak the DB updater by removing transaction from doUpdates()"
jenkins-bot [Fri, 22 Jul 2016 22:03:11 +0000 (22:03 +0000)]
Merge "Unbreak the DB updater by removing transaction from doUpdates()"

7 years agoPingback: Show exactly what data is being sent during the installer
Kunal Mehta [Fri, 22 Jul 2016 21:08:14 +0000 (14:08 -0700)]
Pingback: Show exactly what data is being sent during the installer

We have access to all the information that will be transmitted, so for
full transparency, display the actual JSON blob that will be sent.

Change-Id: I7dcc7bafb42619a8d49a27649fd7ac981efcd960

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 22 Jul 2016 19:54:08 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I9a2afba022af74a48775b62abbc2f589447ed974

7 years agoHTMLForm: Allow distinguishing between form views and submission attempts
Bartosz Dziewoński [Mon, 30 May 2016 21:11:33 +0000 (23:11 +0200)]
HTMLForm: Allow distinguishing between form views and submission attempts

Calling HTMLForm::setFormIdentifier() will set an internal identifier
for this form. It will be submitted as a hidden form field, allowing
HTMLForm to determine whether the form was submitted (or just viewed).
Setting this serves two purposes:

* If you use two or more forms on one page, it allows HTMLForm to
  identify which of the forms was submitted, and not attempt to
  validate the other ones. (T102114)
* If you use checkbox or multiselect fields inside a form using the
  GET method, it allows HTMLForm to distinguish between the initial
  page view and a form submission with all checkboxes or select
  options unchecked. (T29676)

Bug: T102114
Bug: T29676
Change-Id: Ib6ce3fd8941be86211cff5c6932b5e84982490fa

7 years agoMerge "DifferenceEngine: Move MW_DIFF_VERSION to class constant DIFF_VERSION"
jenkins-bot [Fri, 22 Jul 2016 17:51:03 +0000 (17:51 +0000)]
Merge "DifferenceEngine: Move MW_DIFF_VERSION to class constant DIFF_VERSION"

7 years agoMerge "Avoid calling rollback() in setVisibility() when nothing changed"
jenkins-bot [Fri, 22 Jul 2016 17:40:59 +0000 (17:40 +0000)]
Merge "Avoid calling rollback() in setVisibility() when nothing changed"

7 years agoDifferenceEngine: Move MW_DIFF_VERSION to class constant DIFF_VERSION
Chad Horohoe [Wed, 20 Jul 2016 21:10:02 +0000 (14:10 -0700)]
DifferenceEngine: Move MW_DIFF_VERSION to class constant DIFF_VERSION

Deprecated the former. It's only used in 2 extensions (both active),
so we can probably get rid of this within a single release cycle.

Change-Id: I39bef62556f8f0625a5741d54f9f84d15b50610d

7 years agoMake statsd counts for MWCallableUpdate actually useful
Aaron Schulz [Fri, 22 Jul 2016 02:32:09 +0000 (19:32 -0700)]
Make statsd counts for MWCallableUpdate actually useful

Include the method that made the callback in the key.

Change-Id: Ifc7c486ee5c8d57b2516456569bb724cf7dc2b99

7 years agoMerge "Avoid the use of DB rollback() in LocalFileDeleteBatch"
jenkins-bot [Fri, 22 Jul 2016 05:34:20 +0000 (05:34 +0000)]
Merge "Avoid the use of DB rollback() in LocalFileDeleteBatch"

7 years agoPreprocessor_Hash: use child arrays instead of linked lists
Tim Starling [Mon, 18 Jul 2016 02:05:13 +0000 (12:05 +1000)]
Preprocessor_Hash: use child arrays instead of linked lists

The singly-linked list data structure of Preprocessor_Hash was causing
stack exhaustion due to the need for a recursion depth proportional to
the number of children of a given PPNode, in serialize() and on
object destruction. So, switch to array-based storage. PPNode_* becomes
a temporary proxy around the underlying storage, which avoids circular
references and keeps the storage very compact. Preprocessor_DOM uses
similar temporary PPNode objects, so the fact that

  $node->getFirstChild() !== $node->getFirstChild()

should not cause any new problems.

* Increment cache version
* Use JSON serialization of the store array instead of serialize(),
  since JSON is more compact, even after gzipping.
* For efficiency, make $accum a plain array, and use it as an array
  where possible, instead of using helper functions.

Performance and memory usage for typical input are slightly improved:
something like 4% faster for the whole parse, and 20% less memory for
the tree.

Bug: T73486
Change-Id: I0d6c162b790d6dc1ddb0352aba6e4753854f4c56

7 years agoAvoid the use of DB rollback() in LocalFileDeleteBatch
Aaron Schulz [Thu, 21 Jul 2016 05:16:20 +0000 (22:16 -0700)]
Avoid the use of DB rollback() in LocalFileDeleteBatch

Race conditions are already handled by LockManager now.

Change-Id: Idb9ac511d565db4920aff7faa6ff291e05079798

7 years agoMerge "Allow 'data-*' attributes in personal tools links"
jenkins-bot [Fri, 22 Jul 2016 03:36:51 +0000 (03:36 +0000)]
Merge "Allow 'data-*' attributes in personal tools links"

7 years agoMerge "Improve database endAtomic() error messages"
jenkins-bot [Fri, 22 Jul 2016 02:12:28 +0000 (02:12 +0000)]
Merge "Improve database endAtomic() error messages"

7 years agoAllow 'data-*' attributes in personal tools links
Moriel Schottlender [Wed, 20 Jul 2016 21:15:01 +0000 (14:15 -0700)]
Allow 'data-*' attributes in personal tools links

We are limiting the attributes that are read and rendered for the
personal toolbar, but there are cases -- especially as tools get
more and more complex -- for needing to supply and read more information.

The use case that led to this change is the need to style Notification
badges with values in ::before and ::after pseudo-elements; these
elements need to display some prefixed content, and the best (only)
way to do that in no-js mode, is to set it up in CSS to be read
out of an attribute (using attr( xxx ); ).

This means that we need to read a specific attribute from the element,
but the only attributes allowed were insufficient. Allowing for data-*
attributes seemed not only a good solution for this specific case,
but a good idea in general for future tools that are added and
manipulate the personal toolbar links - allowing for storing information
without polluting the DOM.

Bug: T115845
Change-Id: Ic666540d70de52f337f839da0518cb83a990f5fd

7 years agoMerge "Make non-exception rollback() calls safer"
jenkins-bot [Fri, 22 Jul 2016 02:08:26 +0000 (02:08 +0000)]
Merge "Make non-exception rollback() calls safer"

7 years agoAvoid calling rollback() in setVisibility() when nothing changed
Aaron Schulz [Thu, 21 Jul 2016 01:06:46 +0000 (18:06 -0700)]
Avoid calling rollback() in setVisibility() when nothing changed

Change-Id: I7fde64fe1e6c9553447bcb9e62a1a9530f9e52ce

7 years agoMerge "OutputPage: Fix blank line between <html> and <head>"
jenkins-bot [Fri, 22 Jul 2016 00:01:21 +0000 (00:01 +0000)]
Merge "OutputPage: Fix blank line between <html> and <head>"

7 years agomediawiki.page.startup: Remove back-compat for MediaWiki 1.25 and earlier
Timo Tijhof [Thu, 21 Jul 2016 22:37:11 +0000 (23:37 +0100)]
mediawiki.page.startup: Remove back-compat for MediaWiki 1.25 and earlier

Follow-ups d7905627fd (released in MediaWiki 1.26).

This commit will be released in MediaWiki 1.28.

Change-Id: I2a3e91a3efb9db3d92aa2f92fc2572b4fe4e6707

7 years agoMerge "Do not override content format in EditPage when loading rev."
jenkins-bot [Thu, 21 Jul 2016 22:10:24 +0000 (22:10 +0000)]
Merge "Do not override content format in EditPage when loading rev."

7 years agoUse current content model for blank page content (not title default)
Brian Wolff [Thu, 21 Jul 2016 21:37:08 +0000 (21:37 +0000)]
Use current content model for blank page content (not title default)

This means that if you specify ?model=MODEL_ID you can create a
page using the non-default content model (but only if you have
the correct rights. Admin by default). Previously this only worked
if you specified a preload parameter that had the content model
that you wanted.

Additionally, I believe that this makes more sense logically in
terms of using the class state instead of the global state for
the current content model.

Change-Id: I938be1abcae8ac0b5fdb82d0d57bad5526aa5dee

7 years agoAdd option for sharing info about this MediaWiki install via pingback
Ori Livneh [Thu, 30 Jun 2016 09:29:10 +0000 (02:29 -0700)]
Add option for sharing info about this MediaWiki install via pingback

When $wgPingback is true, MediaWiki will periodically ping
https://www.mediawiki.org/beacon with basic information about the local
MediaWiki installation.  This data includes, for example, the type of system,
PHP version, and chosen database backend.

The pingback is sent via a deferred (post-send) update whenever $wgVersion
changes, using the updatelog table to ensure we don't send duplicate pingbacks.
A database lock ensures only one thread attempts to send the pingback, and a
cache key throttles attempts to no more than once per hour.

$wgPingback is false by default. The web installer has a checkbox for
controlling this option, and it is checked by default. This nudges new installs
to turn on pingbacks, but does not sneak this decision past sysops of existing
installs.

Change-Id: Ie43a6b46a07ebd9ccc1b9c3001f2ea02435d826b

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 21 Jul 2016 20:21:50 +0000 (22:21 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I0aa5901d8414d3106e0af0fb3c5284481b243ef6

7 years agoOutputPage: Fix blank line between <html> and <head>
Timo Tijhof [Thu, 21 Jul 2016 19:55:04 +0000 (20:55 +0100)]
OutputPage: Fix blank line between <html> and <head>

Follows-up a464d1d41 which changed OutputPage::headElement()
to join pieces by a line break instead of hardcoding line breaks
after (some) generated pieces.

This caused a minor regression in the form of a blank line between
<html> and <head> on every page, because I missed the one that
came from this class.

Change-Id: I5e48b852809699b205f4581c833605f3e232610a

7 years agoMerge "objectcache: Fix RESTBagOStuff class doc"
jenkins-bot [Thu, 21 Jul 2016 19:49:06 +0000 (19:49 +0000)]
Merge "objectcache: Fix RESTBagOStuff class doc"

7 years agoMerge "Add missing file locks to deleteArchivedFiles.php"
jenkins-bot [Thu, 21 Jul 2016 18:23:24 +0000 (18:23 +0000)]
Merge "Add missing file locks to deleteArchivedFiles.php"

7 years agoMake non-exception rollback() calls safer
Aaron Schulz [Thu, 21 Jul 2016 01:33:25 +0000 (18:33 -0700)]
Make non-exception rollback() calls safer

Use rollbackMasterChanges() instead so that all DBs get reverted.
Otherwise, external DB updates may get committed while related local
DB changes are rolled back.

Change-Id: I74de77f4b12dc15c0473c272d090caeeb97d6983

7 years agoMerge "Add AutoCommitUpdate class and replace some onTransactionIdle callers"
jenkins-bot [Thu, 21 Jul 2016 17:56:49 +0000 (17:56 +0000)]
Merge "Add AutoCommitUpdate class and replace some onTransactionIdle callers"

7 years agoImprove database endAtomic() error messages
Aaron Schulz [Thu, 21 Jul 2016 17:48:50 +0000 (10:48 -0700)]
Improve database endAtomic() error messages

Change-Id: I3317012befe454654429bb5acb8988d4e7ccfb5a

7 years agoMerge "Enable additional balancer tests (those starting with `<!DOCTYPE html>`)"
jenkins-bot [Thu, 21 Jul 2016 17:27:59 +0000 (17:27 +0000)]
Merge "Enable additional balancer tests (those starting with `<!DOCTYPE html>`)"

7 years agoMerge "Support <textarea> tags in Balancer."
jenkins-bot [Thu, 21 Jul 2016 17:26:59 +0000 (17:26 +0000)]
Merge "Support <textarea> tags in Balancer."

7 years agoFix @covers tag in BalancerTest
Kunal Mehta [Thu, 21 Jul 2016 06:49:37 +0000 (23:49 -0700)]
Fix @covers tag in BalancerTest

Causes failures like
<https://integration.wikimedia.org/ci/job/mediawiki-core-code-coverage/2149/console>

Change-Id: I4a3498b88f203b97639fdd248316fef1058f9ddc

7 years agoAdd AutoCommitUpdate class and replace some onTransactionIdle callers
Aaron Schulz [Tue, 19 Jul 2016 20:43:17 +0000 (13:43 -0700)]
Add AutoCommitUpdate class and replace some onTransactionIdle callers

* This puts the complex logic here after the commit step for
  all DBs, making the main multi-DB transaction more likely
  to be atomic.
* Made some cleanups to AtomicSectionUpdate and made it cancel
  if the transaction is rolled back as it should.
* Also cleaned up some closures for PHP 5.4.

Change-Id: If2f7bb6b1ba6daf1cfdc934f27c32b0b10431a3d

7 years agoMerge "Add Unicode to ICU mappings for versions 51-57"
jenkins-bot [Thu, 21 Jul 2016 05:23:22 +0000 (05:23 +0000)]
Merge "Add Unicode to ICU mappings for versions 51-57"

7 years agoMerge "Support tokenizing simple HTML comments in the Balancer."
jenkins-bot [Thu, 21 Jul 2016 05:08:55 +0000 (05:08 +0000)]
Merge "Support tokenizing simple HTML comments in the Balancer."

7 years agoAdd missing file locks to deleteArchivedFiles.php
Aaron Schulz [Thu, 21 Jul 2016 05:05:59 +0000 (22:05 -0700)]
Add missing file locks to deleteArchivedFiles.php

Change-Id: I512ce5a1a4f00039fbe26f1c5cd1aec655eea263

7 years agoMerge "Update wikimedia/wrappedstring to v2.2.0"
jenkins-bot [Thu, 21 Jul 2016 05:05:03 +0000 (05:05 +0000)]
Merge "Update wikimedia/wrappedstring to v2.2.0"

7 years agoEnable additional balancer tests (those starting with `<!DOCTYPE html>`)
C. Scott Ananian [Fri, 15 Jul 2016 23:20:07 +0000 (19:20 -0400)]
Enable additional balancer tests (those starting with `<!DOCTYPE html>`)

Change-Id: Ie854cf99f7e72bcca1bb8565ace558a43dcb6379

7 years agoSupport <textarea> tags in Balancer.
C. Scott Ananian [Fri, 15 Jul 2016 22:46:14 +0000 (18:46 -0400)]
Support <textarea> tags in Balancer.

Change-Id: I63c2fd1c343362e49cf3b5a258fc98489744ad68

7 years agoSupport tokenizing simple HTML comments in the Balancer.
C. Scott Ananian [Fri, 15 Jul 2016 16:36:35 +0000 (12:36 -0400)]
Support tokenizing simple HTML comments in the Balancer.

Change-Id: Ib780595b13b7145e99867d16e3c225e6b2b91884

7 years agoSupport <form> tags in Balancer.
C. Scott Ananian [Thu, 14 Jul 2016 22:00:20 +0000 (18:00 -0400)]
Support <form> tags in Balancer.

Change-Id: I893fc231fea71f58449ed426d64ac99fdcb31d9e

7 years agoMerge "Provide onTransaction* callbacks with the transaction result"
jenkins-bot [Thu, 21 Jul 2016 03:09:17 +0000 (03:09 +0000)]
Merge "Provide onTransaction* callbacks with the transaction result"

7 years agoSupport <select> tags in Balancer.
C. Scott Ananian [Thu, 14 Jul 2016 21:00:22 +0000 (17:00 -0400)]
Support <select> tags in Balancer.

Change-Id: Ibc346624a9d035c98a29132a541e7ed6d82b364e

7 years agoProvide onTransaction* callbacks with the transaction result
Aaron Schulz [Thu, 21 Jul 2016 02:32:55 +0000 (19:32 -0700)]
Provide onTransaction* callbacks with the transaction result

This can later be used to cancel certain deferred updates.

Change-Id: Ib6649b6ca400f15ff441531d0fd6aecc3e4619eb

7 years agoMerge "Minor bug fixes to Balancer."
jenkins-bot [Thu, 21 Jul 2016 02:11:45 +0000 (02:11 +0000)]
Merge "Minor bug fixes to Balancer."

7 years agoUpdate wikimedia/wrappedstring to v2.2.0
Timo Tijhof [Thu, 21 Jul 2016 00:54:04 +0000 (01:54 +0100)]
Update wikimedia/wrappedstring to v2.2.0

Depends-On: Ie29b3a362ecbda988d93eb3c49fbca70a786ac05
Change-Id: I9c6857616950d18d90d53a6752d98f7ac3db20ad

7 years agoresourceloader: Make createLoaderQuery() protected
Timo Tijhof [Wed, 20 Jul 2016 19:47:43 +0000 (20:47 +0100)]
resourceloader: Make createLoaderQuery() protected

Only used once in this class. Nowhere else in Wikimedia Git.

Change-Id: I190bde79cc72dc40af4ccdd51f0e473003ba39b9

7 years agoresourceloader: Remove deprecated ResourceLoader::makeLoaderURL()
Timo Tijhof [Wed, 20 Jul 2016 19:43:54 +0000 (20:43 +0100)]
resourceloader: Remove deprecated ResourceLoader::makeLoaderURL()

Deprecated since MediaWiki 1.24. Not used anywhere in Wikimedia Git.

Change-Id: I9d9b356fd61f13112e85cbe659b337ecb3c92088

7 years agoMerge "Title::getLinkURL(): Allow expanding PROTO_RELATIVE too"
jenkins-bot [Wed, 20 Jul 2016 21:56:21 +0000 (21:56 +0000)]
Merge "Title::getLinkURL(): Allow expanding PROTO_RELATIVE too"

7 years agoProfileStub: Remove getCurrentSection(), unused
Chad Horohoe [Wed, 20 Jul 2016 20:18:27 +0000 (13:18 -0700)]
ProfileStub: Remove getCurrentSection(), unused

No callers, no implementations in other Profiler classes

Change-Id: I5b5364d5b40964944e1595056b4c292610fcdf36

7 years agoMerge "Add $direct parameter to UserLoginComplete hook"
jenkins-bot [Wed, 20 Jul 2016 20:29:57 +0000 (20:29 +0000)]
Merge "Add $direct parameter to UserLoginComplete hook"

7 years agoMerge "Simplify lock release in LinksDeletionUpdate"
jenkins-bot [Wed, 20 Jul 2016 20:12:26 +0000 (20:12 +0000)]
Merge "Simplify lock release in LinksDeletionUpdate"

7 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Wed, 20 Jul 2016 20:09:34 +0000 (20:09 +0000)]
Merge "Localisation updates from https://translatewiki.net."

7 years agoMerge "Convert SiteStatsUpdate to using newer addCallableUpdate method"
jenkins-bot [Wed, 20 Jul 2016 20:09:15 +0000 (20:09 +0000)]
Merge "Convert SiteStatsUpdate to using newer addCallableUpdate method"

7 years agoMerge "Move updateNotificationTimestamp callback to DeferredUpdates"
jenkins-bot [Wed, 20 Jul 2016 20:03:25 +0000 (20:03 +0000)]
Merge "Move updateNotificationTimestamp callback to DeferredUpdates"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 20 Jul 2016 20:03:24 +0000 (22:03 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I3f97a063700597ee00037cdbcbd5a77e8951f8df

7 years agoMerge "Fix coverage annotations"
jenkins-bot [Wed, 20 Jul 2016 19:59:20 +0000 (19:59 +0000)]
Merge "Fix coverage annotations"

7 years agoMerge "Update and reformat docs/distributors.txt"
jenkins-bot [Wed, 20 Jul 2016 19:54:30 +0000 (19:54 +0000)]
Merge "Update and reformat docs/distributors.txt"

7 years agoAdd Unicode to ICU mappings for versions 51-57
Reedy [Wed, 20 Jul 2016 19:47:22 +0000 (20:47 +0100)]
Add Unicode to ICU mappings for versions 51-57

Change-Id: I35c2cdd2c56b491229f1f6d8b69b1de21af23aab

7 years agoUpdate and reformat docs/distributors.txt
Max Semenik [Wed, 20 Jul 2016 06:14:57 +0000 (23:14 -0700)]
Update and reformat docs/distributors.txt

Change-Id: If9454ce170f3c46dbed89c3e542fcd5eb2b68103

7 years agoMerge "Exclude duplicate srcset urls"
jenkins-bot [Wed, 20 Jul 2016 17:39:56 +0000 (17:39 +0000)]
Merge "Exclude duplicate srcset urls"

7 years agoobjectcache: Fix RESTBagOStuff class doc
Timo Tijhof [Wed, 20 Jul 2016 16:38:36 +0000 (17:38 +0100)]
objectcache: Fix RESTBagOStuff class doc

Currently renders slightly broken since a single line break
is ignored in Markdown (Doxygen parses these as Markdown).

Change-Id: Ibdff93e103f98b7bd8d3ef9118f246fedab288cf

7 years agoDo not collate "ا" and "و" in Persian language for category sort
Amir Sarabadani [Wed, 20 Jul 2016 13:05:12 +0000 (17:35 +0430)]
Do not collate "ا" and "و" in Persian language for category sort

Bug: T139110
Change-Id: If174e02160c954500233e3a57945e267f2b4ae29

7 years agoAdd $direct parameter to UserLoginComplete hook
Gergő Tisza [Wed, 20 Jul 2016 00:25:12 +0000 (17:25 -0700)]
Add $direct parameter to UserLoginComplete hook

This will help to differentiate between actual login and visiting
the login page while already logged in.

Bug: T140853
Change-Id: If8582ff61aee62b1d424e473b230ca883ddb6d05

7 years agoApiPurge: Do not die on non content pages
umherirrender [Tue, 19 Jul 2016 16:15:13 +0000 (18:15 +0200)]
ApiPurge: Do not die on non content pages

Some pages seems to have page_latest = 0, and therefore no content to
linkupdate. To not get a BadMethodCallException (see T140514) there is a
null checked needed.

Change-Id: I1ebfcf131ad3f59f38ec2583650eba5b43bac999

7 years agoMerge "Add a test for entity expansion OOM in XmlTypeCheck"
jenkins-bot [Wed, 20 Jul 2016 13:53:39 +0000 (13:53 +0000)]
Merge "Add a test for entity expansion OOM in XmlTypeCheck"

7 years agoExclude duplicate srcset urls
Matthias Mullie [Mon, 18 Jul 2016 12:52:08 +0000 (14:52 +0200)]
Exclude duplicate srcset urls

Bug: T135550
Change-Id: I956dc155426739d60052a0dc77dafdf0414d5bd7

7 years agoFix coverage annotations
Max Semenik [Wed, 20 Jul 2016 06:05:35 +0000 (23:05 -0700)]
Fix coverage annotations

Broken by Id1071fc0647892438e5cd0e3ee621fbdaaa64014
Causes https://integration.wikimedia.org/ci/job/mediawiki-core-code-coverage/2146/console

Change-Id: I9dd0ff7a5fa17c6395dee52ad87faf1f8e612904

7 years agoSiteConfiguration: Remove isLocalVHost(), deprecated since 1.25
Chad Horohoe [Tue, 19 Jul 2016 17:29:43 +0000 (10:29 -0700)]
SiteConfiguration: Remove isLocalVHost(), deprecated since 1.25

No callers anywhere anymore.

Change-Id: I5f85b3cf60a59d28206bf56a0f8e33c812248d5d

7 years agoMove updateNotificationTimestamp callback to DeferredUpdates
Aaron Schulz [Tue, 19 Jul 2016 19:51:57 +0000 (12:51 -0700)]
Move updateNotificationTimestamp callback to DeferredUpdates

* This puts the complex logic here after the commit step for
  all DBs, making the main multi-DB transaction more likely
  to be atomic.
* Also fixed the reuseConnection() call by getting a new
  handle in the callback.

Change-Id: I449a521423ff13bfbf49bdaa6e7e6df2145c8751

7 years agoMerge "Improvements to RefreshLinksJob/DeleteLinksJob locking"
jenkins-bot [Tue, 19 Jul 2016 21:43:17 +0000 (21:43 +0000)]
Merge "Improvements to RefreshLinksJob/DeleteLinksJob locking"

7 years agoMerge "Remove redundant onTransactionIdle() call from WikiPage::doPurge"
jenkins-bot [Tue, 19 Jul 2016 21:10:05 +0000 (21:10 +0000)]
Merge "Remove redundant onTransactionIdle() call from WikiPage::doPurge"

7 years agoConvert SiteStatsUpdate to using newer addCallableUpdate method
Aaron Schulz [Tue, 19 Jul 2016 20:53:51 +0000 (13:53 -0700)]
Convert SiteStatsUpdate to using newer addCallableUpdate method

Change-Id: Ic6037b90edecc936432e997c504e81b3ae8732ad

7 years agoRemove redundant onTransactionIdle() call from WikiPage::doPurge
Aaron Schulz [Tue, 19 Jul 2016 20:51:55 +0000 (13:51 -0700)]
Remove redundant onTransactionIdle() call from WikiPage::doPurge

Change-Id: I18b03ae6d2f865bbe7eb072c68b2648564ec4d6f

7 years agoMerge "Resources: Convert mediawiki.content.json.css to less file"
jenkins-bot [Tue, 19 Jul 2016 20:25:50 +0000 (20:25 +0000)]
Merge "Resources: Convert mediawiki.content.json.css to less file"

7 years agoMerge "HttpFunctions: Move isLocalUrl() into MWHttpRequest and make it private"
jenkins-bot [Tue, 19 Jul 2016 20:11:42 +0000 (20:11 +0000)]
Merge "HttpFunctions: Move isLocalUrl() into MWHttpRequest and make it private"

7 years agoImprovements to RefreshLinksJob/DeleteLinksJob locking
Aaron Schulz [Fri, 15 Jul 2016 20:35:03 +0000 (13:35 -0700)]
Improvements to RefreshLinksJob/DeleteLinksJob locking

* Removed the lockAndGetLatest() call which caused contention problems.
  Previously, job #2 could block on job #1 in that method, then job #1
  yields the row lock to job #2 in LinksUpdate::acquirePageLock() by
  committing, then job #1 blocks on job #2 in updateLinksTimestamp().
  This caused timeout errors. It also is not fully safe ever since
  batching and acquirePageLock() was added.
* Add an outer getScopedLockAndFlush() call to runForTitle() which
  avoids this contention (as well as contention with page edits)
  but still prevents older jobs from clobbering newer jobs. Edits
  can happen concurrently, since they will enqueue a job post-commit
  that will block on the lock.
* Use the same lock in DeleteLinksJob to edit/deletion races.

Change-Id: I9e2d1eefd7cbb3d2f333c595361d070527d6f0c5

7 years agoSimplify lock release in LinksDeletionUpdate
Aaron Schulz [Tue, 19 Jul 2016 20:02:08 +0000 (13:02 -0700)]
Simplify lock release in LinksDeletionUpdate

The callback already flushes/commits the transaction.

Change-Id: I4875fef1434788ee0c689d9fcae6817863a1ba81

7 years agoResources: Convert mediawiki.content.json.css to less file
jdlrobson [Tue, 19 Jul 2016 18:47:59 +0000 (11:47 -0700)]
Resources: Convert mediawiki.content.json.css to less file

Using a LESS file gives us access to variables. In a following patchset
I will need access to the deviceTabletWidth variable to apply some responsive
styles.

Change-Id: I2acffa71fc4fce89c6803c921ea44ae2f908bd77

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 19 Jul 2016 19:58:55 +0000 (21:58 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I3c34f59d50eeaf25272513747769419aa32007dc

7 years agoMerge "resourceloader: Release saveFileDependencies() lock on rollback"
jenkins-bot [Tue, 19 Jul 2016 19:41:43 +0000 (19:41 +0000)]
Merge "resourceloader: Release saveFileDependencies() lock on rollback"

7 years agoresourceloader: Release saveFileDependencies() lock on rollback
Aaron Schulz [Tue, 19 Jul 2016 18:34:25 +0000 (11:34 -0700)]
resourceloader: Release saveFileDependencies() lock on rollback

Change-Id: Iffa42c8214af4e17285c411795b46d1fe2708285

7 years agoMerge "Only store currently-existing categories in the categories table"
jenkins-bot [Tue, 19 Jul 2016 19:26:56 +0000 (19:26 +0000)]
Merge "Only store currently-existing categories in the categories table"

7 years agoMerge "Added Range support to FileBackend::streamFile()"
Brion VIBBER [Tue, 19 Jul 2016 19:20:12 +0000 (19:20 +0000)]
Merge "Added Range support to FileBackend::streamFile()"

7 years agoHttpFunctions: Move isLocalUrl() into MWHttpRequest and make it private
Chad Horohoe [Tue, 19 Jul 2016 18:01:28 +0000 (11:01 -0700)]
HttpFunctions: Move isLocalUrl() into MWHttpRequest and make it private

Nothing else calls this, and it really shouldn't be used except for
determining if a request should be proxied.

While we're here, actually support HTTPS.

Change-Id: I5edf47f75ebb7c1705d0c406ee7d19425f348eb4

7 years agoRemove support for getenv('http_proxy') in MediaWiki
Chad Horohoe [Tue, 19 Jul 2016 15:20:43 +0000 (08:20 -0700)]
Remove support for getenv('http_proxy') in MediaWiki

PHP (and other programming languages) are vulnerable to an exploit
when making external requests via a proxy when a client provides a
Proxy header. See https://httpoxy.org/ for more information.

MediaWiki now requires $wgHTTPProxy to be set when attempting to
use a proxy for requests and can no longer rely on http_proxy
environment variables. As it exists, this code is inherently unsafe
on case-insensitive platforms (eg: Windows) and hard to be sure of
for other platforms.

All users using a proxy for MediaWiki and *not* setting $wgHTTPProxy
are advised to do so immediately to mitigate this problem. This will
be required as of the next security release.

All extensions maintained in Git/Gerrit appear to be Doing The Right
Thing and not trying to use getenv('http_proxy') directly. This would
be a bad thing to start doing. Call Http::getProxy() if you need to
manually get a proxy from MW for external requests.

Bug: T140658
Change-Id: I122583ad98d867c5855c3e2f955fe47787668589

7 years agoMerge "Follow-up 83ec590: Add new updateExtensionJsonSchema to autoload"
jenkins-bot [Tue, 19 Jul 2016 03:11:43 +0000 (03:11 +0000)]
Merge "Follow-up 83ec590: Add new updateExtensionJsonSchema to autoload"

7 years agoAdded GTID support to slave lag methods
Aaron Schulz [Sat, 21 May 2016 00:26:08 +0000 (17:26 -0700)]
Added GTID support to slave lag methods

The IDs will be included in MySQLMasterPos objects and,
if specified by config, in slave lag wait methods.

Bug: T135027
Change-Id: I1dfc0210b715b449ec07760c712d0267763f2697

7 years agoMerge "Sync up with Parsoid parserTests."
jenkins-bot [Tue, 19 Jul 2016 01:15:08 +0000 (01:15 +0000)]
Merge "Sync up with Parsoid parserTests."

7 years agoSync up with Parsoid parserTests.
Arlo Breault [Tue, 19 Jul 2016 00:59:57 +0000 (17:59 -0700)]
Sync up with Parsoid parserTests.

This now aligns with Parsoid commit 36075c7fc242ad2fd7bba05661606722ebda49aa

Change-Id: I5bbf1c0a1e9602983024ce30eb28a33648246b3c

7 years agoMerge "ContribsPager: Disallow looking too far in the past for 'newbies' queries"
jenkins-bot [Tue, 19 Jul 2016 00:24:18 +0000 (00:24 +0000)]
Merge "ContribsPager: Disallow looking too far in the past for 'newbies' queries"

7 years agoMerge "Truncate gallery caption filenames with CSS"
jenkins-bot [Mon, 18 Jul 2016 23:39:30 +0000 (23:39 +0000)]
Merge "Truncate gallery caption filenames with CSS"

7 years agoFollow-up 83ec590: Add new updateExtensionJsonSchema to autoload
James D. Forrester [Mon, 18 Jul 2016 22:20:40 +0000 (15:20 -0700)]
Follow-up 83ec590: Add new updateExtensionJsonSchema to autoload

Change-Id: Ibf61cf36c094ac192b6a7f9aa010659a12e5c5bb

7 years agoMerge "Update BatchRowIterator constructor to allow multiple tables"
jenkins-bot [Mon, 18 Jul 2016 22:06:14 +0000 (22:06 +0000)]
Merge "Update BatchRowIterator constructor to allow multiple tables"