jenkins-bot has submitted this change and it was merged.
Change subject: Fix: Special page ShowMathImage should read the mode as string
......................................................................
Fix: Special page ShowMathImage should read the mode as string
The special page used getInt to read the mode parameter that was
changed to be a string and no longer an integer.
Bug: T108388
Change-Id: Ia63fad2d08cca2d4b0ed6ce09b72a30d6cfc9cac
---
M SpecialMathShowImage.php
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Mobrovac: Looks good to me, but someone else must approve
Jforrester: Looks good to me, approved
jenkins-bot: Verified
diff --git a/SpecialMathShowImage.php b/SpecialMathShowImage.php
index 6b6c956..8ded73d 100644
--- a/SpecialMathShowImage.php
+++ b/SpecialMathShowImage.php
@@ -49,7 +49,7 @@
} 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';
@@ -58,7 +58,7 @@
$this->setHeaders( false );
echo $this->printSvgError( 'No Inputhash specified' );
} else {
- if ( $tex === '' && $asciimath === ''){
+ if ( $tex === '' && $asciimath === '' ){
switch ( $this->mode ) {
case 'png':
$this->renderer =
MathTexvc::newFromMd5( $hash );
@@ -116,7 +116,7 @@
/**
* 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;
--
To view, visit https://gerrit.wikimedia.org/r/230393
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia63fad2d08cca2d4b0ed6ce09b72a30d6cfc9cac
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Mobrovac <[email protected]>
Gerrit-Reviewer: TheDJ <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits