Commit graph

58 commits

Author SHA1 Message Date
Brion Vibber
95c00cce55 * (bug 10265) Fix regression in category image gallery paging 2007-06-15 15:02: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
Nick Jenkins
bd23ec29c6 Doc tweaks:
* Seems like an opportune time to introduce "@addtogroup Media" documentation tags.
* Merge "@addtogroup Metadata" (used by Exif.php) into "@addtogroup Media".
* Few more moving comment blocks to above classes.
2007-04-24 06:53:31 +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
Raimond Spekking
83a6f40953 Missing unit 'px' added. W3C CSS validator
whines about it:
"Invalid number : width only 0 can be a length. You
 must put an unit after your number : 150"
2007-02-09 15:48:40 +00:00
Aryeh Gregor
b672f737ab * (bug 6987) Allow perrow, widths, and heights attributes for <gallery> (I deliberately called them "widths"/"heights" and not "width"/"height" because the latter two would most obviously mean width and height of the gallery itself)
* Convert <gallery> caption to, well, a <caption>
2007-02-02 03:32:03 +00:00
Nick Jenkins
f88c771756 The war on redundant ampersand usage!
* Convert "$dbw =& wfGetDB( DB_MASTER );" --> "$dbw = wfGetDB( DB_MASTER );"
* convert "$skin =& $wgUser->getSkin();" --> "$skin = $wgUser->getSkin();"

For the time being have not changed the function definitions of wfGetDB() or User::getSkin() [i.e. they are still both return-by-ref], so as to ensure the interface does not change for extensions [some of which may still be trying to run on PHP4 environments]. However presumably at some point this can be changed too.

