Commit graph

123 commits

Author SHA1 Message Date
Alexandre Emsenhuber
aad9d5fd6b Removed checks for the "MEDIAWIKI" constant on files that only define classes.
This checks are not needed in that case.

Change-Id: Ia83447427de8b7ea32aced8ff43c7a252b8d504c
2012-05-23 21:20:42 +02:00
Alexandre Emsenhuber
a682b7335a Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I0db3461139284edcb6ac02923eb83d54e6756ffb
2012-05-12 22:33:51 +02:00
Kim Eik
0a52782667 (bug 34852) new optional 'link' parameter to <gallery>
The patch adds an optional parameter |link= to the <gallery>
tag. This will allow for images to link to other pages and
externals urls instead of being hardlinked to the image file
that is displayed in the gallery.

Here are a couple of examples.

Link as WikiLink:
<gallery>
File:20120106_001.jpg|link=Main_Page
</gallery>

Link as absolute URI:
<gallery>
File:20120106_001.jpg|my caption|alt=my alt
text|link=http://bugzilla.wikimedia.org
</gallery>

this would cause the link on the thumbnails rendered by the gallery tag to link
to a custom page/url instead of the actual media/image.

a link should be an internal wiki link or an absolute uri as shown in the examples.

Change-Id: I21b276ad5c7a8df13b3a716957d23fd53c37d29e
2012-04-16 10:09:31 +02:00
Sam Reed
76246b9bf5 More return documentation 2012-02-09 21:33:27 +00:00
Sam Reed
7b25f8231f Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
2012-02-09 19:30:01 +00:00
Sam Reed
393a8c84e8 Add some escaping to r109547, 109548, 109549
Improve RELEASE-NOTES-1.19 also
2012-01-19 16:55:42 +00:00
Sam Reed
4228cdc87d * (bug 33819) Display filesize on Special:NewFiles in appropriate unit. 2012-01-19 16:37:54 +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
Aaron Schulz
9d572d1844 Cleanup to r84610 per CR: changed BeforeParserMakeImageLinkObj hook to use a RepoGroup style param array that also excepts a 'broken' parameter. This new parameter replaces the odd "use timestamp '0' to make a broken thumbnail' convention. No other callers are using this hook other than FR, so the old time/sha1 params where removed. 2011-09-06 18:11:53 +00:00
Sam Reed
c5a7c0517d More wikia upstreaming 2011-08-17 22:42:49 +00:00
Sam Reed
6b6e7989ce sync up RELEASE-NOTES 2011-07-15 23:18:38 +00:00
Ryan Kaldari
86cd958dcf refixing bug 27338 with all parser test fixes, reverts r91557 2011-07-06 18:07:31 +00:00
Chad Horohoe
d2b48645e2 Revert r91426 and followups r91427, r91430: Breaks Gallery-related parser tests 2011-07-06 16:23:20 +00:00
Ryan Kaldari
899ed5e58e better fix for bug 27338 - doesnt rely on line-height 2011-07-04 21:30:09 +00:00
Ryan Kaldari
592dd2b7e5 fixing rounding problem, per comment at r82309 2011-07-04 21:05:27 +00:00
Sam Reed
296f3d3f4f And even more documentation 2011-05-28 18:59:42 +00:00
Jack Phoenix
26dae00964 some coding style tweaks 2011-05-16 13:04:57 +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
Leo Koppelkamm
812722b16f Adjust maxwidth calculation for galleries. Bug 27577 2011-05-02 18:00:09 +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
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
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
Sam Reed
f326b59650 Remove some trailing whitespace
Add some documentation
2011-03-24 00:43:27 +00:00
Aaron Schulz
a90c8f87b2 * Follow-up r84610: don't assume a Parser object is attached
* Removed unused $i var
2011-03-23 21:21:31 +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
Derk-Jan Hartman
d3e714647b Fix overestimation of max-width when using perrow mode.
Also use const variables to make this more readable.

