Commit graph

567 commits

Author SHA1 Message Date
Jeroen De Dauw
d117ac68d5 make docs more clear, method can only be used as is since 1.18, not 1.16 2011-12-13 20:45:35 +00:00
Raimond Spekking
1d1656de12 Partly revert r105985 for now: Flooding of translatewiki.net log/channel:
PHP Notice: Use of Linker::makeLinkObj was deprecated in MediaWiki 1.16. [Called from call_user_func_array in (internal function)] in /www/w/includes/GlobalFunctions.php on line 3520
PHP Notice: Use of Linker::makeKnownLinkObj was deprecated in MediaWiki 1.16. [Called from call_user_func_array in (internal function)] in /www/w/includes/GlobalFunctions.php on line 3520
2011-12-13 10:36:16 +00:00
Antoine Musso
bf006dd4f3 bring back Linker::tooltip()
Was marked deprecated with r42702 although that helper makes code a bit
nicer:

 Linker::tooltip( 'message' );
 
 Xml::expandAttributes( array(
	'title' => Linker::titleAttrib( 'message' )
 ) );

(the later would give you 'title=""' when 'tooltip-message' message does
not exist.
2011-12-13 09:52:39 +00:00
Jeroen De Dauw
cb1f9b80d0 since tag++ 2011-12-13 05:25:06 +00:00
Jeroen De Dauw
49cdca93be add missing deprecation notices and added deprecation version to existing ones 2011-12-13 05:19:05 +00:00
Amir E. Aharoni
739d6c48fe Replaced the core message 'sectionlink' with getArrow, which is cleaner and does the right thing in mixed RTL/LTR environment. Removed the message from the messages files, because it doesn't seem to be used elsewhere. 2011-12-12 06:40:40 +00:00
Sam Reed
8e9b597894 * (bug 24765) User tool links edit hook
Original patch by "biolizard", updated to not use $this in static, and added relevant documentation
2011-11-20 15:16:54 +00:00
Antoine Musso
65c6f8c19a Bug 32238 - phaseout wgEnableTooltipsAndAccesskeys 2011-11-19 16:40:23 +00:00
John Du Hart
93e50f7eed Following r100264, update usages in core 2011-11-16 04:37:17 +00:00
Daniel Friesen
32b4dd8a77 Refactor core from Title::getLinkUrl to Title::getLinkURL to match Title's getLocalURL and getFullURL.
This shouldn't cause any back or forward compat issues since php treats method names as case-insensitive. So this change shouldn't break any old extensions, and extensions are free to start using getLinkURL and won't have any issue breaking with old versions of MediaWiki.
2011-11-10 03:27:55 +00:00
Aaron Schulz
6c4360c951 Make use of Title::isSpecialPage() in various places 2011-11-02 20:55:08 +00:00
Sam Reed
9ceb44a598 Fixup some assignments in conditionals
Add/normalise some more return statements
2011-10-16 03:27:12 +00:00
Alexandre Emsenhuber
632bb29658 Fix usage example of Linker::specialLink() 2011-10-11 13:00:17 +00:00
Sam Reed
937fc3bcfd Back out r95396 and friends 2011-09-29 22:08:00 +00:00
Sam Reed
0afa5cd5a3 Guard against
PHP fatal error in /home/wikipedia/common/php-1.18/includes/Linker.php line 831: 
Argument 1 passed to Linker::makeMediaLinkObj() must be an instance of Title, null given, called in /home/wikipedia/common/php-1.18/includes/Linker.php on line 1221 and defined
2011-09-22 15:08:32 +00:00
Sam Reed
8b44f9032c Fix single character access 2011-09-22 14:57:08 +00:00
Alexandre Emsenhuber
35d5bbc9f7 * Removed useless isset() check
* Added two spaces
2011-09-19 18:38:38 +00:00
Niklas Laxström
c4bf5b40ed Chrome seems to already support dir=auto, and I see no downsides using it for user comments.
Amir said that it is good.
2011-09-14 08:32:52 +00:00
Alexandre Emsenhuber
623d78b1c5 Added visibility markers to some Linker methods 2011-09-12 09:25:00 +00:00
Alexandre Emsenhuber
e3e5f0771f * Follow-up r96420: don't show e-mail links to anon users
* Fix for r24612 (!) spotted while fixing the above: parenthesis arround the bitwise check are needed since ! operator has higher precedence than &
2011-09-11 08:14:46 +00:00
Siebrand Mazeland
8680d82503 Mark userLink, userTalkLink, blockLink() and emailLink() as public static per CR comment on r96420 by Nikerabbit.
He suggested protected, because of the @private comment, but as we have made  more methods public static in the Linker class recently, this seems appropriate.
2011-09-07 17:00:46 +00:00
Siebrand Mazeland
8a170cd8ae Follow-up r96420: correct casing for special page to prevent "PHP Notice: Found alias defined for Emailuser when searching for special page aliases for EmailUser. Case mismatch?". 2011-09-07 13:35:01 +00:00
Siebrand Mazeland
0c12790089 Add constant Linker::TOOL_LINKS_EMAIL to allow adding a "send e-mail" link from Linker::
Add "send e-mail" link in user tools for developer details (Special:Code/Project/author/authorname) in CodeReview.
2011-09-07 12:12:24 +00:00
Daniel Friesen
a36ac512e6 Crack down on arguments inside the Linker that call themselves $text but in reality are unescaped html. 2011-09-03 13:46:56 +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
Aaron Schulz
ed425dfeda * Refactored SpecialUndelete::revDeleteLink into a Linker::getRevDeleteLink function
* (bug 21279) Updated DeletedContributions to use type=revision when possible (ar_rev_id exists)
2011-08-03 22:37:20 +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
Brion Vibber
3cdc9cfa0c Provisional revert of r93319 -- change to TOC styles without coordinated cache updates.
Definitely shows different padding with the old cached markup and new styles in FF 5 though it's not a huge difference. Haven't tested in other browsers; IE needs testing in particular as it has funky special style bits.

Recommend:
* old markup should work uncahnged with the new styles -- this avoids any transition problems
* secondarily, consider updating parser cache version to force updates .... but you'd still want to do the above for pages that have been HTTP-cached!
* test all these renderings in all supported browsers and confirm that all is well with old & new markup
2011-07-28 22:00:09 +00:00
Brion Vibber
a33c5fffec Revert r93386 -- PLEASE STOP COMMITTING THESE THINGS WITHOUT CONFIRMING THAT THEY DO WHAT NEEDS TO BE DONE, THAT THEY DON'T CAUSE PROBLEMS, AND THAT THEY WON'T JUST GET REVERTED FOR THE FOURTH OR FIFTH TIME. THANK YOU. 2011-07-28 21:41:41 +00:00
Leo Koppelkamm
0b182044d7 Redo r93284 ( Make editsection link more understandable by positioning it directly left ( RTL: right ) of the title ) in a more simple way and also include parserTests and release notes this time 2011-07-28 12:26:04 +00:00
Leo Koppelkamm
60d879b52b Recommit r93264 ( Remove semantically incorrect wrapper table from toc and replace it with an inline-blocked diff. Update some skin css, since we don't have the implicit table padding anymore and need to increase to padding to maintain the current look. ) with parser tests and release notes 2011-07-27 21:53:28 +00:00
Antoine Musso
2d55b1670f revert r93284 and follow up r93285
breaks parser tests. Please update the parser tests and reapply.
2011-07-27 19:24:43 +00:00
Antoine Musso
04d3db27c9 revert r93264 : breaks ton of parser tests.
Please update the parser tests and reapply.
2011-07-27 19:20:06 +00:00
Leo Koppelkamm
4fc85ff098 Fix Bug 11270 & Bug 11555 : Make editsection link more understandable by positioning it directly left ( RTL: right ) of the title.
Patch by Aryeh Gregor, updated by Roan Kattouw, and updated again by me. I also fixed one bug with modern.css.
Tested in IE6,7,8, Chrome & FF in all skins and both LTR and RTL contexts. I tested with floating images above and below the headers and couldn't find regressions.
2011-07-27 16:43:04 +00:00
Leo Koppelkamm
195ed61a82 Remove semantically incorrect wrapper table from toc and replace it with an inline-blocked diff. Update some skin css, since we don't have the implicit table padding anymore and need to increase to padding to maintain the current look. Bug 13766 2011-07-27 13:24:19 +00:00
Jeroen De Dauw
713446e29f fix doc 2011-07-23 20:58:18 +00:00
Robin Pepermans
56b2da7efb $wgUploadNavigationUrl should be used for file redlinks if $wgUploadMissingFileUrl is not set. The first was used for this until the second was introduced in r69997 (1.17). According to the comments there it was broken in 1.16 but as far as I tested it worked in 1.16. In any case, the old behavior should be restored as most WMF wikis have set wgUploadNavigationUrl but not wgUploadMissingFileUrl. 2011-07-19 23:09:55 +00:00
Sam Reed
ead9055a62 Update code comments that point to 1.18 to point to 1.19 2011-07-18 23:01:08 +00:00
Aaron Schulz
868cbaf5ee Reverted r91195, this isn't needed ;) 2011-06-30 18:45:48 +00:00
Aaron Schulz
5164d135f0 Added normalizeSubpageLink() to DummyLinker. __call doesn't handle static function call attempts, __callStatic__ is PHP >= 5.3, and both clobber references anyway. Just added a wrapper function instead. 2011-06-30 18:38:32 +00:00
Platonides
f1cebbd579 Linker::titleAttrib() didn't obey $wgEnableTooltipsAndAccesskeys 2011-06-30 18:21:05 +00:00
Sam Reed
bdf84cb20e Swap else if for elseif
Trimming trailing whitespace also

Doing in 3 commits, so hopefully reviewable in CR...
2011-06-17 16:03:52 +00:00
Brion Vibber
87786e84dd Revert r86764, r89134, r86827 -- added a second opaque boolean parameter to Linker::commentBlock() which appeared to mostly just turn it into Linker::formatComment().
commentBlock() exists for the sole purpose of embedding a comment into parentheses if it exists so you can append it to a line of text -- if you're not putting stuff in parentheses, don't use commentBlock() because you're not generating a parenthesized comment block.
Opaque boolean parameters are also very poor form, especially when tacking on multiple ones. There was already a nasty optional '$local' boolean param, forcing all uses of this other parameter to add *two* parameters, making illegible stuff like 'false, false'.
2011-06-14 23:50:40 +00:00
Jeroen De Dauw
5e3b5c0f54 added @ßince tag 2011-06-02 14:38:14 +00:00
Aaron Schulz
314e0a99ee Add back space between size and comment in history pages (fix for r86764) 2011-05-29 20:33:26 +00:00
Sam Reed
527e85fa9f More documentation in various files 2011-05-29 14:01:47 +00:00
Sam Reed
296f3d3f4f And even more documentation 2011-05-28 18:59:42 +00:00
Sam Reed
0d47a2ae90 More parameter documentation!! 2011-05-28 14:52:55 +00:00
Mark A. Hershberger
0a49fd69b0 Misc EOL w/s and spaces-instead-of-tabs fixes. One day I'll get around to nagging people for this stuff, but for now, I'll JFDI myself. 2011-05-25 15:39:47 +00:00