Commit graph

412 commits

Author SHA1 Message Date
Sam Reed
ebef5e723b More documentation tweaks/additions 2011-05-26 19:52:56 +00:00
Sam Reed
696100b6a9 Remove unused variables/globals
Swap while to foreach
2011-05-26 19:20:35 +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
Aaron Schulz
fc37a9625a * Follow-up r88740:
* Fixed parse() arguments in getRevIncludes()
* Changed clearTagHook() to avoid preprocessed-xml cache corruption
* Check current version cache in getRevIncludes()
2011-05-25 10:11:06 +00:00
Aaron Schulz
6d409c1308 Follow-up r88740: forgot to commit this guy 2011-05-24 19:52:27 +00:00
Chad Horohoe
3e11266ae5 $wgArticle is deprecated! Possible removal in 1.20 or 1.21!
* Encapsulate index.php in wfIndexMain() (similar to r77873)
* Kill $wgArticle check in Exception, not necessary anymore
* Kill $wgArticle in Setup, also not necessary
* Add angry note about $wgArticle to rebuildFileCache.
* Remove note about $wgArticle in Parser since it's dying anyway
2011-05-22 17:59: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
cec4972e31 Profile brace substitution per title to help detect the "bad templates". (Make this configurable?) 2011-05-15 12:40:32 +00:00
Bryan Tong Minh
41231616b6 (bug 23002) Imagelinks table not updated after imagemove. The actual bug was inconsistent behaviour between imagelinks and pagelinks for redirects.
* Parser now only adds the redirect source to imagelinks, like it does in pagelinks
* ImagePage now shows the file redirects in-line with the normal "The following pages link to this file:"
** Added message linkstoimage-redirect
** Removed the separate file redirects section and removed associated message redirectstofile
** ImagePage::imageLinks will first fetch image links to the file, determine which are redirects, and if there are fewer links than the limit, fetch the redirect target links.
2011-05-14 12:20:45 +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
21d35067b9 Kill some more long deprecated unused functions
Add more @deprecated since where appropriate
2011-05-06 21:09:34 +00:00
Leo Koppelkamm
384d4383a3 Fix PHP notice in r85922. Sorry for the holdup, I kinda forgot about it 2011-05-05 09:12:55 +00:00
Sam Reed
e8e63594de Make a method static per the comment, update the only non static usage (in Parser) itself 2011-05-01 23:59:41 +00:00
Sam Reed
018a22d827 Documentation tweaks, additions and updates 2011-05-01 23:54:41 +00:00
Sam Reed
ef6afb5d9e Tweak documentation
Add braces
2011-04-29 23:34:37 +00:00
Sam Reed
409b547cae * (bug 28719) Do not call mLinkHolders __destruct explicitly
Patch by Vitaliy Filippov
2011-04-27 20:05:39 +00:00
Leo Koppelkamm
a4296effc7 Add |alt= option for galleries ( Bug 18682 ). Recommit of r86749, with nested |alt= now fixed. Patch by Jan Paul Posma 2011-04-25 13:51:54 +00:00
Leo Koppelkamm
8548adf48f Reverting r86749: The alt stuff is far too simplistic. One way to fix it would be to generalize makeImage() in the parser to process gallery params as well, but I don't have time to that now 2011-04-23 09:55:42 +00:00
Leo Koppelkamm
f3e6866d1a Add ability to use add alt texts for images in galleries ( Bug 18682 ). Patch by Jan Paul Posma. Also cleaned up some comments and var names 2011-04-23 07:27:45 +00:00
Brion Vibber
2c55eba5c7 Doc comment updates for CoreTagHooks callback functions + Parser::setHook() & Parser::setTransparentTagHook().
Added notes about the 'extended' return values from some of the hooks, which seems to be undocumented but is vaguely similar to what is documented for parser function callbacks. It doesn't look like a very safe interface, and could stomp on internal variables if one isn't careful. Needs to be better defined and doc'd.

setTransparentTagHook() seems to have been largely undocumented and is only used by the 'geoserver' extension currently. Is this considered obsolete? Should it be simply replaced by use of the frame & recursiveTagParse goodies, or is it still needed for something?
2011-04-22 19:06:52 +00:00
Leo Koppelkamm
6e7c9e2701 Fix Bug 25794: Disallow multiple table captions & only keep the first 2011-04-21 07:27:05 +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
Brian Wolff
35c61744a6 (bug 23816) Add tracking category for any page with a broken image.
Note this considers a link to a non-existent image to be broken. A link
to an image that exists but does not have a handler is not considered broken.
2011-04-20 19:43:47 +00:00
Sam Reed
3a0ed7a044 * (bug 28532) wfMsgExt() and wfMsgWikiHtml() use $wgOut->parse()
* (bug 16129) Transcluded special pages expose strip markers when they output parsed messages

