dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f79522a
)
better error messages
author
Tim Starling
<tstarling@users.mediawiki.org>
Wed, 25 Apr 2007 07:40:22 +0000
(07:40 +0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Wed, 25 Apr 2007 07:40:22 +0000
(07:40 +0000)
thumb.php
patch
|
blob
|
history
diff --git
a/thumb.php
b/thumb.php
index
c67468b
..
4ca24ed
100644
(file)
--- a/
thumb.php
+++ b/
thumb.php
@@
-71,7
+71,7
@@
try {
$thumb = false;
}
$thumb = false;
}
-if ( $thumb && $thumb->getPath() ) {
+if ( $thumb && $thumb->getPath()
&& file_exists( $thumb->getPath() )
) {
wfStreamFile( $thumb->getPath() );
} elseif ( $img ) {
header( 'Cache-Control: no-cache' );
wfStreamFile( $thumb->getPath() );
} elseif ( $img ) {
header( 'Cache-Control: no-cache' );
@@
-80,14
+80,19
@@
if ( $thumb && $thumb->getPath() ) {
if ( !$thumb ) {
$msg = wfMsgHtml( 'thumbnail_error', 'Image::transform() returned false' );
} elseif ( $thumb->isError() ) {
if ( !$thumb ) {
$msg = wfMsgHtml( 'thumbnail_error', 'Image::transform() returned false' );
} elseif ( $thumb->isError() ) {
- $msg = $thumb->
toHtml
();
- } else {
+ $msg = $thumb->
getHtmlMsg
();
+ } else
if ( !$thumb->getPath() )
{
$msg = wfMsgHtml( 'thumbnail_error', 'No path supplied in thumbnail object' );
$msg = wfMsgHtml( 'thumbnail_error', 'No path supplied in thumbnail object' );
+ } else {
+ $msg = wfMsgHtml( 'thumbnail_error', 'Output file missing' );
}
echo <<<EOT
<html><head><title>Error generating thumbnail</title></head>
<body>
}
echo <<<EOT
<html><head><title>Error generating thumbnail</title></head>
<body>
+<h1>Error generating thumbnail</h1>
+<p>
$msg
$msg
+</p>
</body>
</html>
</body>
</html>