From acf17832d6bf698ae218d7941e315fa37726536a Mon Sep 17 00:00:00 2001 From: Simey Lameze Date: Wed, 28 Sep 2016 14:56:51 +0800 Subject: [PATCH] MDL-56017 filters: Update MathJax to version 2.7 --- filter/mathjaxloader/db/upgrade.php | 7 +++++++ filter/mathjaxloader/settings.php | 2 +- filter/mathjaxloader/version.php | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/filter/mathjaxloader/db/upgrade.php b/filter/mathjaxloader/db/upgrade.php index 77fc2d9c6dc..4edbe2c33a8 100644 --- a/filter/mathjaxloader/db/upgrade.php +++ b/filter/mathjaxloader/db/upgrade.php @@ -148,5 +148,12 @@ MathJax.Hub.Config({ upgrade_plugin_savepoint(true, 2016080200, 'filter', 'mathjaxloader'); } + if ($oldversion < 2016080201) { + $httpsurl = get_config('filter_mathjaxloader', 'httpsurl'); + if ($httpsurl === "https://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js") { + set_config('httpsurl', 'https://cdn.mathjax.org/mathjax/2.7-latest/MathJax.js', 'filter_mathjaxloader'); + } + upgrade_plugin_savepoint(true, 2016080201, 'filter', 'mathjaxloader'); + } return true; } diff --git a/filter/mathjaxloader/settings.php b/filter/mathjaxloader/settings.php index 0453a47a764..6bbc1be9d3a 100644 --- a/filter/mathjaxloader/settings.php +++ b/filter/mathjaxloader/settings.php @@ -33,7 +33,7 @@ if ($ADMIN->fulltree) { $item = new admin_setting_configtext('filter_mathjaxloader/httpsurl', new lang_string('httpsurl', 'filter_mathjaxloader'), new lang_string('httpsurl_help', 'filter_mathjaxloader'), - 'https://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js', + 'https://cdn.mathjax.org/mathjax/2.7-latest/MathJax.js', PARAM_RAW); $settings->add($item); diff --git a/filter/mathjaxloader/version.php b/filter/mathjaxloader/version.php index 60bf5177f75..706a0a948fb 100644 --- a/filter/mathjaxloader/version.php +++ b/filter/mathjaxloader/version.php @@ -24,6 +24,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2016080200; +$plugin->version = 2016080201; $plugin->requires = 2016051900; // Requires this Moodle version. $plugin->component= 'filter_mathjaxloader';