Also adding some related documentation during my travels around the code
2011-04-18 12:43:53 +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
Alexandre Emsenhuber
4207ab0c63 * (bug 28511) Use [] syntax instead of {} for string offset access 2011-04-17 07:59:58 +00:00
Leo Koppelkamm
cca68b8800 r85922: Fixing another table bordercase 2011-04-15 22:36:09 +00:00
Leo Koppelkamm
b4ec34def9 Followup to r86064 (List with double line-breaks inside tables). Also contains patch for Bug 16700 by Mormegil (Additional linebreak though nested templates). Parsertests for both 2011-04-14 19:28:45 +00:00
Leo Koppelkamm
a163fa3c55 Fix for r85990, which broke lists inside tables; adding test for it 2011-04-14 18:45:04 +00:00
Leo Koppelkamm
3dde00f863 Fixing line-break issues with r85922 2011-04-14 10:02:51 +00:00
Platonides
0677784244 Move </td> and </th> to its own line (unless it's an empty cell)
Fixes the other r86004 test case and r86010 one.
2011-04-13 23:50:33 +00:00
Platonides
887f4eff82 Follow up r85922 moving the </caption> to another line, fixing one of the tests added in r86004. 2011-04-13 23:19:27 +00:00
Platonides
6c0cf20425 Readd support for headings inside tables, broken in r85922 and reported on its CodeReview.
Added testcase for it.
It changes again Parser24.
2011-04-13 22:20:14 +00:00
Leo Koppelkamm
b186286631 Tables: Fix Bug 20078, add test for it 2011-04-13 20:01:23 +00:00
Leo Koppelkamm
86cad27b2b Followup to r85922: Adapt to MW-coding style 2011-04-13 19:46:09 +00:00
Leo Koppelkamm
1c0a4d3611 Followup to r85922: Output th instead of td for tfoot 2011-04-13 12:44:33 +00:00
Leo Koppelkamm
f9b4b296ce Followup to r85922: Fix STRICT error, rmv redundant whitespace 2011-04-13 11:24:38 +00:00
Leo Koppelkamm
109f7bcb9d 2011-04-12 21:27:24 +00:00
Brion Vibber
ff0524b3bc Initial stab at breaking math/texvc out to Math extension.
* (bug 14202) $wgUseTeX has been superseded by the Math extension. To re-enable
  math conversion after upgrading, obtain the Math extension from SVN or from
  http://www.mediawiki.org/wiki/Extension:Math and add to LocalSettings.php:
  require_once "$IP/extensions/Math/Math.php";

This is an initial stab, and a few things remain to be cleaned up:
* messages need to be moved from core to extension
* MW_MATH_* constants should be moved to the extension from core
* old back-compat math names interfaces using those constants should be removed from message files
* classic edit toolbar's math button should be added from the extension (or else dropped) -- currently there's not a clean hook, but could do it by JS
* couple of things like the 'armourMath' function on Language & LanguageConverter may want to be redone just as an unconditional, if that's simpler.

Setting $wgUseTeX alone will no longer have any affect. The var's still there for the moment as a few bits still need to be fully moved out from core.
2011-04-09 00:39:40 +00:00
Sam Reed
decb7d223b Cleaning up my w/c again. Add documentation 2011-04-08 23:53:59 +00:00
Aaron Schulz
3a49b629e6 Follow-up changes to r84610:
* Cleaned up mImageTimeKeys format
* ImageMap: Removed redundant addImage call (makeImage handes this)
* ParserFunctions: added time/sha1 to addImage() call
* Removed excess ampersands in hooks
* Added some function doc comments
2011-04-04 01:22:08 +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
Jack Phoenix
7afd378a4d mark some public functions as such 2011-04-02 14:48:22 +00:00
Aaron Schulz
0a5016f4e0 Follow-up r84659: no need to pass parser by reference to event handlers 2011-03-24 08:44:42 +00:00
Aaron Schulz
67955599f8 * Replaced crufty BeforeParserMakeImageLinkObj/BeforeGalleryFindFile hooks with BeforeParserFetchFileAndTile hook
* Updated the only calling extension (these was basically single-purpose hooks)
2011-03-24 01:44:48 +00:00
Aaron Schulz
045859614b Straighten out dependency handling from r84610 (files) and before (templates) 2011-03-23 18:23:55 +00:00
Aaron Schulz
a2e9b8be7e * Put parser output file version tracking to core
* Added some ParserOutput accessors
* A few cleanups to fetchFile()
2011-03-23 17:35:40 +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
Sam Reed
60578c163d Reinstate some lines added during r84357
I guess they're used on some code paths... As it's not an unconditional return...
2011-03-21 15:18:11 +00:00