Commit graph

81 commits

Author SHA1 Message Date
physikerwelt (Moritz Schubotz)
545b712ed4 Mark Math-specific functions in core as deprecated
The math specific functions in core are not needed
anymore and should be removed in future versions.
Math can access these settings in the same way as
all other extensions do.

Since Math 2.0 the rendered element has the property
"markerType" => 'nowiki'

Change-Id: I20d3714bed9da864146f133a08cf4ca90eda42ab
2013-11-06 17:41:31 +01:00
Timo Tijhof
06cfd63442 doc: Clarify documentation for ParserOptions::getUserLangObj
It no longer produces inconsistent link tables, that was fixed
in r89706 by setting the parser to the default language when
saving, and then when viewing it might reparse for a different
uselang if needed (without saving link updates).

Of course, that isn't pretty and it should still be discouraged.

Change-Id: I599a7162fed458713ffa3a754086c6a2ffdebe07
2013-08-02 03:07:53 +00:00
Alexandre Emsenhuber
7053baca03 Remove "will be removed in ..." comments
All of them are wrong, since 1.20 is out for a while now, and
these methods are still here.

Change-Id: I3b59b61490c9aea5252e25623b0b282295dcc3f6
2013-05-11 22:04:21 +02:00
umherirrender
6c38a5eb72 Fixed spacing in logging/parser/profiler/rl/revdel/search folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: I11bbcfa351e945b7bde10c2105d61a3cf5622205
2013-04-20 17:38:24 +02:00
umherirrender
d63121016d fix some spacing
Added/removed spaces around logical/arithmetic operator
Reduced multiple empty lines to one empty line
Removed wrong tabs before comments at end of line
Removed too many spaces in assigments

Change-Id: I2bba4e72f9b5f88c53324d7b70e6042f1aad8f6b
2013-03-07 17:53:21 +01:00
umherirrender
f3cf109e62 remove space before semicolon
Change-Id: Ic0d890f5e27cec017c7f7910a67d53b2edf82079
2013-02-09 22:44:24 +01:00
MatmaRex
1b71bc5256 (bug 29472) kill $wgUseDynamicDates
Remove $wgUseDynamicDates and everything related to it.

I left DateFormatter::reformat() alone, since it might possibly be
used elsewhere, and to be honest I'm afraid to touch it.

Change-Id: I609db8471c14e5e5946916f085d2ee5b96204d81
2013-02-06 17:38:05 +01:00
umherirrender
85d8ee1f87 Remove a bunch of trailing spaces and unneeded newlines
Change-Id: I00f369641320acd7f087427ef031f3ee7efa0997
2012-10-10 20:14:40 +02:00
Liangent
9573209efc (bug 37453) Move $wgDisable(Lang|Title)Conversion to ParserOptions
This allows easier fix of bug 37453, and patch to fix it is
included in this changeset.

Change-Id: I9096534639394755d0a296dea7380e7b938befef
2012-09-16 20:20:36 +02:00
Tim Starling
2caa7829fc Generated node count limit
To prevent large template DOM caches from sending servers into swap,
throw an exception when more than some number of DOM elements are
parsed. Unfortunately, it wasn't possible to return a normal error
message, because it broke PST and extractSections and corrupted the
article text. It's safer to refuse to save the edit, and we don't
have decent ways to do that short of throwing an exception.

Ideally we would like to have an upstream patch that hooks libxml to
allocate memory from PHP's request pool, then a fatal error would be
raised instead of swapping.

Change-Id: I4cb4f6fd313e1e0940b56cc5e586afd1bea9267a
2012-09-15 14:51:58 -07:00
umherirrender
3dd5c97e85 Use $wgExpensiveParserFunctionLimit over ParserOptions
This allows extensions to set the value

