From 078347b35e10cfdc54c400c4752fd4d6d8fb021b Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 14 Feb 2014 15:35:11 -0800 Subject: [PATCH] Update the DB output hash if outdated according to texvc * Otherwise all future 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 --- MathTexvc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MathTexvc.php b/MathTexvc.php index 89eb94d..f958b81 100644 --- a/MathTexvc.php +++ b/MathTexvc.php @@ -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 ) );