lhc/web/wiklou.git
8 years agoAdd $query to JavaScript redirect info
Bartosz Dziewoński [Thu, 19 Nov 2015 22:13:13 +0000 (17:13 -0500)]
Add $query to JavaScript redirect info

Bug: T109724
Signed-off-by: Chad Horohoe <chadh@wikimedia.org>
Change-Id: I57a8f75067365d3da6388d2f8f7fe95ed5e6f310

8 years agoSECURITY: Make Special:MyPage and friends fake redirect to prevent info leak
csteipp [Mon, 5 Oct 2015 23:58:42 +0000 (16:58 -0700)]
SECURITY: Make Special:MyPage and friends fake redirect to prevent info leak

This prevents a malicious person from using external resources on their
website to cause the victim's web browser to load
Special:MyPage -> User:Username, and then looking it up in the page hit
statistics in order to correlate IPs from the malicious person's server
log, with usernames on wiki.

This feature can be disabled with $wgHideIdentifiableRedirects.

Bug: T109724
Signed-off-by: Chad Horohoe <chadh@wikimedia.org>
Change-Id: Ia0e742dc92c77af4832174dfa24c6dcaa6ee80e9

8 years agoFix IP::toHex for IPv4 addresses with a double/triple 0 block
Marius Hoch [Sat, 2 May 2015 16:48:04 +0000 (18:48 +0200)]
Fix IP::toHex for IPv4 addresses with a double/triple 0 block

Bug: T97897
Signed-off-by: Chad Horohoe <chadh@wikimedia.org>
Change-Id: I5c0a37be42ae2c5091ead487a6d19f6e0dd89b36

8 years ago[SECURITY] 0-pad to length in random string generation
Brad Jorsch [Wed, 14 Oct 2015 21:40:42 +0000 (17:40 -0400)]
[SECURITY] 0-pad to length in random string generation

Otherwise shorter strings might be generated.

Bug: T115522
Signed-off-by: Chad Horohoe <chadh@wikimedia.org>
Change-Id: I110d873d56762552060fd428c236c8b0e9a859b0

8 years agoSECURITY: Work around CURL insanity breaking POST parameters that start with '@'
Roan Kattouw [Fri, 6 Nov 2015 20:55:16 +0000 (12:55 -0800)]
SECURITY: Work around CURL insanity breaking POST parameters that start with '@'

CURL has a "feature" where passing array( 'foo' => '@bar' )
in CURLOPT_POSTFIELDS results in the contents of the file named "bar"
being POSTed. This makes it impossible to POST the literal string "@bar",
because array( 'foo' => '%40bar' ) gets double-encoded to foo=%2540bar.

Disable this "feature" by setting CURLOPT_SAFE_UPLOAD to true,
if available. According to the PHP manual, this option became
available in 5.5 and started defaulting to true in 5.6.
However, we support versions as low as 5.3, and this option
doesn't exist at all in 5.6.99-hhvm, which we run in production.

