Index: trunk/phase3/includes/filerepo/ForeignAPIRepo.php |
— | — | @@ -133,7 +133,10 @@ |
134 | 134 | if ( !is_dir($wgUploadDirectory . '/' . $path) ) { |
135 | 135 | wfMkdirParents($wgUploadDirectory . '/' . $path); |
136 | 136 | } |
137 | | - |
| 137 | + if ( !is_writable( $wgUploadDirectory . '/' . $path . $fileName ) ) { |
| 138 | + wfDebug( __METHOD__ . " could not write to thumb path\n" ); |
| 139 | + return $foreignUrl; |
| 140 | + } |
138 | 141 | $localUrl = $wgServer . $wgUploadPath . '/' . $path . $fileName; |
139 | 142 | $thumb = Http::get( $foreignUrl ); |
140 | 143 | # FIXME: Delete old thumbs that aren't being used. Maintenance script? |