MediaWiki  REL1_20
thumb.php File Reference

PHP script to stream out an image thumbnail. More...

Go to the source code of this file.

Enumerations

enum  MW_NO_OUTPUT_COMPRESSION

Functions

 wfExtractThumbParams ($uriPath)
 Extract the required params for thumb.php from the thumbnail request URI.
 wfStreamThumb (array $params)
 Stream a thumbnail specified by parameters.
 wfThumbError ($status, $msg)
 Output a thumbnail generation error message.
 wfThumbHandle404 ()
 Handle a thumbnail request via thumbnail file URL.
 wfThumbHandleRequest ()
 Handle a thumbnail request via query parameters.

Detailed Description

PHP script to stream out an image thumbnail.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html

Definition in file thumb.php.


Enumeration Type Documentation

Definition at line 24 of file thumb.php.


Function Documentation

wfExtractThumbParams ( uriPath)

Extract the required params for thumb.php from the thumbnail request URI.

At least 'width' and 'f' should be set if the result is an array.

Parameters:
$uriPathString Thumbnail request URI path
Returns:
Array|null associative params array or null

Definition at line 296 of file thumb.php.

References $matches, $params, $size, RepoGroup\singleton(), wfExpandUrl(), wfParseUrl(), and wfRunHooks().

Referenced by wfThumbHandle404().

wfThumbError ( status,
msg 
)

Output a thumbnail generation error message.

Parameters:
$statusinteger
$msgstring
Returns:
void

Definition at line 360 of file thumb.php.

References $url, echo, and wfHostname().

Referenced by wfStreamThumb(), and wfThumbHandle404().

Handle a thumbnail request via thumbnail file URL.

Returns:
void

Definition at line 63 of file thumb.php.

References $params, wfExtractThumbParams(), wfParseUrl(), wfStreamThumb(), and wfThumbError().

Handle a thumbnail request via query parameters.

Returns:
void

Definition at line 50 of file thumb.php.

References $params, and wfStreamThumb().