For versions where this option is not available (pre-5.5 versions
and HHVM), serialize POSTFIELDS arrays to strings. This works
around the issue because the '@' "feature" only works
for arrays, not strings, as of PHP 5.2. (We don't support pre-5.2
versions, and I've verified 5.6.99-hhvm behaves this way as well.)

Bug: T118032
Signed-off-by: Chad Horohoe <chadh@wikimedia.org>
Change-Id: I3f996e2eb87c7bd3b94ca9d3cc14a3e12f34f241

8 years agoUse hash_equals in User::matchEditToken
Gergő Tisza [Sat, 21 Nov 2015 19:51:02 +0000 (11:51 -0800)]
Use hash_equals in User::matchEditToken

There is no point in using hash_equals for the return value if we
do a normal comparison before.

Bug: T119309
Signed-off-by: Chad Horohoe <chadh@wikimedia.org>
Change-Id: Ia44ec5ed492105b27d0fddd845d58d27a29dc072

8 years agoMerge "mediawiki.action.view.redirect: Explicitly scroll to element in hash"
jenkins-bot [Fri, 18 Dec 2015 00:38:15 +0000 (00:38 +0000)]
Merge "mediawiki.action.view.redirect: Explicitly scroll to element in hash"

8 years agomediawiki.action.view.redirect: Explicitly scroll to element in hash
jdlrobson [Mon, 14 Dec 2015 23:52:39 +0000 (15:52 -0800)]
mediawiki.action.view.redirect: Explicitly scroll to element in hash

Specification of replaceState doesn't state whether the browser should scroll to the element
matching the fragment [1]. It only determines how to alter the history stack.
(The fact it doesn't impact UI is sometimes a desired behaviour [2)]

As a result force a scroll to the element. Harmless if element is already present.

[1] http://www.w3.org/TR/2011/WD-html5-20110113/history.html#the-history-interface
[2] http://lea.verou.me/2011/05/change-url-hash-without-page-jump/

Bug: T110501
Change-Id: I7440f7a6a6dd20d984da1834007d581324fb96f4

8 years agomw.MessagePoster: Fix creation of mw.Api() object
Kunal Mehta [Thu, 17 Dec 2015 23:28:17 +0000 (15:28 -0800)]
mw.MessagePoster: Fix creation of mw.Api() object

Follows up 59fca1594c3183.

Change-Id: If37b151a11a5d21332d8fa14ee85a254e7e0bf04

8 years agoMerge "Fix PPNode_Hash_Tree::getChildrenOfType return value"
jenkins-bot [Thu, 17 Dec 2015 22:27:04 +0000 (22:27 +0000)]
Merge "Fix PPNode_Hash_Tree::getChildrenOfType return value"

8 years agoMerge "Expand MediaWiki::main() $wgTrxProfilerLimits logging"
jenkins-bot [Thu, 17 Dec 2015 22:18:28 +0000 (22:18 +0000)]
Merge "Expand MediaWiki::main() $wgTrxProfilerLimits logging"

8 years agoFix PPNode_Hash_Tree::getChildrenOfType return value
Brad Jorsch [Wed, 9 Dec 2015 17:56:30 +0000 (12:56 -0500)]
Fix PPNode_Hash_Tree::getChildrenOfType return value

PPNode defines it as returning an array-type PPNode, not an array.

Change-Id: I9a6c5cea408aae449bfbf808d067837c4337c672

8 years agoMerge "Revert "Don't check namespace in SpecialWantedtemplates""
jenkins-bot [Thu, 17 Dec 2015 21:46:20 +0000 (21:46 +0000)]
Merge "Revert "Don't check namespace in SpecialWantedtemplates""

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 17 Dec 2015 21:25:59 +0000 (22:25 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I8b05cc6d002aab5167d7b92656f5b305cce082e7

8 years agoMerge "Merge namespace aliases like we merge namespace names"
jenkins-bot [Thu, 17 Dec 2015 19:03:48 +0000 (19:03 +0000)]
Merge "Merge namespace aliases like we merge namespace names"

8 years agoFix $namespaceAliases error from 2011
Siebrand Mazeland [Thu, 17 Dec 2015 11:32:49 +0000 (12:32 +0100)]
Fix $namespaceAliases error from 2011

Ref: https://phabricator.wikimedia.org/rMW0a27d489e81de2d62165844987d0901a44e2ac21#5ae2ccb1
Bug: T120702
Change-Id: I02906f36ea90233e8e793fd3225c130e7144d521

8 years agoUse "system administrator" when server access was needed
Siebrand Mazeland [Thu, 17 Dec 2015 08:59:57 +0000 (09:59 +0100)]
Use "system administrator" when server access was needed

Bug: T103884
Change-Id: Id8b540c0a5485072c855388bf1e20b7e7e97f451

8 years agoMerge "Add release notes for 4e0762c7 and 827d8dc0"
jenkins-bot [Thu, 17 Dec 2015 05:41:22 +0000 (05:41 +0000)]
Merge "Add release notes for 4e0762c7 and 827d8dc0"

8 years agoMerge "mediawiki.page.watch: Remove obsolete CSS selectors"
jenkins-bot [Thu, 17 Dec 2015 05:38:20 +0000 (05:38 +0000)]
Merge "mediawiki.page.watch: Remove obsolete CSS selectors"

8 years agoAdd release notes for 4e0762c7 and 827d8dc0
Timo Tijhof [Thu, 17 Dec 2015 01:56:17 +0000 (17:56 -0800)]
Add release notes for 4e0762c7 and 827d8dc0

Change-Id: Iaa1be8b3f5191edd45e3b0fb7ef1d96951848f7b

8 years agoMerge "Show change tags on Special:RevisionDelete"
jenkins-bot [Thu, 17 Dec 2015 03:21:07 +0000 (03:21 +0000)]
Merge "Show change tags on Special:RevisionDelete"

8 years agomediawiki.page.watch: Remove obsolete CSS selectors
Timo Tijhof [Wed, 16 Dec 2015 00:31:18 +0000 (16:31 -0800)]
mediawiki.page.watch: Remove obsolete CSS selectors

Change-Id: I4f80f1e6df5d77d9ad0ab2cc661c9bb5989c9aef

8 years agoMerge "Pass created revision to TitleMoveComplete hook"
jenkins-bot [Thu, 17 Dec 2015 00:55:28 +0000 (00:55 +0000)]
Merge "Pass created revision to TitleMoveComplete hook"

8 years agoMerge "Add tag parameter to API action=rollback"
jenkins-bot [Thu, 17 Dec 2015 00:36:59 +0000 (00:36 +0000)]
Merge "Add tag parameter to API action=rollback"

8 years agoPass created revision to TitleMoveComplete hook
Eric Evans [Wed, 16 Dec 2015 22:15:20 +0000 (16:15 -0600)]
Pass created revision to TitleMoveComplete hook

The EventBus extension needs to forward the created (null) revision ID as
part of the page move event.  Looking this value up when the hook fires is
problematic, because without a connection to the master DB the query might
very well return nothing (if it races in before the entry is replicated to
the slave).

This changeset passes the newly created Revision on to the hook so that it
doesn't need to be queried separately.

Bug: T116786
Change-Id: I1b48e2904fc8d99f2cde604f274f79a2b47d7fc2

8 years agoExpand MediaWiki::main() $wgTrxProfilerLimits logging
Aaron Schulz [Wed, 16 Dec 2015 23:19:29 +0000 (15:19 -0800)]
Expand MediaWiki::main() $wgTrxProfilerLimits logging

Remove the filter for basic GET actions.

Change-Id: Iba2b233474321f3d097bf9dfcf90b0feec0312b6

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 16 Dec 2015 21:10:08 +0000 (22:10 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ib9ea04900aa2a765917e16f4b03a9446e82febf8

8 years agoMerge "Move ArticleSaveComplete hook to doCreate()/doModify() methods"
jenkins-bot [Wed, 16 Dec 2015 20:42:47 +0000 (20:42 +0000)]
Merge "Move ArticleSaveComplete hook to doCreate()/doModify() methods"

8 years agoMerge "Installer: Link 4.0 family of CC licenses"
jenkins-bot [Wed, 16 Dec 2015 19:41:49 +0000 (19:41 +0000)]
Merge "Installer: Link 4.0 family of CC licenses"

8 years agoMerge "$wgUsersNotifiedOnAllChanges should not send mail twice"
jenkins-bot [Wed, 16 Dec 2015 19:40:01 +0000 (19:40 +0000)]
Merge "$wgUsersNotifiedOnAllChanges should not send mail twice"

8 years agoInstaller: Link 4.0 family of CC licenses
saper [Fri, 23 Oct 2015 22:23:43 +0000 (00:23 +0200)]
Installer: Link 4.0 family of CC licenses

Bug: T96077
Change-Id: I86efa1dae64967d36f3a1afa79bf3637f43297dd

8 years agoMerge "Avoid "Incorrect user-level lock name " errors in Database lock() method"
jenkins-bot [Wed, 16 Dec 2015 16:06:36 +0000 (16:06 +0000)]
Merge "Avoid "Incorrect user-level lock name " errors in Database lock() method"

8 years agoMerge "Simplify Language::getFallbackFor"
jenkins-bot [Wed, 16 Dec 2015 16:03:34 +0000 (16:03 +0000)]
Merge "Simplify Language::getFallbackFor"

8 years agoAvoid "Incorrect user-level lock name " errors in Database lock() method
Aaron Schulz [Wed, 16 Dec 2015 05:34:52 +0000 (21:34 -0800)]
Avoid "Incorrect user-level lock name " errors in Database lock() method

Use a sha1 hash if the lock name exceeds the MySQL limit. The class
for Postgres already avoids this problem with number hashes.

Change-Id: If587c672b4ff210ee3b512bbe2910ae247079d3f

8 years agoAdd tag parameter to API action=rollback
mhutti1 [Tue, 15 Dec 2015 23:45:37 +0000 (00:45 +0100)]
Add tag parameter to API action=rollback

Added code to allow tag change in ApiRollback.php

Bug: T111948
Change-Id: Ic8dcefe569f169041c9e0078a49af4ee87d2bbd6

8 years agoSimplify Language::getFallbackFor
Fomafix [Wed, 16 Dec 2015 09:51:53 +0000 (09:51 +0000)]
Simplify Language::getFallbackFor

This avoids a redundant check of the language code.

Change-Id: Ifbe23b80a9d8fd5c3aa06f6656dbf2699a318003

8 years agoSpecialWatchlist: Unbold title when it's clicked
Prateek Saxena [Mon, 12 Jan 2015 11:53:10 +0000 (17:23 +0530)]
SpecialWatchlist: Unbold title when it's clicked

Bug: T40908
Change-Id: I0c93f2dfefeae902a069c72bfa3c1ec7807ed57a

8 years agoRemove obsolete `background-size` vendor prefix
Volker E [Wed, 16 Dec 2015 00:56:34 +0000 (16:56 -0800)]
Remove obsolete `background-size` vendor prefix

Removing outdated `-o-` vendor prefix for some esoteric versions of
Opera, for example on Nintendo DS and adding "Deprecated" notice.
Also changing "Less" to new diction - no uppercase any more.

Bug: T121473
Change-Id: I0be3b94979f718dc6fbfac785e951a2cb9564eb4

8 years agoUpdate mediawiki_selenium Ruby gem from 1.2.1 to 1.6.3
Željko Filipin [Thu, 10 Dec 2015 16:26:13 +0000 (17:26 +0100)]
Update mediawiki_selenium Ruby gem from 1.2.1 to 1.6.3

Bring in User factory and support for IE/Android among other
things.

Bug: T114241
Change-Id: Ie0b0eb924e010533f34408b2fe3eef5b926b1cd9

8 years agoMerge "Make edit stashing use named DB locks"
jenkins-bot [Tue, 15 Dec 2015 20:56:41 +0000 (20:56 +0000)]
Merge "Make edit stashing use named DB locks"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 15 Dec 2015 20:55:47 +0000 (21:55 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I3eb6a66e400cbc42e040d9d6aac7d465f6c346c7

8 years agoMake edit stashing use named DB locks
Aaron Schulz [Thu, 10 Dec 2015 21:56:11 +0000 (13:56 -0800)]
Make edit stashing use named DB locks

These should be faster by avoiding the inefficient back-off
polling in BagOStuff::lock().

Change-Id: I013b2567716eea5e354e13f3e9640573886e596a

8 years agoShow change tags on Special:RevisionDelete
mhutti1 [Tue, 15 Dec 2015 19:17:47 +0000 (20:17 +0100)]
Show change tags on Special:RevisionDelete

RevDelRevisionItem.php has been modifed to display tags and
RevDelREvisionList.php has been modifed to request tag data
its database query.

Bug: T109041
Change-Id: Icaae790b7d21a6670c692d11e25c6db7b7325530

8 years agoRemove OutputPage::loginToUse(): deprecated since 1.19 & unused
Ori Livneh [Mon, 14 Dec 2015 22:38:13 +0000 (14:38 -0800)]
Remove OutputPage::loginToUse(): deprecated since 1.19 & unused

* https://github.com/search?utf8=%E2%9C%93&q=%40wikimedia+logintouse&type=Code&ref=searchresults

Change-Id: I5bdef4b518cd66a2b195aeb443e66136a06f816a

8 years agoRemove OutputPage::appendSubtitle(); deprecated since 1.19 & unused
Ori Livneh [Mon, 14 Dec 2015 22:37:13 +0000 (14:37 -0800)]
Remove OutputPage::appendSubtitle(); deprecated since 1.19 & unused

* https://github.com/search?q=%40wikimedia+appendSubtitle&type=Code&utf8=%E2%9C%93

Change-Id: Ic09479cf04f00cf1f8764efe747edacd6aa2140d

8 years agoMerge "ApiLogin: Deprecate certain response values"
jenkins-bot [Tue, 15 Dec 2015 18:43:20 +0000 (18:43 +0000)]
Merge "ApiLogin: Deprecate certain response values"

8 years agoApiLogin: Deprecate certain response values
Brad Jorsch [Tue, 15 Dec 2015 16:11:27 +0000 (11:11 -0500)]
ApiLogin: Deprecate certain response values

It's been a while since clients could reliably construct the cookie
values from these parameters, and it's only going to get worse. So let's
just kill them; the first step is to mark them as deprecated.

Bug: T121527
Change-Id: I6a1a0c7e253e4c651bc0149e956f8767ee6e8b80

8 years agoTweak wording for 'contentmodelediterror'
Bartosz Dziewoński [Tue, 15 Dec 2015 18:16:44 +0000 (19:16 +0100)]
Tweak wording for 'contentmodelediterror'

The message didn't really explain why this is an error, and it's easy
to miss the difference between "revision content model" and "page
content model".

Change-Id: I424ff972469ada9835dd08466724df63cf8971bf

8 years agomw.ForeignStructuredUpload.BookletLayout: Remove unnecessary @embed annotations
Bartosz Dziewoński [Tue, 15 Dec 2015 16:43:00 +0000 (17:43 +0100)]
mw.ForeignStructuredUpload.BookletLayout: Remove unnecessary @embed annotations

The .background-image-svg() mixin ensures the right embedding already.

Change-Id: I0ec10ed72025669e6dbf5aec055353daa23e5d68

8 years agoMerge "mw.ForeignStructuredUpload.BookletLayout: Option 4: Add RTL images"
jenkins-bot [Tue, 15 Dec 2015 16:48:57 +0000 (16:48 +0000)]
Merge "mw.ForeignStructuredUpload.BookletLayout: Option 4: Add RTL images"

8 years agomw.ForeignStructuredUpload.BookletLayout: Option 4: Add RTL images
Prateek Saxena [Tue, 15 Dec 2015 16:25:48 +0000 (21:55 +0530)]
mw.ForeignStructuredUpload.BookletLayout: Option 4: Add RTL images

Change-Id: I06c207aa89b85cfa5994fa9be8fa6bc623d739d7

8 years agoMerge "mediawiki.Upload.BookletLayout: If the user can't upload, don't show them...
jenkins-bot [Tue, 15 Dec 2015 16:32:40 +0000 (16:32 +0000)]
Merge "mediawiki.Upload.BookletLayout: If the user can't upload, don't show them the form"

8 years agoMerge "mediawiki.api.user: New module, factored out of mediawiki.user"
jenkins-bot [Tue, 15 Dec 2015 16:31:15 +0000 (16:31 +0000)]
Merge "mediawiki.api.user: New module, factored out of mediawiki.user"

8 years agomediawiki.Upload.BookletLayout: If the user can't upload, don't show them the form
Bartosz Dziewoński [Thu, 22 Oct 2015 19:25:32 +0000 (21:25 +0200)]
mediawiki.Upload.BookletLayout: If the user can't upload, don't show them the form

Second attempt. First, reverted one: I6f68122b5399f4b8766825c752e964478ae7563d.

To improve in the future:
* Use a better error message when not all logged-in users can upload

Bug: T115866
Change-Id: I1ac083fd491c7445240b4fd9f7b3badacb2d2d37

8 years agomediawiki.api.user: New module, factored out of mediawiki.user
Bartosz Dziewoński [Tue, 8 Dec 2015 15:23:13 +0000 (16:23 +0100)]
mediawiki.api.user: New module, factored out of mediawiki.user

The convenient getUserInfo() function can now be used with mw.ForeignApi.

Bug: T117868
Change-Id: Ic0b5fe3812723bf51a5cf6600437c480dc5abb8f

8 years agomw.ForeignStructuredUpload: Add '{{Uncategorized}}' template if no categories given
Bartosz Dziewoński [Tue, 15 Dec 2015 16:10:07 +0000 (17:10 +0100)]
mw.ForeignStructuredUpload: Add '{{Uncategorized}}' template if no categories given

This is not configurable at the moment. It probably should be, but
that can be done later.

Bug: T121268
Change-Id: I8de33a69979eff5dba13f82959011c44a92339e1

8 years agoMerge "mw.ForeignStructuredUpload.BookletLayout: Option 2: Image improvements"
jenkins-bot [Tue, 15 Dec 2015 15:36:19 +0000 (15:36 +0000)]
Merge "mw.ForeignStructuredUpload.BookletLayout: Option 2: Image improvements"

8 years agoMerge "mw.ForeignStructuredUpload.BookletLayout: Option 4: Image improvements"
jenkins-bot [Tue, 15 Dec 2015 15:34:02 +0000 (15:34 +0000)]
Merge "mw.ForeignStructuredUpload.BookletLayout: Option 4: Image improvements"

8 years agomw.ForeignStructuredUpload.BookletLayout: Option 2: Image improvements
Prateek Saxena [Tue, 15 Dec 2015 13:14:58 +0000 (18:44 +0530)]
mw.ForeignStructuredUpload.BookletLayout: Option 2: Image improvements

Correctly aligned PNGs. Added SVGs.

Alternating the position of the icons was distracting. Moved all to
the right.

Change-Id: Ic14da2c6408ab15416dab1ebd1397507d0950b33

8 years agomw.ForeignStructuredUpload.BookletLayout: Option 4: Image improvements
Prateek Saxena [Tue, 15 Dec 2015 11:03:20 +0000 (16:33 +0530)]
mw.ForeignStructuredUpload.BookletLayout: Option 4: Image improvements

Add higher quality PNGs. Also added SVGs, and now using the
.background-image-svg() mixing to use SVGs.

Change-Id: I8d8fbf8e58b4ef5d9956731c8b85d5db07b3f5ed

8 years agoMerge "mw.ForeignStructuredUpload.BookletLayout: A/B test of 4 different interfaces"
jenkins-bot [Tue, 15 Dec 2015 15:14:17 +0000 (15:14 +0000)]
Merge "mw.ForeignStructuredUpload.BookletLayout: A/B test of 4 different interfaces"

8 years agoMerge "Follow-up 23cfe1bba: harmonize image embedding CSS"
jenkins-bot [Tue, 15 Dec 2015 12:35:28 +0000 (12:35 +0000)]
Merge "Follow-up 23cfe1bba: harmonize image embedding CSS"

8 years agoMerge namespace aliases like we merge namespace names
This, that and the other [Tue, 15 Dec 2015 05:53:28 +0000 (16:53 +1100)]
Merge namespace aliases like we merge namespace names

To avoid problems like T60074 and deal with requests like T101634.

Bug: T108427
Change-Id: I3ef6bbcc820a254b44ba86bfccb3854983a19ff6

8 years agoMerge "Avoid "CAS updated failed" errors on Special:Preferences double post"
Aaron Schulz [Tue, 15 Dec 2015 04:15:23 +0000 (04:15 +0000)]
Merge "Avoid "CAS updated failed" errors on Special:Preferences double post"

8 years agoMerge "Remove redundant 'type' attributes from style and script tags"
jenkins-bot [Tue, 15 Dec 2015 02:56:12 +0000 (02:56 +0000)]
Merge "Remove redundant 'type' attributes from style and script tags"

8 years agoAvoid "CAS updated failed" errors on Special:Preferences double post
Aaron Schulz [Sun, 13 Dec 2015 04:35:22 +0000 (20:35 -0800)]
Avoid "CAS updated failed" errors on Special:Preferences double post

* This does the same thing ApiOptions does to avoid these errors.
  A new getInstanceForUpdate() method is now in the User class to
  simplify this pattern.
* Avoid overriding $user in ApiOptions for code readability.
* Fixed IDEA errors around Preferences::getFormObject() return type.

Bug: T95839
Change-Id: If2385b7486c043bd70d7031ff35e37dfb079a4d2

8 years agomw.ForeignStructuredUpload.BookletLayout: A/B test of 4 different interfaces
Bartosz Dziewoński [Fri, 11 Dec 2015 02:31:55 +0000 (03:31 +0100)]
mw.ForeignStructuredUpload.BookletLayout: A/B test of 4 different interfaces

It turns out that people click the checkbox affirming that they are
they author of the file and that they release it under CC BY-SA even
when neither of those is true. So we're trying some interfaces that
require a modicum of thought rather than just a click on "I agree".

  Option 1: The form we have right now, with a single checkbox.

  Option 2: Four checkboxes, each with a label explaining one facet of
    the requirements (own work; no pictures of copyrighted work;
    educational/useful; irrevocably released as CC BY-SA).

  Option 3: Some Yes/No questions structured so that 'Yes' is not
    always the right answer to continue uploading.

  Option 4: Longer introduction before a single checkbox (as in option
    1), with examples of good and unacceptable content.

As only logged in users are able to upload files, we're able to bucket
them into four groups by user ID number. When the user completes a
file upload, the bucket number is saved server-side in a change tag by
the companion patch I90cb12c505b2581f36113ec6b4f7bf732f0971b7 (we could
match the user IDs cross-wiki by username, but that sounds painful).

For testing and debugging, add '?uploadbucket=N' to the URL to force
given interface option to appear. Any completed upload won't count
towards the bucket.

Note that for expediency, the tested options all assume uploads to
'shared' repository (that is, Wikimedia Commons). The winner's
messages will be tweaked to work with 'local' and other targets too.

This patch DOES NOT ENABLE THE TEST yet, it just implements the options.
Enabling it on specific wikis can be done via config:
* $wgForeignUploadTestEnabled = true/false (defaults to 'false')
  Whether the test is running.
* $wgForeignUploadTestDefault = 1/2/3/4 (defaults to '1')
  Interface to use when the test is not running (and for anons).

Bug: T120867
Bug: T121021
Change-Id: I557056b867c6a55ef2c9af321eb48893312632a3

8 years agoFollow-up 23cfe1bba: harmonize image embedding CSS
Roan Kattouw [Mon, 14 Dec 2015 23:58:41 +0000 (15:58 -0800)]
Follow-up 23cfe1bba: harmonize image embedding CSS

23cfe1bba changed ResourceLoaderImageModule::getCssDeclarations(),
but contrary to the documentation did not synchronize it with
mediawiki.mixins.less. This commit does that.

This commit brings the -o-linear-gradient rule back (this time with
a comment that explains why it's there), and removes the
-webkit-linear-gradient rules from mediawiki.mixins.less
and CSS code that copypasted it.

Change-Id: Ia7e9738d90919248748e6968192bf02e420cddd0

8 years agoMerge "Add release notes for removed function and class"
jenkins-bot [Mon, 14 Dec 2015 22:54:18 +0000 (22:54 +0000)]
Merge "Add release notes for removed function and class"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 14 Dec 2015 20:44:21 +0000 (21:44 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I00c9fee4c2b38f8e4cee9ee40343615cfdc772c1

8 years agoMerge "Add case-changing magic words to mw.jqueryMsg"
jenkins-bot [Mon, 14 Dec 2015 20:30:13 +0000 (20:30 +0000)]
Merge "Add case-changing magic words to mw.jqueryMsg"

8 years agoMerge "mw.Upload.Dialog: Make the dialog higher (600px)"
jenkins-bot [Mon, 14 Dec 2015 20:21:01 +0000 (20:21 +0000)]
Merge "mw.Upload.Dialog: Make the dialog higher (600px)"

8 years agoMerge "Special:Preferences Remove red box in email and changed confirm error to warning"
jenkins-bot [Mon, 14 Dec 2015 20:18:35 +0000 (20:18 +0000)]
Merge "Special:Preferences Remove red box in email and changed confirm error to warning"

8 years agomw.Upload.Dialog: Make the dialog higher (600px)
Bartosz Dziewoński [Mon, 14 Dec 2015 19:54:04 +0000 (20:54 +0100)]
mw.Upload.Dialog: Make the dialog higher (600px)

Avoids a scrollbar for option 4 of the A/B test from T120867.
300px was woefully insufficient for the second step, anyway.

Change-Id: Id9704565457af6a66186f03bbc9c2c57d09f2330

8 years agoAdd release notes for removed function and class
umherirrender [Mon, 14 Dec 2015 19:03:47 +0000 (20:03 +0100)]
Add release notes for removed function and class

* Skin::getNamespaceNotice: I7567582924757b97b94f757170bc67b18e4ca089
* wfIsConfiguredProxy: I3c1e1d00b93320cde9b39c183174e7a495f03854
* wfDebugTimer: I7b6516f82344f98aaec04bc3af3c208b63169a77
* wfIsTrustedProxy: I86439a772e036dcd5ebdd8b16010c7bacfd9463b
* wfGetIP: I3b8f4b034e23a56f586993549cc5460b28bf6fa7
* MWHookException: I9cf80f2b701d6db8a6cfe884e4fd15d4e0482dda

Change-Id: Ib5359ee50e42f68e8d1985476c5c2d8146a2d8d5

8 years agoSpecial:Preferences Remove red box in email and changed confirm error to warning
Krzysztof Zbudniewek [Sun, 13 Dec 2015 00:56:47 +0000 (01:56 +0100)]
Special:Preferences Remove red box in email and changed confirm error to warning

As @matmarex suggested I used the same colors for warning as in shared.css for .warningbox

Bug: T58611
Change-Id: Icba7787db4cc77ee793b9637c60b5977d28dc8cf

8 years agoAdd case-changing magic words to mw.jqueryMsg
Scimonster [Mon, 14 Dec 2015 16:56:26 +0000 (18:56 +0200)]
Add case-changing magic words to mw.jqueryMsg

Add the lc, uc, lcfirst, and ucfirst magic words.
Task done as part of GCI15.

Bug: T46495
Change-Id: I246b878ff4e8ef4cf49fe1859ee6c5d33d373b30

8 years agoregistration: When converting, place 'namemsg' under 'name'
Paladox [Fri, 25 Sep 2015 17:28:43 +0000 (18:28 +0100)]
registration: When converting, place 'namemsg' under 'name'

Currently when converting from PHP to extension.json, 'namemsg' isn't
underneath 'name', it is halfway down instead.

Change-Id: I1be42a818bda6908643702cc5f7c959d2d2fdfba

8 years agoMerge "Fix HHVM RepoAuthorative mode again"
jenkins-bot [Mon, 14 Dec 2015 16:33:14 +0000 (16:33 +0000)]
Merge "Fix HHVM RepoAuthorative mode again"

8 years agoFix HHVM RepoAuthorative mode again
Reedy [Mon, 14 Dec 2015 13:28:29 +0000 (13:28 +0000)]
Fix HHVM RepoAuthorative mode again

Change-Id: I0fe75797ebe1c8c22be603a62102bd25bce29f49

8 years agoSpecialChangeEmail: Remove dead code (whole 'mediawiki.special.changeemail' module)
Bartosz Dziewoński [Mon, 14 Dec 2015 15:15:48 +0000 (16:15 +0100)]
SpecialChangeEmail: Remove dead code (whole 'mediawiki.special.changeemail' module)

It stopped working after 6b9a1c6d5b96dd55b05b9db5d4ab864973b7ff8f
accidentally changed the 'id' of the text input this was validating.

It seems that all browsers these days have some validation for 'email'
fields, so this isn't very useful, and the styling of the notice looks
pretty jarring with the current 'ooui'-style form.

Change-Id: Ifa3103c9c9369654ea1cd4b064a67454b8694bf0

8 years agoMerge "Move PSR-3 support check right after autoloader setup"
jenkins-bot [Mon, 14 Dec 2015 06:59:24 +0000 (06:59 +0000)]
Merge "Move PSR-3 support check right after autoloader setup"

8 years agoMerge "Work around APCu memory corruption bug"
jenkins-bot [Mon, 14 Dec 2015 06:21:03 +0000 (06:21 +0000)]
Merge "Work around APCu memory corruption bug"

8 years agoMove PSR-3 support check right after autoloader setup
Gergő Tisza [Mon, 26 Oct 2015 02:00:24 +0000 (19:00 -0700)]
Move PSR-3 support check right after autoloader setup

This ensures that, in case "composer install" has not been run,
the user will see the error message about setting up dependencies
(as opposed a plain "Class not found" error because some other
dependency was used first).

Change-Id: Ib6026123770d21cc9f8960a1de361c8178b1b044

8 years agoWork around APCu memory corruption bug
Ori Livneh [Sun, 13 Dec 2015 06:09:32 +0000 (22:09 -0800)]
Work around APCu memory corruption bug

APCu's object serialization causes memory corruption when apc.serializer is set
to 'default' (see https://github.com/krakjoe/apcu/issues/38). We can work
around this bug by falling back to the pre-I4b2cf17155 behavior of
APCBagOStuff, which is not to trust apc_store() with anything other than
strings and integers, and instead serialize everything in user-space PHP code.

Bug: T120267
Change-Id: If34a1d959e2700792514b372af52919940222d83

8 years agoFix missing semi-colon: &#160 -> &#160;
Brian Wolff [Mon, 14 Dec 2015 04:25:51 +0000 (23:25 -0500)]
Fix missing semi-colon: &#160 -> &#160;

The error is most noticable when transcluding {{Special:Contributions}}

Follows up 43c770c9543.

Change-Id: I67e44e6c655ff31dcc1c3a4716b63e3e91411a07

8 years agoMerge "resourceloader: Remove obsolete msg_resource database table"
jenkins-bot [Mon, 14 Dec 2015 01:46:19 +0000 (01:46 +0000)]
Merge "resourceloader: Remove obsolete msg_resource database table"

8 years agoMerge "resourceloader: Remove obsolete msg_resource_links table"
jenkins-bot [Mon, 14 Dec 2015 01:41:50 +0000 (01:41 +0000)]
Merge "resourceloader: Remove obsolete msg_resource_links table"

8 years agoresourceloader: Remove obsolete msg_resource database table
Timo Tijhof [Wed, 9 Dec 2015 21:29:59 +0000 (21:29 +0000)]
resourceloader: Remove obsolete msg_resource database table

No longer used as of 5d5b269e0e63641f3.

Change-Id: Ieb8448185cf39aa396e902e025e673f0886ac3c3

8 years agoresourceloader: Remove obsolete msg_resource_links table
Timo Tijhof [Fri, 6 Nov 2015 23:43:44 +0000 (23:43 +0000)]
resourceloader: Remove obsolete msg_resource_links table

No longer used as of Ia9131f570.

Change-Id: If009e2620e59002e127d21b90a96bdd29e5d2a9d

8 years agoFix case of wfWikiID calls
Adam Roses Wight [Mon, 14 Dec 2015 01:20:41 +0000 (17:20 -0800)]
Fix case of wfWikiID calls

Change-Id: I1f980962dd2d0b2f05b14e506f679e21e3d67334

8 years agoMerge "DefaultSettings.php: Use .invalid as invalid e-mail address (RFC 2606)"
jenkins-bot [Mon, 14 Dec 2015 01:14:53 +0000 (01:14 +0000)]
Merge "DefaultSettings.php: Use .invalid as invalid e-mail address (RFC 2606)"

8 years ago$wgUsersNotifiedOnAllChanges should not send mail twice
saper [Mon, 2 Nov 2015 13:37:25 +0000 (14:37 +0100)]
$wgUsersNotifiedOnAllChanges should not send mail twice

Also make sure that normal watchlist functionality
works for the $wgUsersNotifiedOnAllChanges, for
example changes should marked 'bold' since last visit.

Bug: T69041
Change-Id: I7d53f07ed3dceb5b1c541091fd69beca3fb3e94f

8 years agoMerge "SpecialPagesWithProp: Use 'combobox' field and convert to OOUI"
jenkins-bot [Mon, 14 Dec 2015 01:08:12 +0000 (01:08 +0000)]
Merge "SpecialPagesWithProp: Use 'combobox' field and convert to OOUI"

8 years agoMerge "Add error checking for file argument"
jenkins-bot [Mon, 14 Dec 2015 01:01:43 +0000 (01:01 +0000)]
Merge "Add error checking for file argument"

8 years agoAdd user and previous rev to HistoryRevisionTools, and user to DiffRevisionTools
cenarium [Sat, 21 Nov 2015 12:24:17 +0000 (13:24 +0100)]
Add user and previous rev to HistoryRevisionTools, and user to DiffRevisionTools

The next revision in the page history isn't necessarily the previous
revision (due to selective undeletions, history merges, etc). This
passes the next revision to HistoryRevisionTools so extensions can check
if needed. Also, it passes the user to this hook and DiffRevisionTools
to avoid use of wgUser or having to retrieve context.

Change-Id: Ibc68f19040eebe3614e07f753f26bbfd376ae28d

8 years agoMerge "Remove uncalled Skin::getNamespaceNotice"
jenkins-bot [Mon, 14 Dec 2015 00:34:54 +0000 (00:34 +0000)]
Merge "Remove uncalled Skin::getNamespaceNotice"

8 years agoMerge "Call Skin::setRelevantUser on Special:UserRights"
jenkins-bot [Mon, 14 Dec 2015 00:34:50 +0000 (00:34 +0000)]
Merge "Call Skin::setRelevantUser on Special:UserRights"

8 years agoMerge "PHP 7 compatibility: Fix variable interpolation in ImageGalleryBase.php"
jenkins-bot [Mon, 14 Dec 2015 00:29:27 +0000 (00:29 +0000)]
Merge "PHP 7 compatibility: Fix variable interpolation in ImageGalleryBase.php"

8 years agoMerge "PHP 7 compatibility: Fix variable interpolation in RevisionDeleter.php"
jenkins-bot [Mon, 14 Dec 2015 00:29:23 +0000 (00:29 +0000)]
Merge "PHP 7 compatibility: Fix variable interpolation in RevisionDeleter.php"