Fixes bug 27577
Follow up to r77411
2011-03-14 21:08:32 +00:00
Derk-Jan Hartman
73ad3337dd Gallery's perrow was overwriting the original style= attribute. 2011-02-20 21:31:15 +00:00
Mark A. Hershberger
f39a2aeee9 followup r82181 and r82215 to fix the FIXME and botched fix for FIXME.
Patch supplied by DieBuche (bug #27338) along with screenshot
demonstrating fix.

Took out fix for bug #27458 (“<gallery> has a white background now”)
since bug it conflicts with a fix for bug #26470.
2011-02-16 23:21:19 +00:00
Mark A. Hershberger
1030cb25fd re r82181 remove min-height that doesn't work with IE6 2011-02-16 03:38:16 +00:00
Mark A. Hershberger
02d95fc21b * (bug 27338) Gallery in 1.17 breaks for audio/video + ogghandler
Patch by DieBuche, who explains the CSS:

    If the image height is lower than the line-height, the margin-top
    is applied to the top of the line.  a very short image will not
    follow for 3-4px laters, thus leading to a bigger distance from
    the top than it should be.  vertical-align:text-top moves the
    picture up, so this problem doesn't happen

I've not tested this, but DieBuche and Derk-Jan Hartman tested and
provided screenshots in the bug.
2011-02-15 19:39:45 +00:00
Sam Reed
ffe7d24cd5 Simple commit trimming some trailing whitespace 2010-12-22 16:21:02 +00:00
Derk-Jan Hartman
bb84043024 Follow up to r77411. Patch by DieBuche
1. Adds a line css to actually fix Bug 3770 (Sorry, I had forgotten to paste it
there as well)
2. Fixes a problem, where the box size would be slighty higher if the image
thumb has a height of less than 8px
3. Normalize the calculation of the vertical padding to be exactly the same one
as the horizontal padding. (This is only relevant for unusually large
galleries, eg. previously it returned a not-exactly-square box if you specified
500px as both width and height)
2010-12-05 22:41:06 +00:00
Aryeh Gregor
05579cf0e6 Give image <gallery>s fluid width
Bug 3276.  Patch by DieBuche, with style cleanups by me, plus a tweak
from comment 27 of the bug to fix spacing.  This incidentally removes
the border around galleries, but this was hard to notice anyway, and
could be easily readded if desired.  Tested in a few browsers, including
IE6, but more testing and/or input from CSS gurus would be appreciated.

Updates parser tests, including for Cite.
2010-11-29 00:11:19 +00:00
Sam Reed
a54a1ee178 Fixup some more documentation 2010-11-13 00:47:51 +00:00
Alexandre Emsenhuber
61a8610ddc * (bug 19944) Link on image thumbnails no longer link to "Media:" namespace in some cases
* (bug 25670) wfFindFile() now checks the namespace of the given title, only "File" and "Media" are allowed now

The problem with bug 19944 was that the cache in RepoGroup was holding a file with a Title that has its namespace set to NS_MEDIA; the cache is now only used for title with namespace set to NS_FILE.
Also modified ImageGallery to not call wfFindFile() on non-NS_FILE title; was obviously breaking the above fix.
2010-11-10 09:16:28 +00:00
Chad Horohoe
6fa2bfd409 Followup r67707, cast these to boolean just to be paranoid 2010-06-09 15:06:11 +00:00
Chad Horohoe
44229b50e6 Fixed a bunch of silly instances of [^!=]==\s*(true|false) 2010-06-09 11:44:05 +00:00
Raimond Spekking
042a49ab7d * (bug 12797) Add $wgGalleryOptions for adjusting of default gallery display options
Reapply of r63197 (reverted with r63261). Per suggestion of demon now with 1 array with keys and w/o breaking parsertests
2010-03-13 11:42:04 +00:00
Chad Horohoe
b3a382a0d5 Revert r63197 '(bug 12797) Allow adjusting of default gallery display options' Breaks gallery parser test, also I don't really like introducing 5 new globals for this...maybe 1 array with keys? 2010-03-05 00:27:20 +00:00
Raimond Spekking
260cc188fa (bug 12797) Allow adjusting of default gallery display options 2010-03-03 13:07:23 +00:00
Alexandre Emsenhuber
90a4cc319f Fixed some doxygen warnings 2010-03-01 21:36:57 +00:00
Tim Starling
831b6d2bf7 * Per my CR comments on r44560: merged FileCache into RepoGroup and fixed wfFindFile() global function bloat. Did not port unused functions such as the batch loading functions.
* Fixed the formal parameter bloat in the file finding functions by making wfFindFile(), RepoGroup::findFile() and FileRepo::findFile() take an associative array of options instead of a rapidly growing collection of formal parameters. Maintained backwards compatibility for the $time parameter, which was the only one used in an extension.
* Took the advice of the todo comment on FileRepo::findFiles() and implemented a calling convention for specifying times (and other options)
* Removed the file object cache from Parser, redundant with the RepoGroup file cache
* Deleted clueless and non-functional LocalRepo::findFiles(). Does not respect redirects, deletion bitfields, or anything else nuanced about FileRepo::findFile(). Does not have the same calling convention as FileRepo::findFiles().
2009-08-15 09:59:59 +00:00
Remember the dot
700bcb30b0 Applied image attribute improvements from r52726 to galleries as well 2009-07-15 04:18:16 +00:00
Siebrand Mazeland
4698398e0f Follow-up to r51543: Fix another syntax error in ImageGallery.php. Sorry. 2009-06-06 17:07:17 +00:00
Siebrand Mazeland
ee7c479bca Follow-up to r51543: Fix syntax error in ImageGallery.php 2009-06-06 17:05:48 +00:00