Commit graph

27 commits

Author SHA1 Message Date
Bryan Tong Minh
a3aac44f04 (bug 14685) Double underscore magic word usage is now tracked in the page_props table, as well as the behavioral magic words {{DEFAULTSORT}} and {{DISPLAYTITLE}}. 2010-07-10 11:30:11 +00:00
Chad Horohoe
6d993be4c5 Partial revert r67707, included half-baked patch 2010-06-09 11:54:18 +00:00
Chad Horohoe
44229b50e6 Fixed a bunch of silly instances of [^!=]==\s*(true|false) 2010-06-09 11:44:05 +00:00
Daniel Kinzler
36c68af119 allow parser/extensions to control for how long a ParserOutput gets cached. Introduced updateCacheExpiry(), Cleaned up use of getCacheTime() for marking uncacheable objects. 2010-06-01 14:28:51 +00:00
Alexandre Emsenhuber
2c5cd049a7 Fixed some doxygen warnings 2010-05-15 20:16:26 +00:00
Brion Vibber
e1d1404372 Cleanup for bugs in r65104 (iwlinks table), that'll teach me not to commit at 4am after drinking with the wikimedia devs! 2010-04-18 00:39:12 +00:00
Brion Vibber
8eac509ab5 * (bug 14473) Add iwlinks table to track inline interwiki link usage
Like langlinks, this stores the interwiki prefix (as iwl_prefix) and full page title (as iwl_title), attached to the page doing the liking (as iwl_from -> page_id).
Unlike langlinks, there can be multiple entries stored per interwiki prefix.

Updater to add the table confirmed on MySQL, untested on SQLite but should work.
Someone may still need to add and test a PostgreSQL updater.

Refactored makeWhereFrom2d() out of LinkBatch to Database so it could be re-used for the similar mapping for the interwiki links, which need a string prefix rather than an int namespace key.
Also cleaned it up internally to reuse existing code for building where clauses from arrays. (Tim & Domas -- if the previous more verbose code was there to reduce function call and array processing overhead on very large link lists, feel free to unroll it again if the difference is measurable. Just swap the var names around from the old LinkBatch code and escape the base key value if it's not an integer, it'll be functionally equivalent.)
2010-04-16 01:40:05 +00:00
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)