Commit graph

58941 commits

Author SHA1 Message Date
Erik Bernhardson
d55fedfba8 Introduce Message::plaintextParam
I have run into numerous issues trying to utilize unsafe user
provided content as an argument to a Message instance.  Specific
cases are enumerated in MessageTest.php

Typically the solution to using user provided text is to use
Message::rawParam, but this pushes escaping of the parameter to
the caller.  This patch introduces Message::plaintextParams which
handles escaping of the string parameter to match the requested
output format.

The functionality is:
* plain and text: exactly like rawParams()
* escaped, parse and parseAsBlock: escape it but don't do brace expansion

Additionaly, similar to Message::rawParam, plaintext parameters are not
valid parser function arguments.

Change-Id: I320645cd23c98fea4bfc32ab22b7ef8d320957cb
2014-09-30 12:51:29 -07:00
jenkins-bot
0755177e64 Merge "Add parser callback to get a page's current revision" 2014-09-25 22:52:10 +00:00
Reedy
a5994e2776 Revert "API: Fix list=allusers with multiple values for augroup"
Causing a large load spike on enwiki api db slaves

This reverts commit aa5800519f.

Change-Id: Ied559c4e701bb644b354af4e158b84537dde94e9
2014-09-25 21:33:54 +00:00
jenkins-bot
e681b2641c Merge "Revert "Set site logo url in ResourceLoaderSiteModule instead of inline styles"" 2014-09-25 21:31:44 +00:00
Legoktm
099602556d Revert "Set site logo url in ResourceLoaderSiteModule instead of inline styles"
This caused bug 71334. The logo should be split out
into its own ResourceLoader module rather than
being in the site module.

This reverts commit efe0169c59.

Bug: 71334
Change-Id: I0234e78f93c2eb6574bae4ad48941498709ae528
2014-09-25 21:17:54 +00:00
Translation updater bot
500e80d991 Localisation updates from https://translatewiki.net.
Change-Id: I4eb4f41d8495ffc44d0d60563a4fb5652abd5cdc
2014-09-25 22:41:28 +02:00
jenkins-bot
592c5c6d6f Merge "Created DatabaseBase::trxTimestamp method and added usage in ActiveUsers query" 2014-09-25 20:29:58 +00:00
jenkins-bot
4c15ddc6b9 Merge "Move editoptions styling to mediawiki.skinning/interface.css" 2014-09-25 19:45:17 +00:00
isarra
d30edce749 Move editoptions styling to mediawiki.skinning/interface.css
Adding the editoptions box styling to mediawiki.skinning.interface instead
of the skin-agnostic mediawiki.action.* means it will only be added to skins
where it's likely to be appropriate, as this is also where the similar styles
for toc, categories, etc are defined.

This way skins in which the editoptions box would be inappropriate need never
worry about it anyway because they won't be using mediawiki.skinning.interface
for the same reason.

Bug: 58254
Change-Id: Ibd1c0617c426e34e7213ca0ce89a126340b012a7
2014-09-25 19:38:20 +00:00
Kunal Mehta
c6289d013e ResourceLoaderFileModule: Support fallback in 'languageScripts'
Bug: 58139
Change-Id: Idd7657aa48a9eb2b075a85f77e066b425f330890
2014-09-25 10:51:16 -07:00
Bartosz Dziewoński
e9c41b239c Merge "Make mediawiki.action.view.dblClickEdit recheck preference" 2014-09-25 16:47:28 +00:00
Alex Monk
d31afa8147 Make mediawiki.action.view.dblClickEdit recheck preference
There's a preference which makes the browser go to action=edit when double
clicking on the content. In VE we want to disable this while the editor is
open. With this check in place, we can turn it off by falsifying the value
of the preference (and then restoring the original value when VE closes).

Bug: 53058
Change-Id: I0f6225b25ad279755548361f82b855727758da2b
2014-09-25 17:37:02 +01:00
jenkins-bot
c80218d193 Merge "Fix string callbacks for special page registration" 2014-09-25 16:17:53 +00:00
Bene
8c005503e8 Fix string callbacks for special page registration
Currently registering a special page with a factory by passing the
callback string does not work because the is_string check comes
before the is_callback check. If we change the order of this if-
clauses we can also support callbacks like 'Factory::createPage'.

Change-Id: I751f97026ed8c580732c74d66b2804dd180ed16f
2014-09-25 17:49:04 +02:00
jenkins-bot
a29c51728e Merge "mediawiki.action.history.diff: Remove white background from table.diff" 2014-09-25 15:41:28 +00:00
jenkins-bot
e6e6861881 Merge "Add ability to pre-render thumbnails at upload time" 2014-09-25 15:40:07 +00:00
isarra
42583e9558 mediawiki.action.history.diff: Remove white background from table.diff
Skins where a white background works generally already have a white background
behind this. Skins where it doesn't work generally just wind up overriding this
back to the default (transparent).

Simply removing the background should simplify things.

Change-Id: I1a906f533f7ae2697ee18c998f316a0957ac8bda
2014-09-25 15:33:57 +00:00
Reedy
1d083a09e5 Couple of type hints for Block
Change-Id: I9d16fbc2415fc4e751edc76be4dc3c7a62bd62c0
2014-09-25 15:11:39 +00:00
Brad Jorsch
ad522beeea More sensible behavior when special page aliases conflict
Right now, SpecialPageFactory::getAliasListObject() just chooses the
last-seen alias and allows any alias to completely override the page's
"canonical" name (from SpecialPageFactory::$list or $wgSpecialPages).
Although the latter doesn't come up often since (almost?) all special pages
have their canonical name as one of their English-language aliases.

More sensible behavior is to always prefer the "canonical" name over any
conflicting aliases, and to prefer an alias that's the first alias for a
special page over one that is a fallback.

Also, when a special page's first alias winds up not actually referring
to that special page, we MUST NOT go redirecting other names for that
special page to that wrong alias.

Bug: 70686
Change-Id: I4b17ec0fdc87b4b0d7ae9d9eea7ffacb54dd6891
2014-09-25 07:57:01 +00:00
Yuri Astrakhan
89ac348b77 Minor code cleanup and a doc type cleanup
Change-Id: Ib89226a83738d1205405eac3926bfaa578966133
2014-09-24 22:13:19 -04:00
Timo Tijhof
eaac07ac27 resourceloader: Clean up $localBasePath variable assignment
No need to set a variable to value of itself. Also consistent
with the way $remoteBasePath is set, already.

Change-Id: I9b71322592a5ca2d85927fcf6732096f758847e9
2014-09-25 01:32:45 +00:00
jenkins-bot
00a57c77e3 Merge "Fixed header in file history" 2014-09-24 23:54:48 +00:00
jenkins-bot
9e732e97a5 Merge "Limit active DB connections spawned in waitForAll() to one" 2014-09-24 23:52:24 +00:00
jenkins-bot
55647f5c92 Merge "Use a less confusing column alias in findMissingFiles.php" 2014-09-24 22:46:13 +00:00
Aaron Schulz
cbdb81d1bc Limit active DB connections spawned in waitForAll() to one
* If new connections are created, they will be closed before
  making the next ones now.

Change-Id: I289d81ec00d3e1e313624e2a4c28a67bfb317feb
2014-09-24 22:40:30 +00:00
Aaron Schulz
958a13b025 Created DatabaseBase::trxTimestamp method and added usage in ActiveUsers query
Change-Id: Iba3c83ce8010583908f9dbaa8348f7226f524793
2014-09-24 22:38:36 +00:00
Aaron Schulz
103ff32fbc Fixed doc typo
Change-Id: I80aa85337357d25b1973b4a266a3c961843b08b6
2014-09-24 15:13:30 -07:00
jenkins-bot
343c01d56b Merge "Made JobQueueDB::doWaitForBackups wait for the right slaves" 2014-09-24 20:15:59 +00:00
Aaron Schulz
87e33d67c9 Made JobQueueDB::doWaitForBackups wait for the right slaves
Change-Id: I6022fea7add5c317da89d5361d166a047bcc95e4
2014-09-24 13:07:34 -07:00
Translation updater bot
d94e0706f5 Localisation updates from https://translatewiki.net.
Change-Id: I66241c255b5cf101a32f239df9b4276ca3c37946
2014-09-24 21:53:39 +02:00
jenkins-bot
513e434b2a Merge "Fix function case: WebRequest::getIntorNull -> getIntOrNull" 2014-09-24 19:24:39 +00:00
csteipp
6aa3befeb0 SECURITY: Enhance CSS filtering in SVG files
* Filter <style> elements
* Normalize style elements and attributes before filtering
* Add checks for attributes that contain css
* Add unit tests for html5sec and reported bugs

Bug:69008
Change-Id: I732eece710f1bfaaeea1e5de541fcd4cfb375de7
2014-09-24 21:06:54 +02:00
umherirrender
68c5007007 Fix function case: WebRequest::getIntorNull -> getIntOrNull
Change-Id: I3cdbb17ae00b9565f522a80e1455edf375043763
2014-09-24 20:50:15 +02:00
Prateek Saxena
930dcafb09 HtmlForm: Add @since annotation for methods added to UI standardization
Change-Id: I74f58df9de79d2ad055eaf9760763005996dc0a0
2014-09-24 18:23:33 +00:00
jenkins-bot
0d92e1088e Merge "HtmlForm: Use mw-ui-checkbox only if wgUseMediaWikiUIEverywhere is enabled" 2014-09-24 18:15:21 +00:00
jenkins-bot
bb2d133137 Merge "Remove unused system messages "loginstart", "loginend" and "loginend-https"" 2014-09-24 17:29:54 +00:00
jenkins-bot
b4c68577cb Merge "Per 5a4a33a, remove support for magic quotes gpc" 2014-09-24 17:26:56 +00:00
Chad Horohoe
14a81a7dc7 $wgTitle is not needed for running parser tests
Change-Id: Iaf14b1bc15763207a30cf624d5876120b0d5ce01
2014-09-24 09:56:43 -07:00
Tim Starling
0e5e02c985 Add a process cache for fetchLanguageNames
Since it is slow and is called many times when articles with lots of
interlanguage links are viewed.

Change-Id: Ib826ea6f1c105ffd43e456fb1c0c3b8aa6d8e391
2014-09-24 16:03:16 +00:00
Tim Starling
f215a7216b Profiling for Language::fetchLanguageNames
It is 16% of an enwiki Main Page parser cache hit, under HHVM.

Change-Id: Ifb2ce7592fa5b5cb9c7fb5af5949c43fecf18ca3
2014-09-24 16:02:53 +00:00
jenkins-bot
b022afc009 Merge "Split SkinTemplate.php per-class" 2014-09-24 15:59:08 +00:00
jenkins-bot
f03b4fd257 Merge "Fix API-related 1.25 release notes" 2014-09-24 15:56:42 +00:00
Brad Jorsch
62974a71ec Fix API-related 1.25 release notes
Use the section headers from 1.24, and move an entry that was placed in
the wrong section in Iff8d444c.

Change-Id: I460551491f23352f08e64aa3f216e2e5f39b5a6f
2014-09-24 11:48:25 -04:00
Brad Jorsch
1efb0a4880 API: ApiBase::PROP_* constants are deprecated
They should have been marked so along with Ie11a401d.

Change-Id: I029f81dabf89c1765fc514579f44a6a0c940b572
2014-09-24 11:42:22 -04:00
jenkins-bot
49230edd04 Merge "Add cURL constants test" 2014-09-24 15:35:33 +00:00
jenkins-bot
596e959d23 Merge "Add API output skin" 2014-09-24 15:20:41 +00:00
Brad Jorsch
55071b5bd9 Add API output skin
The API output for help and 'fm' formats will soon have need of
including ResourceLoader modules on an otherwise-bare page. The easiest
way to do this is to use OutputPage, but that requires a skin. So let's
add a skin that outputs a basic page without any navigation elements or
other chrome (that may be added later, but that can wait for Design to
decide they want to design it).

Change-Id: Ifa95fae5acaa3cfbf2ca58a15f8d0c51d84b455a
2014-09-24 11:07:57 -04:00
jenkins-bot
d5436a529f Merge "Fixes to prevent duplicate rows in ActiveUser cache" 2014-09-24 14:49:38 +00:00
Bartosz Dziewoński
a3bf1f610e Split SkinTemplate.php per-class
Change-Id: Id964cdc3bd362d696628d62cd34615aa1fa6b014
2014-09-24 11:54:26 +02:00
robinhood701
684e272307 Fixed header in file history
Change-Id: I622ddac6ea5bd1a3f8c14253e70c1a5a4c56b478
2014-09-24 00:56:51 -04:00