r45889 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45888‎ | r45889 | r45890 >
Date:07:32, 19 January 2009
Author:aaron
Status:ok
Tags:
Comment:
Show file dir creation error
Modified paths:
  • /trunk/extensions/FlaggedRevs/specialpages/RatingHistory_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/specialpages/RatingHistory_body.php
@@ -252,7 +252,8 @@
253253 // Set file path
254254 $dir = dirname($filePath);
255255 // Make sure directory exists
256 - if( !is_dir($dir) && !wfMkdirParents( $dir, 0777 ) ) {
 256+ if( !file_exists($dir) && !wfMkdirParents( $dir, 0777 ) ) {
 257+ throw new MWException( 'Could not create file directory!' );
257258 return false;
258259 }
259260 $plot->SetOutputFile( $filePath );
@@ -339,6 +340,7 @@
340341 $dir = dirname($filePath);
341342 // Make sure directory exists
342343 if( !file_exists($dir) && !wfMkdirParents( $dir, 0777 ) ) {
 344+ throw new MWException( 'Could not create file directory!' );
343345 return false;
344346 }
345347 // Set some parameters

Status & tagging log