Commit graph

884 commits

Author SHA1 Message Date
Æ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
Daniel Kinzler
ee4ddd5ded introducing magic word {{USERLANG}}; This should fix a lot of problems for multilingual wikis. 2007-04-25 12:42:18 +00:00
Brion Vibber
3d0b03d0eb Revert r21461 for now; a cleanup patch which doesn't change functionality but makes more things to clean up -- ugly function names, incorrect profiling function titles... 2007-04-23 18:52:51 +00:00
Antoine Musso
8eb0cdfdfa Move tidy callbacks from the Parser class to a new Tidy class. This is to keep
Parser.php at a reasonable size.
2007-04-21 23:25:36 +00:00
Tim Starling
b15d8cffc4 * Introduced media handler modules for file-type specific operations: thumbnailing, img_metadata, capabilities, etc.
* Deprecated $wgUseImageResize, thumbnailing will be enabled unconditionally.
* Fixed interaction of page parameter to ImagePage with the HTML file cache
* Improved error reporting for image thumbnailing
* Fixed MIME type for SVG files, will be silently changed from image/svg to image/svg+xml after loading from the database.
* Workaround for djvutoxml bug #1704049 (poor performance). Use djvudump instead.
* Fixed odd behaviour in ImagePage on DjVu thumbnailing errors
* Improved error reporting for image thumbnailing
* Added sharpening option for ImageMagick thumbnailing
* Removed Image::selectPage(), added page parameters to getWidth() and getHeight(), deprecated Image::renderThumb() and Image::getThumbnail()
* Changed default contents of img_metadata to empty string instead of a:0:{}
* Moved responsibility for respecting $wgGenerateThumbnailOnParse from the UI to Image.php
2007-04-20 12:31:36 +00:00
Nick Jenkins
f9619da3f0 Yet more doc tweaks:
* Add @addtogroup tags to various classes, to try and group conceptually-related classes together.
* Add brief descriptions to various Special pages, thanks to Phil Boswell.
* Moving some docs to be right above the classes they represent, so that they are picked up.
2007-04-20 08:55:14 +00:00
Ivan Lanin
73bb06d1a0 Introduce magic word {{NUMBEROFEDITS}} 2007-04-17 09:23:31 +00:00
Antoine Musso
096c1d0e7d In regex, do not capture stuff when you dont need it, use (?:) 2007-04-13 00:23:49 +00:00
Nick Jenkins
113bb1c772 Documentation tweaks to help documentation systems (Doxygen + PHPDocumentor)
pick up the appropriate tags, and documentation blobs for classes. This is 
the same as per r20769, but with the grouping changes (e.g. removing "@{{") omitted.
Please be advised that more related documentation tweaks may follow later - e.g. 
Doxygen generates a log file of warnings that is 574 Kb in size, when run over 
the just the trunk/phase3 code ... eek! Thankfully, much of that is just 
whining about functions without documentation   ;-)
2007-04-04 05:22:37 +00:00
River Tarnell
1376b31eb4 erroneous indentation 2007-03-30 19:38:11 +00:00
Steve Sanbeg
412e981d1f fix section/size links from cached templates, so templates look teh same whether from db or cache. 2007-03-29 19:31:25 +00:00
Brion Vibber
3a6ac5a3c3 Revert r20769: we don't use PHPDocumentor anymore, we use doxygen.
If making mass changes to tweak to its preferences, probably better to do it for the tool we actually generate docs with. :)
2007-03-28 14:16:43 +00:00
Nick Jenkins
5fef2333d4 PHPDocumentor [http://en.wikipedia.org/wiki/PhpDocumentor] documentation tweaking stuff.
Minor doc tweaks to prevent some PHPDocumentor warnings or errors when run on the includes/ directory. PHPDocumentor uses a syntax very similar to javadoc - mostly we already use this, but there were a few scattered places that were adjusted to make them consistent with the rest of the code. In practical terms, these changes were made:
* @url becomes @link
* @fixme becomes @todo
* HTML tags in descriptions must be closed / balanced.
* @bug was removed (where the bug was long fixed), or changed into a @todo (in the few situations where the bug was still pending)
* @obsolete becomes @deprecated
* Things like "/**@{{" and "/**@}}*/" which cause "unknown tag" warnings were removed
* @access must be a valid access level.
* @desc tag not needed, removed.
* Doesn't seem to like @licence, will accept @license however.
* Use full comment block notation in a few places (i.e. open block with "/**", start each line with " *", and end block with " */")

Then additional to this, to get some class docs associated with their respective classes:
* Moved some docs to right above those classes (deleting blank lines, or moving descriptions from the file headers)
* Marked some classes without docs as "@todo document"
* (done up to "class MIMEsearchPage" on the "classtrees_MediaWiki.html" page for the includes/ directory)
2007-03-28 08:53:02 +00:00
Markus Krötzsch
cb557c8adc Added parser hook InternalParseBeforeLinks, closes Bug#8578. The hook is relevant for all parser extensions that want templates, nowiki, etc. to
be taken care of before they do their magic.
2007-03-23 16:47:58 +00:00
Greg Sabino Mullane
d51e743d23 Trim makeImage option list, for bug #8582 2007-03-17 19:18:21 +00:00
Steve Sanbeg
ec4174f085 When calling edit page for nonexistent section, generate error inside of just discarding edits, since edit links sometimes go to the wrong place. 2007-03-14 18:20:21 +00:00
Antoine Musso
5bb6ed98ea Ignore lonely wiki text '''''. Fix a parser test. 2007-03-13 18:09:20 +00:00
Aryeh Gregor
e70fd13f80 Introducing broken changes in commits meant to fix broken changes is vaguely ironic. 2007-03-04 16:11:25 +00:00
Aryeh Gregor
6cd5179d61 Fix r20109, which was kind of insane. It was a wikitext list with only some output items part of the list, with <br />s at the end of each item. Converted to a proper classed and id'd XHTML list. 2007-03-04 15:44:38 +00:00
Aryeh Gregor
1ad70e60d3 Explicitly mark public methods public 2007-02-28 17:25:41 +00:00
Daniel Kinzler
e67bceab97 wgNonincludableNamespaces option to disable inclusion for specific namespaces. Helps to make read-protection work 2007-02-15 01:23:47 +00:00
Brion Vibber
35f4c25b3f * (bug 8897) Fix whitespace removal for interlanguage links with link prefix 2007-02-06 07:45:06 +00:00