lhc/web/wiklou.git
8 years agoMerge "Make unused variable optional in ChangesList::insertDiffHist"
jenkins-bot [Tue, 15 Mar 2016 14:52:56 +0000 (14:52 +0000)]
Merge "Make unused variable optional in ChangesList::insertDiffHist"

8 years agoMerge "Move dbSetup=true; follow-up d920237"
jenkins-bot [Tue, 15 Mar 2016 07:27:16 +0000 (07:27 +0000)]
Merge "Move dbSetup=true; follow-up d920237"

8 years agoMove dbSetup=true; follow-up d920237
Matthew Flaschen [Tue, 15 Mar 2016 02:49:13 +0000 (22:49 -0400)]
Move dbSetup=true; follow-up d920237

See https://gerrit.wikimedia.org/r/#/c/274643/8/tests/phpunit/MediaWikiTestCase.php

I unintentionally changed it so dbSetup wasn't always set to true
(it was in the early return case in the old code, but not the new)

Bug: T95870
Change-Id: I2119b0233330b88a61d15fe4dc55fe855fce4b6a

8 years agoFix undefined $modelId in MWUnknownContentModelException
Reedy [Mon, 14 Mar 2016 21:57:03 +0000 (21:57 +0000)]
Fix undefined $modelId in MWUnknownContentModelException

Change-Id: I13b93cc1e9d7c050765fab5d8de4e17ca4319dc1

