Commit graph

905 commits

Author SHA1 Message Date
Aryeh Gregor
ab3a00a097 (bug 8393) <sup> and <sub> need to be preserved (without attributes) for entries in the table of contents. 2007-08-29 00:06:58 +00:00
Brion Vibber
756b356e43 Hack a special case for regression in setting image height via box size (eg 200x200px).
The height had been simply dropped off the face of the earth, with only the width taken into account anymore.
The infrastructure for parameters doesn't seem to gracefully handle multiple values coming from one magic word match, so this is an ugly hack.
2007-08-25 15:49:36 +00:00
Tim Starling
daf77bd5f1 In ImageGallery:
* Split "is parsing" and "respect bad images" concepts. 
* Call media handler parser hook 
* Use the $linkAttribs parameter instead of putting an <a> tag around the whole media output.
2007-08-22 13:40:22 +00:00
Rob Church
2fe74340d8 (bug 8737) Fix warnings caused by incorrect use of /dev/null when piping process error output under Windows 2007-08-15 21:44:58 +00:00
Tim Starling
164bb322f2 Basic integrated audio/video support, with Ogg implementation.
* JavaScript video player based loosely on Greg Maxwell's player
* Image page text snippet customisation
* Abstraction of transform parameters in the parser. Introduced Linker::makeImageLink2().
* Made canRender(), mustRender() depend on file, not just on handler. Moved width=0, height=0 checking to ImageHandler::canRender(), since audio streams have width=height=0 but should be rendered.

Also:
* Automatic upgrade for oldimage rows on image page view, allows media handler selection based on oi_*_mime
* oi_*_mime unconditionally referenced, REQUIRES SCHEMA UPGRADE
* Don't destroy file info for missing files on upgrade
* Simple, centralised extension message file handling
* Made MessageCache::loadAllMessages non-static, optimised for repeated-call case due to abuse in User.php
* Support for lightweight parser output hooks, with callback whitelist for security
* Moved Linker::formatSize() to Language, to join the new formatTimePeriod() and formatBitrate()
* Introduced MagicWordArray, regex capture trick requires that magic word IDs DO NOT CONTAIN HYPHENS.
2007-08-15 10:50:09 +00:00
Daniel Cannon
f2bc6281e2 Minor whitespace cleanup ... rmvd closing ?> 2007-08-14 01:58:12 +00:00
Jens Frank
8c3822b9b7 New Parser::setTransparentTagHook for parser extension and template compatibility 2007-07-15 11:14:53 +00:00
Brion Vibber
4d3446a8e3 * (bug 10508) Allow HTML attributes on <gallery>
* (bug 1962) Allow HTML attributes on <math>
2007-07-13 17:25:06 +00:00
Brion Vibber
223498207f * (bug 9151) Fix relative subpage links with section fragments 2007-07-12 21:02:25 +00:00
Jens Frank
611942d03e Fix bug with <nowiki> in front of links for wikis where linkPrefixExtension is true 2007-07-11 20:44:33 +00:00
Raimond Spekking
1258d8bd59 * (bug 10334) Replace normal spaces before percent (%) signs with non-breaking spaces 2007-06-26 08:56:30 +00:00
Rob Church
4a55dcdda8 Revert r23395, since it won't work (d'oh, of course) 2007-06-25 16:07:49 +00:00
Rob Church
fcd4e076c2 On second thoughts, don't increment the parser cache serial; it *will* cause a load spike. Added some backwards-compatible checking which should incur no overhead. \o/ 2007-06-25 16:00:46 +00:00
Rob Church
19be1d25ac Fix up DISPLAYTITLE and enable per default:
* Clean up the mess in ParserOutput
* Reject (ignore) custom titles which don't normalise to the same as the current page -- THIS IS IMPORTANT OTHERWISE LINKING GOES TO POT (and not the good kind of pot)
[WARNING: Touches parser version. Old caches will be expired. You might wish to undo this and add some temporarily backwards-compatibility for a few days.]
2007-06-25 15:51:09 +00:00
Brion Vibber
c52af0da6d * (bug 10338) Enforce signature length limit in Unicode characters instead of bytes
Uses mb_strlen(), which we already have a fallback function for if mbstring extension isn't present.
2007-06-25 15:02:46 +00:00
Aaron Schulz
d36548e2c5 *Use wfSuppressWarnings() instead of error_reporting() 2007-06-20 22:25:39 +00:00
Aaron Schulz
92ad0a60a6 *Goddamn hack, modify error level temporarily while some dates are parsed so as not to make E_STRICT unusable due to local time complaint floodage 2007-06-20 18:41:15 +00:00
Brion Vibber
7fe0850db1 * (bug 10309) Initialise parser state properly in extractSections(), fixes
some cases where section edits broke because tags were improperly stripped
2007-06-19 16:00:11 +00:00
Niklas Laxström
d7743ca457 * Escape the output of magic variables that return page name or part of it 2007-06-18 13:34:07 +00:00
Brion Vibber
1e919f4299 * (bug 8577) Fix some weird misapplications of time zones.
{{CURRENT*}} functions now consistently use UTC as intended, while
  {{LOCAL*}} functions return local time per server config or $wgLocaltimezone.
  Signature dates for Japanese and other languages including weekday now show
  the correct day to match the rest of the time in local time.