Also includes tiny tweak to newlines in parserTests - will show 1 rather than 2 newlines between the "Reading tests from" strings when in quiet mode.
2007-01-22 23:50:42 +00:00
Rob Church
d03c0c2c6b (bug 8403) Respect bad image list exceptions in galleries on wiki pages 2007-01-20 22:34:05 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Antoine Musso
b144fcb85d Rename constructors to __constructor 2007-01-20 13:34:31 +00:00
Rob Church
9095dd44a0 Rename ImageGallery::setCaptionSafe() to ImageGallery::setCaptionHtml(), since as Simetrical points out...it's not actually safe :D 2007-01-05 01:07:04 +00:00
Rob Church
a411a4e6f5 * Move escaping of image gallery captions to ImageGallery::setCaption()
* Allow developers to set HTML gallery captions with ImageGallery::setCaptionSafe()
* (bug 8489) Support basic links in <gallery> caption attribute
2007-01-04 19:47:11 +00:00
Nick Jenkins
ae8554c45b Completing code housekeeping stuff for rest of includes/ directory: removing unused local vars, removing unused globals, replacing extract() where simple to do, declaring output arrays before calling preg_match(), and so forth. 2006-11-29 11:43:58 +00:00
Aryeh Gregor
5f1e7225ee (bug 7892) Add media count to category page, à la subcats/pages. Used a new count() method I added to ImageGallery class. 2006-11-24 06:41:02 +00:00
Tim Starling
36ed0cd96c Reverting 17479/17480, breaks subclassing of Linker methods by skins. See my comment on bug 7405. 2006-11-08 07:12:03 +00:00
Nick Jenkins
fa239349f2 * (bug 7405) Make Linker methods static. Patch by Dan Li. 2006-11-08 05:21:15 +00:00
Jens Frank
7f7e79022b (bug 6420) Render thumbnails for djvu images, show multipage preview on image page 2006-08-13 17:34:48 +00:00
Antoine Musso
82d35df0b6 Strict Standards with PHP5 2006-07-12 18:38:25 +00:00
Tim Starling
d052acf220 suppressing thumbnail generation in more places 2006-07-05 06:06:58 +00:00
Brion Vibber
e690ce7de6 Gallery code cleanup patch by Ilmari Karonen
http://bugzilla.wikimedia.org/attachment.cgi?id=2028&action=view
2006-06-29 23:27:13 +00:00
Brion Vibber
5808535e16 * Fix display of file-type icons in galleries when $wgIgnoreImageErrors is off 2006-06-25 06:23:53 +00:00
Rob Church
3d291f615b Cripple the wiki text stuff for now. It doesn't SEEM dangerous but I haven't tested the lot. 2006-06-24 00:27:16 +00:00
Rob Church
73be040a7a * (bug 2316) Add "caption" attribute to <gallery> tag
* Allow setting the skin object that ImageGallery will use; needed during parse operations (the skin must come from the ParserOptions, not $wgUser)
* Prod a few skin files and increment some cache-smashers
2006-06-24 00:12:34 +00:00
Tim Starling
043c6d2c83 Fixed inconsistent error return in Image::getThumbnail() -- was returning null if height wasn't specified, an icon thumb if it was. Made it return null all the time, and fixed ImageGallery.php to understand that return value. Also made ImageGallery give informative errors if $wgIgnoreImageErrors is off. 2006-06-17 04:11:21 +00:00
Tim Starling
02547dac72 Removed most exit() calls from the MediaWiki core, by replacing them with either a throw or by classic error checking. OutputPage::fatalError() and similar functions are deprecated, use either OutputPage::showFatalError() to return control or throw new FatalError() to relinquish it. Backwards compatibility of all interfaces has been maintained, thus extensions should continue to work and can be ported at a later date. 2006-06-07 06:40:24 +00:00
Rob Church
6069ef8be0 grr 2006-05-16 22:21:14 +00:00
Rob Church
b01da48ba2 Suppress images in galleries which appear on the bad image list (when rendering for a wiki page; galleries in special pages and categories are unaffected) 2006-05-16 19:15:58 +00:00
Niklas Laxström
8b403ede36 * (bug 5805) message nbytes can now use {{plural:}}
* Cleaned up Special:Imagelist a bit
2006-05-05 12:21:12 +00:00
Antoine Musso
0d89dad018 Fix #5005: XHTML <gallery> output.
Patch by: Jitse Niesen <j.niesen@latrobe.edu.au>
2006-04-27 21:17:39 +00:00
Antoine Musso
69689725c1 Switching from phpdoc to doxygen (use less than 32MB of memory).
Run maintenance/mwdocgen.php to generate doc in ./docs/html/ .
2006-04-19 15:46:24 +00:00
Brion Vibber
266d41f165 * Added wfDie() wrapper, and some manual die(-1), to force the return code
to the shell to return nonzero when we crap out with an error.
2006-01-14 02:49:43 +00:00
Ævar Arnfjörð Bjarmason
a26d5a49d7 * s~\t+$~~ 2006-01-07 13:31:29 +00:00
Ævar Arnfjörð Bjarmason
7bbe971aec * s~ +$~~ 2006-01-07 13:09:30 +00:00
Ævar Arnfjörð Bjarmason
1d15461a57 Code review!
* Don't start a new scope with if defined 'MEDIAWIKI...
2006-01-07 12:31:39 +00:00
Tim Starling
dfdbed6155 oops 2006-01-07 00:49:23 +00:00
Tim Starling
2af231d5dc Fixed broken image registration, by making Parser::renderImageGallery() non-static. This method is possible because it does not appear to be called from outside Parser anymore. 2006-01-07 00:44:28 +00:00
Antoine Musso
2ca68a256d Clean up unused globals! 2005-12-04 18:27:59 +00:00
Ævar Arnfjörð Bjarmason
c6510cf83b * Code cleanup 2005-08-31 14:11:32 +00:00
Tim Starling
9411d91b49 Optional thumbnail generation by client request, using thumb.php. This removes any need for access to image files on page view. Experimental, some aspects still haven't been tested. 2005-04-16 04:33:34 +00:00
Tim Starling
efba9e3476 Moved image metadata to the database. Changed Image object to have lightweight constructors, similar to the User object. 2005-04-10 18:29:30 +00:00
Ævar Arnfjörð Bjarmason
685139a981 * (bug 1765) Tidy causes corruption inside <gallery> 2005-03-27 05:15:10 +00:00
Jens Frank
b7415495bc Show file name in gallery view 2005-01-09 18:01:18 +00:00
Jens Frank
b19b41f717 BUG#1124
Make gallery valid XHTML 1.0
Make MonoBook.php valid XHTML 1.0 (tagline)
Move image gallery CSS code from PHP to CSS file
2005-01-05 22:07:44 +00:00
Brion Vibber
9eda3649b7 Merge category paging from REL1_4 2004-12-21 03:26:43 +00:00
Brion Vibber
fada5faa4b * (bug 1074) Add stock icons for non-image files in gallery/Newimages
* Add width and height attributes on thumbs in gallery/Newimages
2004-12-12 09:56:02 +00:00
Brion Vibber
e6bb9de12b Merge image gallery fixlets from 1.4 2004-12-09 02:13:00 +00:00
River Tarnell
07b376f29a htmlspecialchars [MF REL1_4] 2004-12-08 11:02:08 +00:00
Jens Frank
e0f423faf7 prevent javascript insertion 2004-12-08 10:50:08 +00:00
Jens Frank
5c63ca6e21 (bug 1016) Fix handling of lines omitting Image: in a <gallery> tag 2004-12-07 23:44:04 +00:00