Skip to content

Commit

Permalink
Merge branch 'MDL-70317-master' of git://github.com/lucaboesch/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Jan 20, 2021
2 parents f2d8bd4 + 4dfb1e0 commit 35407b0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
12 changes: 12 additions & 0 deletions filter/mathjaxloader/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,17 @@ function xmldb_filter_mathjaxloader_upgrade($oldversion) {
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.

if ($oldversion < 2021052501) {
// Update CDN url.
$originalurl = 'https://cdn.jsdelivr.net/npm/mathjax@2.7.8/MathJax.js';
$newurl = 'https://cdn.jsdelivr.net/npm/mathjax@2.7.9/MathJax.js';
$currenturl = get_config('filter_mathjaxloader', 'httpsurl');
if ($currenturl == $originalurl) {
set_config('httpsurl', $newurl, 'filter_mathjaxloader');
}

upgrade_plugin_savepoint(true, 2021052501, 'filter', 'mathjaxloader');
}

return true;
}
4 changes: 3 additions & 1 deletion filter/mathjaxloader/readme_moodle.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Description of MathJAX library integration in Moodle
====================================================

* Default MathJax version: 2.7.8
* Default MathJax version: 2.7.9
* License: Apache 2.0
* Source: https://www.mathjax.org/

Expand All @@ -21,5 +21,7 @@ Upgrading the default MathJax version
Changes
-------

* Updated to the 2.7.9 version. See MDL-70317 for details.

* The MathJax 2.7.2 seems to have a possible security issue, the CDN default value have been
updated to point to the recommended 2.7.8 version. See MDL-68430 for details.
2 changes: 1 addition & 1 deletion filter/mathjaxloader/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
$item = new admin_setting_configtext('filter_mathjaxloader/httpsurl',
new lang_string('httpsurl', 'filter_mathjaxloader'),
new lang_string('httpsurl_help', 'filter_mathjaxloader'),
'https://cdn.jsdelivr.net/npm/mathjax@2.7.8/MathJax.js',
'https://cdn.jsdelivr.net/npm/mathjax@2.7.9/MathJax.js',
PARAM_RAW);
$settings->add($item);

Expand Down
2 changes: 1 addition & 1 deletion filter/mathjaxloader/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2021052500;
$plugin->version = 2021052501;
$plugin->requires = 2021052500; // Requires this Moodle version.
$plugin->component= 'filter_mathjaxloader';

0 comments on commit 35407b0

Please sign in to comment.