Avoid calling readFromDatabase in source mode
In source mode there is no database cache, so we do not need to call readFromDatabase there. Change-Id: I791eab923f5ed6e0a3e28dbaf49ba1ae8fdb6cdc
This commit is contained in:
parent
0ddd3afaea
commit
3564b7cfe8
@ -610,7 +610,7 @@ abstract class MathRenderer {
|
|||||||
// equation was already checked or checking is disabled
|
// equation was already checked or checking is disabled
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
if( (int) $wgMathDisableTexFilter == MW_MATH_CHECK_NEW ){
|
if( (int) $wgMathDisableTexFilter == MW_MATH_CHECK_NEW && $this->mode != MW_MATH_SOURCE ){
|
||||||
if( $this->readFromDatabase() ){
|
if( $this->readFromDatabase() ){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,15 @@
|
|||||||
* @ingroup Parser
|
* @ingroup Parser
|
||||||
*/
|
*/
|
||||||
class MathSource extends MathRenderer {
|
class MathSource extends MathRenderer {
|
||||||
|
/**
|
||||||
|
* @param string $tex
|
||||||
|
* @param array $params
|
||||||
|
*/
|
||||||
|
function __construct( $tex = '', $params = array() ) {
|
||||||
|
parent::__construct( $tex, $params );
|
||||||
|
$this->setMode( MW_MATH_SOURCE );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders TeX by outputting it to the browser in a span tag
|
* Renders TeX by outputting it to the browser in a span tag
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user