Commit graph

542 commits

Author SHA1 Message Date
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
Siebrand Mazeland
75c6696aa8 Use consistent notation for "@todo FIXME". Should update http://svn.wikimedia.org/doc/todo.html nicely. 2011-05-17 22:03:20 +00:00
Platonides
a344ffed30 Perform an early exit 2011-05-15 12:34:00 +00:00
Brian Wolff
cde9145e66 (bug 28940) When making a thumb of an SVG, and only specifying the height
make the width be the max SVG size, not the natrual width of the SVG.

Some of the linker code here should perhaps be moved. See comments on bug 28940
2011-05-14 23:48:59 +00:00
Daniel Friesen
104016401c Change $text to $html. This has been bothering me for awhile. It's stupid, counterintuitive, we call it text making people think of it as text then note (oh, this isn't text, it's html, you'd better escape it yourself or you'll screw yourself over with an XSS vector). 2011-05-08 00:10:31 +00:00
Niklas Laxström
4e8caae0bb Followup r87578:
PHP Notice:  Use of Linker::makeLinkObj is deprecated. [Called from call_user_func_array in (internal function)] for /w/i.php?title=Special:RecentChanges&translations=filter<ul>
<li>- line - calls Linker::makeLinkObj()</li>
<li>Skin.php line 1552 calls call_user_func_array()</li>
<li>- line - calls Skin::__call()</li>
<li>Renameuser.php line 58 calls SkinVector::makeLinkObj()</li>
<li>- line - calls wfRenameUserLogActionText()</li>
2011-05-07 17:04:00 +00:00
Sam Reed
45abb05da3 Remove another unused deprecated function
Update 1 inbound caller
2011-05-06 23:31:59 +00:00
Sam Reed
bc829f4372 Remove addExtraSQL 2011-05-06 23:07:20 +00:00
Sam Reed
46d4f5625e Documentation
Remove some deprecated in 1.16 functions with no callers
2011-05-06 22:53:59 +00:00
Sam Reed
f985524076 More versions added to @deprecated tags
Couple of inbound calls fixed up

Some ancient code removed as it's been marked deprecated
2011-05-06 21:50:18 +00:00
Sam Reed
8c1c535466 Remove some stuff marked as deprecated <= 1.16 unused
Stuff still used left for the moment

Added some since to @deprecated

Added wfDeprecated( __METHOD__ ); in one case
2011-05-06 20:59:58 +00:00
Sam Reed
5203c8dabc Couple more deprecated things removed 2011-05-06 20:50:16 +00:00
Daniel Friesen
8ae8bd5a98 Use a reversed magnify image for framed image thumbnails when on a RTL wiki. 2011-04-30 12:04:00 +00:00
Mark A. Hershberger
cbcc75067a revert r76127, r76129, and r83535 b/c I'm backing out the fix for bug #542. Fixing ancient bugs causes grief for many people. 2011-04-27 19:13:34 +00:00
Raimond Spekking
3d113bcf25 Followup r86764: don't parse the comment. Spotted by SPQRobin@Translatewiki and fixed the help of Ialex 2011-04-24 17:58:56 +00:00
Raimond Spekking
629df89813 Embrace comment with () only when really needed. In Special:ListFiles and ImagePage the comment is shown alone in a table cell -> no () needed 2011-04-23 13:23:08 +00:00
Chad Horohoe
783d4e0862 Remove @static from all over the place. That's what the static keyword is for, this being PHP5 and all 2011-04-21 00:07:09 +00:00
Happy-melon
2c9cfd7cce Refactor the factory/i18n/list/etc static methods from SpecialPage into their own class; there's no reason we need to be parsing them in every single SpecialPage subclass. Leave all the methods as stubs in SpecialPage.php; if we required PHP 5.3 they could be replaced by a a __callStatic() magic method, but that doesn't work on PHP 5.2.
Also make a few changes to the functions available.  SpecialPageFactory::resolveAlias() now takes an optional subpage and returns array(<name>,<subpage>).  Similarly merge getPage() and getPageByAlias().  There were many examples of (extensions particularly) making dubious assumptions about the presence or absence of subpages or canonical-ness.

I didn't deprecate SpecialPage::getTitleFor() as it's got over six hundred calls.  I'm rather undecided on the best position of getPage()/executePath().  Although the latter needs cleanup anyway.
2011-04-17 11:31:11 +00:00
Niklas Laxström
07c98fb98e Removed unmatched wfProfileOut 2011-04-14 16:09:07 +00:00
Brion Vibber
fcbd1134c6 * (bug 27473) Fix regression: bold, italic no longer interfere with linktrail for ca, kaa
Patch to ca, kaa linktrails to exclude multiple apostrophes by Platonides: https://bugzilla.wikimedia.org/attachment.cgi?id=8337

Added parser test cases to confirm that the linktrail apostrophe works on those languages, and to confirm that the bug where a link is surrounded by bold or italics is resolved.

Tweaked Linker::splitTrail() to keep it from permanently caching $wgContLang's linktrail; when we change content languages during a script run as we do with parser tests, that was leaving us stuck forever on English's linktrail.
This may slightly slow down that path, since it'll have to make a couple brief function calls into the Language object and its data cache.
2011-04-06 21:11:49 +00:00
Daniel Friesen
e844afb09c Followup r85244; Define all methods as static, implement a DummyLinker to forward calls for passing to hooks and finish off anything in the way. 2011-04-03 12:04:04 +00:00
Daniel Friesen
c817a24081 Drop connetion between Skin and Linker and turn Linker into a staticly usable class. 2011-04-03 11:44:11 +00:00
Aaron Schulz
d5460bce86 * Made BeforeParserMakeImageLinkObj/BeforeGalleryFindFile let hooks set sha1 parameter
* Made FlaggedRevs specify files by sha1,timestamp to handle renames with no redirects. This makes them handled as well as templates in this regard. (bug 27836) 
* Moved BeforeGalleryFindFile hook to proper place (don't trigger for non-NS_FILE titles)
* Removed unused mRevisionId field from ImageGallery
* Removed old hotfix from makeMediaLinkObj(); all the current callers would crash beforehand if the title was null anyway
* Updated hook docs (some prior params were missing)
* Broke some long lines and cleaned up some whitespace
* TODO: track file info in core rather than fr_fileSHA1Keys and ugly, duplicated, queries. This should be easy to do now.
2011-03-23 03:13:37 +00:00
Aaron Schulz
08e7c491bc Broke some of the more annoying lines 2011-03-21 16:15:56 +00:00
Happy-melon
b2d91f90e4 Follow-up r83786: update references in SpecialPage::getTitleFor() and friends to point to 'Block' rather than 'Blockip'; should fix errors on translatewiki. 2011-03-12 23:22:34 +00:00
Happy-melon
3d161feebf Follow-up r83755: @deprecated @since is wrong, doesn't have the expected semantic meaning. 2011-03-12 18:14:33 +00:00