From 79df150a62f01fba938f400e59b2ff64c0150ddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20S=CC=8Ckoda?= Date: Sun, 9 Sep 2012 12:05:52 +0200 Subject: [PATCH] MDL-35318 use new lang revision to invalidate TinyMCE lang caches --- lib/editor/tinymce/lib.php | 4 +++- lib/editor/tinymce/version.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/editor/tinymce/lib.php b/lib/editor/tinymce/lib.php index 467465dda06..db9843bbad3 100644 --- a/lib/editor/tinymce/lib.php +++ b/lib/editor/tinymce/lib.php @@ -129,8 +129,10 @@ class tinymce_texteditor extends texteditor { $fontselectlist = empty($config->fontselectlist) ? '' : $config->fontselectlist; - // TODO: MDL-35318 somehow implement cache invalidation - we need to get lang revision somehow and sync purging. $langrev = -1; + if (!empty($CFG->cachejs)) { + $langrev = get_string_manager()->get_revision(); + } $params = array( 'moodle_config' => $config, diff --git a/lib/editor/tinymce/version.php b/lib/editor/tinymce/version.php index b87fd50c4f4..904cf01ec0c 100644 --- a/lib/editor/tinymce/version.php +++ b/lib/editor/tinymce/version.php @@ -24,7 +24,7 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012090700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012090900; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012083100; // Requires this Moodle version $plugin->component = 'editor_tinymce'; // Full name of the plugin (used for diagnostics) $plugin->release = '3.6.0'; // This is NOT a directory name, see lib.php if you need to know where is the editor code!