Commit graph

3634 commits

Author SHA1 Message Date
Florian
ba40a63c0e Don't construct SpecialPages twice
If the special page object was already created for the request, there's
no need to create the object again. Save the created result (object, null)
in a global static array and return the value if the realName was already
created.

Bug: T123995
Change-Id: I70bf0e93e45f4b0597deaef717f5eb87c66f0a71
2016-04-02 17:45:20 +02:00
Florian
876ae95e63 Remove Title::newFromRedirectArray
Bug: T122754
Change-Id: I2cdeb98c81d4b98ea986bd2f7b23cd93c62c5930
2016-04-02 13:28:37 +00:00
addshore
6ae77e6984 Introduce NullStatsdDataFactory
I have left the phpdocs in NullStatsdDataFactory
to clearly show the return types of the interface
implemented.

Change-Id: I96cb64b4af16fc087028269a53d539f8c132f81c
2016-04-02 13:02:37 +00:00
jenkins-bot
fe5d88563b Merge "Support custom query in pt-heartbeat lag detection " 2016-04-02 00:16:24 +00:00
Aaron Schulz
6e38db159c Support custom query in pt-heartbeat lag detection
Bug: T111266
Change-Id: Ib0f9ca8072d9becebacfa8c9afe9d61567f73912
2016-04-01 23:41:14 +00:00
Timo Tijhof
7c5991bcbc Disable flaky UIDGeneratorTest::testTimestampedUID test
Currently causing builds to break all over the place. Disable
until someone can attend to it.

Bug: T131549
Change-Id: I0eb29c53e70ef84a4facc137a3bf20f64a673511
2016-04-02 00:06:21 +01:00
Florian
0f60a6d6ce Remove (WikiPage|Article)::replaceSection()
Bug: T122754
Change-Id: I1415c8de7be3b9d952fad265b439dd820e284fb2
Depends-On: I3d37f7e778d569970ed749c22ba49a63cc4ba0ec
2016-04-01 20:32:01 +00:00
Florian
d2fa6856a8 Remove Revision::getRawText()
Bug: T122754
Depends-On: I742f02021959587edd83a4cfb25e0338d05a8e81
Depends-On: I10283802c26b99d7e345c5c06d59c4ea24002e52
Depends-On: I6da4fab1e0e8f698b824e977dd2336e4415ae1ba
Change-Id: Id1cfda59e381673be99d9561c9997c0baf26d425
2016-04-01 19:57:35 +01:00
addshore
9d18093909 Track the use of the WatchedItemStore Cache
Change-Id: Idc33dd6a52471e895b312fa2c6562a90bf3d7861
2016-04-01 15:06:09 +03:00
addshore
13eb234654 Add WatchedItemStoreUnitTest::newWatchedItemStore
Change-Id: Ic3e1d23b8f707ae5e3221d1c2fd08878ae8bfff9
2016-04-01 14:59:30 +03:00
Reedy
83fb19cb13 Swap the rest of array() -> []
Change-Id: I76a7259ed952a0673a1941f08b39b545211fba07
2016-03-30 22:04:58 +00:00
Brad Jorsch
6c0abf937a Use ::class in place of string constants
This takes advantage of namespacing, and avoids having
double-backslashes all over the place.

Change-Id: I450fe4e9b1c4cf4e24fced3932fe796cbbadf3a3
2016-03-28 14:53:45 -04:00
jenkins-bot
16fbb5a18c Merge "wgUseMediaWikiUIEverywhere false in Html/XmlTest" 2016-03-28 02:23:01 +00:00
jenkins-bot
09208169f3 Merge "Factor SpecilaPageExecutor out of SpecialPageTestBase" 2016-03-28 02:22:44 +00:00
jenkins-bot
54fb9cf9dd Merge "Request-local caching of image_redirect" 2016-03-25 19:33:24 +00:00
Ori Livneh
d1c4eafef5 Request-local caching of image_redirect
LocalRepo::checkRedirect() cache image redirect checks in memory to avoid
unnecessary trips to memcached. Same idea as Idbd11637.

Change-Id: Idaa12376382aaa0bd8cb988240ec1da0b688359d
2016-03-25 12:09:10 -07:00
jenkins-bot
e3bd13db0c Merge "Http::getProxy() method to get proxy configuration" 2016-03-25 15:38:18 +00:00
Sébastien Santoro
6ae9367cdd Http::getProxy() method to get proxy configuration
MediaWiki currently uses two sources for proxy configuration:
	* the $wgHTTPProxy global configuration variable
	* the http_proxy environment variable

The HTTP proxy adress to use is a valuable information for
extensions handling directly HTTP requests instead of use
helper classes provided by the core to construct them.

This change offers an Http::getProxy() utility method to get
the configuration, regardless of the source.

