Commit graph

233 commits

Author SHA1 Message Date
Ævar Arnfjörð Bjarmason
be2eb3ebf9 * Renamed the $exif var to $metadata to avoid confusion
* The Exif class is now globally accessable from within Image
* Degrade gracefully if wfShowEXIF is false
* Support for the new format() function in the Exif class
2005-05-08 16:13:46 +00:00
Ævar Arnfjörð Bjarmason
5cfa89d97b * Adding wfSuppressWarnings() before the Exif validation, some of the type
checks in Exif::validate will spew warnings on invalid data.
2005-05-08 07:32:04 +00:00
Ævar Arnfjörð Bjarmason
37354f7884 * To the tune of "America, Fuck Yeah" from "Team America: World Police"
"Type checking, FUCK YEAH! Coming again, to save the mother fucking day yeah" !
  (we now have typechecking of Exif tags)
2005-05-08 07:08:04 +00:00
Ævar Arnfjörð Bjarmason
6d75cf8ca5 * Removing /* private */ comment, already specified in the phpdoc 2005-05-08 04:11:32 +00:00
Ævar Arnfjörð Bjarmason
5472fbc98b * Removed stripExifData(), most of this functionality is now provided by the
Exif class
* Removed the check for $wgShowEXIF in getExifData(), this is already done in
  ImagePage.php which is the only file that calls this function.