Change-Id: I4a935a00fe02a2bb88a14942e5e3ec6f4e5e833e
2012-05-04 20:56:28 +02:00
Alexandre Emsenhuber
0fc8c8e14e Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I10c077f27a2077a266a64048fa137f7b1f8e226c
2012-05-01 09:05:48 +02:00
Antoine Musso
d5d1585900 revert r111234 (deprecated methods removal)
Reasons invoked by Rob Lanphier are:
* ongoing code slush
* backwards compatilibility issues
2012-02-12 19:25:28 +00:00
Alexandre Emsenhuber
435c7eb616 Remove some methods marked for removal in 1.20 and update FakeTitle accordingly.
No more callers in core or extensions.
2012-02-11 14:36:36 +00:00
Sam Reed
2ec09c5165 More return documentation 2012-02-09 21:35:05 +00:00
mrbluesky
9320b8bed5 Comments only 2012-01-27 22:07:09 +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
John Du Hart
216d661d3b Bug 29524 - Rename RequestContext::getLang to getLanguage
I'll be amazed if this doens't break any tests.
2011-11-21 16:13:21 +00:00
Alexandre Emsenhuber
f05d7ee8ee Unstub $wgLang if still stubbed before storing it; avoid storing a StubUserLang instance in ParserOptions and errors when getting the object (per report of Lockal on IRC) 2011-10-25 18:14:30 +00:00
Alexandre Emsenhuber
bd548f36e9 * Changed ParserOptions to store a Language object instead of only a string, avoids object -> string -> object conversion
* ParserOptions::getUserLang() will still return a string for compatibility, added ParserOptions::getUserLangObj() to get the object
* Added ParserOptions::newFromUserAndLang() and ParserOptions::newFromContext() to easily get a ParserOptions object when a context is available or when someone wants to force the language
* Updated OutputPage and Preferences to use newFromContext() and WikiPage to use newFromUserAndLang()
* ParserOptions::setUserLang() still accepts either a string or a Language object, but changed the calls to pass an object instead of a string
* Changed Parser::getFunctionLang() to return the Language object from ParserOptions when parsing interface messages rather than $wgLang directly and updated the documentation to say that $wgLang should not be used directly (as $wgUser, $wgTitle and $wgRequest)
2011-10-19 14:16:01 +00:00
Aaron Schulz
87c7cf57f8 FU r98412: added version to wfDeprecated call 2011-09-29 21:30:00 +00:00
Alexandre Emsenhuber
1e94b1be89 Per Aaron, follow-up r96859: add @deprecated comment, a wfDeprecated() and mark it for removal in next version since it's not used anywhere 2011-09-29 15:21:54 +00:00
Robin Pepermans
07dc087494 Re-do r96798 ("LanguageConverter now depends on the page content language"), without the change in WikiPage which caused an infinite loop (see bug 31098) 2011-09-22 20:31:23 +00:00
Robin Pepermans
20edfc8ee3 * follow-up r97636: decrease indentation & mention revision per Nikerabbit
* add @since for r97071
2011-09-21 19:30:08 +00:00
Robin Pepermans
3fc94ebd11 Re-do several things of r96798 in preparation of re-doing the rest (there's a bug somewhere that needs fixing).
* Do additional validation and is_array() check in LanguageConverter
* Make redirects be in content language again (remove from Title->getPageLanguage())
* Pass title object from ParserCache to ParserOptions->optionsHash
2011-09-20 15:55:08 +00:00
Niklas Laxström
c48b41201a Revert r96798 - makes parser go infinite loop somewhere 2011-09-14 11:23:58 +00:00
Alexandre Emsenhuber
077d6e218f Turn ParserOptions::setSkin() into a no-op since mSkin is no more used 2011-09-12 16:29:21 +00:00
Robin Pepermans
9a6efcc3e4 (Bug 30364) LanguageConverter should depend on the page content language instead of the wiki content language. Remains largely the same, except for extensions using the PageContentLanguage hook like Translate and WikimediaIncubator.
* Made variant tabs hidden on special pages (has no or sometimes wrong/inconsistent effect there; plus it's mainly in the user language)
* Made redirects be in content language again (remove from Title->getPageLanguage())
2011-09-11 17:56:27 +00:00
Alexandre Emsenhuber
d01e497b7f Stylised ParserOptions.php 2011-07-10 06:45:40 +00:00
Robin Pepermans
ca6fcb7e3f Address comment by Platonides on r90320:
* undefined variable $list in CategoryPage.php
* move code in ParserOptions to a new member of Title class, which falls back to $wgContLang
2011-06-18 14:49:01 +00:00
Robin Pepermans
9077baef30 Follow-up to r90265: directionality improvements as part of bug 6100 (under $wgBetterDirectionality):
* Correct directionality when viewing diffs
* Correct arrows for Pager
* CSS/JS pages always 'en' (LTR)
* Messages on Special:Allmessages have lang and dir attributes based on the selected language
2011-06-18 13:12:52 +00:00
Robin Pepermans
0288575c25 Follow-up to r90265: directionality improvements as part of bug 6100 (under $wgBetterDirectionality):
* Use ParserOptions()->getTargetLanguage() for setting the page language/direction
* Set headings on categories in user language/direction
* Only set language/direction when viewing a page (or editing but only preview and textarea)
2011-06-17 21:48:43 +00:00
Platonides
e23aadab89 Revert r88988 2011-06-16 16:54:06 +00:00
Niklas Laxström
0da0377d1f * Fix I18nTags #languagename to use ParserOptions::getUserLang()
* Fix ParserOptions::getUserLang() to return code as documented
2011-06-13 07:47:39 +00:00
Ilmari Karonen
84aa3fd282 bug 29123: record use of the "editsection" option so that users who can't edit (or have section edit links disabled) get a different cache key; also simplify freaky code layout (briefly tested, seem to work) 2011-05-27 18:51:26 +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
Niklas Laxström
7fe4a8e1bb Fixed a bug in transformation where previous language could leak into later transformations in UI language. Not sure what do with userlang. 2011-05-15 07:16:25 +00:00
Sam Reed
21d35067b9 Kill some more long deprecated unused functions
Add more @deprecated since where appropriate
2011-05-06 21:09:34 +00:00
Daniel Friesen
8a1b7a1d1d Add a getSkin that returns a dummy linker for BC with extensions still abusing it to access the linker. 2011-04-03 23:32:52 +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
Sam Reed
e1f5c11aee More bits of documentation 2011-02-27 15:23:41 +00:00
Alexandre Emsenhuber
19f1eccc53 Per Platonides; follow-up r78201: add "stubthreshold" to ParserOptions; also provides a proper fix to r81765 2011-02-20 15:03:25 +00:00
Sam Reed
7d98280f3e More function and variable documentation 2011-02-19 01:02:56 +00:00
Platonides
8272ebfe6b Hack to shortcut it to zero until User::getStubThreshold() produces a call to optionUsed() 2011-02-08 17:58:53 +00:00
Robert Leverington
2a30aa1d25 Add new hook ArticlePrepareTextForEdit, called when preparing text to be saved.
Add new parser option "PreSaveTransform" that allows the pre-save transformation to be selectively disabled.
2011-01-16 21:12:26 +00:00
Platonides
8de91ab2e4 Partial revert of r79520, follow up to r79558. Unconditionally use the new format.
For environments post r70783, they will need to rerender pages with __NOEDITSECTION__ or no headings (hopefully those will be simple pages).
There will be no extra parser cache misses for environments pre r70783.
2011-01-04 11:31:06 +00:00
Daniel Friesen
969561ae3c Try to output editsection markers instead of rendered editsection links and defer the rendering to a point where the markup does not need to be stored in the cache.
Doing this allows skins to override doEditSectionLinks without poluting the parser cache or fragmenting the parser cache more.
As a side effect it eliminates the primary cause of user language based parser cache fragmentation.
Because this makes most old parser cache entries invalid $wgUseEditSectionTokens is provided so that large installations like Wikipedia can keep their old parser cache entries.
2011-01-03 20:17:20 +00:00
Platonides
fe14fdefa7 Store the options used by the parsing in ParserOutput, per r70783 CR. 2010-12-26 19:21:45 +00:00
Alexandre Emsenhuber
933f0cd240 Fix for r78570: correct default value 2010-12-18 22:02:35 +00:00