lhc/web/wiklou.git
7 years agoDo not output invalid links for deleted names on Special:Contributions
Matěj Suchánek [Sat, 25 Feb 2017 15:01:34 +0000 (15:01 +0000)]
Do not output invalid links for deleted names on Special:Contributions

Steps to reproduce:
- have advanced user rights and go to Special:Contributions
- choose "Show contributions of new accounts only" and "Deleted only"
- examine rows with deleted user names, marked with
  "[username or IP address removed - edit hidden from contributions]"

All these rows have a red "(talk)" link which links to "User talk:"
(that's all). More detailed examination reveals an empty <a> element
which is supposed to link to the user page.

As these rows have the mentioned marker, we can just skip generating
user link if the user name is hidden.

Change-Id: I4fc7fb7ad2836834e9436ca2acb6b12484c15172

7 years agoMerge "Move wpSummary from shared.css to mediawiki.action.edit.styles.css"
jenkins-bot [Sat, 25 Feb 2017 10:56:31 +0000 (10:56 +0000)]
Merge "Move wpSummary from shared.css to mediawiki.action.edit.styles.css"

7 years agoRCFilters UI: Scroll the capsule to the top of the screen
Moriel Schottlender [Fri, 24 Feb 2017 23:02:49 +0000 (15:02 -0800)]
RCFilters UI: Scroll the capsule to the top of the screen

When the popup shows up, scroll the capsule widget to the top of
the screen.

Change-Id: I5366a8a0918bda0aabe1c97db252278c36a89347

7 years agoMerge "Log a backtrace from the culprit location if headers were already sent"
jenkins-bot [Fri, 24 Feb 2017 22:41:45 +0000 (22:41 +0000)]
Merge "Log a backtrace from the culprit location if headers were already sent"

7 years agoMerge "Use Database::addQuotes instead of hard coded apostrophs"
jenkins-bot [Fri, 24 Feb 2017 20:56:22 +0000 (20:56 +0000)]
Merge "Use Database::addQuotes instead of hard coded apostrophs"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 24 Feb 2017 20:55:20 +0000 (21:55 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia8e467b3f295184a8abb3737d3949994078bbba3

7 years agoMerge "Better punctuation in apiwarn-toomanyvalues"
jenkins-bot [Fri, 24 Feb 2017 14:49:31 +0000 (14:49 +0000)]
Merge "Better punctuation in apiwarn-toomanyvalues"

7 years agoMerge "Improve logging of exceptions which are not thrown but attached to context"
jenkins-bot [Fri, 24 Feb 2017 12:04:19 +0000 (12:04 +0000)]
Merge "Improve logging of exceptions which are not thrown but attached to context"

7 years agoMerge "Move remaining LoadBalancer classes to Rdbms"
jenkins-bot [Fri, 24 Feb 2017 05:25:29 +0000 (05:25 +0000)]
Merge "Move remaining LoadBalancer classes to Rdbms"

7 years agoMove remaining LoadBalancer classes to Rdbms
Aaron Schulz [Sat, 18 Feb 2017 00:26:47 +0000 (16:26 -0800)]
Move remaining LoadBalancer classes to Rdbms

The old names are left as aliases.

Change-Id: I52a327f2463a2ba7437324047b5b00d28cd1d758

7 years agoinstaller: Fix "relation 'user' does not exist" error for Postgres
Timo Tijhof [Fri, 24 Feb 2017 03:39:03 +0000 (19:39 -0800)]
installer: Fix "relation 'user' does not exist" error for Postgres

On Travis CI, the Postgres build has been failing very early on
in the installer (before phpunit) due to a database error:

> Creating administrator user account.. DBQueryError at Database.php:1059
> Query: SELECT user_id FROM "user" WHERE user_name = 'Admin' LIMIT 1
> Function: User::idForName
> Error: 42P01 ERROR:  relation "user" does not exist
> LINE 1: SELECT /* User::idForName  */ user_id FROM "user" ...

This is because the installer makes its own Database object without
involving ServiceWiring or MWLBFactory, which means wgDBport and
(more importantly) 'keywordTableMap' don't get applied.

While keywordTableMap doesn't matter during the database installation,
after the installer is done updating GlobalVarConfig and resetting
MediaWikiServices, DatabaseInstaller::enableLB takes that homemade
connection and injects it into MediaWikiServices by redefining
the 'DBLoadBalancerFactory' service. Which then affects all use
of wfGetDB(), such as from User::idForName().

Bug: T30162
Bug: T75174
Bug: T75176
Change-Id: I7af58c4beffc4908a93c0c1d8ab1aec9d4ec57c6

7 years agobuild: Simplify Travis configuration
Timo Tijhof [Fri, 24 Feb 2017 03:33:32 +0000 (19:33 -0800)]
build: Simplify Travis configuration

* Remove redundant 'group: edge'. Use the default (stable) instead.
* Use simplified syntax for apt packages. On sudo-enabled VMs, like we
  use now, this translates to the same command. But has the benefit
  of being compatible with the fast non-sudo containers, which we
  want to use in the future. But, for that, djvulibre-bin needs to
  be approved first.
  <https://github.com/travis-ci/apt-package-whitelist/issues/4036>

Bug: T75176
Change-Id: I3b42763ef3f8f08eec08a9008e5cf1e161bb1dff

7 years agobuild: Change Travis postgres user "root" back to "travis"
Timo Tijhof [Fri, 24 Feb 2017 03:31:12 +0000 (19:31 -0800)]
build: Change Travis postgres user "root" back to "travis"

Follows-up 5168cb60f8f, in which we moved from Precise vms to Trusty vms.
As a side-effect, the undocumented behaviour of the mysql user "travis"
having create-db rights was no longer. As such, we changed it to "root",
per <https://docs.travis-ci.com/user/database-setup/>.

However, this broke Postgres builds since those should still use
"travis". There is no user named "root" for postgres.

* Add 'dbuser' to the matrix environment.
* Improve inline documentation.

Bug: T75176
Change-Id: I09fc0a1da8737e71b3d2b4b88d72b58c150519c4

7 years agoMerge "RCFilters UI: Add 'direction' property to the wrapper"
jenkins-bot [Fri, 24 Feb 2017 01:28:14 +0000 (01:28 +0000)]
Merge "RCFilters UI: Add 'direction' property to the wrapper"

7 years agoMerge "Drop in replacement of eval.php based on psysh"
jenkins-bot [Fri, 24 Feb 2017 01:20:16 +0000 (01:20 +0000)]
Merge "Drop in replacement of eval.php based on psysh"

7 years agoRCFilters UI: Add 'direction' property to the wrapper
Moriel Schottlender [Sat, 11 Feb 2017 02:37:55 +0000 (18:37 -0800)]
RCFilters UI: Add 'direction' property to the wrapper

Adds 'direction: ltr' to the entire interface, rather than just
the input, since the entire FilterWrapperWidget is interface-direction
and not content direction.

Bug: T157189
Change-Id: I94ccfea878d83a24e071696b9c4e58115c9295c9

7 years agoMerge "RCFilters UI: Style the 'old' RC option fieldset"
jenkins-bot [Fri, 24 Feb 2017 01:09:39 +0000 (01:09 +0000)]
Merge "RCFilters UI: Style the 'old' RC option fieldset"

7 years agoMerge "RCFilters: Align trash icon with filter list"
jenkins-bot [Fri, 24 Feb 2017 01:01:58 +0000 (01:01 +0000)]
Merge "RCFilters: Align trash icon with filter list"

7 years agoMerge "RCFilters UI: Reassess interaction after resetting filters"
jenkins-bot [Fri, 24 Feb 2017 00:57:38 +0000 (00:57 +0000)]
Merge "RCFilters UI: Reassess interaction after resetting filters"

7 years agoRCFilters UI: Style the 'old' RC option fieldset
Moriel Schottlender [Thu, 23 Feb 2017 19:21:19 +0000 (11:21 -0800)]
RCFilters UI: Style the 'old' RC option fieldset

Bug: T158006
Change-Id: I230dc9095e41abf32e95adc68c40265b53a5f698

7 years agoMerge "RCFilters UI: Stop mousedown propagation when capsule item 'x' button is clicked"
jenkins-bot [Fri, 24 Feb 2017 00:54:55 +0000 (00:54 +0000)]
Merge "RCFilters UI: Stop mousedown propagation when capsule item 'x' button is clicked"

7 years agoMerge "RCFilters UI: Fix mute state styling"
jenkins-bot [Fri, 24 Feb 2017 00:54:47 +0000 (00:54 +0000)]
Merge "RCFilters UI: Fix mute state styling"

7 years agoMerge "RCFilters UI: Fix CapsuleItemWidget popup styling"
jenkins-bot [Fri, 24 Feb 2017 00:48:26 +0000 (00:48 +0000)]
Merge "RCFilters UI: Fix CapsuleItemWidget popup styling"

7 years agoRCFilters: Align trash icon with filter list
Moriel Schottlender [Thu, 23 Feb 2017 23:39:27 +0000 (15:39 -0800)]
RCFilters: Align trash icon with filter list

Bug: T149391
Change-Id: Icf867bf572253d288602f00890551909d869a459

7 years agoRCFilters UI: Fix mute state styling
Moriel Schottlender [Thu, 23 Feb 2017 23:59:51 +0000 (15:59 -0800)]
RCFilters UI: Fix mute state styling

For some reason it stopped styling muted state in filterItemWidgets
Also adjusted the styling to be more similar to the prototype.

Bug: T156429
Change-Id: Ib043729ab7cfd32253d9424b145794e484ec11b6

7 years agoRCFilters UI: Stop mousedown propagation when capsule item 'x' button is clicked
Moriel Schottlender [Thu, 23 Feb 2017 21:52:49 +0000 (13:52 -0800)]
RCFilters UI: Stop mousedown propagation when capsule item 'x' button is clicked

We don't want the parent (the CapsuleMultiselectWidget) to receieve
the mousedown event, because it then uses it to focus and open the
popup.

Bug: T158006
Change-Id: I1ae9b58b723a70cc150392224196bdb67ebf30b4

7 years agoRCFilters UI: Reassess interaction after resetting filters
Moriel Schottlender [Thu, 23 Feb 2017 18:06:58 +0000 (10:06 -0800)]
RCFilters UI: Reassess interaction after resetting filters

Both resetting to defaults or resetting to no-filters state should
retrigger the interaction assessment so all filters should get their
included, fullyCovered and conflicted states resetted.

Bug: T158135
Change-Id: Iae23129b7fb378adb712b34e8e64208bbb70ccd7

7 years agoMerge "mw.loader: Adding comment explaining MODULE_SIZE_MAX"
jenkins-bot [Thu, 23 Feb 2017 22:23:24 +0000 (22:23 +0000)]
Merge "mw.loader: Adding comment explaining MODULE_SIZE_MAX"

7 years agoRCFilters UI: Fix CapsuleItemWidget popup styling
Moriel Schottlender [Thu, 23 Feb 2017 22:19:43 +0000 (14:19 -0800)]
RCFilters UI: Fix CapsuleItemWidget popup styling

Bug: T158006
Change-Id: I83f72273bc5bf7bd9548d60efd094e427ff0e13a

7 years agoMerge "Folowup I341c3f7c: Fire wikipage.content with the correct content"
jenkins-bot [Thu, 23 Feb 2017 22:11:34 +0000 (22:11 +0000)]
Merge "Folowup I341c3f7c: Fire wikipage.content with the correct content"

7 years agomw.loader: Adding comment explaining MODULE_SIZE_MAX
Kaldari [Thu, 23 Feb 2017 21:44:03 +0000 (13:44 -0800)]
mw.loader: Adding comment explaining MODULE_SIZE_MAX

This informaiton was lost in Iedde8a3.

Change-Id: Ib884f3504c2a98537b919f78a043ae0b64a146cf

7 years agoFolowup I341c3f7c: Fire wikipage.content with the correct content
Moriel Schottlender [Thu, 23 Feb 2017 21:54:41 +0000 (13:54 -0800)]
Folowup I341c3f7c: Fire wikipage.content with the correct content

The content we are getting from the Ajax request can be either a
jQuery or string, which makes the handler of the event break.

Instead, pass in this.$element which already wrapped the response.

Change-Id: I1c1231b1476fb2cbef10231fdd853401ebf02ed3

7 years agoMerge "Add CSS classes for userlinks on SpecialPages"
jenkins-bot [Thu, 23 Feb 2017 21:46:17 +0000 (21:46 +0000)]
Merge "Add CSS classes for userlinks on SpecialPages"

7 years agoMerge "Add class in diff and history links in ChangesList"
jenkins-bot [Thu, 23 Feb 2017 21:31:31 +0000 (21:31 +0000)]
Merge "Add class in diff and history links in ChangesList"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 23 Feb 2017 21:10:50 +0000 (22:10 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I9ec22e1e404d411a90c52c316519c29322c6c412

7 years agoMerge "RCFilters UI: Highlight behavior"
jenkins-bot [Thu, 23 Feb 2017 19:41:11 +0000 (19:41 +0000)]
Merge "RCFilters UI: Highlight behavior"

7 years agoMerge "phpunit: Fix AvroFormatterTest failure on PHP 7"
jenkins-bot [Thu, 23 Feb 2017 19:25:16 +0000 (19:25 +0000)]
Merge "phpunit: Fix AvroFormatterTest failure on PHP 7"

7 years agoRCFilters UI: Highlight behavior
Stephane Bisson [Fri, 10 Feb 2017 14:18:02 +0000 (09:18 -0500)]
RCFilters UI: Highlight behavior

Let there be highlight! and there were highlights
And RCFilters separated the highlight from the darkness
And it defined highlights as five colors
The lights are called yellow and green, and the darks red and blue
And there were colors and there were circles; one highlight.

This is the commit that adds highlight support for filters both in the backend
and the UI. The backend tags results based on which filter they fit and the
front end paints those results according to the color chosen by the user.
Highlights can be toggled off and on.

Also added circle indicators to the capsule items and each line of results
to indicate whether the line has more than one color affecting it.

Bug: T149467
Bug: T156164
Change-Id: I341c3f7c224271a18d455b9e5f5457ec43de802d

7 years agoMerge "De-italicise placeholder text"
jenkins-bot [Thu, 23 Feb 2017 18:51:32 +0000 (18:51 +0000)]
Merge "De-italicise placeholder text"

7 years agoMerge "SearchFormWidget: Move hidden fields below the ActionFieldLayout"
jenkins-bot [Thu, 23 Feb 2017 18:51:26 +0000 (18:51 +0000)]
Merge "SearchFormWidget: Move hidden fields below the ActionFieldLayout"

7 years agoMerge "build: Enable selector-list-comma-newline-after stylelint rule"
jenkins-bot [Thu, 23 Feb 2017 17:06:52 +0000 (17:06 +0000)]
Merge "build: Enable selector-list-comma-newline-after stylelint rule"

7 years agoSearchFormWidget: Move hidden fields below the ActionFieldLayout
Bartosz Dziewoński [Thu, 23 Feb 2017 17:02:29 +0000 (18:02 +0100)]
SearchFormWidget: Move hidden fields below the ActionFieldLayout

I think ideally, these would be at the end of the form, but there
are some hooks below which can produce arbitrary HTML and potentially
want to override these with their own fields, so I'm avoiding any
revolutionary changes to the field order here.

Bug: T158856
Change-Id: I377c0061a365930e11454a86c1e0926853789b55

7 years agoMerge "Make generic placeholder pseudo-class browser-prefix mixin"
jenkins-bot [Thu, 23 Feb 2017 16:20:38 +0000 (16:20 +0000)]
Merge "Make generic placeholder pseudo-class browser-prefix mixin"

7 years agoDe-italicise placeholder text
Ed Sanders [Mon, 20 Feb 2017 15:04:37 +0000 (15:04 +0000)]
De-italicise placeholder text

For consistency with OOUI & the search bar, and to avoid
issues with CJK languages.

Bug: T147808
Change-Id: I81555ceb52535f68f057ec35fc1257206a5aa8eb

7 years agoMake generic placeholder pseudo-class browser-prefix mixin
Ed Sanders [Mon, 20 Feb 2017 14:31:26 +0000 (14:31 +0000)]
Make generic placeholder pseudo-class browser-prefix mixin

Change-Id: I96686bb53cee1a833db8f4d0b691d5e4a1b82885

7 years agoMerge "Revert "Temporary hax to hide cawiki's hacked in search sidebar""
jenkins-bot [Thu, 23 Feb 2017 15:28:42 +0000 (15:28 +0000)]
Merge "Revert "Temporary hax to hide cawiki's hacked in search sidebar""

7 years agoMerge "Follow-up I96d2225: Adding white background color to framed images in Parsoid"
jenkins-bot [Thu, 23 Feb 2017 14:27:38 +0000 (14:27 +0000)]
Merge "Follow-up I96d2225: Adding white background color to framed images in Parsoid"

7 years agobuild: Enable selector-list-comma-newline-after stylelint rule
Volker E [Tue, 21 Feb 2017 07:08:12 +0000 (23:08 -0800)]
build: Enable selector-list-comma-newline-after stylelint rule

Enabling selector-list-comma-newline-after stylelint rule and
making it pass.

Change-Id: I8fa3fbe03fcce57d555c47f39361c2a8d9828c3c

7 years agoFollow-up I96d2225: Adding white background color to framed images in Parsoid
Ed Sanders [Thu, 23 Feb 2017 13:08:30 +0000 (13:08 +0000)]
Follow-up I96d2225: Adding white background color to framed images in Parsoid

Bug: T154077
Change-Id: Ie6fd4f5b995f79d6c48ff95f091c88b9c67f13e8

7 years agophpunit: Fix AvroFormatterTest failure on PHP 7
Timo Tijhof [Thu, 23 Feb 2017 04:47:46 +0000 (20:47 -0800)]
phpunit: Fix AvroFormatterTest failure on PHP 7

Fix the following error on PHP 7.

> MediaWiki\Logger\Monolog\AvroFormatterTest::testDoesSomethingWhenSchemaAvailable
> Only variables should be passed by reference
> includes/debug/logger/monolog/AvroFormatter.php:143

Per https://github.com/researchgate/avro-php/blob/1.8.0/lib/avro/schema.php#L311-L314
the default for &$schemata is null, which is filled with a plain AvroNamedSchemata
instance. So this parameter is obsolete.

Either it needs to be assigned here and then passed. But since we don't use
it anywhere and don't pass it any constructor arguments, the default
should suffice.

Bug: T75176
Bug: T141588
Change-Id: I144bed8a78eb267a97e41f379b89c5faaae30625

7 years agobuild: Change Travis image from precise to trusty (Fix HHVM build)
Timo Tijhof [Thu, 23 Feb 2017 04:31:56 +0000 (20:31 -0800)]
build: Change Travis image from precise to trusty (Fix HHVM build)

Follows-up 67737a267f.

Per <https://docs.travis-ci.com/user/languages/php#HHVM-versions-on-Trusty>
using hhvm-3.12 requires a trusty image. The upstream source at
<http://dl.hhvm.com/ubuntu/dists/> doesn't provide it for precise.

In addition to changing to trusty, we also need to:
* Set 'sudo: required' and 'group: edge'.
  Because lightweight "sudo: false" containers are still
  precise-only. There is a beta test and I tried it, but it
  doesn't support out apt-get install commands yet.

* Change mysql user from 'travis' to 'root'.
  The fact that 'travis' supports creating databases on precise
  is undocumented. One is supposed to use 'root' for this,
  which is required on Trusty.
  <https://docs.travis-ci.com/user/database-setup/#MySQL>
  Without this, install.php fails.

More details at <https://github.com/travis-ci/travis-ci/issues/7368>.

This config was tested and passed at
<https://travis-ci.org/Krinkle/mediawiki/jobs/204463664>.

Bug: T75175
Change-Id: Ic59936734211b68d9701119a551d3bd1b83c845e

7 years agoLog a backtrace from the culprit location if headers were already sent
Tim Starling [Mon, 20 Feb 2017 05:29:54 +0000 (16:29 +1100)]
Log a backtrace from the culprit location if headers were already sent

Install the backtrace collector very early, so that we can get the
backtrace even if headers were sent from LocalSettings.php.

Bug: T157392
Change-Id: I9bc732b34481c95afb5362e135a87bd4302498e2

7 years agoMerge "GallerySlideshow: Always set image height, adjust according to caption size"
jenkins-bot [Thu, 23 Feb 2017 02:51:53 +0000 (02:51 +0000)]
Merge "GallerySlideshow: Always set image height, adjust according to caption size"

7 years agoMerge "release-notes: Add Moment.js update"
jenkins-bot [Thu, 23 Feb 2017 02:38:15 +0000 (02:38 +0000)]
Merge "release-notes: Add Moment.js update"

7 years agoMerge "qunit: Make eslint config pass on qunit test files"
jenkins-bot [Thu, 23 Feb 2017 02:34:51 +0000 (02:34 +0000)]
Merge "qunit: Make eslint config pass on qunit test files"

7 years agoMerge "qunit: Minor clean up in various tests"
jenkins-bot [Thu, 23 Feb 2017 02:31:13 +0000 (02:31 +0000)]
Merge "qunit: Minor clean up in various tests"

7 years agoGallerySlideshow: Always set image height, adjust according to caption size
Prateek Saxena [Tue, 24 Jan 2017 09:43:56 +0000 (15:13 +0530)]
GallerySlideshow: Always set image height, adjust according to caption size

When the size of the caption changes (for example one word vs four lines) the
content below jumps because of the space the caption is taking.

We now adjust the height of the image based on the height of the caption to
avoid jumping.

Bug: T140596
Change-Id: I567652ff8b1483cef474493dd5bd790e95288b30

7 years agoMerge "build: Update HHVM for Travis to 3.12"
jenkins-bot [Thu, 23 Feb 2017 02:30:06 +0000 (02:30 +0000)]
Merge "build: Update HHVM for Travis to 3.12"

7 years agoMerge "Remove duplicate test"
jenkins-bot [Thu, 23 Feb 2017 02:10:12 +0000 (02:10 +0000)]
Merge "Remove duplicate test"

7 years agoAdd CSS classes for userlinks on SpecialPages
Eddie Greiner-Petter [Fri, 17 Feb 2017 12:59:16 +0000 (13:59 +0100)]
Add CSS classes for userlinks on SpecialPages

On Special:Watchlist, Special:Contributions, Special:Recentchanges etc.
there are links to (talk | contribs | block) for the user who did the
contribution. Add CSS class for them. Introduce the following css
classes:
- mw-usertoollinks-contribs
- mw-usertoollinks-talk
- mw-usertoollinks-block
- mw-usertoollinks-mail

Bug: T156879
Change-Id: I85a3b0987a016ff25026f1c047214a31170b0452

7 years agoMerge "qunit: Remove obsolete jshint/jscs options"
jenkins-bot [Thu, 23 Feb 2017 01:49:47 +0000 (01:49 +0000)]
Merge "qunit: Remove obsolete jshint/jscs options"

7 years agorelease-notes: Add Moment.js update
Timo Tijhof [Thu, 23 Feb 2017 01:40:33 +0000 (17:40 -0800)]
release-notes: Add Moment.js update

Follows-up f13a0d952.

Change-Id: Ib4692310c8abee8f6b1f69c664b373f4ea83e2dc

7 years agoMerge "mediawiki.api: Tweak deprecation logging again"
jenkins-bot [Thu, 23 Feb 2017 01:29:01 +0000 (01:29 +0000)]
Merge "mediawiki.api: Tweak deprecation logging again"

7 years agoRevert "Temporary hax to hide cawiki's hacked in search sidebar"
Krinkle [Thu, 23 Feb 2017 01:00:22 +0000 (01:00 +0000)]
Revert "Temporary hax to hide cawiki's hacked in search sidebar"

This reverts commit e77dbd78ab869b0db672801bca9be445c302d262.

Bug: T149806
Change-Id: Iffdd1b86c0873f3359d7134053cc09dfc19bdc56

7 years agomediawiki.api: Tweak deprecation logging again
Bartosz Dziewoński [Wed, 22 Feb 2017 23:46:40 +0000 (00:46 +0100)]
mediawiki.api: Tweak deprecation logging again

Follow-up to 15b5dc5d8eecb5a1784b0b7165a90a81e071d750,
9a8e2b7124ed10db3db7f7767d532cde00935876.

Change-Id: Idf9083e81312b97e69ec786d99ea3cc46ba80123

7 years agoMerge "resourceloader: Avoid endless module_deps write for the same value"
jenkins-bot [Wed, 22 Feb 2017 22:46:09 +0000 (22:46 +0000)]
Merge "resourceloader: Avoid endless module_deps write for the same value"

7 years agoMerge "EditPage: Throw exceptions on false contentModel"
jenkins-bot [Wed, 22 Feb 2017 22:38:26 +0000 (22:38 +0000)]
Merge "EditPage: Throw exceptions on false contentModel"

7 years agoresourceloader: Avoid endless module_deps write for the same value
Timo Tijhof [Wed, 22 Feb 2017 21:54:40 +0000 (13:54 -0800)]
resourceloader: Avoid endless module_deps write for the same value

Follows-up 047b60b96d (ref T111481).

The if-condition compared the expanded paths, not the relative paths.
This meant there were two conditions under which the code will perform
a useless write that inserts *literally* the exact same JSON value.

1. The base directory ($IP) changes after a branch upgrade.
2. Paths contain '../', '//' or other unnormalized paths.

The latter caused various Echo and ULS methods to keep writing the
same value because one of their images is referenced in CSS using
'../'. When inserted in the database as relative path and then
expanded again at run-time and compared to the input value, they
don't match ("$IP/foo/../bar.png" != "$IP/bar.png") and cause a write.

Bug: T158813
Change-Id: I223c232d3a8c4337d09ecf7ec6e5cd7cf7effbff

7 years agoMerge "AutoloadGenerator: Add support for class_alias()"
jenkins-bot [Wed, 22 Feb 2017 22:19:08 +0000 (22:19 +0000)]
Merge "AutoloadGenerator: Add support for class_alias()"

7 years agoMerge "Add GENDER to rollback-success message"
jenkins-bot [Wed, 22 Feb 2017 22:01:17 +0000 (22:01 +0000)]
Merge "Add GENDER to rollback-success message"

7 years agoMerge "resourceloader: Optimize WikiModule preload for reqs without wiki modules"
jenkins-bot [Wed, 22 Feb 2017 21:55:34 +0000 (21:55 +0000)]
Merge "resourceloader: Optimize WikiModule preload for reqs without wiki modules"

7 years agoMerge "build: Enable indentation stylelint rule"
jenkins-bot [Wed, 22 Feb 2017 21:51:57 +0000 (21:51 +0000)]
Merge "build: Enable indentation stylelint rule"

7 years agoresourceloader: Optimize WikiModule preload for reqs without wiki modules
Timo Tijhof [Wed, 22 Feb 2017 21:09:06 +0000 (13:09 -0800)]
resourceloader: Optimize WikiModule preload for reqs without wiki modules

Currently it was still going through fetchTitleInfo() with an empty array on
the majority of requests without wiki modules, e.g. load.php?modules=jquery.

Bug: T158813
Change-Id: Ie33a2b4da572bb30b2e7a69db07790724ec2f03f

7 years agoAutoloadGenerator: Add support for class_alias()
Timo Tijhof [Sat, 18 Feb 2017 03:11:33 +0000 (19:11 -0800)]
AutoloadGenerator: Add support for class_alias()

Blob, Field, DatabaseBase are now auto-detected.

Change-Id: Ib8fae2ec3fbb3f5e4aca7965f81631c5f0485ea1

7 years agoMerge "Collation: Allow uppercase letters in UCA collations' names"
jenkins-bot [Wed, 22 Feb 2017 21:18:48 +0000 (21:18 +0000)]
Merge "Collation: Allow uppercase letters in UCA collations' names"

7 years agoAdd GENDER to rollback-success message
Purodha [Wed, 27 Jul 2016 08:41:04 +0000 (08:41 +0000)]
Add GENDER to rollback-success message

Bug: T141250
Change-Id: I99c2b5ad5594b25928ad5bfd3f3a36b19a2c041c

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 22 Feb 2017 20:54:40 +0000 (21:54 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I24babbe571a65242fdef9105b82242729f21f1eb

7 years agoCollation: Allow uppercase letters in UCA collations' names
Bartosz Dziewoński [Wed, 22 Feb 2017 20:17:54 +0000 (21:17 +0100)]
Collation: Allow uppercase letters in UCA collations' names

We have several such collations defined in IcuCollation:

* bs-Cyrl
* de-AT@collation=phonebook
* fr-CA
* sr-Latn

They couldn't actually be used.

Change-Id: I3a62073583c49d3e90910aa8240fe9fcc0682386

7 years agoRemove duplicate test
Arlo Breault [Wed, 22 Feb 2017 19:58:06 +0000 (11:58 -0800)]
Remove duplicate test

Change-Id: If99b0672c631e0428550a73a2a6116394ef32bb9

7 years agoqunit: Make eslint config pass on qunit test files
Timo Tijhof [Wed, 22 Feb 2017 18:46:19 +0000 (10:46 -0800)]
qunit: Make eslint config pass on qunit test files

Follows-up c0fb8a8836, I890e6e49b.

* Disable 'qunit' env in general source code. And re-declare
  locally in the few src files that use it properly.

* Create separate eslint config for tests/qunit with various
  rules disabled (e.g. valid-jsdoc and es3-keywords).

Change-Id: I37ccec2019de55edfee92697eb80478df7cb6220

7 years agoqunit: Minor clean up in various tests
Timo Tijhof [Wed, 22 Feb 2017 18:10:54 +0000 (10:10 -0800)]
qunit: Minor clean up in various tests

Follows-up 5e602c613.

* jquery.byteLimit: Remove redundant setTimeout().
* jquery.byteLimit: Remove unused $elA, $elB variables.
* jquery.hidpi: Actually call bracketedDevicePixelRatio().

Change-Id: I288af22e081385fca6268a87e7b6fe1b27116706

7 years agoqunit: Remove obsolete jshint/jscs options
Timo Tijhof [Wed, 22 Feb 2017 18:06:58 +0000 (10:06 -0800)]
qunit: Remove obsolete jshint/jscs options

Follows-up c0fb8a8836.

Change-Id: I890e6e49b4801667b6eb463efec46a380a27d028

7 years agoUse Database::addQuotes instead of hard coded apostrophs
Umherirrender [Wed, 22 Feb 2017 17:55:56 +0000 (18:55 +0100)]
Use Database::addQuotes instead of hard coded apostrophs

Change-Id: I1404d68d7e2b7fde8f9a76c747bc2be0936f7bef

7 years agoSync up with Parsoid parserTests.txt
Arlo Breault [Wed, 22 Feb 2017 17:10:42 +0000 (09:10 -0800)]
Sync up with Parsoid parserTests.txt

This now aligns with Parsoid commit e23a818554548cd922ee262ea1d8da47ea457248

Change-Id: Ib26b170c51aa4425a54871fa32543b2eef5db41e

7 years agoMerge "qunit: Remove redundant testCount expectation"
jenkins-bot [Wed, 22 Feb 2017 16:23:32 +0000 (16:23 +0000)]
Merge "qunit: Remove redundant testCount expectation"

7 years agoEditPage: Throw exceptions on false contentModel
addshore [Mon, 30 Jan 2017 17:29:00 +0000 (17:29 +0000)]
EditPage: Throw exceptions on false contentModel

contentModel should always have a value here.

Change-Id: Iba2538f383de7da94bd0e0e3eb7d7eca4e6cee7c

7 years agoMerge "Add "redirecció" as translation for the "redirect" keyword"
jenkins-bot [Wed, 22 Feb 2017 07:39:32 +0000 (07:39 +0000)]
Merge "Add "redirecció" as translation for the "redirect" keyword"

7 years agoAdd "redirecció" as translation for the "redirect" keyword
Toni Hermoso Pulido [Tue, 21 Feb 2017 22:32:46 +0000 (23:32 +0100)]
Add "redirecció" as translation for the "redirect" keyword

So that editors etc. prefer it over the Occitan translation.

While at it, remove old non-working bookstore URL.

Change-Id: Iee2c6844b9e324ee7811f337c02ab06b348b651b

7 years agoImprove logging of exceptions which are not thrown but attached to context
Gergő Tisza [Thu, 24 Nov 2016 05:19:05 +0000 (05:19 +0000)]
Improve logging of exceptions which are not thrown but attached to context

Bug: T151290
Change-Id: I9cc9f54c2987cf960343b5eca2a1c6d006b892bf

7 years agoMerge "resourceloader: Fix testMakeModuleResponseError() failure on Travis"
jenkins-bot [Wed, 22 Feb 2017 03:10:29 +0000 (03:10 +0000)]
Merge "resourceloader: Fix testMakeModuleResponseError() failure on Travis"

7 years agoMerge "mediawiki.language: Add unit tests for digit transform table"
jenkins-bot [Wed, 22 Feb 2017 03:10:23 +0000 (03:10 +0000)]
Merge "mediawiki.language: Add unit tests for digit transform table"

7 years agoresourceloader: Fix testMakeModuleResponseError() failure on Travis
Timo Tijhof [Wed, 22 Feb 2017 02:51:45 +0000 (18:51 -0800)]
resourceloader: Fix testMakeModuleResponseError() failure on Travis

> 1) ResourceLoaderTest::testMakeModuleResponseError
> Failed asserting that '[e08c982d974548127cb5d7ce] Fatal exception of type Exception'
> matches PCRE pattern "/Ferry not found/".
> .../ResourceLoaderTest.php:519

This happened on Travis CI, because ResourceLoader::formatException() behaves
differently based on $wgShowExceptionDetails. Which is enabled in Vagrant
and Jenkins, but disabled by default (and thus in Travis CI builds).

Bug: T75176
Change-Id: If15dd03213703b7b6ff899cad5e5569e2515b378

7 years agoMerge "API: Fix ApiMainTest::testExceptionErrors and use $wgShowDBErrorBacktrace"
jenkins-bot [Wed, 22 Feb 2017 01:48:28 +0000 (01:48 +0000)]
Merge "API: Fix ApiMainTest::testExceptionErrors and use $wgShowDBErrorBacktrace"

7 years agoAPI: Fix ApiMainTest::testExceptionErrors and use $wgShowDBErrorBacktrace
Brad Jorsch [Wed, 22 Feb 2017 01:27:17 +0000 (20:27 -0500)]
API: Fix ApiMainTest::testExceptionErrors and use $wgShowDBErrorBacktrace

Apparently Jenkins sets $wgShowExceptionDetails to true but travis
doesn't. The test should make sure it's set since it depends on it.

And apparently no one ever added $wgShowDBErrorBacktrace to the API.
Let's do that too.

Change-Id: I0793eda349426b265a47900cdeb87bb920b5c291

7 years agoqunit: Remove redundant testCount expectation
Timo Tijhof [Tue, 21 Feb 2017 02:36:36 +0000 (18:36 -0800)]
qunit: Remove redundant testCount expectation

QUnit used to have bad state management (a few years ago) at which point it
became useful to verify the number of assertions in case an asynchronous
failure happened, as it would likely go unnoticed.

* Errors outside testStart/testEnd weren't caught.
  QUnit now monitors window.onerror.

* Assertions could be attributed to the wrong test.
  QUnit no longer does this since the assert object is associated with
  the current test through lexical scope.

* assert.async()/done() replaced global semaphore (QUnit.start).

* A test could forget to be marked as async and make no assertions.
  QUnit now marks a test as failed if it makes  0 assertions.
  QUnit also has built-in async tracking for promises.

If a test is not reaching all assertions for some reason, this
will cause an error of some sort that is tracked. If in some
specific scenario this isn't the case, assert.expect() can still
be called (e.g. when expecting 0 assertions), but it'd be worthwhile
to file an upstream bug report in that case.

Follows-up 7c363752, which removed 'QUnit.config.requireExpects' from
our test configuration.

Follows-up c4c7007de6 and various other commits that already removed
the test counts from a subset tests. This commit removes the remainder.

Change-Id: Ie58396ba9c83d27220508481cb97c0fa74487756

7 years agobuild: Update HHVM for Travis to 3.12
Timo Tijhof [Wed, 22 Feb 2017 01:06:07 +0000 (17:06 -0800)]
build: Update HHVM for Travis to 3.12

Travis defaults 'hhvm' to 3.6.6 for back-compat, however newer
versions are available. The latest supported version on Travis is 3.12,
per <https://docs.travis-ci.com/user/languages/php#HHVM-versions>.
This also matches the version currently used in wmf production.

Bug: T75175
Change-Id: I1c562f61acf83aa7f558b2e11a6af81d13523dea

7 years agoMerge "Mention $wgRateLimitsExcludedIPs semantics change in release notes"
jenkins-bot [Wed, 22 Feb 2017 00:03:18 +0000 (00:03 +0000)]
Merge "Mention $wgRateLimitsExcludedIPs semantics change in release notes"

7 years agoMention $wgRateLimitsExcludedIPs semantics change in release notes
Gergő Tisza [Tue, 21 Feb 2017 23:40:39 +0000 (15:40 -0800)]
Mention $wgRateLimitsExcludedIPs semantics change in release notes

Follow-up for I727c19214.

Bug: T156983
Change-Id: I845d2acc2284a107d4bacd526e7598bade118d0a

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 21 Feb 2017 20:58:37 +0000 (21:58 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ice30c7acd43a92ea0c5f21895ffd7d3e35d98083

7 years agoMerge "API: Add "messagecode" to AuthManager responses"
jenkins-bot [Tue, 21 Feb 2017 19:46:04 +0000 (19:46 +0000)]
Merge "API: Add "messagecode" to AuthManager responses"