2005-05-07 12:51:04 +00:00
Ævar Arnfjörð Bjarmason
0b9cac2c7f * Documented wfIsBadImage and improved its regex. 2005-04-25 10:33:20 +00:00
Tim Starling
aeab2e64a8 ported live patches 2005-04-25 03:30:24 +00:00
Magnus Manske
b6989fdb59 Note for Windows users how to enable EXIF functions 2005-04-22 08:07:30 +00:00
Brion Vibber
bcc7553e5f Remove unnecessary quoting on table names which breaks table prefixes 2005-04-21 22:37:32 +00:00
Ævar Arnfjörð Bjarmason
03ff01e70b * Moving img_exif to img_metadata, makes more sense if we're going to drop
some metadata for files which do not support exif in there (like Ogg or PNG)
2005-04-21 21:16:12 +00:00
Ævar Arnfjörð Bjarmason
a0d8fb6e3d * Removed exifReader.inc and added a function which does roughly the same
thing to Image.php.
2005-04-21 20:22:11 +00:00
Magnus Manske
fb7ab9aa6f Automatic EXIF update upon viewing 2005-04-21 12:59:32 +00:00
Magnus Manske
094702e29b Added img_exif blob to image table; now using this instead of direct image access (faster and commons-compatible) 2005-04-21 12:02:27 +00:00
Ævar Arnfjörð Bjarmason
8e1bfd2176 * Indent. 2005-04-21 11:42:35 +00:00
Magnus Manske
c6740488f6 Moving EXIF data retrieval to Image class 2005-04-21 11:28:56 +00:00
Tim Starling
77811c385f Lessons learnt from installing MediaWiki with safe_mode, especially support for uploads in such an environment. 2005-04-18 14:37:43 +00:00
Tim Starling
8c8ef55be5 * When an image is changed, invalidate pages that use it.
* Introduced image "broken links" allowing the user to quickly upload an image with that name
* "Upload a new version of this image" link from the image description page
2005-04-17 08:30:15 +00:00
Tim Starling
6eb85b88a8 Feature: user can specify upload destination name, separately from source name. JavaScript fills in the default destination, a blank destination also uses the default for the convenience of non-JS users. Also fixed a bug caused by the stat cache. 2005-04-16 17:17:18 +00:00
Tim Starling
f289929d78 Conversion from 1.4 schema, zero downtime 2005-04-16 12:19:29 +00:00
Tim Starling
133b4aad48 Support for non-standard commons configurations 2005-04-16 11:28:15 +00:00
Tim Starling
8395a4e8e7 Fixed various bugs with new image code, changed thumbnail paths as per JeLuF's suggestion 2005-04-16 11:05:41 +00:00
Tim Starling
f90c740f91 Fixed some obvious bugs with the new code and implemented If-Modified-Since handling 2005-04-16 05:48:21 +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
Ævar Arnfjörð Bjarmason
f0176ea80a * Changed the wfIsBadImage() regex to something hopefully easier to comprehend 2005-04-12 04:41:42 +00:00
Tim Starling
cdb3f96ab8 Various live patches ported from REL1_4 2005-04-12 04:03:21 +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
Brion Vibber
6f5560867c Start removing the Latin-1 hacks. We're going pure UTF-8 for 1.5... 2005-03-26 22:23:48 +00:00
Erik Moeller
fc8bdb46f4 1) omit "N Image:Bla.jpg" entry from Recent Changes for file uploads
2) wikify page titles in log entries which appear in RC
2005-03-24 13:13:08 +00:00
Tim Starling
06e6cd5d99 * Appllied patch for bug 1686, image metadata cache by Andrius Ramanauskas.
* Changed memcached invalidation style in this patch to recache instead of deleting, which is better for concurrency
* Added a fix for the media link problem, differnet to my fix for the same problem in REL1_4 but either should work.
* Fixed image deletion, it didn't work at all. Not sure when it was broken or if it's been reported. It was working in REL1_4. It was a trivial error.
2005-03-13 15:00:59 +00:00
Domas Mituzas
0aa2629efc remove inverse_timestamp wherever it is found and disable wfInvertTimestamp()
dear mysql3, try to remember how beautiful filesorts are, you're so good at it.
2005-02-21 15:33:58 +00:00
Domas Mituzas
76a4fb3ff1 someone forgot to add 'global'... :) fixing that! 2005-02-19 12:41:18 +00:00
Domas Mituzas
5a398cdab5 correct image path hashing 2005-02-19 08:19:21 +00:00
Jens Frank
81226a41cf Reduce number of places in the code where articles are saved.
Use Article::insertNewArticle instead of own code
2005-01-30 19:30:42 +00:00
Antoine Musso
2104f62734 fix phpdoc comment 2005-01-27 19:51:47 +00:00
Antoine Musso
e98c549e28 * Code presentation foobar() {
* a few double to single qutoes
2005-01-20 10:14:45 +00:00
Jens Frank
039650c456 BUG#1218 - Show the original image on image pages if the thumbnail would be bigger than the original image 2004-12-28 12:31:33 +00:00
Brion Vibber
45be19b526 * Avoid PHP warning messages when thumbnail not generated 2004-12-23 04:54:48 +00:00
Brion Vibber
64ac6b8e77 Merge SCHEMA_WORK into HEAD. Lots of changes, some things are probably broken:
* Page moves/overwrites are a little iffy
* Compression might not be working right
* Profit!
2004-12-19 08:00:50 +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
b525086012 1014 fix from REL1_4 2004-12-06 14:51:18 +00:00
Erik Moeller
f696971eba - Refactor Image class for better maintainability
- Add $wgRepositoryBaseUrl for backlinks to repository wiki from local
image pages
2004-12-02 19:56:00 +00:00
Evan Prodromou
4b42f18b66 Removed CVS keywords from files, to make merging between branches
easier. Interpolated keywords cause lots of conflicts and headaches at
merge time for older (<1.12.x) CVS versions.
2004-11-29 18:25:30 +00:00
Erik Moeller
ca8ef41fbb bugfix 2004-10-30 12:20:34 +00:00
Erik Moeller
e3881e5f74 -double encoding 2004-10-30 09:34:39 +00:00
Erik Moeller
89857080c7 use $wgLang->ucfirst, fix captallinks behavior 2004-10-30 09:12:15 +00:00
Erik Moeller
1e4ad78a72 if the shared repository is utf-8, and the local wiki is latin1, encode
filenames
2004-10-30 08:40:08 +00:00
Erik Moeller
37b73a8882 capitalize filename so that wikis with $wgCapitalLinks=false can access
shared repositories in a case insensitive way
2004-10-30 07:29:33 +00:00
Erik Moeller
dcb181d10a taking out $wgSharedUploadBaseUrl , which is not needed 2004-10-27 10:51:57 +00:00
Tim Starling
412eda0517 Correcting bugs due to double-prefixing table names. Removing obsolete Database member functions. Adding comments to Database.php 2004-10-24 07:10:33 +00:00
Erik Moeller
0d02b52702 Preliminary support for shared upload directory. This is primarily intended
for the Wikimedia Commons. If $wgUseSharedUploads is set, MediaWiki will try
to locate an image file in the shared upload directory if it is not found
locally. Thumbnails for shared images will also be generated in the
shared directory.

Note: I changed
                $text = $this->replaceInternalLinks ( $text );
                $text = $this->replaceExternalLinks( $text );
to
                $text = $this->replaceExternalLinks( $text );
                $text = $this->replaceInternalLinks ( $text );

in Parser.php. Otherwise [[Media:Bla.jpg]] to an absolute URL would be
incorrectly parsed as external links. The header of
replaceExternalLinks says:

        Note: we have to do external links before the internal ones

So the old order was not consistent with the documentation. I did some
tests and nothing seems to be broken, but I have some problems executing
parserTests.php so I couldn't test it systematically.
2004-10-21 05:04:14 +00:00
Wil Mahan
63408b4a43 Add "longdesc" attribute to all (non-external) images, containing
the URL of the image page.
2004-10-12 00:12:06 +00:00
Erik Moeller
e946bf9641 bugfix: check for existence of PRIMARY key in addition to UNIQUE key, as
MySQL returns "PRIMARY" as key_name. This caused uploads to fail with a
"patch required" message in HEAD even if the schema was up to date.
2004-10-11 04:10:41 +00:00
Brion Vibber
061ab79546 Add support for some alternate SVG rasterizers:
* ImageMagick - scaling is done after rasterization, and curves don't look good
* Batik - looks good; requires Java
* Sodipodi & Inkscape - haven't got them actually working yet; they crash on my mac when called from the web server though they work on the command line
2004-10-06 10:33:22 +00:00
Brion Vibber
0db266af1d Get native size from SVG files 2004-10-06 09:43:00 +00:00
Brion Vibber
1111b47477 Rasterize plain image views of SVG files at default size (currently 512px wide, maybe not the best).
Prefer ImageMagick over GD when setting up LocalSettings.php
2004-10-05 07:35:19 +00:00
Brion Vibber
b887b260a6 Quickie experimental SVG rasterization hack: if using $wgImageMagick, will attempt to create thumbnails of SVG images as PNG.
Incomplete so far:
* If you just ask for the image (or eg look at the image page) without a size, it tries a straight <img> with no rasterization still
* ImageMagick may not be the best renderer.
* It doesn't know the 'real' size of aspect ratio of the image.
2004-10-04 10:55:43 +00:00
Jens Frank
bbc1ac7f04 Documentation 2004-10-02 00:02:49 +00:00
Domas Mituzas
255fd3d629 allow turning off image path hashing. there was a feature request for that somewhere. 2004-09-28 19:54:51 +00:00
Domas Mituzas
6dd05bcd14 allow specifying alternative image upload base url (like external servers) 2004-09-23 12:15:42 +00:00
Jens Frank
3d946b5c22 New Special page: Visual list of newly uploaded images Special:Newimages 2004-09-14 20:57:54 +00:00
Jens Frank
7be4991983 New user option. Provides a setting to limit the image size on image description pages. 2004-09-10 00:53:31 +00:00
Domas Mituzas
11dbee2124 tsfixen 2004-09-09 07:13:06 +00:00
Antoine Musso
ba2afcd9fa Split files and classes in different packages for phpdocumentor. I probably changed some double quotes to single and used function foo () { shema 2004-09-03 23:00:01 +00:00
Antoine Musso
90155b8a97 Changing comments layout preparing for generated documentation with Phpdocumentor 2004-09-02 23:28:24 +00:00
Brion Vibber
41e752879c Special:Log and the logging table -- unified logging scariness!
Replaces the ugly, often breaking, manually archived log pages with
a nice clean table which can be sorted, trimmed, viewed in pieces, etc.
You can see all logged actions by some user, or affecting some page,
and can combine the views of all all logs in one.

There are probably still some broken things in here, but I want this
committed before the patch gets any bigger.

recentchanges table is altered to make rc_namespace signed so Special:
links can be listed in it.
2004-08-24 08:11:46 +00:00
Brion Vibber
82571fa72d Add back the slower version of Title::makeTitle as Title::makeTitleSafe()
and use it in a few places where user names, images, or messages are being
used to create titles.
2004-08-22 23:55:36 +00:00
Antoine Musso
3d60242fb5 massive double to single quotes conversion. I have not noticed any bug after a lot of testing 2004-08-22 17:24:50 +00:00
Brion Vibber
41c8b7bf72 Antiglobalization!
* Remove some unused and some useless functions from GlobalSettings.php
* wfEscapeHTML() replaced with PHP built-in htmlspecialchars().
* Moved some functions into Parser.php and Image.php
2004-08-13 15:55:59 +00:00
Brion Vibber
6a6411759e Use ImageMagick's -background parameter to set the background color of
transparent PNG thumbnails to white instead of default black. This will
be shown in Internet Explorer 6 and will generally be less invasive
(particularly for black-on-transparent line art!)

Fix for [ 978664 ] Thumbnails of transparent PNGs bad in IE6
2004-08-09 01:59:40 +00:00
Tim Starling
a89e4ec114 moved squid purge down, untested 2004-08-07 05:42:37 +00:00
Tim Starling
ac549401d4 * Support for table name prefixes throughout the code. No support yet for converting static SQL, which also means no installation. But it has been tested by creating the tables in the ordinary way and then renaming them
* DB_WRITE now called DB_MASTER, DB_READ now called DB_SLAVE
* Converted to use SQL wrapper functions instead of direct SQL in various places
* Experimental method for preserving the chronological order of events when slave servers are used. Untested.
* Fixes to the new post-parse existence test feature
* Some.. other stuff
2004-07-18 08:48:43 +00:00
Tim Starling
b96b707efa OOP calling convention for database functions. DBMS abstraction implemented by means of functions instead of global variables, PostgreSQL object converted to a subclass instead of a drop-in replacement. Also the beginnings of a flexible table name feature. 2004-07-10 03:09:26 +00:00
Brion Vibber
00f77472b4 If image is missing (or not an image file), move on silently 2004-05-31 23:50:30 +00:00
Jens Frank
7478555734 Only generate truecolor PNGs if original image is already truecolor.
Will still generate truecolor for PHP 4.2 or earlier.

Fix for bug #918857
2004-05-20 12:08:42 +00:00
Jens Frank
069d863341 Only generate truecolor PNGs if original image is already truecolor.
Will still generate truecolor for PHP 4.2 or earlier.

Fix for bug #918857
2004-05-20 12:03:22 +00:00
Jens Frank
a1509c0fd3 make image width an integer, not a real number 2004-05-09 10:55:47 +00:00
Jens Frank
6606ab513e Image bounding box can be specified instead of width, e.g. as
100x100px, making the image not wider than 100px and not higher
than 100px, keeping aspect ratio.
2004-05-09 10:52:50 +00:00
Jens Frank
e434f7b9cd Moved image history retrieval function to Image.php.
Variable names in Skin::imageHistoryLine() changed.
2004-05-08 18:55:22 +00:00
Jens Frank
96f47a6c5b Merged wfImagePath into Image class 2004-05-06 06:31:35 +00:00
Jens Frank
144e0c2ed1 moved some more functions from GlobalFunctions to Image 2004-05-04 20:35:37 +00:00
Brion Vibber
00e5822e17 Don't create thumbnail images larger than the image; use the source image
itself if asked. Reject attempts at zero or negative-width thumbs.
2004-04-29 04:42:52 +00:00
Jens Frank
42f39da880 wfImageUrl moved from Globalfunctions to Image
Preferred access via $image->getUrl(), but for compatibility
Image::wfImageUrl() still works
2004-04-24 23:45:11 +00:00
Jens Frank
bbe9f6a37b Move image-specific methods to Image-class
Step 1: createThumb and related functions
2004-04-24 22:33:06 +00:00