Commit graph

18 commits

Author SHA1 Message Date
umherirrender
38a2cd320a add Interwiki::selectFields
to avoid * inside select

Change-Id: I9d0ac631d9389744f68d744fa1d3fa3e3866a956
2012-05-11 22:16:19 +02:00
Alexandre Emsenhuber
63176b99b7 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I1deb70318d01a257b51948ba806d80cd1a239f4f
2012-05-04 08:47:07 +02:00
Sam Reed
08e4a19369 Documentation updates
Normalise method returns
2012-03-05 15:23:04 +00:00
Sam Reed
6454687806 Improve documentation
Simplify if

Fix whitespace
2012-02-02 20:19:20 +00:00
Sam Reed
937fc3bcfd Back out r95396 and friends 2011-09-29 22:08:00 +00:00
Aaron Schulz
50305c2864 FU r98109: !EMPTY -> !NONEXISTENT (more consistent with elsewhere) 2011-09-26 22:46:40 +00:00
Aaron Schulz
8ecde9b038 Cache negative results for interwiki prefix checks. Also helps filecache fail-over mode if DB is down. 2011-09-26 03:37:20 +00:00
Sam Reed
44020e254c Merge the iwtransclusion branch back into trunk
Hexmode fixed broken unit tests in revisions after last time
2011-08-24 13:03:03 +00:00
Daniel Friesen
ecd274f432 Followup r94353; Use !== null since that's what we use in core. 2011-08-14 14:20:59 +00:00
Daniel Friesen
b7474f0743 Followup r94349; Interwiki::getURL used $title != null to test if the $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.
2011-08-12 14:55:25 +00:00
Daniel Friesen
d5dfd2b066 Update Interwiki::getURL's first argument so that it's properly urlencoded 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.
2011-08-12 14:10:37 +00:00
Sam Reed
183d2dab37 Back out r93533, r93531, r93530
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
2011-07-30 15:56:54 +00:00
Sam Reed
dc9d39887e Merge iwtransclusion branch into trunk 2011-07-30 15:30:01 +00:00
Robin Pepermans
d898a5fa86 Fixes for r92538 & r92528:
* use default null for $local
* use foreach for database result
2011-07-21 22:19:23 +00:00
Robin Pepermans
472801ecfa Follow-up r92528:
* remove @static
* return database result directly (no need for while())
* getAllPrefixesDb() -> getAllPrefixesDB()
2011-07-19 15:52:38 +00:00
Robin Pepermans
844e7c83e4 (bug 19838) API does not use interwiki cache.
Patch by Beau; modified to work with current code.
2011-07-19 12:30:18 +00:00
Daniel Friesen
1afb94ee5c Allow rows missing iw_trans or iw_local to be considered valid. 2011-04-23 03:10:57 +00:00
Daniel Friesen
99c94d0c7c Move the Interwiki class to includes/interwiki/ to make way for a more flexible Interwiki system. Do this first since svn doesn't support editing and moving a file in the same commit. 2011-04-23 02:35:21 +00:00