aboutsummaryrefslogtreecommitdiffstats
path: root/includes/interwiki
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename DB_SLAVE constant to DB_REPLICAAaron Schulz2016-09-051-2/+2
| | | | | | | | | 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 "slave" => "replica DB" in /includesAaron Schulz2016-09-051-1/+1
| | | | Change-Id: Icb716219c9335ff8fa447b1733d04b71d9712bf9
* Factor InterwikiLookup out of Interwiki class.daniel2016-05-183-322/+529
| | | | | | | | | 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
* Remove wfDebug() from getInterwikiCacheEntry()Aaron Schulz2016-05-091-1/+0
| | | | | | This is uses a fair amount of time according to flamegraphs. Change-Id: I178a590ab5de2f6fb9366ad59434d8b27dad710d
* Introduce InterwikiTestdaniel2016-04-231-8/+18
| | | | | | | | | 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
* Convert all array() syntax to []Kunal Mehta2016-02-171-13/+13
| | | | | | | | | | 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
* interwiki: Fix-up for I5a979f047031eOri Livneh2016-02-091-8/+6
| | | | | | | | 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
* Allow $wgInterwikiCache to be an associative arrayOri Livneh2015-12-231-12/+22
| | | | | | | | | 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
* Update getWithSetCallback() callers to the newer signatureAaron Schulz2015-10-071-2/+2
| | | | Change-Id: I1cda46178c16b7ffad97d09f8480fd57f766be57
* Change getCacheSetOptions() callers to use "Database"Aaron Schulz2015-10-051-1/+1
| | | | | | | * This is less verbose that DatabaseBase * Also add a few WAN cache doc comments Change-Id: I5b6de6d0ffa06753ea96c50b63db7dae796475dc
* Make WANObjectCache sets account for slave lagAaron Schulz2015-10-051-2/+2
| | | | | | | | | | | | | | * 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
* Converted Interwiki::load to using getWithSetCallback()Aaron Schulz2015-09-291-35/+21
| | | | Change-Id: I4299715ce4c996fed8add773aa03441324eb0dfc
* Converted Interwiki using WAN cacheAaron Schulz2015-04-301-4/+17
| | | | | | | * Added an invalidateCache() method for the Interwiki extension Bug: T93141 Change-Id: Id4f8b6fb9bfe26f6b5e5ce32e4e55d51eb37964d
* Replace wfRunHooks calls with direct Hooks::run callsAaron Schulz2014-12-101-1/+1
| | | | | | * This avoids the overhead of an extra function call Change-Id: I8ee996f237fd111873ab51965bded3d91e61e4dd
* Use cdb library and provide a back-compat layerKunal Mehta2014-11-191-0/+2
| | | | | | | | | | | | | | | 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
* Cleanup some docs (includes/[e-l])umherirrender2014-07-241-2/+2
| | | | | | | | | | - 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
* Updates for Interwiki.phpSiebrand Mazeland2013-12-021-11/+52
| | | | | | | | | | * 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
* Improved CdbException handling in InterwikiChad Horohoe2013-11-261-60/+70
| | | | Change-Id: I6461b64dc77b3ecc641db39da1e9be306100fda3
* The static declaration must come after the visibility declarationumherirrender2013-01-261-2/+2
| | | | | | From phpcs Change-Id: Ieab0207f965630eda113abdc0259aa2eddcf5ca7
* Update doc comments and code formatting.Siebrand Mazeland2013-01-211-46/+46
| | | | Change-Id: Ib182878e08d19261d9803fd4d7e215570a2ffed4
* Interwiki::fetch can return null, false or an interwiki objectReedy2012-06-111-1/+1
| | | | Change-Id: If8c3bf0ceb2d1162cc64c0dc367ebfa4729e8f2e
* add Interwiki::selectFieldsumherirrender2012-05-111-2/+18
| | | | | | to avoid * inside select Change-Id: I9d0ac631d9389744f68d744fa1d3fa3e3866a956
* Added missing GPLv2 headers in some places.Alexandre Emsenhuber2012-05-041-1/+17
| | | | | | Also made file/class documentation more consistent. Change-Id: I1deb70318d01a257b51948ba806d80cd1a239f4f
* Documentation updatesSam Reed2012-03-051-0/+1
| | | | | | | Normalise method returns Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/113042
* Improve documentationSam Reed2012-02-021-6/+6
| | | | | | | | | Simplify if Fix whitespace Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110609
* Back out r95396 and friendsSam Reed2011-09-291-165/+0
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/98467
* FU r98109: !EMPTY -> !NONEXISTENT (more consistent with elsewhere)Aaron Schulz2011-09-261-2/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/98189
* Cache negative results for interwiki prefix checks. Also helps filecache ↵Aaron Schulz2011-09-261-0/+5
| | | | | | | fail-over mode if DB is down. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/98109
* Merge the iwtransclusion branch back into trunkSam Reed2011-08-241-0/+165
| | | | | | | Hexmode fixed broken unit tests in revisions after last time Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/95396
* Followup r94353; Use !== null since that's what we use in core.Daniel Friesen2011-08-141-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/94460
* Followup r94349; Interwiki::getURL used `$title != null` to test if the ↵Daniel Friesen2011-08-121-4/+4
| | | | | | | | | $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
* Update Interwiki::getURL's first argument so that it's properly urlencoded ↵Daniel Friesen2011-08-121-1/+4
| | | | | | | | | | 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
* Back out r93533, r93531, r93530Sam Reed2011-07-301-166/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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&amp;action=edit&amp;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&amp;action=edit&amp;redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a> +<p><a href="/index.php?title=Template:RAW:QUERTY&amp;action=edit&amp;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
* Merge iwtransclusion branch into trunkSam Reed2011-07-301-1/+166
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/93530
* Fixes for r92538 & r92528:Robin Pepermans2011-07-211-6/+11
| | | | | | | | * use default null for $local * use foreach for database result Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/92813
* Follow-up r92528:Robin Pepermans2011-07-191-17/+5
| | | | | | | | | * remove @static * return database result directly (no need for while()) * getAllPrefixesDb() -> getAllPrefixesDB() Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/92538
* (bug 19838) API does not use interwiki cache.Robin Pepermans2011-07-191-0/+119
| | | | | | | Patch by Beau; modified to work with current code. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/92528
* Allow rows missing iw_trans or iw_local to be considered valid.Daniel Friesen2011-04-231-3/+3
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86747
* Move the Interwiki class to includes/interwiki/ to make way for a more ↵Daniel Friesen2011-04-231-0/+272
flexible Interwiki system. Do this first since svn doesn't support editing and moving a file in the same commit. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86746