Update the DB output hash if outdated according to texvc

* Otherwise all future <math> hits will check the wrong file
  (which may not exist), recreate the png, and store over the
  proper file (even if it was already there). Update the DB to
  point to the right hash instead.

bug: 60997
Change-Id: Ib833ad32ff1e4506e9b8ab2cc1b72516cb072cd5
This commit is contained in:
Aaron Schulz 2014-02-14 15:35:11 -08:00
parent 8e10cffd43
commit 078347b35e
1 changed files with 5 additions and 1 deletions

View File

@ -193,7 +193,11 @@ class MathTexvc extends MathRenderer {
}
if ( !$errmsg ) {
$this->setHash( substr( $contents, 1, 32 ) );
$newHash = substr( $contents, 1, 32 );
if ( $this->hash !== $newHash ) {
$this->recall = false; // DB needs update in writeCache() (bug 60997)
}
$this->setHash( $newHash );
}
wfRunHooks( 'MathAfterTexvc', array( &$this, &$errmsg ) );