aboutsummaryrefslogtreecommitdiffstats
path: root/thumb.php
Commit message (Collapse)AuthorAgeFilesLines
* Replace some deprecated method calls.Siebrand Mazeland2012-08-191-4/+3
| | | | Change-Id: Id4beca7b6821139fcc319c5694917e68668835ee
* Use wfMessage instead of deprecated wfMsg*Alex Monk2012-08-181-8/+9
| | | | | | Or $this->msg in special pages. Change-Id: I774a89d646615053c8424050e42ad95601f92543
* Various thumb.php fixes.Aaron2012-07-261-23/+27
| | | | | | | | | * Made wfThumbHandle404() handle full REQUEST_URI urls. * Made wfExtractThumbParams() handle protocal relative zone urls. * Added FileRepo::getZoneHandlerUrl() and site zone configuration to simplify wmf rewrite rules. * Renamed some variables to be less misleading. Change-Id: Ic3e23c2a623c1241ee22a9811aee073fb07aa68c
* Added missing GPLv2 headers in some places.Alexandre Emsenhuber2012-05-231-1/+16
| | | | | | Also made file documentation more consistent. Change-Id: I30e124514396f110a572467b94ca06cefd5f7b46
* [FileRepo] Added support for temp file repos (to preserve our thumb.php hack).Aaron Schulz2012-04-061-2/+20
| | | | | | | | | | | | | | | * Added FileRepo::getTempRepo() to get a temporary repo similiar to the one used in wmf1.19 thumb.php. * Merged and cleaned up wmf1.19 code into thumb.php to handle temp files and thumbnails. Change 1: prevent FileRepo::getTempRepo() from being called on the result of FileRepo::getTempRepo(). Change 2: made FileRepo::getTempRepo() account for cases when the 'directory' param is not the empty string. Change 3: * Tweaked TempFileRepo to override getTempRepo() to enforce restriction. * Added FileRepo::getTempHashPath() and used in thumb.php to get the correct path. Change-Id: I2937b5ffb3ec9a7e2741b42bc28dc76833053fcd
* trunk/phase3 is now mediawiki/corePlatonides2012-03-231-1/+1
| | | | Change-Id: Ief2721ee6573a5e54a276c91de636d9e1a678b8b
* Drag in a change noticed in wmf branchesSam Reed2012-02-111-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111240
* * Removed thumb.php comment about ProofreadPage, page numbers are more general.Aaron Schulz2012-02-101-1/+0
| | | | | | | * Added ExtractThumbParameters hook handlers for ogg and tiff handler extensions. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111199
* r111076: url decode the 'rel404' path...*ahem*. Archived files and files ↵Aaron Schulz2012-02-101-1/+1
| | | | | | | with special chars are otherwise broken. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111144
* (bug 34231) - 'Make thumb.php error or redirect for urls with bogus paths ↵Aaron Schulz2012-02-091-5/+16
| | | | | | | but valid file & thumb names.' Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111076
* Similar to r108937: fixed breakage where the zone urls were defined as ↵Aaron Schulz2012-01-201-4/+9
| | | | | | | relative paths. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/109643
* r105512: Handle REDIRECT_URL discrepancies and always work with URI paths ↵Aaron Schulz2012-01-141-6/+17
| | | | | | | for thumb 404 handling Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/108937
* Reverted r108743 per CR comment. This should at least be discussed first.Aaron Schulz2012-01-121-0/+6
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/108745
* Kill "* @return void"Sam Reed2012-01-121-6/+0
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/108743
* FU r105512: urldecode() the file and thumb name in wfExtractThumbParams() ↵Aaron Schulz2011-12-221-0/+2
| | | | | | | for 404 handling as needed. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/107020
* Merged FileBackend branch. Manually avoiding merging the many prop-only ↵Aaron Schulz2011-12-201-12/+12
| | | | | | | changes SVN likes to sprinkle in (easy to spot from the change list). Did not add SwiftFileBackend.php as it still is in development. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/106752
* update all core usage of deprecated Title::userCanRead()Robin Pepermans2011-12-131-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/106010
* FU r105512: just always use thumb.php style errorsAaron Schulz2011-12-081-2/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/105516
* FU r101117: removed cURL thumb handler code and made thumb_handler.php a ↵Aaron Schulz2011-12-081-14/+108
| | | | | | | | | | | | thin wrapper around thumb.php * Moved original URL fetching code and parameter extraction code to thumb.php * Made use of local repo URL and hash settings to avoid extra config code * This makes it easy to add hooks for extensions/config to alter behavoir (ExtractThumbParameters hook added) * Added FileRepo::getHashLevels() Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/105512
* FU r100535:Aaron Schulz2011-10-281-3/+5
| | | | | | | | | | * Thumb handler can now also work without cURL * Combined related config vars into array config vars * Folded $thgThumb404File into $thgThumbCallbacks * Avoided some global pollution Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/101117
* More whitespace tweaks...and fixed doc typoAaron Schulz2011-10-201-2/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/100362
* Minor code style cleanups and tweaksAaron Schulz2011-10-191-8/+12
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/100192
* Fix whitespace, bracesSam Reed2011-10-151-1/+5
| | | | | | | Fix return items Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/99926
* Move wfStreamFile() into a class, update all callers in core (only 3 ↵Chad Horohoe2011-08-131-4/+2
| | | | | | | | | extensions use it afaict), leave wfStreamFile() as a b/c alias for now. Yay less global functions, autoloading and less manual require()s. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/94427
* HipHop improvements:Tim Starling2011-05-301-1/+5
| | | | | | | | | | | | | | | | | * Added the ability to compile extensions. The build process is bootstrapped by running MediaWiki in interpreted mode. Extension setup file inclusions are slightly modified in a way that makes them register themselves for compilation. Then the same LocalSettings.php uses the compiled extension setup file when the compiled binary runs. * Tested with Cite and ParserFunctions. The code which lets you have an extensions directory in a place other than $IP/../extensions is untested. * Simplified WebStart.php slightly by using a custom $_SERVER variable to mark compiled mode. It will break if you don't use the supplied server.conf, but that will break a lot of things so don't do that. * Fixed the core web entry points to include WebStart.php in compiled mode instead of interpreted. * Made the build directory configurable. This is mostly so that I can grep the source tree without seeing loads of generated C++. * In server.conf, added a rewrite rule allowing a /wiki/$1 article path. * Removed server.conf log file location "/dev/stdout", breaks when you switch user * Disable static content cache, breaks horribly when you set SourceRoot to a directory containing 7GB of files. * Rewrote the run-server script in PHP, mostly to support the configurable build directory feature. * Added an option to the run-server script to allow running in interpreted (hphpi) mode. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/89166
* Fix and add some comments.Russ Nelson2011-05-021-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/87277
* Yet more additions of wfProfileOut()Platonides2011-02-101-0/+9
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/81896
* Removed error suppression operators (per bug 24159)Alexandre Emsenhuber2010-07-181-2/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/69505
* Fix data leakage from thumb.php for wikis where access to images is ↵Tim Starling2010-03-081-2/+19
| | | | | | | restricted (e.g. using img_auth.php). For backport to 1.15. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/63431
* Provisional revert of r56916 "(bug 20802) Fixed thumb.php redirect handling. ↵Brion Vibber2009-09-301-1/+1
| | | | | | | | | Changed wfLocalFile call into RepoGroup::singleton()->getLocalRepo()->findFile" This appears to make thumb.php more permissive than it's indended and could lead to littering false-positive thumbnails around the server when used to implement 404 handlers as designed. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/57137
* (bug 20802) Fixed thumb.php redirect handling. Changed wfLocalFile call into ↵Bryan Tong Minh2009-09-251-1/+1
| | | | | | | RepoGroup::singleton()->getLocalRepo()->findFile Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/56916
* Step 2 in NS_IMAGE -> NS_FILE transition (bug 44) (WARNING: huge commit).Ilmari Karonen2008-12-011-1/+1
| | | | | | | This is a global search and replace of NS_IMAGE and NS_IMAGE_TALK with NS_FILE and NS_FILE_TALK respectively in all core files, excluding those already updated in step 1 (r44004). Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/44121
* revert bogus changeAaron Schulz2008-08-131-2/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/39268
* use $sourcePath here tooAaron Schulz2008-08-131-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/39267
* use getArchivePath()Aaron Schulz2008-08-131-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/39266
* use makeTitleSafe()Aaron Schulz2008-08-131-1/+5
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/39263
* we need a $title hereAaron Schulz2008-08-131-1/+8
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/39261
* check 'archived' paramAaron Schulz2008-08-131-1/+11
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/39260
* replace live hack: include debug info in thumb.php (switch it in with ↵Brion Vibber2008-06-191-0/+9
| | | | | | | $wgShowHostnames) Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/36486
* WARNING: HUGE COMMITAlexandre Emsenhuber2008-05-201-1/+2
| | | | | | | | | | | | | | | | | | Doxygen documentation update: * Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group. * Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file. * Removed some empty comments * Removed some ?> Added following groups: * ExternalStorage * JobQueue * MaintenanceLanguage One more thing: there are still a lot of warnings when generating the doc. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/35098
* In thumb.php:Tim Starling2008-01-301-69/+93
| | | | | | | | | * Return 404 response code for missing source file and bad title * Additionally check IMS against the source file timestamp, to allow for more aggressive purging of the server thumbnail directory. * Refactor Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/30290
* Return an error message if the requested size was bigger than the source, or ↵Tim Starling2007-09-031-14/+16
| | | | | | | more generally if the "transformed" output file is in fact the source file. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/25461
* A few comment tag tweaks.Nick Jenkins2007-07-111-0/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/23992
* Remove ?>'s from files. They're pointless, and just asking for people to ↵Aryeh Gregor2007-06-291-1/+1
| | | | | | | mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/23531
* Merged filerepo-work branch:Tim Starling2007-05-301-46/+13
| | | | | | | | | | | | | | | | | * 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. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/22580
* Output what was asked for. Don't dirty up a clean API like thumb.php with ↵Tim Starling2007-05-041-24/+35
| | | | | | | arbitrary defaults when invalid parameters are specified. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/21855
* better error messagesTim Starling2007-04-251-3/+8
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/21551
* * Introduced media handler modules for file-type specific operations: ↵Tim Starling2007-04-201-30/+65
| | | | | | | | | | | | | | | | | | | 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 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/21411
* * Add 'charset' to Content-Type headers on various HTTP error responsesBrion Vibber2007-02-211-1/+1
| | | | | | | | | | | | | | | | to forestall additional UTF-7-autodetect XSS issues. Probably not an issue on Apache 2.0+, but most servers send only 'text/html' by default when the script didn't specify more details. This fixes an issue with the Ajax interface error message on MSIE when $wgUseAjax is enabled (not default configuration); this UTF-7 variant on a previously fixed attack vector was discovered by Moshe BA from BugSec: http://www.bugsec.com/articles.php?Security=24 * Trackback responses now specify XML content type Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/20007
* * Moved the main ob_start() from the default LocalSettings.php to WebStart.php. Tim Starling2007-02-191-0/+1
| | | | | | | | | | The ob_start() section should preferably be removed from older LocalSettings.php files. * Give Content-Length header for HTTP/1.0 clients. * Partial support for Flash cross-domain-policy filtering. Text entry points should be protected, but uploads are not. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/19996