Bug: T117954
Change-Id: I5df31845df71f05ac581f532cc9bd7a1fea25583
2016-03-25 15:10:56 +00:00
jenkins-bot
094066ef6e Merge "Switch Signature of WatchedItemStore::addWatchBatch" 2016-03-25 10:37:43 +00:00
jenkins-bot
c7bf42cad6 Merge "parserTest: Remove mention of non-existent 'noxml' option" 2016-03-24 19:59:56 +00:00
addshore
12e2e9edbc Switch Signature of WatchedItemStore::addWatchBatch
Adding batches of watched items per users
makes much more sense.
Only the deprecated static WatchedItem method
needed the old silly way of passing in objects.

Change-Id: I90f9583b66bd3b5afcf07faefedb38a8a0149f6e
2016-03-24 18:28:08 +00:00
jenkins-bot
b8c26af562 Merge "Use WIS::getWatchedItemsForUser in SpecialEditWatchlist" 2016-03-24 15:06:34 +00:00
jenkins-bot
71d28b9879 Merge "Introduce basic SpecialEditWatchlistTest" 2016-03-24 15:06:30 +00:00
addshore
afa65fe50c wgUseMediaWikiUIEverywhere false in Html/XmlTest
It seems both of these tests assertions all expect
this to be false.

Ic675e92d8dd8f11fa67914d2ce1dc00a379106ca
ended up discovering these issues somehow
with these tests suddenly starting to fail.

Change-Id: I9d2d3c18d1c9640e2ff04d6fd4296abb86e26877
2016-03-24 15:02:34 +00:00
addshore
049fb94979 Factor SpecilaPageExecutor out of SpecialPageTestBase
Change-Id: I3c8ae980db5ba3b34bd6664f400bc3b5cdf587c0
2016-03-24 14:17:55 +00:00
addshore
93d09cf3c2 Introduce basic SpecialEditWatchlistTest
Change-Id: I9f765c4183314850169f685abd242e979a79bd68
2016-03-24 13:27:03 +00:00
addshore
48fd22b1d0 Introduce basic SpecialWatchlistTest
Change-Id: I98a2ad112189a09581a0564da3c3357939a5d7de
2016-03-24 13:19:30 +00:00
addshore
4e42311f92 Use WIS::getWatchedItemsForUser in SpecialEditWatchlist
This also adds a order option to:
WacthedItemStore::getWatchedItemsForUser

Tests are also updated

Change-Id: Ia683b92846ad79bde3f37068a8e168c5a8bdc201
2016-03-24 12:33:38 +00:00
Ricordisamoa
1617e7822e Always use 'bool' instead of 'boolean' in Doxygen tags
Just like commit f86a5590aa

Change-Id: Ic9d08bca6524d6bb4baf5170c081ad0f3d738e28
2016-03-24 09:44:09 +01:00
Timo Tijhof
dd2d7d0ffc OutputPage: Minor clean up of <head> and HTML
* Remove trailing space in self-closing tag.
  Brings parserTest output of Parser and Parsoid closer together.

* Remove various line breaks at begin and end of script contents.

* Remove FILTER_NOMIN from makeConfigSetScript() output.
  This isn't part of any user- or page-dependent module and not minified.
  And Xml::encodeJsCall already ensures compact output for prod mode.

Bug: T127328
Change-Id: I85a5a59fd0955c1a112e8b24b933f0d9e983a156
2016-03-24 03:24:31 +00:00
Timo Tijhof
32f374074c parserTest: Remove mention of non-existent 'noxml' option
The 'noxml' documentation in parserTests.txt was added in 2006 (7eea2398; r12504),
however it wasn't actually implemented.

It wasn't until 2009 (7aa4a8f9; r54767) that $wgWellFormedXml was created,
which defaults to true and has no relation to this option.

Remove the 'noxml' options from existing tests.

Change-Id: Ie3ae9f491b5747716080607b81b9763bf2bcc889
2016-03-24 00:48:02 +00:00
jenkins-bot
98c62a6542 Merge "Add WatchedItemStore::getWatchedItemsForUser" 2016-03-23 15:45:45 +00:00
addshore
659fd5ec9c Add WatchedItemStore::getWatchedItemsForUser
This method is also no used in SpecialEditWatchlist

Unit and Integration tests have also been added.

Bug: T129481
Change-Id: Ica136b6fee63be8de4c2fe502288dd2318d99114
2016-03-23 14:01:31 +00:00
Brad Jorsch
deb46ebfd7 SessionManager: Use existing backend for the ID if one is loaded
This fixes a bug where SessionBackend::resetId() of the PHP session will
fail to properly load $_SESSION because the new session ID hasn't been
saved to the store yet. It's also a reasonable performance improvement,
no need to call loadSessionInfoFromStore() when we already have the
session loaded.

