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:
8452620
)
Bow out more gracefully if we can't write to the file. We've already got the foreign...
author
Chad Horohoe
<demon@users.mediawiki.org>
Fri, 5 Dec 2008 20:22:43 +0000
(20:22 +0000)
committer
Chad Horohoe
<demon@users.mediawiki.org>
Fri, 5 Dec 2008 20:22:43 +0000
(20:22 +0000)
includes/filerepo/ForeignAPIRepo.php
patch
|
blob
|
history
diff --git
a/includes/filerepo/ForeignAPIRepo.php
b/includes/filerepo/ForeignAPIRepo.php
index
a6773e1
..
c1d2ce1
100644
(file)
--- a/
includes/filerepo/ForeignAPIRepo.php
+++ b/
includes/filerepo/ForeignAPIRepo.php
@@
-133,7
+133,10
@@
class ForeignAPIRepo extends FileRepo {
if ( !is_dir($wgUploadDirectory . '/' . $path) ) {
wfMkdirParents($wgUploadDirectory . '/' . $path);
}
-
+ if ( !is_writable( $wgUploadDirectory . '/' . $path . $fileName ) ) {
+ wfDebug( __METHOD__ . " could not write to thumb path\n" );
+ return $foreignUrl;
+ }
$localUrl = $wgServer . $wgUploadPath . '/' . $path . $fileName;
$thumb = Http::get( $foreignUrl );
# FIXME: Delete old thumbs that aren't being used. Maintenance script?