Merge "Fix: Special page ShowMathImage should read the mode as string"

This commit is contained in:
jenkins-bot 2015-08-11 20:34:30 +00:00 committed by Gerrit Code Review
commit 7388292cab
1 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@ class SpecialMathShowImage extends SpecialPage {
} else {
$asciimath = '';
}
$this->mode = $request->getInt( 'mode', 'mathml' );
$this->mode = MathHooks::mathModeToString( $request->getText( 'mode' ), 'mathml' );
if ( !in_array( $this->mode, MathRenderer::getValidModes() ) ) {
// Fallback to the default if an invalid mode was specified
$this->mode = 'mathml';
@ -116,7 +116,7 @@ class SpecialMathShowImage extends SpecialPage {
/**
* Prints the specified error message as svg.
* @param string $msg error message
* @return xml svg image with the error message
* @return string xml svg image with the error message
*/
private function printSvgError( $msg ) {
global $wgDebugComments;