Remove $wgUseTeX for checking if editing tools should be shown
authorphysikerwelt <wiki@physikerwelt.de>
Sun, 26 Jan 2014 00:24:59 +0000 (00:24 +0000)
committerPhysikerwelt <wiki@physikerwelt.de>
Sun, 26 Jan 2014 00:38:11 +0000 (00:38 +0000)
The EditPage toolbar used the global $wgUseTeX to determine, if
the icon for inserting math should be shown. Now we simply check
if the class MathRenderer exits.

Change-Id: I0a0203f2d8c295bfc56694eb08c9986420c086cf

includes/EditPage.php

index 7115eab..a71871d 100644 (file)
@@ -3319,7 +3319,7 @@ HTML
         */
        static function getEditToolbar() {
                global $wgStylePath, $wgContLang, $wgLang, $wgOut;
-               global $wgUseTeX, $wgEnableUploads, $wgForeignFileRepos;
+               global $wgEnableUploads, $wgForeignFileRepos;
 
                $imagesAvailable = $wgEnableUploads || count( $wgForeignFileRepos );
 
@@ -3400,7 +3400,7 @@ HTML
                                'tip'    => wfMessage( 'media_tip' )->text(),
                                'key'    => 'M'
                        ) : false,
-                       $wgUseTeX ? array(
+                       class_exists( 'MathRenderer' ) ? array(
                                'image'  => $wgLang->getImageFile( 'button-math' ),
                                'id'     => 'mw-editbutton-math',
                                'open'   => "<math>",