lhc/web/wiklou.git
8 years agoMerge "API: Add a unit test to check all modules' i18n"
jenkins-bot [Sat, 19 Dec 2015 14:25:44 +0000 (14:25 +0000)]
Merge "API: Add a unit test to check all modules' i18n"

8 years agoMerge "Fix spelling mistakes in comments"
jenkins-bot [Sat, 19 Dec 2015 14:19:44 +0000 (14:19 +0000)]
Merge "Fix spelling mistakes in comments"

8 years agoAPI: Add a unit test to check all modules' i18n
Brad Jorsch [Thu, 17 Dec 2015 19:57:12 +0000 (14:57 -0500)]
API: Add a unit test to check all modules' i18n

It's not perfect since module i18n can vary on configuration, but it
should catch many cases of forgotten i18n.

Change-Id: Ida7e5720fe304c5168fe752b1b5485fe4cb2cb45
Depends-On: I4a0a6c47afdd62e1c9d0b29f066d2a6d1791b52d
Depends-On: I378d112a36c0981ac8d5366e3e1805ead71a85c8
Depends-On: If9e1ae5f1e360385e70bd68ec9847230bd274d9d
Depends-On: If2694de72a62e46cfdc29401c4d2d3756897c998

8 years agoFix spelling mistakes in comments
Ed Sanders [Sat, 19 Dec 2015 12:45:47 +0000 (12:45 +0000)]
Fix spelling mistakes in comments

Change-Id: Id608f402e1f308fbe83e6c262e5f2750efb41ebb

8 years agoMerge "jquery.suggestions: Improve comment about avoiding click interference"
jenkins-bot [Sat, 19 Dec 2015 12:03:30 +0000 (12:03 +0000)]
Merge "jquery.suggestions: Improve comment about avoiding click interference"

8 years agoMerge "Handle missing titles and usernames when importing log items"
jenkins-bot [Sat, 19 Dec 2015 10:26:53 +0000 (10:26 +0000)]
Merge "Handle missing titles and usernames when importing log items"

8 years agoHandle missing titles and usernames when importing log items
georggi [Sat, 19 Dec 2015 09:06:26 +0000 (11:06 +0200)]
Handle missing titles and usernames when importing log items

Bug: T121338
Change-Id: Idf95263e4f22225509da4ee07fcb14383028894b

8 years agojquery.suggestions: Improve comment about avoiding click interference
Timo Tijhof [Thu, 17 Dec 2015 19:52:39 +0000 (11:52 -0800)]
jquery.suggestions: Improve comment about avoiding click interference

Change-Id: I971f6163f08cd419c29cac372157c0336b5fd132

8 years agoUpdate cssjanus/cssjanus to v1.1.2
Reedy [Sat, 19 Dec 2015 00:58:19 +0000 (00:58 +0000)]
Update cssjanus/cssjanus to v1.1.2

Change-Id: I29ab5aa1f3015f817576d84aad836d22aed012bb
Depends-On: Iaf72a626c75b34a6c9a1b3381a80e74040e72355

8 years agoMerge "Refresh autoload.php"
jenkins-bot [Fri, 18 Dec 2015 22:49:49 +0000 (22:49 +0000)]
Merge "Refresh autoload.php"

8 years agoMerge "Allow overriding the resultSetType reported via event logging of suggestions"
jenkins-bot [Fri, 18 Dec 2015 22:35:22 +0000 (22:35 +0000)]
Merge "Allow overriding the resultSetType reported via event logging of suggestions"

8 years agoRefresh autoload.php
Bartosz Dziewoński [Fri, 18 Dec 2015 22:33:55 +0000 (23:33 +0100)]
Refresh autoload.php

/me stabs Aaron

Change-Id: I82233877840273ece1c41da73c998fa2bd1b2c99

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 18 Dec 2015 21:55:23 +0000 (22:55 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I8d03c07972638e68812a6c06d9da00e283374736

8 years agoAllow overriding the resultSetType reported via event logging of suggestions
Erik Bernhardson [Fri, 18 Dec 2015 21:21:53 +0000 (13:21 -0800)]
Allow overriding the resultSetType reported via event logging of suggestions

Change-Id: I0c1b19019f11b719a6d728d6a46881cc83ca2430

8 years agoMerge "No-op the notify*/purge methods in JobQueueAggregatorRedis"
jenkins-bot [Fri, 18 Dec 2015 20:14:41 +0000 (20:14 +0000)]
Merge "No-op the notify*/purge methods in JobQueueAggregatorRedis"

8 years agoMerge "Remove unused ApiStashEdit variable"
jenkins-bot [Fri, 18 Dec 2015 20:08:39 +0000 (20:08 +0000)]
Merge "Remove unused ApiStashEdit variable"

8 years agoMerge "Don't trigger 'wikipage.diff' hook for content that looks like a diff"
jenkins-bot [Fri, 18 Dec 2015 19:27:16 +0000 (19:27 +0000)]
Merge "Don't trigger 'wikipage.diff' hook for content that looks like a diff"

8 years agoAdd a new hook AfterBuildFeedLinks to manipulate feed links
Florian [Fri, 18 Dec 2015 19:09:34 +0000 (20:09 +0100)]
Add a new hook AfterBuildFeedLinks to manipulate feed links

Some extensions may want to replace, remove or manipulate a specific
feed link after it was build. For this purpose: Add a new hook to enable
this. The hook isn't meant for adding new feed links, this is already
easily possible using OutputPage::addFeedLink().

Bug: T121774
Change-Id: If48bd07a0e7e67fd1c1a94ebaa28ca9dae146c55

8 years agoMerge "Make ApiStashEdit use statsd metrics"
Aaron Schulz [Fri, 18 Dec 2015 16:19:11 +0000 (16:19 +0000)]
Merge "Make ApiStashEdit use statsd metrics"

8 years agoMerge "Avoid negative JobRunner time stats"
Aaron Schulz [Fri, 18 Dec 2015 16:19:05 +0000 (16:19 +0000)]
Merge "Avoid negative JobRunner time stats"

8 years agoMerge "Adds i18n for ApiRollback.php tag parameter"
jenkins-bot [Fri, 18 Dec 2015 10:49:00 +0000 (10:49 +0000)]
Merge "Adds i18n for ApiRollback.php tag parameter"

8 years agoAdds i18n for ApiRollback.php tag parameter
mhutti1 [Thu, 17 Dec 2015 22:16:57 +0000 (23:16 +0100)]
Adds i18n for ApiRollback.php tag parameter

My first patch lacked this but it should now be added.

Bug: T121805
Change-Id: Ie58110e7bd09bf45dfcf10d0d2ca8d0e7b8ad82e

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 agoMake ApiStashEdit use statsd metrics
Aaron Schulz [Wed, 16 Dec 2015 19:42:12 +0000 (11:42 -0800)]
Make ApiStashEdit use statsd metrics

Change-Id: Iffdeae7f867490e3c69c4b6d79a5f844cb7fce23

8 years agoAvoid negative JobRunner time stats
Aaron Schulz [Wed, 16 Dec 2015 22:43:12 +0000 (14:43 -0800)]
Avoid negative JobRunner time stats

This can happen in sub-second cases with skew. It makes
graphana tend to see -1 as the min for some time values.

Change-Id: I4e39d8ac29f515fd76548f1a7b64d71a03064407

8 years agoNo-op the notify*/purge methods in JobQueueAggregatorRedis
Aaron Schulz [Thu, 12 Nov 2015 03:20:07 +0000 (19:20 -0800)]
No-op the notify*/purge methods in JobQueueAggregatorRedis

This should be managed by the background service now

Change-Id: I5d905760b509f66e10019ff8a4146db8a6c4c9d7

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 agoRefreshLinksJob: Restore LinksUpdate::setTriggeringUser() call
Kunal Mehta [Thu, 17 Dec 2015 18:50:53 +0000 (10:50 -0800)]
RefreshLinksJob: Restore LinksUpdate::setTriggeringUser() call

This partially reverts 22476baa85bdb70c60, as the setTriggeringUser()
call that was removed was being used by Echo to be able to determine
which user caused a LinksUpdate to be triggered.

Bug: T121780
Change-Id: I62732032a6b74f17b5ae6a2497fa519f9ff38d4f

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 agoAdd $revision to TitleMoveCompleting for completeness
Aaron Schulz [Thu, 17 Dec 2015 03:11:15 +0000 (19:11 -0800)]
Add $revision to TitleMoveCompleting for completeness

Follow up to 9cc2f62bf5ae.

Change-Id: Ibb48f6673b9be1863563262fff8bedc5aed7926c

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 unused ApiStashEdit variable
Aaron Schulz [Wed, 16 Dec 2015 05:23:23 +0000 (21:23 -0800)]
Remove unused ApiStashEdit variable

Change-Id: Ifd85dd6b96e80d7c1163566153e8d746b27754d8

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 agoDon't trigger 'wikipage.diff' hook for content that looks like a diff
Timo Tijhof [Thu, 3 Dec 2015 12:12:25 +0000 (12:12 +0000)]
Don't trigger 'wikipage.diff' hook for content that looks like a diff

Follows-up 9cfb9cb9fba, and b62f0e91564.

Add data-mw="interface" to elements created by the interface
(e.g. not user-generated content) and use this to narrow down
scope of elements eligible for JavaScript binding.

This avoids bugs where e.g. the diff hook triggers on a wiki page about diffs.
This isn't a security issue per-se, but causing odd behaviour.

Also add missing tests for data-ooui filtering (follows-up aa9a52da).

Change-Id: I9a0c86c92d411538bd9e203ec6ae54616fdf49b8

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 agoDocument mw.user.options and mw.user.tokens properties
Timo Tijhof [Tue, 15 Dec 2015 02:29:42 +0000 (18:29 -0800)]
Document mw.user.options and mw.user.tokens properties

Change-Id: If1e4ba0bda0147d9f00f74c823f56ac8b886fc19

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