Commit graph

20 commits

Author SHA1 Message Date
Mark A. Hershberger
5259e9009d * When I found it, I cried. fixes bug #22501
* Also, fix up showtitle for parser tests to always give a title, whether we're setting a display title or not.
2010-02-16 03:37:19 +00:00
Sam Reed
8e0e897034 * (bug 22061) API: add prop=headitems to action=parse
Patch contributed by Paul Copperman
2010-01-16 13:07:58 +00:00
Mark A. Hershberger
96bcae9729 follow up r61101, fix cut-n-paste error 2010-01-15 19:48:34 +00:00
Mark A. Hershberger
2800ca2db7 follow up r60832 and follow up r60763
* Don't set Parser::$mTitle to random garbage.
* Remove ParserOutput::$displayTitle, make setDisplayTitle() and
  getDisplayTitle() wrappers for their *TitleText() equivalents.
* Remove Parser::$mDo*Convert member variables, move test for
  $mDoubleUnderScores[] directives closer to the action.
* Remove bogus "global $wgContLang".
* Use accessor to get at $mConvRuleTitle
* Fix up showtitle option in parserTests.inc
* TODO: refactor FakeConverter class away
2010-01-15 19:14:23 +00:00
Alex Z
95ef1b6fd6 (bug 19814) - Interwiki links from file links - [[File:Foo.jpg|link=de:Test]] - are no longer recorded in the pagelinks table
Also update Parser::makeImage() docs for the link option
2009-07-18 22:49:31 +00:00
Domas Mituzas
f0c63dfe2f good catch, $wgServer definitely needs trailing slash added =) 2009-07-11 08:15:37 +00:00
Domas Mituzas
f7f573c3d0 Fix Bug#19637 - self-referencing externals will be by default filtered out 2009-07-11 08:04:31 +00:00
Roan Kattouw
ae130186e8 Core changes for NavigableTOC extension:
* Add TOC HTML to ParserOutput
* Add class tocsection-$section to <li> elements in the TOC representing sections in the current page (as opposed to transcluded sections)
2009-06-20 21:47:10 +00:00
Brion Vibber
92079d3b1c * (bug 16335) __NONEWSECTIONLINK__ magic word to suppress new section link.
Patch by Carlin: https://bugzilla.wikimedia.org/attachment.cgi?id=5680
With slight whitespace tweaks.
2009-02-19 22:14:59 +00:00
Alex Z
bb7e5781a4 (bug 16965) Follow-up to r45266, also don't record self-links, such as those created by <ref>s. 2009-01-11 03:42:13 +00:00
Brion Vibber
c5d575e091 Follow-up to r45174: (bug 16806) Fix regression from r44524 that caused links to files to not get added to mLinks in ParserOutput, which caused them to not be included in LinksUpdate::LinksUpdate(), and not added to pagelinks.
Fixes other cases broken by Parser's assumptions failing to hold after change in Title::isAlwaysKnown()'s behavior:
* Links to invalid Special: pages were being recorded, but shouldn't
* Links to valid MediaWiki: pages were no longer recorded

Instead of the NS_FILE special-case in r45174, I'm just tossing *all* isAlwaysKnown links over to ParserOutput::addLink(), and letting the latter worry about what types of titles it won't record.
Just for good measure, in case any NS_MEDIA titles make it into ParserOutput::addLink() they'll be normalized to NS_FILE.
2009-01-01 00:05:08 +00:00
Brion Vibber
880d68b28c Pull back r45181 "(Bug 12998) Weaken DISPLAYTITLE restictions (patch by rememberthedot@gmail.com)" for now.
Escaping issues per comment http://www.mediawiki.org/wiki/Special:Code/MediaWiki/45181#c1046
2008-12-31 16:49:38 +00:00
Aaron Schulz
d0aeaa55ff (Bug 12998) Weaken DISPLAYTITLE restictions (patch by rememberthedot@gmail.com) 2008-12-30 12:22:15 +00:00
Brion Vibber
95211ac850 Revert r44271 "(bug 12998) Weaken DISPLAYTITLE restictions (patch by 'rememberthedot@gmail.com')"
Behavior seems a bit hard to predict, as far as what's going to go in the header and what in the browser window etc. Pulling it back for further testing and discussion.
2008-12-10 23:21:28 +00:00
Aaron Schulz
af10d34286 (bug 12998) Weaken DISPLAYTITLE restictions (patch by 'rememberthedot@gmail.com') 2008-12-06 18:00:17 +00:00
Aryeh Gregor
918d0a78c5 Move some member variable initialization to the declarations and out of constructors. This is better style and less error-prone: OutputPage::$mIsPrintable was first being set to true and then to false in the constructor, and $mAllowUserJs and $mLinkColours are missing defaults entirely. Also, Tim said there's some lazy-loading or shared memory or something if it's done this way, so it might be a performance boost. 2008-07-25 01:27:51 +00:00
Aryeh Gregor
9bf022910a (bug 8068) New __INDEX__ and __NOINDEX__ magic words allow control of search engine indexing on a per-article basis. Remarks:
* Currently __INDEX__ will override __NOINDEX__ regardless of their relative positions, due to the way things are written.  Instead, the last one on the page should win.  This should be pretty easy to fix.
* __INDEX__ and __NOINDEX__ override $wgArticleRobotPolicies.  This is almost certainly incorrect, but it's not totally obvious how to fix it, because of the way the code is structured.  Probably not a big deal, but should probably be fixed at some point.
* Anyone can add and remove the magic words, and there's no config option to disable them.  It's not obvious whether this is okay or not.  It would be a one-line change to OutputPage.php to have a config option to ignore the magic words, maybe per-namespace or who knows what.
2008-07-23 19:49:46 +00:00
Aryeh Gregor
258740c2df Revert last commit for a moment, committed lots of stuff I didn't mean to. 2008-07-23 19:27:13 +00:00
Aryeh Gregor
0e7fa5b28b Follow-up to r37968: forgot to commit the change setRobotpolicy -> setRobotPolicy in extensions. 2008-07-23 19:25:48 +00:00
Tim Starling
c6b902f180 * Reorganised the includes directory, creating subdirectories db, parser and specials
* Wrote a tool to check the integrity of the autoloader class list, fixed some issues that came up.
* Start the autoloader before LocalSettings.php, so that when an extension writer thinks an inefficient one-file special page extension is the way to go, they don't have to use explicit includes to make the class inheritance work. Should continue to work with $IP set in LocalSettings.php as long as $IP is set before extensions are included.
2008-06-16 20:21:26 +00:00
Renamed from includes/ParserOutput.php (Browse further)