Index: trunk/phase3/maintenance/importImages.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | if ( isset( $options['protect'] ) && isset( $options['unprotect'] ) ) |
35 | 35 | die( "Cannot specify both protect and unprotect. Only 1 is allowed.\n" ); |
36 | 36 | |
37 | | -if ( isset( $options['protect'] ) && $options['protect'] == 1 ) |
| 37 | + if ( isset( $options['protect'] ) && $options['protect'] == 1 ) |
38 | 38 | die( "You must specify a protection option.\n" ); |
39 | 39 | |
40 | 40 | # Prepare the list of allowed extensions |
— | — | @@ -72,8 +72,8 @@ |
73 | 73 | $limit = @$options['limit']; |
74 | 74 | if ( $limit ) $limit = (int)$limit; |
75 | 75 | |
76 | | - # Get the upload comment |
77 | | - $comment = NULL; |
| 76 | + # Get the upload comment. Provide a default one in case there's no comment given. |
| 77 | + $comment = 'Importing image file'; |
78 | 78 | |
79 | 79 | if ( isset( $options['comment-file'] ) ) { |
80 | 80 | $comment = file_get_contents( $options['comment-file'] ); |
— | — | @@ -186,7 +186,7 @@ |
187 | 187 | } |
188 | 188 | |
189 | 189 | if ( !$commentText ) { |
190 | | - $commentText = $comment ? $comment : 'Importing image file'; |
| 190 | + $commentText = $comment; |
191 | 191 | } |
192 | 192 | } |
193 | 193 | |