Index: trunk/extensions/PdfBook/PdfBook.php |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | */ |
18 | 18 | if( !defined( 'MEDIAWIKI' ) ) die( "Not an entry point." ); |
19 | 19 | |
20 | | -define( 'PDFBOOK_VERSION', "1.0.10, 2011-11-08" ); |
| 20 | +define( 'PDFBOOK_VERSION', "1.0.11, 2011-11-13" ); |
21 | 21 | |
22 | 22 | $dir = dirname( __FILE__ ); |
23 | 23 | $wgAutoloadClasses['PdfBookHooks'] = $dir . '/PdfBook.hooks.php'; |
Index: trunk/extensions/PdfBook/PdfBook.hooks.php |
— | — | @@ -100,9 +100,7 @@ |
101 | 101 | else { |
102 | 102 | # Write the HTML to a tmp file |
103 | 103 | $file = "$wgUploadDirectory/" . uniqid( 'pdf-book' ); |
104 | | - $fh = fopen( $file, 'w+' ); |
105 | | - fwrite( $fh, $html ); |
106 | | - fclose( $fh ); |
| 104 | + file_put_contents( $file, $html ); |
107 | 105 | |
108 | 106 | $footer = $format == 'single' ? "..." : ".1."; |
109 | 107 | $toc = $format == 'single' ? "" : " --toclevels $levels"; |