r43964 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43963‎ | r43964 | r43965 >
Date:02:13, 26 November 2008
Author:brion
Status:ok
Tags:
Comment:
* (bug 16440) Broken 0-byte math renderings are now deleted and re-rendered when page is re-parsed.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Math.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Math.php
@@ -209,8 +209,14 @@
210210 $this->html = $rpage->math_html;
211211 $this->mathml = $rpage->math_mathml;
212212
213 - if( file_exists( $this->_getHashPath() . "/{$this->hash}.png" ) ) {
214 - return true;
 213+ $filename = $this->_getHashPath() . "/{$this->hash}.png";
 214+ if( file_exists( $filename ) ) {
 215+ if( filesize( $filename ) == 0 ) {
 216+ // Some horrible error corrupted stuff :(
 217+ @unlink( $filename );
 218+ } else {
 219+ return true;
 220+ }
215221 }
216222
217223 if( file_exists( $wgMathDirectory . "/{$this->hash}.png" ) ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -366,6 +366,8 @@
367367 * (bug 7726) Searches for words less than 4 characters now work without
368368 requiring customization of MySQL server settings
369369 * Honour unchecked "Leave a redirect behind" for moved subpages
 370+* (bug 16440) Broken 0-byte math renderings are now deleted and re-rendered
 371+ when page is re-parsed.
370372
371373 === API changes in 1.14 ===
372374

Follow-up revisions

RevisionCommit summaryAuthorDate
r43965Follow-up to r43964 (bug 16440)...brion02:28, 26 November 2008

Status & tagging log