| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
@deprecated since 1.27
Change-Id: Ibdd49fdfc0d1511503e1ed2173a592c612996c53
|
|
|
|
| |
Change-Id: Ib4b452f1843ec250c8c1fcc2a738d80726b6135d
|
|
|
|
| |
Change-Id: I494b029de089a07e3b946ee78293a12d5036f63e
|
|
|
|
|
|
| |
InterwikiLookup::invalidateCache does not expected a return value
Change-Id: I5b2ba21ccb42ba9925205eb1645f2152fd51c0a0
|
|
|
|
|
|
| |
Organize phpcs.xml a bit
Change-Id: Ifb767729b481b4b686e6d6444cf48b1f580cc478
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The documented return type was not what existing callers expected,
and not what the default implementation actually returned.
This patch fixes the interface documentation and the behavior of
an alternative implementation.
Change-Id: Ib09bffeba3ddc5b43da1c7c299f1fa946be4e2e2
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The ksort() here was causing the order to be enforced as
alphabetical instead of preserving the original order.
The order usually doesn't matter, except with regards to handling
of duplicates. Due to Parsoid normalising external links to interwiki
links, it has to do a reverse lookup. In doing so it has to decide
which one to prefer. It currently picks the first match from the
API request for meta=siteinfo&siprop=interwikimap, which didn't
match the defined order in the actual Interwiki map due to ksort()
being called in getAllPrefixes().
Sort in this function was originally introduced in 2010 with
commit 844e7c83e4 (2011; r92528; T21838), which is otherwise unrelated
and left no rationale.
The existing unit tests needed to be adjusted slightly as they
assumed alphabetical order. While it appeared they were also defined
in alphabetical order, this was merely the order of the variable
creation. The effective order is preserved within locals and globals,
but overall globals come before locals.
Also removed the duplicate test for Hash and CDB in InterwikiTest
that belongs in ClassicInterwikiLookupTest instead.
Bug: T145337
Change-Id: I7348748801cbdf16c6ceea5b0654fc174b79707e
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Change-Id: I52bef87512f9ddd155d1f4cc0052f6b7a0db5b42
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is used for lookup in a CDB file or PHP static array.
In neither case is the key created by wfMemcKey() or any other
implementation of BagOStuff::makeKey().
This is already broken if:
* An interwiki prefix were to contain characters not supported by
Memcached.
* An interwiki prefix and wikiid together are too long for Memcached.
* If the site has wgCachePrefix configured, which overrides the
wfWikiID() namespace makeKey() normally uses.
dumpInterwiki.php does not use wfMemcKey() either (and should not).
This was simply here as leftover from many rewrites ago, its
only purpose is to create wikiid + prefix joined by colon.
Ref T148958.
Change-Id: I45682133ed593fbb0d66af5a67751f77f15a4a14
|
|/
|
|
| |
Change-Id: I5260ccad99057323d0f3a669a420bbd723363986
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of these are simply changing annotations to reflect
reality. If a function can return false to indicate failure
the @return should indicate it.
Some are fixing preg_match calls, preg match returns 1, 0 or false,
but the functions all claim to return booleans.
This is far from all the incorrect return types in mediawiki, there
are around 250 detected by phan, but have to start somewhere.
Change-Id: I1bbdfee6190747bde460f8a7084212ccafe169ef
|
|
|
|
| |
Change-Id: Ice98cb0a3127333c045cfb4328081ad5c490c435
|
|
|
|
|
|
|
|
|
| |
Follows:
FormOptions: I29ae63472536f99f7f9546f30d86e7bd324d3094
MediaWikiServices: Ie5fd2c523ceec8cc2656e749928f38909dc4bdf1
InterwikiLookupAdapter: I387dc2ff3f5564fcedde835dec66781d8e9424fd
Change-Id: I8d99d0b559d04083fb83b0fcf45cde95dab32d64
|
|
|
|
|
|
|
| |
This adapter assumes the db name (Interwiki wiki id) equals global ids.
Bug: T135146
Change-Id: I387dc2ff3f5564fcedde835dec66781d8e9424fd
|
|
|
|
| |
Change-Id: I2a547a005955cb9f596ff6927feb7df3d5d91872
|
|
|
|
|
|
|
|
|
| |
This is more consistent with LoadBalancer, modern, and inclusive
of master/master mysql, NDB cluster, and MariaDB galera cluster.
The old constant is an alias now.
Change-Id: I0b37299ecb439cc446ffbe8c341365d1eef45849
|
|
|
|
| |
Change-Id: Icb716219c9335ff8fa447b1733d04b71d9712bf9
|
|
|
|
|
|
|
|
|
| |
This keeps the existing app logic for looking up interwiki information
intact in ClassicInterwikiLookup. The idea is to seamlessly switch to a new
implementation when it becomes available, while also allowing us to
switch back in case of problems.
Change-Id: I7d7424345d0ce3ce90ba284006ee9615e3d99baa
|
|
|
|
|
|
| |
This is uses a fair amount of time according to flamegraphs.
Change-Id: I178a590ab5de2f6fb9366ad59434d8b27dad710d
|
|
|
|
|
|
|
|
|
| |
This test class verifies that Interwiki currectly handles information
from the database, CDB files, and plain arrays. This is intended to
allow confident refactoring when implementing T113034.
Bug: T113034
Change-Id: I2b68d11e3e946d81fa5f5f65a28fc399e7936c0f
|
|
|
|
|
|
|
|
|
|
| |
Per wikitech-l consensus:
https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html
Notes:
* Disabled CallTimePassByReference due to false positives (T127163)
Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
|
|
|
|
|
|
|
|
| |
Make Interwiki::getAllPrefixesCached() work when $wgInterwikiCache is set to a
static array (rather than path to a CDB file). Follows I5a979f047031e.
Bug: T122362
Change-Id: I003e055471747afdcc82440490456e03cc67cc1a
|
|
|
|
|
|
|
|
|
| |
For the same reasons wikiversions.cdb was converted to a PHP file -- viz., that
static arrays in PHP files get cached in HHVM's bytecode cache and are
therefore faster to use with HHVM than CDB files.
Bug: T122362
Change-Id: I5a979f047031ef211622f399df9b3b388797f53a
|
|
|
|
| |
Change-Id: I1cda46178c16b7ffad97d09f8480fd57f766be57
|
|
|
|
|
|
|
| |
* This is less verbose that DatabaseBase
* Also add a few WAN cache doc comments
Change-Id: I5b6de6d0ffa06753ea96c50b63db7dae796475dc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* This gets lag information that is useful when
the calling code is about to run queries that
will have their results cached.
* This is now used in place of trxTimestamp() for
WANObjectCache set() and getWithSetCallback().
* The WAN cache will use a low TTL if the lag is
too high to avoid caching stale data for weeks.
* Bumped MAX_COMMIT_DELAY as nothing enforces it.
Bug: T113204
Change-Id: I2a95b4088cff42d6e980351555f81a4b13519e24
|
|
|
|
| |
Change-Id: I4299715ce4c996fed8add773aa03441324eb0dfc
|
|
|
|
|
|
|
| |
* Added an invalidateCache() method for the Interwiki extension
Bug: T93141
Change-Id: Id4f8b6fb9bfe26f6b5e5ce32e4e55d51eb37964d
|
|
|
|
|
|
| |
* This avoids the overhead of an extra function call
Change-Id: I8ee996f237fd111873ab51965bded3d91e61e4dd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new cdb library is pulled in via composer. Since the
library uses namespaces, a backwards-compatability layer
is provided for the old class names:
* CdbReader
* CdbWriter
* CdbException
The PHP/DBA-specific classes should never have been used directly.
Depends on I98302bdf1 in mediawiki/vendor
Change-Id: I39549ac8540b262cf91f7d1830d36327afb3033d
|
|
|
|
|
|
|
|
|
|
| |
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling
Change-Id: I41a84e8e1dec39170aa655250325ffc485eaeaef
|
|
|
|
|
|
|
|
|
|
| |
* Change default type for $iwData to be the same as possible updated values
* Remove superfluous else{}
* Break long lines
* Update documentation
* Update formatting
Change-Id: Ie1a655def0e9a4f71495ce5936964ef81a146297
|
|
|
|
| |
Change-Id: I6461b64dc77b3ecc641db39da1e9be306100fda3
|
|
|
|
|
|
| |
From phpcs
Change-Id: Ieab0207f965630eda113abdc0259aa2eddcf5ca7
|
|
|
|
| |
Change-Id: Ib182878e08d19261d9803fd4d7e215570a2ffed4
|
|
|
|
| |
Change-Id: If8c3bf0ceb2d1162cc64c0dc367ebfa4729e8f2e
|
|
|
|
|
|
| |
to avoid * inside select
Change-Id: I9d0ac631d9389744f68d744fa1d3fa3e3866a956
|
|
|
|
|
|
| |
Also made file/class documentation more consistent.
Change-Id: I1deb70318d01a257b51948ba806d80cd1a239f4f
|
|
|
|
|
|
|
| |
Normalise method returns
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/113042
|
|
|
|
|
|
|
|
|
| |
Simplify if
Fix whitespace
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/110609
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/98467
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/98189
|
|
|
|
|
|
|
| |
fail-over mode if DB is down.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/98109
|
|
|
|
|
|
|
| |
Hexmode fixed broken unit tests in revisions after last time
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/95396
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/94460
|
|
|
|
|
|
|
|
|
| |
$title arg was passed and should be substituted. However `"" == null`, so as a result switching to using the argument broke [[mw:]] style interwiki links without an article title.
Update the Interwiki::getURL code to use isset(), and update the comment to tell pre-1.19 supporting extensions to do the entire urlencoding and $1 substitution on their own since Interwiki::getURL was essentially buggy and broken before now.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/94353
|
|
|
|
|
|
|
|
|
|
| |
when replacements are made.
Scanning all of core and all the extensions we have in svn, it doesn't look like anyone makes any calls to Interwiki::getURL using the argument so this should be safe enough to clean up the api.
Also update Title::getFullURL to make use of the first arg now.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/94349
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Breaks unit tests as below, not going to be able to fix them before I disappear for the evening, so might aswell leave trunk clean
ArticleTablesTest testbug14404
Error:
ArticleTablesTest::testbug14404
Undefined offset: 0
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/includes/ArticleTablesTest.php:31
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiTestCase.php:60
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiPHPUnitCommand.php:20
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/phpunit.php:60
ParserTests testParserTest #552 - testParserTest with data set #551
Failure:
ParserTests::testParserTest with data set #551 ('RAW magic word', '{{RAW:QUERTY}}', '<p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
</p>', '', '')
RAW magic word
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-<p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
+<p><a href="/index.php?title=Template:RAW:QUERTY&action=edit&redlink=1" class="new" title="Template:RAW:QUERTY (page does not exist)">Template:RAW:QUERTY</a>
</p>
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/includes/parser/NewParserTest.php:545
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiTestCase.php:60
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiPHPUnitCommand.php:20
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/phpunit.php:60
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/93534
|