Index: trunk/extensions/Collection/Collection.i18n.php |
— | — | @@ -130,6 +130,8 @@ |
131 | 131 | * Not satisfied with the output? See [[{{MediaWiki:Coll-helppage}}|the help page about books]] for possibilities to improve it.", |
132 | 132 | 'coll-notfound_title' => 'Book not found', |
133 | 133 | 'coll-notfound_text' => 'Could not find book page.', |
| 134 | + 'coll-download_notfound_title' => 'File not found', |
| 135 | + 'coll-download_notfound_text' => 'The file you are trying to download does not exist: Maybe it has been deleted and needs to be regenerated.', |
134 | 136 | 'coll-is_cached' => '<ul><li>A cached version of the document has been found, so no rendering was necessary. <a href="$1">Force re-rendering.</a></li></ul>', |
135 | 137 | 'coll-excluded-templates' => '* Templates in category [[:Category:$1|$1]] have been excluded.', |
136 | 138 | 'coll-blacklisted-templates' => '* Templates on blacklist [[:$1]] have been excluded.', |
Index: trunk/extensions/Collection/Collection.body.php |
— | — | @@ -874,6 +874,10 @@ |
875 | 875 | 'collection_id' => $wgRequest->getVal( 'collection_id' ), |
876 | 876 | 'writer' => $wgRequest->getVal( 'writer' ), |
877 | 877 | ), $timeout=false, $toFile=$tempfile ); |
| 878 | + if (!$headers) { |
| 879 | + $wgOut->showErrorPage( 'coll-download_notfound_title', 'coll-download_notfound_text' ); |
| 880 | + return; |
| 881 | + } |
878 | 882 | wfResetOutputBuffers(); |
879 | 883 | if ( isset( $headers['content-type'] ) ) { |
880 | 884 | header( 'Content-Type: ' . $headers['content-type']); |