2007-06-15 19:07:15 +00:00
Brion Vibber
b802e2a780 * (bug 8458) Limit custom signature length to $wgMaxSigChars bytes 2007-06-13 16:28:19 +00:00
Ævar Arnfjörð Bjarmason
2ca9d2cbe3 Expand a bit on the comment for Parser::stripToc, make it clearer what it does 2007-06-05 18:34:14 +00:00
Aaron Schulz
481f419e02 *Use null for time/rev ID for templates/images when they don't exist, rather than "get the one from jan 1, 1970" :) 2007-05-31 17:15:44 +00:00
Aaron Schulz
17551136ff *Add BeforeGalleryFindFile, TitleLinkUpdatesAfterCompletion, BeforeParserFetchTemplateAndtitle, BeforeParserMakeImageLinkObj, BeforeParserrenderImageGallery; make parser outputs and output page record images -> timestamps used and templates -> revision ids 2007-05-31 16:01:26 +00:00
Tim Starling
ed4303922f Merged filerepo-work branch:
* Added support for configuration of an arbitrary number of commons-style file repositories.
* Split Image.php into filerepo/File.php and filerepo/LocalFile.php
* Renamed Image::getImagePath() to File::getPath()
* Added initial support for timestamp-based file fetching (OldLocalFile), to be expanded upon by aaron.
* Changed the interface for Image/File object creation: use wfFindFile() or wfLocalFile() depending on semantics
* ImageGallery::add() now accepts a title object as the first parameter
* Moved file handling operations on upload from SpecialUpload to File
* Removed path-related functions from ImageFunctions.php. Removed static path accessors from File. 
* Added a Content-Disposition header to thumb.php output
* Improved thumb.php error handling
* Updated the unit test suite to kind of partially work with modern computers. RunTests.php doesn't work just yet. Fixed an actual regression that the test suite detected -- moved some defines to Defines.php where they will be loaded consistently.
2007-05-30 21:02:32 +00:00
Raimond Spekking
9496f7f3ac After revert of r22435 and talk with Brion on IRC previously introduced and newly function parameters merged to an array.
Introducing 'frameless' keyword to [[Image:]] syntax which respects the user preferences for image width like 'thumb' but without a frame.
Now we can use frameless images without the need to nailing its size by a constant pixel parameter. Scaling by different user preference/anon view will always keep the proportions.

Usage: [[Image:name.jpg|frameless|right]]
2007-05-28 19:15:43 +00:00
Antoine Musso
de86115ff0 * Fix #908: links to Special: pages should check for existence,
and display appropriately
* Add SpecialPage::exists() method.
2007-05-26 16:23:34 +00:00
Brion Vibber
85f75cd264 Reverting r22430 for now; I don't really like this keyword creep, and even if I did the parameters on makeImageLinkObj are totally out of control. 2007-05-25 18:02:29 +00:00
Raimond Spekking
7de32afa9a Introducing 'frameless' keyword to [[Image:]] syntax which respects the user preferences for image width like 'thumb' but without a frame.
Now we can use frameless images without the need to nailing its size by a constant pixel parameter. Scaling by different user preference/anon view will always keep the proportions.

