Physikerwelt has submitted this change and it was merged. Change subject: Fix Relation from mathlatexml to mathindex ......................................................................
Fix Relation from mathlatexml to mathindex * Ensure that latexml rendering mode is enabled Change-Id: I884f0ee5141f6e9dfae7e1fe6dcb8b8ed36b8e6f --- M MathSearch.hooks.php M db/mathindex.sql M extension.json 3 files changed, 12 insertions(+), 1 deletion(-) Approvals: Physikerwelt: Verified; Looks good to me, approved diff --git a/MathSearch.hooks.php b/MathSearch.hooks.php index 9205e8c..8763749 100644 --- a/MathSearch.hooks.php +++ b/MathSearch.hooks.php @@ -391,4 +391,14 @@ static function resetId() { self::$nextID = 0; } + + /** + * Enable latexml rendering mode as option by default + */ + public static function registerExtension() { + global $wgMathValidModes; + if ( ! in_array( 'latexml', $wgMathValidModes ) ) { + $wgMathValidModes[] = 'latexml'; + } + } } diff --git a/db/mathindex.sql b/db/mathindex.sql index 9893fc9..3859367 100644 --- a/db/mathindex.sql +++ b/db/mathindex.sql @@ -20,7 +20,7 @@ mathindex_timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (mathindex_revision_id,mathindex_anchor), - -- FOREIGN KEY ( /*i*/mathindex_inputhash ) REFERENCES mathlatexml( math_inputhash ), + FOREIGN KEY ( /*i*/mathindex_inputhash ) REFERENCES mathlatexml( math_inputhash ), FOREIGN KEY ( /*i*/mathindex_revision_id ) REFERENCES revision( rev_id ) ON DELETE CASCADE ) /*$wgDBTableOptions*/; \ No newline at end of file diff --git a/extension.json b/extension.json index 5649eca..d5fa24c 100644 --- a/extension.json +++ b/extension.json @@ -4,6 +4,7 @@ "author": "Moritz Schubotz", "url": "https://www.mediawiki.org/wiki/Extension:MathSearch", "descriptionmsg": "mathsearch-desc", + "callback": "MathSearchHooks::registerExtension", "type": "specialpage", "AutoloadClasses": { "MathSearchHooks": "MathSearch.hooks.php", -- To view, visit https://gerrit.wikimedia.org/r/250840 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I884f0ee5141f6e9dfae7e1fe6dcb8b8ed36b8e6f Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/MathSearch Gerrit-Branch: master Gerrit-Owner: Physikerwelt <w...@physikerwelt.de> Gerrit-Reviewer: Dyiop <akashworkm...@gmail.com> Gerrit-Reviewer: Hcohl <hc...@nist.gov> Gerrit-Reviewer: Physikerwelt <w...@physikerwelt.de> Gerrit-Reviewer: Springle <sprin...@wikimedia.org> Gerrit-Reviewer: Whyameri <yusuf.am...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits