Commit graph

61696 commits

Author SHA1 Message Date
umherirrender
4f60a37d4e Migrate import log to new log system
There is no need for an extra formatter class, because at the moment
there is nothing extra to format.

This allows use of gender on Special:Log. Old messages are kept for use
in IRC. A test was added to ensure an unchanged IRC message.

The new log message for import-interwiki is used from
I3ca8b21bce49b41cac7109efb8056ca4469b88d7 to avoid "transwiki jargon".

Bug: T57404
Change-Id: I590075b203548c071a98c1eaa4b1bc9250f60e22
2015-03-18 13:21:52 +00:00
jenkins-bot
8028800125 Merge "Truncate null revision comment for whole multibyte characters" 2015-03-18 08:02:03 +00:00
Bartosz Dziewoński
5205405385 Emergency remove .mw-headline-anchor
Follows-up 6c7480e5f0, d2a6a73d2.

The should stop the § character from being indexed by Google et al.

Bug: T18691
Bug: T93000
Change-Id: Ie9e334e973e3ded270f1897a2c3816d9df739fc0
2015-03-17 22:31:45 +00:00
jenkins-bot
e912197b09 Merge "Optimize order of styles and scripts" 2015-03-17 21:31:04 +00:00
jenkins-bot
e98eebda42 Merge "Fixed timestamp comparison in fixUserRegistration" 2015-03-17 18:50:50 +00:00
Arlo Breault
6b33e7fc21 Sync up with Parsoid parserTests.
This now aligns with Parsoid commit 9d213e1eb420bfd9ef6fbc661556b40c8aee32f6

Change-Id: Icb9de1ae26a7148fb0fe68840c5a9cfd45640560
2015-03-17 10:09:54 -07:00
jenkins-bot
0850a99ef1 Merge "Tidy up tidy usage" 2015-03-17 16:06:24 +00:00
jenkins-bot
6cacd6ba96 Merge "API unittests, pass optional params to doApiRequest()" 2015-03-17 14:05:42 +00:00
jenkins-bot
5f690a2c46 Merge "New testing wrapper to circumvent object access" 2015-03-17 14:03:39 +00:00
Adam Roses Wight
9cfbbbe946 New testing wrapper to circumvent object access
The new TestingAccessWrapper class provides a convenient way to make
all of an object's methods and properties public.

TODO: We should organize test helpers into a source directory.  Note that the
helper and its test are in the same directory.

Change-Id: I958d55df18c74e9d2b25d98cd0316989a0fbbe6f
2015-03-16 23:58:36 -07:00
Aaron Schulz
88eab303d4 Fixed timestamp comparison in fixUserRegistration
* Also optimized batching logic slightly

Change-Id: I0cedb5b39f996b7baec067890f230cff51468e4b
2015-03-16 19:33:25 -07:00
Ori Livneh
e86e5f8460 Optimize order of styles and scripts
The current ordering of scripts and stylesheets in <head> causes all major
browsers to serialize and defer requests that could be performed in parallel.

The problem is that external stylesheets are loaded before inline scripts. As
Steven Souders explains, "all major browsers preserve the order of CSS and
JavaScript. The stylesheet has to be fully downloaded, parsed, and applied
before the inline script is executed. And the inline script must be executed
before the remaining resources can be downloaded. Therefore, resources that
follow a stylesheet and inline script are blocked from downloading."[1]

In other words: the browser could start loading body images, but it refuses to
do that until it has executed inline scripts in head. And it refuses to execute
those scripts until the external CSS is downloaded, parsed and applied. You can
see the effect of this in this image, showing the request waterfall for
[[en:Gothic Alphabet]]: [2]. Notice how no images were requested before the
browser had finished processing the three load.php requests at the top.

To fix this, we want to move the inline scripts above the external CSS. This is
a little bit tricky, because the inline scripts depend on mw.loader, which is
loaded via an external script. If we move the external script so that it too is
above the external stylesheet, we force the browser to serialize requests,
because the browser will not retrieve the external CSS until it has retrieved
and executed the external JS code. So what we want is to move the inline
scripts above the external stylesheet, but keep the external script (which the
inline scripts depend on) below the external stylesheet.

We can do this by wrapping the inline script code in a closure (which binds
'mw') and enqueuing the closure in a global array which will be processed by
the startup module at just the right time.

Net result: external CSS and JS is retrieved in parallel, retrieval of images
(and other external assets) is unblocked, but the order in which code is
evaluated remains the same.

[1]: <http://www.stevesouders.com/blog/2009/05/06/positioning-inline-scripts/>
[2]: <http://people.wikimedia.org/~ori/enwiki-waterfall.png> (excerpted from
 <http://www.webpagetest.org/result/150316_0C_7MB/1/details/>.