Usage: [[Image:name.jpg|frameless|right]]
2007-05-25 16:32:46 +00:00
Brion Vibber
e6cd0bea06 Revert r22423 -- mysteriously destroys several core files 2007-05-25 16:25:05 +00:00
Raimond Spekking
7d3b6cab53 Introducing 'frameless' keyword to [[Image:]] syntax which respects the user preferences for image width like 'thumb' but without a frame.
Now we can use frameless images without the need to nailing its size by a constant pixel parameter. Scaling by different user preference/anon view will always keep the proportions.

Usage: [[Image:name.jpg|frameless|right]]
2007-05-25 12:12:17 +00:00
Raimond Spekking
e67b6e6a6a * (bug 6072) Add a 'border' keyword to the image syntax
Usage: [[Image:filename.jpg|border|right|100px]]
2007-05-22 21:39:57 +00:00
Raimond Spekking
f8014e24e5 Introducing new image parameter 'upright' and corresponding variable $wgThumbUpright.
This allows better proportional view of upright images related to landscape images on a page without nailing the width of upright images to a fix value which makes views for anon unproportional and user preferences useless
Usage: 
* [[Image:pix.jpg|thumb|upright|caption]] = Upright image will be scaled down by $wgThumbUpright (default 0.75, seems to me the best value)
* [[Image:pix.jpg|thumb|upright=0.6|caption]] = Upright image will be scaled down by 0.6
Size of thumb is always rounded to full __0 px to avoid odd thumbsizes and spare the cache

If used in combination with a width, upright will be ignored.
2007-05-21 18:56:03 +00:00
Tim Starling
041c228f21 Made extractTagsAndParams public, useful for extensions. 2007-05-19 20:07:01 +00:00
River Tarnell
f23877bb9c when $threshold is 0, page_len and page_is_redirect are not present in $s; causes PHP errors and spurious stub display 2007-05-10 15:36:29 +00:00
Ilmari Karonen
e19fe926f3 apply stub threshold to all content namespaces 2007-05-09 21:09:59 +00:00
Brion Vibber
0be61ee338 Revert r21950; breaks four parser tests and allows various invalid constructions 2007-05-08 15:11:56 +00:00
Nick Jenkins
b4d37577b9 Removing or commenting out unused variables or globals, and adding declarations for two arrays. 2007-05-08 09:09:46 +00:00
Aryeh Gregor
906dd79c1f (bug 9156) Section edit links break if wikitext headings have non-whitespace after them on the line. One-character change to a regex, I tested it on some simple use cases. Shouldn't cause any breakage. 2007-05-07 01:05:54 +00:00
Antoine Musso
465e41a108 Fix #6204 : only unindent toc if we indented it previously. 2007-05-03 19:36:24 +00:00
Antoine Musso
4b26531229 Fix #9764: level indentation of toc is incorrect.
Caused by r21725.
2007-05-02 19:09:36 +00:00
Aryeh Gregor
6ea96b5186 Please configure your text editor so as to display correctly without a) adding gibberish to files or b) completely screwing up the software (dunno about you, but I get a nice ugly "#-*- tab-width:4 c-basic-offset:4 -*- */" right before my <!DOCTYPE>). 2007-05-01 23:55:16 +00:00
Steve Sanbeg
84d51ee907 add emacs modeline, to give consistent indentation most of the time 2007-05-01 23:41:44 +00:00
Steve Sanbeg
1aa0bba50b clean up indentation 2007-05-01 23:08:23 +00:00
Steve Sanbeg
344e48f5f4 Fix my own stupid patching error 2007-05-01 22:56:22 +00:00
Steve Sanbeg
15fd78857c cleanup of my previous commit, per Tim. 2007-05-01 22:42:41 +00:00
Steve Sanbeg
90763fe60d fix bug 9670: follow redirects in section edit links 2007-05-01 17:26:57 +00:00
Brion Vibber
34d2b8da54 * (bug 6204) Fixes for indentation with $wgMaxTocLevel:
- don't emit too many list close tags after an invisible header
  - don't emit too many final list close tags if last header is invisible
  - don't emit TOC when there are no visible headers
2007-04-30 19:51:56 +00:00
Brion Vibber
5dd20241ab Reverting r21560 as discussed; there are severe problems with relying on a user-language variable, which is why it has not been added. 2007-04-27 15:12:22 +00:00
River Tarnell
9c06b47065 9697: Adding InternalParseBeforeLinks Parser Hook for Semantic MediaWiki (documentation updates), from Jim R. Wilson 2007-04-25 21:23:43 +00:00