Index: trunk/extensions/FlaggedRevs/specialpages/RatingHistory_body.php |
— | — | @@ -338,7 +338,7 @@ |
339 | 339 | // Set file path |
340 | 340 | $dir = dirname($filePath); |
341 | 341 | // Make sure directory exists |
342 | | - if( !is_dir($dir) && !wfMkdirParents( $dir, 0777 ) ) { |
| 342 | + if( !file_exists($dir) && !wfMkdirParents( $dir, 0777 ) ) { |
343 | 343 | return false; |
344 | 344 | } |
345 | 345 | // Set some parameters |
— | — | @@ -454,6 +454,7 @@ |
455 | 455 | $svgPath = $this->getFilePath( $tag, 'svg' ); |
456 | 456 | $svgHandler = new SvgHandler(); |
457 | 457 | if( !@file_put_contents( $svgPath, $plot->svg ) ) { |
| 458 | + throw new MWException( 'Could not write SVG file!' ); |
458 | 459 | return false; |
459 | 460 | } |
460 | 461 | // Rasterize due to IE suckage |