Change-Id: I98d383a6299ffbd10210431544a505338ca8643f
2015-03-17 03:10:49 +01:00
Yuri Astrakhan
51e4f30eb7 API unittests, pass optional params to doApiRequest()
ApiQueryTestBase::check() should pass all optional params
like session and user to the doApiRequest()

Change-Id: If1cb52b03faba06c97d330a91a23893fe08acf22
2015-03-17 04:07:24 +03:00
jenkins-bot
d4dae8e095 Merge "Regenerate autoload.php" 2015-03-17 00:19:07 +00:00
Timo Tijhof
6b03627584 Regenerate autoload.php
Follows-up 87dfc20b1e.

It recently started generating dirty output because
BufferingStatsdDataFactory was manually placed – in a different
position than script would (i.e. not alphabetical).

Change-Id: I030a6ec9eb6f3a9b6cb54c9646acf2a898b93a80
2015-03-17 01:08:01 +01:00
Yuri Astrakhan
95f22fafaf Fixed phpunit exception test
phpunit has removed that class in
f0322b6978
instead adding a dependency on "sebastian/comparator": "dev-master"
https://github.com/sebastianbergmann/comparator

The class name changed from PHPUnit_Framework_ComparisonFailure
to \SebastianBergmann\Comparator\ComparisonFailure\ComparisonFailure

Bug: T90880
Change-Id: I8988d0b07c00f54c8c8dd38a5e92a5736d88b163
2015-03-17 03:01:28 +03:00
jenkins-bot
0c9dc0f8f9 Merge "Ignore phpcs in autoload.php" 2015-03-16 22:00:51 +00:00
jenkins-bot
0043b77c5d Merge "Add batching support to fixUserRegistration.php" 2015-03-16 21:23:54 +00:00
jenkins-bot
fd3ab8df2a Merge "JsonContent: Pass FormatJson::UTF8_OK when beautifying JSON" 2015-03-16 21:23:06 +00:00
jenkins-bot
737a9d3f20 Merge "Fix log message for blocks without duration" 2015-03-16 21:21:42 +00:00
Kunal Mehta
ea406e42cd Add batching support to fixUserRegistration.php
Also:
* Add wfWaitForSlaves() call
* Clear User cache after updating registration time
* Don't use empty()
* Use the master for everything

Bug: T92890
Change-Id: I88b97befdbd78ef12eda9a9571f6943c7b232207
2015-03-16 14:12:33 -07:00
Bartosz Dziewoński
d7389bd865 JsonContent: Pass FormatJson::UTF8_OK when beautifying JSON
Currently it is not beautiful at all.

Change-Id: I82a07238b4213212b8e4a7150e35486f6dc90bc6
2015-03-16 21:53:33 +01:00
Arlo Breault
78c3f2f4b1 Tidy up tidy usage
* There's a branch path in the sanitizer that depends on $wgUseTidy,
   which means the test output differs from on wiki.

 * In general, we should set these variables to match the wiki behaviour
   in tests.

 * Exposes T92892, Sanitizer removes empty tags when tidy is disabled.

 * Tweaked tests for T19663 to use an extension tag to show that
   HTML5 tags with non-word characters make it through the parser
   intact (before being ultimately sanitized).

Change-Id: I09c72fd739e11a8b757f37dc4c790758d782ad73
2015-03-16 16:33:50 -04:00
Translation updater bot
10e20241c0 Localisation updates from https://translatewiki.net.
Change-Id: I4ca8bda44de1a3e7efec4e7322fb9659446d3988
2015-03-16 21:32:14 +01:00
umherirrender
52bf90f41c Fix log message for blocks without duration
Very old blocks form 2004 have not any log_params and therefor enforce a
duration of infinite to be shown on Special:Log.

Follow-Up: Ibc7fcaa5a952ff90d42a6477da4baa429f3de64b
Change-Id: I4bdfab1ff865501a780ed0c7c50e2b1bab467a4b
2015-03-16 20:51:05 +01:00
Kunal Mehta
510dfa7d9a Fix phpcs errors and warnings in includes/specials
Change-Id: I7608459fd50963fa8478b97ccd8f5a1a9d87aae8
2015-03-16 18:29:40 +00:00
Timo Tijhof
e5f0884ec4 Ignore phpcs in autoload.php
Causes 20 warnings for line length
https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs-HEAD/13849/console

As being autogenerated, migth as well ignore so we can have
mediawiki-core pass.

Change-Id: Iedbe527456144c9b09b7ba93a8ce67edf0b47015
2015-03-16 19:09:28 +01:00
jenkins-bot
b15cd2ee45 Merge "Re-introduce AvailableRightsTest for User::getAllRights completeness" 2015-03-16 18:00:02 +00:00
jenkins-bot
2b40ee625d Merge "registration: Fix merging of $wgExtensionCredits" 2015-03-16 17:37:51 +00:00
jenkins-bot
d3efb28185 Merge "Clean up $wgSQLiteDataDir handling and removed standalone sqlite class" 2015-03-16 17:22:10 +00:00
Kunal Mehta
da17b9bf74 registration: Fix merging of $wgExtensionCredits
$wgExtensionCredits has two-levels of arrays, so it needs to be merged
recursively.

Bug: T91609
Change-Id: I4e5fc50059745a89fb69bc1e05a299fd9aaee968
2015-03-16 09:47:48 -07:00
jenkins-bot
093bb2e23e Merge "Lower timeout of upload stash -> image scaler requests" 2015-03-16 15:10:21 +00:00
Derk-Jan Hartman
c223e0bfb0 ApiParse: Support previewing section=new
When live previewing a 'new' section, we want to automatically add the
edit summary/sectiontitle as an H2 element, as the Edit Page and API
do as well.

Bug: T84877
Change-Id: I40925c16284bb97a4d491e12a8e7878b9d1b4810
2015-03-16 14:56:45 +00:00
Prtksxna
0290eccb8d Merge "Enable mw-ui-radio styles on Special:Preferences" 2015-03-16 10:36:07 +00:00
Translation updater bot
5ae7b2159c Localisation updates from https://translatewiki.net.
Change-Id: I5547cae4cf155c31b20a231e1fd7f81848e14612
2015-03-15 21:17:22 +01:00
Brad Jorsch
8f176b04c9 Set main RequestContext title in api.php
We set $wgTitle to a dummy title, and RequestContext::getMain()->getTitle()
falls back to that so everything *works*, but RequestContext whines
about it.

Set the same dummy title explicitly on RequestContext::getMain() to shut
things up.

Bug: T78414
Change-Id: I5b90df16cf2f51a6edd5898e9712161f335202a7
2015-03-15 19:27:54 +00:00
jenkins-bot
631fa2255d Merge "Fix phpcs errors and warnings in includes/specialpage" 2015-03-15 19:14:01 +00:00
Kunal Mehta
980d5e3bc6 Fix phpcs errors and warnings in includes/specialpage
Change-Id: Ie9276c162e20b28915d31e5a87b2f18cf1c295b6
2015-03-15 19:07:06 +00:00
Fomafix
d015dd001f API: Return parsedsummary on onlypst
This updates the summary preview on "Show changes" for LivePreview.

Bug: T84836
Change-Id: I169fd1e1b6ed4d4f43ca69f92bc7a38e7823ddae
2015-03-15 19:02:04 +00:00
jenkins-bot
944d8d8d17 Merge "Fix phpcs errors and warnings in includes/site" 2015-03-15 03:29:59 +00:00
Kunal Mehta
cb65b994db resourceloader: Add ResourceLoader::isModuleRegistered()
Currently if code wants to check whether a module is registered it
has to call getModule() and see if the response !== null.

Change-Id: I4b470083ddaa5d8cd6be50d5c5b690d4b99b6c4a
2015-03-15 02:45:43 +00:00
jenkins-bot
5ab812a37f Merge "Fix phpcs errors and warnings in includes/exception" 2015-03-15 02:45:32 +00:00
jenkins-bot
c1aa818191 Merge "Fix phpcs errors and warnings in includes/json" 2015-03-15 02:42:53 +00:00
jenkins-bot
15678da39c Merge "Fix phpcs errors and warnings in includes/skins" 2015-03-15 02:42:48 +00:00
jenkins-bot
53af02ed82 Merge "Fix phpcs errors and warnings in includes/filerepo" 2015-03-15 02:42:13 +00:00
Kunal Mehta
e549f9d007 Fix phpcs errors and warnings in includes/site
Change-Id: Id6ae5659af6062b92bb964f1f0951e61408725ec
2015-03-15 02:37:39 +00:00
Kunal Mehta
90f3ca0439 Fix phpcs errors and warnings in includes/exception
Change-Id: I979c94a41df67426e621a734d5a86d55b890d269
2015-03-14 19:36:51 -07:00
Kunal Mehta
c91fd8043b Fix phpcs errors and warnings in includes/json
Change-Id: Id5ae1cabe87f73f7458a744834ebb6a1a7c3dbf8
2015-03-15 02:35:26 +00:00
Kunal Mehta
d8ca62f278 Fix phpcs errors and warnings in includes/skins
Change-Id: I800f8fcd6c1ac16d0a0bd20799550de577306ded
2015-03-15 02:35:08 +00:00
Kunal Mehta
b1d1a7f51a Fix phpcs errors and warnings in includes/filerepo
Change-Id: I8a2b437f9f393baf4ee6546d654d56845fcdd1b6
2015-03-15 02:34:41 +00:00