8 years agoMerge "Add a structure test to validate all extension.json files"
jenkins-bot [Mon, 14 Mar 2016 21:21:15 +0000 (21:21 +0000)]
Merge "Add a structure test to validate all extension.json files"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 14 Mar 2016 21:07:09 +0000 (22:07 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ifab2110151643c82611927a45c0a0da9259f07d6

8 years agoAdd a structure test to validate all extension.json files
Kunal Mehta [Sun, 28 Feb 2016 09:19:14 +0000 (01:19 -0800)]
Add a structure test to validate all extension.json files

Adds a structure test to validate that all loaded extension.json and
skin.json files validate against the schema at
docs/extension.schema.json.

Bug: T128307
Change-Id: I2fd1caaa50c288821ab6847dc29d60e6554d9df5

8 years agoSpecialVersion: Just use HTTPS links to mw.org instead of protocol-relative
Chad Horohoe [Mon, 14 Mar 2016 19:09:25 +0000 (12:09 -0700)]
SpecialVersion: Just use HTTPS links to mw.org instead of protocol-relative

No need to make people redirect if they're on HTTP :)

Change-Id: I273be400e3889add553a2f066dfec008c170e6c0

8 years agoMerge "Remove support for non-Composer PHPUnit"
jenkins-bot [Mon, 14 Mar 2016 18:56:21 +0000 (18:56 +0000)]
Merge "Remove support for non-Composer PHPUnit"

8 years agoRemove support for non-Composer PHPUnit
Max Semenik [Sat, 12 Mar 2016 19:59:05 +0000 (11:59 -0800)]
Remove support for non-Composer PHPUnit

Composer is now a standard way to install MediaWiki's PHP dependencies,
no reason for it not to be the same for PHPUnit.

Change-Id: Ibd977eb3480dafaf270ff63abc43c413d7b72144

8 years agoresourceloader: Remove 'require' and 'module' from debug mode
Timo Tijhof [Mon, 14 Mar 2016 17:50:09 +0000 (17:50 +0000)]
resourceloader: Remove 'require' and 'module' from debug mode

Partially reverts 94c116240 and 7fd977b242 as it was incorrectly
split up. This should've been part of Idbd05488 instead of 94c116240.

Bug: T108655
Bug: T129776
Change-Id: Ia5e6e57c9bd651ec913a2543e2df8951ff345ea2

8 years agoMerge "Make use of …::class feature in ContentHandler/DatabaseUpdater"
jenkins-bot [Mon, 14 Mar 2016 17:38:07 +0000 (17:38 +0000)]
Merge "Make use of …::class feature in ContentHandler/DatabaseUpdater"

8 years agoMerge "completionSearch: try an exact match even if the backend returns no result"
jenkins-bot [Mon, 14 Mar 2016 17:21:31 +0000 (17:21 +0000)]
Merge "completionSearch: try an exact match even if the backend returns no result"

8 years agoMerge "Move some LocalFile comments around"
jenkins-bot [Mon, 14 Mar 2016 15:55:42 +0000 (15:55 +0000)]
Merge "Move some LocalFile comments around"

8 years agoMake use of …::class feature in ContentHandler/DatabaseUpdater
Thiemo Mättig [Mon, 14 Mar 2016 15:54:50 +0000 (16:54 +0100)]
Make use of …::class feature in ContentHandler/DatabaseUpdater

Change-Id: Ic0d51a41c50f52e1fbdab58e3b63319caa5c7d1d

8 years agoMerge "Don't add label-elements for elements that doesn't have one"
jenkins-bot [Mon, 14 Mar 2016 15:37:16 +0000 (15:37 +0000)]
Merge "Don't add label-elements for elements that doesn't have one"

8 years agoMerge "Change remaining places to use short array syntax"
jenkins-bot [Mon, 14 Mar 2016 14:05:36 +0000 (14:05 +0000)]
Merge "Change remaining places to use short array syntax"

8 years agoMerge "Follow-up Ia16e19985: Fix table sort arrow direction"
jenkins-bot [Mon, 14 Mar 2016 13:18:28 +0000 (13:18 +0000)]
Merge "Follow-up Ia16e19985: Fix table sort arrow direction"

8 years agoMerge "Add support for External Store for unit tests"
jenkins-bot [Mon, 14 Mar 2016 12:07:59 +0000 (12:07 +0000)]
Merge "Add support for External Store for unit tests"

8 years agoFollow-up Ia16e19985: Fix table sort arrow direction
Ed Sanders [Sun, 13 Mar 2016 13:09:51 +0000 (13:09 +0000)]
Follow-up Ia16e19985: Fix table sort arrow direction

In Ia16e19985 we accidentally fixed the down arrow being
'sort_up', but by not switches the class order we changed
the meaning of the up and down arrows.

An up arrow should be labelled as 'up' but show when the
table is in ascending order (smallest at the top).

Bug: T129775
Change-Id: Ia30d4a26728dd0fe93939d746ce9bf9e90742de6

8 years agoMerge "Use an example with working digit transformation"
jenkins-bot [Mon, 14 Mar 2016 09:54:30 +0000 (09:54 +0000)]
Merge "Use an example with working digit transformation"

8 years agoDon't add label-elements for elements that doesn't have one
Florian [Sun, 13 Mar 2016 23:11:42 +0000 (00:11 +0100)]
Don't add label-elements for elements that doesn't have one

Fix the OOUI field element implementation to conditionally add
labels to the FieldLayout (only if the label isn't empty). Also
add setShowEmptyLabel( false ) to HTMLButtonField (labels usually
aren't set outside of the button, the button itself should have a label).

Bug: T129821
Change-Id: I0499bb82245273519e77c80e78bc431588875a85

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 13 Mar 2016 21:25:00 +0000 (22:25 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ib5ad9c2a48f781ae667e27786edbcb4c03c4abc5

8 years agoMerge "build: Update grunt-jscs to 2.8.0"
jenkins-bot [Sun, 13 Mar 2016 07:54:39 +0000 (07:54 +0000)]
Merge "build: Update grunt-jscs to 2.8.0"

8 years agoMerge "Update Karma's QUnit to v1.22.0"
jenkins-bot [Sun, 13 Mar 2016 07:54:34 +0000 (07:54 +0000)]
Merge "Update Karma's QUnit to v1.22.0"

8 years agobuild: Update grunt-jscs to 2.8.0
Paladox [Wed, 2 Mar 2016 20:28:23 +0000 (20:28 +0000)]
build: Update grunt-jscs to 2.8.0

Change-Id: Ica4fac1bee551467614a76c76aa699406927c9a4

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 12 Mar 2016 19:50:54 +0000 (20:50 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I8af274b32e9af1553e074c4b29eedd0f7f3803eb

8 years agoregistration: Improve error message for non-array attributes
Kunal Mehta [Thu, 3 Mar 2016 18:53:30 +0000 (10:53 -0800)]
registration: Improve error message for non-array attributes

Change-Id: I7cbf7353ebbbbbbf36500f86164e3b32d7723cca

8 years agoUpdate Karma's QUnit to v1.22.0
Timo Tijhof [Sat, 12 Mar 2016 18:51:09 +0000 (18:51 +0000)]
Update Karma's QUnit to v1.22.0

Follows-up 54bbef467d, which updated the version used by
MediaWiki's Special:JavaScriptTest.

Change-Id: I7876808c3b5ac88976706cdff1cf7abe8075cfdb

8 years agoConvert array() syntax to [] in Makefile.py
Chiefwei [Fri, 11 Mar 2016 09:16:39 +0000 (17:16 +0800)]
Convert array() syntax to [] in Makefile.py

Update Makefile.py for Chinese conversion table to convert array() syntax to [] in languages/data/ZhConversion.php .

Change-Id: I10ba5d16ca619f64458feba51e12c3bd5d18435d

8 years agoMerge "Chinese Conversion Table Update 2016-1"
jenkins-bot [Sat, 12 Mar 2016 10:20:12 +0000 (10:20 +0000)]
Merge "Chinese Conversion Table Update 2016-1"

8 years agoUpgrade QUnit to v1.22.0
Timo Tijhof [Sat, 12 Mar 2016 02:08:19 +0000 (02:08 +0000)]
Upgrade QUnit to v1.22.0

The v1.19.0 release fixed a major bug in QUnit.test Promise handling

> Test: Don't pass Promise fulfillment value to QUnit.start

Without this fix, passing tests that involve an async Promise
can wrongly be marked as failure when they have a falsey resolution
value due to the resolution value being passed to QUnit.start()
by accident.

Change-Id: Id4b52085529f4cf8996f8053648680026ed62941

8 years agoAdd support for External Store for unit tests
Matthew Flaschen [Thu, 3 Mar 2016 07:30:24 +0000 (02:30 -0500)]
Add support for External Store for unit tests

This allow running PHP tests with External Store DB configured.
This means it needs to do the unittest_ prefixing similar to the main
tables.

It could do resetting (truncating the tables) similar to the tablesUsed
functionality.  However, if External Store is truncated unconditionally,
revision, etc. also needs to be.  This can cause performance issues.
I was thinking of making resetting ES optional, but it wasn't needed
to pass any of the core tests, so I just left it out entirely for now.

Bug: T95870
Change-Id: If27435210d5a2165795dd759b17a7e51fe9bba10

8 years agoMerge "Add description for mw.hook#event-postEdit in JavaScript"
jenkins-bot [Fri, 11 Mar 2016 23:52:42 +0000 (23:52 +0000)]
Merge "Add description for mw.hook#event-postEdit in JavaScript"

8 years agoAdd description for mw.hook#event-postEdit in JavaScript
Kaldari [Fri, 11 Mar 2016 22:10:05 +0000 (16:10 -0600)]
Add description for mw.hook#event-postEdit in JavaScript

Change-Id: I82ae21348b2ee686f80eda454f2aa6cf60ae20c4

8 years agoAdd link to anon's user page; remove "Not logged in"
Stephan Gambke [Sat, 27 Feb 2016 14:27:54 +0000 (15:27 +0100)]
Add link to anon's user page; remove "Not logged in"

Improve the personal tools:
* Remove the "Not logged in" text message. It is misleading. Being among the
  personal tool links people click on it expecting it to have some function.
* Instead add a proper link "Unknown user" to the IP user page.

Bug: T121793
Change-Id: I049d0671a7050585659fc8b9dcf21e0f92393bcf

8 years agoMove some LocalFile comments around
Aaron Schulz [Fri, 11 Mar 2016 22:14:40 +0000 (14:14 -0800)]
Move some LocalFile comments around

Change-Id: I7d7c5618481245aa6e8328ad58f5e841f010fe01

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 11 Mar 2016 20:55:12 +0000 (21:55 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ie105d1bced55a141d9c641ab0c6cec53e267d427

8 years agoMerge "Normalize user provided URL link for Special:LinkSearch page"
jenkins-bot [Fri, 11 Mar 2016 19:21:34 +0000 (19:21 +0000)]
Merge "Normalize user provided URL link for Special:LinkSearch page"

8 years agoChange remaining places to use short array syntax
umherirrender [Fri, 11 Mar 2016 17:41:26 +0000 (18:41 +0100)]
Change remaining places to use short array syntax

Change-Id: I0785c73a239c11188ad7411c5cd8ed09a2dbc9b3

8 years agoMerge "mediawiki.api.parse: Allow parsing pages"
jenkins-bot [Fri, 11 Mar 2016 16:59:45 +0000 (16:59 +0000)]
Merge "mediawiki.api.parse: Allow parsing pages"

8 years agoWikimedia\Assert\Assert is never used
Siebrand Mazeland [Tue, 8 Mar 2016 20:26:08 +0000 (21:26 +0100)]
Wikimedia\Assert\Assert is never used

Change-Id: Ie12f158ec01deb2db7c3d515fe16839117380ee8

8 years agoMerge "i18n of submit button on Special:ChangeContentModel"
jenkins-bot [Fri, 11 Mar 2016 16:11:46 +0000 (16:11 +0000)]
Merge "i18n of submit button on Special:ChangeContentModel"

8 years agoDon't return PHPUnit_Framework_MockObject_MockObject when not needed
Thiemo Mättig [Mon, 7 Mar 2016 10:41:03 +0000 (11:41 +0100)]
Don't return PHPUnit_Framework_MockObject_MockObject when not needed

The callers of this method don't need to know about this additional
interface.

Change-Id: I9e5531e495b7f5c890e8e520d661ccd5b0a644e1

8 years agoUpdate and correct documentation in Language class
Siebrand Mazeland [Tue, 8 Mar 2016 22:27:14 +0000 (23:27 +0100)]
Update and correct documentation in Language class

Change-Id: I1d530bded0da7133f9b5120b515f32fc87507c84

8 years agoi18n of submit button on Special:ChangeContentModel
Pmlineditor [Fri, 11 Mar 2016 14:15:30 +0000 (19:45 +0530)]
i18n of submit button on Special:ChangeContentModel

This patch adds a message, 'changecontentmodel-submit', for
Special:ChangeContentModel to prevent reuse of the default
"Submit" text from FormSpecialPage.

Bug: T120576
Change-Id: I72466867a6739ba144c5a2984b8ca2589292815c

8 years agoMerge "OutputPage: Set wgPageContentLanguage to pageViewLang instead of pageLang"
jenkins-bot [Fri, 11 Mar 2016 08:45:15 +0000 (08:45 +0000)]
Merge "OutputPage: Set wgPageContentLanguage to pageViewLang instead of pageLang"

8 years agocompletionSearch: try an exact match even if the backend returns no result
dcausse [Fri, 11 Mar 2016 08:30:34 +0000 (09:30 +0100)]
completionSearch: try an exact match even if the backend returns no result

Unfortunately some backends (like Cirrus) are not able to do proper crossnamespace
lookup. If the backend returns no result we should still try an exact title match.

Bug:T129575
Change-Id: Ic08ec0aac0fd8a289f21753d74ae62ba509de841

8 years agoOutputPage: Set wgPageContentLanguage to pageViewLang instead of pageLang
Timo Tijhof [Tue, 8 Mar 2016 23:44:18 +0000 (23:44 +0000)]
OutputPage: Set wgPageContentLanguage to pageViewLang instead of pageLang

Follows-up 80a090ea7 (r104483).

I'm assuming the difference is that pageLanguage will be the canonical variant
for the page (as authored in wikitext, presumably the wiki's default), whereas
pageViewLanguage will be the variant of the pageLanguage based on the current
user-interface language (if and only if the user interface is related).

Viewing zh by default has:
* userLanguage: zh
* pageLanguage: zh
* pageViewLanguage: zh

Viewing zh-cn by default has:
* userLanguage: zh
* pageLanguage: zh
* pageViewLanguage: zh-cn

Viewing zh-cn with uselang=en has:
* userLanguage: en
* pageLanguage: zh
* pageViewLanguage: zh-cn

Viewing zh-cn with uselang=zh-tw has:
* userLanguage: zh-tw
* pageLanguage: zh
* pageViewLanguage: zh-cn

The main use case behind wgPageContentLanguage in 80a090ea7 was tablesorter
which should match the language and variant of the rendered wikipage content.

The parser output and div#mw-content-text element use pageViewLanguage, so
let's set wgPageContentLanguage to that as well.

Change-Id: Ibf399dfe5ca60fb55e7acd75a5c0238d8b903807

8 years agoMerge "resourceloader: Create ResourceLoaderContext::msg() method"
jenkins-bot [Fri, 11 Mar 2016 08:24:16 +0000 (08:24 +0000)]
Merge "resourceloader: Create ResourceLoaderContext::msg() method"

8 years agoMerge "Include user name in Special:BotPassword success messages"
jenkins-bot [Fri, 11 Mar 2016 07:14:43 +0000 (07:14 +0000)]
Merge "Include user name in Special:BotPassword success messages"

8 years agomediawiki.api.parse: Allow parsing pages
Matthew Flaschen [Fri, 11 Mar 2016 00:04:15 +0000 (19:04 -0500)]
mediawiki.api.parse: Allow parsing pages

Bug: T46925
Change-Id: Ic0d762d02c96e0b39b4983d3b66ebdfb6f88d3a2

8 years agoChinese Conversion Table Update 2016-1
Chiefwei [Fri, 11 Mar 2016 01:09:21 +0000 (09:09 +0800)]
Chinese Conversion Table Update 2016-1

Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 .

It is only data changes and only works for Chinese WikiProjects.

Change-Id: I39f9945a38078364a740dbb552f87d4bcf62033c

8 years agoresourceloader: Create ResourceLoaderContext::msg() method
Timo Tijhof [Thu, 10 Mar 2016 23:33:58 +0000 (23:33 +0000)]
resourceloader: Create ResourceLoaderContext::msg() method

This makes it easier to fetch messages without having to manually
call inLanguage() on each wfMessage() call, which is currently
causing some code forget this and use plain wfMessage() which
defaults to MediaWiki user language from session.

I've considered setting $wgLang or RequestContext::getMain(),
but that's still bad since modules get passed a context in their
methods and shouldn't be using global context either.

The warnings provided by MW_NO_SESSION are exactly what we want.

Change-Id: I1288fa5622d9f82d21bb66c8eb6518b90e7cddb4

8 years agoMerge "resourceloader: Inverse hasOwn() check to fix require in debug mode"
jenkins-bot [Fri, 11 Mar 2016 00:19:03 +0000 (00:19 +0000)]
Merge "resourceloader: Inverse hasOwn() check to fix require in debug mode"

8 years agoMerge "Avoid rebuilding database fixtures for every test run"
jenkins-bot [Fri, 11 Mar 2016 00:06:19 +0000 (00:06 +0000)]
Merge "Avoid rebuilding database fixtures for every test run"

8 years agoresourceloader: Inverse hasOwn() check to fix require in debug mode
jdlrobson [Fri, 19 Feb 2016 22:36:50 +0000 (14:36 -0800)]
resourceloader: Inverse hasOwn() check to fix require in debug mode

Follows-up 94c1162400.

Makes require and module work in debug mode.

Bug: T108655
Change-Id: I68ea05a31d5bde530e5e80aeff076df6b9924bac

8 years agoAvoid rebuilding database fixtures for every test run
daniel [Mon, 7 Mar 2016 17:26:25 +0000 (18:26 +0100)]
Avoid rebuilding database fixtures for every test run

This reduces the runtime of database-bound tests by about 40%
(on my system, from 4:55 to 2:47; results from Jenkins are
inconclusive).

The basic idea is to call addCoreDBData() only once, and have
a addDBDataOnce() that is called once per test class, not for
every test method lie addDBData() is. Most tests could be
trivially be changed to implement addDBDataOnce() instead of
addDBData(). The ones for which this did not work immediately
were left out for now. A closer look at the tests that still
implement addDBData() may reveal additional potential for
improvement.

TODO: Once this is merged, try to change addDBData() to
addDBDataOnce() where possible in extensions.

Change-Id: Iec4ed4c8419fb4ad87e6710de808863ede9998b7

8 years agoMerge "Replace create_function() with a closure"
jenkins-bot [Thu, 10 Mar 2016 23:34:47 +0000 (23:34 +0000)]
Merge "Replace create_function() with a closure"

8 years agoReplace create_function() with a closure
Kevin Israel [Thu, 10 Mar 2016 23:04:07 +0000 (18:04 -0500)]
Replace create_function() with a closure

As in 266da0fb89ec4ae5 in extensions/Flow.

Change-Id: I0f6a38761cf1fa2956dad0f44fa023e1a8855df4

8 years agoConvert timing to ms before we've recorded too much data
Max Semenik [Thu, 10 Mar 2016 23:03:48 +0000 (15:03 -0800)]
Convert timing to ms before we've recorded too much data

Change-Id: I0a4e18290cdc662e597484a94205a481415cbb7b

8 years agoMerge "Respect undeclared command line options"
jenkins-bot [Thu, 10 Mar 2016 22:50:25 +0000 (22:50 +0000)]
Merge "Respect undeclared command line options"

8 years agoMerge "HTMLForm: Use OOUI\Element::configFromHtmlAttributes instead of rolling our...
jenkins-bot [Thu, 10 Mar 2016 21:33:28 +0000 (21:33 +0000)]
Merge "HTMLForm: Use OOUI\Element::configFromHtmlAttributes instead of rolling our own"

8 years agoMerge "HTMLFormFieldWithButton: Don't make the button primary by default"
jenkins-bot [Thu, 10 Mar 2016 21:33:24 +0000 (21:33 +0000)]
Merge "HTMLFormFieldWithButton: Don't make the button primary by default"

8 years agoMerge "Remove some deprecated functions from ApiBase"
jenkins-bot [Thu, 10 Mar 2016 21:22:30 +0000 (21:22 +0000)]
Merge "Remove some deprecated functions from ApiBase"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 10 Mar 2016 20:54:09 +0000 (21:54 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Iaea8b19d6e8c2cb24cb41c36f42c833c8cadf85a

8 years agoRemove some deprecated functions from ApiBase
Siebrand Mazeland [Tue, 8 Mar 2016 23:33:02 +0000 (00:33 +0100)]
Remove some deprecated functions from ApiBase

* ApiBase::addTokenProperties() was removed (deprecated since 1.24).
* ApiBase::getFinalPossibleErrors() was removed (deprecated since 1.24).
* ApiBase::getFinalResultProperties() was removed (deprecated since 1.24).
* ApiBase::getRequireAtLeastOneParameterErrorMessages() was removed (deprecated since 1.24).
* ApiBase::getPossibleErrors() was removed (deprecated since 1.24).
* ApiBase::getRequireMaxOneParameterErrorMessages() was removed (deprecated since 1.24).
* ApiBase::getRequireOnlyOneParameterErrorMessages() was removed (deprecated since 1.24).
* ApiBase::getResultProperties() was removed (deprecated since 1.24).
* ApiBase::getTitleOrPageIdErrorMessage() was removed (deprecated since 1.24).
* ApiBase::parseErrors() was removed (deprecated since 1.24).
* Remove related constants ApiBase::PROP_ROOT, ApiBase::PROP_LIST,
  ApiBase::PROP_TYPE, ApiBase::PROP_NULLABLE.

Patches were submitted for remaining uses in Gerrit extensions.

Change-Id: Idea70300874258fbcb9deef6504eb55f2ebe8d6c

8 years agoHTMLFormFieldWithButton: Don't make the button primary by default
Bartosz Dziewoński [Thu, 10 Mar 2016 20:17:26 +0000 (21:17 +0100)]
HTMLFormFieldWithButton: Don't make the button primary by default

It results in multiple 'primary' buttons in forms, contrary to the
guidelines, for example on Special:Export.

Before: https://phabricator.wikimedia.org/F3605116
After: https://phabricator.wikimedia.org/F3605163

Changed Special:BotPasswords to explicitly use a 'primary' button,
since as far as I can tell it only displays a single button.

Change-Id: Ic647d2650ca635644245eb657cce045db9869fc5

8 years agoMerge "Make UploadBase use TempFSFile to wrap the temporary file"
jenkins-bot [Thu, 10 Mar 2016 20:04:54 +0000 (20:04 +0000)]
Merge "Make UploadBase use TempFSFile to wrap the temporary file"

8 years agoMerge "Fix mw.viewport.isElementInViewport with scrolled page"
jenkins-bot [Thu, 10 Mar 2016 19:24:13 +0000 (19:24 +0000)]
Merge "Fix mw.viewport.isElementInViewport with scrolled page"

8 years agoMerge "build: Ignore phpcs in /skins but not /includes/skins"
jenkins-bot [Thu, 10 Mar 2016 18:41:24 +0000 (18:41 +0000)]
Merge "build: Ignore phpcs in /skins but not /includes/skins"

8 years agoMerge "composer-merge-plugin: Bump to latest upstream version"
jenkins-bot [Thu, 10 Mar 2016 18:38:06 +0000 (18:38 +0000)]
Merge "composer-merge-plugin: Bump to latest upstream version"

8 years agoMerge "Clean up XCFHandler::getImageSize()"
jenkins-bot [Thu, 10 Mar 2016 18:08:16 +0000 (18:08 +0000)]
Merge "Clean up XCFHandler::getImageSize()"

8 years agoUse ipb_id when updating expiry in Block::updateTimestamp()
Kunal Mehta [Thu, 3 Mar 2016 02:48:08 +0000 (18:48 -0800)]
Use ipb_id when updating expiry in Block::updateTimestamp()

If Block::purgeExpired() hasn't been called due to low traffic, already
expired blocks might have their timestamps extended.

Bug: T128695
Change-Id: I21e7dca57bda77a755b54d0e09f340c3f0e75bd6

8 years agocomposer-merge-plugin: Bump to latest upstream version
Bryan Davis [Thu, 10 Mar 2016 16:47:40 +0000 (09:47 -0700)]
composer-merge-plugin: Bump to latest upstream version

v1.3.1 fixes issues with "self.version" constraints in included composer
manifests.

Depends-On: Ic34ea8b4456621e62810ad16692cc2ca7ac5f966
Change-Id: I2fa884a8ff4af42e1a62fa8e5d0799dcfc0f4547

8 years agoMerge "user: Remove debug entries from User::isValidUserName() rejections"
jenkins-bot [Thu, 10 Mar 2016 16:26:38 +0000 (16:26 +0000)]
Merge "user: Remove debug entries from User::isValidUserName() rejections"

8 years agoClean up XCFHandler::getImageSize()
Kevin Israel [Thu, 10 Mar 2016 14:45:41 +0000 (09:45 -0500)]
Clean up XCFHandler::getImageSize()

No change in behavior:

* Moved setting of array elements into the initializer.
* Replaced sprintf() with variable interpolation.
* Removed a pointless assertion.

Change-Id: Ie77d26c80d592911b33bc544f831c4d34cc47d0e

8 years agoFix mw.viewport.isElementInViewport with scrolled page
joakin [Thu, 10 Mar 2016 13:10:30 +0000 (13:10 +0000)]
Fix mw.viewport.isElementInViewport with scrolled page

With a scrolled page the function would return false since it assumed that
getBoundingClientRect returns the offset when in reality it returns the offset
relative to the window viewport.

This implementation keeps the ability to specify custom viewport rects. If we
wanted to just rely on the window viewport the implementation could be changed
with getBoundingClientRect to be much simpler.

Bug: T129466
Change-Id: I56142fbd1177fe47171a1874f73b7a8359c282ee

8 years agoRespect undeclared command line options
Tim Starling [Thu, 10 Mar 2016 05:18:13 +0000 (16:18 +1100)]
Respect undeclared command line options

This was broken by I847d45684ccd. We should really give an error when an
undeclared option is given (not ignore the option as in the previous
code), but most commandLine.inc users rely on undeclared options being
passed through to the $options global, and the change in I847d45684ccd
was apparently accidental.

Change-Id: Icec654a386bc79bf3e4ba81644c3c51ac5e093ba

8 years agoHttpFunctions: Log in English
Brad Jorsch [Wed, 9 Mar 2016 17:43:21 +0000 (12:43 -0500)]
HttpFunctions: Log in English

Bug: T127233
Change-Id: Ie61030a21f5a5f5e46452c1b6b15db594d741b71

8 years agoAllow passing a language into Status::getWikiText() etc.
Brad Jorsch [Wed, 9 Mar 2016 17:39:50 +0000 (12:39 -0500)]
Allow passing a language into Status::getWikiText() etc.

This also corrects a bug in MessageCache::parse() where it takes a
language code string but the Parser expects a Language object in
ParserOptions.

Bug: T128809
Change-Id: I3508c9e515e505890b3c62bc4a0982aa2a313782

8 years agoCheck User::isSafeToLoad() in LanguageConverter
Brad Jorsch [Wed, 9 Mar 2016 19:30:31 +0000 (14:30 -0500)]
Check User::isSafeToLoad() in LanguageConverter

Ideally LanguageConverter shouldn't be relying on global state at all.
But as a first step let's make it not try to use the global state when
that global state isn't even there.

Bug: T127233
Change-Id: I391cef3ec211d648b078fc509e0139daa58eb875

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 9 Mar 2016 20:57:31 +0000 (21:57 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ifd102e2f148caf1caea83af03b8e42eff8ff72cc

8 years agoInclude user name in Special:BotPassword success messages
Brad Jorsch [Wed, 9 Mar 2016 19:20:23 +0000 (14:20 -0500)]
Include user name in Special:BotPassword success messages

Change-Id: Ib7cf409e66639947341126f1cfd7fca9fbb18295

8 years agoMerge "OutputPage::out() was removed"
jenkins-bot [Wed, 9 Mar 2016 19:08:57 +0000 (19:08 +0000)]
Merge "OutputPage::out() was removed"

8 years agoMerge "OutputPage::setAllowedModules() was removed"
jenkins-bot [Wed, 9 Mar 2016 19:08:53 +0000 (19:08 +0000)]
Merge "OutputPage::setAllowedModules() was removed"

8 years agoMerge "OutputPage::getHeadItems() was removed"
jenkins-bot [Wed, 9 Mar 2016 19:08:49 +0000 (19:08 +0000)]
Merge "OutputPage::getHeadItems() was removed"

8 years agoMerge "OutputPage::getScript() was removed"
jenkins-bot [Wed, 9 Mar 2016 19:07:53 +0000 (19:07 +0000)]
Merge "OutputPage::getScript() was removed"

8 years agoLog a backtrace with "sessions are supposed to be disabled" message
Brad Jorsch [Wed, 9 Mar 2016 17:00:06 +0000 (12:00 -0500)]
Log a backtrace with "sessions are supposed to be disabled" message

Bug: T127233
Change-Id: I27ca561ab5967cde270f2b665b51da687f0c081a

8 years agoMerge "phpunit: Abstract user-lang override in MediaWikiTestCase"
jenkins-bot [Wed, 9 Mar 2016 17:41:51 +0000 (17:41 +0000)]
Merge "phpunit: Abstract user-lang override in MediaWikiTestCase"

8 years agophpunit: Abstract user-lang override in MediaWikiTestCase
Timo Tijhof [Wed, 9 Mar 2016 16:47:58 +0000 (16:47 +0000)]
phpunit: Abstract user-lang override in MediaWikiTestCase

Removed redundant set up in these classes (same as their paren
class MediaWikiLangTestCase does already).
* BlockTest
* ExportTest
* MWTimestampTest
* TitlePermissionTest

Change-Id: I28d18cb797bb249981727b02dffce4f0d8682b02

8 years agoStubObject: Remove redundant _call() method in StubUserLang
Timo Tijhof [Wed, 9 Mar 2016 15:40:51 +0000 (15:40 +0000)]
StubObject: Remove redundant _call() method in StubUserLang

Already exists the same way in the base class.

Change-Id: If6c89cf42f11655ea45a1d6e1660f6e5e2593169

8 years agomediawiki.inspect: Expose total size in bytes from mw.inspect
Peter Hedenskog [Wed, 9 Mar 2016 09:03:03 +0000 (10:03 +0100)]
mediawiki.inspect: Expose total size in bytes from mw.inspect

To make it easier for the Performance inspector plugin lets expose
the total size in bytes from inspect, so it can be used to calculate
the total size and graph the data.

There's one drawback with the fix: the total size is
also included in the console log, adding one extra field when you
log the data as a table. The method is generic that logs the data
and I don't want to change that.

Bug: T129319
Change-Id: Ic7ccbe624f07443942974a71f8a0b3f94074bb55

8 years agoDon't quote assert expressions in DairikiDiff
Ori Livneh [Wed, 9 Mar 2016 01:58:36 +0000 (17:58 -0800)]
Don't quote assert expressions in DairikiDiff

Per HHVM issue 5128, it is not possible to use '$this' in string-literal
assert() expressions. We can either wait for this to be fixed (unlikely to
happen soon, since it involves deep interpreter internals), comment out or
remove the asserts, or simply unquote them, so that they are actual expressions
rather than strings. The downside to this is that assertions will always be
evaluated (but so what, they are extremely cheap), and that when an assertion
fail the error message will simply read 'assert(): Assertion failed in
/path/to/file on line XXX' as opposed to including the expression in the
output. Fair trade, IMO.

See: https://github.com/facebook/hhvm/issues/5128

Bug: T124163
Change-Id: Ib458b1b0c28f8d38e9df427196ae79814f6dc0c2

8 years agoHTMLForm: Use OOUI\Element::configFromHtmlAttributes instead of rolling our own
Bartosz Dziewoński [Wed, 2 Mar 2016 19:09:53 +0000 (20:09 +0100)]
HTMLForm: Use OOUI\Element::configFromHtmlAttributes instead of rolling our own

Depends on I0e5c956b9358b510c8473b1cfe6465ea1b5c07ef in OOjs UI.

This mostly reverts dd04b310527c3ce69911789254939e9a2b627ada and parts
of e85bd04bcd26f9a05406cedf6ee0dcac0b54c435.

In addition to cleanup, it fixes bugs in HTMLFormFieldWithButton
(which did not add some attributes in OOUI mode) and HTMLMultiSelectField
(which did not do the mapping, losing some attributes in OOUI mode).

Change-Id: I0d1a5288e9edb73a0c3a8431feca9fcc67b72b6a

8 years agoOutputPage::out() was removed
Siebrand Mazeland [Tue, 8 Mar 2016 22:55:39 +0000 (23:55 +0100)]
OutputPage::out() was removed

Deprecated since 1.22. Six use remain in Gerrit extension
SemanticPageMaker, that's been unmaintained since MediaWiki 1.17. They
were not replaced.

Change-Id: I8d68657562f683a4933cc5321d5df04c80cdfc29

8 years agoOutputPage::setAllowedModules() was removed
Siebrand Mazeland [Tue, 8 Mar 2016 22:46:53 +0000 (23:46 +0100)]
OutputPage::setAllowedModules() was removed

Deprecated since 1.24. No uses in core or Gerrit extensions remaining.

Change-Id: I58af2d94f31a3d5eecc21dab2813d4f27789b511

8 years agoOutputPage::getHeadItems() was removed
Siebrand Mazeland [Tue, 8 Mar 2016 22:45:02 +0000 (23:45 +0100)]
OutputPage::getHeadItems() was removed

Deprecated since 1.24. No uses in core or extensions remaining.

Change-Id: Ic038a287dab00468b08f41f31b0c8aedffc03c64

8 years agoOutputPage::getScript() was removed
Siebrand Mazeland [Tue, 8 Mar 2016 22:41:17 +0000 (23:41 +0100)]
OutputPage::getScript() was removed

Deprecated since 1.24. One use remains in Gerrit extension
SemanticPageMaker, that's been unmaintained since MediaWiki 1.17. It was
not replaced.

Change-Id: I50afa8217e7bf1b47aef3951ef2ee7295d6db21e

8 years agoMerge "Minor update on login form on layout and buttons"
jenkins-bot [Tue, 8 Mar 2016 22:35:42 +0000 (22:35 +0000)]
Merge "Minor update on login form on layout and buttons"