Change-Id: I30f159ef1267442a6325aabbbdfaf69defc10ed6
2016-03-22 17:50:32 -04:00
jenkins-bot
f9128d21b7 Merge "Use WatchedItemStore in ApiQueryInfo::getWatchedInfo" 2016-03-21 10:24:09 +00:00
Leszek Manicki
b92ae1501e Use WatchedItemStore in ApiQueryInfo::getWatchedInfo
Adds a method for getting watchlist's notification timestamps
for a batch of LinkTargets.

Bug: T129482
Change-Id: I1f84212e7879a84b34bb3b53859069fcea282bba
2016-03-21 10:25:54 +01:00
jenkins-bot
e464eff3a4 Merge "Many more function case mismatches" 2016-03-19 00:37:53 +00:00
Reedy
b5656b6953 Many more function case mismatches
Change-Id: I5d3a5eb8adea1ecbf136415bb9fd7a162633ccca
2016-03-19 00:20:58 +00:00
Siebrand Mazeland
4afa4e7dce MediaWikiTestCase::assertException() was removed
Deprecated since 1.22. No uses in core or Gerrit extensions remaining.

Change-Id: Icae4077078c73d766d3c1c9e9e569922151296d9
2016-03-19 00:02:31 +00:00
Reedy
1834ee3d8e Fix numerous class/function casing
Change-Id: I23982bfa0548c9ea3bdb432be7982f1563930715
2016-03-18 23:14:49 +00:00
jenkins-bot
c7b960a2b5 Merge "Remove $wgAllowMicroDataAttributes and $wgAllowRdfaAttributes" 2016-03-18 18:03:04 +00:00
Sébastien Santoro
e789f51f11 Remove $wgAllowMicroDataAttributes and $wgAllowRdfaAttributes
$wgAllowMicroDataAttributes and $wgAllowRdfaAttributes have been
introduced in MediaWiki 1.16 and required at this moment $wgHTML5
to be true. This last setting has been removed in MediaWiki 1.22.

To simplify the code maintenance and the configuration complexity,
those settings are removed and the features are always available.

RDFa users must now explicitly set $wgHtml5Version to a RDFa
version. Currently the correct values are:

  - HTML+RDFa 1.0
  - XHTML+RDFa 1.0

Bug: T130040
Change-Id: I17a7bff2cad170e381eabf0aec4e26e4fd0cddc3
2016-03-18 17:24:56 +00:00
jenkins-bot
b915320928 Merge "Link to Special:WhatLinksHere in CatWatch bundeled summary" 2016-03-18 14:21:24 +00:00
Leszek Manicki
7d4e225cb9 Add WatchedItemStore::countVisitingWatchersMultiple
This is for batch counting of visiting watchers, following the change
made in I2868c31fc09121de381d822e8f49194e3022bb42.
Query/logic has been extracted from ApiQueryInfo.

Bug: T129482
Change-Id: Ia9a534f5edb7af3cb7bf86be358dddb5d8c259cf
2016-03-17 16:17:38 +00:00
addshore
a50a18cd23 Link to Special:WhatLinksHere in CatWatch bundeled summary
This link could probably also include
&hidelinks=1&hideredirs=1 options
at a later stage

Bug: T119712
Change-Id: I578d550d25d92e20360bcaaf5392ef75a868a483
2016-03-17 16:02:49 +00:00
Adrian Heine
110dc4d9a2 Add --with-phpunitclass arg to phpunit.php
This would allow to easily use stuff like
https://github.com/fiunchinho/phpunit-randomizer.

Change-Id: I28e8b1d261de0395366b18465a0adc4d7c4fde4a
2016-03-17 13:58:17 +01:00
Aaron Schulz
4a28737c32 Make Job::toString() handle array parameters better
Previously it would result in array(x) in fairly simple cases.

Change-Id: I6bfe67faa45835babb2c7e259b5cd158e0f0a649
2016-03-16 03:45:35 -07:00
addshore
bfa8662b73 Add WatchedItemStore::countWatchedItems
This method counts the number of individual items
that a user is watching.
A subject and corresponding talk page would mean a
count of 2

Unit and integration tests are also added here

Bug: T129481
Change-Id: I4b55318dc1d1c5abab1c5da16cebf1a43ddf9248
2016-03-15 15:58:51 +00:00
addshore
3ab9a9656c Reset WatchedItemStore default instance after tests
Prior to this change in tests the overridden store
would remain in the instance static and thus could
be used in other places.

This patch introduces the used of ScopedCallbacks
in the override methods in WatchedItemStore.
This means that any instance of WatchedItemStore
should return to a regular state after each test.

This is better than requiring the tests to reset
the value back to the origional as this would likely
be forgotten and result in long hunts for failing
tests.

This was found while writing more tests...

Change-Id: I9aa71425642174ae9ea2c6d4f85dcd07d724af11
2016-03-15 15:36:38 +00:00
jenkins-bot
1ed1cc8769 Merge "Add countUnreadNotifications to WatchedItemStore" 2016-03-15 15:29:59 +00:00